@univerjs/sheets-data-validation-ui 0.5.5 → 0.6.0-alpha.0

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,71 +1,44 @@
1
1
  var ko = Object.defineProperty;
2
2
  var Wo = (e, t, o) => t in e ? ko(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var M = (e, t, o) => Wo(e, typeof t != "symbol" ? t + "" : t, o);
4
- import Zt, { useState as W, forwardRef as we, useRef as We, createElement as Re, useMemo as He, useEffect as Ce } from "react";
5
- import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as it, useDependency as L, ICommandService as Q, dayjs as qt, numfmt as Jt, CellValueType as Ho, UniverInstanceType as Y, toDisposable as Yo, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xo, DisposableCollection as zo, CommandType as Je, BuildTextUtils as Ko, DataValidationRenderMode as de, DataValidationType as z, IConfigService as pn, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, debounce as Jo, shallowEqual as bn, Injector as Fe, DataValidationStatus as rt, ObjectMatrix as _t, Range as Qo, Rectangle as St, queryObjectMatrix as Qt, Optional as ea, RxDisposable as fn, InterceptorEffectEnum as Kn, sequenceExecute as Gn, bufferDebounceTime as ta, isFormulaString as Pe, Tools as en, ThemeService as na, VerticalAlign as ue, HorizontalAlign as Ye, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as oa, DEFAULT_EMPTY_DOCUMENT_VALUE as aa, BooleanNumber as Qe, Plugin as Zn, merge as qn } from "@univerjs/core";
6
- import { Button as je, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as mn, Radio as Ae, Checkbox as Ot, Input as xe, Select as tn, DraggableList as sa } from "@univerjs/design";
7
- import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as En, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as Jn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as fa } from "@univerjs/engine-render";
8
- import { SheetInterceptorService as gn, AFTER_CELL_EDIT_ASYNC as ma, SetRangeValuesCommand as vn, SheetsSelectionsService as Qn, getSheetCommandTarget as eo, SheetPermissionCheckController as to, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as no, InterceptCellContentPriority as oo } from "@univerjs/sheets";
9
- import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as ao, serializeListOptions as io, UpdateSheetDataValidationRangeCommand as ro, UpdateSheetDataValidationSettingCommand as On, RemoveSheetDataValidationCommand as so, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as lo, AddSheetDataValidationCommand as _n, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as co, getDataValidationDiffMutations as an, DataValidationCacheService as uo, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as Ln, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
10
- import { getPatternType as Va } from "@univerjs/sheets-numfmt";
11
- import { SetCellEditVisibleOperation as ho, SheetCanvasPopManagerService as ya, IEditorBridgeService as po, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Pn, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Tn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as fo, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
12
- import { IDialogService as ja, KeyCode as sn, ISidebarService as mo, useObservable as Ne, ComponentManager as Lt, IZenZoneService as go, RectPopup as Fa, useEvent as ln, useSidebarClick as Sn, MenuItemType as Cn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
- import { DataValidatorRegistryService as ye, DataValidationModel as Pt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as An, getRuleSetting as xn } from "@univerjs/data-validation";
3
+ var y = (e, t, o) => Wo(e, typeof t != "symbol" ? t + "" : t, o);
4
+ import { jsxs as x, jsx as f, Fragment as we } from "react/jsx-runtime";
5
+ import { Inject as b, LocaleService as Q, Disposable as De, DataValidationErrorStyle as rt, useDependency as L, ICommandService as ee, dayjs as Zt, numfmt as qt, CellValueType as Ho, UniverInstanceType as X, toDisposable as jo, IUniverInstanceService as ve, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as xo, DisposableCollection as Yo, CommandType as et, BuildTextUtils as Xo, DataValidationRenderMode as ce, DataValidationType as K, IConfigService as hn, UndoCommand as zo, RedoCommand as Ko, isUnitRangesEqual as Go, debounce as Zo, shallowEqual as yn, Injector as $e, DataValidationStatus as st, ObjectMatrix as St, Range as qo, Rectangle as Ct, queryObjectMatrix as Jt, Optional as Jo, RxDisposable as pn, InterceptorEffectEnum as Xn, sequenceExecute as zn, bufferDebounceTime as Qo, isFormulaString as Ae, Tools as Qt, ThemeService as ea, VerticalAlign as he, HorizontalAlign as Ye, DEFAULT_STYLES as de, WrapStrategy as Ce, DocumentDataModel as ta, DEFAULT_EMPTY_DOCUMENT_VALUE as na, BooleanNumber as tt, Plugin as Kn, merge as Gn } from "@univerjs/core";
6
+ import { Button as Be, DatePanel as oa, Scrollbar as aa, FormLayout as q, RadioGroup as fn, Radio as Ne, Checkbox as Lt, Input as Ue, Select as en, DraggableList as ia } from "@univerjs/design";
7
+ import { DeviceInputEventType as tn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as ra, CheckboxShape as sa, CURSOR_TYPE as Xe, FontCache as la, Shape as da, Rect as Zn, getFontStyleString as Ut, getDocsSkeletonPageSize as nt, DocumentViewModel as ca, DocumentSkeleton as ua, Documents as ha } from "@univerjs/engine-render";
8
+ import { SheetInterceptorService as mn, AFTER_CELL_EDIT_ASYNC as pa, SetRangeValuesCommand as gn, SheetsSelectionsService as qn, getSheetCommandTarget as Jn, SheetPermissionCheckController as Qn, WorkbookEditablePermission as It, RangeProtectionPermissionEditPoint as wt, WorksheetEditPermission as Rt, checkRangesEditablePermission as fa, WorksheetSetCellStylePermission as nn, INTERCEPTOR_POINT as eo, InterceptCellContentPriority as to } from "@univerjs/sheets";
9
+ import { SheetDataValidationModel as ae, getCellValueOrigin as re, getDataValidationCellValue as ma, deserializeListOptions as no, serializeListOptions as oo, UpdateSheetDataValidationRangeCommand as ao, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as io, UpdateSheetDataValidationOptionsCommand as ga, createDefaultNewRule as ro, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as va, DATA_VALIDATION_PLUGIN_NAME as so, getDataValidationDiffMutations as on, DataValidationCacheService as lo, DataValidationFormulaController as _a, DataValidationFormulaService as Sa, getFormulaResult as Bt, isLegalFormulaResult as On, transformCheckboxValue as Ca, CHECKBOX_FORMULA_1 as Ia, CHECKBOX_FORMULA_2 as wa } from "@univerjs/sheets-data-validation";
10
+ import { getPatternType as Ra } from "@univerjs/sheets-numfmt";
11
+ import { SetCellEditVisibleOperation as co, SheetCanvasPopManagerService as Da, IEditorBridgeService as uo, IMarkSelectionService as Va, HoverManagerService as Ma, CellAlertManagerService as ya, CellAlertType as ba, IAutoFillService as Ea, APPLY_TYPE as ot, virtualizeDiscreteRanges as an, getAutoFillRepeatRange as Oa, COPY_TYPE as Ln, rangeToDiscreteRange as La, PREDEFINED_HOOK_NAME as ct, getRepeatRange as Pn, ISheetClipboardService as Pa, getCurrentRangeDisable$ as Ta, AutoHeightController as ho, SheetSkeletonManagerService as Dt } from "@univerjs/sheets-ui";
12
+ import { IDialogService as Aa, KeyCode as rn, ISidebarService as po, useObservable as ke, ComponentManager as Pt, IZenZoneService as fo, RectPopup as Fa, useEvent as sn, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
+ import Tn, { useState as j, forwardRef as Me, useRef as ze, createElement as ye, useMemo as Ke, useEffect as Ie } from "react";
14
+ import { DataValidatorRegistryService as be, DataValidationModel as Tt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as An, getRuleSetting as Fn } from "@univerjs/data-validation";
14
15
  import { RichTextEditingMutation as Wa } from "@univerjs/docs";
15
- import { filter as In, BehaviorSubject as jn, distinctUntilChanged as Ha, Subject as Ya, debounceTime as wn, bufferTime as vo } from "rxjs";
16
- import { deserializeRangeWithSheet as Xa, serializeRange as _o } from "@univerjs/engine-formula";
17
- import { RangeSelector as za, FormulaEditor as So } from "@univerjs/sheets-formula-ui";
18
- var Nt = { exports: {} }, nt = {};
19
- /**
20
- * @license React
21
- * react-jsx-runtime.production.min.js
22
- *
23
- * Copyright (c) Facebook, Inc. and its affiliates.
24
- *
25
- * This source code is licensed under the MIT license found in the
26
- * LICENSE file in the root directory of this source tree.
27
- */
28
- var Fn;
29
- function Ka() {
30
- if (Fn) return nt;
31
- Fn = 1;
32
- var e = Zt, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
33
- function r(l, s, c) {
34
- var u, p = {}, d = null, g = null;
35
- c !== void 0 && (d = "" + c), s.key !== void 0 && (d = "" + s.key), s.ref !== void 0 && (g = s.ref);
36
- for (u in s) n.call(s, u) && !i.hasOwnProperty(u) && (p[u] = s[u]);
37
- if (l && l.defaultProps) for (u in s = l.defaultProps, s) p[u] === void 0 && (p[u] = s[u]);
38
- return { $$typeof: t, type: l, key: d, ref: g, props: p, _owner: a.current };
39
- }
40
- return nt.Fragment = o, nt.jsx = r, nt.jsxs = r, nt;
41
- }
42
- var Nn;
43
- function Ga() {
44
- return Nn || (Nn = 1, Nt.exports = Ka()), Nt.exports;
45
- }
46
- var h = Ga(), Za = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Ja = (e, t, o, n) => {
47
- for (var a = n > 1 ? void 0 : n ? qa(t, o) : t, i = e.length - 1, r; i >= 0; i--)
16
+ import { filter as Cn, BehaviorSubject as Nn, distinctUntilChanged as Ha, Subject as ja, debounceTime as In, bufferTime as mo } from "rxjs";
17
+ import { deserializeRangeWithSheet as xa, serializeRange as go } from "@univerjs/engine-formula";
18
+ import { RangeSelector as Ya, FormulaEditor as vo } from "@univerjs/sheets-formula-ui";
19
+ var Xa = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Ka = (e, t, o, n) => {
20
+ for (var a = n > 1 ? void 0 : n ? za(t, o) : t, i = e.length - 1, r; i >= 0; i--)
48
21
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
49
- return n && a && Za(t, o, a), a;
50
- }, ot = (e, t) => (o, n) => t(o, n, e);
51
- let st = class extends De {
22
+ return n && a && Xa(t, o, a), a;
23
+ }, at = (e, t) => (o, n) => t(o, n, e);
24
+ let lt = class extends De {
52
25
  constructor(e, t, o, n, a) {
53
26
  super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = o, this._dialogService = n, this._localeService = a, this._initEditorBridgeInterceptor();
54
27
  }
55
28
  _initEditorBridgeInterceptor() {
56
29
  this._sheetInterceptorService.writeCellInterceptor.intercept(
57
- ma,
30
+ pa,
58
31
  {
59
32
  handler: async (e, t, o) => {
60
33
  var C;
61
- const n = await e, { worksheet: a, row: i, col: r, unitId: l, subUnitId: s, workbook: c } = t, u = this._dataValidationModel.getRuleIdByLocation(l, s, i, r), p = u ? this._dataValidationModel.getRuleById(l, s, u) : void 0;
62
- if (!p || p.errorStyle !== it.STOP)
34
+ const n = await e, { worksheet: a, row: i, col: r, unitId: l, subUnitId: s, workbook: c } = t, u = this._dataValidationModel.getRuleIdByLocation(l, s, i, r), h = u ? this._dataValidationModel.getRuleById(l, s, u) : void 0;
35
+ if (!h || h.errorStyle !== rt.STOP)
63
36
  return o(Promise.resolve(n));
64
- const d = await this._dataValidatorRegistryService.getValidatorItem(p.type);
37
+ const d = await this._dataValidatorRegistryService.getValidatorItem(h.type);
65
38
  if (!d || await d.validator(
66
39
  {
67
- value: ie(n),
68
- interceptValue: ie((C = t == null ? void 0 : t.origin) != null ? C : n),
40
+ value: re(n),
41
+ interceptValue: re((C = t == null ? void 0 : t.origin) != null ? C : n),
69
42
  row: i,
70
43
  column: r,
71
44
  unitId: l,
@@ -74,10 +47,10 @@ let st = class extends De {
74
47
  workbook: c,
75
48
  t: n == null ? void 0 : n.t
76
49
  },
77
- p
50
+ h
78
51
  ))
79
52
  return o(Promise.resolve(n));
80
- const f = a.getCellRaw(i, r);
53
+ const p = a.getCellRaw(i, r);
81
54
  return this._dialogService.open({
82
55
  width: 368,
83
56
  title: {
@@ -85,11 +58,11 @@ let st = class extends De {
85
58
  },
86
59
  id: "reject-input-dialog",
87
60
  children: {
88
- title: d.getRuleFinalError(p, { row: i, col: r, unitId: l, subUnitId: s })
61
+ title: d.getRuleFinalError(h, { row: i, col: r, unitId: l, subUnitId: s })
89
62
  },
90
63
  footer: {
91
- title: Zt.createElement(
92
- je,
64
+ title: Tn.createElement(
65
+ Be,
93
66
  {
94
67
  type: "primary",
95
68
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -100,7 +73,7 @@ let st = class extends De {
100
73
  onClose: () => {
101
74
  this._dialogService.close("reject-input-dialog");
102
75
  }
103
- }), o(Promise.resolve(f));
76
+ }), o(Promise.resolve(p));
104
77
  }
105
78
  }
106
79
  );
@@ -116,8 +89,8 @@ let st = class extends De {
116
89
  title: e
117
90
  },
118
91
  footer: {
119
- title: Zt.createElement(
120
- je,
92
+ title: Tn.createElement(
93
+ Be,
121
94
  {
122
95
  type: "primary",
123
96
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -131,40 +104,40 @@ let st = class extends De {
131
104
  });
132
105
  }
133
106
  };
134
- st = Ja([
135
- ot(0, b(gn)),
136
- ot(1, b(oe)),
137
- ot(2, b(ye)),
138
- ot(3, ja),
139
- ot(4, b(J))
140
- ], st);
141
- const Qa = "univer-dv-date-dropdown", ei = "univer-dv-date-dropdown-btns", Un = {
142
- dvDateDropdown: Qa,
143
- dvDateDropdownBtns: ei
144
- }, ti = (e) => {
107
+ lt = Ka([
108
+ at(0, b(mn)),
109
+ at(1, b(ae)),
110
+ at(2, b(be)),
111
+ at(3, Aa),
112
+ at(4, b(Q))
113
+ ], lt);
114
+ const Ga = "univer-dv-date-dropdown", Za = "univer-dv-date-dropdown-btns", Un = {
115
+ dvDateDropdown: Ga,
116
+ dvDateDropdownBtns: Za
117
+ }, qa = (e) => {
145
118
  if (e == null || typeof e == "boolean")
146
119
  return;
147
120
  if (typeof e == "number" || !Number.isNaN(+e))
148
- return qt(Jt.format("yyyy-MM-dd HH:mm:ss", Number(e)));
149
- const t = qt(e);
121
+ return Zt(qt.format("yyyy-MM-dd HH:mm:ss", Number(e)));
122
+ const t = Zt(e);
150
123
  if (t.isValid())
151
124
  return t;
152
125
  };
153
- function ni(e) {
126
+ function Ja(e) {
154
127
  var m;
155
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(Q), u = L(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), g = ti(d), [f, C] = W(g), R = f && f.isValid() ? f : qt(), v = L(J), w = L(oe), I = w.getRuleByLocation(r, l, a, i);
128
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(ee), u = L(lt), h = n.getCell(a, i), d = re(n.getCellRaw(a, i)), v = qa(d), [p, C] = j(v), R = p && p.isValid() ? p : Zt(), g = L(Q), w = L(ae), I = w.getRuleByLocation(r, l, a, i);
156
129
  if (!I)
157
130
  return null;
158
131
  const V = w.getValidator(I.type);
159
- if (!p || !V)
132
+ if (!h || !V)
160
133
  return;
161
134
  const _ = !!((m = I.bizInfo) != null && m.showTime), S = async () => {
162
- var x, j, N;
135
+ var F, N, B;
163
136
  if (!R)
164
137
  return;
165
- const P = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), F = (x = Jt.parseDate(P)) == null ? void 0 : x.v, T = s.getStyles().getStyleByCell(p), E = (N = (j = T == null ? void 0 : T.n) == null ? void 0 : j.pattern) != null ? N : "", A = Va(E);
166
- I.errorStyle !== it.STOP || await V.validator({
167
- value: F,
138
+ const P = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (F = qt.parseDate(P)) == null ? void 0 : F.v, T = s.getStyles().getStyleByCell(h), E = (B = (N = T == null ? void 0 : T.n) == null ? void 0 : N.pattern) != null ? B : "", A = Ra(E);
139
+ I.errorStyle !== rt.STOP || await V.validator({
140
+ value: U,
168
141
  unitId: r,
169
142
  subUnitId: l,
170
143
  row: a,
@@ -173,12 +146,12 @@ function ni(e) {
173
146
  workbook: s,
174
147
  interceptValue: P.replace("Z", "").replace("T", " "),
175
148
  t: Ho.NUMBER
176
- }, I) ? (o(), await c.executeCommand(ho.id, {
149
+ }, I) ? (o(), await c.executeCommand(co.id, {
177
150
  visible: !1,
178
- eventType: nn.Keyboard,
151
+ eventType: tn.Keyboard,
179
152
  unitId: r,
180
- keycode: sn.ESC
181
- }), await c.executeCommand(vn.id, {
153
+ keycode: rn.ESC
154
+ }), await c.executeCommand(gn.id, {
182
155
  unitId: r,
183
156
  subUnitId: l,
184
157
  range: {
@@ -188,7 +161,7 @@ function ni(e) {
188
161
  endRow: a
189
162
  },
190
163
  value: {
191
- v: F,
164
+ v: U,
192
165
  t: 2,
193
166
  p: null,
194
167
  f: null,
@@ -201,51 +174,51 @@ function ni(e) {
201
174
  }
202
175
  })) : u.showReject(V.getRuleFinalError(I, { row: a, col: i, unitId: r, subUnitId: l }));
203
176
  };
204
- return /* @__PURE__ */ h.jsxs("div", { className: Un.dvDateDropdown, children: [
205
- /* @__PURE__ */ h.jsx(
206
- ia,
177
+ return /* @__PURE__ */ x("div", { className: Un.dvDateDropdown, children: [
178
+ /* @__PURE__ */ f(
179
+ oa,
207
180
  {
208
181
  defaultValue: R,
209
182
  pickerValue: R,
210
183
  showTime: _ || void 0,
211
- onSelect: async (y) => {
212
- C(y);
184
+ onSelect: async (M) => {
185
+ C(M);
213
186
  },
214
- onPanelChange: (y) => {
215
- C(y);
187
+ onPanelChange: (M) => {
188
+ C(M);
216
189
  },
217
- disabledDate: (y) => !Jt.parseDate(y.format("YYYY-MM-DD"))
190
+ disabledDate: (M) => !qt.parseDate(M.format("YYYY-MM-DD"))
218
191
  }
219
192
  ),
220
- /* @__PURE__ */ h.jsx("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ h.jsx(je, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: v.t("dataValidation.alert.ok") }) })
193
+ /* @__PURE__ */ f("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ f(Be, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: g.t("dataValidation.alert.ok") }) })
221
194
  ] });
222
195
  }
223
- var ce = function() {
224
- return ce = Object.assign || function(e) {
196
+ var ue = function() {
197
+ return ue = Object.assign || function(e) {
225
198
  for (var t, o = 1, n = arguments.length; o < n; o++) {
226
199
  t = arguments[o];
227
200
  for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
228
201
  }
229
202
  return e;
230
- }, ce.apply(this, arguments);
231
- }, oi = function(e, t) {
203
+ }, ue.apply(this, arguments);
204
+ }, Qa = function(e, t) {
232
205
  var o = {};
233
206
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
234
207
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
235
208
  for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
236
209
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
237
210
  return o;
238
- }, Me = we(function(e, t) {
239
- var o = e.icon, n = e.id, a = e.className, i = e.extend, r = oi(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = We("_".concat(ri()));
240
- return Co(o, "".concat(n), { defIds: o.defIds, idSuffix: s.current }, ce({ ref: t, className: l }, r), i);
211
+ }, Ee = Me(function(e, t) {
212
+ var o = e.icon, n = e.id, a = e.className, i = e.extend, r = Qa(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = ze("_".concat(ni()));
213
+ return _o(o, "".concat(n), { defIds: o.defIds, idSuffix: s.current }, ue({ ref: t, className: l }, r), i);
241
214
  });
242
- function Co(e, t, o, n, a) {
243
- return Re(e.tag, ce(ce({ key: t }, ai(e, o, a)), n), (ii(e, o).children || []).map(function(i, r) {
244
- return Co(i, "".concat(t, "-").concat(e.tag, "-").concat(r), o, void 0, a);
215
+ function _o(e, t, o, n, a) {
216
+ return ye(e.tag, ue(ue({ key: t }, ei(e, o, a)), n), (ti(e, o).children || []).map(function(i, r) {
217
+ return _o(i, "".concat(t, "-").concat(e.tag, "-").concat(r), o, void 0, a);
245
218
  }));
246
219
  }
247
- function ai(e, t, o) {
248
- var n = ce({}, e.attrs);
220
+ function ei(e, t, o) {
221
+ var n = ue({}, e.attrs);
249
222
  o != null && o.colorChannel1 && n.fill === "colorChannel1" && (n.fill = o.colorChannel1);
250
223
  var a = t.defIds;
251
224
  return !a || a.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
@@ -253,92 +226,92 @@ function ai(e, t, o) {
253
226
  typeof l == "string" && (n[r] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
254
227
  })), n;
255
228
  }
256
- function ii(e, t) {
229
+ function ti(e, t) {
257
230
  var o, n = t.defIds;
258
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((o = e.children) === null || o === void 0) && o.length) ? ce(ce({}, e), { children: e.children.map(function(a) {
259
- return typeof a.attrs.id == "string" && n && n.indexOf(a.attrs.id) > -1 ? ce(ce({}, a), { attrs: ce(ce({}, a.attrs), { id: a.attrs.id + t.idSuffix }) }) : a;
231
+ return !n || n.length === 0 ? e : e.tag === "defs" && (!((o = e.children) === null || o === void 0) && o.length) ? ue(ue({}, e), { children: e.children.map(function(a) {
232
+ return typeof a.attrs.id == "string" && n && n.indexOf(a.attrs.id) > -1 ? ue(ue({}, a), { attrs: ue(ue({}, a.attrs), { id: a.attrs.id + t.idSuffix }) }) : a;
260
233
  }) }) : e;
261
234
  }
262
- function ri() {
235
+ function ni() {
263
236
  return Math.random().toString(36).substring(2, 8);
264
237
  }
265
- Me.displayName = "UniverIcon";
266
- var si = { 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" } }] }, Io = we(function(e, t) {
267
- return Re(Me, Object.assign({}, e, {
238
+ Ee.displayName = "UniverIcon";
239
+ var oi = { 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" } }] }, So = Me(function(e, t) {
240
+ return ye(Ee, Object.assign({}, e, {
268
241
  id: "check-mark-single",
269
242
  ref: t,
270
- icon: si
243
+ icon: oi
271
244
  }));
272
245
  });
273
- Io.displayName = "CheckMarkSingle";
274
- var li = { 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" } }] }, wo = we(function(e, t) {
275
- return Re(Me, Object.assign({}, e, {
246
+ So.displayName = "CheckMarkSingle";
247
+ var ai = { 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" } }] }, Co = Me(function(e, t) {
248
+ return ye(Ee, Object.assign({}, e, {
276
249
  id: "data-validation-single",
277
250
  ref: t,
278
- icon: li
251
+ icon: ai
279
252
  }));
280
253
  });
281
- wo.displayName = "DataValidationSingle";
282
- var di = { 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" } }] }, Rn = we(function(e, t) {
283
- return Re(Me, Object.assign({}, e, {
254
+ Co.displayName = "DataValidationSingle";
255
+ var ii = { 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" } }] }, wn = Me(function(e, t) {
256
+ return ye(Ee, Object.assign({}, e, {
284
257
  id: "delete-single",
285
258
  ref: t,
286
- icon: di
259
+ icon: ii
287
260
  }));
288
261
  });
289
- Rn.displayName = "DeleteSingle";
290
- var ci = { 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" } }] }, Ro = we(function(e, t) {
291
- return Re(Me, Object.assign({}, e, {
262
+ wn.displayName = "DeleteSingle";
263
+ var ri = { 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" } }] }, Io = Me(function(e, t) {
264
+ return ye(Ee, Object.assign({}, e, {
292
265
  id: "increase-single",
293
266
  ref: t,
294
- icon: ci
267
+ icon: ri
295
268
  }));
296
269
  });
297
- Ro.displayName = "IncreaseSingle";
298
- var ui = { 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" } }] }, Do = we(function(e, t) {
299
- return Re(Me, Object.assign({}, e, {
270
+ Io.displayName = "IncreaseSingle";
271
+ var si = { 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" } }] }, wo = Me(function(e, t) {
272
+ return ye(Ee, Object.assign({}, e, {
300
273
  id: "more-down-single",
301
274
  ref: t,
302
- icon: ui
275
+ icon: si
303
276
  }));
304
277
  });
305
- Do.displayName = "MoreDownSingle";
306
- var hi = { 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" } }] }, Vo = we(function(e, t) {
307
- return Re(Me, Object.assign({}, e, {
278
+ wo.displayName = "MoreDownSingle";
279
+ var li = { 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" } }] }, Ro = Me(function(e, t) {
280
+ return ye(Ee, Object.assign({}, e, {
308
281
  id: "more-up-single",
309
282
  ref: t,
310
- icon: hi
283
+ icon: li
311
284
  }));
312
285
  });
313
- Vo.displayName = "MoreUpSingle";
314
- var pi = { 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" } }] }] }, yo = we(function(e, t) {
315
- return Re(Me, Object.assign({}, e, {
286
+ Ro.displayName = "MoreUpSingle";
287
+ var di = { 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" } }] }] }, Do = Me(function(e, t) {
288
+ return ye(Ee, Object.assign({}, e, {
316
289
  id: "sequence-single",
317
290
  ref: t,
318
- icon: pi
291
+ icon: di
319
292
  }));
320
293
  });
321
- yo.displayName = "SequenceSingle";
322
- var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, gi = (e, t, o, n) => {
323
- for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
294
+ Do.displayName = "SequenceSingle";
295
+ var ci = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, hi = (e, t, o, n) => {
296
+ for (var a = n > 1 ? void 0 : n ? ui(t, o) : t, i = e.length - 1, r; i >= 0; i--)
324
297
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
325
- return n && a && fi(t, o, a), a;
298
+ return n && a && ci(t, o, a), a;
326
299
  }, Bn = (e, t) => (o, n) => t(o, n, e);
327
- let fe = class extends De {
300
+ let me = class extends De {
328
301
  constructor(t, o) {
329
302
  super();
330
- M(this, "_open$", new jn(!1));
331
- M(this, "open$", this._open$.pipe(Ha()));
332
- M(this, "_activeRule");
333
- M(this, "_activeRule$", new jn(void 0));
334
- M(this, "activeRule$", this._activeRule$.asObservable());
335
- M(this, "_closeDisposable", null);
303
+ y(this, "_open$", new Nn(!1));
304
+ y(this, "open$", this._open$.pipe(Ha()));
305
+ y(this, "_activeRule");
306
+ y(this, "_activeRule$", new Nn(void 0));
307
+ y(this, "activeRule$", this._activeRule$.asObservable());
308
+ y(this, "_closeDisposable", null);
336
309
  this._univerInstanceService = t, this._sidebarService = o, this.disposeWithMe(
337
- this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET).pipe(In((n) => !n)).subscribe(() => {
310
+ this._univerInstanceService.getCurrentTypeOfUnit$(X.UNIVER_SHEET).pipe(Cn((n) => !n)).subscribe(() => {
338
311
  this.close();
339
312
  })
340
313
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
341
- n.id === Dt && (n.visible || setTimeout(() => {
314
+ n.id === Vt && (n.visible || setTimeout(() => {
342
315
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
343
316
  }));
344
317
  }));
@@ -361,7 +334,7 @@ let fe = class extends De {
361
334
  this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
362
335
  }
363
336
  setCloseDisposable(t) {
364
- this._closeDisposable = Yo(() => {
337
+ this._closeDisposable = jo(() => {
365
338
  t.dispose(), this._closeDisposable = null;
366
339
  });
367
340
  }
@@ -369,43 +342,40 @@ let fe = class extends De {
369
342
  this._activeRule = t, this._activeRule$.next(t);
370
343
  }
371
344
  };
372
- fe = gi([
373
- Bn(0, ge),
374
- Bn(1, mo)
375
- ], fe);
376
- function vi() {
377
- const e = L(Ie), t = Ne(e.activeDropdown$, e.activeDropdown), o = L(Lt);
345
+ me = hi([
346
+ Bn(0, ve),
347
+ Bn(1, po)
348
+ ], me);
349
+ function pi() {
350
+ const e = L(Re), t = ke(e.activeDropdown$, e.activeDropdown), o = L(Pt);
378
351
  if (!t)
379
352
  return null;
380
353
  const { location: n, componentKey: a } = t, i = o.get(a), r = `${n.unitId}-${n.subUnitId}-${n.row}-${n.col}`;
381
- if (!i)
382
- return null;
383
- const l = () => {
384
- e.hideDropdown();
385
- };
386
- return /* @__PURE__ */ h.jsx(
354
+ return i ? /* @__PURE__ */ f(
387
355
  i,
388
356
  {
389
357
  location: n,
390
- hideFn: l
358
+ hideFn: () => {
359
+ e.hideDropdown();
360
+ }
391
361
  },
392
362
  r
393
- );
363
+ ) : null;
394
364
  }
395
- const Mo = "sheet.ui.dropdown";
396
- var _i = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ci = (e, t, o, n) => {
397
- for (var a = n > 1 ? void 0 : n ? Si(t, o) : t, i = e.length - 1, r; i >= 0; i--)
365
+ const Vo = "sheet.ui.dropdown";
366
+ var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, gi = (e, t, o, n) => {
367
+ for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
398
368
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
399
- return n && a && _i(t, o, a), a;
400
- }, be = (e, t) => (o, n) => t(o, n, e);
401
- let Ie = class extends De {
369
+ return n && a && fi(t, o, a), a;
370
+ }, Oe = (e, t) => (o, n) => t(o, n, e);
371
+ let Re = class extends De {
402
372
  constructor(t, o, n, a, i, r, l) {
403
373
  super();
404
- M(this, "_activeDropdown");
405
- M(this, "_activeDropdown$", new Ya());
406
- M(this, "_currentPopup", null);
407
- M(this, "activeDropdown$", this._activeDropdown$.asObservable());
408
- M(this, "_zenVisible", !1);
374
+ y(this, "_activeDropdown");
375
+ y(this, "_activeDropdown$", new ja());
376
+ y(this, "_currentPopup", null);
377
+ y(this, "activeDropdown$", this._activeDropdown$.asObservable());
378
+ y(this, "_zenVisible", !1);
409
379
  this._canvasPopupManagerService = t, this._univerInstanceService = o, this._dataValidatorRegistryService = n, this._zenZoneService = a, this._renderManagerService = i, this._dataValidationModel = r, this._sheetsSelectionsService = l, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
410
380
  this._activeDropdown$.complete();
411
381
  });
@@ -419,7 +389,7 @@ let Ie = class extends De {
419
389
  }));
420
390
  }
421
391
  _getDropdownByCell(t, o, n, a) {
422
- const i = t ? this._univerInstanceService.getUnit(t, Y.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(Y.UNIVER_SHEET);
392
+ const i = t ? this._univerInstanceService.getUnit(t, X.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(X.UNIVER_SHEET);
423
393
  if (!i)
424
394
  return;
425
395
  const r = o ? i.getSheetBySheetId(o) : i.getActiveSheet();
@@ -441,11 +411,11 @@ let Ie = class extends De {
441
411
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
442
412
  return;
443
413
  this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
444
- const s = this._renderManagerService.getRenderById(Xo), c = this._canvasPopupManagerService.attachPopupToCell(
414
+ const s = this._renderManagerService.getRenderById(xo), c = this._canvasPopupManagerService.attachPopupToCell(
445
415
  a,
446
416
  i,
447
417
  {
448
- componentKey: Mo,
418
+ componentKey: Vo,
449
419
  onClickOutside: () => {
450
420
  o && this.hideDropdown();
451
421
  },
@@ -457,11 +427,11 @@ let Ie = class extends De {
457
427
  );
458
428
  if (!c)
459
429
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
460
- const u = new zo();
430
+ const u = new Yo();
461
431
  u.add(c), u.add({
462
432
  dispose: () => {
463
- var p, d;
464
- (d = (p = this._activeDropdown) == null ? void 0 : p.onHide) == null || d.call(p);
433
+ var h, d;
434
+ (d = (h = this._activeDropdown) == null ? void 0 : h.onHide) == null || d.call(h);
465
435
  }
466
436
  }), this._currentPopup = u;
467
437
  }
@@ -469,7 +439,7 @@ let Ie = class extends De {
469
439
  this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
470
440
  }
471
441
  showDataValidationDropdown(t, o, n, a, i) {
472
- const r = this._univerInstanceService.getUnit(t, Y.UNIVER_SHEET);
442
+ const r = this._univerInstanceService.getUnit(t, X.UNIVER_SHEET);
473
443
  if (!r)
474
444
  return;
475
445
  const l = r.getSheetBySheetId(o);
@@ -497,58 +467,58 @@ let Ie = class extends De {
497
467
  });
498
468
  }
499
469
  };
500
- Ie = Ci([
501
- be(0, b(ya)),
502
- be(1, ge),
503
- be(2, b(ye)),
504
- be(3, go),
505
- be(4, Ve),
506
- be(5, b(oe)),
507
- be(6, b(Qn))
508
- ], Ie);
509
- const Dt = "DataValidationPanel", Ue = {
470
+ Re = gi([
471
+ Oe(0, b(Da)),
472
+ Oe(1, ve),
473
+ Oe(2, b(be)),
474
+ Oe(3, fo),
475
+ Oe(4, Ve),
476
+ Oe(5, b(ae)),
477
+ Oe(6, b(qn))
478
+ ], Re);
479
+ const Vt = "DataValidationPanel", We = {
510
480
  id: "data-validation.operation.open-validation-panel",
511
- type: Je.OPERATION,
481
+ type: et.OPERATION,
512
482
  handler(e, t) {
513
483
  if (!t)
514
484
  return !1;
515
- const { ruleId: o, isAdd: n } = t, a = e.get(fe), i = e.get(Pt), r = e.get(ge), l = e.get(mo), s = eo(r);
485
+ const { ruleId: o, isAdd: n } = t, a = e.get(me), i = e.get(Tt), r = e.get(ve), l = e.get(po), s = Jn(r);
516
486
  if (!s) return !1;
517
- const { unitId: c, subUnitId: u } = s, p = o ? i.getRuleById(c, u, o) : void 0;
518
- a.open(), a.setActiveRule(p && {
487
+ const { unitId: c, subUnitId: u } = s, h = o ? i.getRuleById(c, u, o) : void 0;
488
+ a.open(), a.setActiveRule(h && {
519
489
  unitId: c,
520
490
  subUnitId: u,
521
- rule: p
491
+ rule: h
522
492
  });
523
493
  const d = l.open({
524
- id: Dt,
494
+ id: Vt,
525
495
  header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
526
- children: { label: Dt },
496
+ children: { label: Vt },
527
497
  width: 312,
528
498
  onClose: () => a.close()
529
499
  });
530
500
  return a.setCloseDisposable(d), !0;
531
501
  }
532
- }, Dn = {
502
+ }, Rn = {
533
503
  id: "data-validation.operation.close-validation-panel",
534
- type: Je.OPERATION,
504
+ type: et.OPERATION,
535
505
  handler(e) {
536
- return e.get(fe).close(), !0;
506
+ return e.get(me).close(), !0;
537
507
  }
538
- }, bo = {
508
+ }, Mo = {
539
509
  id: "data-validation.operation.toggle-validation-panel",
540
- type: Je.OPERATION,
510
+ type: et.OPERATION,
541
511
  handler(e) {
542
- const t = e.get(Q), o = e.get(fe);
543
- return o.open(), o.isOpen ? t.executeCommand(Dn.id) : t.executeCommand(Ue.id), !0;
512
+ const t = e.get(ee), o = e.get(me);
513
+ return o.open(), o.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(We.id), !0;
544
514
  }
545
- }, Tt = {
546
- type: Je.OPERATION,
515
+ }, At = {
516
+ type: et.OPERATION,
547
517
  id: "sheet.operation.show-data-validation-dropdown",
548
518
  handler(e, t) {
549
519
  if (!t)
550
520
  return !1;
551
- const o = e.get(Ie), { unitId: n, subUnitId: a, row: i, column: r } = t, l = o.activeDropdown, s = l == null ? void 0 : l.location;
521
+ const o = e.get(Re), { unitId: n, subUnitId: a, row: i, column: r } = t, l = o.activeDropdown, s = l == null ? void 0 : l.location;
552
522
  return s && s.unitId === n && s.subUnitId === a && s.row === i && s.col === r || o.showDataValidationDropdown(
553
523
  n,
554
524
  a,
@@ -556,79 +526,79 @@ const Dt = "DataValidationPanel", Ue = {
556
526
  r
557
527
  ), !0;
558
528
  }
559
- }, Eo = {
560
- type: Je.OPERATION,
529
+ }, yo = {
530
+ type: et.OPERATION,
561
531
  id: "sheet.operation.hide-data-validation-dropdown",
562
532
  handler(e, t) {
563
- return t ? (e.get(Ie).hideDropdown(), !0) : !1;
564
- }
565
- }, Te = "#ECECEC", Vn = "sheets-data-validation-ui.config", Vt = {}, Ii = "univer-dv-list-dropdown", wi = "univer-dv-list-dropdown-title", Ri = "univer-dv-list-dropdown-list", Di = "univer-dv-list-dropdown-list-container", Vi = "univer-dv-list-dropdown-selected-icon", yi = "univer-dv-list-dropdown-item-container", Mi = "univer-dv-list-dropdown-item", bi = "univer-dv-list-dropdown-split", Ei = "univer-dv-list-dropdown-edit", ve = {
566
- dvListDropdown: Ii,
567
- dvListDropdownTitle: wi,
568
- dvListDropdownList: Ri,
569
- dvListDropdownListContainer: Di,
570
- dvListDropdownSelectedIcon: Vi,
571
- dvListDropdownItemContainer: yi,
572
- dvListDropdownItem: Mi,
573
- dvListDropdownSplit: bi,
574
- dvListDropdownEdit: Ei
575
- }, Oi = (e) => {
533
+ return t ? (e.get(Re).hideDropdown(), !0) : !1;
534
+ }
535
+ }, Fe = "#ECECEC", Dn = "sheets-data-validation-ui.config", Mt = {}, vi = "univer-dv-list-dropdown", _i = "univer-dv-list-dropdown-title", Si = "univer-dv-list-dropdown-list", Ci = "univer-dv-list-dropdown-list-container", Ii = "univer-dv-list-dropdown-selected-icon", wi = "univer-dv-list-dropdown-item-container", Ri = "univer-dv-list-dropdown-item", Di = "univer-dv-list-dropdown-split", Vi = "univer-dv-list-dropdown-edit", _e = {
536
+ dvListDropdown: vi,
537
+ dvListDropdownTitle: _i,
538
+ dvListDropdownList: Si,
539
+ dvListDropdownListContainer: Ci,
540
+ dvListDropdownSelectedIcon: Ii,
541
+ dvListDropdownItemContainer: wi,
542
+ dvListDropdownItem: Ri,
543
+ dvListDropdownSplit: Di,
544
+ dvListDropdownEdit: Vi
545
+ }, Mi = (e) => {
576
546
  var _, S;
577
- const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(J), p = L(pn), d = s == null ? void 0 : s.toLowerCase(), { row: g, col: f, unitId: C, subUnitId: R } = c, v = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = p.getConfig(Vn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, I = L(to), V = He(() => I.permissionCheckWithRanges(
547
+ const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(Q), h = L(hn), d = s == null ? void 0 : s.toLowerCase(), { row: v, col: p, unitId: C, subUnitId: R } = c, g = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = h.getConfig(Dn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, I = L(Qn), V = Ke(() => I.permissionCheckWithRanges(
578
548
  {
579
- workbookTypes: [Ct],
580
- rangeTypes: [It],
581
- worksheetTypes: [wt]
549
+ workbookTypes: [It],
550
+ rangeTypes: [wt],
551
+ worksheetTypes: [Rt]
582
552
  },
583
- [{ startColumn: f, startRow: g, endColumn: f, endRow: g }],
553
+ [{ startColumn: p, startRow: v, endColumn: p, endRow: v }],
584
554
  C,
585
555
  R
586
- ), [I, f, g, C, R]);
587
- return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdown, style: l, children: [
588
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownTitle, children: i }),
589
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownList, children: /* @__PURE__ */ h.jsx(ra, { children: /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownListContainer, children: v.map((m, y) => {
590
- const P = t.indexOf(m.value) > -1, F = () => {
556
+ ), [I, p, v, C, R]);
557
+ return /* @__PURE__ */ x("div", { className: _e.dvListDropdown, style: l, children: [
558
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownTitle, children: i }),
559
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownList, children: /* @__PURE__ */ f(aa, { children: /* @__PURE__ */ f("div", { className: _e.dvListDropdownListContainer, children: g.map((m, M) => {
560
+ const P = t.indexOf(m.value) > -1, U = () => {
591
561
  let E;
592
- P ? E = new Set(t.filter((x) => x !== m.value)) : E = new Set(n ? [...t, m.value] : [m.value]);
562
+ P ? E = new Set(t.filter((F) => F !== m.value)) : E = new Set(n ? [...t, m.value] : [m.value]);
593
563
  const A = [];
594
- a.forEach((x) => {
595
- E.has(x.value) && A.push(x.value);
564
+ a.forEach((F) => {
565
+ E.has(F.value) && A.push(F.value);
596
566
  }), o(A);
597
567
  }, T = m.label.toLocaleLowerCase().indexOf(d);
598
- return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdownItemContainer, onClick: F, children: [
599
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownItem, style: { background: m.color || Te }, children: d && m.label.toLowerCase().includes(d) ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
600
- /* @__PURE__ */ h.jsx("span", { children: m.label.substring(0, T) }),
601
- /* @__PURE__ */ h.jsx("span", { style: { fontWeight: "bold" }, children: m.label.substring(T, T + d.length) }),
602
- /* @__PURE__ */ h.jsx("span", { children: m.label.substring(T + d.length) })
568
+ return /* @__PURE__ */ x("div", { className: _e.dvListDropdownItemContainer, onClick: U, children: [
569
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownItem, style: { background: m.color || Fe }, children: d && m.label.toLowerCase().includes(d) ? /* @__PURE__ */ x(we, { children: [
570
+ /* @__PURE__ */ f("span", { children: m.label.substring(0, T) }),
571
+ /* @__PURE__ */ f("span", { style: { fontWeight: "bold" }, children: m.label.substring(T, T + d.length) }),
572
+ /* @__PURE__ */ f("span", { children: m.label.substring(T + d.length) })
603
573
  ] }) : m.label }),
604
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownSelectedIcon, children: P ? /* @__PURE__ */ h.jsx(Io, {}) : null })
605
- ] }, y);
574
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownSelectedIcon, children: P ? /* @__PURE__ */ f(So, {}) : null })
575
+ ] }, M);
606
576
  }) }) }, s) }),
607
- w && V ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
608
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownSplit }),
609
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownEdit, children: /* @__PURE__ */ h.jsx("a", { onClick: r, children: u.t("dataValidation.list.edit") }) })
577
+ w && V ? /* @__PURE__ */ x(we, { children: [
578
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownSplit }),
579
+ /* @__PURE__ */ f("div", { className: _e.dvListDropdownEdit, children: /* @__PURE__ */ f("a", { onClick: r, children: u.t("dataValidation.list.edit") }) })
610
580
  ] }) : null
611
581
  ] });
612
582
  };
613
- function Li(e) {
614
- var j, N, H, X;
615
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [g, f] = W(""), C = L(po), R = L(ge), v = He(() => s.ruleChange$.pipe(wn(16)), []), w = L(oe);
616
- Ne(v);
617
- const I = Fa.useContext(), V = ((N = (j = I.current) == null ? void 0 : j.right) != null ? N : 0) - ((X = (H = I.current) == null ? void 0 : H.left) != null ? X : 0);
618
- if (Ce(() => {
619
- const k = p.onCommandExecuted((K) => {
620
- var q, ee;
621
- if (K.id === Wa.id) {
622
- const te = K.params, { unitId: re } = te, ae = R.getUnit(re, Y.UNIVER_DOC);
623
- if (!ae || !C.isVisible().visible) return;
624
- const se = Ko.transform.getPlainText((ee = (q = ae.getSnapshot().body) == null ? void 0 : q.dataStream) != null ? ee : "");
625
- u(se);
583
+ function yi(e) {
584
+ var N, B, Y, z;
585
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Tt), [c, u] = j(""), h = L(ee), d = L(Q), [v, p] = j(""), C = L(uo), R = L(ve), g = Ke(() => s.ruleChange$.pipe(In(16)), []), w = L(ae);
586
+ ke(g);
587
+ const I = Fa.useContext(), V = ((B = (N = I.current) == null ? void 0 : N.right) != null ? B : 0) - ((z = (Y = I.current) == null ? void 0 : Y.left) != null ? z : 0);
588
+ if (Ie(() => {
589
+ const H = h.onCommandExecuted((G) => {
590
+ var J, te;
591
+ if (G.id === Wa.id) {
592
+ const ne = G.params, { unitId: se } = ne, ie = R.getUnit(se, X.UNIVER_DOC);
593
+ if (!ie || !C.isVisible().visible) return;
594
+ const le = Xo.transform.getPlainText((te = (J = ie.getSnapshot().body) == null ? void 0 : J.dataStream) != null ? te : "");
595
+ u(le);
626
596
  }
627
597
  });
628
598
  return () => {
629
- k.dispose();
599
+ H.dispose();
630
600
  };
631
- }, [p, C, R]), !n)
601
+ }, [h, C, R]), !n)
632
602
  return null;
633
603
  const _ = w.getRuleByLocation(r, l, a, i);
634
604
  if (!_)
@@ -636,27 +606,27 @@ function Li(e) {
636
606
  const S = w.getValidator(_.type);
637
607
  if (!S)
638
608
  return null;
639
- const m = n.getCell(a, i), y = (_ == null ? void 0 : _.renderMode) === de.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
640
- if (!m || !_ || !S || S.id.indexOf(z.LIST) !== 0)
609
+ const m = n.getCell(a, i), M = (_ == null ? void 0 : _.renderMode) === ce.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
610
+ if (!m || !_ || !S || S.id.indexOf(K.LIST) !== 0)
641
611
  return;
642
- const P = _.type === z.LIST_MULTIPLE, F = S.getListWithColor(_, r, l), T = g || va(n.getCellRaw(a, i)), E = ao(T), A = () => {
643
- p.executeCommand(Ue.id, {
612
+ const P = _.type === K.LIST_MULTIPLE, U = S.getListWithColor(_, r, l), T = v || ma(n.getCellRaw(a, i)), E = no(T), A = () => {
613
+ h.executeCommand(We.id, {
644
614
  ruleId: _.uid
645
615
  }), o();
646
- }, x = F.map((k) => ({
647
- label: k.label,
648
- value: k.label,
649
- color: y || k.color ? k.color : "transparent"
616
+ }, F = U.map((H) => ({
617
+ label: H.label,
618
+ value: H.label,
619
+ color: M || H.color ? H.color : "transparent"
650
620
  }));
651
- return /* @__PURE__ */ h.jsx(
652
- Oi,
621
+ return /* @__PURE__ */ f(
622
+ Mi,
653
623
  {
654
624
  style: { minWidth: V, maxWidth: Math.max(V, 200) },
655
625
  title: P ? d.t("dataValidation.listMultiple.dropdown") : d.t("dataValidation.list.dropdown"),
656
626
  value: E,
657
627
  multiple: P,
658
- onChange: async (k) => {
659
- const K = io(k), q = {
628
+ onChange: async (H) => {
629
+ const G = oo(H), J = {
660
630
  unitId: r,
661
631
  subUnitId: l,
662
632
  range: {
@@ -666,7 +636,7 @@ function Li(e) {
666
636
  endRow: a
667
637
  },
668
638
  value: {
669
- v: K,
639
+ v: G,
670
640
  p: null,
671
641
  f: null,
672
642
  si: null
@@ -674,60 +644,60 @@ function Li(e) {
674
644
  };
675
645
  C.isVisible() && C.changeVisible({
676
646
  visible: !1,
677
- keycode: sn.ESC,
678
- eventType: nn.Keyboard,
647
+ keycode: rn.ESC,
648
+ eventType: tn.Keyboard,
679
649
  unitId: r
680
- }), f(K), P || o(), C.isVisible().visible && await p.executeCommand(ho.id, {
650
+ }), p(G), P || o(), C.isVisible().visible && await h.executeCommand(co.id, {
681
651
  visible: !1,
682
- eventType: nn.Keyboard,
652
+ eventType: tn.Keyboard,
683
653
  unitId: r,
684
- keycode: sn.ESC
685
- }), p.executeCommand(vn.id, q);
654
+ keycode: rn.ESC
655
+ }), h.executeCommand(gn.id, J);
686
656
  },
687
- options: x,
657
+ options: F,
688
658
  onEdit: A,
689
659
  filter: c,
690
660
  location: t
691
661
  }
692
662
  );
693
663
  }
694
- const Pi = "univer-data-validation-options-button", Ti = "univer-data-validation-options-button-icon", Ut = {
695
- dataValidationOptionsButton: Pi,
696
- dataValidationOptionsButtonIcon: Ti
664
+ const bi = "univer-data-validation-options-button", Ei = "univer-data-validation-options-button-icon", $t = {
665
+ dataValidationOptionsButton: bi,
666
+ dataValidationOptionsButtonIcon: Ei
697
667
  };
698
- function Ai(e) {
668
+ function Oi(e) {
699
669
  var c;
700
- const t = L(J), o = L(Lt), { value: n, onChange: a, extraComponent: i } = e, [r, l] = W(!1), s = i ? o.get(i) : null;
701
- return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
702
- /* @__PURE__ */ h.jsxs("div", { className: Ut.dataValidationOptionsButton, onClick: () => l(!r), children: [
670
+ const t = L(Q), o = L(Pt), { value: n, onChange: a, extraComponent: i } = e, [r, l] = j(!1), s = i ? o.get(i) : null;
671
+ return /* @__PURE__ */ x(we, { children: [
672
+ /* @__PURE__ */ x("div", { className: $t.dataValidationOptionsButton, onClick: () => l(!r), children: [
703
673
  t.t("dataValidation.panel.options"),
704
- r ? /* @__PURE__ */ h.jsx(Vo, { className: Ut.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ h.jsx(Do, { className: Ut.dataValidationOptionsButtonIcon })
674
+ r ? /* @__PURE__ */ f(Ro, { className: $t.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ f(wo, { className: $t.dataValidationOptionsButtonIcon })
705
675
  ] }),
706
- r && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
707
- s ? /* @__PURE__ */ h.jsx(s, { value: n, onChange: a }) : null,
708
- /* @__PURE__ */ h.jsx(
709
- Z,
676
+ r && /* @__PURE__ */ x(we, { children: [
677
+ s ? /* @__PURE__ */ f(s, { value: n, onChange: a }) : null,
678
+ /* @__PURE__ */ f(
679
+ q,
710
680
  {
711
681
  label: t.t("dataValidation.panel.invalid"),
712
- children: /* @__PURE__ */ h.jsxs(
713
- mn,
682
+ children: /* @__PURE__ */ x(
683
+ fn,
714
684
  {
715
- value: `${(c = n.errorStyle) != null ? c : it.WARNING}`,
685
+ value: `${(c = n.errorStyle) != null ? c : rt.WARNING}`,
716
686
  onChange: (u) => a({ ...n, errorStyle: +u }),
717
687
  children: [
718
- /* @__PURE__ */ h.jsx(Ae, { value: `${it.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
719
- /* @__PURE__ */ h.jsx(Ae, { value: `${it.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
688
+ /* @__PURE__ */ f(Ne, { value: `${rt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
689
+ /* @__PURE__ */ f(Ne, { value: `${rt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
720
690
  ]
721
691
  }
722
692
  )
723
693
  }
724
694
  ),
725
- /* @__PURE__ */ h.jsx(
726
- Z,
695
+ /* @__PURE__ */ f(
696
+ q,
727
697
  {
728
698
  label: t.t("dataValidation.panel.messageInfo"),
729
- children: /* @__PURE__ */ h.jsx(
730
- Ot,
699
+ children: /* @__PURE__ */ f(
700
+ Lt,
731
701
  {
732
702
  checked: n.showErrorMessage,
733
703
  onChange: () => a({
@@ -739,76 +709,76 @@ function Ai(e) {
739
709
  )
740
710
  }
741
711
  ),
742
- n.showErrorMessage ? /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(xe, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
712
+ n.showErrorMessage ? /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(Ue, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
743
713
  ] })
744
714
  ] });
745
715
  }
746
- const xi = "univer-data-validation-detail", ji = "univer-data-validation-detail-form-item", Fi = "univer-data-validation-detail-buttons", Ni = "univer-data-validation-detail-button", Be = {
747
- dataValidationDetail: xi,
748
- dataValidationDetailFormItem: ji,
749
- dataValidationDetailButtons: Fi,
750
- dataValidationDetailButton: Ni
751
- }, Ui = (e) => Jo(
716
+ const Li = "univer-data-validation-detail", Pi = "univer-data-validation-detail-form-item", Ti = "univer-data-validation-detail-buttons", Ai = "univer-data-validation-detail-button", He = {
717
+ dataValidationDetail: Li,
718
+ dataValidationDetailFormItem: Pi,
719
+ dataValidationDetailButtons: Ti,
720
+ dataValidationDetailButton: Ai
721
+ }, Fi = (e) => Zo(
752
722
  async (t, o, n, a) => {
753
723
  const i = await e.executeCommand(t, o, n);
754
724
  a == null || a(i);
755
725
  },
756
726
  1e3
757
727
  );
758
- function Bi(e, t, o) {
728
+ function Ni(e, t, o) {
759
729
  var n, a, i, r;
760
- return t ? ((a = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(o)) == null ? void 0 : a.getSheetId()) || "" : ((r = (i = e.getCurrentUnitForType(Y.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(o)) == null ? void 0 : r.getSheetId()) || "";
730
+ return t ? ((a = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(o)) == null ? void 0 : a.getSheetId()) || "" : ((r = (i = e.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(o)) == null ? void 0 : r.getSheetId()) || "";
761
731
  }
762
- function $i() {
763
- var se;
764
- const [e, t] = W(0), o = L(fe), n = Ne(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(ye), c = L(ge), u = L(Lt), p = L(Q), d = L(Pt), g = L(J), [f, C] = W(r), R = s.getValidatorItem(f.type), [v, w] = W(!1), I = s.getValidatorsByScope($a.SHEET), [V, _] = W(() => f.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = He(() => Ui(p), [p]), [m, y] = W(!1), P = We({}), [F, T] = W(!1), E = L(Qn);
765
- if (Ce(() => () => {
732
+ function Ui() {
733
+ var le;
734
+ const [e, t] = j(0), o = L(me), n = ke(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(be), c = L(ve), u = L(Pt), h = L(ee), d = L(Tt), v = L(Q), [p, C] = j(r), R = s.getValidatorItem(p.type), [g, w] = j(!1), I = s.getValidatorsByScope($a.SHEET), [V, _] = j(() => p.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = Ke(() => Fi(h), [h]), [m, M] = j(!1), P = ze({}), [U, T] = j(!1), E = L(qn);
735
+ if (Ie(() => () => {
766
736
  const O = E.getCurrentLastSelection();
767
737
  O && E.setSelections([O]);
768
- }, [E]), Ce(() => {
769
- p.onCommandExecuted((O) => {
770
- (O.id === Go.id || O.id === Zo.id) && setTimeout(() => {
738
+ }, [E]), Ie(() => {
739
+ h.onCommandExecuted((O) => {
740
+ (O.id === zo.id || O.id === Ko.id) && setTimeout(() => {
771
741
  const D = d.getRuleById(a, i, l);
772
- t((U) => U + 1), D && (C(D), _(D.ranges.map((U) => ({ unitId: "", sheetId: "", range: U }))));
742
+ t(($) => $ + 1), D && (C(D), _(D.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
773
743
  }, 20);
774
744
  });
775
- }, [p, d, l, i, a]), !R)
745
+ }, [h, d, l, i, a]), !R)
776
746
  return null;
777
- const A = R.operators, x = R.operatorNames, j = f.operator ? ka.includes(f.operator) : !1, N = () => {
778
- !f.ranges.length || m || (R.validatorFormula(f, a, i).success ? o.setActiveRule(null) : w(!0));
779
- }, H = ln((O) => {
780
- const D = O.split(",").filter(Boolean).map(Xa).map(($) => {
781
- const _e = $.sheetName;
782
- if (_e) {
783
- const $o = Bi(c, $.unitId, _e);
784
- return { ...$, sheetId: $o };
747
+ const A = R.operators, F = R.operatorNames, N = p.operator ? ka.includes(p.operator) : !1, B = () => {
748
+ !p.ranges.length || m || (R.validatorFormula(p, a, i).success ? o.setActiveRule(null) : w(!0));
749
+ }, Y = sn((O) => {
750
+ const D = O.split(",").filter(Boolean).map(xa).map((W) => {
751
+ const Se = W.sheetName;
752
+ if (Se) {
753
+ const $o = Ni(c, W.unitId, Se);
754
+ return { ...W, sheetId: $o };
785
755
  }
786
756
  return {
787
- ...$,
757
+ ...W,
788
758
  sheetId: ""
789
759
  };
790
760
  });
791
- if (qo(D, V))
761
+ if (Go(D, V))
792
762
  return;
793
763
  _(D);
794
- const U = D.filter(($) => (!$.unitId || $.unitId === a) && (!$.sheetId || $.sheetId === i)).map(($) => $.range);
764
+ const $ = D.filter((W) => (!W.unitId || W.unitId === a) && (!W.sheetId || W.sheetId === i)).map((W) => W.range);
795
765
  if (C({
796
- ...f,
797
- ranges: U
798
- }), U.length === 0)
766
+ ...p,
767
+ ranges: $
768
+ }), $.length === 0)
799
769
  return;
800
- const B = {
770
+ const k = {
801
771
  unitId: a,
802
772
  subUnitId: i,
803
773
  ruleId: l,
804
- ranges: U
774
+ ranges: $
805
775
  };
806
- S(ro.id, B);
807
- }), X = (O) => {
808
- if (bn(O, xn(f)))
776
+ S(ao.id, k);
777
+ }), z = (O) => {
778
+ if (yn(O, Fn(p)))
809
779
  return;
810
780
  C({
811
- ...f,
781
+ ...p,
812
782
  ...O
813
783
  });
814
784
  const D = {
@@ -818,48 +788,48 @@ function $i() {
818
788
  setting: O
819
789
  };
820
790
  S(
821
- On.id,
791
+ En.id,
822
792
  D,
823
793
  void 0
824
794
  );
825
- }, k = async () => {
826
- await p.executeCommand(so.id, {
795
+ }, H = async () => {
796
+ await h.executeCommand(io.id, {
827
797
  ruleId: l,
828
798
  unitId: a,
829
799
  subUnitId: i
830
800
  }), o.setActiveRule(null);
831
- }, K = {
832
- type: f.type,
833
- operator: f.operator,
834
- formula1: f.formula1,
835
- formula2: f.formula2,
836
- allowBlank: f.allowBlank
837
- }, q = (O) => {
801
+ }, G = {
802
+ type: p.type,
803
+ operator: p.operator,
804
+ formula1: p.formula1,
805
+ formula2: p.formula2,
806
+ allowBlank: p.allowBlank
807
+ }, J = (O) => {
838
808
  const D = s.getValidatorItem(O);
839
809
  if (!D)
840
810
  return;
841
- const U = D.operators, B = d.getRuleById(a, i, l), $ = O === (B == null ? void 0 : B.type) || O.includes("list") && (B != null && B.type.includes("list")) ? {
842
- ...B,
811
+ const $ = D.operators, k = d.getRuleById(a, i, l), W = O === (k == null ? void 0 : k.type) || O.includes("list") && (k != null && k.type.includes("list")) ? {
812
+ ...k,
843
813
  type: O
844
814
  } : {
845
- ...f,
815
+ ...p,
846
816
  type: O,
847
- operator: U[0],
817
+ operator: $[0],
848
818
  formula1: void 0,
849
819
  formula2: void 0
850
820
  };
851
- C($), p.executeCommand(On.id, {
821
+ C(W), h.executeCommand(En.id, {
852
822
  unitId: a,
853
823
  subUnitId: i,
854
- ruleId: f.uid,
855
- setting: xn($)
824
+ ruleId: p.uid,
825
+ setting: Fn(W)
856
826
  });
857
- }, ee = u.get(R.formulaInput), te = He(() => V.map((O) => _o(O.range)).join(","), []), re = An(f), ae = (O) => {
858
- bn(O, An(f)) || (C({
859
- ...f,
827
+ }, te = u.get(R.formulaInput), ne = Ke(() => V.map((O) => go(O.range)).join(","), []), se = An(p), ie = (O) => {
828
+ yn(O, An(p)) || (C({
829
+ ...p,
860
830
  ...O
861
831
  }), S(
862
- _a.id,
832
+ ga.id,
863
833
  {
864
834
  unitId: a,
865
835
  subUnitId: i,
@@ -868,129 +838,129 @@ function $i() {
868
838
  }
869
839
  ));
870
840
  };
871
- return Sn((O) => {
872
- var U;
873
- const D = (U = P.current) == null ? void 0 : U.handleOutClick;
841
+ return _n((O) => {
842
+ var $;
843
+ const D = ($ = P.current) == null ? void 0 : $.handleOutClick;
874
844
  D && D(O, () => T(!1));
875
- }), /* @__PURE__ */ h.jsxs("div", { className: Be.dataValidationDetail, children: [
876
- /* @__PURE__ */ h.jsx(
877
- Z,
845
+ }), /* @__PURE__ */ x("div", { className: He.dataValidationDetail, children: [
846
+ /* @__PURE__ */ f(
847
+ q,
878
848
  {
879
- label: g.t("dataValidation.panel.range"),
880
- error: !f.ranges.length || m ? g.t("dataValidation.panel.rangeError") : "",
881
- children: /* @__PURE__ */ h.jsx(
882
- za,
849
+ label: v.t("dataValidation.panel.range"),
850
+ error: !p.ranges.length || m ? v.t("dataValidation.panel.rangeError") : "",
851
+ children: /* @__PURE__ */ f(
852
+ Ya,
883
853
  {
884
854
  unitId: a,
885
855
  subUnitId: i,
886
- initValue: te,
887
- onChange: H,
856
+ initValue: ne,
857
+ onChange: Y,
888
858
  onFocus: () => T(!0),
889
- isFocus: F,
859
+ isFocus: U,
890
860
  actions: P.current,
891
- onVerify: (O) => y(!O)
861
+ onVerify: (O) => M(!O)
892
862
  }
893
863
  )
894
864
  }
895
865
  ),
896
- /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.type"), children: /* @__PURE__ */ h.jsx(
897
- tn,
866
+ /* @__PURE__ */ f(q, { label: v.t("dataValidation.panel.type"), children: /* @__PURE__ */ f(
867
+ en,
898
868
  {
899
869
  options: I == null ? void 0 : I.map((O) => ({
900
- label: g.t(O.title),
870
+ label: v.t(O.title),
901
871
  value: O.id
902
872
  })),
903
- value: f.type,
904
- onChange: q,
905
- className: Be.dataValidationDetailFormItem
873
+ value: p.type,
874
+ onChange: J,
875
+ className: He.dataValidationDetailFormItem
906
876
  }
907
877
  ) }),
908
- A != null && A.length ? /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.operator"), children: /* @__PURE__ */ h.jsx(
909
- tn,
878
+ A != null && A.length ? /* @__PURE__ */ f(q, { label: v.t("dataValidation.panel.operator"), children: /* @__PURE__ */ f(
879
+ en,
910
880
  {
911
881
  options: A.map((O, D) => ({
912
882
  value: `${O}`,
913
- label: x[D]
883
+ label: F[D]
914
884
  })),
915
- value: `${f.operator}`,
885
+ value: `${p.operator}`,
916
886
  onChange: (O) => {
917
- X({
918
- ...K,
887
+ z({
888
+ ...G,
919
889
  operator: O
920
890
  });
921
891
  },
922
- className: Be.dataValidationDetailFormItem
892
+ className: He.dataValidationDetailFormItem
923
893
  }
924
894
  ) }) : null,
925
- ee ? /* @__PURE__ */ h.jsx(
926
- ee,
895
+ te ? /* @__PURE__ */ f(
896
+ te,
927
897
  {
928
- isTwoFormula: j,
898
+ isTwoFormula: N,
929
899
  value: {
930
- formula1: f.formula1,
931
- formula2: f.formula2
900
+ formula1: p.formula1,
901
+ formula2: p.formula2
932
902
  },
933
903
  onChange: (O) => {
934
- X({
935
- ...K,
904
+ z({
905
+ ...G,
936
906
  ...O
937
907
  });
938
908
  },
939
- showError: v,
940
- validResult: R.validatorFormula(f, a, i),
909
+ showError: g,
910
+ validResult: R.validatorFormula(p, a, i),
941
911
  unitId: a,
942
912
  subUnitId: i,
943
913
  ruleId: l
944
914
  },
945
- e + f.type
915
+ e + p.type
946
916
  ) : null,
947
- /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(
948
- Ot,
917
+ /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
918
+ Lt,
949
919
  {
950
- checked: (se = f.allowBlank) != null ? se : !0,
920
+ checked: (le = p.allowBlank) != null ? le : !0,
951
921
  onChange: () => {
952
922
  var O;
953
- return X({
954
- ...K,
955
- allowBlank: !((O = f.allowBlank) == null || O)
923
+ return z({
924
+ ...G,
925
+ allowBlank: !((O = p.allowBlank) == null || O)
956
926
  });
957
927
  },
958
- children: g.t("dataValidation.panel.allowBlank")
928
+ children: v.t("dataValidation.panel.allowBlank")
959
929
  }
960
930
  ) }),
961
- /* @__PURE__ */ h.jsx(Ai, { value: re, onChange: ae, extraComponent: R.optionsInput }),
962
- /* @__PURE__ */ h.jsxs("div", { className: Be.dataValidationDetailButtons, children: [
963
- /* @__PURE__ */ h.jsx(je, { className: Be.dataValidationDetailButton, onClick: k, children: g.t("dataValidation.panel.removeRule") }),
964
- /* @__PURE__ */ h.jsx(je, { className: Be.dataValidationDetailButton, type: "primary", onClick: N, children: g.t("dataValidation.panel.done") })
931
+ /* @__PURE__ */ f(Oi, { value: se, onChange: ie, extraComponent: R.optionsInput }),
932
+ /* @__PURE__ */ x("div", { className: He.dataValidationDetailButtons, children: [
933
+ /* @__PURE__ */ f(Be, { className: He.dataValidationDetailButton, onClick: H, children: v.t("dataValidation.panel.removeRule") }),
934
+ /* @__PURE__ */ f(Be, { className: He.dataValidationDetailButton, type: "primary", onClick: B, children: v.t("dataValidation.panel.done") })
965
935
  ] })
966
936
  ] });
967
937
  }
968
- const ki = "univer-data-validation-item-container", Wi = "univer-data-validation-item-title", Hi = "univer-data-validation-item-content", Yi = "univer-data-validation-item-icon", ct = {
969
- dataValidationItemContainer: ki,
970
- dataValidationItemTitle: Wi,
971
- dataValidationItemContent: Hi,
972
- dataValidationItemIcon: Yi
973
- }, Xi = (e) => {
974
- const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = We(), [p, d] = W(!1), g = (f) => {
975
- l.executeCommand(so.id, {
938
+ const Bi = "univer-data-validation-item-container", $i = "univer-data-validation-item-title", ki = "univer-data-validation-item-content", Wi = "univer-data-validation-item-icon", ut = {
939
+ dataValidationItemContainer: Bi,
940
+ dataValidationItemTitle: $i,
941
+ dataValidationItemContent: ki,
942
+ dataValidationItemIcon: Wi
943
+ }, Hi = (e) => {
944
+ const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(be), l = L(ee), s = L(Va), c = r.getValidatorItem(t.type), u = ze(void 0), [h, d] = j(!1), v = (p) => {
945
+ l.executeCommand(io.id, {
976
946
  ruleId: t.uid,
977
947
  unitId: n,
978
948
  subUnitId: a
979
- }), f.stopPropagation();
949
+ }), p.stopPropagation();
980
950
  };
981
- return Ce(() => () => {
982
- var f;
983
- u.current && ((f = u.current) == null || f.forEach((C) => {
951
+ return Ie(() => () => {
952
+ var p;
953
+ u.current && ((p = u.current) == null || p.forEach((C) => {
984
954
  C && s.removeShape(C);
985
955
  }));
986
- }, [s]), /* @__PURE__ */ h.jsxs(
956
+ }, [s]), /* @__PURE__ */ x(
987
957
  "div",
988
958
  {
989
- className: ct.dataValidationItemContainer,
959
+ className: ut.dataValidationItemContainer,
990
960
  onClick: o,
991
961
  onMouseEnter: () => {
992
- i || (d(!0), u.current = t.ranges.map((f) => s.addShape({
993
- range: f,
962
+ i || (d(!0), u.current = t.ranges.map((p) => s.addShape({
963
+ range: p,
994
964
  style: {
995
965
  // hasAutoFill: false,
996
966
  fill: "rgba(73, 184, 17, 0.05)",
@@ -1002,74 +972,74 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
1002
972
  })));
1003
973
  },
1004
974
  onMouseLeave: () => {
1005
- var f;
1006
- d(!1), (f = u.current) == null || f.forEach((C) => {
975
+ var p;
976
+ d(!1), (p = u.current) == null || p.forEach((C) => {
1007
977
  C && s.removeShape(C);
1008
978
  }), u.current = void 0;
1009
979
  },
1010
980
  children: [
1011
- /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(t) }),
1012
- /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemContent, children: t.ranges.map((f) => _o(f)).join(",") }),
1013
- p ? /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemIcon, onClick: g, children: /* @__PURE__ */ h.jsx(Rn, {}) }) : null
981
+ /* @__PURE__ */ f("div", { className: ut.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(t) }),
982
+ /* @__PURE__ */ f("div", { className: ut.dataValidationItemContent, children: t.ranges.map((p) => go(p)).join(",") }),
983
+ h ? /* @__PURE__ */ f("div", { className: ut.dataValidationItemIcon, onClick: v, children: /* @__PURE__ */ f(wn, {}) }) : null
1014
984
  ]
1015
985
  }
1016
986
  );
1017
- }, zi = "univer-data-validation-list", Ki = "univer-data-validation-list-buttons", Gi = "univer-data-validation-list-button", ut = {
1018
- dataValidationList: zi,
1019
- dataValidationListButtons: Ki,
1020
- dataValidationListButton: Gi
987
+ }, ji = "univer-data-validation-list", xi = "univer-data-validation-list-buttons", Yi = "univer-data-validation-list-button", ht = {
988
+ dataValidationList: ji,
989
+ dataValidationListButtons: xi,
990
+ dataValidationListButton: Yi
1021
991
  };
1022
- function Zi() {
1023
- const e = L(ge), t = Ne(
1024
- () => e.getCurrentTypeOfUnit$(Y.UNIVER_SHEET),
992
+ function Xi() {
993
+ const e = L(ve), t = ke(
994
+ () => e.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
1025
995
  void 0,
1026
996
  void 0,
1027
997
  []
1028
998
  );
1029
- return t ? /* @__PURE__ */ h.jsx(qi, { workbook: t }) : null;
999
+ return t ? /* @__PURE__ */ f(zi, { workbook: t }) : null;
1030
1000
  }
1031
- function qi(e) {
1032
- const t = L(oe), o = L(ge), n = L(Q), a = L(Fe), i = L(fe), r = L(J), [l, s] = W([]), { workbook: c } = e, u = Ne(c.activeSheet$, void 0, !0), p = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1033
- Ce(() => {
1034
- s(t.getRules(p, d));
1001
+ function zi(e) {
1002
+ const t = L(ae), o = L(ve), n = L(ee), a = L($e), i = L(me), r = L(Q), [l, s] = j([]), { workbook: c } = e, u = ke(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1003
+ Ie(() => {
1004
+ s(t.getRules(h, d));
1035
1005
  const w = t.ruleChange$.subscribe((I) => {
1036
- I.unitId === p && I.subUnitId === d && s(t.getRules(p, d));
1006
+ I.unitId === h && I.subUnitId === d && s(t.getRules(h, d));
1037
1007
  });
1038
1008
  return () => {
1039
1009
  w.unsubscribe();
1040
1010
  };
1041
- }, [p, d, t]);
1042
- const g = async () => {
1043
- const w = lo(a), I = {
1044
- unitId: p,
1011
+ }, [h, d, t]);
1012
+ const v = async () => {
1013
+ const w = ro(a), I = {
1014
+ unitId: h,
1045
1015
  subUnitId: d,
1046
1016
  rule: w
1047
1017
  };
1048
- await n.executeCommand(_n.id, I), i.setActiveRule({
1049
- unitId: p,
1018
+ await n.executeCommand(vn.id, I), i.setActiveRule({
1019
+ unitId: h,
1050
1020
  subUnitId: d,
1051
1021
  rule: w
1052
1022
  });
1053
- }, f = () => {
1054
- n.executeCommand(Sa.id, {
1055
- unitId: p,
1023
+ }, p = () => {
1024
+ n.executeCommand(va.id, {
1025
+ unitId: h,
1056
1026
  subUnitId: d
1057
1027
  });
1058
1028
  }, R = ((w) => {
1059
- const I = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = I.getActiveSheet(), _ = I.getUnitId(), S = V.getSheetId();
1060
- return w.map((y) => ga(a, _, S, y.ranges) ? { ...y } : { ...y, disable: !0 });
1061
- })(l), v = R == null ? void 0 : R.some((w) => w.disable);
1062
- return /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationList, children: [
1029
+ const I = o.getCurrentUnitForType(X.UNIVER_SHEET), V = I.getActiveSheet(), _ = I.getUnitId(), S = V.getSheetId();
1030
+ return w.map((M) => fa(a, _, S, M.ranges) ? { ...M } : { ...M, disable: !0 });
1031
+ })(l), g = R == null ? void 0 : R.some((w) => w.disable);
1032
+ return /* @__PURE__ */ x("div", { className: ht.dataValidationList, children: [
1063
1033
  R == null ? void 0 : R.map((w) => {
1064
1034
  var I;
1065
- return /* @__PURE__ */ h.jsx(
1066
- Xi,
1035
+ return /* @__PURE__ */ f(
1036
+ Hi,
1067
1037
  {
1068
- unitId: p,
1038
+ unitId: h,
1069
1039
  subUnitId: d,
1070
1040
  onClick: () => {
1071
1041
  w.disable || i.setActiveRule({
1072
- unitId: p,
1042
+ unitId: h,
1073
1043
  subUnitId: d,
1074
1044
  rule: w
1075
1045
  });
@@ -1080,39 +1050,39 @@ function qi(e) {
1080
1050
  w.uid
1081
1051
  );
1082
1052
  }),
1083
- /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationListButtons, children: [
1084
- l.length && !v ? /* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, onClick: f, children: r.t("dataValidation.panel.removeAll") }) : null,
1085
- /* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, type: "primary", onClick: g, children: r.t("dataValidation.panel.add") })
1053
+ /* @__PURE__ */ x("div", { className: ht.dataValidationListButtons, children: [
1054
+ l.length && !g ? /* @__PURE__ */ f(Be, { className: ht.dataValidationListButton, onClick: p, children: r.t("dataValidation.panel.removeAll") }) : null,
1055
+ /* @__PURE__ */ f(Be, { className: ht.dataValidationListButton, type: "primary", onClick: v, children: r.t("dataValidation.panel.add") })
1086
1056
  ] })
1087
1057
  ] });
1088
1058
  }
1089
- const Ji = () => {
1090
- const e = L(fe), t = Ne(e.activeRule$, e.activeRule);
1091
- return t ? /* @__PURE__ */ h.jsx($i, {}, t.rule.uid) : /* @__PURE__ */ h.jsx(Zi, {});
1092
- }, yn = "data-validation.list.dropdown", Oo = "data-validation.date.dropdown", At = {
1093
- type: Je.COMMAND,
1059
+ const Ki = () => {
1060
+ const e = L(me), t = ke(e.activeRule$, e.activeRule);
1061
+ return t ? /* @__PURE__ */ f(Ui, {}, t.rule.uid) : /* @__PURE__ */ f(Xi, {});
1062
+ }, Vn = "data-validation.list.dropdown", bo = "data-validation.date.dropdown", Ft = {
1063
+ type: et.COMMAND,
1094
1064
  id: "data-validation.command.addRuleAndOpen",
1095
1065
  handler(e) {
1096
- const t = e.get(ge), o = eo(t);
1066
+ const t = e.get(ve), o = Jn(t);
1097
1067
  if (!o) return !1;
1098
- const { workbook: n, worksheet: a } = o, i = lo(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
1068
+ const { workbook: n, worksheet: a } = o, i = ro(e), r = e.get(ee), l = n.getUnitId(), s = a.getSheetId(), c = {
1099
1069
  rule: i,
1100
1070
  unitId: l,
1101
1071
  subUnitId: s
1102
1072
  };
1103
- return r.syncExecuteCommand(_n.id, c) ? (r.syncExecuteCommand(Ue.id, {
1073
+ return r.syncExecuteCommand(vn.id, c) ? (r.syncExecuteCommand(We.id, {
1104
1074
  ruleId: i.uid,
1105
1075
  isAdd: !0
1106
1076
  }), !0) : !1;
1107
1077
  }
1108
1078
  };
1109
- var Qi = Object.defineProperty, er = Object.getOwnPropertyDescriptor, tr = (e, t, o, n) => {
1110
- for (var a = n > 1 ? void 0 : n ? er(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1079
+ var Gi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, qi = (e, t, o, n) => {
1080
+ for (var a = n > 1 ? void 0 : n ? Zi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1111
1081
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1112
- return n && a && Qi(t, o, a), a;
1113
- }, $e = (e, t) => (o, n) => t(o, n, e);
1114
- const Ee = "SHEET_DATA_VALIDATION_ALERT";
1115
- let lt = class extends De {
1082
+ return n && a && Gi(t, o, a), a;
1083
+ }, je = (e, t) => (o, n) => t(o, n, e);
1084
+ const Le = "SHEET_DATA_VALIDATION_ALERT";
1085
+ let dt = class extends De {
1116
1086
  constructor(e, t, o, n, a, i) {
1117
1087
  super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = o, this._localeService = n, this._zenZoneService = a, this._dataValidationModel = i, this._init();
1118
1088
  }
@@ -1120,86 +1090,86 @@ let lt = class extends De {
1120
1090
  this._initCellAlertPopup(), this._initZenService();
1121
1091
  }
1122
1092
  _initCellAlertPopup() {
1123
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(wn(100)).subscribe((e) => {
1093
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(In(100)).subscribe((e) => {
1124
1094
  var t;
1125
1095
  if (e) {
1126
- const o = this._univerInstanceService.getUnit(e.location.unitId, Y.UNIVER_SHEET), n = o.getSheetBySheetId(e.location.subUnitId);
1096
+ const o = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), n = o.getSheetBySheetId(e.location.subUnitId);
1127
1097
  if (!n) return;
1128
1098
  const a = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
1129
1099
  if (!a) {
1130
- this._cellAlertManagerService.removeAlert(Ee);
1100
+ this._cellAlertManagerService.removeAlert(Le);
1131
1101
  return;
1132
1102
  }
1133
- if (this._dataValidationModel.validator(a, { ...e.location, workbook: o, worksheet: n }) === rt.INVALID) {
1134
- const r = this._cellAlertManagerService.currentAlert.get(Ee), l = (t = r == null ? void 0 : r.alert) == null ? void 0 : t.location;
1103
+ if (this._dataValidationModel.validator(a, { ...e.location, workbook: o, worksheet: n }) === st.INVALID) {
1104
+ const r = this._cellAlertManagerService.currentAlert.get(Le), l = (t = r == null ? void 0 : r.alert) == null ? void 0 : t.location;
1135
1105
  if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
1136
- this._cellAlertManagerService.removeAlert(Ee);
1106
+ this._cellAlertManagerService.removeAlert(Le);
1137
1107
  return;
1138
1108
  }
1139
1109
  const s = this._dataValidationModel.getValidator(a.type);
1140
1110
  if (!s) {
1141
- this._cellAlertManagerService.removeAlert(Ee);
1111
+ this._cellAlertManagerService.removeAlert(Le);
1142
1112
  return;
1143
1113
  }
1144
1114
  this._cellAlertManagerService.showAlert({
1145
- type: Oa.ERROR,
1115
+ type: ba.ERROR,
1146
1116
  title: this._localeService.t("dataValidation.error.title"),
1147
1117
  message: s == null ? void 0 : s.getRuleFinalError(a, e.location),
1148
1118
  location: e.location,
1149
1119
  width: 200,
1150
1120
  height: 74,
1151
- key: Ee
1121
+ key: Le
1152
1122
  });
1153
1123
  return;
1154
1124
  }
1155
1125
  }
1156
- this._cellAlertManagerService.removeAlert(Ee);
1126
+ this._cellAlertManagerService.removeAlert(Le);
1157
1127
  }));
1158
1128
  }
1159
1129
  _initZenService() {
1160
1130
  this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
1161
- e && this._cellAlertManagerService.removeAlert(Ee);
1131
+ e && this._cellAlertManagerService.removeAlert(Le);
1162
1132
  }));
1163
1133
  }
1164
1134
  };
1165
- lt = tr([
1166
- $e(0, b(ba)),
1167
- $e(1, b(Ea)),
1168
- $e(2, ge),
1169
- $e(3, b(J)),
1170
- $e(4, go),
1171
- $e(5, b(oe))
1172
- ], lt);
1173
- var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ar = (e, t, o, n) => {
1174
- for (var a = n > 1 ? void 0 : n ? or(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1135
+ dt = qi([
1136
+ je(0, b(Ma)),
1137
+ je(1, b(ya)),
1138
+ je(2, ve),
1139
+ je(3, b(Q)),
1140
+ je(4, fo),
1141
+ je(5, b(ae))
1142
+ ], dt);
1143
+ var Ji = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, er = (e, t, o, n) => {
1144
+ for (var a = n > 1 ? void 0 : n ? Qi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1175
1145
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1176
- return n && a && nr(t, o, a), a;
1177
- }, Bt = (e, t) => (o, n) => t(o, n, e);
1178
- let ze = class extends De {
1146
+ return n && a && Ji(t, o, a), a;
1147
+ }, kt = (e, t) => (o, n) => t(o, n, e);
1148
+ let Ge = class extends De {
1179
1149
  constructor(e, t, o) {
1180
1150
  super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = o, this._initAutoFill();
1181
1151
  }
1182
1152
  // eslint-disable-next-line max-lines-per-function
1183
1153
  _initAutoFill() {
1184
1154
  const e = () => ({ redos: [], undos: [] }), t = (n, a) => {
1185
- const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, r]), [p, d] = u.ranges, { mapFunc: g } = u, f = {
1186
- row: p.startRow,
1187
- col: p.startColumn
1188
- }, C = Pa(p, d), R = new _t(), v = /* @__PURE__ */ new Set();
1155
+ const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = an([i, r]), [h, d] = u.ranges, { mapFunc: v } = u, p = {
1156
+ row: h.startRow,
1157
+ col: h.startColumn
1158
+ }, C = Oa(h, d), R = new St(), g = /* @__PURE__ */ new Set();
1189
1159
  C.forEach((S) => {
1190
- const m = S.repeatStartCell, y = S.relativeRange, P = {
1191
- startRow: f.row,
1192
- startColumn: f.col,
1193
- endColumn: f.col,
1194
- endRow: f.row
1195
- }, F = {
1160
+ const m = S.repeatStartCell, M = S.relativeRange, P = {
1161
+ startRow: p.row,
1162
+ startColumn: p.col,
1163
+ endColumn: p.col,
1164
+ endRow: p.row
1165
+ }, U = {
1196
1166
  startRow: m.row,
1197
1167
  startColumn: m.col,
1198
1168
  endColumn: m.col,
1199
1169
  endRow: m.row
1200
1170
  };
1201
- Qo.foreach(y, (T, E) => {
1202
- const A = St.getPositionRange(
1171
+ qo.foreach(M, (T, E) => {
1172
+ const A = Ct.getPositionRange(
1203
1173
  {
1204
1174
  startRow: T,
1205
1175
  startColumn: E,
@@ -1207,86 +1177,86 @@ let ze = class extends De {
1207
1177
  endRow: T
1208
1178
  },
1209
1179
  P
1210
- ), { row: x, col: j } = g(A.startRow, A.startColumn), N = this._sheetDataValidationModel.getRuleIdByLocation(l, s, x, j) || "", H = St.getPositionRange(
1180
+ ), { row: F, col: N } = v(A.startRow, A.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(l, s, F, N) || "", Y = Ct.getPositionRange(
1211
1181
  {
1212
1182
  startRow: T,
1213
1183
  startColumn: E,
1214
1184
  endColumn: E,
1215
1185
  endRow: T
1216
1186
  },
1217
- F
1218
- ), { row: X, col: k } = g(H.startRow, H.startColumn);
1219
- R.setValue(X, k, N), v.add(N);
1187
+ U
1188
+ ), { row: z, col: H } = v(Y.startRow, Y.startColumn);
1189
+ R.setValue(z, H, B), g.add(B);
1220
1190
  });
1221
1191
  });
1222
- const w = Array.from(v).map((S) => ({ id: S, ranges: Qt(R, (m) => m === S) }));
1192
+ const w = Array.from(g).map((S) => ({ id: S, ranges: Jt(R, (m) => m === S) }));
1223
1193
  c.addRangeRules(w);
1224
- const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = an(l, s, I, this._injector, "patched", a === tt.ONLY_FORMAT);
1194
+ const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = on(l, s, I, this._injector, "patched", a === ot.ONLY_FORMAT);
1225
1195
  return {
1226
1196
  undos: _,
1227
1197
  redos: V
1228
1198
  };
1229
1199
  }, o = {
1230
- id: co,
1200
+ id: so,
1231
1201
  onBeforeFillData: (n) => {
1232
1202
  const { source: a, unitId: i, subUnitId: r } = n;
1233
1203
  for (const l of a.rows)
1234
1204
  for (const s of a.cols) {
1235
1205
  const c = this._sheetDataValidationModel.getRuleByLocation(i, r, l, s);
1236
- if (c && c.type === z.CHECKBOX) {
1237
- this._autoFillService.setDisableApplyType(tt.SERIES, !0);
1206
+ if (c && c.type === K.CHECKBOX) {
1207
+ this._autoFillService.setDisableApplyType(ot.SERIES, !0);
1238
1208
  return;
1239
1209
  }
1240
1210
  }
1241
1211
  },
1242
- onFillData: (n, a, i) => i === tt.COPY || i === tt.ONLY_FORMAT || i === tt.SERIES ? t(n, i) : e(),
1212
+ onFillData: (n, a, i) => i === ot.COPY || i === ot.ONLY_FORMAT || i === ot.SERIES ? t(n, i) : e(),
1243
1213
  onAfterFillData: () => {
1244
1214
  }
1245
1215
  };
1246
1216
  this.disposeWithMe(this._autoFillService.addHook(o));
1247
1217
  }
1248
1218
  };
1249
- ze = ar([
1250
- Bt(0, La),
1251
- Bt(1, b(oe)),
1252
- Bt(2, b(Fe))
1253
- ], ze);
1254
- var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, sr = (e, t, o, n) => {
1255
- for (var a = n > 1 ? void 0 : n ? rr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1219
+ Ge = er([
1220
+ kt(0, Ea),
1221
+ kt(1, b(ae)),
1222
+ kt(2, b($e))
1223
+ ], Ge);
1224
+ var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, or = (e, t, o, n) => {
1225
+ for (var a = n > 1 ? void 0 : n ? nr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1256
1226
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1257
- return n && a && ir(t, o, a), a;
1258
- }, $t = (e, t) => (o, n) => t(o, n, e);
1259
- let Ke = class extends De {
1227
+ return n && a && tr(t, o, a), a;
1228
+ }, Wt = (e, t) => (o, n) => t(o, n, e);
1229
+ let Ze = class extends De {
1260
1230
  constructor(t, o, n) {
1261
1231
  super();
1262
- M(this, "_copyInfo");
1232
+ y(this, "_copyInfo");
1263
1233
  this._sheetClipboardService = t, this._sheetDataValidationModel = o, this._injector = n, this._initCopyPaste();
1264
1234
  }
1265
1235
  _initCopyPaste() {
1266
1236
  this._sheetClipboardService.addClipboardHook({
1267
- id: co,
1237
+ id: so,
1268
1238
  onBeforeCopy: (t, o, n) => this._collect(t, o, n),
1269
1239
  onPasteCells: (t, o, n, a) => {
1270
- const { copyType: i = Pn.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
1240
+ const { copyType: i = Ln.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
1271
1241
  return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: c, subUnitId: u });
1272
1242
  }
1273
1243
  });
1274
1244
  }
1275
1245
  _collect(t, o, n) {
1276
- const a = new _t();
1246
+ const a = new St();
1277
1247
  this._copyInfo = {
1278
1248
  unitId: t,
1279
1249
  subUnitId: o,
1280
1250
  matrix: a
1281
1251
  };
1282
- const i = this._injector.invoke((s) => Ta(n, s, t, o));
1252
+ const i = this._injector.invoke((s) => La(n, s, t, o));
1283
1253
  if (!i)
1284
1254
  return;
1285
1255
  const { rows: r, cols: l } = i;
1286
1256
  r.forEach((s, c) => {
1287
- l.forEach((u, p) => {
1257
+ l.forEach((u, h) => {
1288
1258
  const d = this._sheetDataValidationModel.getRuleIdByLocation(t, o, s, u);
1289
- a.setValue(c, p, d != null ? d : "");
1259
+ a.setValue(c, h, d != null ? d : "");
1290
1260
  });
1291
1261
  });
1292
1262
  }
@@ -1294,43 +1264,43 @@ let Ke = class extends De {
1294
1264
  _generateMutations(t, o) {
1295
1265
  if (!this._copyInfo)
1296
1266
  return { redos: [], undos: [] };
1297
- if (o.copyType === Pn.CUT)
1267
+ if (o.copyType === Ln.CUT)
1298
1268
  return this._copyInfo = null, { redos: [], undos: [] };
1299
1269
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !o.copyRange)
1300
1270
  return { redos: [], undos: [] };
1301
1271
  if ([
1302
- dt.SPECIAL_PASTE_COL_WIDTH,
1303
- dt.SPECIAL_PASTE_VALUE,
1304
- dt.SPECIAL_PASTE_FORMAT,
1305
- dt.SPECIAL_PASTE_FORMULA
1272
+ ct.SPECIAL_PASTE_COL_WIDTH,
1273
+ ct.SPECIAL_PASTE_VALUE,
1274
+ ct.SPECIAL_PASTE_FORMAT,
1275
+ ct.SPECIAL_PASTE_FORMULA
1306
1276
  ].includes(o.pasteType))
1307
1277
  return { redos: [], undos: [] };
1308
1278
  const { unitId: a, subUnitId: i } = this._copyInfo;
1309
1279
  if (o.unitId !== a || i !== o.subUnitId) {
1310
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]), d = Tn(c, u, !0), g = /* @__PURE__ */ new Map();
1311
- d.forEach(({ startRange: v }) => {
1280
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new St(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = an([o.copyRange, t]), d = Pn(c, u, !0), v = /* @__PURE__ */ new Map();
1281
+ d.forEach(({ startRange: g }) => {
1312
1282
  var w;
1313
1283
  (w = this._copyInfo) == null || w.matrix.forValue((I, V, _) => {
1314
- const S = St.getPositionRange(
1284
+ const S = Ct.getPositionRange(
1315
1285
  {
1316
1286
  startRow: I,
1317
1287
  endRow: I,
1318
1288
  startColumn: V,
1319
1289
  endColumn: V
1320
1290
  },
1321
- v
1322
- ), m = `${i}-${_}`, y = this._sheetDataValidationModel.getRuleById(a, i, _);
1323
- !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, m) && y && g.set(m, { ...y, uid: m });
1324
- const { row: P, col: F } = p(S.startRow, S.startColumn);
1325
- s.add(m), l.setValue(P, F, m);
1291
+ g
1292
+ ), m = `${i}-${_}`, M = this._sheetDataValidationModel.getRuleById(a, i, _);
1293
+ !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, m) && M && v.set(m, { ...M, uid: m });
1294
+ const { row: P, col: U } = h(S.startRow, S.startColumn);
1295
+ s.add(m), l.setValue(P, U, m);
1326
1296
  });
1327
1297
  });
1328
- const f = Array.from(s).map((v) => ({ id: v, ranges: Qt(l, (w) => w === v) }));
1329
- r.addRangeRules(f);
1330
- const { redoMutations: C, undoMutations: R } = an(
1298
+ const p = Array.from(s).map((g) => ({ id: g, ranges: Jt(l, (w) => w === g) }));
1299
+ r.addRangeRules(p);
1300
+ const { redoMutations: C, undoMutations: R } = on(
1331
1301
  o.unitId,
1332
1302
  o.subUnitId,
1333
- r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), g.values()),
1303
+ r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), v.values()),
1334
1304
  this._injector,
1335
1305
  "patched",
1336
1306
  !1
@@ -1340,11 +1310,11 @@ let Ke = class extends De {
1340
1310
  undos: R
1341
1311
  };
1342
1312
  } else {
1343
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]);
1344
- Tn(c, u, !0).forEach(({ startRange: R }) => {
1345
- var v;
1346
- (v = this._copyInfo) == null || v.matrix.forValue((w, I, V) => {
1347
- const _ = St.getPositionRange(
1313
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), l = new St(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = an([o.copyRange, t]);
1314
+ Pn(c, u, !0).forEach(({ startRange: R }) => {
1315
+ var g;
1316
+ (g = this._copyInfo) == null || g.matrix.forValue((w, I, V) => {
1317
+ const _ = Ct.getPositionRange(
1348
1318
  {
1349
1319
  startRow: w,
1350
1320
  endRow: w,
@@ -1352,13 +1322,13 @@ let Ke = class extends De {
1352
1322
  endColumn: I
1353
1323
  },
1354
1324
  R
1355
- ), { row: S, col: m } = p(_.startRow, _.startColumn);
1325
+ ), { row: S, col: m } = h(_.startRow, _.startColumn);
1356
1326
  l.setValue(S, m, V), s.add(V);
1357
1327
  });
1358
1328
  });
1359
- const g = Array.from(s).map((R) => ({ id: R, ranges: Qt(l, (v) => v === R) }));
1360
- r.addRangeRules(g);
1361
- const { redoMutations: f, undoMutations: C } = an(
1329
+ const v = Array.from(s).map((R) => ({ id: R, ranges: Jt(l, (g) => g === R) }));
1330
+ r.addRangeRules(v);
1331
+ const { redoMutations: p, undoMutations: C } = on(
1362
1332
  a,
1363
1333
  i,
1364
1334
  r.diff(this._sheetDataValidationModel.getRules(a, i)),
@@ -1367,105 +1337,105 @@ let Ke = class extends De {
1367
1337
  !1
1368
1338
  );
1369
1339
  return {
1370
- redos: f,
1340
+ redos: p,
1371
1341
  undos: C
1372
1342
  };
1373
1343
  }
1374
1344
  }
1375
1345
  };
1376
- Ke = sr([
1377
- $t(0, Aa),
1378
- $t(1, b(oe)),
1379
- $t(2, b(Fe))
1380
- ], Ke);
1381
- var lr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, cr = (e, t, o, n) => {
1382
- for (var a = n > 1 ? void 0 : n ? dr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1346
+ Ze = or([
1347
+ Wt(0, Pa),
1348
+ Wt(1, b(ae)),
1349
+ Wt(2, b($e))
1350
+ ], Ze);
1351
+ var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, rr = (e, t, o, n) => {
1352
+ for (var a = n > 1 ? void 0 : n ? ir(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1383
1353
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1384
- return n && a && lr(t, o, a), a;
1385
- }, kt = (e, t) => (o, n) => t(o, n, e);
1386
- let Ge = class extends De {
1354
+ return n && a && ar(t, o, a), a;
1355
+ }, Ht = (e, t) => (o, n) => t(o, n, e);
1356
+ let qe = class extends De {
1387
1357
  constructor(e, t, o) {
1388
1358
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = o, this._commandExecutedListener();
1389
1359
  }
1390
1360
  _commandExecutedListener() {
1391
1361
  this.disposeWithMe(
1392
1362
  this._commandService.beforeCommandExecuted((e) => {
1393
- e.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1394
- workbookTypes: [Ct],
1395
- rangeTypes: [It],
1396
- worksheetTypes: [wt, on]
1397
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === ro.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1398
- workbookTypes: [Ct],
1399
- rangeTypes: [It],
1400
- worksheetTypes: [wt, on]
1363
+ e.id === vn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1364
+ workbookTypes: [It],
1365
+ rangeTypes: [wt],
1366
+ worksheetTypes: [Rt, nn]
1367
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === ao.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1368
+ workbookTypes: [It],
1369
+ rangeTypes: [wt],
1370
+ worksheetTypes: [Rt, nn]
1401
1371
  }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1402
1372
  })
1403
1373
  );
1404
1374
  }
1405
1375
  };
1406
- Ge = cr([
1407
- kt(0, b(J)),
1408
- kt(1, Q),
1409
- kt(2, b(to))
1410
- ], Ge);
1411
- const Lo = "data-validation-single", Po = "sheet.menu.data-validation";
1412
- function ur(e) {
1376
+ qe = rr([
1377
+ Ht(0, b(Q)),
1378
+ Ht(1, ee),
1379
+ Ht(2, b(Qn))
1380
+ ], qe);
1381
+ const Eo = "data-validation-single", Oo = "sheet.menu.data-validation";
1382
+ function sr(e) {
1413
1383
  return {
1414
- id: Po,
1415
- type: Cn.SUBITEMS,
1416
- icon: Lo,
1384
+ id: Oo,
1385
+ type: Sn.SUBITEMS,
1386
+ icon: Eo,
1417
1387
  tooltip: "dataValidation.title",
1418
- hidden$: Na(e, Y.UNIVER_SHEET),
1419
- disabled$: xa(e, { workbookTypes: [Ct], worksheetTypes: [on, wt], rangeTypes: [It] })
1388
+ hidden$: Na(e, X.UNIVER_SHEET),
1389
+ disabled$: Ta(e, { workbookTypes: [It], worksheetTypes: [nn, Rt], rangeTypes: [wt] })
1420
1390
  };
1421
1391
  }
1422
- function hr(e) {
1392
+ function lr(e) {
1423
1393
  return {
1424
- id: Ue.id,
1394
+ id: We.id,
1425
1395
  title: "dataValidation.panel.title",
1426
- type: Cn.BUTTON
1396
+ type: Sn.BUTTON
1427
1397
  };
1428
1398
  }
1429
- function pr(e) {
1399
+ function dr(e) {
1430
1400
  return {
1431
- id: At.id,
1401
+ id: Ft.id,
1432
1402
  title: "dataValidation.panel.add",
1433
- type: Cn.BUTTON
1403
+ type: Sn.BUTTON
1434
1404
  };
1435
1405
  }
1436
- const fr = {
1406
+ const cr = {
1437
1407
  [Ua.FORMULAS_INSERT]: {
1438
- [Po]: {
1408
+ [Oo]: {
1439
1409
  order: 9,
1440
- menuItemFactory: ur,
1441
- [Ue.id]: {
1410
+ menuItemFactory: sr,
1411
+ [We.id]: {
1442
1412
  order: 0,
1443
- menuItemFactory: hr
1413
+ menuItemFactory: lr
1444
1414
  },
1445
- [At.id]: {
1415
+ [Ft.id]: {
1446
1416
  order: 1,
1447
- menuItemFactory: pr
1417
+ menuItemFactory: dr
1448
1418
  }
1449
1419
  }
1450
1420
  }
1451
1421
  };
1452
- var mr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, To = (e, t, o, n) => {
1453
- for (var a = n > 1 ? void 0 : n ? gr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1422
+ var ur = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, Lo = (e, t, o, n) => {
1423
+ for (var a = n > 1 ? void 0 : n ? hr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1454
1424
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1455
- return n && a && mr(t, o, a), a;
1456
- }, G = (e, t) => (o, n) => t(o, n, e);
1457
- const Ao = {
1425
+ return n && a && ur(t, o, a), a;
1426
+ }, Z = (e, t) => (o, n) => t(o, n, e);
1427
+ const Po = {
1458
1428
  tr: {
1459
1429
  size: 6,
1460
1430
  color: "#fe4b4b"
1461
1431
  }
1462
1432
  };
1463
- let Ze = class extends fn {
1433
+ let Je = class extends pn {
1464
1434
  constructor(e, t, o, n, a, i, r, l, s, c, u) {
1465
1435
  super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = a, this._dropdownManagerService = i, this._sheetDataValidationModel = r, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = c, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1466
1436
  }
1467
1437
  _initMenu() {
1468
- this._menuManagerService.mergeMenu(fr);
1438
+ this._menuManagerService.mergeMenu(cr);
1469
1439
  }
1470
1440
  _initDropdown() {
1471
1441
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -1487,7 +1457,7 @@ let Ze = class extends fn {
1487
1457
  return;
1488
1458
  const u = l.getActiveSheet();
1489
1459
  if (!u) return;
1490
- const p = this._dropdownManagerService.activeDropdown, d = p == null ? void 0 : p.location;
1460
+ const h = this._dropdownManagerService.activeDropdown, d = h == null ? void 0 : h.location;
1491
1461
  if (d && d.unitId === n && d.subUnitId === a && d.row === i && d.col === r)
1492
1462
  return;
1493
1463
  this._dropdownManagerService.showDropdown(
@@ -1514,26 +1484,26 @@ let Ze = class extends fn {
1514
1484
  _initViewModelIntercept() {
1515
1485
  this.disposeWithMe(
1516
1486
  this._sheetInterceptorService.intercept(
1517
- no.CELL_CONTENT,
1487
+ eo.CELL_CONTENT,
1518
1488
  {
1519
- effect: Kn.Style,
1489
+ effect: Xn.Style,
1520
1490
  // must be after numfmt
1521
- priority: oo.DATA_VALIDATION,
1491
+ priority: to.DATA_VALIDATION,
1522
1492
  // eslint-disable-next-line max-lines-per-function, complexity
1523
1493
  handler: (e, t, o) => {
1524
- var v, w, I, V, _;
1494
+ var g, w, I, V, _;
1525
1495
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1526
1496
  if (!c)
1527
1497
  return o(e);
1528
1498
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1529
1499
  if (!u)
1530
1500
  return o(e);
1531
- const p = (v = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? v : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = t.rawData;
1532
- let f;
1501
+ const h = (g = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? g : st.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = t.rawData;
1502
+ let p;
1533
1503
  const C = {
1534
1504
  get value() {
1535
1505
  var S;
1536
- return f !== void 0 || (f = (S = ie(g)) != null ? S : null), f;
1506
+ return p !== void 0 || (p = (S = re(v)) != null ? S : null), p;
1537
1507
  }
1538
1508
  }, R = {
1539
1509
  get value() {
@@ -1545,7 +1515,7 @@ let Ze = class extends fn {
1545
1515
  ...e,
1546
1516
  markers: {
1547
1517
  ...e == null ? void 0 : e.markers,
1548
- ...p === rt.INVALID ? Ao : null
1518
+ ...h === st.INVALID ? Po : null
1549
1519
  },
1550
1520
  customRender: [
1551
1521
  ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
@@ -1565,11 +1535,11 @@ let Ze = class extends fn {
1565
1535
  }, n, a)
1566
1536
  },
1567
1537
  interceptorAutoHeight: () => {
1568
- var P, F, T, E, A, x;
1569
- const S = (F = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : F.skeleton;
1538
+ var P, U, T, E, A, F;
1539
+ const S = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
1570
1540
  if (!S)
1571
1541
  return;
1572
- const m = S.worksheet.getMergedCell(n, a), y = {
1542
+ const m = S.worksheet.getMergedCell(n, a), M = {
1573
1543
  data: e,
1574
1544
  style: S.getsStyles().getStyleByCell(e),
1575
1545
  primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
@@ -1580,14 +1550,14 @@ let Ze = class extends fn {
1580
1550
  workbook: l,
1581
1551
  worksheet: s
1582
1552
  };
1583
- return (x = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : x.call(A, y);
1553
+ return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : F.call(A, M);
1584
1554
  },
1585
1555
  interceptorAutoWidth: () => {
1586
- var P, F, T, E, A, x;
1587
- const S = (F = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : F.skeleton;
1556
+ var P, U, T, E, A, F;
1557
+ const S = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
1588
1558
  if (!S)
1589
1559
  return;
1590
- const m = S.worksheet.getMergedCell(n, a), y = {
1560
+ const m = S.worksheet.getMergedCell(n, a), M = {
1591
1561
  data: e,
1592
1562
  style: S.getsStyles().getStyleByCell(e),
1593
1563
  primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
@@ -1598,9 +1568,9 @@ let Ze = class extends fn {
1598
1568
  workbook: l,
1599
1569
  worksheet: s
1600
1570
  };
1601
- return (x = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : x.call(A, y);
1571
+ return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : F.call(A, M);
1602
1572
  },
1603
- coverable: ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === z.LIST || u.type === z.LIST_MULTIPLE)
1573
+ coverable: ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1604
1574
  });
1605
1575
  }
1606
1576
  }
@@ -1611,70 +1581,70 @@ let Ze = class extends fn {
1611
1581
  this._sheetDataValidationModel.ruleChange$.pipe(
1612
1582
  // patched data-validation change don't need to re-calc row height
1613
1583
  // re-calc of row height will be triggered precisely by the origin command
1614
- In((e) => e.source === "command"),
1615
- vo(100)
1584
+ Cn((e) => e.source === "command"),
1585
+ mo(100)
1616
1586
  ).subscribe((e) => {
1617
1587
  if (e.length === 0)
1618
1588
  return;
1619
1589
  const t = [];
1620
1590
  if (e.forEach((o) => {
1621
1591
  var n;
1622
- (o.rule.type === z.LIST_MULTIPLE || o.rule.type === z.LIST) && (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1592
+ (o.rule.type === K.LIST_MULTIPLE || o.rule.type === K.LIST) && (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1623
1593
  }), t.length) {
1624
1594
  const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1625
- Gn(o.redos, this._commandService);
1595
+ zn(o.redos, this._commandService);
1626
1596
  }
1627
1597
  });
1628
1598
  }
1629
1599
  };
1630
- Ze = To([
1631
- G(0, Q),
1632
- G(1, Ba),
1633
- G(2, Ve),
1634
- G(3, ge),
1635
- G(4, b(fo)),
1636
- G(5, b(Ie)),
1637
- G(6, b(oe)),
1638
- G(7, b(ye)),
1639
- G(8, b(gn)),
1640
- G(9, b(uo)),
1641
- G(10, ea(po))
1642
- ], Ze);
1643
- let $n = class extends fn {
1600
+ Je = Lo([
1601
+ Z(0, ee),
1602
+ Z(1, Ba),
1603
+ Z(2, Ve),
1604
+ Z(3, ve),
1605
+ Z(4, b(ho)),
1606
+ Z(5, b(Re)),
1607
+ Z(6, b(ae)),
1608
+ Z(7, b(be)),
1609
+ Z(8, b(mn)),
1610
+ Z(9, b(lo)),
1611
+ Z(10, Jo(uo))
1612
+ ], Je);
1613
+ let $n = class extends pn {
1644
1614
  constructor(e, t, o, n, a, i, r) {
1645
1615
  super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = o, this._dataValidatorRegistryService = n, this._sheetInterceptorService = a, this._sheetDataValidationModel = i, this._dataValidationCacheService = r, this._initViewModelIntercept(), this._initAutoHeight();
1646
1616
  }
1647
1617
  _initViewModelIntercept() {
1648
1618
  this.disposeWithMe(
1649
1619
  this._sheetInterceptorService.intercept(
1650
- no.CELL_CONTENT,
1620
+ eo.CELL_CONTENT,
1651
1621
  {
1652
- effect: Kn.Style,
1622
+ effect: Xn.Style,
1653
1623
  // must be after numfmt
1654
- priority: oo.DATA_VALIDATION,
1624
+ priority: to.DATA_VALIDATION,
1655
1625
  // eslint-disable-next-line complexity
1656
1626
  handler: (e, t, o) => {
1657
- var R, v, w, I, V;
1627
+ var R, g, w, I, V;
1658
1628
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1659
1629
  if (!c)
1660
1630
  return o(e);
1661
1631
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1662
1632
  if (!u)
1663
1633
  return o(e);
1664
- const p = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = s.getCellRaw(n, a), f = ie(g), C = `${f != null ? f : ""}`;
1634
+ const h = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : st.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), v = s.getCellRaw(n, a), p = re(v), C = `${p != null ? p : ""}`;
1665
1635
  return o({
1666
1636
  ...e,
1667
1637
  markers: {
1668
1638
  ...e == null ? void 0 : e.markers,
1669
- ...p === rt.INVALID ? Ao : null
1639
+ ...h === st.INVALID ? Po : null
1670
1640
  },
1671
1641
  customRender: [
1672
- ...(v = e == null ? void 0 : e.customRender) != null ? v : [],
1642
+ ...(g = e == null ? void 0 : e.customRender) != null ? g : [],
1673
1643
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1674
1644
  ],
1675
1645
  fontRenderExtension: {
1676
1646
  ...e == null ? void 0 : e.fontRenderExtension,
1677
- isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, f, t))
1647
+ isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, p, t))
1678
1648
  },
1679
1649
  interceptorStyle: {
1680
1650
  ...e == null ? void 0 : e.interceptorStyle,
@@ -1686,14 +1656,14 @@ let $n = class extends fn {
1686
1656
  }, n, a)
1687
1657
  },
1688
1658
  interceptorAutoHeight: () => {
1689
- var y, P, F, T, E, A;
1690
- const _ = (P = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : P.skeleton;
1659
+ var M, P, U, T, E, A;
1660
+ const _ = (P = (M = this._renderManagerService.getRenderById(i)) == null ? void 0 : M.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : P.skeleton;
1691
1661
  if (!_)
1692
1662
  return;
1693
1663
  const S = _.worksheet.getMergedCell(n, a), m = {
1694
1664
  data: e,
1695
1665
  style: _.getsStyles().getStyleByCell(e),
1696
- primaryWithCoord: _.getCellWithCoordByIndex((F = S == null ? void 0 : S.startRow) != null ? F : n, (T = S == null ? void 0 : S.startColumn) != null ? T : a),
1666
+ primaryWithCoord: _.getCellWithCoordByIndex((U = S == null ? void 0 : S.startRow) != null ? U : n, (T = S == null ? void 0 : S.startColumn) != null ? T : a),
1697
1667
  unitId: i,
1698
1668
  subUnitId: r,
1699
1669
  row: n,
@@ -1703,7 +1673,7 @@ let $n = class extends fn {
1703
1673
  };
1704
1674
  return (A = (E = d == null ? void 0 : d.canvasRender) == null ? void 0 : E.calcCellAutoHeight) == null ? void 0 : A.call(E, m);
1705
1675
  },
1706
- coverable: ((V = e == null ? void 0 : e.coverable) != null ? V : !0) && !(u.type === z.LIST || u.type === z.LIST_MULTIPLE)
1676
+ coverable: ((V = e == null ? void 0 : e.coverable) != null ? V : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1707
1677
  });
1708
1678
  }
1709
1679
  }
@@ -1712,8 +1682,8 @@ let $n = class extends fn {
1712
1682
  }
1713
1683
  _initAutoHeight() {
1714
1684
  this._sheetDataValidationModel.ruleChange$.pipe(
1715
- In((e) => e.source === "command"),
1716
- vo(16)
1685
+ Cn((e) => e.source === "command"),
1686
+ mo(16)
1717
1687
  ).subscribe((e) => {
1718
1688
  const t = [];
1719
1689
  if (e.forEach((o) => {
@@ -1721,24 +1691,24 @@ let $n = class extends fn {
1721
1691
  (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1722
1692
  }), t.length) {
1723
1693
  const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1724
- Gn(o.redos, this._commandService);
1694
+ zn(o.redos, this._commandService);
1725
1695
  }
1726
1696
  });
1727
1697
  }
1728
1698
  };
1729
- $n = To([
1730
- G(0, Q),
1731
- G(1, Ve),
1732
- G(2, b(fo)),
1733
- G(3, b(ye)),
1734
- G(4, b(gn)),
1735
- G(5, b(oe)),
1736
- G(6, b(uo))
1699
+ $n = Lo([
1700
+ Z(0, ee),
1701
+ Z(1, Ve),
1702
+ Z(2, b(ho)),
1703
+ Z(3, b(be)),
1704
+ Z(4, b(mn)),
1705
+ Z(5, b(ae)),
1706
+ Z(6, b(lo))
1737
1707
  ], $n);
1738
- var vr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Sr = (e, t, o, n) => {
1739
- for (var a = n > 1 ? void 0 : n ? _r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1708
+ var pr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, mr = (e, t, o, n) => {
1709
+ for (var a = n > 1 ? void 0 : n ? fr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1740
1710
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1741
- return n && a && vr(t, o, a), a;
1711
+ return n && a && pr(t, o, a), a;
1742
1712
  }, kn = (e, t) => (o, n) => t(o, n, e);
1743
1713
  let yt = class extends De {
1744
1714
  constructor(e, t, o) {
@@ -1757,30 +1727,30 @@ let yt = class extends De {
1757
1727
  (i = this._sheetSkeletonManagerService.getWorksheetSkeleton(a)) == null || i.skeleton.makeDirty(!0);
1758
1728
  }), (n = this._context.mainComponent) == null || n.makeForceDirty();
1759
1729
  };
1760
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(ta(16)).subscribe(e));
1730
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Qo(16)).subscribe(e));
1761
1731
  }
1762
1732
  };
1763
- yt = Sr([
1764
- kn(1, b(oe)),
1765
- kn(2, b(Rt))
1733
+ yt = mr([
1734
+ kn(1, b(ae)),
1735
+ kn(2, b(Dt))
1766
1736
  ], yt);
1767
- const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formula-and", wr = "univer-data-validation-formula-list-item", Rr = "univer-data-validation-formula-list-item-icon", Dr = "univer-data-validation-formula-list-item-drag", Vr = "univer-data-validation-formula-list-add", yr = "univer-data-validation-formula-color-select", Mr = "univer-data-validation-formula-color-select-panel", br = "univer-data-validation-formula-color-item", ne = {
1768
- dataValidationFormula: Cr,
1769
- dataValidationFormulaAnd: Ir,
1770
- dataValidationFormulaListItem: wr,
1771
- dataValidationFormulaListItemIcon: Rr,
1772
- dataValidationFormulaListItemDrag: Dr,
1773
- dataValidationFormulaListAdd: Vr,
1774
- dataValidationFormulaColorSelect: yr,
1775
- dataValidationFormulaColorSelectPanel: Mr,
1776
- dataValidationFormulaColorItem: br
1777
- }, Er = (e) => {
1778
- const { isTwoFormula: t = !1, value: o, onChange: n, showError: a, validResult: i } = e, r = L(J), l = a ? i == null ? void 0 : i.formula1 : "", s = a ? i == null ? void 0 : i.formula2 : "";
1779
- return t ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
1780
- /* @__PURE__ */ h.jsx(Z, { error: l, children: /* @__PURE__ */ h.jsx(
1781
- xe,
1737
+ const gr = "univer-data-validation-formula", vr = "univer-data-validation-formula-and", _r = "univer-data-validation-formula-list-item", Sr = "univer-data-validation-formula-list-item-icon", Cr = "univer-data-validation-formula-list-item-drag", Ir = "univer-data-validation-formula-list-add", wr = "univer-data-validation-formula-color-select", Rr = "univer-data-validation-formula-color-select-panel", Dr = "univer-data-validation-formula-color-item", oe = {
1738
+ dataValidationFormula: gr,
1739
+ dataValidationFormulaAnd: vr,
1740
+ dataValidationFormulaListItem: _r,
1741
+ dataValidationFormulaListItemIcon: Sr,
1742
+ dataValidationFormulaListItemDrag: Cr,
1743
+ dataValidationFormulaListAdd: Ir,
1744
+ dataValidationFormulaColorSelect: wr,
1745
+ dataValidationFormulaColorSelectPanel: Rr,
1746
+ dataValidationFormulaColorItem: Dr
1747
+ }, Vr = (e) => {
1748
+ const { isTwoFormula: t = !1, value: o, onChange: n, showError: a, validResult: i } = e, r = L(Q), l = a ? i == null ? void 0 : i.formula1 : "", s = a ? i == null ? void 0 : i.formula2 : "";
1749
+ return t ? /* @__PURE__ */ x(we, { children: [
1750
+ /* @__PURE__ */ f(q, { error: l, children: /* @__PURE__ */ f(
1751
+ Ue,
1782
1752
  {
1783
- className: ne.dataValidationFormula,
1753
+ className: oe.dataValidationFormula,
1784
1754
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1785
1755
  value: o == null ? void 0 : o.formula1,
1786
1756
  onChange: (c) => {
@@ -1791,11 +1761,11 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1791
1761
  }
1792
1762
  }
1793
1763
  ) }),
1794
- /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
1795
- /* @__PURE__ */ h.jsx(Z, { error: s, children: /* @__PURE__ */ h.jsx(
1796
- xe,
1764
+ /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
1765
+ /* @__PURE__ */ f(q, { error: s, children: /* @__PURE__ */ f(
1766
+ Ue,
1797
1767
  {
1798
- className: ne.dataValidationFormula,
1768
+ className: oe.dataValidationFormula,
1799
1769
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1800
1770
  value: o == null ? void 0 : o.formula2,
1801
1771
  onChange: (c) => {
@@ -1806,10 +1776,10 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1806
1776
  }
1807
1777
  }
1808
1778
  ) })
1809
- ] }) : /* @__PURE__ */ h.jsx(Z, { error: l, children: /* @__PURE__ */ h.jsx(
1810
- xe,
1779
+ ] }) : /* @__PURE__ */ f(q, { error: l, children: /* @__PURE__ */ f(
1780
+ Ue,
1811
1781
  {
1812
- className: ne.dataValidationFormula,
1782
+ className: oe.dataValidationFormula,
1813
1783
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
1814
1784
  value: o == null ? void 0 : o.formula1,
1815
1785
  onChange: (c) => {
@@ -1818,11 +1788,11 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1818
1788
  }
1819
1789
  ) });
1820
1790
  };
1821
- function Or(e) {
1822
- const { value: t, onChange: o, showError: n, validResult: a } = e, i = L(J), r = n ? a == null ? void 0 : a.formula1 : "", l = n ? a == null ? void 0 : a.formula2 : "", [s, c] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1823
- return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
1824
- /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(
1825
- Ot,
1791
+ function Mr(e) {
1792
+ const { value: t, onChange: o, showError: n, validResult: a } = e, i = L(Q), r = n ? a == null ? void 0 : a.formula1 : "", l = n ? a == null ? void 0 : a.formula2 : "", [s, c] = j(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1793
+ return /* @__PURE__ */ x(we, { children: [
1794
+ /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
1795
+ Lt,
1826
1796
  {
1827
1797
  checked: s,
1828
1798
  onChange: (u) => {
@@ -1835,10 +1805,10 @@ function Or(e) {
1835
1805
  children: i.t("dataValidation.checkbox.tips")
1836
1806
  }
1837
1807
  ) }),
1838
- s ? /* @__PURE__ */ h.jsx(Z, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ h.jsx(
1839
- xe,
1808
+ s ? /* @__PURE__ */ f(q, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ f(
1809
+ Ue,
1840
1810
  {
1841
- className: ne.dataValidationFormula,
1811
+ className: oe.dataValidationFormula,
1842
1812
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1843
1813
  value: t == null ? void 0 : t.formula1,
1844
1814
  onChange: (u) => {
@@ -1849,10 +1819,10 @@ function Or(e) {
1849
1819
  }
1850
1820
  }
1851
1821
  ) }) : null,
1852
- s ? /* @__PURE__ */ h.jsx(Z, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ h.jsx(
1853
- xe,
1822
+ s ? /* @__PURE__ */ f(q, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ f(
1823
+ Ue,
1854
1824
  {
1855
- className: ne.dataValidationFormula,
1825
+ className: oe.dataValidationFormula,
1856
1826
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1857
1827
  value: t == null ? void 0 : t.formula2,
1858
1828
  onChange: (u) => {
@@ -1865,25 +1835,25 @@ function Or(e) {
1865
1835
  ) }) : null
1866
1836
  ] });
1867
1837
  }
1868
- function Lr(e) {
1869
- var p;
1870
- const { unitId: t, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = e, l = i ? r == null ? void 0 : r.formula1 : void 0, s = We({}), [c, u] = W(!1);
1871
- return Sn((d) => {
1872
- var f;
1873
- const g = (f = s.current) == null ? void 0 : f.handleOutClick;
1874
- g && g(d, () => u(!1));
1875
- }), /* @__PURE__ */ h.jsx(
1876
- So,
1838
+ function yr(e) {
1839
+ var h;
1840
+ const { unitId: t, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = e, l = i ? r == null ? void 0 : r.formula1 : void 0, s = ze({}), [c, u] = j(!1);
1841
+ return _n((d) => {
1842
+ var p;
1843
+ const v = (p = s.current) == null ? void 0 : p.handleOutClick;
1844
+ v && v(d, () => u(!1));
1845
+ }), /* @__PURE__ */ f(
1846
+ vo,
1877
1847
  {
1878
- initValue: (p = n == null ? void 0 : n.formula1) != null ? p : "=",
1848
+ initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
1879
1849
  unitId: t,
1880
1850
  subUnitId: o,
1881
1851
  isFocus: c,
1882
1852
  onChange: (d) => {
1883
- const g = (d != null ? d : "").trim();
1884
- g !== (n == null ? void 0 : n.formula1) && (a == null || a({
1853
+ const v = (d != null ? d : "").trim();
1854
+ v !== (n == null ? void 0 : n.formula1) && (a == null || a({
1885
1855
  ...n,
1886
- formula1: g
1856
+ formula1: v
1887
1857
  }));
1888
1858
  },
1889
1859
  errorText: l,
@@ -1893,20 +1863,20 @@ function Lr(e) {
1893
1863
  }
1894
1864
  );
1895
1865
  }
1896
- function xo(e) {
1866
+ function To(e) {
1897
1867
  var t, o, n = "";
1898
1868
  if (typeof e == "string" || typeof e == "number") n += e;
1899
1869
  else if (typeof e == "object") if (Array.isArray(e)) {
1900
1870
  var a = e.length;
1901
- for (t = 0; t < a; t++) e[t] && (o = xo(e[t])) && (n && (n += " "), n += o);
1871
+ for (t = 0; t < a; t++) e[t] && (o = To(e[t])) && (n && (n += " "), n += o);
1902
1872
  } else for (o in e) e[o] && (n && (n += " "), n += o);
1903
1873
  return n;
1904
1874
  }
1905
- function Pr() {
1906
- for (var e, t, o = 0, n = "", a = arguments.length; o < a; o++) (e = arguments[o]) && (t = xo(e)) && (n && (n += " "), n += t);
1875
+ function br() {
1876
+ for (var e, t, o = 0, n = "", a = arguments.length; o < a; o++) (e = arguments[o]) && (t = To(e)) && (n && (n += " "), n += t);
1907
1877
  return n;
1908
1878
  }
1909
- const Tr = [
1879
+ const Er = [
1910
1880
  "#FFFFFF",
1911
1881
  "#FEE7E7",
1912
1882
  "#FEF0E6",
@@ -1931,34 +1901,34 @@ const Tr = [
1931
1901
  "#3A60F7",
1932
1902
  "#9E6DE3",
1933
1903
  "#F248A6"
1934
- ], Ar = (e) => {
1935
- const { value: t, onChange: o, disabled: n } = e, [a, i] = W(!1);
1936
- return /* @__PURE__ */ h.jsx(
1937
- tn,
1904
+ ], Or = (e) => {
1905
+ const { value: t, onChange: o, disabled: n } = e, [a, i] = j(!1);
1906
+ return /* @__PURE__ */ f(
1907
+ en,
1938
1908
  {
1939
1909
  disabled: n,
1940
1910
  open: a,
1941
1911
  onDropdownVisibleChange: i,
1942
1912
  dropdownStyle: { width: 112 },
1943
1913
  style: { width: 96, cursor: "pointer" },
1944
- className: ne.dataValidationFormulaColorSelect,
1914
+ className: oe.dataValidationFormulaColorSelect,
1945
1915
  value: t,
1946
1916
  onChange: o,
1947
- labelRender: (r) => /* @__PURE__ */ h.jsx(
1917
+ labelRender: (r) => /* @__PURE__ */ f(
1948
1918
  "div",
1949
1919
  {
1950
- className: ne.dataValidationFormulaColorItem,
1920
+ className: oe.dataValidationFormulaColorItem,
1951
1921
  style: { background: r.value, marginTop: 5 }
1952
1922
  }
1953
1923
  ),
1954
- dropdownRender: () => /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaColorSelectPanel, children: Tr.map(
1955
- (r) => /* @__PURE__ */ h.jsx(
1924
+ dropdownRender: () => /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaColorSelectPanel, children: Er.map(
1925
+ (r) => /* @__PURE__ */ f(
1956
1926
  "div",
1957
1927
  {
1958
1928
  onClick: () => {
1959
1929
  o(r), i(!1);
1960
1930
  },
1961
- className: ne.dataValidationFormulaColorItem,
1931
+ className: oe.dataValidationFormulaColorItem,
1962
1932
  style: { background: r }
1963
1933
  },
1964
1934
  r
@@ -1968,10 +1938,10 @@ const Tr = [
1968
1938
  );
1969
1939
  }, Wn = (e) => {
1970
1940
  const { item: t, commonProps: o, style: n } = e, { onItemChange: a, onItemDelete: i } = o;
1971
- return /* @__PURE__ */ h.jsxs("div", { className: ne.dataValidationFormulaListItem, style: n, children: [
1972
- t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: Pr(ne.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ h.jsx(yo, {}) }),
1973
- /* @__PURE__ */ h.jsx(
1974
- Ar,
1941
+ return /* @__PURE__ */ x("div", { className: oe.dataValidationFormulaListItem, style: n, children: [
1942
+ t.isRef ? null : /* @__PURE__ */ f("div", { className: br(oe.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ f(Do, {}) }),
1943
+ /* @__PURE__ */ f(
1944
+ Or,
1975
1945
  {
1976
1946
  value: t.color,
1977
1947
  onChange: (r) => {
@@ -1979,8 +1949,8 @@ const Tr = [
1979
1949
  }
1980
1950
  }
1981
1951
  ),
1982
- /* @__PURE__ */ h.jsx(
1983
- xe,
1952
+ /* @__PURE__ */ f(
1953
+ Ue,
1984
1954
  {
1985
1955
  disabled: t.isRef,
1986
1956
  value: t.label,
@@ -1989,153 +1959,153 @@ const Tr = [
1989
1959
  }
1990
1960
  }
1991
1961
  ),
1992
- t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ h.jsx(Rn, { onClick: () => i(t.id) }) })
1962
+ t.isRef ? null : /* @__PURE__ */ f("div", { className: oe.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ f(wn, { onClick: () => i(t.id) }) })
1993
1963
  ] });
1994
1964
  };
1995
- function xr(e) {
1965
+ function Lr(e) {
1996
1966
  const { value: t, onChange: o = () => {
1997
- }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = We(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [g, f] = W(p === "1" ? s : "="), [C, R] = W(p === "1" ? s : "="), v = L(J), w = L(ye), I = L(Pt), V = L(Ca), [_, S] = W(() => c.split(",")), m = w.getValidatorItem(z.LIST), [y, P] = W([]), [F, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = He(() => I.ruleChange$.pipe(wn(16)), []), x = Ne(A), j = ln(o);
1998
- Ce(() => {
1967
+ }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = ze(null), [h, d] = j(() => Ae(s) ? "1" : "0"), [v, p] = j(h === "1" ? s : "="), [C, R] = j(h === "1" ? s : "="), g = L(Q), w = L(be), I = L(Tt), V = L(_a), [_, S] = j(() => c.split(",")), m = w.getValidatorItem(K.LIST), [M, P] = j([]), [U, T] = j(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Ke(() => I.ruleChange$.pipe(In(16)), []), F = ke(A), N = sn(o);
1968
+ Ie(() => {
1999
1969
  (async () => {
2000
- await new Promise((B) => {
2001
- setTimeout(() => B(!0), 100);
1970
+ await new Promise((k) => {
1971
+ setTimeout(() => k(!0), 100);
2002
1972
  });
2003
- const D = I.getRuleById(n, a, l), U = D == null ? void 0 : D.formula1;
2004
- if (Pe(U) && m && D) {
2005
- const B = await m.getListAsync(D, n, a);
2006
- P(B);
1973
+ const D = I.getRuleById(n, a, l), $ = D == null ? void 0 : D.formula1;
1974
+ if (Ae($) && m && D) {
1975
+ const k = await m.getListAsync(D, n, a);
1976
+ P(k);
2007
1977
  }
2008
1978
  })();
2009
- }, [I, x, m, l, a, n]), Ce(() => {
2010
- Pe(s) && s !== C && (f(s), R(C));
1979
+ }, [I, F, m, l, a, n]), Ie(() => {
1980
+ Ae(s) && s !== C && (p(s), R(C));
2011
1981
  }, [C, s]);
2012
- const [N, H] = W(() => {
2013
- const D = p !== "1" ? ao(s) : [], U = c.split(",");
2014
- return D.map((B, $) => ({
2015
- label: B,
2016
- color: U[$] || Te,
1982
+ const [B, Y] = j(() => {
1983
+ const D = h !== "1" ? no(s) : [], $ = c.split(",");
1984
+ return D.map((k, W) => ({
1985
+ label: k,
1986
+ color: $[W] || Fe,
2017
1987
  isRef: !1,
2018
- id: en.generateRandomId(4)
1988
+ id: Qt.generateRandomId(4)
2019
1989
  }));
2020
- }), X = (D, U, B) => {
2021
- const $ = N.find((_e) => _e.id === D);
2022
- $ && ($.label = U, $.color = B, H([...N]));
2023
- }, k = (D) => {
2024
- const U = N.findIndex((B) => B.id === D);
2025
- U !== -1 && (N.splice(U, 1), H([...N]));
2026
- }, K = c.split(","), q = He(() => y.map((D, U) => ({
1990
+ }), z = (D, $, k) => {
1991
+ const W = B.find((Se) => Se.id === D);
1992
+ W && (W.label = $, W.color = k, Y([...B]));
1993
+ }, H = (D) => {
1994
+ const $ = B.findIndex((k) => k.id === D);
1995
+ $ !== -1 && (B.splice($, 1), Y([...B]));
1996
+ }, G = c.split(","), J = Ke(() => M.map((D, $) => ({
2027
1997
  label: D,
2028
- color: K[U] || Te,
2029
- id: `${U}`,
1998
+ color: G[$] || Fe,
1999
+ id: `${$}`,
2030
2000
  isRef: !0
2031
- })), [K, y]), ee = (D, U, B) => {
2032
- const $ = [..._];
2033
- $[+D] = B, S($), j({
2001
+ })), [G, M]), te = (D, $, k) => {
2002
+ const W = [..._];
2003
+ W[+D] = k, S(W), N({
2034
2004
  formula1: s,
2035
- formula2: $.join(",")
2005
+ formula2: W.join(",")
2036
2006
  });
2037
- }, te = () => {
2038
- H([
2039
- ...N,
2007
+ }, ne = () => {
2008
+ Y([
2009
+ ...B,
2040
2010
  {
2041
2011
  label: "",
2042
- color: Te,
2012
+ color: Fe,
2043
2013
  isRef: !1,
2044
- id: en.generateRandomId(4)
2014
+ id: Qt.generateRandomId(4)
2045
2015
  }
2046
2016
  ]);
2047
2017
  };
2048
- Ce(() => {
2049
- if (p === "1")
2018
+ Ie(() => {
2019
+ if (h === "1")
2050
2020
  return;
2051
- const D = /* @__PURE__ */ new Set(), U = [];
2052
- N.map((B) => ({
2053
- labelList: B.label.split(","),
2054
- item: B
2055
- })).forEach(({ item: B, labelList: $ }) => {
2056
- $.forEach((_e) => {
2057
- D.has(_e) || (D.add(_e), U.push({
2058
- label: _e,
2059
- color: B.color
2021
+ const D = /* @__PURE__ */ new Set(), $ = [];
2022
+ B.map((k) => ({
2023
+ labelList: k.label.split(","),
2024
+ item: k
2025
+ })).forEach(({ item: k, labelList: W }) => {
2026
+ W.forEach((Se) => {
2027
+ D.has(Se) || (D.add(Se), $.push({
2028
+ label: Se,
2029
+ color: k.color
2060
2030
  }));
2061
2031
  });
2062
- }), j({
2063
- formula1: io(U.map((B) => B.label)),
2064
- formula2: U.map((B) => B.color === Te ? "" : B.color).join(",")
2032
+ }), N({
2033
+ formula1: oo($.map((k) => k.label)),
2034
+ formula2: $.map((k) => k.color === Fe ? "" : k.color).join(",")
2065
2035
  });
2066
- }, [N, j, p, C, _]);
2067
- const re = ln(async (D) => {
2068
- if (!Pe(D)) {
2069
- j == null || j({
2036
+ }, [B, N, h, C, _]);
2037
+ const se = sn(async (D) => {
2038
+ if (!Ae(D)) {
2039
+ N == null || N({
2070
2040
  formula1: "",
2071
2041
  formula2: c
2072
2042
  });
2073
2043
  return;
2074
2044
  }
2075
- V.getFormulaRefCheck(D) ? (j == null || j({
2076
- formula1: Pe(D) ? D : "",
2045
+ V.getFormulaRefCheck(D) ? (N == null || N({
2046
+ formula1: Ae(D) ? D : "",
2077
2047
  formula2: c
2078
- }), T("")) : (j == null || j({
2048
+ }), T("")) : (N == null || N({
2079
2049
  formula1: "",
2080
2050
  formula2: c
2081
- }), f("="), T(v.t("dataValidation.validFail.formulaError")));
2082
- }), ae = We({}), [se, O] = W(!1);
2083
- return Sn((D) => {
2084
- var B;
2085
- const U = (B = ae.current) == null ? void 0 : B.handleOutClick;
2086
- U && U(D, () => O(!1));
2087
- }), /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
2088
- /* @__PURE__ */ h.jsx(Z, { label: v.t("dataValidation.list.options"), children: /* @__PURE__ */ h.jsxs(
2089
- mn,
2051
+ }), p("="), T(g.t("dataValidation.validFail.formulaError")));
2052
+ }), ie = ze({}), [le, O] = j(!1);
2053
+ return _n((D) => {
2054
+ var k;
2055
+ const $ = (k = ie.current) == null ? void 0 : k.handleOutClick;
2056
+ $ && $(D, () => O(!1));
2057
+ }), /* @__PURE__ */ x(we, { children: [
2058
+ /* @__PURE__ */ f(q, { label: g.t("dataValidation.list.options"), children: /* @__PURE__ */ x(
2059
+ fn,
2090
2060
  {
2091
- value: p,
2061
+ value: h,
2092
2062
  onChange: (D) => {
2093
- d(D), f(C), D === "1" && j({
2063
+ d(D), p(C), D === "1" && N({
2094
2064
  formula1: C === "=" ? "" : C,
2095
2065
  formula2: _.join(",")
2096
2066
  });
2097
2067
  },
2098
2068
  children: [
2099
- /* @__PURE__ */ h.jsx(Ae, { value: "0", children: v.t("dataValidation.list.customOptions") }),
2100
- /* @__PURE__ */ h.jsx(Ae, { value: "1", children: v.t("dataValidation.list.refOptions") })
2069
+ /* @__PURE__ */ f(Ne, { value: "0", children: g.t("dataValidation.list.customOptions") }),
2070
+ /* @__PURE__ */ f(Ne, { value: "1", children: g.t("dataValidation.list.refOptions") })
2101
2071
  ]
2102
2072
  }
2103
2073
  ) }),
2104
- p === "1" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
2105
- /* @__PURE__ */ h.jsx(
2106
- So,
2074
+ h === "1" ? /* @__PURE__ */ x(we, { children: [
2075
+ /* @__PURE__ */ f(
2076
+ vo,
2107
2077
  {
2108
- initValue: g,
2078
+ initValue: v,
2109
2079
  unitId: n,
2110
2080
  subUnitId: a,
2111
- isFocus: se,
2081
+ isFocus: le,
2112
2082
  onChange: (D = "") => {
2113
- const U = (D != null ? D : "").trim();
2114
- R(U), re(U);
2083
+ const $ = (D != null ? D : "").trim();
2084
+ R($), se($);
2115
2085
  },
2116
- errorText: E || F || void 0,
2086
+ errorText: E || U || void 0,
2117
2087
  onFocus: () => O(!0),
2118
- actions: ae.current,
2088
+ actions: ie.current,
2119
2089
  isSupportAcrossSheet: !0
2120
2090
  }
2121
2091
  ),
2122
- /* @__PURE__ */ h.jsx("div", { ref: u, style: { marginTop: "12px" }, children: q.map((D) => /* @__PURE__ */ h.jsx(Wn, { item: D, commonProps: { onItemChange: ee }, style: { marginBottom: 12 } }, D.id)) })
2123
- ] }) : /* @__PURE__ */ h.jsx(Z, { error: E, children: /* @__PURE__ */ h.jsxs("div", { ref: u, style: { marginTop: "-12px" }, children: [
2124
- /* @__PURE__ */ h.jsx(
2125
- sa,
2092
+ /* @__PURE__ */ f("div", { ref: u, style: { marginTop: "12px" }, children: J.map((D) => /* @__PURE__ */ f(Wn, { item: D, commonProps: { onItemChange: te }, style: { marginBottom: 12 } }, D.id)) })
2093
+ ] }) : /* @__PURE__ */ f(q, { error: E, children: /* @__PURE__ */ x("div", { ref: u, style: { marginTop: "-12px" }, children: [
2094
+ /* @__PURE__ */ f(
2095
+ ia,
2126
2096
  {
2127
- list: N,
2128
- onListChange: H,
2097
+ list: B,
2098
+ onListChange: Y,
2129
2099
  rowHeight: 32,
2130
2100
  margin: [0, 12],
2131
2101
  draggableHandle: ".draggableHandle",
2132
- itemRender: (D) => /* @__PURE__ */ h.jsx(
2102
+ itemRender: (D) => /* @__PURE__ */ f(
2133
2103
  Wn,
2134
2104
  {
2135
2105
  item: D,
2136
2106
  commonProps: {
2137
- onItemChange: X,
2138
- onItemDelete: k
2107
+ onItemChange: z,
2108
+ onItemDelete: H
2139
2109
  }
2140
2110
  },
2141
2111
  D.id
@@ -2143,47 +2113,47 @@ function xr(e) {
2143
2113
  idKey: "id"
2144
2114
  }
2145
2115
  ),
2146
- /* @__PURE__ */ h.jsxs("a", { className: ne.dataValidationFormulaListAdd, onClick: te, children: [
2147
- /* @__PURE__ */ h.jsx(Ro, {}),
2148
- v.t("dataValidation.list.add")
2116
+ /* @__PURE__ */ x("a", { className: oe.dataValidationFormulaListAdd, onClick: ne, children: [
2117
+ /* @__PURE__ */ f(Io, {}),
2118
+ g.t("dataValidation.list.add")
2149
2119
  ] })
2150
2120
  ] }) })
2151
2121
  ] });
2152
2122
  }
2153
- const jo = "data-validation.custom-formula-input", xt = "data-validation.formula-input", Mn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", jr = [
2123
+ const Ao = "data-validation.custom-formula-input", Nt = "data-validation.formula-input", Mn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", Pr = [
2154
2124
  [
2155
- jo,
2156
- Lr
2125
+ Ao,
2126
+ yr
2157
2127
  ],
2158
2128
  [
2159
- xt,
2160
- Er
2129
+ Nt,
2130
+ Vr
2161
2131
  ],
2162
2132
  [
2163
2133
  Mn,
2164
- xr
2134
+ Lr
2165
2135
  ],
2166
2136
  [
2167
2137
  Fo,
2168
- Or
2138
+ Mr
2169
2139
  ]
2170
- ], Fr = "LIST_RENDER_MODE_OPTION_INPUT";
2171
- function Mt(e) {
2140
+ ], Tr = "LIST_RENDER_MODE_OPTION_INPUT";
2141
+ function bt(e) {
2172
2142
  var a;
2173
- const { value: t, onChange: o } = e, n = L(J);
2174
- return /* @__PURE__ */ h.jsx(Z, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(mn, { value: `${(a = t.renderMode) != null ? a : de.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2175
- /* @__PURE__ */ h.jsx(Ae, { value: `${de.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2176
- /* @__PURE__ */ h.jsx(Ae, { value: `${de.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2177
- /* @__PURE__ */ h.jsx(Ae, { value: `${de.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2143
+ const { value: t, onChange: o } = e, n = L(Q);
2144
+ return /* @__PURE__ */ f(q, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ x(fn, { value: `${(a = t.renderMode) != null ? a : ce.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2145
+ /* @__PURE__ */ f(Ne, { value: `${ce.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2146
+ /* @__PURE__ */ f(Ne, { value: `${ce.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2147
+ /* @__PURE__ */ f(Ne, { value: `${ce.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2178
2148
  ] }) });
2179
2149
  }
2180
- Mt.componentKey = Fr;
2181
- const Nr = "DATE_SHOW_TIME_OPTION";
2182
- function bt(e) {
2150
+ bt.componentKey = Tr;
2151
+ const Ar = "DATE_SHOW_TIME_OPTION";
2152
+ function Et(e) {
2183
2153
  var a;
2184
- const { value: t, onChange: o } = e, n = L(J);
2185
- return /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(
2186
- Ot,
2154
+ const { value: t, onChange: o } = e, n = L(Q);
2155
+ return /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
2156
+ Lt,
2187
2157
  {
2188
2158
  checked: (a = t.bizInfo) == null ? void 0 : a.showTime,
2189
2159
  onChange: (i) => {
@@ -2199,26 +2169,26 @@ function bt(e) {
2199
2169
  }
2200
2170
  ) });
2201
2171
  }
2202
- bt.componentKey = Nr;
2203
- var Ur = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, $r = (e, t, o, n) => {
2204
- for (var a = n > 1 ? void 0 : n ? Br(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2172
+ Et.componentKey = Ar;
2173
+ var Fr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, Ur = (e, t, o, n) => {
2174
+ for (var a = n > 1 ? void 0 : n ? Nr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2205
2175
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2206
- return n && a && Ur(t, o, a), a;
2207
- }, at = (e, t) => (o, n) => t(o, n, e);
2208
- const ht = 6;
2209
- let dn = class {
2176
+ return n && a && Fr(t, o, a), a;
2177
+ }, it = (e, t) => (o, n) => t(o, n, e);
2178
+ const pt = 6;
2179
+ let ln = class {
2210
2180
  constructor(e, t, o, n, a) {
2211
2181
  this._commandService = e, this._formulaService = t, this._themeService = o, this._renderManagerService = n, this._dataValidationModel = a;
2212
2182
  }
2213
2183
  _calc(e, t) {
2214
- var c, u, p;
2215
- const { vt: o, ht: n } = t || {}, a = e.endX - e.startX - ht * 2, i = e.endY - e.startY, r = ((c = t == null ? void 0 : t.fs) != null ? c : 10) * 1.6;
2184
+ var c, u, h;
2185
+ const { vt: o, ht: n } = t || {}, a = e.endX - e.startX - pt * 2, i = e.endY - e.startY, r = ((c = t == null ? void 0 : t.fs) != null ? c : 10) * 1.6;
2216
2186
  let l = 0, s = 0;
2217
2187
  switch (o) {
2218
- case ue.TOP:
2188
+ case he.TOP:
2219
2189
  s = 0;
2220
2190
  break;
2221
- case ue.BOTTOM:
2191
+ case he.BOTTOM:
2222
2192
  s = 0 + (i - r);
2223
2193
  break;
2224
2194
  default:
@@ -2227,20 +2197,20 @@ let dn = class {
2227
2197
  }
2228
2198
  switch (n) {
2229
2199
  case Ye.LEFT:
2230
- l = ht;
2200
+ l = pt;
2231
2201
  break;
2232
2202
  case Ye.RIGHT:
2233
- l = ht + (a - r);
2203
+ l = pt + (a - r);
2234
2204
  break;
2235
2205
  default:
2236
- l = ht + (a - r) / 2;
2206
+ l = pt + (a - r) / 2;
2237
2207
  break;
2238
2208
  }
2239
2209
  return {
2240
2210
  left: e.startX + l,
2241
2211
  top: e.startY + s,
2242
2212
  width: ((u = t == null ? void 0 : t.fs) != null ? u : 10) * 1.6,
2243
- height: ((p = t == null ? void 0 : t.fs) != null ? p : 10) * 1.6
2213
+ height: ((h = t == null ? void 0 : t.fs) != null ? h : 10) * 1.6
2244
2214
  };
2245
2215
  }
2246
2216
  calcCellAutoHeight(e) {
@@ -2254,26 +2224,26 @@ let dn = class {
2254
2224
  return ((o = t == null ? void 0 : t.fs) != null ? o : 10) * 1.6;
2255
2225
  }
2256
2226
  async _parseFormula(e, t, o) {
2257
- var c, u, p, d, g, f, C, R, v;
2258
- const { formula1: n = Ra, formula2: a = Da } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Ft((p = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : p[0]), l = Ft((f = (g = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : g[0]) == null ? void 0 : f[0]), s = Ln(String(r)) && Ln(String(l));
2227
+ var c, u, h, d, v, p, C, R, g;
2228
+ const { formula1: n = Ia, formula2: a = wa } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Bt((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Bt((p = (v = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : v[0]) == null ? void 0 : p[0]), s = On(String(r)) && On(String(l));
2259
2229
  return {
2260
- formula1: Pe(n) ? Ft((v = (R = (C = i == null ? void 0 : i[0]) == null ? void 0 : C.result) == null ? void 0 : R[0]) == null ? void 0 : v[0]) : n,
2261
- formula2: Pe(a) ? l : a,
2230
+ formula1: Ae(n) ? Bt((g = (R = (C = i == null ? void 0 : i[0]) == null ? void 0 : C.result) == null ? void 0 : R[0]) == null ? void 0 : g[0]) : n,
2231
+ formula2: Ae(a) ? l : a,
2262
2232
  isFormulaValid: s
2263
2233
  };
2264
2234
  }
2265
2235
  drawWith(e, t) {
2266
- var E, A, x, j;
2267
- const { style: o, primaryWithCoord: n, unitId: a, subUnitId: i, worksheet: r, row: l, col: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = ie(r.getCellRaw(l, s)), p = this._dataValidationModel.getRuleByLocation(a, i, l, s);
2268
- if (!p)
2236
+ var E, A, F, N;
2237
+ const { style: o, primaryWithCoord: n, unitId: a, subUnitId: i, worksheet: r, row: l, col: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = re(r.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(a, i, l, s);
2238
+ if (!h)
2269
2239
  return;
2270
- const d = this._dataValidationModel.getValidator(p.type);
2240
+ const d = this._dataValidationModel.getValidator(h.type);
2271
2241
  if (!d)
2272
2242
  return;
2273
- const g = this._themeService.getCurrentTheme();
2274
- if (!((E = d.skipDefaultFontRender) != null && E.call(d, p, u, { unitId: a, subUnitId: i, row: l, column: s })))
2243
+ const v = this._themeService.getCurrentTheme();
2244
+ if (!((E = d.skipDefaultFontRender) != null && E.call(d, h, u, { unitId: a, subUnitId: i, row: l, column: s })))
2275
2245
  return;
2276
- const f = d.parseFormulaSync(p, a, i), { formula1: C } = f, R = this._calc(c, o), { a: v, d: w } = e.getTransform(), I = En(R.left, v), V = En(R.top, w), _ = la.create().composeMatrix({
2246
+ const p = d.parseFormulaSync(h, a, i), { formula1: C } = p, R = this._calc(c, o), { a: g, d: w } = e.getTransform(), I = bn(R.left, g), V = bn(R.top, w), _ = ra.create().composeMatrix({
2277
2247
  left: I,
2278
2248
  top: V,
2279
2249
  scaleX: 1,
@@ -2285,14 +2255,14 @@ let dn = class {
2285
2255
  flipY: !1
2286
2256
  }), S = c.endX - c.startX, m = c.endY - c.startY;
2287
2257
  e.save(), e.beginPath(), e.rect(c.startX, c.startY, S, m), e.clip();
2288
- const y = _.getMatrix();
2289
- e.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
2290
- const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, F = String(u) === String(C), T = g.hyacinth500;
2291
- da.drawWith(e, {
2292
- checked: F,
2258
+ const M = _.getMatrix();
2259
+ e.transform(M[0], M[1], M[2], M[3], M[4], M[5]);
2260
+ const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, U = String(u) === String(C), T = v.hyacinth500;
2261
+ sa.drawWith(e, {
2262
+ checked: U,
2293
2263
  width: P,
2294
2264
  height: P,
2295
- fill: (j = (x = o == null ? void 0 : o.cl) == null ? void 0 : x.rgb) != null ? j : T
2265
+ fill: (N = (F = o == null ? void 0 : o.cl) == null ? void 0 : F.rgb) != null ? N : T
2296
2266
  }), e.restore();
2297
2267
  }
2298
2268
  isHit(e, t) {
@@ -2300,16 +2270,16 @@ let dn = class {
2300
2270
  return s <= l && s >= r && c <= i && c >= a;
2301
2271
  }
2302
2272
  async onPointerDown(e, t) {
2303
- var f;
2273
+ var p;
2304
2274
  if (t.button === 2)
2305
2275
  return;
2306
- const { primaryWithCoord: o, unitId: n, subUnitId: a, worksheet: i, row: r, col: l } = e, s = ie(i.getCellRaw(r, l)), c = this._dataValidationModel.getRuleByLocation(n, a, r, l);
2276
+ const { primaryWithCoord: o, unitId: n, subUnitId: a, worksheet: i, row: r, col: l } = e, s = re(i.getCellRaw(r, l)), c = this._dataValidationModel.getRuleByLocation(n, a, r, l);
2307
2277
  if (!c)
2308
2278
  return;
2309
2279
  const u = this._dataValidationModel.getValidator(c.type);
2310
- if (!u || !((f = u.skipDefaultFontRender) != null && f.call(u, c, s, { unitId: n, subUnitId: a, row: r, column: l })))
2280
+ if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, s, { unitId: n, subUnitId: a, row: r, column: l })))
2311
2281
  return;
2312
- const { formula1: p, formula2: d } = await this._parseFormula(c, n, a), g = {
2282
+ const { formula1: h, formula2: d } = await this._parseFormula(c, n, a), v = {
2313
2283
  range: {
2314
2284
  startColumn: o.actualColumn,
2315
2285
  endColumn: o.actualColumn,
@@ -2317,100 +2287,100 @@ let dn = class {
2317
2287
  endRow: o.actualRow
2318
2288
  },
2319
2289
  value: {
2320
- v: String(s) === wa(String(p)) ? d : p,
2290
+ v: String(s) === Ca(String(h)) ? d : h,
2321
2291
  p: null
2322
2292
  }
2323
2293
  };
2324
2294
  this._commandService.executeCommand(
2325
- vn.id,
2326
- g
2295
+ gn.id,
2296
+ v
2327
2297
  );
2328
2298
  }
2329
2299
  onPointerEnter(e, t) {
2330
2300
  var o, n;
2331
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2301
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2332
2302
  }
2333
2303
  onPointerLeave(e, t) {
2334
2304
  var o, n;
2335
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2305
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2336
2306
  }
2337
2307
  };
2338
- dn = $r([
2339
- at(0, Q),
2340
- at(1, b(Ia)),
2341
- at(2, b(na)),
2342
- at(3, b(Ve)),
2343
- at(4, b(oe))
2344
- ], dn);
2345
- var kr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Hr = (e, t, o, n) => {
2346
- for (var a = n > 1 ? void 0 : n ? Wr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2308
+ ln = Ur([
2309
+ it(0, ee),
2310
+ it(1, b(Sa)),
2311
+ it(2, b(ea)),
2312
+ it(3, b(Ve)),
2313
+ it(4, b(ae))
2314
+ ], ln);
2315
+ var Br = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, kr = (e, t, o, n) => {
2316
+ for (var a = n > 1 ? void 0 : n ? $r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2347
2317
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2348
- return n && a && kr(t, o, a), a;
2349
- }, Yr = (e, t) => (o, n) => t(o, n, e);
2350
- let me = class {
2318
+ return n && a && Br(t, o, a), a;
2319
+ }, Wr = (e, t) => (o, n) => t(o, n, e);
2320
+ let ge = class {
2351
2321
  constructor(e) {
2352
- M(this, "canvasRender", null);
2353
- M(this, "dropdown");
2354
- M(this, "optionsInput");
2355
- M(this, "formulaInput", Mn);
2322
+ y(this, "canvasRender", null);
2323
+ y(this, "dropdown");
2324
+ y(this, "optionsInput");
2325
+ y(this, "formulaInput", Mn);
2356
2326
  this.injector = e;
2357
2327
  }
2358
2328
  };
2359
- me = Hr([
2360
- Yr(0, b(Fe))
2361
- ], me);
2362
- class Xr extends me {
2329
+ ge = kr([
2330
+ Wr(0, b($e))
2331
+ ], ge);
2332
+ class Hr extends ge {
2363
2333
  constructor() {
2364
2334
  super(...arguments);
2365
- M(this, "id", z.CHECKBOX);
2366
- M(this, "canvasRender", this.injector.createInstance(dn));
2367
- M(this, "formulaInput", Fo);
2335
+ y(this, "id", K.CHECKBOX);
2336
+ y(this, "canvasRender", this.injector.createInstance(ln));
2337
+ y(this, "formulaInput", Fo);
2368
2338
  }
2369
2339
  }
2370
- class zr extends me {
2340
+ class jr extends ge {
2371
2341
  constructor() {
2372
2342
  super(...arguments);
2373
- M(this, "id", z.CUSTOM);
2374
- M(this, "formulaInput", jo);
2343
+ y(this, "id", K.CUSTOM);
2344
+ y(this, "formulaInput", Ao);
2375
2345
  }
2376
2346
  }
2377
- const Kr = "data-validation.formula-input";
2378
- class Gr extends me {
2347
+ const xr = "data-validation.formula-input";
2348
+ class Yr extends ge {
2379
2349
  constructor() {
2380
2350
  super(...arguments);
2381
- M(this, "id", z.DATE);
2382
- M(this, "formulaInput", Kr);
2383
- M(this, "optionsInput", bt.componentKey);
2384
- M(this, "dropdown", Oo);
2351
+ y(this, "id", K.DATE);
2352
+ y(this, "formulaInput", xr);
2353
+ y(this, "optionsInput", Et.componentKey);
2354
+ y(this, "dropdown", bo);
2385
2355
  }
2386
2356
  }
2387
- class Zr extends me {
2357
+ class Xr extends ge {
2388
2358
  constructor() {
2389
2359
  super(...arguments);
2390
- M(this, "id", z.DECIMAL);
2391
- M(this, "formulaInput", xt);
2360
+ y(this, "id", K.DECIMAL);
2361
+ y(this, "formulaInput", Nt);
2392
2362
  }
2393
2363
  }
2394
- const No = 4, qr = 0, Wt = 4, Uo = 4, cn = 6, Et = 6, Le = 14;
2395
- function Jr(e, t) {
2396
- const o = ca.getTextSize(e, t), n = o.width + No * 2, { ba: a, bd: i } = o, r = a + i;
2364
+ const No = 4, zr = 0, jt = 4, Uo = 4, dn = 6, Ot = 6, Te = 14;
2365
+ function Kr(e, t) {
2366
+ const o = la.getTextSize(e, t), n = o.width + No * 2, { ba: a, bd: i } = o, r = a + i;
2397
2367
  return {
2398
2368
  width: n,
2399
- height: r + qr * 2,
2369
+ height: r + zr * 2,
2400
2370
  ba: a
2401
2371
  };
2402
2372
  }
2403
- function Ht(e, t, o, n) {
2404
- const a = Le + cn * 2, i = o - a, r = n - Et * 2, l = e.map((d) => ({
2405
- layout: Jr(d, t),
2373
+ function xt(e, t, o, n) {
2374
+ const a = Te + dn * 2, i = o - a, r = n - Ot * 2, l = e.map((d) => ({
2375
+ layout: Kr(d, t),
2406
2376
  text: d
2407
2377
  }));
2408
2378
  let s;
2409
2379
  const c = [];
2410
2380
  l.forEach((d) => {
2411
- const { layout: g } = d, { width: f, height: C } = g;
2412
- !s || s.width + f + Wt > i ? (s = {
2413
- width: f,
2381
+ const { layout: v } = d, { width: p, height: C } = v;
2382
+ !s || s.width + p + jt > i ? (s = {
2383
+ width: p,
2414
2384
  height: C,
2415
2385
  items: [{
2416
2386
  ...d,
@@ -2418,43 +2388,43 @@ function Ht(e, t, o, n) {
2418
2388
  }]
2419
2389
  }, c.push(s)) : (s.items.push({
2420
2390
  ...d,
2421
- left: s.width + Wt
2422
- }), s.width = s.width + f + Wt);
2391
+ left: s.width + jt
2392
+ }), s.width = s.width + p + jt);
2423
2393
  });
2424
- let u = 0, p = 0;
2425
- return c.forEach((d, g) => {
2426
- p = Math.max(p, d.width), g === c.length - 1 ? u += d.height : u += d.height + Uo;
2394
+ let u = 0, h = 0;
2395
+ return c.forEach((d, v) => {
2396
+ h = Math.max(h, d.width), v === c.length - 1 ? u += d.height : u += d.height + Uo;
2427
2397
  }), {
2428
2398
  lines: c,
2429
2399
  totalHeight: u,
2430
2400
  contentWidth: i,
2431
2401
  contentHeight: r,
2432
- cellAutoHeight: u + Et * 2,
2433
- calcAutoWidth: p + a
2402
+ cellAutoHeight: u + Ot * 2,
2403
+ calcAutoWidth: h + a
2434
2404
  };
2435
2405
  }
2436
- const Qr = 8;
2437
- class es extends ua {
2406
+ const Gr = 8;
2407
+ class Zr extends da {
2438
2408
  static drawWith(t, o) {
2439
2409
  const { fontString: n, info: a, fill: i, color: r } = o, { layout: l, text: s } = a;
2440
- t.save(), Jn.drawWith(t, {
2410
+ t.save(), Zn.drawWith(t, {
2441
2411
  width: l.width,
2442
2412
  height: l.height,
2443
- radius: Qr,
2444
- fill: i || Te
2413
+ radius: Gr,
2414
+ fill: i || Fe
2445
2415
  }), t.translateWithPrecision(No, l.ba), t.font = n, t.fillStyle = r, t.fillText(s, 0, 0), t.restore();
2446
2416
  }
2447
2417
  }
2448
- var ts = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, os = (e, t, o, n) => {
2449
- for (var a = n > 1 ? void 0 : n ? ns(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2418
+ var qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Qr = (e, t, o, n) => {
2419
+ for (var a = n > 1 ? void 0 : n ? Jr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2450
2420
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2451
- return n && a && ts(t, o, a), a;
2421
+ return n && a && qr(t, o, a), a;
2452
2422
  }, Yt = (e, t) => (o, n) => t(o, n, e);
2453
- const as = 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");
2454
- let un = class {
2423
+ const es = 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");
2424
+ let cn = class {
2455
2425
  constructor(e, t, o) {
2456
- M(this, "zIndex");
2457
- M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2426
+ y(this, "zIndex");
2427
+ y(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2458
2428
  this._commandService = e, this._renderManagerService = t, this._dataValidationModel = o;
2459
2429
  }
2460
2430
  _ensureMap(e) {
@@ -2465,22 +2435,22 @@ let un = class {
2465
2435
  return `${e}.${t}`;
2466
2436
  }
2467
2437
  _drawDownIcon(e, t, o, n, a) {
2468
- const i = o - Le + 4;
2438
+ const i = o - Te + 4;
2469
2439
  let r = 4;
2470
2440
  switch (a) {
2471
- case ue.MIDDLE:
2472
- r = (n - Le) / 2 + 4;
2441
+ case he.MIDDLE:
2442
+ r = (n - Te) / 2 + 4;
2473
2443
  break;
2474
- case ue.BOTTOM:
2475
- r = n - Le + 4;
2444
+ case he.BOTTOM:
2445
+ r = n - Te + 4;
2476
2446
  break;
2477
2447
  }
2478
- e.save(), e.translateWithPrecision(t.startX + i, t.startY + r), e.fillStyle = "#565656", e.fill(as), e.restore();
2448
+ e.save(), e.translateWithPrecision(t.startX + i, t.startY + r), e.fillStyle = "#565656", e.fill(es), e.restore();
2479
2449
  }
2480
2450
  // eslint-disable-next-line max-lines-per-function
2481
2451
  drawWith(e, t, o, n) {
2482
- var X, k;
2483
- const { primaryWithCoord: a, row: i, col: r, style: l, data: s, subUnitId: c } = t, u = a.isMergedMainCell ? a.mergeInfo : a, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: g = 0, topOffset: f = 0, downOffset: C = 0 } = p || {}, R = this._ensureMap(c), v = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2452
+ var z, H;
2453
+ const { primaryWithCoord: a, row: i, col: r, style: l, data: s, subUnitId: c } = t, u = a.isMergedMainCell ? a.mergeInfo : a, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: v = 0, topOffset: p = 0, downOffset: C = 0 } = h || {}, R = this._ensureMap(c), g = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2484
2454
  if (!w)
2485
2455
  return;
2486
2456
  const I = this._dataValidationModel.getValidator(w.type);
@@ -2488,82 +2458,82 @@ let un = class {
2488
2458
  return;
2489
2459
  const V = {
2490
2460
  startX: u.startX + d,
2491
- endX: u.endX - g,
2492
- startY: u.startY + f,
2461
+ endX: u.endX - v,
2462
+ startY: u.startY + p,
2493
2463
  endY: u.endY - C
2494
- }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, y = (X = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? X : "#000", P = jt(l != null ? l : void 0), { vt: F, ht: T } = l || {}, E = F != null ? F : ue.MIDDLE, A = (k = ie(s)) != null ? k : "", x = I.parseCellValue(A), j = I.getListWithColorMap(w), N = Ht(x, P, _, S);
2495
- this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Le, S), e.clip(), e.translateWithPrecision(cn, Et);
2496
- let H = 0;
2464
+ }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, M = (z = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? z : "#000", P = Ut(l != null ? l : void 0), { vt: U, ht: T } = l || {}, E = U != null ? U : he.MIDDLE, A = (H = re(s)) != null ? H : "", F = I.parseCellValue(A), N = I.getListWithColorMap(w), B = xt(F, P, _, S);
2465
+ this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Te, S), e.clip(), e.translateWithPrecision(dn, Ot);
2466
+ let Y = 0;
2497
2467
  switch (E) {
2498
- case ue.MIDDLE:
2499
- H = (N.contentHeight - N.totalHeight) / 2;
2468
+ case he.MIDDLE:
2469
+ Y = (B.contentHeight - B.totalHeight) / 2;
2500
2470
  break;
2501
- case ue.BOTTOM:
2502
- H = N.contentHeight - N.totalHeight;
2471
+ case he.BOTTOM:
2472
+ Y = B.contentHeight - B.totalHeight;
2503
2473
  break;
2504
2474
  }
2505
- e.translateWithPrecision(0, H), N.lines.forEach((K, q) => {
2475
+ e.translateWithPrecision(0, Y), B.lines.forEach((G, J) => {
2506
2476
  e.save();
2507
- const { width: ee, height: te, items: re } = K;
2508
- let ae = 0;
2477
+ const { width: te, height: ne, items: se } = G;
2478
+ let ie = 0;
2509
2479
  switch (T) {
2510
2480
  case Ye.RIGHT:
2511
- ae = N.contentWidth - ee;
2481
+ ie = B.contentWidth - te;
2512
2482
  break;
2513
2483
  case Ye.CENTER:
2514
- ae = (N.contentWidth - ee) / 2;
2484
+ ie = (B.contentWidth - te) / 2;
2515
2485
  break;
2516
2486
  }
2517
- e.translate(ae, q * (te + Uo)), re.forEach((se) => {
2518
- e.save(), e.translateWithPrecision(se.left, 0), es.drawWith(e, {
2487
+ e.translate(ie, J * (ne + Uo)), se.forEach((le) => {
2488
+ e.save(), e.translateWithPrecision(le.left, 0), Zr.drawWith(e, {
2519
2489
  ...P,
2520
- info: se,
2521
- color: y,
2522
- fill: j[se.text]
2490
+ info: le,
2491
+ color: M,
2492
+ fill: N[le.text]
2523
2493
  }), e.restore();
2524
2494
  }), e.restore();
2525
- }), e.restore(), R.set(v, {
2495
+ }), e.restore(), R.set(g, {
2526
2496
  left: V.startX,
2527
2497
  top: V.startY,
2528
- width: N.contentWidth + cn + Le,
2529
- height: N.contentHeight + Et * 2
2498
+ width: B.contentWidth + dn + Te,
2499
+ height: B.contentHeight + Ot * 2
2530
2500
  });
2531
2501
  }
2532
2502
  calcCellAutoHeight(e) {
2533
2503
  var _;
2534
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, p = t.isMergedMainCell ? t.mergeInfo : t, d = {
2535
- startX: p.startX + l,
2536
- endX: p.endX - s,
2537
- startY: p.startY + c,
2538
- endY: p.endY - u
2539
- }, g = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2540
- if (!g)
2504
+ const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2505
+ startX: h.startX + l,
2506
+ endX: h.endX - s,
2507
+ startY: h.startY + c,
2508
+ endY: h.endY - u
2509
+ }, v = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2510
+ if (!v)
2541
2511
  return;
2542
- const f = this._dataValidationModel.getValidator(g.type);
2543
- if (!f)
2512
+ const p = this._dataValidationModel.getValidator(v.type);
2513
+ if (!p)
2544
2514
  return;
2545
- const C = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), I = jt(o != null ? o : void 0);
2546
- return Ht(w, I, C, R).cellAutoHeight;
2515
+ const C = d.endX - d.startX, R = d.endY - d.startY, g = (_ = re(n)) != null ? _ : "", w = p.parseCellValue(g), I = Ut(o != null ? o : void 0);
2516
+ return xt(w, I, C, R).cellAutoHeight;
2547
2517
  }
2548
2518
  calcCellAutoWidth(e) {
2549
2519
  var _;
2550
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, p = t.isMergedMainCell ? t.mergeInfo : t, d = {
2551
- startX: p.startX + l,
2552
- endX: p.endX - s,
2553
- startY: p.startY + c,
2554
- endY: p.endY - u
2555
- }, g = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2556
- if (!g)
2520
+ const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, h = t.isMergedMainCell ? t.mergeInfo : t, d = {
2521
+ startX: h.startX + l,
2522
+ endX: h.endX - s,
2523
+ startY: h.startY + c,
2524
+ endY: h.endY - u
2525
+ }, v = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2526
+ if (!v)
2557
2527
  return;
2558
- const f = this._dataValidationModel.getValidator(g.type);
2559
- if (!f)
2528
+ const p = this._dataValidationModel.getValidator(v.type);
2529
+ if (!p)
2560
2530
  return;
2561
- const C = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), I = jt(o != null ? o : void 0);
2562
- return Ht(w, I, C, R).calcAutoWidth;
2531
+ const C = d.endX - d.startX, R = d.endY - d.startY, g = (_ = re(n)) != null ? _ : "", w = p.parseCellValue(g), I = Ut(o != null ? o : void 0);
2532
+ return xt(w, I, C, R).calcAutoWidth;
2563
2533
  }
2564
2534
  isHit(e, t) {
2565
2535
  const { primaryWithCoord: o } = t, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = e;
2566
- return i >= a - Le && i <= a;
2536
+ return i >= a - Te && i <= a;
2567
2537
  }
2568
2538
  onPointerDown(e, t) {
2569
2539
  if (t.button === 2)
@@ -2574,57 +2544,57 @@ let un = class {
2574
2544
  row: a,
2575
2545
  column: i
2576
2546
  };
2577
- this._commandService.executeCommand(Tt.id, r);
2547
+ this._commandService.executeCommand(At.id, r);
2578
2548
  }
2579
2549
  onPointerEnter(e, t) {
2580
2550
  var o, n;
2581
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2551
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2582
2552
  }
2583
2553
  onPointerLeave(e, t) {
2584
2554
  var o, n;
2585
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2555
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2586
2556
  }
2587
2557
  };
2588
- un = os([
2589
- Yt(0, Q),
2558
+ cn = Qr([
2559
+ Yt(0, ee),
2590
2560
  Yt(1, b(Ve)),
2591
- Yt(2, b(oe))
2592
- ], un);
2593
- class is extends me {
2561
+ Yt(2, b(ae))
2562
+ ], cn);
2563
+ class ts extends ge {
2594
2564
  constructor() {
2595
2565
  super(...arguments);
2596
- M(this, "id", z.LIST_MULTIPLE);
2597
- M(this, "canvasRender", this.injector.createInstance(un));
2598
- M(this, "dropdown", yn);
2566
+ y(this, "id", K.LIST_MULTIPLE);
2567
+ y(this, "canvasRender", this.injector.createInstance(cn));
2568
+ y(this, "dropdown", Vn);
2599
2569
  }
2600
2570
  }
2601
- var rs = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, ls = (e, t, o, n) => {
2602
- for (var a = n > 1 ? void 0 : n ? ss(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2571
+ var ns = Object.defineProperty, os = Object.getOwnPropertyDescriptor, as = (e, t, o, n) => {
2572
+ for (var a = n > 1 ? void 0 : n ? os(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2603
2573
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2604
- return n && a && rs(t, o, a), a;
2605
- }, pt = (e, t) => (o, n) => t(o, n, e);
2606
- const Oe = 4, ft = 4, he = 14, pe = 6, ke = 4, Xt = 8, ds = "#565656", Hn = 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");
2607
- function cs(e, t) {
2574
+ return n && a && ns(t, o, a), a;
2575
+ }, ft = (e, t) => (o, n) => t(o, n, e);
2576
+ const Pe = 4, mt = 4, pe = 14, fe = 6, xe = 4, Xt = 8, is = "#565656", Hn = 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");
2577
+ function rs(e, t) {
2608
2578
  const o = e.length;
2609
2579
  return {
2610
2580
  id: "d",
2611
2581
  body: {
2612
- dataStream: `${e}${aa}`,
2582
+ dataStream: `${e}${na}`,
2613
2583
  textRuns: [
2614
2584
  {
2615
2585
  ts: {
2616
2586
  fs: 11,
2617
2587
  ff: void 0,
2618
- it: Qe.FALSE,
2619
- bl: Qe.FALSE,
2588
+ it: tt.FALSE,
2589
+ bl: tt.FALSE,
2620
2590
  ul: {
2621
- s: Qe.FALSE
2591
+ s: tt.FALSE
2622
2592
  },
2623
2593
  st: {
2624
- s: Qe.FALSE
2594
+ s: tt.FALSE
2625
2595
  },
2626
2596
  ol: {
2627
- s: Qe.FALSE
2597
+ s: tt.FALSE
2628
2598
  },
2629
2599
  cl: void 0,
2630
2600
  ...t,
@@ -2645,21 +2615,21 @@ function cs(e, t) {
2645
2615
  };
2646
2616
  }
2647
2617
  function Bo(e, t, o) {
2648
- const n = cs(e, o), a = new oa(n), i = new ha(a);
2618
+ const n = rs(e, o), a = new ta(n), i = new ca(a);
2649
2619
  return {
2650
- documentSkeleton: pa.create(i, t),
2620
+ documentSkeleton: ua.create(i, t),
2651
2621
  docModel: a,
2652
2622
  docViewModel: i
2653
2623
  };
2654
2624
  }
2655
- function mt(e, t, o) {
2625
+ function gt(e, t, o) {
2656
2626
  const {
2657
2627
  documentSkeleton: n,
2658
2628
  docModel: a,
2659
2629
  docViewModel: i
2660
2630
  } = Bo(e, t, o);
2661
2631
  return {
2662
- documents: new fa(`DOCUMENTS_${en.generateRandomId()}`, n, {
2632
+ documents: new ha(`DOCUMENTS_${Qt.generateRandomId()}`, n, {
2663
2633
  pageMarginLeft: 0,
2664
2634
  pageMarginTop: 0
2665
2635
  }),
@@ -2668,21 +2638,21 @@ function mt(e, t, o) {
2668
2638
  docViewModel: i
2669
2639
  };
2670
2640
  }
2671
- function Yn(e, t, o, n, a, i, r = !0) {
2641
+ function jn(e, t, o, n, a, i, r = !0) {
2672
2642
  let l = 0;
2673
- const s = r ? ke : 0;
2643
+ const s = r ? xe : 0;
2674
2644
  switch (a) {
2675
- case ue.BOTTOM:
2645
+ case he.BOTTOM:
2676
2646
  l = t - n - s;
2677
2647
  break;
2678
- case ue.MIDDLE:
2648
+ case he.MIDDLE:
2679
2649
  l = (t - n) / 2;
2680
2650
  break;
2681
2651
  default:
2682
2652
  l = s;
2683
2653
  break;
2684
2654
  }
2685
- l = Math.max(ke, l);
2655
+ l = Math.max(xe, l);
2686
2656
  let c = 0;
2687
2657
  switch (i) {
2688
2658
  case Ye.CENTER:
@@ -2692,15 +2662,15 @@ function Yn(e, t, o, n, a, i, r = !0) {
2692
2662
  c = e - o;
2693
2663
  break;
2694
2664
  }
2695
- return c = Math.max(pe, c), {
2665
+ return c = Math.max(fe, c), {
2696
2666
  paddingLeft: c,
2697
2667
  paddingTop: l
2698
2668
  };
2699
2669
  }
2700
- let hn = class {
2670
+ let un = class {
2701
2671
  constructor(e, t, o, n) {
2702
- M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2703
- M(this, "zIndex");
2672
+ y(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2673
+ y(this, "zIndex");
2704
2674
  this._localeService = e, this._commandService = t, this._renderManagerService = o, this._dataValidationModel = n;
2705
2675
  }
2706
2676
  _ensureMap(e) {
@@ -2711,17 +2681,17 @@ let hn = class {
2711
2681
  return `${e}.${t}`;
2712
2682
  }
2713
2683
  _drawDownIcon(e, t, o, n, a, i, r) {
2714
- const { t: l = le.pd.t, b: s = le.pd.b } = r, c = o - he;
2684
+ const { t: l = de.pd.t, b: s = de.pd.b } = r, c = o - pe;
2715
2685
  let u;
2716
2686
  switch (i) {
2717
- case ue.MIDDLE:
2718
- u = (n - ft) / 2;
2687
+ case he.MIDDLE:
2688
+ u = (n - mt) / 2;
2719
2689
  break;
2720
- case ue.BOTTOM:
2721
- u = n - s - a - ke + (a / 2 - ft / 2);
2690
+ case he.BOTTOM:
2691
+ u = n - s - a - xe + (a / 2 - mt / 2);
2722
2692
  break;
2723
2693
  default:
2724
- u = l + ke + (a / 2 - ft / 2);
2694
+ u = l + xe + (a / 2 - mt / 2);
2725
2695
  break;
2726
2696
  }
2727
2697
  e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Hn), e.restore();
@@ -2731,109 +2701,109 @@ let hn = class {
2731
2701
  const { primaryWithCoord: n, row: a, col: i, style: r, data: l, subUnitId: s } = t, c = n.isMergedMainCell ? n.mergeInfo : n, u = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2732
2702
  if (!u)
2733
2703
  return;
2734
- const p = this._dataValidationModel.getValidator(u.type);
2735
- if (!p)
2704
+ const h = this._dataValidationModel.getValidator(u.type);
2705
+ if (!h)
2736
2706
  return;
2737
- const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: g = 0, rightOffset: f = 0, topOffset: C = 0, downOffset: R = 0 } = d || {};
2738
- if (!u || !p || !p || p.id.indexOf(z.LIST) !== 0 || !p.skipDefaultFontRender(u))
2707
+ const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: v = 0, rightOffset: p = 0, topOffset: C = 0, downOffset: R = 0 } = d || {};
2708
+ if (!u || !h || !h || h.id.indexOf(K.LIST) !== 0 || !h.skipDefaultFontRender(u))
2739
2709
  return;
2740
- const v = {
2741
- startX: c.startX + g,
2742
- endX: c.endX - f,
2710
+ const g = {
2711
+ startX: c.startX + v,
2712
+ endX: c.endX - p,
2743
2713
  startY: c.startY + C,
2744
2714
  endY: c.endY - R
2745
- }, w = v.endX - v.startX, I = v.endY - v.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = p.getListWithColor(u), m = ie(l), y = `${m != null ? m : ""}`, P = S.find((x) => x.label === y);
2746
- let { tb: F, vt: T, ht: E, pd: A } = r || {};
2747
- if (F = F != null ? F : Se.WRAP, T = T != null ? T : ue.BOTTOM, E = E != null ? E : le.ht, A = A != null ? A : le.pd, u.renderMode === de.ARROW) {
2748
- const { l: x = le.pd.l, t: j = le.pd.t, r: N = le.pd.r, b: H = le.pd.b } = A, X = w - x - N - he - 4, { documentSkeleton: k, documents: K, docModel: q } = mt(y, this._localeService, r);
2749
- F === Se.WRAP && q.updateDocumentDataPageSize(Math.max(X, 1)), k.calculate(), k.getActualSize();
2750
- const ee = et(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Yn(X, I - j - H, re, te, T, E, !0);
2751
- this._drawDownIcon(e, v, w, I, te, T, A), e.save(), e.translateWithPrecision(v.startX + x, v.startY + j), e.beginPath(), e.rect(0, 0, w - x - N, I - j - H), e.clip(), e.translateWithPrecision(0, ae), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), K.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(_, {
2752
- left: v.endX + x + o.rowHeaderWidth - he,
2753
- top: v.startY + j + o.columnHeaderHeight,
2754
- width: he,
2755
- height: I - j - H
2715
+ }, w = g.endX - g.startX, I = g.endY - g.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = h.getListWithColor(u), m = re(l), M = `${m != null ? m : ""}`, P = S.find((F) => F.label === M);
2716
+ let { tb: U, vt: T, ht: E, pd: A } = r || {};
2717
+ if (U = U != null ? U : Ce.WRAP, T = T != null ? T : he.BOTTOM, E = E != null ? E : de.ht, A = A != null ? A : de.pd, u.renderMode === ce.ARROW) {
2718
+ const { l: F = de.pd.l, t: N = de.pd.t, r: B = de.pd.r, b: Y = de.pd.b } = A, z = w - F - B - pe - 4, { documentSkeleton: H, documents: G, docModel: J } = gt(M, this._localeService, r);
2719
+ U === Ce.WRAP && J.updateDocumentDataPageSize(Math.max(z, 1)), H.calculate(), H.getActualSize();
2720
+ const te = nt(H), { height: ne, width: se } = te, { paddingTop: ie, paddingLeft: le } = jn(z, I - N - Y, se, ne, T, E, !0);
2721
+ this._drawDownIcon(e, g, w, I, ne, T, A), e.save(), e.translateWithPrecision(g.startX + F, g.startY + N), e.beginPath(), e.rect(0, 0, w - F - B, I - N - Y), e.clip(), e.translateWithPrecision(0, ie), e.save(), e.translateWithPrecision(Pe, 0), e.beginPath(), e.rect(0, 0, z, ne), e.clip(), G.render(e), e.translateWithPrecision(le, 0), e.restore(), e.restore(), V.set(_, {
2722
+ left: g.endX + F + o.rowHeaderWidth - pe,
2723
+ top: g.startY + N + o.columnHeaderHeight,
2724
+ width: pe,
2725
+ height: I - N - Y
2756
2726
  });
2757
2727
  } else {
2758
- e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, w, I), e.clip();
2759
- const x = w - pe * 2 - Oe - he - 4, { documentSkeleton: j, documents: N, docModel: H } = mt(y, this._localeService, r);
2760
- F === Se.WRAP && H.updateDocumentDataPageSize(Math.max(x, 1)), j.calculate();
2761
- const X = et(j), { height: k, width: K } = X, { paddingTop: q, paddingLeft: ee } = Yn(x, I, K, k, T, E);
2762
- e.translateWithPrecision(pe, q);
2763
- const te = Math.max(w - pe * 2, 1), re = k;
2764
- Jn.drawWith(e, {
2765
- width: te,
2766
- height: re,
2767
- fill: (P == null ? void 0 : P.color) || Te,
2728
+ e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, w, I), e.clip();
2729
+ const F = w - fe * 2 - Pe - pe - 4, { documentSkeleton: N, documents: B, docModel: Y } = gt(M, this._localeService, r);
2730
+ U === Ce.WRAP && Y.updateDocumentDataPageSize(Math.max(F, 1)), N.calculate();
2731
+ const z = nt(N), { height: H, width: G } = z, { paddingTop: J, paddingLeft: te } = jn(F, I, G, H, T, E);
2732
+ e.translateWithPrecision(fe, J);
2733
+ const ne = Math.max(w - fe * 2, 1), se = H;
2734
+ Zn.drawWith(e, {
2735
+ width: ne,
2736
+ height: se,
2737
+ fill: (P == null ? void 0 : P.color) || Fe,
2768
2738
  radius: Xt
2769
- }), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), N.render(e), e.restore(), e.translateWithPrecision(x + Oe + 4, (k - ft) / 2), e.fillStyle = ds, e.fill(Hn), e.restore(), V.set(_, {
2770
- left: v.startX + pe + o.rowHeaderWidth,
2771
- top: v.startY + q + o.columnHeaderHeight,
2772
- width: te,
2773
- height: re
2739
+ }), e.save(), e.translateWithPrecision(Pe, 0), e.beginPath(), e.rect(0, 0, F, H), e.clip(), e.translateWithPrecision(te, 0), B.render(e), e.restore(), e.translateWithPrecision(F + Pe + 4, (H - mt) / 2), e.fillStyle = is, e.fill(Hn), e.restore(), V.set(_, {
2740
+ left: g.startX + fe + o.rowHeaderWidth,
2741
+ top: g.startY + J + o.columnHeaderHeight,
2742
+ width: ne,
2743
+ height: se
2774
2744
  });
2775
2745
  }
2776
2746
  }
2777
2747
  calcCellAutoHeight(e) {
2778
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2779
- if (!d || d.renderMode === de.TEXT)
2748
+ const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2749
+ if (!d || d.renderMode === ce.TEXT)
2780
2750
  return;
2781
- const g = {
2751
+ const v = {
2782
2752
  startX: r.startX + s,
2783
2753
  endX: r.endX - c,
2784
2754
  startY: r.startY + u,
2785
- endY: r.endY - p
2786
- }, f = g.endX - g.startX, C = ie(n), R = `${C != null ? C : ""}`;
2787
- let { tb: v, pd: w } = o || {};
2788
- const { t: I = le.pd.t, b: V = le.pd.b } = w != null ? w : {};
2789
- if (v = v != null ? v : Se.WRAP, d.renderMode === de.ARROW) {
2790
- const _ = f - he, { documentSkeleton: S, docModel: m } = mt(R, this._localeService, o);
2791
- v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2792
- const y = et(S), { height: P } = y;
2793
- return P + I + V + ke * 2;
2755
+ endY: r.endY - h
2756
+ }, p = v.endX - v.startX, C = re(n), R = `${C != null ? C : ""}`;
2757
+ let { tb: g, pd: w } = o || {};
2758
+ const { t: I = de.pd.t, b: V = de.pd.b } = w != null ? w : {};
2759
+ if (g = g != null ? g : Ce.WRAP, d.renderMode === ce.ARROW) {
2760
+ const _ = p - pe, { documentSkeleton: S, docModel: m } = gt(R, this._localeService, o);
2761
+ g === Ce.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2762
+ const M = nt(S), { height: P } = M;
2763
+ return P + I + V + xe * 2;
2794
2764
  } else {
2795
- const _ = f - pe * 2 - Oe - he, { documentSkeleton: S, docModel: m } = Bo(R, this._localeService, o);
2796
- v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2797
- const y = et(S), {
2765
+ const _ = p - fe * 2 - Pe - pe, { documentSkeleton: S, docModel: m } = Bo(R, this._localeService, o);
2766
+ g === Ce.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2767
+ const M = nt(S), {
2798
2768
  height: P
2799
- } = y;
2800
- return P + ke * 2;
2769
+ } = M;
2770
+ return P + xe * 2;
2801
2771
  }
2802
2772
  }
2803
2773
  calcCellAutoWidth(e) {
2804
- const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2805
- if (!d || d.renderMode === de.TEXT)
2774
+ const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2775
+ if (!d || d.renderMode === ce.TEXT)
2806
2776
  return;
2807
- const g = {
2777
+ const v = {
2808
2778
  startX: r.startX + s,
2809
2779
  endX: r.endX - c,
2810
2780
  startY: r.startY + u,
2811
- endY: r.endY - p
2812
- }, f = g.endX - g.startX, C = ie(n), R = `${C != null ? C : ""}`;
2813
- let { tb: v, pd: w } = o || {};
2814
- const { l: I = le.pd.l, r: V = le.pd.r } = w != null ? w : {};
2815
- v = v != null ? v : Se.WRAP;
2816
- let _ = pe * 2 + he;
2781
+ endY: r.endY - h
2782
+ }, p = v.endX - v.startX, C = re(n), R = `${C != null ? C : ""}`;
2783
+ let { tb: g, pd: w } = o || {};
2784
+ const { l: I = de.pd.l, r: V = de.pd.r } = w != null ? w : {};
2785
+ g = g != null ? g : Ce.WRAP;
2786
+ let _ = fe * 2 + pe;
2817
2787
  switch (d.renderMode) {
2818
- case de.ARROW:
2819
- _ = he + pe * 2 + V + I;
2788
+ case ce.ARROW:
2789
+ _ = pe + fe * 2 + V + I;
2820
2790
  break;
2821
- case de.CUSTOM:
2822
- _ = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2791
+ case ce.CUSTOM:
2792
+ _ = pe + fe * 2 + Pe * 2 + V + I + Xt / 2 + 1;
2823
2793
  break;
2824
2794
  // default is CUSTOM
2825
2795
  default:
2826
- _ = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2796
+ _ = pe + fe * 2 + Pe * 2 + V + I + Xt / 2 + 1;
2827
2797
  }
2828
- const S = f - _, { documentSkeleton: m, docModel: y } = mt(R, this._localeService, o);
2829
- return v === Se.WRAP && y.updateDocumentDataPageSize(Math.max(S, 1)), m.calculate(), m.getActualSize(), et(m).width + _;
2798
+ const S = p - _, { documentSkeleton: m, docModel: M } = gt(R, this._localeService, o);
2799
+ return g === Ce.WRAP && M.updateDocumentDataPageSize(Math.max(S, 1)), m.calculate(), m.getActualSize(), nt(m).width + _;
2830
2800
  }
2831
2801
  isHit(e, t) {
2832
2802
  const { subUnitId: o, row: n, col: a } = t, r = this._ensureMap(o).get(this._generateKey(n, a)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, a);
2833
- if (!l || !r || l.renderMode === de.TEXT)
2803
+ if (!l || !r || l.renderMode === ce.TEXT)
2834
2804
  return !1;
2835
- const { top: s, left: c, width: u, height: p } = r, { x: d, y: g } = e;
2836
- return d >= c && d <= c + u && g >= s && g <= s + p;
2805
+ const { top: s, left: c, width: u, height: h } = r, { x: d, y: v } = e;
2806
+ return d >= c && d <= c + u && v >= s && v <= s + h;
2837
2807
  }
2838
2808
  onPointerDown(e, t) {
2839
2809
  if (t.button === 2)
@@ -2844,66 +2814,66 @@ let hn = class {
2844
2814
  row: a,
2845
2815
  column: i
2846
2816
  };
2847
- this._commandService.executeCommand(Tt.id, r);
2817
+ this._commandService.executeCommand(At.id, r);
2848
2818
  }
2849
2819
  onPointerEnter(e, t) {
2850
2820
  var o, n;
2851
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2821
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.POINTER);
2852
2822
  }
2853
2823
  onPointerLeave(e, t) {
2854
2824
  var o, n;
2855
- (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2825
+ (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(X.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2856
2826
  }
2857
2827
  };
2858
- hn = ls([
2859
- pt(0, b(J)),
2860
- pt(1, Q),
2861
- pt(2, b(Ve)),
2862
- pt(3, b(oe))
2863
- ], hn);
2864
- class us extends me {
2828
+ un = as([
2829
+ ft(0, b(Q)),
2830
+ ft(1, ee),
2831
+ ft(2, b(Ve)),
2832
+ ft(3, b(ae))
2833
+ ], un);
2834
+ class ss extends ge {
2865
2835
  constructor() {
2866
2836
  super(...arguments);
2867
- M(this, "id", z.LIST);
2868
- M(this, "canvasRender", this.injector.createInstance(hn));
2869
- M(this, "dropdown", yn);
2870
- M(this, "optionsInput", Mt.componentKey);
2871
- M(this, "formulaInput", Mn);
2837
+ y(this, "id", K.LIST);
2838
+ y(this, "canvasRender", this.injector.createInstance(un));
2839
+ y(this, "dropdown", Vn);
2840
+ y(this, "optionsInput", bt.componentKey);
2841
+ y(this, "formulaInput", Mn);
2872
2842
  }
2873
2843
  }
2874
- class hs extends me {
2844
+ class ls extends ge {
2875
2845
  constructor() {
2876
2846
  super(...arguments);
2877
- M(this, "id", z.TEXT_LENGTH);
2878
- M(this, "formulaInput", xt);
2847
+ y(this, "id", K.TEXT_LENGTH);
2848
+ y(this, "formulaInput", Nt);
2879
2849
  }
2880
2850
  }
2881
- class ps extends me {
2851
+ class ds extends ge {
2882
2852
  constructor() {
2883
2853
  super(...arguments);
2884
- M(this, "id", z.WHOLE);
2885
- M(this, "formulaInput", xt);
2854
+ y(this, "id", K.WHOLE);
2855
+ y(this, "formulaInput", Nt);
2886
2856
  }
2887
2857
  }
2888
- var fs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, gs = (e, t, o, n) => {
2889
- for (var a = n > 1 ? void 0 : n ? ms(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2858
+ var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, hs = (e, t, o, n) => {
2859
+ for (var a = n > 1 ? void 0 : n ? us(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2890
2860
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2891
- return n && a && fs(t, o, a), a;
2861
+ return n && a && cs(t, o, a), a;
2892
2862
  }, zt = (e, t) => (o, n) => t(o, n, e);
2893
- let qe = class extends fn {
2863
+ let Qe = class extends pn {
2894
2864
  constructor(e, t, o) {
2895
2865
  super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = o, this._initComponents(), this._registerValidatorViews();
2896
2866
  }
2897
2867
  _initComponents() {
2898
2868
  [
2899
- [Lo, wo],
2900
- [Dt, Ji],
2901
- [Mo, vi],
2902
- [yn, Li],
2903
- [Oo, ni],
2904
- [Mt.componentKey, Mt],
2869
+ [Eo, Co],
2870
+ [Vt, Ki],
2871
+ [Vo, pi],
2872
+ [Vn, yi],
2873
+ [bo, Ja],
2905
2874
  [bt.componentKey, bt],
2906
- ...jr
2875
+ [Et.componentKey, Et],
2876
+ ...Pr
2907
2877
  ].forEach(([e, t]) => {
2908
2878
  this.disposeWithMe(this._componentManger.register(
2909
2879
  e,
@@ -2913,145 +2883,145 @@ let qe = class extends fn {
2913
2883
  }
2914
2884
  _registerValidatorViews() {
2915
2885
  [
2916
- Zr,
2917
- ps,
2918
- hs,
2919
- Gr,
2920
2886
  Xr,
2921
- us,
2922
- is,
2923
- zr
2887
+ ds,
2888
+ ls,
2889
+ Yr,
2890
+ Hr,
2891
+ ss,
2892
+ ts,
2893
+ jr
2924
2894
  ].forEach((e) => {
2925
2895
  const t = this._injector.createInstance(e), o = this._dataValidatorRegistryService.getValidatorItem(t.id);
2926
2896
  o && (o.formulaInput = t.formulaInput, o.canvasRender = t.canvasRender, o.dropdown = t.dropdown, o.optionsInput = t.optionsInput);
2927
2897
  });
2928
2898
  }
2929
2899
  };
2930
- qe = gs([
2931
- zt(0, b(Fe)),
2932
- zt(1, b(Lt)),
2933
- zt(2, b(ye))
2934
- ], qe);
2935
- var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (e, t, o, n) => {
2936
- for (var a = n > 1 ? void 0 : n ? _s(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2900
+ Qe = hs([
2901
+ zt(0, b($e)),
2902
+ zt(1, b(Pt)),
2903
+ zt(2, b(be))
2904
+ ], Qe);
2905
+ var ps = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, ms = (e, t, o, n) => {
2906
+ for (var a = n > 1 ? void 0 : n ? fs(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2937
2907
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2938
- return n && a && vs(t, o, a), a;
2908
+ return n && a && ps(t, o, a), a;
2939
2909
  }, Kt = (e, t) => (o, n) => t(o, n, e);
2940
- const Cs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2941
- var gt;
2942
- let Xn = (gt = class extends Zn {
2943
- constructor(e = Vt, t, o, n) {
2910
+ const gs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2911
+ var vt;
2912
+ let xn = (vt = class extends Kn {
2913
+ constructor(e = Mt, t, o, n) {
2944
2914
  super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
2945
- const { menu: a, ...i } = qn(
2915
+ const { menu: a, ...i } = Gn(
2946
2916
  {},
2947
- Vt,
2917
+ Mt,
2948
2918
  this._config
2949
2919
  );
2950
- a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
2920
+ a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
2951
2921
  }
2952
2922
  onStarting() {
2953
2923
  [
2954
- [fe],
2955
- [Ie],
2956
- [lt],
2957
- [ze],
2958
- [Ze],
2924
+ [me],
2925
+ [Re],
2926
+ [dt],
2959
2927
  [Ge],
2960
- [Ke],
2961
- [st],
2962
- [qe]
2928
+ [Je],
2929
+ [qe],
2930
+ [Ze],
2931
+ [lt],
2932
+ [Qe]
2963
2933
  ].forEach((e) => {
2964
2934
  this._injector.add(e);
2965
2935
  }), [
2936
+ Ft,
2966
2937
  At,
2967
- Tt,
2968
- Eo,
2969
- Dn,
2970
- Ue,
2971
- bo
2938
+ yo,
2939
+ Rn,
2940
+ We,
2941
+ Mo
2972
2942
  ].forEach((e) => {
2973
2943
  this._commandService.registerCommand(e);
2974
2944
  });
2975
2945
  }
2976
2946
  onReady() {
2977
- this._injector.get(Ke), this._injector.get(Ge), this._injector.get(st), this._injector.get(lt), this._injector.get(Ve).registerRenderModule(
2978
- Y.UNIVER_SHEET,
2947
+ this._injector.get(Ze), this._injector.get(qe), this._injector.get(lt), this._injector.get(dt), this._injector.get(Ve).registerRenderModule(
2948
+ X.UNIVER_SHEET,
2979
2949
  [yt]
2980
2950
  );
2981
2951
  }
2982
2952
  onRendered() {
2983
- this._injector.get(qe), this._injector.get(Ze);
2953
+ this._injector.get(Qe), this._injector.get(Je);
2984
2954
  }
2985
2955
  onSteady() {
2986
- this._injector.get(ze);
2987
- }
2988
- }, M(gt, "pluginName", Cs), M(gt, "type", Y.UNIVER_SHEET), gt);
2989
- Xn = Ss([
2990
- Kt(1, b(Fe)),
2991
- Kt(2, Q),
2992
- Kt(3, pn)
2993
- ], Xn);
2994
- var Is = Object.defineProperty, ws = Object.getOwnPropertyDescriptor, Rs = (e, t, o, n) => {
2995
- for (var a = n > 1 ? void 0 : n ? ws(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2956
+ this._injector.get(Ge);
2957
+ }
2958
+ }, y(vt, "pluginName", gs), y(vt, "type", X.UNIVER_SHEET), vt);
2959
+ xn = ms([
2960
+ Kt(1, b($e)),
2961
+ Kt(2, ee),
2962
+ Kt(3, hn)
2963
+ ], xn);
2964
+ var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (e, t, o, n) => {
2965
+ for (var a = n > 1 ? void 0 : n ? _s(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2996
2966
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2997
- return n && a && Is(t, o, a), a;
2967
+ return n && a && vs(t, o, a), a;
2998
2968
  }, Gt = (e, t) => (o, n) => t(o, n, e);
2999
- const Ds = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3000
- var vt;
3001
- let zn = (vt = class extends Zn {
3002
- constructor(e = Vt, t, o, n) {
2969
+ const Cs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2970
+ var _t;
2971
+ let Yn = (_t = class extends Kn {
2972
+ constructor(e = Mt, t, o, n) {
3003
2973
  super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
3004
- const { menu: a, ...i } = qn(
2974
+ const { menu: a, ...i } = Gn(
3005
2975
  {},
3006
- Vt,
2976
+ Mt,
3007
2977
  this._config
3008
2978
  );
3009
- a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
2979
+ a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
3010
2980
  }
3011
2981
  onStarting() {
3012
2982
  [
3013
- [fe],
3014
- [Ie],
3015
- [lt],
3016
- [ze],
3017
- [Ze],
2983
+ [me],
2984
+ [Re],
2985
+ [dt],
3018
2986
  [Ge],
3019
- [Ke],
3020
- [qe]
2987
+ [Je],
2988
+ [qe],
2989
+ [Ze],
2990
+ [Qe]
3021
2991
  ].forEach((e) => {
3022
2992
  this._injector.add(e);
3023
2993
  }), [
2994
+ Ft,
3024
2995
  At,
3025
- Tt,
3026
- Eo,
3027
- Dn,
3028
- Ue,
3029
- bo
2996
+ yo,
2997
+ Rn,
2998
+ We,
2999
+ Mo
3030
3000
  ].forEach((e) => {
3031
3001
  this._commandService.registerCommand(e);
3032
3002
  });
3033
3003
  }
3034
3004
  onReady() {
3035
- this._injector.get(Ke), this._injector.get(Ge), this._injector.get(Ve).registerRenderModule(
3036
- Y.UNIVER_SHEET,
3005
+ this._injector.get(Ze), this._injector.get(qe), this._injector.get(Ve).registerRenderModule(
3006
+ X.UNIVER_SHEET,
3037
3007
  [yt]
3038
3008
  );
3039
3009
  }
3040
3010
  onRendered() {
3041
- this._injector.get(qe), this._injector.get(Ze);
3011
+ this._injector.get(Qe), this._injector.get(Je);
3042
3012
  }
3043
3013
  onSteady() {
3044
- this._injector.get(ze);
3045
- }
3046
- }, M(vt, "pluginName", Ds), M(vt, "type", Y.UNIVER_SHEET), vt);
3047
- zn = Rs([
3048
- Gt(1, b(Fe)),
3049
- Gt(2, Q),
3050
- Gt(3, pn)
3051
- ], zn);
3014
+ this._injector.get(Ge);
3015
+ }
3016
+ }, y(_t, "pluginName", Cs), y(_t, "type", X.UNIVER_SHEET), _t);
3017
+ Yn = Ss([
3018
+ Gt(1, b($e)),
3019
+ Gt(2, ee),
3020
+ Gt(3, hn)
3021
+ ], Yn);
3052
3022
  export {
3053
- Oo as DATE_DROPDOWN_KEY,
3054
- yn as LIST_DROPDOWN_KEY,
3055
- zn as UniverSheetsDataValidationMobileUIPlugin,
3056
- Xn as UniverSheetsDataValidationUIPlugin
3023
+ bo as DATE_DROPDOWN_KEY,
3024
+ Vn as LIST_DROPDOWN_KEY,
3025
+ Yn as UniverSheetsDataValidationMobileUIPlugin,
3026
+ xn as UniverSheetsDataValidationUIPlugin
3057
3027
  };