@univerjs/sheets-data-validation-ui 0.6.1-nightly.202502231605 → 0.6.1-nightly.202502251606

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