@univerjs/sheets-data-validation-ui 0.4.2-nightly.202411081606 → 0.4.2-nightly.202411091134

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