@univerjs/sheets-data-validation-ui 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -3,13 +3,13 @@ var Wo = (e, t, o) => t in e ? ko(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var M = (e, t, o) => Wo(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import Zt, { useState as W, forwardRef as we, useRef as He, createElement as Re, useMemo as Ae, useEffect as Ce } from "react";
5
5
  import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as it, useDependency as L, ICommandService as Q, dayjs as qt, numfmt as Jt, CellValueType as Ho, UniverInstanceType as Y, toDisposable as Yo, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xo, DisposableCollection as zo, CommandType as Je, BuildTextUtils as Ko, DataValidationRenderMode as de, DataValidationType as z, IConfigService as hn, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, debounce as Jo, shallowEqual as Mn, Injector as Ne, DataValidationStatus as rt, ObjectMatrix as _t, Range as Qo, Rectangle as St, queryObjectMatrix as Qt, Optional as ea, RxDisposable as pn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as ta, isFormulaString as Pe, Tools as en, ThemeService as na, VerticalAlign as ue, HorizontalAlign as Ye, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as oa, DEFAULT_EMPTY_DOCUMENT_VALUE as aa, BooleanNumber as Qe, Plugin as Gn, merge as Zn } from "@univerjs/core";
6
- import { Button as Fe, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as mn, Radio as xe, Checkbox as Ot, Input as je, Select as tn, DraggableList as sa } from "@univerjs/design";
7
- import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as qn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as ma } from "@univerjs/engine-render";
8
- import { SheetInterceptorService as fn, AFTER_CELL_EDIT_ASYNC as fa, SetRangeValuesCommand as gn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as eo, InterceptCellContentPriority as to } from "@univerjs/sheets";
9
- import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as no, serializeListOptions as oo, UpdateSheetDataValidationRangeCommand as ao, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as io, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as ro, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as so, getDataValidationDiffMutations as an, DataValidationCacheService as lo, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as On, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
6
+ import { Button as Fe, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as fn, Radio as xe, Checkbox as Ot, Input as je, Select as tn, DraggableList as sa } from "@univerjs/design";
7
+ import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as qn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as fa } from "@univerjs/engine-render";
8
+ import { SheetInterceptorService as mn, AFTER_CELL_EDIT_ASYNC as ma, SetRangeValuesCommand as gn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, SheetPermissionCheckController as eo, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as to, InterceptCellContentPriority as no } from "@univerjs/sheets";
9
+ import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as oo, serializeListOptions as ao, UpdateSheetDataValidationRangeCommand as io, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as ro, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as so, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as lo, getDataValidationDiffMutations as an, DataValidationCacheService as co, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as On, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
10
10
  import { getPatternType as Va } from "@univerjs/sheets-numfmt";
11
- import { SetCellEditVisibleOperation as co, SheetCanvasPopManagerService as ya, IEditorBridgeService as uo, SheetPermissionInterceptorBaseController as ho, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Ln, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Pn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as po, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
12
- import { IDialogService as ja, KeyCode as sn, ISidebarService as mo, useObservable as Ue, ComponentManager as Lt, IZenZoneService as fo, RectPopup as Fa, useEvent as go, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
11
+ import { SetCellEditVisibleOperation as uo, SheetCanvasPopManagerService as ya, IEditorBridgeService as ho, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Ln, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Pn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as po, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
12
+ import { IDialogService as ja, KeyCode as sn, ISidebarService as fo, useObservable as Ue, ComponentManager as Lt, IZenZoneService as mo, RectPopup as Fa, useEvent as go, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
13
  import { DataValidatorRegistryService as ye, DataValidationModel as Pt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as Tn, getRuleSetting as An } from "@univerjs/data-validation";
14
14
  import { RichTextEditingMutation as Wa } from "@univerjs/docs";
15
15
  import { filter as Cn, BehaviorSubject as xn, distinctUntilChanged as Ha, Subject as Ya, debounceTime as In, bufferTime as vo } from "rxjs";
@@ -31,11 +31,11 @@ function Ka() {
31
31
  jn = 1;
32
32
  var e = Zt, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
33
33
  function r(l, s, c) {
34
- var u, p = {}, d = null, f = null;
35
- c !== void 0 && (d = "" + c), s.key !== void 0 && (d = "" + s.key), s.ref !== void 0 && (f = s.ref);
34
+ var u, p = {}, d = null, g = null;
35
+ c !== void 0 && (d = "" + c), s.key !== void 0 && (d = "" + s.key), s.ref !== void 0 && (g = s.ref);
36
36
  for (u in s) n.call(s, u) && !i.hasOwnProperty(u) && (p[u] = s[u]);
37
37
  if (l && l.defaultProps) for (u in s = l.defaultProps, s) p[u] === void 0 && (p[u] = s[u]);
38
- return { $$typeof: t, type: l, key: d, ref: f, props: p, _owner: a.current };
38
+ return { $$typeof: t, type: l, key: d, ref: g, props: p, _owner: a.current };
39
39
  }
40
40
  return nt.Fragment = o, nt.jsx = r, nt.jsxs = r, nt;
41
41
  }
@@ -54,10 +54,10 @@ let st = class extends De {
54
54
  }
55
55
  _initEditorBridgeInterceptor() {
56
56
  this._sheetInterceptorService.writeCellInterceptor.intercept(
57
- fa,
57
+ ma,
58
58
  {
59
59
  handler: async (e, t, o) => {
60
- var _;
60
+ var I;
61
61
  const n = await e, { worksheet: a, row: i, col: r, unitId: l, subUnitId: s, workbook: c } = t, u = this._dataValidationModel.getRuleIdByLocation(l, s, i, r), p = u ? this._dataValidationModel.getRuleById(l, s, u) : void 0;
62
62
  if (!p || p.errorStyle !== it.STOP)
63
63
  return o(Promise.resolve(n));
@@ -65,7 +65,7 @@ let st = class extends De {
65
65
  if (!d || await d.validator(
66
66
  {
67
67
  value: ie(n),
68
- interceptValue: ie((_ = t == null ? void 0 : t.origin) != null ? _ : n),
68
+ interceptValue: ie((I = t == null ? void 0 : t.origin) != null ? I : n),
69
69
  row: i,
70
70
  column: r,
71
71
  unitId: l,
@@ -77,7 +77,7 @@ let st = class extends De {
77
77
  p
78
78
  ))
79
79
  return o(Promise.resolve(n));
80
- const m = a.getCellRaw(i, r);
80
+ const f = a.getCellRaw(i, r);
81
81
  return this._dialogService.open({
82
82
  width: 368,
83
83
  title: {
@@ -100,7 +100,7 @@ let st = class extends De {
100
100
  onClose: () => {
101
101
  this._dialogService.close("reject-input-dialog");
102
102
  }
103
- }), o(Promise.resolve(m));
103
+ }), o(Promise.resolve(f));
104
104
  }
105
105
  }
106
106
  );
@@ -132,7 +132,7 @@ let st = class extends De {
132
132
  }
133
133
  };
134
134
  st = Ja([
135
- ot(0, b(fn)),
135
+ ot(0, b(mn)),
136
136
  ot(1, b(oe)),
137
137
  ot(2, b(ye)),
138
138
  ot(3, ja),
@@ -151,20 +151,20 @@ const Qa = "univer-dv-date-dropdown", ei = "univer-dv-date-dropdown-btns", Nn =
151
151
  return t;
152
152
  };
153
153
  function ni(e) {
154
- var v;
155
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(Q), u = L(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), f = ti(d), [m, _] = W(f), w = m && m.isValid() ? m : qt(), S = L(J), R = L(oe), I = R.getRuleByLocation(r, l, a, i);
156
- if (!I)
154
+ var m;
155
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(Q), u = L(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), g = ti(d), [f, I] = W(g), R = f && f.isValid() ? f : qt(), v = L(J), w = L(oe), C = w.getRuleByLocation(r, l, a, i);
156
+ if (!C)
157
157
  return null;
158
- const V = R.getValidator(I.type);
158
+ const V = w.getValidator(C.type);
159
159
  if (!p || !V)
160
160
  return;
161
- const C = !!((v = I.bizInfo) != null && v.showTime), g = async () => {
162
- var x, j, F;
163
- if (!w)
161
+ const _ = !!((m = C.bizInfo) != null && m.showTime), S = async () => {
162
+ var x, j, N;
163
+ if (!R)
164
164
  return;
165
- const P = w.format(C ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (x = Jt.parseDate(P)) == null ? void 0 : x.v, T = s.getStyles().getStyleByCell(p), E = (F = (j = T == null ? void 0 : T.n) == null ? void 0 : j.pattern) != null ? F : "", A = Va(E);
166
- I.errorStyle !== it.STOP || await V.validator({
167
- value: U,
165
+ const P = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), F = (x = Jt.parseDate(P)) == null ? void 0 : x.v, T = s.getStyles().getStyleByCell(p), E = (N = (j = T == null ? void 0 : T.n) == null ? void 0 : j.pattern) != null ? N : "", A = Va(E);
166
+ C.errorStyle !== it.STOP || await V.validator({
167
+ value: F,
168
168
  unitId: r,
169
169
  subUnitId: l,
170
170
  row: a,
@@ -173,7 +173,7 @@ function ni(e) {
173
173
  workbook: s,
174
174
  interceptValue: P.replace("Z", "").replace("T", " "),
175
175
  t: Ho.NUMBER
176
- }, I) ? (o(), await c.executeCommand(co.id, {
176
+ }, C) ? (o(), await c.executeCommand(uo.id, {
177
177
  visible: !1,
178
178
  eventType: nn.Keyboard,
179
179
  unitId: r,
@@ -188,36 +188,36 @@ function ni(e) {
188
188
  endRow: a
189
189
  },
190
190
  value: {
191
- v: U,
191
+ v: F,
192
192
  t: 2,
193
193
  p: null,
194
194
  f: null,
195
195
  si: null,
196
196
  s: {
197
197
  n: {
198
- pattern: C ? A === "datetime" ? E : "yyyy-MM-dd hh:mm:ss" : A === "date" ? E : "yyyy-MM-dd"
198
+ pattern: _ ? A === "datetime" ? E : "yyyy-MM-dd hh:mm:ss" : A === "date" ? E : "yyyy-MM-dd"
199
199
  }
200
200
  }
201
201
  }
202
- })) : u.showReject(V.getRuleFinalError(I, { row: a, col: i, unitId: r, subUnitId: l }));
202
+ })) : u.showReject(V.getRuleFinalError(C, { row: a, col: i, unitId: r, subUnitId: l }));
203
203
  };
204
204
  return /* @__PURE__ */ h.jsxs("div", { className: Nn.dvDateDropdown, children: [
205
205
  /* @__PURE__ */ h.jsx(
206
206
  ia,
207
207
  {
208
- defaultValue: w,
209
- pickerValue: w,
210
- showTime: C || void 0,
208
+ defaultValue: R,
209
+ pickerValue: R,
210
+ showTime: _ || void 0,
211
211
  onSelect: async (y) => {
212
- _(y);
212
+ I(y);
213
213
  },
214
214
  onPanelChange: (y) => {
215
- _(y);
215
+ I(y);
216
216
  },
217
217
  disabledDate: (y) => !Jt.parseDate(y.format("YYYY-MM-DD"))
218
218
  }
219
219
  ),
220
- /* @__PURE__ */ h.jsx("div", { className: Nn.dvDateDropdownBtns, children: /* @__PURE__ */ h.jsx(Fe, { size: "small", type: "primary", onClick: g, disabled: !w.isValid(), children: S.t("dataValidation.alert.ok") }) })
220
+ /* @__PURE__ */ h.jsx("div", { className: Nn.dvDateDropdownBtns, children: /* @__PURE__ */ h.jsx(Fe, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: v.t("dataValidation.alert.ok") }) })
221
221
  ] });
222
222
  }
223
223
  var ce = function() {
@@ -319,12 +319,12 @@ var pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
319
319
  }));
320
320
  });
321
321
  yo.displayName = "SequenceSingle";
322
- var mi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, gi = (e, t, o, n) => {
323
- for (var a = n > 1 ? void 0 : n ? fi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
322
+ var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, gi = (e, t, o, n) => {
323
+ for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
324
324
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
325
- return n && a && mi(t, o, a), a;
325
+ return n && a && fi(t, o, a), a;
326
326
  }, Un = (e, t) => (o, n) => t(o, n, e);
327
- let me = class extends De {
327
+ let fe = class extends De {
328
328
  constructor(t, o) {
329
329
  super();
330
330
  M(this, "_open$", new xn(!1));
@@ -369,10 +369,10 @@ let me = class extends De {
369
369
  this._activeRule = t, this._activeRule$.next(t);
370
370
  }
371
371
  };
372
- me = gi([
372
+ fe = gi([
373
373
  Un(0, ge),
374
- Un(1, mo)
375
- ], me);
374
+ Un(1, fo)
375
+ ], fe);
376
376
  function vi() {
377
377
  const e = L(Ie), t = Ue(e.activeDropdown$, e.activeDropdown), o = L(Lt);
378
378
  if (!t)
@@ -501,7 +501,7 @@ Ie = Ci([
501
501
  be(0, b(ya)),
502
502
  be(1, ge),
503
503
  be(2, b(ye)),
504
- be(3, fo),
504
+ be(3, mo),
505
505
  be(4, Ve),
506
506
  be(5, b(oe)),
507
507
  be(6, b(Jn))
@@ -512,7 +512,7 @@ const Dt = "DataValidationPanel", Be = {
512
512
  handler(e, t) {
513
513
  if (!t)
514
514
  return !1;
515
- const { ruleId: o, isAdd: n } = t, a = e.get(me), i = e.get(Pt), r = e.get(ge), l = e.get(mo), s = Qn(r);
515
+ const { ruleId: o, isAdd: n } = t, a = e.get(fe), i = e.get(Pt), r = e.get(ge), l = e.get(fo), s = Qn(r);
516
516
  if (!s) return !1;
517
517
  const { unitId: c, subUnitId: u } = s, p = o ? i.getRuleById(c, u, o) : void 0;
518
518
  a.open(), a.setActiveRule(p && {
@@ -533,13 +533,13 @@ const Dt = "DataValidationPanel", Be = {
533
533
  id: "data-validation.operation.close-validation-panel",
534
534
  type: Je.OPERATION,
535
535
  handler(e) {
536
- return e.get(me).close(), !0;
536
+ return e.get(fe).close(), !0;
537
537
  }
538
538
  }, bo = {
539
539
  id: "data-validation.operation.toggle-validation-panel",
540
540
  type: Je.OPERATION,
541
541
  handler(e) {
542
- const t = e.get(Q), o = e.get(me);
542
+ const t = e.get(Q), o = e.get(fe);
543
543
  return o.open(), o.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(Be.id), !0;
544
544
  }
545
545
  }, Tt = {
@@ -573,53 +573,53 @@ const Dt = "DataValidationPanel", Be = {
573
573
  dvListDropdownSplit: bi,
574
574
  dvListDropdownEdit: Ei
575
575
  }, Oi = (e) => {
576
- var C, g;
577
- const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(J), p = L(hn), d = s == null ? void 0 : s.toLowerCase(), { row: f, col: m, unitId: _, subUnitId: w } = c, S = a.filter((v) => d ? v.label.toLowerCase().includes(d) : !0), R = (g = (C = p.getConfig(Dn)) == null ? void 0 : C.showEditOnDropdown) != null ? g : !0, I = L(ho), V = Ae(() => I.permissionCheckWithRanges(
576
+ var _, S;
577
+ const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(J), p = L(hn), d = s == null ? void 0 : s.toLowerCase(), { row: g, col: f, unitId: I, subUnitId: R } = c, v = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = p.getConfig(Dn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, C = L(eo), V = Ae(() => C.permissionCheckWithRanges(
578
578
  {
579
579
  workbookTypes: [Ct],
580
580
  rangeTypes: [It],
581
581
  worksheetTypes: [wt]
582
582
  },
583
- [{ startColumn: m, startRow: f, endColumn: m, endRow: f }],
584
- _,
585
- w
586
- ), [I, m, f, _, w]);
583
+ [{ startColumn: f, startRow: g, endColumn: f, endRow: g }],
584
+ I,
585
+ R
586
+ ), [C, f, g, I, R]);
587
587
  return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdown, style: l, children: [
588
588
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownTitle, children: i }),
589
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownList, children: /* @__PURE__ */ h.jsx(ra, { children: /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownListContainer, children: S.map((v, y) => {
590
- const P = t.indexOf(v.value) > -1, U = () => {
589
+ /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownList, children: /* @__PURE__ */ h.jsx(ra, { children: /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownListContainer, children: v.map((m, y) => {
590
+ const P = t.indexOf(m.value) > -1, F = () => {
591
591
  let E;
592
- P ? E = new Set(t.filter((x) => x !== v.value)) : E = new Set(n ? [...t, v.value] : [v.value]);
592
+ P ? E = new Set(t.filter((x) => x !== m.value)) : E = new Set(n ? [...t, m.value] : [m.value]);
593
593
  const A = [];
594
594
  a.forEach((x) => {
595
595
  E.has(x.value) && A.push(x.value);
596
596
  }), o(A);
597
- }, T = v.label.toLocaleLowerCase().indexOf(d);
598
- return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdownItemContainer, onClick: U, children: [
599
- /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownItem, style: { background: v.color || Te }, children: d && v.label.toLowerCase().includes(d) ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
600
- /* @__PURE__ */ h.jsx("span", { children: v.label.substring(0, T) }),
601
- /* @__PURE__ */ h.jsx("span", { style: { fontWeight: "bold" }, children: v.label.substring(T, T + d.length) }),
602
- /* @__PURE__ */ h.jsx("span", { children: v.label.substring(T + d.length) })
603
- ] }) : v.label }),
597
+ }, T = m.label.toLocaleLowerCase().indexOf(d);
598
+ return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdownItemContainer, onClick: F, children: [
599
+ /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownItem, style: { background: m.color || Te }, children: d && m.label.toLowerCase().includes(d) ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
600
+ /* @__PURE__ */ h.jsx("span", { children: m.label.substring(0, T) }),
601
+ /* @__PURE__ */ h.jsx("span", { style: { fontWeight: "bold" }, children: m.label.substring(T, T + d.length) }),
602
+ /* @__PURE__ */ h.jsx("span", { children: m.label.substring(T + d.length) })
603
+ ] }) : m.label }),
604
604
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownSelectedIcon, children: P ? /* @__PURE__ */ h.jsx(Io, {}) : null })
605
605
  ] }, y);
606
606
  }) }) }, s) }),
607
- R && V ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
607
+ w && V ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
608
608
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownSplit }),
609
609
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownEdit, children: /* @__PURE__ */ h.jsx("a", { onClick: r, children: u.t("dataValidation.list.edit") }) })
610
610
  ] }) : null
611
611
  ] });
612
612
  };
613
613
  function Li(e) {
614
- var j, F, H, X;
615
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [f, m] = W(""), _ = L(uo), w = L(ge), S = Ae(() => s.ruleChange$.pipe(In(16)), []), R = L(oe);
616
- Ue(S);
617
- const I = Fa.useContext(), V = ((F = (j = I.current) == null ? void 0 : j.right) != null ? F : 0) - ((X = (H = I.current) == null ? void 0 : H.left) != null ? X : 0);
614
+ var j, N, H, X;
615
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [g, f] = W(""), I = L(ho), R = L(ge), v = Ae(() => s.ruleChange$.pipe(In(16)), []), w = L(oe);
616
+ Ue(v);
617
+ const C = Fa.useContext(), V = ((N = (j = C.current) == null ? void 0 : j.right) != null ? N : 0) - ((X = (H = C.current) == null ? void 0 : H.left) != null ? X : 0);
618
618
  if (Ce(() => {
619
619
  const k = p.onCommandExecuted((K) => {
620
620
  var q, ee;
621
621
  if (K.id === Wa.id) {
622
- const te = K.params, { unitId: re } = te, ae = w.getUnit(re, Y.UNIVER_DOC);
622
+ const te = K.params, { unitId: re } = te, ae = R.getUnit(re, Y.UNIVER_DOC);
623
623
  if (!ae)
624
624
  return;
625
625
  const se = Ko.transform.getPlainText((ee = (q = ae.getSnapshot().body) == null ? void 0 : q.dataStream) != null ? ee : "");
@@ -629,22 +629,22 @@ function Li(e) {
629
629
  return () => {
630
630
  k.dispose();
631
631
  };
632
- }, [p, w]), !n)
632
+ }, [p, R]), !n)
633
633
  return null;
634
- const C = R.getRuleByLocation(r, l, a, i);
635
- if (!C)
634
+ const _ = w.getRuleByLocation(r, l, a, i);
635
+ if (!_)
636
636
  return null;
637
- const g = R.getValidator(C.type);
638
- if (!g)
637
+ const S = w.getValidator(_.type);
638
+ if (!S)
639
639
  return null;
640
- const v = n.getCell(a, i), y = (C == null ? void 0 : C.renderMode) === de.CUSTOM || (C == null ? void 0 : C.renderMode) === void 0;
641
- if (!v || !C || !g || g.id.indexOf(z.LIST) !== 0)
640
+ const m = n.getCell(a, i), y = (_ == null ? void 0 : _.renderMode) === de.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
641
+ if (!m || !_ || !S || S.id.indexOf(z.LIST) !== 0)
642
642
  return;
643
- const P = C.type === z.LIST_MULTIPLE, U = g.getListWithColor(C, r, l), T = f || va(n.getCellRaw(a, i)), E = no(T), A = () => {
643
+ const P = _.type === z.LIST_MULTIPLE, F = S.getListWithColor(_, r, l), T = g || va(n.getCellRaw(a, i)), E = oo(T), A = () => {
644
644
  p.executeCommand(Be.id, {
645
- ruleId: C.uid
645
+ ruleId: _.uid
646
646
  }), o();
647
- }, x = U.map((k) => ({
647
+ }, x = F.map((k) => ({
648
648
  label: k.label,
649
649
  value: k.label,
650
650
  color: y || k.color ? k.color : "transparent"
@@ -657,7 +657,7 @@ function Li(e) {
657
657
  value: E,
658
658
  multiple: P,
659
659
  onChange: async (k) => {
660
- const K = oo(k), q = {
660
+ const K = ao(k), q = {
661
661
  unitId: r,
662
662
  subUnitId: l,
663
663
  range: {
@@ -673,12 +673,12 @@ function Li(e) {
673
673
  si: null
674
674
  }
675
675
  };
676
- _.isVisible() && _.changeVisible({
676
+ I.isVisible() && I.changeVisible({
677
677
  visible: !1,
678
678
  keycode: sn.ESC,
679
679
  eventType: nn.Keyboard,
680
680
  unitId: r
681
- }), m(K), P || o(), _.isVisible().visible && await p.executeCommand(co.id, {
681
+ }), f(K), P || o(), I.isVisible().visible && await p.executeCommand(uo.id, {
682
682
  visible: !1,
683
683
  eventType: nn.Keyboard,
684
684
  unitId: r,
@@ -711,7 +711,7 @@ function Ai(e) {
711
711
  {
712
712
  label: t.t("dataValidation.panel.invalid"),
713
713
  children: /* @__PURE__ */ h.jsxs(
714
- mn,
714
+ fn,
715
715
  {
716
716
  value: `${(c = n.errorStyle) != null ? c : it.WARNING}`,
717
717
  onChange: (u) => a({ ...n, errorStyle: +u }),
@@ -762,7 +762,7 @@ function Bi(e, t, o) {
762
762
  }
763
763
  function $i() {
764
764
  var se;
765
- const [e, t] = W(0), o = L(me), n = Ue(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(ye), c = L(ge), u = L(Lt), p = L(Q), d = L(Pt), f = L(J), [m, _] = W(r), w = s.getValidatorItem(m.type), [S, R] = W(!1), I = s.getValidatorsByScope($a.SHEET), [V, C] = W(() => m.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), g = Ae(() => Ui(p), [p]), [v, y] = W(!1), P = He({}), [U, T] = W(!1), E = L(Jn);
765
+ const [e, t] = W(0), o = L(fe), n = Ue(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(ye), c = L(ge), u = L(Lt), p = L(Q), d = L(Pt), g = L(J), [f, I] = W(r), R = s.getValidatorItem(f.type), [v, w] = W(!1), C = s.getValidatorsByScope($a.SHEET), [V, _] = W(() => f.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = Ae(() => Ui(p), [p]), [m, y] = W(!1), P = He({}), [F, T] = W(!1), E = L(Jn);
766
766
  if (Ce(() => () => {
767
767
  const O = E.getCurrentLastSelection();
768
768
  O && E.setSelections([O]);
@@ -770,13 +770,13 @@ function $i() {
770
770
  p.onCommandExecuted((O) => {
771
771
  (O.id === Go.id || O.id === Zo.id) && setTimeout(() => {
772
772
  const D = d.getRuleById(a, i, l);
773
- t((N) => N + 1), D && (_(D), C(D.ranges.map((N) => ({ unitId: "", sheetId: "", range: N }))));
773
+ t((U) => U + 1), D && (I(D), _(D.ranges.map((U) => ({ unitId: "", sheetId: "", range: U }))));
774
774
  }, 20);
775
775
  });
776
- }, [p, d, l, i, a]), !w)
776
+ }, [p, d, l, i, a]), !R)
777
777
  return null;
778
- const A = w.operators, x = w.operatorNames, j = m.operator ? ka.includes(m.operator) : !1, F = () => {
779
- !m.ranges.length || v || (w.validatorFormula(m, a, i).success ? o.setActiveRule(null) : R(!0));
778
+ const A = R.operators, x = R.operatorNames, j = f.operator ? ka.includes(f.operator) : !1, N = () => {
779
+ !f.ranges.length || m || (R.validatorFormula(f, a, i).success ? o.setActiveRule(null) : w(!0));
780
780
  }, H = go((O) => {
781
781
  const D = O.split(",").filter(Boolean).map(Xa).map(($) => {
782
782
  const _e = $.sheetName;
@@ -791,25 +791,25 @@ function $i() {
791
791
  });
792
792
  if (qo(D, V))
793
793
  return;
794
- C(D);
795
- const N = D.filter(($) => (!$.unitId || $.unitId === a) && (!$.sheetId || $.sheetId === i)).map(($) => $.range);
796
- if (_({
797
- ...m,
798
- ranges: N
799
- }), N.length === 0)
794
+ _(D);
795
+ const U = D.filter(($) => (!$.unitId || $.unitId === a) && (!$.sheetId || $.sheetId === i)).map(($) => $.range);
796
+ if (I({
797
+ ...f,
798
+ ranges: U
799
+ }), U.length === 0)
800
800
  return;
801
801
  const B = {
802
802
  unitId: a,
803
803
  subUnitId: i,
804
804
  ruleId: l,
805
- ranges: N
805
+ ranges: U
806
806
  };
807
- g(ao.id, B);
807
+ S(io.id, B);
808
808
  }), X = (O) => {
809
- if (Mn(O, An(m)))
809
+ if (Mn(O, An(f)))
810
810
  return;
811
- _({
812
- ...m,
811
+ I({
812
+ ...f,
813
813
  ...O
814
814
  });
815
815
  const D = {
@@ -818,48 +818,48 @@ function $i() {
818
818
  ruleId: l,
819
819
  setting: O
820
820
  };
821
- g(
821
+ S(
822
822
  En.id,
823
823
  D,
824
824
  void 0
825
825
  );
826
826
  }, k = async () => {
827
- await p.executeCommand(io.id, {
827
+ await p.executeCommand(ro.id, {
828
828
  ruleId: l,
829
829
  unitId: a,
830
830
  subUnitId: i
831
831
  }), o.setActiveRule(null);
832
832
  }, K = {
833
- type: m.type,
834
- operator: m.operator,
835
- formula1: m.formula1,
836
- formula2: m.formula2,
837
- allowBlank: m.allowBlank
833
+ type: f.type,
834
+ operator: f.operator,
835
+ formula1: f.formula1,
836
+ formula2: f.formula2,
837
+ allowBlank: f.allowBlank
838
838
  }, q = (O) => {
839
839
  const D = s.getValidatorItem(O);
840
840
  if (!D)
841
841
  return;
842
- const N = D.operators, B = d.getRuleById(a, i, l), $ = O === (B == null ? void 0 : B.type) || O.includes("list") && (B != null && B.type.includes("list")) ? {
842
+ const U = D.operators, B = d.getRuleById(a, i, l), $ = O === (B == null ? void 0 : B.type) || O.includes("list") && (B != null && B.type.includes("list")) ? {
843
843
  ...B,
844
844
  type: O
845
845
  } : {
846
- ...m,
846
+ ...f,
847
847
  type: O,
848
- operator: N[0],
848
+ operator: U[0],
849
849
  formula1: void 0,
850
850
  formula2: void 0
851
851
  };
852
- _($), p.executeCommand(En.id, {
852
+ I($), p.executeCommand(En.id, {
853
853
  unitId: a,
854
854
  subUnitId: i,
855
- ruleId: m.uid,
855
+ ruleId: f.uid,
856
856
  setting: An($)
857
857
  });
858
- }, ee = u.get(w.formulaInput), te = Ae(() => V.map((O) => _o(O.range)).join(","), []), re = Tn(m), ae = (O) => {
859
- Mn(O, Tn(m)) || (_({
860
- ...m,
858
+ }, ee = u.get(R.formulaInput), te = Ae(() => V.map((O) => _o(O.range)).join(","), []), re = Tn(f), ae = (O) => {
859
+ Mn(O, Tn(f)) || (I({
860
+ ...f,
861
861
  ...O
862
- }), g(
862
+ }), S(
863
863
  _a.id,
864
864
  {
865
865
  unitId: a,
@@ -870,15 +870,15 @@ function $i() {
870
870
  ));
871
871
  };
872
872
  return _n((O) => {
873
- var N;
874
- const D = (N = P.current) == null ? void 0 : N.handleOutClick;
873
+ var U;
874
+ const D = (U = P.current) == null ? void 0 : U.handleOutClick;
875
875
  D && D(O, () => T(!1));
876
876
  }), /* @__PURE__ */ h.jsxs("div", { className: $e.dataValidationDetail, children: [
877
877
  /* @__PURE__ */ h.jsx(
878
878
  Z,
879
879
  {
880
- label: f.t("dataValidation.panel.range"),
881
- error: !m.ranges.length || v ? f.t("dataValidation.panel.rangeError") : "",
880
+ label: g.t("dataValidation.panel.range"),
881
+ error: !f.ranges.length || m ? g.t("dataValidation.panel.rangeError") : "",
882
882
  children: /* @__PURE__ */ h.jsx(
883
883
  za,
884
884
  {
@@ -887,33 +887,33 @@ function $i() {
887
887
  initValue: te,
888
888
  onChange: H,
889
889
  onFocus: () => T(!0),
890
- isFocus: U,
890
+ isFocus: F,
891
891
  actions: P.current,
892
892
  onVerify: (O) => y(!O)
893
893
  }
894
894
  )
895
895
  }
896
896
  ),
897
- /* @__PURE__ */ h.jsx(Z, { label: f.t("dataValidation.panel.type"), children: /* @__PURE__ */ h.jsx(
897
+ /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.type"), children: /* @__PURE__ */ h.jsx(
898
898
  tn,
899
899
  {
900
- options: I == null ? void 0 : I.map((O) => ({
901
- label: f.t(O.title),
900
+ options: C == null ? void 0 : C.map((O) => ({
901
+ label: g.t(O.title),
902
902
  value: O.id
903
903
  })),
904
- value: m.type,
904
+ value: f.type,
905
905
  onChange: q,
906
906
  className: $e.dataValidationDetailFormItem
907
907
  }
908
908
  ) }),
909
- A != null && A.length ? /* @__PURE__ */ h.jsx(Z, { label: f.t("dataValidation.panel.operator"), children: /* @__PURE__ */ h.jsx(
909
+ A != null && A.length ? /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.operator"), children: /* @__PURE__ */ h.jsx(
910
910
  tn,
911
911
  {
912
912
  options: A.map((O, D) => ({
913
913
  value: `${O}`,
914
914
  label: x[D]
915
915
  })),
916
- value: `${m.operator}`,
916
+ value: `${f.operator}`,
917
917
  onChange: (O) => {
918
918
  X({
919
919
  ...K,
@@ -928,8 +928,8 @@ function $i() {
928
928
  {
929
929
  isTwoFormula: j,
930
930
  value: {
931
- formula1: m.formula1,
932
- formula2: m.formula2
931
+ formula1: f.formula1,
932
+ formula2: f.formula2
933
933
  },
934
934
  onChange: (O) => {
935
935
  X({
@@ -937,32 +937,32 @@ function $i() {
937
937
  ...O
938
938
  });
939
939
  },
940
- showError: S,
941
- validResult: w.validatorFormula(m, a, i),
940
+ showError: v,
941
+ validResult: R.validatorFormula(f, a, i),
942
942
  unitId: a,
943
943
  subUnitId: i,
944
944
  ruleId: l
945
945
  },
946
- e + m.type
946
+ e + f.type
947
947
  ) : null,
948
948
  /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(
949
949
  Ot,
950
950
  {
951
- checked: (se = m.allowBlank) != null ? se : !0,
951
+ checked: (se = f.allowBlank) != null ? se : !0,
952
952
  onChange: () => {
953
953
  var O;
954
954
  return X({
955
955
  ...K,
956
- allowBlank: !((O = m.allowBlank) == null || O)
956
+ allowBlank: !((O = f.allowBlank) == null || O)
957
957
  });
958
958
  },
959
- children: f.t("dataValidation.panel.allowBlank")
959
+ children: g.t("dataValidation.panel.allowBlank")
960
960
  }
961
961
  ) }),
962
- /* @__PURE__ */ h.jsx(Ai, { value: re, onChange: ae, extraComponent: w.optionsInput }),
962
+ /* @__PURE__ */ h.jsx(Ai, { value: re, onChange: ae, extraComponent: R.optionsInput }),
963
963
  /* @__PURE__ */ h.jsxs("div", { className: $e.dataValidationDetailButtons, children: [
964
- /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, onClick: k, children: f.t("dataValidation.panel.removeRule") }),
965
- /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, type: "primary", onClick: F, children: f.t("dataValidation.panel.done") })
964
+ /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, onClick: k, children: g.t("dataValidation.panel.removeRule") }),
965
+ /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, type: "primary", onClick: N, children: g.t("dataValidation.panel.done") })
966
966
  ] })
967
967
  ] });
968
968
  }
@@ -972,17 +972,17 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
972
972
  dataValidationItemContent: Hi,
973
973
  dataValidationItemIcon: Yi
974
974
  }, Xi = (e) => {
975
- const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = He(), [p, d] = W(!1), f = (m) => {
976
- l.executeCommand(io.id, {
975
+ const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = He(), [p, d] = W(!1), g = (f) => {
976
+ l.executeCommand(ro.id, {
977
977
  ruleId: t.uid,
978
978
  unitId: n,
979
979
  subUnitId: a
980
- }), m.stopPropagation();
980
+ }), f.stopPropagation();
981
981
  };
982
982
  return Ce(() => () => {
983
- var m;
984
- u.current && ((m = u.current) == null || m.forEach((_) => {
985
- _ && s.removeShape(_);
983
+ var f;
984
+ u.current && ((f = u.current) == null || f.forEach((I) => {
985
+ I && s.removeShape(I);
986
986
  }));
987
987
  }, [s]), /* @__PURE__ */ h.jsxs(
988
988
  "div",
@@ -990,8 +990,8 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
990
990
  className: ct.dataValidationItemContainer,
991
991
  onClick: o,
992
992
  onMouseEnter: () => {
993
- i || (d(!0), u.current = t.ranges.map((m) => s.addShape({
994
- range: m,
993
+ i || (d(!0), u.current = t.ranges.map((f) => s.addShape({
994
+ range: f,
995
995
  style: {
996
996
  // hasAutoFill: false,
997
997
  fill: "rgba(73, 184, 17, 0.05)",
@@ -1003,15 +1003,15 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
1003
1003
  })));
1004
1004
  },
1005
1005
  onMouseLeave: () => {
1006
- var m;
1007
- d(!1), (m = u.current) == null || m.forEach((_) => {
1008
- _ && s.removeShape(_);
1006
+ var f;
1007
+ d(!1), (f = u.current) == null || f.forEach((I) => {
1008
+ I && s.removeShape(I);
1009
1009
  }), u.current = void 0;
1010
1010
  },
1011
1011
  children: [
1012
1012
  /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(t) }),
1013
- /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemContent, children: t.ranges.map((m) => _o(m)).join(",") }),
1014
- p ? /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemIcon, onClick: f, children: /* @__PURE__ */ h.jsx(wn, {}) }) : null
1013
+ /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemContent, children: t.ranges.map((f) => _o(f)).join(",") }),
1014
+ p ? /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemIcon, onClick: g, children: /* @__PURE__ */ h.jsx(wn, {}) }) : null
1015
1015
  ]
1016
1016
  }
1017
1017
  );
@@ -1030,65 +1030,65 @@ function Zi() {
1030
1030
  return t ? /* @__PURE__ */ h.jsx(qi, { workbook: t }) : null;
1031
1031
  }
1032
1032
  function qi(e) {
1033
- const t = L(oe), o = L(ge), n = L(Q), a = L(Ne), i = L(me), r = L(J), [l, s] = W([]), { workbook: c } = e, u = Ue(c.activeSheet$, void 0, !0), p = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1033
+ const t = L(oe), o = L(ge), n = L(Q), a = L(Ne), i = L(fe), r = L(J), [l, s] = W([]), { workbook: c } = e, u = Ue(c.activeSheet$, void 0, !0), p = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1034
1034
  Ce(() => {
1035
1035
  s(t.getRules(p, d));
1036
- const R = t.ruleChange$.subscribe((I) => {
1037
- I.unitId === p && I.subUnitId === d && s(t.getRules(p, d));
1036
+ const w = t.ruleChange$.subscribe((C) => {
1037
+ C.unitId === p && C.subUnitId === d && s(t.getRules(p, d));
1038
1038
  });
1039
1039
  return () => {
1040
- R.unsubscribe();
1040
+ w.unsubscribe();
1041
1041
  };
1042
1042
  }, [p, d, t]);
1043
- const f = async () => {
1044
- const R = ro(a), I = {
1043
+ const g = async () => {
1044
+ const w = so(a), C = {
1045
1045
  unitId: p,
1046
1046
  subUnitId: d,
1047
- rule: R
1047
+ rule: w
1048
1048
  };
1049
- await n.executeCommand(vn.id, I), i.setActiveRule({
1049
+ await n.executeCommand(vn.id, C), i.setActiveRule({
1050
1050
  unitId: p,
1051
1051
  subUnitId: d,
1052
- rule: R
1052
+ rule: w
1053
1053
  });
1054
- }, m = () => {
1054
+ }, f = () => {
1055
1055
  n.executeCommand(Sa.id, {
1056
1056
  unitId: p,
1057
1057
  subUnitId: d
1058
1058
  });
1059
- }, w = ((R) => {
1060
- const I = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = I.getActiveSheet(), C = I.getUnitId(), g = V.getSheetId();
1061
- return R.map((y) => ga(a, C, g, y.ranges) ? { ...y } : { ...y, disable: !0 });
1062
- })(l), S = w == null ? void 0 : w.some((R) => R.disable);
1059
+ }, R = ((w) => {
1060
+ const C = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = C.getActiveSheet(), _ = C.getUnitId(), S = V.getSheetId();
1061
+ return w.map((y) => ga(a, _, S, y.ranges) ? { ...y } : { ...y, disable: !0 });
1062
+ })(l), v = R == null ? void 0 : R.some((w) => w.disable);
1063
1063
  return /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationList, children: [
1064
- w == null ? void 0 : w.map((R) => {
1065
- var I;
1064
+ R == null ? void 0 : R.map((w) => {
1065
+ var C;
1066
1066
  return /* @__PURE__ */ h.jsx(
1067
1067
  Xi,
1068
1068
  {
1069
1069
  unitId: p,
1070
1070
  subUnitId: d,
1071
1071
  onClick: () => {
1072
- R.disable || i.setActiveRule({
1072
+ w.disable || i.setActiveRule({
1073
1073
  unitId: p,
1074
1074
  subUnitId: d,
1075
- rule: R
1075
+ rule: w
1076
1076
  });
1077
1077
  },
1078
- rule: R,
1079
- disable: (I = R.disable) != null ? I : !1
1078
+ rule: w,
1079
+ disable: (C = w.disable) != null ? C : !1
1080
1080
  },
1081
- R.uid
1081
+ w.uid
1082
1082
  );
1083
1083
  }),
1084
1084
  /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationListButtons, children: [
1085
- l.length && !S ? /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, onClick: m, children: r.t("dataValidation.panel.removeAll") }) : null,
1086
- /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, type: "primary", onClick: f, children: r.t("dataValidation.panel.add") })
1085
+ l.length && !v ? /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, onClick: f, children: r.t("dataValidation.panel.removeAll") }) : null,
1086
+ /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, type: "primary", onClick: g, children: r.t("dataValidation.panel.add") })
1087
1087
  ] })
1088
1088
  ] });
1089
1089
  }
1090
1090
  const Ji = () => {
1091
- const e = L(me), t = Ue(e.activeRule$, e.activeRule);
1091
+ const e = L(fe), t = Ue(e.activeRule$, e.activeRule);
1092
1092
  return t ? /* @__PURE__ */ h.jsx($i, {}, t.rule.uid) : /* @__PURE__ */ h.jsx(Zi, {});
1093
1093
  }, Vn = "data-validation.list.dropdown", Oo = "data-validation.date.dropdown", At = {
1094
1094
  type: Je.COMMAND,
@@ -1096,7 +1096,7 @@ const Ji = () => {
1096
1096
  handler(e) {
1097
1097
  const t = e.get(ge), o = Qn(t);
1098
1098
  if (!o) return !1;
1099
- const { workbook: n, worksheet: a } = o, i = ro(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
1099
+ const { workbook: n, worksheet: a } = o, i = so(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
1100
1100
  rule: i,
1101
1101
  unitId: l,
1102
1102
  subUnitId: s
@@ -1168,7 +1168,7 @@ lt = tr([
1168
1168
  ke(1, b(Ea)),
1169
1169
  ke(2, ge),
1170
1170
  ke(3, b(J)),
1171
- ke(4, fo),
1171
+ ke(4, mo),
1172
1172
  ke(5, b(oe))
1173
1173
  ], lt);
1174
1174
  var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ar = (e, t, o, n) => {
@@ -1183,21 +1183,21 @@ let ze = class extends De {
1183
1183
  // eslint-disable-next-line max-lines-per-function
1184
1184
  _initAutoFill() {
1185
1185
  const e = () => ({ redos: [], undos: [] }), t = (n, a) => {
1186
- const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, r]), [p, d] = u.ranges, { mapFunc: f } = u, m = {
1186
+ const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, r]), [p, d] = u.ranges, { mapFunc: g } = u, f = {
1187
1187
  row: p.startRow,
1188
1188
  col: p.startColumn
1189
- }, _ = Pa(p, d), w = new _t(), S = /* @__PURE__ */ new Set();
1190
- _.forEach((g) => {
1191
- const v = g.repeatStartCell, y = g.relativeRange, P = {
1189
+ }, I = Pa(p, d), R = new _t(), v = /* @__PURE__ */ new Set();
1190
+ I.forEach((S) => {
1191
+ const m = S.repeatStartCell, y = S.relativeRange, P = {
1192
+ startRow: f.row,
1193
+ startColumn: f.col,
1194
+ endColumn: f.col,
1195
+ endRow: f.row
1196
+ }, F = {
1192
1197
  startRow: m.row,
1193
1198
  startColumn: m.col,
1194
1199
  endColumn: m.col,
1195
1200
  endRow: m.row
1196
- }, U = {
1197
- startRow: v.row,
1198
- startColumn: v.col,
1199
- endColumn: v.col,
1200
- endRow: v.row
1201
1201
  };
1202
1202
  Qo.foreach(y, (T, E) => {
1203
1203
  const A = St.getPositionRange(
@@ -1208,27 +1208,27 @@ let ze = class extends De {
1208
1208
  endRow: T
1209
1209
  },
1210
1210
  P
1211
- ), { row: x, col: j } = f(A.startRow, A.startColumn), F = this._sheetDataValidationModel.getRuleIdByLocation(l, s, x, j) || "", H = St.getPositionRange(
1211
+ ), { row: x, col: j } = g(A.startRow, A.startColumn), N = this._sheetDataValidationModel.getRuleIdByLocation(l, s, x, j) || "", H = St.getPositionRange(
1212
1212
  {
1213
1213
  startRow: T,
1214
1214
  startColumn: E,
1215
1215
  endColumn: E,
1216
1216
  endRow: T
1217
1217
  },
1218
- U
1219
- ), { row: X, col: k } = f(H.startRow, H.startColumn);
1220
- w.setValue(X, k, F), S.add(F);
1218
+ F
1219
+ ), { row: X, col: k } = g(H.startRow, H.startColumn);
1220
+ R.setValue(X, k, N), v.add(N);
1221
1221
  });
1222
1222
  });
1223
- const R = Array.from(S).map((g) => ({ id: g, ranges: Qt(w, (v) => v === g) }));
1224
- c.addRangeRules(R);
1225
- const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: C } = an(l, s, I, this._injector, "patched", a === tt.ONLY_FORMAT);
1223
+ const w = Array.from(v).map((S) => ({ id: S, ranges: Qt(R, (m) => m === S) }));
1224
+ c.addRangeRules(w);
1225
+ const C = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = an(l, s, C, this._injector, "patched", a === tt.ONLY_FORMAT);
1226
1226
  return {
1227
- undos: C,
1227
+ undos: _,
1228
1228
  redos: V
1229
1229
  };
1230
1230
  }, o = {
1231
- id: so,
1231
+ id: lo,
1232
1232
  onBeforeFillData: (n) => {
1233
1233
  const { source: a, unitId: i, subUnitId: r } = n;
1234
1234
  for (const l of a.rows)
@@ -1265,7 +1265,7 @@ let Ke = class extends De {
1265
1265
  }
1266
1266
  _initCopyPaste() {
1267
1267
  this._sheetClipboardService.addClipboardHook({
1268
- id: so,
1268
+ id: lo,
1269
1269
  onBeforeCopy: (t, o, n) => this._collect(t, o, n),
1270
1270
  onPasteCells: (t, o, n, a) => {
1271
1271
  const { copyType: i = Ln.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
@@ -1304,74 +1304,72 @@ let Ke = class extends De {
1304
1304
  dt.SPECIAL_PASTE_VALUE,
1305
1305
  dt.SPECIAL_PASTE_FORMAT,
1306
1306
  dt.SPECIAL_PASTE_FORMULA
1307
- ].includes(
1308
- o.pasteType
1309
- ))
1307
+ ].includes(o.pasteType))
1310
1308
  return { redos: [], undos: [] };
1311
- const { unitId: n, subUnitId: a } = this._copyInfo;
1312
- if (o.unitId !== n || a !== o.subUnitId) {
1313
- const i = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), r = new _t(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = rn([o.copyRange, t]), p = Pn(s, c, !0), d = /* @__PURE__ */ new Map();
1314
- p.forEach(({ startRange: w }) => {
1315
- var S;
1316
- (S = this._copyInfo) == null || S.matrix.forValue((R, I, V) => {
1317
- const C = St.getPositionRange(
1309
+ const { unitId: a, subUnitId: i } = this._copyInfo;
1310
+ if (o.unitId !== a || i !== o.subUnitId) {
1311
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]), d = Pn(c, u, !0), g = /* @__PURE__ */ new Map();
1312
+ d.forEach(({ startRange: v }) => {
1313
+ var w;
1314
+ (w = this._copyInfo) == null || w.matrix.forValue((C, V, _) => {
1315
+ const S = St.getPositionRange(
1318
1316
  {
1319
- startRow: R,
1320
- endRow: R,
1321
- startColumn: I,
1322
- endColumn: I
1317
+ startRow: C,
1318
+ endRow: C,
1319
+ startColumn: V,
1320
+ endColumn: V
1323
1321
  },
1324
- w
1325
- ), g = `${a}-${V}`, v = this._sheetDataValidationModel.getRuleById(n, a, V);
1326
- !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, g) && v && d.set(g, { ...v, uid: g });
1327
- const { row: y, col: P } = u(C.startRow, C.startColumn);
1328
- l.add(g), r.setValue(y, P, g);
1322
+ v
1323
+ ), m = `${i}-${_}`, y = this._sheetDataValidationModel.getRuleById(a, i, _);
1324
+ !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, m) && y && g.set(m, { ...y, uid: m });
1325
+ const { row: P, col: F } = p(S.startRow, S.startColumn);
1326
+ s.add(m), l.setValue(P, F, m);
1329
1327
  });
1330
1328
  });
1331
- const f = Array.from(l).map((w) => ({ id: w, ranges: Qt(r, (S) => S === w) }));
1332
- i.addRangeRules(f);
1333
- const { redoMutations: m, undoMutations: _ } = an(
1329
+ const f = Array.from(s).map((v) => ({ id: v, ranges: Qt(l, (w) => w === v) }));
1330
+ r.addRangeRules(f);
1331
+ const { redoMutations: I, undoMutations: R } = an(
1334
1332
  o.unitId,
1335
1333
  o.subUnitId,
1336
- i.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), d.values()),
1334
+ r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), g.values()),
1337
1335
  this._injector,
1338
1336
  "patched",
1339
1337
  !1
1340
1338
  );
1341
1339
  return {
1342
- redos: m,
1343
- undos: _
1340
+ redos: I,
1341
+ undos: R
1344
1342
  };
1345
1343
  } else {
1346
- const i = this._sheetDataValidationModel.getRuleObjectMatrix(n, a).clone(), r = new _t(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = rn([o.copyRange, t]);
1347
- Pn(s, c, !0).forEach(({ startRange: _ }) => {
1348
- var w;
1349
- (w = this._copyInfo) == null || w.matrix.forValue((S, R, I) => {
1350
- const V = St.getPositionRange(
1344
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]);
1345
+ Pn(c, u, !0).forEach(({ startRange: R }) => {
1346
+ var v;
1347
+ (v = this._copyInfo) == null || v.matrix.forValue((w, C, V) => {
1348
+ const _ = St.getPositionRange(
1351
1349
  {
1352
- startRow: S,
1353
- endRow: S,
1354
- startColumn: R,
1355
- endColumn: R
1350
+ startRow: w,
1351
+ endRow: w,
1352
+ startColumn: C,
1353
+ endColumn: C
1356
1354
  },
1357
- _
1358
- ), { row: C, col: g } = u(V.startRow, V.startColumn);
1359
- r.setValue(C, g, I), l.add(I);
1355
+ R
1356
+ ), { row: S, col: m } = p(_.startRow, _.startColumn);
1357
+ l.setValue(S, m, V), s.add(V);
1360
1358
  });
1361
1359
  });
1362
- const d = Array.from(l).map((_) => ({ id: _, ranges: Qt(r, (w) => w === _) }));
1363
- i.addRangeRules(d);
1364
- const { redoMutations: f, undoMutations: m } = an(
1365
- n,
1360
+ const g = Array.from(s).map((R) => ({ id: R, ranges: Qt(l, (v) => v === R) }));
1361
+ r.addRangeRules(g);
1362
+ const { redoMutations: f, undoMutations: I } = an(
1366
1363
  a,
1367
- i.diff(this._sheetDataValidationModel.getRules(n, a)),
1364
+ i,
1365
+ r.diff(this._sheetDataValidationModel.getRules(a, i)),
1368
1366
  this._injector,
1369
1367
  "patched",
1370
1368
  !1
1371
1369
  );
1372
1370
  return {
1373
1371
  redos: f,
1374
- undos: m
1372
+ undos: I
1375
1373
  };
1376
1374
  }
1377
1375
  }
@@ -1388,20 +1386,20 @@ var lr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, cr = (e, t
1388
1386
  }, kt = (e, t) => (o, n) => t(o, n, e);
1389
1387
  let Ge = class extends De {
1390
1388
  constructor(e, t, o) {
1391
- super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = o, this._commandExecutedListener();
1389
+ super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = o, this._commandExecutedListener();
1392
1390
  }
1393
1391
  _commandExecutedListener() {
1394
1392
  this.disposeWithMe(
1395
1393
  this._commandService.beforeCommandExecuted((e) => {
1396
- e.id === vn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1394
+ e.id === vn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1397
1395
  workbookTypes: [Ct],
1398
1396
  rangeTypes: [It],
1399
1397
  worksheetTypes: [wt, on]
1400
- }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr"))), e.id === ao.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
1398
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === io.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1401
1399
  workbookTypes: [Ct],
1402
1400
  rangeTypes: [It],
1403
1401
  worksheetTypes: [wt, on]
1404
- }, e.params.ranges) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr")));
1402
+ }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1405
1403
  })
1406
1404
  );
1407
1405
  }
@@ -1409,7 +1407,7 @@ let Ge = class extends De {
1409
1407
  Ge = cr([
1410
1408
  kt(0, b(J)),
1411
1409
  kt(1, Q),
1412
- kt(2, b(ho))
1410
+ kt(2, b(eo))
1413
1411
  ], Ge);
1414
1412
  const Lo = "data-validation-single", Po = "sheet.menu.data-validation";
1415
1413
  function ur(e) {
@@ -1436,7 +1434,7 @@ function pr(e) {
1436
1434
  type: Sn.BUTTON
1437
1435
  };
1438
1436
  }
1439
- const mr = {
1437
+ const fr = {
1440
1438
  [Ua.FORMULAS_INSERT]: {
1441
1439
  [Po]: {
1442
1440
  order: 9,
@@ -1452,10 +1450,10 @@ const mr = {
1452
1450
  }
1453
1451
  }
1454
1452
  };
1455
- var fr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, To = (e, t, o, n) => {
1453
+ var mr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, To = (e, t, o, n) => {
1456
1454
  for (var a = n > 1 ? void 0 : n ? gr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1457
1455
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1458
- return n && a && fr(t, o, a), a;
1456
+ return n && a && mr(t, o, a), a;
1459
1457
  }, G = (e, t) => (o, n) => t(o, n, e);
1460
1458
  const Ao = {
1461
1459
  tr: {
@@ -1468,7 +1466,7 @@ let Ze = class extends pn {
1468
1466
  super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = o, this._univerInstanceService = n, this._autoHeightController = a, this._dropdownManagerService = i, this._sheetDataValidationModel = r, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = c, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1469
1467
  }
1470
1468
  _initMenu() {
1471
- this._menuManagerService.mergeMenu(mr);
1469
+ this._menuManagerService.mergeMenu(fr);
1472
1470
  }
1473
1471
  _initDropdown() {
1474
1472
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -1517,31 +1515,31 @@ let Ze = class extends pn {
1517
1515
  _initViewModelIntercept() {
1518
1516
  this.disposeWithMe(
1519
1517
  this._sheetInterceptorService.intercept(
1520
- eo.CELL_CONTENT,
1518
+ to.CELL_CONTENT,
1521
1519
  {
1522
1520
  effect: zn.Style,
1523
1521
  // must be after numfmt
1524
- priority: to.DATA_VALIDATION,
1522
+ priority: no.DATA_VALIDATION,
1525
1523
  // eslint-disable-next-line max-lines-per-function, complexity
1526
1524
  handler: (e, t, o) => {
1527
- var S, R, I, V, C;
1525
+ var v, w, C, V, _;
1528
1526
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1529
1527
  if (!c)
1530
1528
  return o(e);
1531
1529
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1532
1530
  if (!u)
1533
1531
  return o(e);
1534
- const p = (S = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? S : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), f = t.rawData;
1535
- let m;
1536
- const _ = {
1532
+ const p = (v = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? v : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = t.rawData;
1533
+ let f;
1534
+ const I = {
1537
1535
  get value() {
1538
- var g;
1539
- return m !== void 0 || (m = (g = ie(f)) != null ? g : null), m;
1536
+ var S;
1537
+ return f !== void 0 || (f = (S = ie(g)) != null ? S : null), f;
1540
1538
  }
1541
- }, w = {
1539
+ }, R = {
1542
1540
  get value() {
1543
- var g;
1544
- return `${(g = _.value) != null ? g : ""}`;
1541
+ var S;
1542
+ return `${(S = I.value) != null ? S : ""}`;
1545
1543
  }
1546
1544
  };
1547
1545
  return o({
@@ -1551,31 +1549,31 @@ let Ze = class extends pn {
1551
1549
  ...p === rt.INVALID ? Ao : null
1552
1550
  },
1553
1551
  customRender: [
1554
- ...(R = e == null ? void 0 : e.customRender) != null ? R : [],
1552
+ ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
1555
1553
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1556
1554
  ],
1557
1555
  fontRenderExtension: {
1558
1556
  ...e == null ? void 0 : e.fontRenderExtension,
1559
- isSkip: ((I = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : I.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, _.value, t))
1557
+ isSkip: ((C = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : C.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, I.value, t))
1560
1558
  },
1561
1559
  interceptorStyle: {
1562
1560
  ...e == null ? void 0 : e.interceptorStyle,
1563
- ...d == null ? void 0 : d.getExtraStyle(u, w.value, {
1561
+ ...d == null ? void 0 : d.getExtraStyle(u, R.value, {
1564
1562
  get style() {
1565
- const g = l.getStyles();
1566
- return (typeof (e == null ? void 0 : e.s) == "string" ? g.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1563
+ const S = l.getStyles();
1564
+ return (typeof (e == null ? void 0 : e.s) == "string" ? S.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1567
1565
  }
1568
1566
  }, n, a)
1569
1567
  },
1570
1568
  interceptorAutoHeight: () => {
1571
- var P, U, T, E, A, x;
1572
- const g = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
1573
- if (!g)
1569
+ var P, F, T, E, A, x;
1570
+ const S = (F = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : F.skeleton;
1571
+ if (!S)
1574
1572
  return;
1575
- const v = g.worksheet.getMergedCell(n, a), y = {
1573
+ const m = S.worksheet.getMergedCell(n, a), y = {
1576
1574
  data: e,
1577
- style: g.getsStyles().getStyleByCell(e),
1578
- primaryWithCoord: g.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : n, (E = v == null ? void 0 : v.startColumn) != null ? E : a),
1575
+ style: S.getsStyles().getStyleByCell(e),
1576
+ primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
1579
1577
  unitId: i,
1580
1578
  subUnitId: r,
1581
1579
  row: n,
@@ -1586,14 +1584,14 @@ let Ze = class extends pn {
1586
1584
  return (x = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : x.call(A, y);
1587
1585
  },
1588
1586
  interceptorAutoWidth: () => {
1589
- var P, U, T, E, A, x;
1590
- const g = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
1591
- if (!g)
1587
+ var P, F, T, E, A, x;
1588
+ const S = (F = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : F.skeleton;
1589
+ if (!S)
1592
1590
  return;
1593
- const v = g.worksheet.getMergedCell(n, a), y = {
1591
+ const m = S.worksheet.getMergedCell(n, a), y = {
1594
1592
  data: e,
1595
- style: g.getsStyles().getStyleByCell(e),
1596
- primaryWithCoord: g.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : n, (E = v == null ? void 0 : v.startColumn) != null ? E : a),
1593
+ style: S.getsStyles().getStyleByCell(e),
1594
+ primaryWithCoord: S.getCellWithCoordByIndex((T = m == null ? void 0 : m.startRow) != null ? T : n, (E = m == null ? void 0 : m.startColumn) != null ? E : a),
1597
1595
  unitId: i,
1598
1596
  subUnitId: r,
1599
1597
  row: n,
@@ -1603,7 +1601,7 @@ let Ze = class extends pn {
1603
1601
  };
1604
1602
  return (x = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : x.call(A, y);
1605
1603
  },
1606
- coverable: ((C = e == null ? void 0 : e.coverable) != null ? C : !0) && !(u.type === z.LIST || u.type === z.LIST_MULTIPLE)
1604
+ coverable: ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === z.LIST || u.type === z.LIST_MULTIPLE)
1607
1605
  });
1608
1606
  }
1609
1607
  }
@@ -1639,9 +1637,9 @@ Ze = To([
1639
1637
  G(5, b(Ie)),
1640
1638
  G(6, b(oe)),
1641
1639
  G(7, b(ye)),
1642
- G(8, b(fn)),
1643
- G(9, b(lo)),
1644
- G(10, ea(uo))
1640
+ G(8, b(mn)),
1641
+ G(9, b(co)),
1642
+ G(10, ea(ho))
1645
1643
  ], Ze);
1646
1644
  let Bn = class extends pn {
1647
1645
  constructor(e, t, o, n, a, i, r) {
@@ -1650,21 +1648,21 @@ let Bn = class extends pn {
1650
1648
  _initViewModelIntercept() {
1651
1649
  this.disposeWithMe(
1652
1650
  this._sheetInterceptorService.intercept(
1653
- eo.CELL_CONTENT,
1651
+ to.CELL_CONTENT,
1654
1652
  {
1655
1653
  effect: zn.Style,
1656
1654
  // must be after numfmt
1657
- priority: to.DATA_VALIDATION,
1655
+ priority: no.DATA_VALIDATION,
1658
1656
  // eslint-disable-next-line complexity
1659
1657
  handler: (e, t, o) => {
1660
- var w, S, R, I, V;
1658
+ var R, v, w, C, V;
1661
1659
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1662
1660
  if (!c)
1663
1661
  return o(e);
1664
1662
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1665
1663
  if (!u)
1666
1664
  return o(e);
1667
- const p = (w = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? w : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), f = s.getCellRaw(n, a), m = ie(f), _ = `${m != null ? m : ""}`;
1665
+ const p = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = s.getCellRaw(n, a), f = ie(g), I = `${f != null ? f : ""}`;
1668
1666
  return o({
1669
1667
  ...e,
1670
1668
  markers: {
@@ -1672,31 +1670,31 @@ let Bn = class extends pn {
1672
1670
  ...p === rt.INVALID ? Ao : null
1673
1671
  },
1674
1672
  customRender: [
1675
- ...(S = e == null ? void 0 : e.customRender) != null ? S : [],
1673
+ ...(v = e == null ? void 0 : e.customRender) != null ? v : [],
1676
1674
  ...d != null && d.canvasRender ? [d.canvasRender] : []
1677
1675
  ],
1678
1676
  fontRenderExtension: {
1679
1677
  ...e == null ? void 0 : e.fontRenderExtension,
1680
- isSkip: ((R = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : R.isSkip) || ((I = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : I.call(d, u, m, t))
1678
+ isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((C = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : C.call(d, u, f, t))
1681
1679
  },
1682
1680
  interceptorStyle: {
1683
1681
  ...e == null ? void 0 : e.interceptorStyle,
1684
- ...d == null ? void 0 : d.getExtraStyle(u, _, {
1682
+ ...d == null ? void 0 : d.getExtraStyle(u, I, {
1685
1683
  get style() {
1686
- const C = l.getStyles();
1687
- return (typeof (e == null ? void 0 : e.s) == "string" ? C.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1684
+ const _ = l.getStyles();
1685
+ return (typeof (e == null ? void 0 : e.s) == "string" ? _.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1688
1686
  }
1689
1687
  }, n, a)
1690
1688
  },
1691
1689
  interceptorAutoHeight: () => {
1692
- var y, P, U, T, E, A;
1693
- const C = (P = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : P.skeleton;
1694
- if (!C)
1690
+ var y, P, F, T, E, A;
1691
+ const _ = (P = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(Rt).getWorksheetSkeleton(r)) == null ? void 0 : P.skeleton;
1692
+ if (!_)
1695
1693
  return;
1696
- const g = C.worksheet.getMergedCell(n, a), v = {
1694
+ const S = _.worksheet.getMergedCell(n, a), m = {
1697
1695
  data: e,
1698
- style: C.getsStyles().getStyleByCell(e),
1699
- primaryWithCoord: C.getCellWithCoordByIndex((U = g == null ? void 0 : g.startRow) != null ? U : n, (T = g == null ? void 0 : g.startColumn) != null ? T : a),
1696
+ style: _.getsStyles().getStyleByCell(e),
1697
+ primaryWithCoord: _.getCellWithCoordByIndex((F = S == null ? void 0 : S.startRow) != null ? F : n, (T = S == null ? void 0 : S.startColumn) != null ? T : a),
1700
1698
  unitId: i,
1701
1699
  subUnitId: r,
1702
1700
  row: n,
@@ -1704,7 +1702,7 @@ let Bn = class extends pn {
1704
1702
  workbook: l,
1705
1703
  worksheet: s
1706
1704
  };
1707
- return (A = (E = d == null ? void 0 : d.canvasRender) == null ? void 0 : E.calcCellAutoHeight) == null ? void 0 : A.call(E, v);
1705
+ return (A = (E = d == null ? void 0 : d.canvasRender) == null ? void 0 : E.calcCellAutoHeight) == null ? void 0 : A.call(E, m);
1708
1706
  },
1709
1707
  coverable: ((V = e == null ? void 0 : e.coverable) != null ? V : !0) && !(u.type === z.LIST || u.type === z.LIST_MULTIPLE)
1710
1708
  });
@@ -1734,9 +1732,9 @@ Bn = To([
1734
1732
  G(1, Ve),
1735
1733
  G(2, b(po)),
1736
1734
  G(3, b(ye)),
1737
- G(4, b(fn)),
1735
+ G(4, b(mn)),
1738
1736
  G(5, b(oe)),
1739
- G(6, b(lo))
1737
+ G(6, b(co))
1740
1738
  ], Bn);
1741
1739
  var vr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Sr = (e, t, o, n) => {
1742
1740
  for (var a = n > 1 ? void 0 : n ? _r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
@@ -1872,9 +1870,9 @@ function Lr(e) {
1872
1870
  var p;
1873
1871
  const { unitId: t, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = e, l = i ? r == null ? void 0 : r.formula1 : void 0, s = He({}), [c, u] = W(!1);
1874
1872
  return _n((d) => {
1875
- var m;
1876
- const f = (m = s.current) == null ? void 0 : m.handleOutClick;
1877
- f && f(d, () => u(!1));
1873
+ var f;
1874
+ const g = (f = s.current) == null ? void 0 : f.handleOutClick;
1875
+ g && g(d, () => u(!1));
1878
1876
  }), /* @__PURE__ */ h.jsx(
1879
1877
  So,
1880
1878
  {
@@ -1883,10 +1881,10 @@ function Lr(e) {
1883
1881
  subUnitId: o,
1884
1882
  isFocus: c,
1885
1883
  onChange: (d) => {
1886
- const f = (d != null ? d : "").trim();
1887
- f !== (n == null ? void 0 : n.formula1) && (a == null || a({
1884
+ const g = (d != null ? d : "").trim();
1885
+ g !== (n == null ? void 0 : n.formula1) && (a == null || a({
1888
1886
  ...n,
1889
- formula1: f
1887
+ formula1: g
1890
1888
  }));
1891
1889
  },
1892
1890
  errorText: l,
@@ -1997,49 +1995,49 @@ const Tr = [
1997
1995
  };
1998
1996
  function xr(e) {
1999
1997
  const { value: t, onChange: o = () => {
2000
- }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = He(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [f, m] = W(p === "1" ? s : "="), [_, w] = W(p === "1" ? s : "="), S = L(J), R = L(ye), I = L(Pt), V = L(Ca), [C, g] = W(() => c.split(",")), v = R.getValidatorItem(z.LIST), [y, P] = W([]), [U, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Ae(() => I.ruleChange$.pipe(In(16)), []), x = Ue(A), j = go(o);
1998
+ }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = He(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [g, f] = W(p === "1" ? s : "="), [I, R] = W(p === "1" ? s : "="), v = L(J), w = L(ye), C = L(Pt), V = L(Ca), [_, S] = W(() => c.split(",")), m = w.getValidatorItem(z.LIST), [y, P] = W([]), [F, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Ae(() => C.ruleChange$.pipe(In(16)), []), x = Ue(A), j = go(o);
2001
1999
  Ce(() => {
2002
2000
  (async () => {
2003
2001
  await new Promise((B) => {
2004
2002
  setTimeout(() => B(!0), 100);
2005
2003
  });
2006
- const D = I.getRuleById(n, a, l), N = D == null ? void 0 : D.formula1;
2007
- if (Pe(N) && v && D) {
2008
- const B = await v.getListAsync(D, n, a);
2004
+ const D = C.getRuleById(n, a, l), U = D == null ? void 0 : D.formula1;
2005
+ if (Pe(U) && m && D) {
2006
+ const B = await m.getListAsync(D, n, a);
2009
2007
  P(B);
2010
2008
  }
2011
2009
  })();
2012
- }, [I, x, v, l, a, n]), Ce(() => {
2013
- Pe(s) && s !== _ && (m(s), w(_));
2014
- }, [_, s]);
2015
- const [F, H] = W(() => {
2016
- const D = p !== "1" ? no(s) : [], N = c.split(",");
2010
+ }, [C, x, m, l, a, n]), Ce(() => {
2011
+ Pe(s) && s !== I && (f(s), R(I));
2012
+ }, [I, s]);
2013
+ const [N, H] = W(() => {
2014
+ const D = p !== "1" ? oo(s) : [], U = c.split(",");
2017
2015
  return D.map((B, $) => ({
2018
2016
  label: B,
2019
- color: N[$] || Te,
2017
+ color: U[$] || Te,
2020
2018
  isRef: !1,
2021
2019
  id: en.generateRandomId(4)
2022
2020
  }));
2023
- }), X = (D, N, B) => {
2024
- const $ = F.find((_e) => _e.id === D);
2025
- $ && ($.label = N, $.color = B, H([...F]));
2021
+ }), X = (D, U, B) => {
2022
+ const $ = N.find((_e) => _e.id === D);
2023
+ $ && ($.label = U, $.color = B, H([...N]));
2026
2024
  }, k = (D) => {
2027
- const N = F.findIndex((B) => B.id === D);
2028
- N !== -1 && (F.splice(N, 1), H([...F]));
2029
- }, K = c.split(","), q = Ae(() => y.map((D, N) => ({
2025
+ const U = N.findIndex((B) => B.id === D);
2026
+ U !== -1 && (N.splice(U, 1), H([...N]));
2027
+ }, K = c.split(","), q = Ae(() => y.map((D, U) => ({
2030
2028
  label: D,
2031
- color: K[N] || Te,
2032
- id: `${N}`,
2029
+ color: K[U] || Te,
2030
+ id: `${U}`,
2033
2031
  isRef: !0
2034
- })), [K, y]), ee = (D, N, B) => {
2035
- const $ = [...C];
2036
- $[+D] = B, g($), j({
2032
+ })), [K, y]), ee = (D, U, B) => {
2033
+ const $ = [..._];
2034
+ $[+D] = B, S($), j({
2037
2035
  formula1: s,
2038
2036
  formula2: $.join(",")
2039
2037
  });
2040
2038
  }, te = () => {
2041
2039
  H([
2042
- ...F,
2040
+ ...N,
2043
2041
  {
2044
2042
  label: "",
2045
2043
  color: Te,
@@ -2051,22 +2049,22 @@ function xr(e) {
2051
2049
  Ce(() => {
2052
2050
  if (p === "1")
2053
2051
  return;
2054
- const D = /* @__PURE__ */ new Set(), N = [];
2055
- F.map((B) => ({
2052
+ const D = /* @__PURE__ */ new Set(), U = [];
2053
+ N.map((B) => ({
2056
2054
  labelList: B.label.split(","),
2057
2055
  item: B
2058
2056
  })).forEach(({ item: B, labelList: $ }) => {
2059
2057
  $.forEach((_e) => {
2060
- D.has(_e) || (D.add(_e), N.push({
2058
+ D.has(_e) || (D.add(_e), U.push({
2061
2059
  label: _e,
2062
2060
  color: B.color
2063
2061
  }));
2064
2062
  });
2065
2063
  }), j({
2066
- formula1: oo(N.map((B) => B.label)),
2067
- formula2: N.map((B) => B.color === Te ? "" : B.color).join(",")
2064
+ formula1: ao(U.map((B) => B.label)),
2065
+ formula2: U.map((B) => B.color === Te ? "" : B.color).join(",")
2068
2066
  });
2069
- }, [F, j, p, _, C]);
2067
+ }, [N, j, p, I, _]);
2070
2068
  const re = Ae(
2071
2069
  () => async (D) => {
2072
2070
  if (!Pe(D)) {
@@ -2082,28 +2080,28 @@ function xr(e) {
2082
2080
  }), T("")) : (j == null || j({
2083
2081
  formula1: "",
2084
2082
  formula2: c
2085
- }), m("="), T(S.t("dataValidation.validFail.formulaError")));
2083
+ }), f("="), T(v.t("dataValidation.validFail.formulaError")));
2086
2084
  },
2087
2085
  [c, j]
2088
2086
  ), ae = He({}), [se, O] = W(!1);
2089
2087
  return _n((D) => {
2090
2088
  var B;
2091
- const N = (B = ae.current) == null ? void 0 : B.handleOutClick;
2092
- N && N(D, () => O(!1));
2089
+ const U = (B = ae.current) == null ? void 0 : B.handleOutClick;
2090
+ U && U(D, () => O(!1));
2093
2091
  }), /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
2094
- /* @__PURE__ */ h.jsx(Z, { label: S.t("dataValidation.list.options"), children: /* @__PURE__ */ h.jsxs(
2095
- mn,
2092
+ /* @__PURE__ */ h.jsx(Z, { label: v.t("dataValidation.list.options"), children: /* @__PURE__ */ h.jsxs(
2093
+ fn,
2096
2094
  {
2097
2095
  value: p,
2098
2096
  onChange: (D) => {
2099
- d(D), m(_), D === "1" && j({
2100
- formula1: _ === "=" ? "" : _,
2101
- formula2: C.join(",")
2097
+ d(D), f(I), D === "1" && j({
2098
+ formula1: I === "=" ? "" : I,
2099
+ formula2: _.join(",")
2102
2100
  });
2103
2101
  },
2104
2102
  children: [
2105
- /* @__PURE__ */ h.jsx(xe, { value: "0", children: S.t("dataValidation.list.customOptions") }),
2106
- /* @__PURE__ */ h.jsx(xe, { value: "1", children: S.t("dataValidation.list.refOptions") })
2103
+ /* @__PURE__ */ h.jsx(xe, { value: "0", children: v.t("dataValidation.list.customOptions") }),
2104
+ /* @__PURE__ */ h.jsx(xe, { value: "1", children: v.t("dataValidation.list.refOptions") })
2107
2105
  ]
2108
2106
  }
2109
2107
  ) }),
@@ -2111,15 +2109,15 @@ function xr(e) {
2111
2109
  /* @__PURE__ */ h.jsx(
2112
2110
  So,
2113
2111
  {
2114
- initValue: f,
2112
+ initValue: g,
2115
2113
  unitId: n,
2116
2114
  subUnitId: a,
2117
2115
  isFocus: se,
2118
2116
  onChange: (D = "") => {
2119
- const N = (D != null ? D : "").trim();
2120
- w(N), re(N);
2117
+ const U = (D != null ? D : "").trim();
2118
+ R(U), re(U);
2121
2119
  },
2122
- errorText: E || U || void 0,
2120
+ errorText: E || F || void 0,
2123
2121
  onFocus: () => O(!0),
2124
2122
  actions: ae.current,
2125
2123
  isSupportAcrossSheet: !0
@@ -2130,7 +2128,7 @@ function xr(e) {
2130
2128
  /* @__PURE__ */ h.jsx(
2131
2129
  sa,
2132
2130
  {
2133
- list: F,
2131
+ list: N,
2134
2132
  onListChange: H,
2135
2133
  rowHeight: 32,
2136
2134
  margin: [0, 12],
@@ -2151,7 +2149,7 @@ function xr(e) {
2151
2149
  ),
2152
2150
  /* @__PURE__ */ h.jsxs("a", { className: ne.dataValidationFormulaListAdd, onClick: te, children: [
2153
2151
  /* @__PURE__ */ h.jsx(Ro, {}),
2154
- S.t("dataValidation.list.add")
2152
+ v.t("dataValidation.list.add")
2155
2153
  ] })
2156
2154
  ] }) })
2157
2155
  ] });
@@ -2177,7 +2175,7 @@ const jo = "data-validation.custom-formula-input", xt = "data-validation.formula
2177
2175
  function Mt(e) {
2178
2176
  var a;
2179
2177
  const { value: t, onChange: o } = e, n = L(J);
2180
- return /* @__PURE__ */ h.jsx(Z, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(mn, { value: `${(a = t.renderMode) != null ? a : de.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2178
+ return /* @__PURE__ */ h.jsx(Z, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(fn, { value: `${(a = t.renderMode) != null ? a : de.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2181
2179
  /* @__PURE__ */ h.jsx(xe, { value: `${de.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2182
2180
  /* @__PURE__ */ h.jsx(xe, { value: `${de.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2183
2181
  /* @__PURE__ */ h.jsx(xe, { value: `${de.TEXT}`, children: n.t("dataValidation.renderMode.text") })
@@ -2260,10 +2258,10 @@ let ln = class {
2260
2258
  return ((o = t == null ? void 0 : t.fs) != null ? o : 10) * 1.6;
2261
2259
  }
2262
2260
  async _parseFormula(e, t, o) {
2263
- var c, u, p, d, f, m, _, w, S;
2264
- const { formula1: n = Ra, formula2: a = Da } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Ft((p = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : p[0]), l = Ft((m = (f = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : f[0]) == null ? void 0 : m[0]), s = On(String(r)) && On(String(l));
2261
+ var c, u, p, d, g, f, I, R, v;
2262
+ const { formula1: n = Ra, formula2: a = Da } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Ft((p = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : p[0]), l = Ft((f = (g = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : g[0]) == null ? void 0 : f[0]), s = On(String(r)) && On(String(l));
2265
2263
  return {
2266
- formula1: Pe(n) ? Ft((S = (w = (_ = i == null ? void 0 : i[0]) == null ? void 0 : _.result) == null ? void 0 : w[0]) == null ? void 0 : S[0]) : n,
2264
+ formula1: Pe(n) ? Ft((v = (R = (I = i == null ? void 0 : i[0]) == null ? void 0 : I.result) == null ? void 0 : R[0]) == null ? void 0 : v[0]) : n,
2267
2265
  formula2: Pe(a) ? l : a,
2268
2266
  isFormulaValid: s
2269
2267
  };
@@ -2276,11 +2274,11 @@ let ln = class {
2276
2274
  const d = this._dataValidationModel.getValidator(p.type);
2277
2275
  if (!d)
2278
2276
  return;
2279
- const f = this._themeService.getCurrentTheme();
2277
+ const g = this._themeService.getCurrentTheme();
2280
2278
  if (!((E = d.skipDefaultFontRender) != null && E.call(d, p, u, { unitId: a, subUnitId: i, row: l, column: s })))
2281
2279
  return;
2282
- const m = d.parseFormulaSync(p, a, i), { formula1: _ } = m, w = this._calc(c, o), { a: S, d: R } = e.getTransform(), I = bn(w.left, S), V = bn(w.top, R), C = la.create().composeMatrix({
2283
- left: I,
2280
+ const f = d.parseFormulaSync(p, a, i), { formula1: I } = f, R = this._calc(c, o), { a: v, d: w } = e.getTransform(), C = bn(R.left, v), V = bn(R.top, w), _ = la.create().composeMatrix({
2281
+ left: C,
2284
2282
  top: V,
2285
2283
  scaleX: 1,
2286
2284
  scaleY: 1,
@@ -2289,13 +2287,13 @@ let ln = class {
2289
2287
  skewY: 0,
2290
2288
  flipX: !1,
2291
2289
  flipY: !1
2292
- }), g = c.endX - c.startX, v = c.endY - c.startY;
2293
- e.save(), e.beginPath(), e.rect(c.startX, c.startY, g, v), e.clip();
2294
- const y = C.getMatrix();
2290
+ }), S = c.endX - c.startX, m = c.endY - c.startY;
2291
+ e.save(), e.beginPath(), e.rect(c.startX, c.startY, S, m), e.clip();
2292
+ const y = _.getMatrix();
2295
2293
  e.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
2296
- const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, U = String(u) === String(_), T = f.hyacinth500;
2294
+ const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, F = String(u) === String(I), T = g.hyacinth500;
2297
2295
  da.drawWith(e, {
2298
- checked: U,
2296
+ checked: F,
2299
2297
  width: P,
2300
2298
  height: P,
2301
2299
  fill: (j = (x = o == null ? void 0 : o.cl) == null ? void 0 : x.rgb) != null ? j : T
@@ -2306,16 +2304,16 @@ let ln = class {
2306
2304
  return s <= l && s >= r && c <= i && c >= a;
2307
2305
  }
2308
2306
  async onPointerDown(e, t) {
2309
- var m;
2307
+ var f;
2310
2308
  if (t.button === 2)
2311
2309
  return;
2312
2310
  const { primaryWithCoord: o, unitId: n, subUnitId: a, worksheet: i, row: r, col: l } = e, s = ie(i.getCellRaw(r, l)), c = this._dataValidationModel.getRuleByLocation(n, a, r, l);
2313
2311
  if (!c)
2314
2312
  return;
2315
2313
  const u = this._dataValidationModel.getValidator(c.type);
2316
- if (!u || !((m = u.skipDefaultFontRender) != null && m.call(u, c, s, { unitId: n, subUnitId: a, row: r, column: l })))
2314
+ if (!u || !((f = u.skipDefaultFontRender) != null && f.call(u, c, s, { unitId: n, subUnitId: a, row: r, column: l })))
2317
2315
  return;
2318
- const { formula1: p, formula2: d } = await this._parseFormula(c, n, a), f = {
2316
+ const { formula1: p, formula2: d } = await this._parseFormula(c, n, a), g = {
2319
2317
  range: {
2320
2318
  startColumn: o.actualColumn,
2321
2319
  endColumn: o.actualColumn,
@@ -2329,7 +2327,7 @@ let ln = class {
2329
2327
  };
2330
2328
  this._commandService.executeCommand(
2331
2329
  gn.id,
2332
- f
2330
+ g
2333
2331
  );
2334
2332
  }
2335
2333
  onPointerEnter(e, t) {
@@ -2353,7 +2351,7 @@ var kr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Hr = (e, t
2353
2351
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2354
2352
  return n && a && kr(t, o, a), a;
2355
2353
  }, Yr = (e, t) => (o, n) => t(o, n, e);
2356
- let fe = class {
2354
+ let me = class {
2357
2355
  constructor(e) {
2358
2356
  M(this, "canvasRender", null);
2359
2357
  M(this, "dropdown");
@@ -2362,10 +2360,10 @@ let fe = class {
2362
2360
  this.injector = e;
2363
2361
  }
2364
2362
  };
2365
- fe = Hr([
2363
+ me = Hr([
2366
2364
  Yr(0, b(Ne))
2367
- ], fe);
2368
- class Xr extends fe {
2365
+ ], me);
2366
+ class Xr extends me {
2369
2367
  constructor() {
2370
2368
  super(...arguments);
2371
2369
  M(this, "id", z.CHECKBOX);
@@ -2373,7 +2371,7 @@ class Xr extends fe {
2373
2371
  M(this, "formulaInput", Fo);
2374
2372
  }
2375
2373
  }
2376
- class zr extends fe {
2374
+ class zr extends me {
2377
2375
  constructor() {
2378
2376
  super(...arguments);
2379
2377
  M(this, "id", z.CUSTOM);
@@ -2381,7 +2379,7 @@ class zr extends fe {
2381
2379
  }
2382
2380
  }
2383
2381
  const Kr = "data-validation.formula-input";
2384
- class Gr extends fe {
2382
+ class Gr extends me {
2385
2383
  constructor() {
2386
2384
  super(...arguments);
2387
2385
  M(this, "id", z.DATE);
@@ -2390,7 +2388,7 @@ class Gr extends fe {
2390
2388
  M(this, "dropdown", Oo);
2391
2389
  }
2392
2390
  }
2393
- class Zr extends fe {
2391
+ class Zr extends me {
2394
2392
  constructor() {
2395
2393
  super(...arguments);
2396
2394
  M(this, "id", z.DECIMAL);
@@ -2414,10 +2412,10 @@ function Ht(e, t, o, n) {
2414
2412
  let s;
2415
2413
  const c = [];
2416
2414
  l.forEach((d) => {
2417
- const { layout: f } = d, { width: m, height: _ } = f;
2418
- !s || s.width + m + Wt > i ? (s = {
2419
- width: m,
2420
- height: _,
2415
+ const { layout: g } = d, { width: f, height: I } = g;
2416
+ !s || s.width + f + Wt > i ? (s = {
2417
+ width: f,
2418
+ height: I,
2421
2419
  items: [{
2422
2420
  ...d,
2423
2421
  left: 0
@@ -2425,11 +2423,11 @@ function Ht(e, t, o, n) {
2425
2423
  }, c.push(s)) : (s.items.push({
2426
2424
  ...d,
2427
2425
  left: s.width + Wt
2428
- }), s.width = s.width + m + Wt);
2426
+ }), s.width = s.width + f + Wt);
2429
2427
  });
2430
2428
  let u = 0, p = 0;
2431
- return c.forEach((d, f) => {
2432
- p = Math.max(p, d.width), f === c.length - 1 ? u += d.height : u += d.height + Uo;
2429
+ return c.forEach((d, g) => {
2430
+ p = Math.max(p, d.width), g === c.length - 1 ? u += d.height : u += d.height + Uo;
2433
2431
  }), {
2434
2432
  lines: c,
2435
2433
  totalHeight: u,
@@ -2486,38 +2484,38 @@ let cn = class {
2486
2484
  // eslint-disable-next-line max-lines-per-function
2487
2485
  drawWith(e, t, o, n) {
2488
2486
  var X, k;
2489
- const { primaryWithCoord: a, row: i, col: r, style: l, data: s, subUnitId: c } = t, u = a.isMergedMainCell ? a.mergeInfo : a, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: f = 0, topOffset: m = 0, downOffset: _ = 0 } = p || {}, w = this._ensureMap(c), S = this._generateKey(i, r), R = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2490
- if (!R)
2487
+ const { primaryWithCoord: a, row: i, col: r, style: l, data: s, subUnitId: c } = t, u = a.isMergedMainCell ? a.mergeInfo : a, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: d = 0, rightOffset: g = 0, topOffset: f = 0, downOffset: I = 0 } = p || {}, R = this._ensureMap(c), v = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2488
+ if (!w)
2491
2489
  return;
2492
- const I = this._dataValidationModel.getValidator(R.type);
2493
- if (!I)
2490
+ const C = this._dataValidationModel.getValidator(w.type);
2491
+ if (!C)
2494
2492
  return;
2495
2493
  const V = {
2496
2494
  startX: u.startX + d,
2497
- endX: u.endX - f,
2498
- startY: u.startY + m,
2499
- endY: u.endY - _
2500
- }, C = V.endX - V.startX, g = V.endY - V.startY, { cl: v } = l || {}, y = (X = typeof v == "object" ? v == null ? void 0 : v.rgb : v) != null ? X : "#000", P = jt(l != null ? l : void 0), { vt: U, ht: T } = l || {}, E = U != null ? U : ue.MIDDLE, A = (k = ie(s)) != null ? k : "", x = I.parseCellValue(A), j = I.getListWithColorMap(R), F = Ht(x, P, C, g);
2501
- this._drawDownIcon(e, V, C, g, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, C - Le, g), e.clip(), e.translateWithPrecision(dn, Et);
2495
+ endX: u.endX - g,
2496
+ startY: u.startY + f,
2497
+ endY: u.endY - I
2498
+ }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, y = (X = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? X : "#000", P = jt(l != null ? l : void 0), { vt: F, ht: T } = l || {}, E = F != null ? F : ue.MIDDLE, A = (k = ie(s)) != null ? k : "", x = C.parseCellValue(A), j = C.getListWithColorMap(w), N = Ht(x, P, _, S);
2499
+ this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Le, S), e.clip(), e.translateWithPrecision(dn, Et);
2502
2500
  let H = 0;
2503
2501
  switch (E) {
2504
2502
  case ue.MIDDLE:
2505
- H = (F.contentHeight - F.totalHeight) / 2;
2503
+ H = (N.contentHeight - N.totalHeight) / 2;
2506
2504
  break;
2507
2505
  case ue.BOTTOM:
2508
- H = F.contentHeight - F.totalHeight;
2506
+ H = N.contentHeight - N.totalHeight;
2509
2507
  break;
2510
2508
  }
2511
- e.translateWithPrecision(0, H), F.lines.forEach((K, q) => {
2509
+ e.translateWithPrecision(0, H), N.lines.forEach((K, q) => {
2512
2510
  e.save();
2513
2511
  const { width: ee, height: te, items: re } = K;
2514
2512
  let ae = 0;
2515
2513
  switch (T) {
2516
2514
  case Ye.RIGHT:
2517
- ae = F.contentWidth - ee;
2515
+ ae = N.contentWidth - ee;
2518
2516
  break;
2519
2517
  case Ye.CENTER:
2520
- ae = (F.contentWidth - ee) / 2;
2518
+ ae = (N.contentWidth - ee) / 2;
2521
2519
  break;
2522
2520
  }
2523
2521
  e.translate(ae, q * (te + Uo)), re.forEach((se) => {
@@ -2528,44 +2526,44 @@ let cn = class {
2528
2526
  fill: j[se.text]
2529
2527
  }), e.restore();
2530
2528
  }), e.restore();
2531
- }), e.restore(), w.set(S, {
2529
+ }), e.restore(), R.set(v, {
2532
2530
  left: V.startX,
2533
2531
  top: V.startY,
2534
- width: F.contentWidth + dn + Le,
2535
- height: F.contentHeight + Et * 2
2532
+ width: N.contentWidth + dn + Le,
2533
+ height: N.contentHeight + Et * 2
2536
2534
  });
2537
2535
  }
2538
2536
  calcCellAutoHeight(e) {
2539
- var C;
2537
+ var _;
2540
2538
  const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, p = t.isMergedMainCell ? t.mergeInfo : t, d = {
2541
2539
  startX: p.startX + l,
2542
2540
  endX: p.endX - s,
2543
2541
  startY: p.startY + c,
2544
2542
  endY: p.endY - u
2545
- }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2546
- if (!f)
2543
+ }, g = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2544
+ if (!g)
2547
2545
  return;
2548
- const m = this._dataValidationModel.getValidator(f.type);
2549
- if (!m)
2546
+ const f = this._dataValidationModel.getValidator(g.type);
2547
+ if (!f)
2550
2548
  return;
2551
- const _ = d.endX - d.startX, w = d.endY - d.startY, S = (C = ie(n)) != null ? C : "", R = m.parseCellValue(S), I = jt(o != null ? o : void 0);
2552
- return Ht(R, I, _, w).cellAutoHeight;
2549
+ const I = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), C = jt(o != null ? o : void 0);
2550
+ return Ht(w, C, I, R).cellAutoHeight;
2553
2551
  }
2554
2552
  calcCellAutoWidth(e) {
2555
- var C;
2553
+ var _;
2556
2554
  const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: c = 0, downOffset: u = 0 } = r || {}, p = t.isMergedMainCell ? t.mergeInfo : t, d = {
2557
2555
  startX: p.startX + l,
2558
2556
  endX: p.endX - s,
2559
2557
  startY: p.startY + c,
2560
2558
  endY: p.endY - u
2561
- }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2562
- if (!f)
2559
+ }, g = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2560
+ if (!g)
2563
2561
  return;
2564
- const m = this._dataValidationModel.getValidator(f.type);
2565
- if (!m)
2562
+ const f = this._dataValidationModel.getValidator(g.type);
2563
+ if (!f)
2566
2564
  return;
2567
- const _ = d.endX - d.startX, w = d.endY - d.startY, S = (C = ie(n)) != null ? C : "", R = m.parseCellValue(S), I = jt(o != null ? o : void 0);
2568
- return Ht(R, I, _, w).calcAutoWidth;
2565
+ const I = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), C = jt(o != null ? o : void 0);
2566
+ return Ht(w, C, I, R).calcAutoWidth;
2569
2567
  }
2570
2568
  isHit(e, t) {
2571
2569
  const { primaryWithCoord: o } = t, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = e;
@@ -2596,7 +2594,7 @@ cn = os([
2596
2594
  Yt(1, b(Ve)),
2597
2595
  Yt(2, b(oe))
2598
2596
  ], cn);
2599
- class is extends fe {
2597
+ class is extends me {
2600
2598
  constructor() {
2601
2599
  super(...arguments);
2602
2600
  M(this, "id", z.LIST_MULTIPLE);
@@ -2609,7 +2607,7 @@ var rs = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, ls = (e, t
2609
2607
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2610
2608
  return n && a && rs(t, o, a), a;
2611
2609
  }, pt = (e, t) => (o, n) => t(o, n, e);
2612
- const Oe = 4, mt = 4, he = 14, pe = 6, We = 4, Xt = 8, ds = "#565656", Wn = 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");
2610
+ const Oe = 4, ft = 4, he = 14, pe = 6, We = 4, Xt = 8, ds = "#565656", Wn = 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");
2613
2611
  function cs(e, t) {
2614
2612
  const o = e.length;
2615
2613
  return {
@@ -2658,14 +2656,14 @@ function Bo(e, t, o) {
2658
2656
  docViewModel: i
2659
2657
  };
2660
2658
  }
2661
- function ft(e, t, o) {
2659
+ function mt(e, t, o) {
2662
2660
  const {
2663
2661
  documentSkeleton: n,
2664
2662
  docModel: a,
2665
2663
  docViewModel: i
2666
2664
  } = Bo(e, t, o);
2667
2665
  return {
2668
- documents: new ma(`DOCUMENTS_${en.generateRandomId()}`, n, {
2666
+ documents: new fa(`DOCUMENTS_${en.generateRandomId()}`, n, {
2669
2667
  pageMarginLeft: 0,
2670
2668
  pageMarginTop: 0
2671
2669
  }),
@@ -2721,13 +2719,13 @@ let un = class {
2721
2719
  let u;
2722
2720
  switch (i) {
2723
2721
  case ue.MIDDLE:
2724
- u = (n - mt) / 2;
2722
+ u = (n - ft) / 2;
2725
2723
  break;
2726
2724
  case ue.BOTTOM:
2727
- u = n - s - a - We + (a / 2 - mt / 2);
2725
+ u = n - s - a - We + (a / 2 - ft / 2);
2728
2726
  break;
2729
2727
  default:
2730
- u = l + We + (a / 2 - mt / 2);
2728
+ u = l + We + (a / 2 - ft / 2);
2731
2729
  break;
2732
2730
  }
2733
2731
  e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Wn), e.restore();
@@ -2740,41 +2738,41 @@ let un = class {
2740
2738
  const p = this._dataValidationModel.getValidator(u.type);
2741
2739
  if (!p)
2742
2740
  return;
2743
- const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: f = 0, rightOffset: m = 0, topOffset: _ = 0, downOffset: w = 0 } = d || {};
2741
+ const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: g = 0, rightOffset: f = 0, topOffset: I = 0, downOffset: R = 0 } = d || {};
2744
2742
  if (!u || !p || !p || p.id.indexOf(z.LIST) !== 0 || !p.skipDefaultFontRender(u))
2745
2743
  return;
2746
- const S = {
2747
- startX: c.startX + f,
2748
- endX: c.endX - m,
2749
- startY: c.startY + _,
2750
- endY: c.endY - w
2751
- }, R = S.endX - S.startX, I = S.endY - S.startY, V = this._ensureMap(s), C = this._generateKey(a, i), g = p.getListWithColor(u), v = ie(l), y = `${v != null ? v : ""}`, P = g.find((x) => x.label === y);
2752
- let { tb: U, vt: T, ht: E, pd: A } = r || {};
2753
- if (U = U != null ? U : Se.WRAP, T = T != null ? T : ue.BOTTOM, E = E != null ? E : le.ht, A = A != null ? A : le.pd, u.renderMode === de.ARROW) {
2754
- const { l: x = le.pd.l, t: j = le.pd.t, r: F = le.pd.r, b: H = le.pd.b } = A, X = R - x - F - he - 4, { documentSkeleton: k, documents: K, docModel: q } = ft(y, this._localeService, r);
2755
- U === Se.WRAP && q.updateDocumentDataPageSize(Math.max(X, 1)), k.calculate(), k.getActualSize();
2756
- const ee = et(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Hn(X, I - j - H, re, te, T, E, !0);
2757
- this._drawDownIcon(e, S, R, I, te, T, A), e.save(), e.translateWithPrecision(S.startX + x, S.startY + j), e.beginPath(), e.rect(0, 0, R - x - F, I - j - H), e.clip(), e.translateWithPrecision(0, ae), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), K.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(C, {
2758
- left: S.endX + x + o.rowHeaderWidth - he,
2759
- top: S.startY + j + o.columnHeaderHeight,
2744
+ const v = {
2745
+ startX: c.startX + g,
2746
+ endX: c.endX - f,
2747
+ startY: c.startY + I,
2748
+ endY: c.endY - R
2749
+ }, w = v.endX - v.startX, C = v.endY - v.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = p.getListWithColor(u), m = ie(l), y = `${m != null ? m : ""}`, P = S.find((x) => x.label === y);
2750
+ let { tb: F, vt: T, ht: E, pd: A } = r || {};
2751
+ if (F = F != null ? F : Se.WRAP, T = T != null ? T : ue.BOTTOM, E = E != null ? E : le.ht, A = A != null ? A : le.pd, u.renderMode === de.ARROW) {
2752
+ const { l: x = le.pd.l, t: j = le.pd.t, r: N = le.pd.r, b: H = le.pd.b } = A, X = w - x - N - he - 4, { documentSkeleton: k, documents: K, docModel: q } = mt(y, this._localeService, r);
2753
+ F === Se.WRAP && q.updateDocumentDataPageSize(Math.max(X, 1)), k.calculate(), k.getActualSize();
2754
+ const ee = et(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Hn(X, C - j - H, re, te, T, E, !0);
2755
+ this._drawDownIcon(e, v, w, C, te, T, A), e.save(), e.translateWithPrecision(v.startX + x, v.startY + j), e.beginPath(), e.rect(0, 0, w - x - N, C - j - H), e.clip(), e.translateWithPrecision(0, ae), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), K.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(_, {
2756
+ left: v.endX + x + o.rowHeaderWidth - he,
2757
+ top: v.startY + j + o.columnHeaderHeight,
2760
2758
  width: he,
2761
- height: I - j - H
2759
+ height: C - j - H
2762
2760
  });
2763
2761
  } else {
2764
- e.save(), e.translateWithPrecision(S.startX, S.startY), e.beginPath(), e.rect(0, 0, R, I), e.clip();
2765
- const x = R - pe * 2 - Oe - he - 4, { documentSkeleton: j, documents: F, docModel: H } = ft(y, this._localeService, r);
2766
- U === Se.WRAP && H.updateDocumentDataPageSize(Math.max(x, 1)), j.calculate();
2767
- const X = et(j), { height: k, width: K } = X, { paddingTop: q, paddingLeft: ee } = Hn(x, I, K, k, T, E);
2762
+ e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, w, C), e.clip();
2763
+ const x = w - pe * 2 - Oe - he - 4, { documentSkeleton: j, documents: N, docModel: H } = mt(y, this._localeService, r);
2764
+ F === Se.WRAP && H.updateDocumentDataPageSize(Math.max(x, 1)), j.calculate();
2765
+ const X = et(j), { height: k, width: K } = X, { paddingTop: q, paddingLeft: ee } = Hn(x, C, K, k, T, E);
2768
2766
  e.translateWithPrecision(pe, q);
2769
- const te = Math.max(R - pe * 2, 1), re = k;
2767
+ const te = Math.max(w - pe * 2, 1), re = k;
2770
2768
  qn.drawWith(e, {
2771
2769
  width: te,
2772
2770
  height: re,
2773
2771
  fill: (P == null ? void 0 : P.color) || Te,
2774
2772
  radius: Xt
2775
- }), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), F.render(e), e.restore(), e.translateWithPrecision(x + Oe + 4, (k - mt) / 2), e.fillStyle = ds, e.fill(Wn), e.restore(), V.set(C, {
2776
- left: S.startX + pe + o.rowHeaderWidth,
2777
- top: S.startY + q + o.columnHeaderHeight,
2773
+ }), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), N.render(e), e.restore(), e.translateWithPrecision(x + Oe + 4, (k - ft) / 2), e.fillStyle = ds, e.fill(Wn), e.restore(), V.set(_, {
2774
+ left: v.startX + pe + o.rowHeaderWidth,
2775
+ top: v.startY + q + o.columnHeaderHeight,
2778
2776
  width: te,
2779
2777
  height: re
2780
2778
  });
@@ -2784,23 +2782,23 @@ let un = class {
2784
2782
  const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2785
2783
  if (!d || d.renderMode === de.TEXT)
2786
2784
  return;
2787
- const f = {
2785
+ const g = {
2788
2786
  startX: r.startX + s,
2789
2787
  endX: r.endX - c,
2790
2788
  startY: r.startY + u,
2791
2789
  endY: r.endY - p
2792
- }, m = f.endX - f.startX, _ = ie(n), w = `${_ != null ? _ : ""}`;
2793
- let { tb: S, pd: R } = o || {};
2794
- const { t: I = le.pd.t, b: V = le.pd.b } = R != null ? R : {};
2795
- if (S = S != null ? S : Se.WRAP, d.renderMode === de.ARROW) {
2796
- const C = m - he, { documentSkeleton: g, docModel: v } = ft(w, this._localeService, o);
2797
- S === Se.WRAP && v.updateDocumentDataPageSize(Math.max(C, 1)), g.calculate(), g.getActualSize();
2798
- const y = et(g), { height: P } = y;
2799
- return P + I + V + We * 2;
2790
+ }, f = g.endX - g.startX, I = ie(n), R = `${I != null ? I : ""}`;
2791
+ let { tb: v, pd: w } = o || {};
2792
+ const { t: C = le.pd.t, b: V = le.pd.b } = w != null ? w : {};
2793
+ if (v = v != null ? v : Se.WRAP, d.renderMode === de.ARROW) {
2794
+ const _ = f - he, { documentSkeleton: S, docModel: m } = mt(R, this._localeService, o);
2795
+ v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2796
+ const y = et(S), { height: P } = y;
2797
+ return P + C + V + We * 2;
2800
2798
  } else {
2801
- const C = m - pe * 2 - Oe - he, { documentSkeleton: g, docModel: v } = Bo(w, this._localeService, o);
2802
- S === Se.WRAP && v.updateDocumentDataPageSize(Math.max(C, 1)), g.calculate();
2803
- const y = et(g), {
2799
+ const _ = f - pe * 2 - Oe - he, { documentSkeleton: S, docModel: m } = Bo(R, this._localeService, o);
2800
+ v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2801
+ const y = et(S), {
2804
2802
  height: P
2805
2803
  } = y;
2806
2804
  return P + We * 2;
@@ -2810,36 +2808,36 @@ let un = class {
2810
2808
  const { primaryWithCoord: t, style: o, data: n, row: a, col: i } = e, r = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, d = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, a, i);
2811
2809
  if (!d || d.renderMode === de.TEXT)
2812
2810
  return;
2813
- const f = {
2811
+ const g = {
2814
2812
  startX: r.startX + s,
2815
2813
  endX: r.endX - c,
2816
2814
  startY: r.startY + u,
2817
2815
  endY: r.endY - p
2818
- }, m = f.endX - f.startX, _ = ie(n), w = `${_ != null ? _ : ""}`;
2819
- let { tb: S, pd: R } = o || {};
2820
- const { l: I = le.pd.l, r: V = le.pd.r } = R != null ? R : {};
2821
- S = S != null ? S : Se.WRAP;
2822
- let C = pe * 2 + he;
2816
+ }, f = g.endX - g.startX, I = ie(n), R = `${I != null ? I : ""}`;
2817
+ let { tb: v, pd: w } = o || {};
2818
+ const { l: C = le.pd.l, r: V = le.pd.r } = w != null ? w : {};
2819
+ v = v != null ? v : Se.WRAP;
2820
+ let _ = pe * 2 + he;
2823
2821
  switch (d.renderMode) {
2824
2822
  case de.ARROW:
2825
- C = he + pe * 2 + V + I;
2823
+ _ = he + pe * 2 + V + C;
2826
2824
  break;
2827
2825
  case de.CUSTOM:
2828
- C = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2826
+ _ = he + pe * 2 + Oe * 2 + V + C + Xt / 2 + 1;
2829
2827
  break;
2830
2828
  // default is CUSTOM
2831
2829
  default:
2832
- C = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2830
+ _ = he + pe * 2 + Oe * 2 + V + C + Xt / 2 + 1;
2833
2831
  }
2834
- const g = m - C, { documentSkeleton: v, docModel: y } = ft(w, this._localeService, o);
2835
- return S === Se.WRAP && y.updateDocumentDataPageSize(Math.max(g, 1)), v.calculate(), v.getActualSize(), et(v).width + C;
2832
+ const S = f - _, { documentSkeleton: m, docModel: y } = mt(R, this._localeService, o);
2833
+ return v === Se.WRAP && y.updateDocumentDataPageSize(Math.max(S, 1)), m.calculate(), m.getActualSize(), et(m).width + _;
2836
2834
  }
2837
2835
  isHit(e, t) {
2838
2836
  const { subUnitId: o, row: n, col: a } = t, r = this._ensureMap(o).get(this._generateKey(n, a)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, a);
2839
2837
  if (!l || !r || l.renderMode === de.TEXT)
2840
2838
  return !1;
2841
- const { top: s, left: c, width: u, height: p } = r, { x: d, y: f } = e;
2842
- return d >= c && d <= c + u && f >= s && f <= s + p;
2839
+ const { top: s, left: c, width: u, height: p } = r, { x: d, y: g } = e;
2840
+ return d >= c && d <= c + u && g >= s && g <= s + p;
2843
2841
  }
2844
2842
  onPointerDown(e, t) {
2845
2843
  if (t.button === 2)
@@ -2867,7 +2865,7 @@ un = ls([
2867
2865
  pt(2, b(Ve)),
2868
2866
  pt(3, b(oe))
2869
2867
  ], un);
2870
- class us extends fe {
2868
+ class us extends me {
2871
2869
  constructor() {
2872
2870
  super(...arguments);
2873
2871
  M(this, "id", z.LIST);
@@ -2877,24 +2875,24 @@ class us extends fe {
2877
2875
  M(this, "formulaInput", yn);
2878
2876
  }
2879
2877
  }
2880
- class hs extends fe {
2878
+ class hs extends me {
2881
2879
  constructor() {
2882
2880
  super(...arguments);
2883
2881
  M(this, "id", z.TEXT_LENGTH);
2884
2882
  M(this, "formulaInput", xt);
2885
2883
  }
2886
2884
  }
2887
- class ps extends fe {
2885
+ class ps extends me {
2888
2886
  constructor() {
2889
2887
  super(...arguments);
2890
2888
  M(this, "id", z.WHOLE);
2891
2889
  M(this, "formulaInput", xt);
2892
2890
  }
2893
2891
  }
2894
- var ms = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, gs = (e, t, o, n) => {
2895
- for (var a = n > 1 ? void 0 : n ? fs(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2892
+ var fs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, gs = (e, t, o, n) => {
2893
+ for (var a = n > 1 ? void 0 : n ? ms(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2896
2894
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2897
- return n && a && ms(t, o, a), a;
2895
+ return n && a && fs(t, o, a), a;
2898
2896
  }, zt = (e, t) => (o, n) => t(o, n, e);
2899
2897
  let qe = class extends pn {
2900
2898
  constructor(e, t, o) {
@@ -2957,7 +2955,7 @@ let Yn = (gt = class extends Gn {
2957
2955
  }
2958
2956
  onStarting() {
2959
2957
  [
2960
- [me],
2958
+ [fe],
2961
2959
  [Ie],
2962
2960
  [lt],
2963
2961
  [ze],
@@ -3016,7 +3014,7 @@ let Xn = (vt = class extends Gn {
3016
3014
  }
3017
3015
  onStarting() {
3018
3016
  [
3019
- [me],
3017
+ [fe],
3020
3018
  [Ie],
3021
3019
  [lt],
3022
3020
  [ze],