@univerjs/sheets-conditional-formatting-ui 0.5.4 → 0.5.5-nightly.202501201336

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var ho = Object.defineProperty;
2
2
  var po = (t, e, r) => e in t ? ho(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var Xe = (t, e, r) => po(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { CommandType as Re, ICommandService as ge, IUniverInstanceService as ue, IUndoRedoService as vt, ObjectMatrix as Ze, Range as ze, sequenceExecute as fi, Inject as Q, LocaleService as Ie, Disposable as je, ColorKit as hi, BooleanNumber as De, useDependency as he, Injector as We, UniverInstanceType as re, Rectangle as Be, Tools as tr, get as go, set as mo, createInterceptorKey as pi, InterceptorManager as vo, generateRandomId as yo, toDisposable as gi, InterceptorEffectEnum as bo, DependentOn as mi, Plugin as vi, merge as yi, IConfigService as bi, registerDependencies as So, touchDependencies as $n } from "@univerjs/core";
5
- import { ConditionalFormattingRuleModel as me, CFRuleType as K, CFSubRuleType as G, AddConditionalRuleMutation as _e, AddConditionalRuleMutationUndoFactory as nr, CFNumberOperator as J, setConditionalRuleMutationUndoFactory as Je, SetConditionalRuleMutation as Ve, DeleteConditionalRuleMutationUndoFactory as Ge, DeleteConditionalRuleMutation as Ne, transformSupportSymmetryAnchor as Co, MoveConditionalRuleMutationUndoFactory as wo, MoveConditionalRuleMutation as fn, getColorScaleFromValue as Ro, iconMap as st, DEFAULT_BG_COLOR as _o, DEFAULT_FONT_COLOR as xo, defaultDataBarPositiveColor as Ft, defaultDataBarNativeColor as Vt, CFValueType as te, createDefaultValueByValueType as qt, removeUndefinedAttr as Io, createDefaultValue as hn, CFTextOperator as le, CFTimePeriodOperator as qe, iconGroup as Eo, getOppositeOperator as Qn, compareWithNumber as To, EMPTY_ICON_TYPE as Po, createDefaultRule as nt, ConditionalFormattingViewModel as Xt, SHEET_CONDITIONAL_FORMATTING_PLUGIN as Yt, isRangesEqual as Oo, ConditionalFormattingService as Si, DEFAULT_PADDING as Do, DEFAULT_WIDTH as Mo, UniverSheetsConditionalFormattingPlugin as Ci, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as No } from "@univerjs/sheets-conditional-formatting";
4
+ import { CommandType as Re, ICommandService as ge, IUniverInstanceService as ue, IUndoRedoService as vt, ObjectMatrix as Ze, Range as ze, sequenceExecute as fi, Inject as Q, LocaleService as Ie, Disposable as je, ColorKit as hi, BooleanNumber as De, useDependency as he, Injector as We, UniverInstanceType as ie, Rectangle as Be, Tools as tr, get as go, set as mo, createInterceptorKey as pi, InterceptorManager as vo, generateRandomId as yo, toDisposable as gi, InterceptorEffectEnum as bo, DependentOn as mi, Plugin as vi, merge as yi, IConfigService as bi, registerDependencies as So, touchDependencies as $n } from "@univerjs/core";
5
+ import { ConditionalFormattingRuleModel as me, CFRuleType as K, CFSubRuleType as X, AddConditionalRuleMutation as _e, AddConditionalRuleMutationUndoFactory as nr, CFNumberOperator as J, setConditionalRuleMutationUndoFactory as Je, SetConditionalRuleMutation as Ve, DeleteConditionalRuleMutationUndoFactory as Ge, DeleteConditionalRuleMutation as Ne, transformSupportSymmetryAnchor as Co, MoveConditionalRuleMutationUndoFactory as wo, MoveConditionalRuleMutation as fn, getColorScaleFromValue as Ro, iconMap as st, DEFAULT_BG_COLOR as _o, DEFAULT_FONT_COLOR as xo, defaultDataBarPositiveColor as Ft, defaultDataBarNativeColor as Vt, CFValueType as ne, createDefaultValueByValueType as qt, removeUndefinedAttr as Io, createDefaultValue as hn, CFTextOperator as le, CFTimePeriodOperator as qe, iconGroup as Eo, getOppositeOperator as Qn, compareWithNumber as To, EMPTY_ICON_TYPE as Po, createDefaultRule as nt, ConditionalFormattingViewModel as Xt, SHEET_CONDITIONAL_FORMATTING_PLUGIN as Yt, isRangesEqual as Oo, ConditionalFormattingService as Si, DEFAULT_PADDING as Do, DEFAULT_WIDTH as Mo, UniverSheetsConditionalFormattingPlugin as Ci, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as No } from "@univerjs/sheets-conditional-formatting";
6
6
  import { getSheetCommandTarget as xe, SheetsSelectionsService as ct, findAllRectangle as At, createTopMatrixFromMatrix as Wt, SetWorksheetActiveOperation as rr, SetSelectionsOperation as jo, checkRangesEditablePermission as pn, RemoveSheetMutation as Lo, setEndForRange as $o, SheetPermissionCheckController as zo, WorkbookEditablePermission as wi, RangeProtectionPermissionEditPoint as Ri, WorksheetEditPermission as _i, WorksheetSetCellStylePermission as xi, RefRangeService as Fo, handleDefaultRangeChangeWithEffectRefCommands as Vo, SheetInterceptorService as ir, INTERCEPTOR_POINT as qo, ClearSelectionFormatCommand as Ao, ClearSelectionAllCommand as Wo, RangeMergeUtil as Ho, AFTER_CELL_EDIT as Uo } from "@univerjs/sheets";
7
7
  import { useObservable as ko, ComponentManager as or, useSidebarClick as Kt, ILayoutService as Bo, useScrollYOverContainer as Go, ISidebarService as Xo, MenuItemType as Yo, getMenuHiddenObservable as Ko, RibbonStartGroup as Zo, IMenuManagerService as Jo } from "@univerjs/ui";
8
8
  import Le, { forwardRef as ut, useRef as Fe, createElement as yt, useMemo as Se, useState as H, useEffect as we } from "react";
@@ -28,7 +28,7 @@ const Mi = {
28
28
  stopIfTrue: !!i,
29
29
  rule: {
30
30
  type: K.highlightCell,
31
- subType: G.average,
31
+ subType: X.average,
32
32
  operator: o,
33
33
  style: n
34
34
  }
@@ -109,7 +109,7 @@ const Mi = {
109
109
  stopIfTrue: !!i,
110
110
  rule: {
111
111
  type: K.highlightCell,
112
- subType: G.duplicateValues,
112
+ subType: X.duplicateValues,
113
113
  style: n
114
114
  }
115
115
  };
@@ -135,7 +135,7 @@ const Mi = {
135
135
  stopIfTrue: !!i,
136
136
  rule: {
137
137
  type: K.highlightCell,
138
- subType: G.number,
138
+ subType: X.number,
139
139
  operator: o,
140
140
  style: n,
141
141
  value: R
@@ -151,7 +151,7 @@ const Mi = {
151
151
  stopIfTrue: !!i,
152
152
  rule: {
153
153
  type: K.highlightCell,
154
- subType: G.number,
154
+ subType: X.number,
155
155
  operator: o,
156
156
  style: n,
157
157
  value: R
@@ -174,7 +174,7 @@ const Mi = {
174
174
  stopIfTrue: !!i,
175
175
  rule: {
176
176
  type: K.highlightCell,
177
- subType: G.rank,
177
+ subType: X.rank,
178
178
  isPercent: o,
179
179
  isBottom: c,
180
180
  style: n,
@@ -197,7 +197,7 @@ const Mi = {
197
197
  stopIfTrue: !!i,
198
198
  rule: {
199
199
  type: K.highlightCell,
200
- subType: G.text,
200
+ subType: X.text,
201
201
  operator: o,
202
202
  style: n,
203
203
  value: c
@@ -219,7 +219,7 @@ const Mi = {
219
219
  stopIfTrue: !!i,
220
220
  rule: {
221
221
  type: K.highlightCell,
222
- subType: G.timePeriod,
222
+ subType: X.timePeriod,
223
223
  operator: o,
224
224
  style: n
225
225
  }
@@ -240,7 +240,7 @@ const Mi = {
240
240
  stopIfTrue: !!i,
241
241
  rule: {
242
242
  type: K.highlightCell,
243
- subType: G.uniqueValues,
243
+ subType: X.uniqueValues,
244
244
  style: n
245
245
  }
246
246
  };
@@ -502,120 +502,120 @@ function ur() {
502
502
  (function(r, n) {
503
503
  n(e);
504
504
  })(Ws, function(r) {
505
- function n(V) {
506
- return function(ce, E, T, D, L, B, q) {
507
- return V(ce, E, q);
505
+ function n(q) {
506
+ return function(ce, E, T, D, L, B, F) {
507
+ return q(ce, E, F);
508
508
  };
509
509
  }
510
- function i(V) {
510
+ function i(q) {
511
511
  return function(ce, E, T, D) {
512
512
  if (!ce || !E || typeof ce != "object" || typeof E != "object")
513
- return V(ce, E, T, D);
513
+ return q(ce, E, T, D);
514
514
  var L = D.get(ce), B = D.get(E);
515
515
  if (L && B)
516
516
  return L === E && B === ce;
517
517
  D.set(ce, E), D.set(E, ce);
518
- var q = V(ce, E, T, D);
519
- return D.delete(ce), D.delete(E), q;
518
+ var F = q(ce, E, T, D);
519
+ return D.delete(ce), D.delete(E), F;
520
520
  };
521
521
  }
522
- function o(V, Z) {
522
+ function o(q, Z) {
523
523
  var ce = {};
524
- for (var E in V)
525
- ce[E] = V[E];
524
+ for (var E in q)
525
+ ce[E] = q[E];
526
526
  for (var E in Z)
527
527
  ce[E] = Z[E];
528
528
  return ce;
529
529
  }
530
- function c(V) {
531
- return V.constructor === Object || V.constructor == null;
530
+ function c(q) {
531
+ return q.constructor === Object || q.constructor == null;
532
532
  }
533
- function v(V) {
534
- return typeof V.then == "function";
533
+ function v(q) {
534
+ return typeof q.then == "function";
535
535
  }
536
- function d(V, Z) {
537
- return V === Z || V !== V && Z !== Z;
536
+ function d(q, Z) {
537
+ return q === Z || q !== q && Z !== Z;
538
538
  }
539
539
  var y = "[object Arguments]", p = "[object Boolean]", C = "[object Date]", _ = "[object RegExp]", w = "[object Map]", S = "[object Number]", R = "[object Object]", h = "[object Set]", s = "[object String]", a = Object.prototype.toString;
540
- function u(V) {
541
- var Z = V.areArraysEqual, ce = V.areDatesEqual, E = V.areMapsEqual, T = V.areObjectsEqual, D = V.areRegExpsEqual, L = V.areSetsEqual, B = V.createIsNestedEqual, q = B(Y);
542
- function Y(X, ne, pe) {
543
- if (X === ne)
540
+ function u(q) {
541
+ var Z = q.areArraysEqual, ce = q.areDatesEqual, E = q.areMapsEqual, T = q.areObjectsEqual, D = q.areRegExpsEqual, L = q.areSetsEqual, B = q.createIsNestedEqual, F = B(Y);
542
+ function Y(G, te, pe) {
543
+ if (G === te)
544
544
  return !0;
545
- if (!X || !ne || typeof X != "object" || typeof ne != "object")
546
- return X !== X && ne !== ne;
547
- if (c(X) && c(ne))
548
- return T(X, ne, q, pe);
549
- var et = Array.isArray(X), Pe = Array.isArray(ne);
545
+ if (!G || !te || typeof G != "object" || typeof te != "object")
546
+ return G !== G && te !== te;
547
+ if (c(G) && c(te))
548
+ return T(G, te, F, pe);
549
+ var et = Array.isArray(G), Pe = Array.isArray(te);
550
550
  if (et || Pe)
551
- return et === Pe && Z(X, ne, q, pe);
552
- var Ce = a.call(X);
553
- return Ce !== a.call(ne) ? !1 : Ce === C ? ce(X, ne, q, pe) : Ce === _ ? D(X, ne, q, pe) : Ce === w ? E(X, ne, q, pe) : Ce === h ? L(X, ne, q, pe) : Ce === R || Ce === y ? v(X) || v(ne) ? !1 : T(X, ne, q, pe) : Ce === p || Ce === S || Ce === s ? d(X.valueOf(), ne.valueOf()) : !1;
551
+ return et === Pe && Z(G, te, F, pe);
552
+ var Ce = a.call(G);
553
+ return Ce !== a.call(te) ? !1 : Ce === C ? ce(G, te, F, pe) : Ce === _ ? D(G, te, F, pe) : Ce === w ? E(G, te, F, pe) : Ce === h ? L(G, te, F, pe) : Ce === R || Ce === y ? v(G) || v(te) ? !1 : T(G, te, F, pe) : Ce === p || Ce === S || Ce === s ? d(G.valueOf(), te.valueOf()) : !1;
554
554
  }
555
555
  return Y;
556
556
  }
557
- function b(V, Z, ce, E) {
558
- var T = V.length;
557
+ function b(q, Z, ce, E) {
558
+ var T = q.length;
559
559
  if (Z.length !== T)
560
560
  return !1;
561
561
  for (; T-- > 0; )
562
- if (!ce(V[T], Z[T], T, T, V, Z, E))
562
+ if (!ce(q[T], Z[T], T, T, q, Z, E))
563
563
  return !1;
564
564
  return !0;
565
565
  }
566
566
  var l = i(b);
567
- function g(V, Z) {
568
- return d(V.valueOf(), Z.valueOf());
567
+ function g(q, Z) {
568
+ return d(q.valueOf(), Z.valueOf());
569
569
  }
570
- function f(V, Z, ce, E) {
571
- var T = V.size === Z.size;
570
+ function f(q, Z, ce, E) {
571
+ var T = q.size === Z.size;
572
572
  if (!T)
573
573
  return !1;
574
- if (!V.size)
574
+ if (!q.size)
575
575
  return !0;
576
576
  var D = {}, L = 0;
577
- return V.forEach(function(B, q) {
577
+ return q.forEach(function(B, F) {
578
578
  if (T) {
579
- var Y = !1, X = 0;
580
- Z.forEach(function(ne, pe) {
581
- !Y && !D[X] && (Y = ce(q, pe, L, X, V, Z, E) && ce(B, ne, q, pe, V, Z, E)) && (D[X] = !0), X++;
579
+ var Y = !1, G = 0;
580
+ Z.forEach(function(te, pe) {
581
+ !Y && !D[G] && (Y = ce(F, pe, L, G, q, Z, E) && ce(B, te, F, pe, q, Z, E)) && (D[G] = !0), G++;
582
582
  }), L++, T = Y;
583
583
  }
584
584
  }), T;
585
585
  }
586
586
  var m = i(f), P = "_owner", M = Object.prototype.hasOwnProperty;
587
- function j(V, Z, ce, E) {
588
- var T = Object.keys(V), D = T.length;
587
+ function j(q, Z, ce, E) {
588
+ var T = Object.keys(q), D = T.length;
589
589
  if (Object.keys(Z).length !== D)
590
590
  return !1;
591
591
  for (var L; D-- > 0; ) {
592
592
  if (L = T[D], L === P) {
593
- var B = !!V.$$typeof, q = !!Z.$$typeof;
594
- if ((B || q) && B !== q)
593
+ var B = !!q.$$typeof, F = !!Z.$$typeof;
594
+ if ((B || F) && B !== F)
595
595
  return !1;
596
596
  }
597
- if (!M.call(Z, L) || !ce(V[L], Z[L], L, L, V, Z, E))
597
+ if (!M.call(Z, L) || !ce(q[L], Z[L], L, L, q, Z, E))
598
598
  return !1;
599
599
  }
600
600
  return !0;
601
601
  }
602
602
  var N = i(j);
603
- function I(V, Z) {
604
- return V.source === Z.source && V.flags === Z.flags;
603
+ function I(q, Z) {
604
+ return q.source === Z.source && q.flags === Z.flags;
605
605
  }
606
- function O(V, Z, ce, E) {
607
- var T = V.size === Z.size;
606
+ function O(q, Z, ce, E) {
607
+ var T = q.size === Z.size;
608
608
  if (!T)
609
609
  return !1;
610
- if (!V.size)
610
+ if (!q.size)
611
611
  return !0;
612
612
  var D = {};
613
- return V.forEach(function(L, B) {
613
+ return q.forEach(function(L, B) {
614
614
  if (T) {
615
- var q = !1, Y = 0;
616
- Z.forEach(function(X, ne) {
617
- !q && !D[Y] && (q = ce(L, X, B, ne, V, Z, E)) && (D[Y] = !0), Y++;
618
- }), T = q;
615
+ var F = !1, Y = 0;
616
+ Z.forEach(function(G, te) {
617
+ !F && !D[Y] && (F = ce(L, G, B, te, q, Z, E)) && (D[Y] = !0), Y++;
618
+ }), T = F;
619
619
  }
620
620
  }), T;
621
621
  }
@@ -635,38 +635,38 @@ function ur() {
635
635
  areRegExpsEqual: I,
636
636
  areSetsEqual: z,
637
637
  createIsNestedEqual: n
638
- }), ie = u(U);
639
- function ee(V, Z) {
640
- return ie(V, Z, void 0);
638
+ }), re = u(U);
639
+ function ee(q, Z) {
640
+ return re(q, Z, void 0);
641
641
  }
642
642
  var A = u(o(U, { createIsNestedEqual: function() {
643
643
  return d;
644
644
  } }));
645
- function F(V, Z) {
646
- return A(V, Z, void 0);
645
+ function V(q, Z) {
646
+ return A(q, Z, void 0);
647
647
  }
648
648
  var oe = u(k);
649
- function se(V, Z) {
650
- return oe(V, Z, /* @__PURE__ */ new WeakMap());
649
+ function se(q, Z) {
650
+ return oe(q, Z, /* @__PURE__ */ new WeakMap());
651
651
  }
652
652
  var de = u(o(k, {
653
653
  createIsNestedEqual: function() {
654
654
  return d;
655
655
  }
656
656
  }));
657
- function ye(V, Z) {
658
- return de(V, Z, /* @__PURE__ */ new WeakMap());
657
+ function ye(q, Z) {
658
+ return de(q, Z, /* @__PURE__ */ new WeakMap());
659
659
  }
660
- function Ee(V) {
661
- return u(o(U, V(U)));
660
+ function Ee(q) {
661
+ return u(o(U, q(U)));
662
662
  }
663
- function $e(V) {
664
- var Z = u(o(k, V(k)));
663
+ function $e(q) {
664
+ var Z = u(o(k, q(k)));
665
665
  return function(ce, E, T) {
666
666
  return T === void 0 && (T = /* @__PURE__ */ new WeakMap()), Z(ce, E, T);
667
667
  };
668
668
  }
669
- r.circularDeepEqual = se, r.circularShallowEqual = ye, r.createCustomCircularEqual = $e, r.createCustomEqual = Ee, r.deepEqual = ee, r.sameValueZeroEqual = d, r.shallowEqual = F, Object.defineProperty(r, "__esModule", { value: !0 });
669
+ r.circularDeepEqual = se, r.circularShallowEqual = ye, r.createCustomCircularEqual = $e, r.createCustomEqual = Ee, r.deepEqual = ee, r.sameValueZeroEqual = d, r.shallowEqual = V, Object.defineProperty(r, "__esModule", { value: !0 });
670
670
  });
671
671
  }(zt, zt.exports)), zt.exports;
672
672
  }
@@ -700,7 +700,7 @@ function St() {
700
700
  if (Tr) return ae;
701
701
  Tr = 1, Object.defineProperty(ae, "__esModule", {
702
702
  value: !0
703
- }), ae.bottom = n, ae.childrenEqual = d, ae.cloneLayout = i, ae.cloneLayoutItem = v, ae.collides = p, ae.compact = C, ae.compactItem = S, ae.compactType = V, ae.correctBounds = R, ae.fastPositionEqual = y, ae.fastRGLPropsEqual = void 0, ae.getAllCollisions = a, ae.getFirstCollision = s, ae.getLayoutItem = h, ae.getStatics = u, ae.modifyLayout = o, ae.moveElement = b, ae.moveElementAwayFromCollision = l, ae.noop = void 0, ae.perc = g, ae.resizeItemInDirection = A, ae.setTopLeft = oe, ae.setTransform = F, ae.sortLayoutItems = se, ae.sortLayoutItemsByColRow = ye, ae.sortLayoutItemsByRowCol = de, ae.synchronizeLayoutWithChildren = Ee, ae.validateLayout = $e, ae.withLayoutItem = c;
703
+ }), ae.bottom = n, ae.childrenEqual = d, ae.cloneLayout = i, ae.cloneLayoutItem = v, ae.collides = p, ae.compact = C, ae.compactItem = S, ae.compactType = q, ae.correctBounds = R, ae.fastPositionEqual = y, ae.fastRGLPropsEqual = void 0, ae.getAllCollisions = a, ae.getFirstCollision = s, ae.getLayoutItem = h, ae.getStatics = u, ae.modifyLayout = o, ae.moveElement = b, ae.moveElementAwayFromCollision = l, ae.noop = void 0, ae.perc = g, ae.resizeItemInDirection = A, ae.setTopLeft = oe, ae.setTransform = V, ae.sortLayoutItems = se, ae.sortLayoutItemsByColRow = ye, ae.sortLayoutItemsByRowCol = de, ae.synchronizeLayoutWithChildren = Ee, ae.validateLayout = $e, ae.withLayoutItem = c;
704
704
  var t = /* @__PURE__ */ ur(), e = r(Le);
705
705
  function r(E) {
706
706
  return E && E.__esModule ? E : { default: E };
@@ -758,10 +758,10 @@ function St() {
758
758
  return !(E.i === T.i || E.x + E.w <= T.x || E.x >= T.x + T.w || E.y + E.h <= T.y || E.y >= T.y + T.h);
759
759
  }
760
760
  function C(E, T, D, L) {
761
- const B = u(E), q = se(E, T), Y = Array(E.length);
762
- for (let X = 0, ne = q.length; X < ne; X++) {
763
- let pe = v(q[X]);
764
- pe.static || (pe = S(B, pe, T, D, q, L), B.push(pe)), Y[E.indexOf(q[X])] = pe, pe.moved = !1;
761
+ const B = u(E), F = se(E, T), Y = Array(E.length);
762
+ for (let G = 0, te = F.length; G < te; G++) {
763
+ let pe = v(F[G]);
764
+ pe.static || (pe = S(B, pe, T, D, F, L), B.push(pe)), Y[E.indexOf(F[G])] = pe, pe.moved = !1;
765
765
  }
766
766
  return Y;
767
767
  }
@@ -772,27 +772,27 @@ function St() {
772
772
  function w(E, T, D, L) {
773
773
  const B = _[L];
774
774
  T[L] += 1;
775
- const q = E.map((Y) => Y.i).indexOf(T.i);
776
- for (let Y = q + 1; Y < E.length; Y++) {
777
- const X = E[Y];
778
- if (!X.static) {
779
- if (X.y > T.y + T.h) break;
780
- p(T, X) && w(E, X, D + T[B], L);
775
+ const F = E.map((Y) => Y.i).indexOf(T.i);
776
+ for (let Y = F + 1; Y < E.length; Y++) {
777
+ const G = E[Y];
778
+ if (!G.static) {
779
+ if (G.y > T.y + T.h) break;
780
+ p(T, G) && w(E, G, D + T[B], L);
781
781
  }
782
782
  }
783
783
  T[L] = D;
784
784
  }
785
- function S(E, T, D, L, B, q) {
786
- const Y = D === "vertical", X = D === "horizontal";
785
+ function S(E, T, D, L, B, F) {
786
+ const Y = D === "vertical", G = D === "horizontal";
787
787
  if (Y)
788
788
  for (T.y = Math.min(n(E), T.y); T.y > 0 && !s(E, T); )
789
789
  T.y--;
790
- else if (X)
790
+ else if (G)
791
791
  for (; T.x > 0 && !s(E, T); )
792
792
  T.x--;
793
- let ne;
794
- for (; (ne = s(E, T)) && !(D === null && q); )
795
- if (X ? w(B, T, ne.x + ne.w, "x") : w(B, T, ne.y + ne.h, "y"), X && T.x + T.w > L)
793
+ let te;
794
+ for (; (te = s(E, T)) && !(D === null && F); )
795
+ if (G ? w(B, T, te.x + te.w, "x") : w(B, T, te.y + te.h, "y"), G && T.x + T.w > L)
796
796
  for (T.x = L - T.w, T.y++; T.x > 0 && !s(E, T); )
797
797
  T.x--;
798
798
  return T.y = Math.max(T.y, 0), T.x = Math.max(T.x, 0), T;
@@ -800,11 +800,11 @@ function St() {
800
800
  function R(E, T) {
801
801
  const D = u(E);
802
802
  for (let L = 0, B = E.length; L < B; L++) {
803
- const q = E[L];
804
- if (q.x + q.w > T.cols && (q.x = T.cols - q.w), q.x < 0 && (q.x = 0, q.w = T.cols), !q.static) D.push(q);
803
+ const F = E[L];
804
+ if (F.x + F.w > T.cols && (F.x = T.cols - F.w), F.x < 0 && (F.x = 0, F.w = T.cols), !F.static) D.push(F);
805
805
  else
806
- for (; s(D, q); )
807
- q.y++;
806
+ for (; s(D, F); )
807
+ F.y++;
808
808
  }
809
809
  return E;
810
810
  }
@@ -822,7 +822,7 @@ function St() {
822
822
  function u(E) {
823
823
  return E.filter((T) => T.static);
824
824
  }
825
- function b(E, T, D, L, B, q, Y, X, ne) {
825
+ function b(E, T, D, L, B, F, Y, G, te) {
826
826
  if (T.static && T.isDraggable !== !0 || T.y === L && T.x === D) return E;
827
827
  `${T.i}${String(D)}${String(L)}${T.x}${T.y}`;
828
828
  const pe = T.x, et = T.y;
@@ -830,9 +830,9 @@ function St() {
830
830
  let Pe = se(E, Y);
831
831
  (Y === "vertical" && typeof L == "number" ? et >= L : Y === "horizontal" && typeof D == "number" ? pe >= D : !1) && (Pe = Pe.reverse());
832
832
  const dt = a(Pe, T), Jt = dt.length > 0;
833
- if (Jt && ne)
833
+ if (Jt && te)
834
834
  return i(E);
835
- if (Jt && q)
835
+ if (Jt && F)
836
836
  return `${T.i}`, T.x = pe, T.y = et, T.moved = !1, E;
837
837
  for (let Ln = 0, fo = dt.length; Ln < fo; Ln++) {
838
838
  const tt = dt[Ln];
@@ -840,28 +840,28 @@ function St() {
840
840
  }
841
841
  return E;
842
842
  }
843
- function l(E, T, D, L, B, q) {
844
- const Y = B === "horizontal", X = B === "vertical", ne = T.static;
843
+ function l(E, T, D, L, B, F) {
844
+ const Y = B === "horizontal", G = B === "vertical", te = T.static;
845
845
  if (L) {
846
846
  L = !1;
847
847
  const Pe = {
848
848
  x: Y ? Math.max(T.x - D.w, 0) : D.x,
849
- y: X ? Math.max(T.y - D.h, 0) : D.y,
849
+ y: G ? Math.max(T.y - D.h, 0) : D.y,
850
850
  w: D.w,
851
851
  h: D.h,
852
852
  i: "-1"
853
853
  }, Ce = s(E, Pe), dt = Ce && Ce.y + Ce.h > T.y, Jt = Ce && T.x + T.w > Ce.x;
854
854
  if (Ce) {
855
- if (dt && X)
856
- return b(E, D, void 0, T.y + 1, L, ne, B);
855
+ if (dt && G)
856
+ return b(E, D, void 0, T.y + 1, L, te, B);
857
857
  if (dt && B == null)
858
858
  return T.y = D.y, D.y = D.y + D.h, E;
859
859
  if (Jt && Y)
860
- return b(E, T, D.x, void 0, L, ne, B);
861
- } else return `${D.i}${Pe.x}${Pe.y}`, b(E, D, Y ? Pe.x : void 0, X ? Pe.y : void 0, L, ne, B);
860
+ return b(E, T, D.x, void 0, L, te, B);
861
+ } else return `${D.i}${Pe.x}${Pe.y}`, b(E, D, Y ? Pe.x : void 0, G ? Pe.y : void 0, L, te, B);
862
862
  }
863
- const pe = Y ? D.x + 1 : void 0, et = X ? D.y + 1 : void 0;
864
- return pe == null && et == null ? E : b(E, D, Y ? D.x + 1 : void 0, X ? D.y + 1 : void 0, L, ne, B);
863
+ const pe = Y ? D.x + 1 : void 0, et = G ? D.y + 1 : void 0;
864
+ return pe == null && et == null ? E : b(E, D, Y ? D.x + 1 : void 0, G ? D.y + 1 : void 0, L, te, B);
865
865
  }
866
866
  function g(E) {
867
867
  return E * 100 + "%";
@@ -870,12 +870,12 @@ function St() {
870
870
  let {
871
871
  left: L,
872
872
  height: B,
873
- width: q
873
+ width: F
874
874
  } = T;
875
875
  const Y = E.top - (B - E.height);
876
876
  return {
877
877
  left: L,
878
- width: q,
878
+ width: F,
879
879
  height: m(Y, E.height, B),
880
880
  top: M(Y)
881
881
  };
@@ -883,12 +883,12 @@ function St() {
883
883
  let {
884
884
  top: L,
885
885
  left: B,
886
- height: q,
886
+ height: F,
887
887
  width: Y
888
888
  } = T;
889
889
  return {
890
890
  top: L,
891
- height: q,
891
+ height: F,
892
892
  width: f(E.left, E.width, Y, D),
893
893
  left: P(B)
894
894
  };
@@ -896,12 +896,12 @@ function St() {
896
896
  let {
897
897
  top: L,
898
898
  height: B,
899
- width: q
899
+ width: F
900
900
  } = T;
901
- const Y = E.left - (q - E.width);
901
+ const Y = E.left - (F - E.width);
902
902
  return {
903
903
  height: B,
904
- width: Y < 0 ? E.width : f(E.left, E.width, q, D),
904
+ width: Y < 0 ? E.width : f(E.left, E.width, F, D),
905
905
  top: M(L),
906
906
  left: P(Y)
907
907
  };
@@ -909,13 +909,13 @@ function St() {
909
909
  let {
910
910
  top: L,
911
911
  left: B,
912
- height: q,
912
+ height: F,
913
913
  width: Y
914
914
  } = T;
915
915
  return {
916
916
  width: Y,
917
917
  left: B,
918
- height: m(L, E.height, q),
918
+ height: m(L, E.height, F),
919
919
  top: M(L)
920
920
  };
921
921
  }, ee = {
@@ -943,20 +943,20 @@ function St() {
943
943
  ...D
944
944
  }, L) : D;
945
945
  }
946
- function F(E) {
946
+ function V(E) {
947
947
  let {
948
948
  top: T,
949
949
  left: D,
950
950
  width: L,
951
951
  height: B
952
952
  } = E;
953
- const q = `translate(${D}px,${T}px)`;
953
+ const F = `translate(${D}px,${T}px)`;
954
954
  return {
955
- transform: q,
956
- WebkitTransform: q,
957
- MozTransform: q,
958
- msTransform: q,
959
- OTransform: q,
955
+ transform: F,
956
+ WebkitTransform: F,
957
+ MozTransform: F,
958
+ msTransform: F,
959
+ OTransform: F,
960
960
  width: `${L}px`,
961
961
  height: `${B}px`,
962
962
  position: "absolute"
@@ -992,22 +992,22 @@ function St() {
992
992
  }
993
993
  function Ee(E, T, D, L, B) {
994
994
  E = E || [];
995
- const q = [];
996
- e.default.Children.forEach(T, (X) => {
997
- if ((X == null ? void 0 : X.key) == null) return;
998
- const ne = h(E, String(X.key)), pe = X.props["data-grid"];
999
- ne && pe == null ? q.push(v(ne)) : pe ? q.push(v({
995
+ const F = [];
996
+ e.default.Children.forEach(T, (G) => {
997
+ if ((G == null ? void 0 : G.key) == null) return;
998
+ const te = h(E, String(G.key)), pe = G.props["data-grid"];
999
+ te && pe == null ? F.push(v(te)) : pe ? F.push(v({
1000
1000
  ...pe,
1001
- i: X.key
1002
- })) : q.push(v({
1001
+ i: G.key
1002
+ })) : F.push(v({
1003
1003
  w: 1,
1004
1004
  h: 1,
1005
1005
  x: 0,
1006
- y: n(q),
1007
- i: String(X.key)
1006
+ y: n(F),
1007
+ i: String(G.key)
1008
1008
  }));
1009
1009
  });
1010
- const Y = R(q, {
1010
+ const Y = R(F, {
1011
1011
  cols: D
1012
1012
  });
1013
1013
  return B ? Y : C(Y, L, D);
@@ -1017,13 +1017,17 @@ function St() {
1017
1017
  const D = ["x", "y", "w", "h"];
1018
1018
  if (!Array.isArray(E)) throw new Error(T + " must be an array!");
1019
1019
  for (let L = 0, B = E.length; L < B; L++) {
1020
- const q = E[L];
1021
- for (let Y = 0; Y < D.length; Y++)
1022
- if (typeof q[D[Y]] != "number")
1023
- throw new Error("ReactGridLayout: " + T + "[" + L + "]." + D[Y] + " must be a number!");
1020
+ const F = E[L];
1021
+ for (let Y = 0; Y < D.length; Y++) {
1022
+ const G = D[Y], te = F[G];
1023
+ if (typeof te != "number" || Number.isNaN(te))
1024
+ throw new Error(`ReactGridLayout: ${T}[${L}].${G} must be a number! Received: ${te} (${typeof te})`);
1025
+ }
1026
+ if (typeof F.i < "u" && typeof F.i != "string")
1027
+ throw new Error(`ReactGridLayout: ${T}[${L}].i must be a string! Received: ${F.i} (${typeof F.i})`);
1024
1028
  }
1025
1029
  }
1026
- function V(E) {
1030
+ function q(E) {
1027
1031
  const {
1028
1032
  verticalCompact: T,
1029
1033
  compactType: D
@@ -1065,14 +1069,15 @@ function fr() {
1065
1069
  function n(c, v, d, y, p) {
1066
1070
  const {
1067
1071
  margin: C,
1068
- cols: _,
1069
- rowHeight: w,
1070
- maxRows: S
1071
- } = c, R = t(c);
1072
- let h = Math.round((d - C[0]) / (R + C[0])), s = Math.round((v - C[1]) / (w + C[1]));
1073
- return h = o(h, 0, _ - y), s = o(s, 0, S - p), {
1074
- x: h,
1075
- y: s
1072
+ containerPadding: _,
1073
+ cols: w,
1074
+ rowHeight: S,
1075
+ maxRows: R
1076
+ } = c, h = t(c);
1077
+ let s = Math.round((d - _[0]) / (h + C[0])), a = Math.round((v - _[1]) / (S + C[1]));
1078
+ return s = o(s, 0, w - y), a = o(a, 0, R - p), {
1079
+ x: s,
1080
+ y: a
1076
1081
  };
1077
1082
  }
1078
1083
  function i(c, v, d, y, p, C) {
@@ -1953,11 +1958,11 @@ function Ks() {
1953
1958
  ...I
1954
1959
  } = this.props;
1955
1960
  let O = {}, z = null;
1956
- const k = !!!M || this.state.dragging, ie = M || g, ee = {
1961
+ const k = !!!M || this.state.dragging, re = M || g, ee = {
1957
1962
  // Set left if horizontal drag is enabled
1958
- x: (0, c.canDragX)(this) && k ? this.state.x : ie.x,
1963
+ x: (0, c.canDragX)(this) && k ? this.state.x : re.x,
1959
1964
  // Set top if vertical drag is enabled
1960
- y: (0, c.canDragY)(this) && k ? this.state.y : ie.y
1965
+ y: (0, c.canDragY)(this) && k ? this.state.y : re.y
1961
1966
  };
1962
1967
  this.state.isElementSVG ? z = (0, o.createSVGTransform)(ee, j) : O = (0, o.createCSSTransform)(ee, j);
1963
1968
  const A = (0, i.default)(l.props.className || "", f, {
@@ -2387,8 +2392,8 @@ function Yi() {
2387
2392
  var j = this.props.width / this.props.height, N = l - this.props.width, I = g - this.props.height;
2388
2393
  Math.abs(N) > Math.abs(I * j) ? g = l / j : l = g * j;
2389
2394
  }
2390
- var O = l, z = g, U = this.slack || [0, 0], k = U[0], ie = U[1];
2391
- return l += k, g += ie, m && (l = Math.max(m[0], l), g = Math.max(m[1], g)), P && (l = Math.min(P[0], l), g = Math.min(P[1], g)), this.slack = [k + (O - l), ie + (z - g)], [l, g];
2395
+ var O = l, z = g, U = this.slack || [0, 0], k = U[0], re = U[1];
2396
+ return l += k, g += re, m && (l = Math.max(m[0], l), g = Math.max(m[1], g)), P && (l = Math.min(P[0], l), g = Math.min(P[1], g)), this.slack = [k + (O - l), re + (z - g)], [l, g];
2392
2397
  }, u.resizeHandler = function(l, g) {
2393
2398
  var f = this;
2394
2399
  return function(m, P) {
@@ -2399,8 +2404,8 @@ function Yi() {
2399
2404
  var z = g[0], U = g[g.length - 1], k = M.getBoundingClientRect();
2400
2405
  if (f.lastHandleRect != null) {
2401
2406
  if (U === "w") {
2402
- var ie = k.left - f.lastHandleRect.left;
2403
- j += ie;
2407
+ var re = k.left - f.lastHandleRect.left;
2408
+ j += re;
2404
2409
  }
2405
2410
  if (z === "n") {
2406
2411
  var ee = k.top - f.lastHandleRect.top;
@@ -2408,14 +2413,14 @@ function Yi() {
2408
2413
  }
2409
2414
  }
2410
2415
  f.lastHandleRect = k, U === "w" && (j = -j), z === "n" && (N = -N);
2411
- var A = f.props.width + (I ? j / f.props.transformScale : 0), F = f.props.height + (O ? N / f.props.transformScale : 0), oe = f.runConstraints(A, F);
2412
- A = oe[0], F = oe[1];
2413
- var se = A !== f.props.width || F !== f.props.height, de = typeof f.props[l] == "function" ? f.props[l] : null, ye = l === "onResize" && !se;
2416
+ var A = f.props.width + (I ? j / f.props.transformScale : 0), V = f.props.height + (O ? N / f.props.transformScale : 0), oe = f.runConstraints(A, V);
2417
+ A = oe[0], V = oe[1];
2418
+ var se = A !== f.props.width || V !== f.props.height, de = typeof f.props[l] == "function" ? f.props[l] : null, ye = l === "onResize" && !se;
2414
2419
  de && !ye && (m.persist == null || m.persist(), de(m, {
2415
2420
  node: M,
2416
2421
  size: {
2417
2422
  width: A,
2418
- height: F
2423
+ height: V
2419
2424
  },
2420
2425
  handle: g
2421
2426
  })), l === "onResizeStop" && f.resetData();
@@ -2592,7 +2597,7 @@ function Js() {
2592
2597
  g.onResize;
2593
2598
  var P = g.onResizeStart, M = g.onResizeStop, j = g.draggableOpts, N = g.minConstraints, I = g.maxConstraints, O = g.lockAspectRatio, z = g.axis;
2594
2599
  g.width, g.height;
2595
- var U = g.resizeHandles, k = g.style, ie = g.transformScale, ee = S(g, i);
2600
+ var U = g.resizeHandles, k = g.style, re = g.transformScale, ee = S(g, i);
2596
2601
  return /* @__PURE__ */ t.createElement(r.default, {
2597
2602
  axis: z,
2598
2603
  draggableOpts: j,
@@ -2606,7 +2611,7 @@ function Js() {
2606
2611
  onResize: this.onResize,
2607
2612
  onResizeStop: M,
2608
2613
  resizeHandles: U,
2609
- transformScale: ie,
2614
+ transformScale: re,
2610
2615
  width: this.state.width
2611
2616
  }, /* @__PURE__ */ t.createElement("div", d({}, ee, {
2612
2617
  style: p(p({}, k), {}, {
@@ -2828,17 +2833,17 @@ function ea() {
2828
2833
  } = this.props, j = this.getPositionParams();
2829
2834
  if (g) {
2830
2835
  const {
2831
- offsetParent: U
2836
+ offsetParent: z
2832
2837
  } = h;
2833
- if (U) {
2838
+ if (z) {
2834
2839
  const {
2835
- margin: k,
2836
- rowHeight: ie,
2837
- containerPadding: ee
2838
- } = this.props, A = U.clientHeight - (0, o.calcGridItemWHPx)(P, ie, k[1]);
2839
- b = (0, o.clamp)(b - ee[1], 0, A);
2840
- const F = (0, o.calcGridColWidth)(j), oe = M - (0, o.calcGridItemWHPx)(m, F, k[0]);
2841
- l = (0, o.clamp)(l - ee[0], 0, oe);
2840
+ margin: U,
2841
+ rowHeight: k,
2842
+ containerPadding: re
2843
+ } = this.props, ee = z.clientHeight - (0, o.calcGridItemWHPx)(P, k, U[1]);
2844
+ b = (0, o.clamp)(b - re[1], 0, ee);
2845
+ const A = (0, o.calcGridColWidth)(j), V = M - (0, o.calcGridItemWHPx)(m, A, U[0]);
2846
+ l = (0, o.clamp)(l - re[0], 0, V);
2842
2847
  }
2843
2848
  }
2844
2849
  const N = {
@@ -2849,12 +2854,10 @@ function ea() {
2849
2854
  dragging: N
2850
2855
  });
2851
2856
  const {
2852
- containerPadding: I
2853
- } = this.props, {
2854
- x: O,
2855
- y: z
2856
- } = (0, o.calcXY)(j, b - I[1], l - I[0], m, P);
2857
- return u.call(this, f, O, z, {
2857
+ x: I,
2858
+ y: O
2859
+ } = (0, o.calcXY)(j, b, l, m, P);
2860
+ return u.call(this, f, I, O, {
2858
2861
  e: S,
2859
2862
  node: h,
2860
2863
  newPosition: N
@@ -2872,26 +2875,25 @@ function ea() {
2872
2875
  const {
2873
2876
  w: a,
2874
2877
  h: u,
2875
- i: b,
2876
- containerPadding: l
2878
+ i: b
2877
2879
  } = this.props, {
2878
- left: g,
2879
- top: f
2880
- } = this.state.dragging, m = {
2881
- top: f,
2882
- left: g
2880
+ left: l,
2881
+ top: g
2882
+ } = this.state.dragging, f = {
2883
+ top: g,
2884
+ left: l
2883
2885
  };
2884
2886
  this.setState({
2885
2887
  dragging: null
2886
2888
  });
2887
2889
  const {
2888
- x: P,
2889
- y: M
2890
- } = (0, o.calcXY)(this.getPositionParams(), f - l[1], g - l[0], a, u);
2891
- return s.call(this, b, P, M, {
2890
+ x: m,
2891
+ y: P
2892
+ } = (0, o.calcXY)(this.getPositionParams(), g, l, a, u);
2893
+ return s.call(this, b, m, P, {
2892
2894
  e: S,
2893
2895
  node: h,
2894
- newPosition: m
2896
+ newPosition: f
2895
2897
  });
2896
2898
  }), y(this, "onResizeStop", (S, R, h) => this.onResizeHandler(S, R, h, "onResizeStop")), y(this, "onResizeStart", (S, R, h) => this.onResizeHandler(S, R, h, "onResizeStart")), y(this, "onResize", (S, R, h) => this.onResizeHandler(S, R, h, "onResize"));
2897
2899
  }
@@ -3360,18 +3362,18 @@ function Zi() {
3360
3362
  allowOverlap: I
3361
3363
  } = this.props;
3362
3364
  let O = !1, z, U, k;
3363
- const [ie, ee] = (0, n.withLayoutItem)(M, s, (F) => {
3365
+ const [re, ee] = (0, n.withLayoutItem)(M, s, (V) => {
3364
3366
  let oe;
3365
- return U = F.x, k = F.y, ["sw", "w", "nw", "n", "ne"].indexOf(m) !== -1 && (["sw", "nw", "w"].indexOf(m) !== -1 && (U = F.x + (F.w - a), a = F.x !== U && U < 0 ? F.w : a, U = U < 0 ? 0 : U), ["ne", "n", "nw"].indexOf(m) !== -1 && (k = F.y + (F.h - u), u = F.y !== k && k < 0 ? F.h : u, k = k < 0 ? 0 : k), O = !0), N && !I && (oe = (0, n.getAllCollisions)(M, {
3366
- ...F,
3367
+ return U = V.x, k = V.y, ["sw", "w", "nw", "n", "ne"].indexOf(m) !== -1 && (["sw", "nw", "w"].indexOf(m) !== -1 && (U = V.x + (V.w - a), a = V.x !== U && U < 0 ? V.w : a, U = U < 0 ? 0 : U), ["ne", "n", "nw"].indexOf(m) !== -1 && (k = V.y + (V.h - u), u = V.y !== k && k < 0 ? V.h : u, k = k < 0 ? 0 : k), O = !0), N && !I && (oe = (0, n.getAllCollisions)(M, {
3368
+ ...V,
3367
3369
  w: a,
3368
3370
  h: u,
3369
3371
  x: U,
3370
3372
  y: k
3371
- }).filter((de) => de.i !== F.i).length > 0, oe && (k = F.y, u = F.h, U = F.x, a = F.w, O = !1)), F.w = a, F.h = u, F;
3373
+ }).filter((de) => de.i !== V.i).length > 0, oe && (k = V.y, u = V.h, U = V.x, a = V.w, O = !1)), V.w = a, V.h = u, V;
3372
3374
  });
3373
3375
  if (!ee) return;
3374
- z = ie, O && (z = (0, n.moveElement)(ie, ee, U, k, !0, this.props.preventCollision, (0, n.compactType)(this.props), j, I));
3376
+ z = re, O && (z = (0, n.moveElement)(re, ee, U, k, !0, this.props.preventCollision, (0, n.compactType)(this.props), j, I));
3375
3377
  const A = {
3376
3378
  w: ee.w,
3377
3379
  h: ee.h,
@@ -3408,9 +3410,9 @@ function Zi() {
3408
3410
  resizing: !1
3409
3411
  }), this.onLayoutMaybeChanged(N, I);
3410
3412
  }), p(this, "onDragOver", (s) => {
3411
- var ie;
3413
+ var re;
3412
3414
  if (s.preventDefault(), s.stopPropagation(), S && // $FlowIgnore can't figure this out
3413
- !((ie = s.nativeEvent.target) != null && ie.classList.contains(w)))
3415
+ !((re = s.nativeEvent.target) != null && re.classList.contains(w)))
3414
3416
  return !1;
3415
3417
  const {
3416
3418
  droppingItem: a,
@@ -3600,11 +3602,11 @@ function Zi() {
3600
3602
  draggableCancel: z,
3601
3603
  draggableHandle: U,
3602
3604
  resizeHandles: k,
3603
- resizeHandle: ie
3605
+ resizeHandle: re
3604
3606
  } = this.props, {
3605
3607
  mounted: ee,
3606
3608
  droppingPosition: A
3607
- } = this.state, F = typeof u.isDraggable == "boolean" ? u.isDraggable : !u.static && M, oe = typeof u.isResizable == "boolean" ? u.isResizable : !u.static && j, se = u.resizeHandles || k, de = F && N && u.isBounded !== !1;
3609
+ } = this.state, V = typeof u.isDraggable == "boolean" ? u.isDraggable : !u.static && M, oe = typeof u.isResizable == "boolean" ? u.isResizable : !u.static && j, se = u.resizeHandles || k, de = V && N && u.isBounded !== !1;
3608
3610
  return /* @__PURE__ */ t.createElement(o.default, {
3609
3611
  containerWidth: b,
3610
3612
  cols: l,
@@ -3620,7 +3622,7 @@ function Zi() {
3620
3622
  onResizeStart: this.onResizeStart,
3621
3623
  onResize: this.onResize,
3622
3624
  onResizeStop: this.onResizeStop,
3623
- isDraggable: F,
3625
+ isDraggable: V,
3624
3626
  isResizable: oe,
3625
3627
  isBounded: de,
3626
3628
  useCSSTransforms: I && ee,
@@ -3638,7 +3640,7 @@ function Zi() {
3638
3640
  static: u.static,
3639
3641
  droppingPosition: a ? A : void 0,
3640
3642
  resizeHandles: se,
3641
- resizeHandle: ie
3643
+ resizeHandle: re
3642
3644
  }, s);
3643
3645
  }
3644
3646
  render() {
@@ -3859,7 +3861,7 @@ function ta() {
3859
3861
  if (f !== g || s.breakpoints !== a || s.cols !== u) {
3860
3862
  f in P || (P[f] = (0, n.cloneLayout)(this.state.layout));
3861
3863
  let N = (0, i.findOrGenerateResponsiveLayout)(P, a, g, f, m, l);
3862
- N = (0, n.synchronizeLayoutWithChildren)(N, this.props.children, m, l, this.props.allowOverlap), P[g] = N, this.props.onLayoutChange(N, P), this.props.onBreakpointChange(g, m), this.setState({
3864
+ N = (0, n.synchronizeLayoutWithChildren)(N, this.props.children, m, l, this.props.allowOverlap), P[g] = N, this.props.onBreakpointChange(g, m), this.props.onLayoutChange(N, P), this.setState({
3863
3865
  breakpoint: g,
3864
3866
  layout: N,
3865
3867
  cols: m
@@ -4491,36 +4493,36 @@ const Oa = "univer-cf-preview", rn = {
4491
4493
  return e.t("sheet.cf.ruleType.iconSet");
4492
4494
  case K.highlightCell:
4493
4495
  switch (r.subType) {
4494
- case G.average: {
4496
+ case X.average: {
4495
4497
  const n = r.operator;
4496
4498
  return e.t(`sheet.cf.preview.describe.${n}`, e.t("sheet.cf.subRuleType.average"));
4497
4499
  }
4498
- case G.duplicateValues:
4500
+ case X.duplicateValues:
4499
4501
  return e.t("sheet.cf.subRuleType.duplicateValues");
4500
- case G.uniqueValues:
4502
+ case X.uniqueValues:
4501
4503
  return e.t("sheet.cf.subRuleType.uniqueValues");
4502
- case G.number: {
4504
+ case X.number: {
4503
4505
  const n = r.operator;
4504
4506
  return e.t(`sheet.cf.preview.describe.${n}`, ...Array.isArray(r.value) ? r.value.map((i) => String(i)) : [String(r.value || "")]);
4505
4507
  }
4506
- case G.text: {
4508
+ case X.text: {
4507
4509
  const n = r.operator;
4508
4510
  return e.t(`sheet.cf.preview.describe.${n}`, r.value || "");
4509
4511
  }
4510
- case G.timePeriod: {
4512
+ case X.timePeriod: {
4511
4513
  const n = r.operator;
4512
4514
  return e.t(`sheet.cf.preview.describe.${n}`);
4513
4515
  }
4514
- case G.rank:
4516
+ case X.rank:
4515
4517
  return r.isPercent ? r.isBottom ? e.t("sheet.cf.preview.describe.bottomNPercent", String(r.value)) : e.t("sheet.cf.preview.describe.topNPercent", String(r.value)) : r.isBottom ? e.t("sheet.cf.preview.describe.bottomN", String(r.value)) : e.t("sheet.cf.preview.describe.topN", String(r.value));
4516
- case G.formula:
4518
+ case X.formula:
4517
4519
  return e.t("sheet.cf.ruleType.formula");
4518
4520
  }
4519
4521
  }
4520
4522
  };
4521
4523
  let ti = 0;
4522
4524
  const Za = (t) => {
4523
- const { onClick: e } = t, r = he(me), n = he(ue), i = he(ct), o = he(ge), c = he(Ie), v = he(We), d = he(mt), y = ko(() => n.getCurrentTypeOfUnit$(re.UNIVER_SHEET), void 0, void 0, []), p = y.getUnitId(), C = y.getActiveSheet();
4525
+ const { onClick: e } = t, r = he(me), n = he(ue), i = he(ct), o = he(ge), c = he(Ie), v = he(We), d = he(mt), y = ko(() => n.getCurrentTypeOfUnit$(ie.UNIVER_SHEET), void 0, void 0, []), p = y.getUnitId(), C = y.getActiveSheet();
4524
4526
  if (!C)
4525
4527
  throw new Error("No active sheet found");
4526
4528
  const _ = C.getSheetId(), [w, S] = H([]), [R, h] = H("2"), [s, a] = H(0), [u, b] = H(-1), [l, g] = H(ti), f = Fe(null), m = [
@@ -4531,18 +4533,18 @@ const Za = (t) => {
4531
4533
  if (!A || !A.length)
4532
4534
  return [];
4533
4535
  if (R === "1") {
4534
- const F = i.getCurrentLastSelection();
4535
- if (!F)
4536
+ const V = i.getCurrentLastSelection();
4537
+ if (!V)
4536
4538
  return [];
4537
- const oe = F.range;
4539
+ const oe = V.range;
4538
4540
  return A.filter((de) => de.ranges.some((ye) => Be.intersects(ye, oe)));
4539
4541
  } else if (R === "2")
4540
4542
  return [...A];
4541
4543
  return [];
4542
4544
  }, [M, j] = H(P);
4543
4545
  rs(w), we(() => {
4544
- const A = o.onCommandExecuted((F) => {
4545
- F.id === rr.id && a(Math.random());
4546
+ const A = o.onCommandExecuted((V) => {
4547
+ V.id === rr.id && a(Math.random());
4546
4548
  });
4547
4549
  return () => A.dispose();
4548
4550
  }), we(() => {
@@ -4550,10 +4552,10 @@ const Za = (t) => {
4550
4552
  }, [R, s, p, _]), we(() => {
4551
4553
  if (R === "2")
4552
4554
  return;
4553
- const A = new ot((F) => {
4555
+ const A = new ot((V) => {
4554
4556
  const oe = [jo.id, _e.id, Ve.id, Ne.id, fn.id], se = o.onCommandExecuted((de) => {
4555
- const { id: ye, params: Ee } = de, $e = n.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId();
4556
- oe.includes(ye) && Ee.unitId === $e && F.next(null);
4557
+ const { id: ye, params: Ee } = de, $e = n.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId();
4558
+ oe.includes(ye) && Ee.unitId === $e && V.next(null);
4557
4559
  });
4558
4560
  return () => se.dispose();
4559
4561
  }).pipe(Sr(16)).subscribe(() => {
@@ -4580,8 +4582,8 @@ const Za = (t) => {
4580
4582
  }, 150);
4581
4583
  const Ee = () => {
4582
4584
  ye && clearTimeout(ye), ye = null;
4583
- }, $e = (V) => {
4584
- V.propertyName === "width" && (Ee(), se.next());
4585
+ }, $e = (q) => {
4586
+ q.propertyName === "width" && (Ee(), se.next());
4585
4587
  };
4586
4588
  return de.addEventListener("transitionend", $e), () => {
4587
4589
  Ee(), de.removeEventListener("transitionend", $e);
@@ -4596,40 +4598,40 @@ const Za = (t) => {
4596
4598
  }, []);
4597
4599
  const N = (A) => {
4598
4600
  var se;
4599
- const F = n.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), oe = (se = n.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : se.getSheetId();
4600
- if (!F || !oe)
4601
+ const V = n.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), oe = (se = n.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : se.getSheetId();
4602
+ if (!V || !oe)
4601
4603
  throw new Error("No active sheet found");
4602
- o.executeCommand(mn.id, { unitId: F, subUnitId: oe, cfId: A.cfId });
4603
- }, I = (A, F) => {
4604
- b(F.y);
4605
- }, O = (A, F, oe) => {
4606
- var V;
4604
+ o.executeCommand(mn.id, { unitId: V, subUnitId: oe, cfId: A.cfId });
4605
+ }, I = (A, V) => {
4606
+ b(V.y);
4607
+ }, O = (A, V, oe) => {
4608
+ var q;
4607
4609
  b(-1);
4608
- const se = n.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), de = (V = n.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : V.getSheetId();
4610
+ const se = n.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), de = (q = n.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : q.getSheetId();
4609
4611
  if (!se || !de)
4610
4612
  throw new Error("No active sheet found");
4611
4613
  const ye = (Z) => {
4612
4614
  const ce = M.length;
4613
4615
  return Math.min(ce - 1, Math.max(0, Z));
4614
- }, Ee = M[ye(F.y)].cfId, $e = M[ye(oe.y)].cfId;
4615
- Ee !== $e && o.executeCommand(lr.id, { unitId: se, subUnitId: de, start: { id: Ee, type: "self" }, end: { id: $e, type: oe.y > F.y ? "after" : "before" } });
4616
+ }, Ee = M[ye(V.y)].cfId, $e = M[ye(oe.y)].cfId;
4617
+ Ee !== $e && o.executeCommand(lr.id, { unitId: se, subUnitId: de, start: { id: Ee, type: "self" }, end: { id: $e, type: oe.y > V.y ? "after" : "before" } });
4616
4618
  }, z = () => {
4617
4619
  t.onCreate();
4618
4620
  }, U = () => {
4619
- R === "2" ? o.executeCommand(On.id) : R === "1" && M.map((F) => ({ unitId: p, subUnitId: _, cfId: F.cfId })).forEach((F) => {
4620
- o.executeCommand(mn.id, F);
4621
+ R === "2" ? o.executeCommand(On.id) : R === "1" && M.map((V) => ({ unitId: p, subUnitId: _, cfId: V.cfId })).forEach((V) => {
4622
+ o.executeCommand(mn.id, V);
4621
4623
  });
4622
4624
  }, k = Se(() => {
4623
- const A = n.getCurrentUnitForType(re.UNIVER_SHEET), F = A.getActiveSheet();
4625
+ const A = n.getCurrentUnitForType(ie.UNIVER_SHEET), V = A.getActiveSheet();
4624
4626
  return M.filter((oe) => {
4625
4627
  const se = oe.ranges;
4626
- return pn(v, A.getUnitId(), F.getSheetId(), se);
4628
+ return pn(v, A.getUnitId(), V.getSheetId(), se);
4627
4629
  });
4628
- }, [M]), ie = k.map((A, F) => ({ i: A.cfId, x: 0, w: 12, y: F, h: 1, isResizable: !1 })), ee = Se(() => {
4629
- const A = n.getCurrentUnitForType(re.UNIVER_SHEET), F = A.getActiveSheet();
4630
+ }, [M]), re = k.map((A, V) => ({ i: A.cfId, x: 0, w: 12, y: V, h: 1, isResizable: !1 })), ee = Se(() => {
4631
+ const A = n.getCurrentUnitForType(ie.UNIVER_SHEET), V = A.getActiveSheet();
4630
4632
  return M.every((oe) => {
4631
4633
  const se = oe.ranges;
4632
- return pn(v, A.getUnitId(), F.getSheetId(), se);
4634
+ return pn(v, A.getUnitId(), V.getSheetId(), se);
4633
4635
  });
4634
4636
  }, [M]);
4635
4637
  return /* @__PURE__ */ x.jsxs("div", { className: be.cfRuleList, children: [
@@ -4639,7 +4641,7 @@ const Za = (t) => {
4639
4641
  /* @__PURE__ */ x.jsx(Me, { className: be.select, options: m, value: R, onChange: (A) => {
4640
4642
  h(A);
4641
4643
  } })
4642
- ).map((A, F) => /* @__PURE__ */ x.jsx("span", { children: A }, F)) }),
4644
+ ).map((A, V) => /* @__PURE__ */ x.jsx("span", { children: A }, V)) }),
4643
4645
  /* @__PURE__ */ x.jsxs("div", { className: be.btnList, children: [
4644
4646
  /* @__PURE__ */ x.jsx(mr, { title: c.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ x.jsx(
4645
4647
  "div",
@@ -4678,13 +4680,13 @@ const Za = (t) => {
4678
4680
  {
4679
4681
  onDragStop: O,
4680
4682
  onDragStart: I,
4681
- layout: ie,
4683
+ layout: re,
4682
4684
  cols: 12,
4683
4685
  rowHeight: 60,
4684
4686
  width: l,
4685
4687
  margin: [0, 10],
4686
4688
  draggableHandle: ".draggableHandle",
4687
- children: k == null ? void 0 : k.map((A, F) => /* @__PURE__ */ x.jsx("div", { children: /* @__PURE__ */ x.jsxs(
4689
+ children: k == null ? void 0 : k.map((A, V) => /* @__PURE__ */ x.jsx("div", { children: /* @__PURE__ */ x.jsxs(
4688
4690
  "div",
4689
4691
  {
4690
4692
  onMouseMove: () => {
@@ -4696,7 +4698,7 @@ const Za = (t) => {
4696
4698
  },
4697
4699
  className: `
4698
4700
  ${be.ruleItem}
4699
- ${u === F ? be.active : ""}
4701
+ ${u === V ? be.active : ""}
4700
4702
  `,
4701
4703
  children: [
4702
4704
  /* @__PURE__ */ x.jsx(
@@ -4721,7 +4723,7 @@ const Za = (t) => {
4721
4723
  {
4722
4724
  className: `
4723
4725
  ${be.deleteItem}
4724
- ${u === F ? be.active : ""}
4726
+ ${u === V ? be.active : ""}
4725
4727
  `,
4726
4728
  onClick: (oe) => {
4727
4729
  oe.stopPropagation(), N(A), S([]);
@@ -4797,7 +4799,7 @@ const Za = (t) => {
4797
4799
  stress: Il
4798
4800
  }, it = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Xn = (t) => {
4799
4801
  var S;
4800
- const { type: e, className: r, onChange: n, id: i, value: o } = t, c = he(ue), v = c.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), d = (S = c.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), y = Se(() => String(o).startsWith("=") ? String(o) : "=", [o]), p = Se(() => [te.max, te.min, "none"].includes(e) ? { disabled: !0 } : [te.percent, te.percentile].includes(e) ? {
4802
+ const { type: e, className: r, onChange: n, id: i, value: o } = t, c = he(ue), v = c.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), d = (S = c.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), y = Se(() => String(o).startsWith("=") ? String(o) : "=", [o]), p = Se(() => [ne.max, ne.min, "none"].includes(e) ? { disabled: !0 } : [ne.percent, ne.percentile].includes(e) ? {
4801
4803
  min: 0,
4802
4804
  max: 100
4803
4805
  } : {
@@ -4808,7 +4810,7 @@ const Za = (t) => {
4808
4810
  var s;
4809
4811
  const h = (s = C.current) == null ? void 0 : s.handleOutClick;
4810
4812
  h && h(R, () => w(!1));
4811
- }), e === te.formula ? /* @__PURE__ */ x.jsx("div", { style: { width: "100%", marginLeft: 4 }, children: /* @__PURE__ */ x.jsx(
4813
+ }), e === ne.formula ? /* @__PURE__ */ x.jsx("div", { style: { width: "100%", marginLeft: 4 }, children: /* @__PURE__ */ x.jsx(
4812
4814
  Tn,
4813
4815
  {
4814
4816
  initValue: y,
@@ -4824,9 +4826,9 @@ const Za = (t) => {
4824
4826
  ) }) : /* @__PURE__ */ x.jsx(at, { className: r, value: Number(t.value) || 0, onChange: (R) => t.onChange(R || 0), ...p });
4825
4827
  }, El = (t) => {
4826
4828
  var N;
4827
- const { interceptorManager: e } = t, r = he(Ie), n = ((N = t.rule) == null ? void 0 : N.type) === K.colorScale ? t.rule : void 0, i = [it(te.num, r), it(te.percent, r), it(te.percentile, r), it(te.formula, r)], o = [it(te.min, r), ...i], c = [it("none", r), ...i], v = [it(te.max, r), ...i], [d, y] = H(() => {
4829
+ const { interceptorManager: e } = t, r = he(Ie), n = ((N = t.rule) == null ? void 0 : N.type) === K.colorScale ? t.rule : void 0, i = [it(ne.num, r), it(ne.percent, r), it(ne.percentile, r), it(ne.formula, r)], o = [it(ne.min, r), ...i], c = [it("none", r), ...i], v = [it(ne.max, r), ...i], [d, y] = H(() => {
4828
4830
  var O;
4829
- const I = te.min;
4831
+ const I = ne.min;
4830
4832
  return n && ((O = n.config[0]) == null ? void 0 : O.value.type) || I;
4831
4833
  }), [p, C] = H(() => {
4832
4834
  var O;
@@ -4834,7 +4836,7 @@ const Za = (t) => {
4834
4836
  return !n || n.config.length !== 3 ? I : ((O = n.config[1]) == null ? void 0 : O.value.type) || I;
4835
4837
  }), [_, w] = H(() => {
4836
4838
  var O;
4837
- const I = te.max;
4839
+ const I = ne.max;
4838
4840
  return n && ((O = n.config[n.config.length - 1]) == null ? void 0 : O.value.type) || I;
4839
4841
  }), [S, R] = H(() => {
4840
4842
  if (!n)
@@ -4871,13 +4873,13 @@ const Za = (t) => {
4871
4873
  medianType: z,
4872
4874
  maxType: U,
4873
4875
  minValue: k,
4874
- medianValue: ie,
4876
+ medianValue: re,
4875
4877
  maxValue: ee,
4876
4878
  minColor: A,
4877
- medianColor: F,
4879
+ medianColor: V,
4878
4880
  maxColor: oe
4879
4881
  } = I, se = [];
4880
- return se.push({ color: A, value: { type: O, value: k } }), z !== "none" && se.push({ color: F, value: { type: z, value: ie } }), se.push({ color: oe, value: { type: U, value: ee } }), { config: se.map((ye, Ee) => ({ ...ye, index: Ee })), type: K.colorScale };
4882
+ return se.push({ color: A, value: { type: O, value: k } }), z !== "none" && se.push({ color: V, value: { type: z, value: re } }), se.push({ color: oe, value: { type: U, value: ee } }), { config: se.map((ye, Ee) => ({ ...ye, index: Ee })), type: K.colorScale };
4881
4883
  }, []);
4882
4884
  we(() => e.intercept(e.getInterceptPoints().submit, {
4883
4885
  handler() {
@@ -5048,20 +5050,20 @@ const Za = (t) => {
5048
5050
  ] });
5049
5051
  }, ft = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), ni = (t) => {
5050
5052
  var R;
5051
- const { onChange: e, className: r, value: n, type: i, id: o, disabled: c = !1 } = t, v = he(ue), d = v.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), y = (R = v.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : R.getSheetId(), p = Fe({}), [C, _] = H(!1);
5053
+ const { onChange: e, className: r, value: n, type: i, id: o, disabled: c = !1 } = t, v = he(ue), d = v.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), y = (R = v.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : R.getSheetId(), p = Fe({}), [C, _] = H(!1);
5052
5054
  Kt((h) => {
5053
5055
  var a;
5054
5056
  const s = (a = p.current) == null ? void 0 : a.handleOutClick;
5055
5057
  s && s(h, () => _(!1));
5056
5058
  });
5057
- const w = Fe(n), S = Se(() => [te.percentile, te.percent].includes(i) ? {
5059
+ const w = Fe(n), S = Se(() => [ne.percentile, ne.percent].includes(i) ? {
5058
5060
  max: 100,
5059
5061
  min: 0
5060
5062
  } : {
5061
5063
  min: Number.MIN_SAFE_INTEGER,
5062
5064
  max: Number.MAX_SAFE_INTEGER
5063
5065
  }, [i]);
5064
- if (i === te.formula) {
5066
+ if (i === ne.formula) {
5065
5067
  const h = String(w.current).startsWith("=") ? String(w.current) || "" : "=";
5066
5068
  return /* @__PURE__ */ x.jsx("div", { style: { width: "100%", marginLeft: 12 }, children: /* @__PURE__ */ x.jsx(
5067
5069
  Tn,
@@ -5102,7 +5104,7 @@ const Za = (t) => {
5102
5104
  }), [d, y] = H(() => {
5103
5105
  var I;
5104
5106
  return n ? ((I = n.config) == null ? void 0 : I.nativeColor) || Vt : Vt;
5105
- }), p = [ft(te.num, r), ft(te.percent, r), ft(te.percentile, r), ft(te.formula, r)], C = [ft(te.min, r), ...p], _ = [ft(te.max, r), ...p], [w, S] = H(() => {
5107
+ }), p = [ft(ne.num, r), ft(ne.percent, r), ft(ne.percentile, r), ft(ne.formula, r)], C = [ft(ne.min, r), ...p], _ = [ft(ne.max, r), ...p], [w, S] = H(() => {
5106
5108
  var O;
5107
5109
  const I = C[0].value;
5108
5110
  return n && ((O = n.config) == null ? void 0 : O.min.type) || I;
@@ -5115,13 +5117,13 @@ const Za = (t) => {
5115
5117
  if (!n)
5116
5118
  return 0;
5117
5119
  const O = ((z = n.config) == null ? void 0 : z.min) || {};
5118
- return O.type === te.formula ? O.value || "=" : O.value || 0;
5120
+ return O.type === ne.formula ? O.value || "=" : O.value || 0;
5119
5121
  }), [u, b] = H(() => {
5120
5122
  var z;
5121
5123
  if (!n)
5122
5124
  return 100;
5123
5125
  const O = ((z = n.config) == null ? void 0 : z.max) || {};
5124
- return O.type === te.formula ? O.value || "=" : O.value === void 0 ? 100 : O.value;
5126
+ return O.type === ne.formula ? O.value || "=" : O.value === void 0 ? 100 : O.value;
5125
5127
  }), [l, g] = H(() => n ? n.isShowValue === void 0 ? !0 : !!n.isShowValue : !0), f = (I) => ({ config: {
5126
5128
  min: { type: I.minValueType, value: I.minValue },
5127
5129
  max: { type: I.maxValueType, value: I.maxValue },
@@ -5413,11 +5415,11 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5413
5415
  );
5414
5416
  }, Ml = (t) => {
5415
5417
  var b;
5416
- const { onChange: e, interceptorManager: r } = t, n = he(Ie), o = he(ue).getCurrentUnitForType(re.UNIVER_SHEET), c = o.getActiveSheet(), v = ((b = t.rule) == null ? void 0 : b.type) === K.highlightCell ? t.rule : void 0, d = Fe(null), [y, p] = H(!1), C = Fe({}), [_, w] = H({}), [S, R] = H(() => (v == null ? void 0 : v.subType) === G.formula ? v.value : "="), [h, s] = H(void 0), a = (l) => ({
5418
+ const { onChange: e, interceptorManager: r } = t, n = he(Ie), o = he(ue).getCurrentUnitForType(ie.UNIVER_SHEET), c = o.getActiveSheet(), v = ((b = t.rule) == null ? void 0 : b.type) === K.highlightCell ? t.rule : void 0, d = Fe(null), [y, p] = H(!1), C = Fe({}), [_, w] = H({}), [S, R] = H(() => (v == null ? void 0 : v.subType) === X.formula ? v.value : "="), [h, s] = H(void 0), a = (l) => ({
5417
5419
  style: l.style,
5418
5420
  value: S,
5419
5421
  type: K.highlightCell,
5420
- subType: G.formula
5422
+ subType: X.formula
5421
5423
  });
5422
5424
  we(() => r.intercept(r.getInterceptPoints().submit, {
5423
5425
  handler() {
@@ -5513,7 +5515,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5513
5515
  const { type: e, operator: r, onChange: n, value: i, interceptorManager: o } = t, c = he(Ie), [v, d] = H(() => typeof i == "number" ? i : 0), [y, p] = H(""), [C, _] = H(() => typeof i == "string" ? i : ""), [w, S] = H(""), [R, h] = H(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [s, a] = H(""), [u, b] = H(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [l, g] = H("");
5514
5516
  switch (we(() => {
5515
5517
  switch (e) {
5516
- case G.text: {
5518
+ case X.text: {
5517
5519
  [
5518
5520
  le.beginsWith,
5519
5521
  le.endsWith,
@@ -5524,7 +5526,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5524
5526
  ].includes(r) && n(C);
5525
5527
  break;
5526
5528
  }
5527
- case G.number: {
5529
+ case X.number: {
5528
5530
  [
5529
5531
  J.equal,
5530
5532
  J.notEqual,
@@ -5540,7 +5542,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5540
5542
  const f = o.intercept(o.getInterceptPoints().beforeSubmit, {
5541
5543
  handler: (m, P, M) => {
5542
5544
  switch (e) {
5543
- case G.text:
5545
+ case X.text:
5544
5546
  if ([
5545
5547
  le.beginsWith,
5546
5548
  le.containsText,
@@ -5558,7 +5560,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5558
5560
  f();
5559
5561
  };
5560
5562
  }, [e, v, C, r]), e) {
5561
- case G.text: {
5563
+ case X.text: {
5562
5564
  if ([
5563
5565
  le.beginsWith,
5564
5566
  le.endsWith,
@@ -5591,7 +5593,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5591
5593
  }
5592
5594
  break;
5593
5595
  }
5594
- case G.number: {
5596
+ case X.number: {
5595
5597
  if ([
5596
5598
  J.equal,
5597
5599
  J.notEqual,
@@ -5649,7 +5651,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5649
5651
  return null;
5650
5652
  }, ri = (t, e) => {
5651
5653
  switch (t) {
5652
- case G.text:
5654
+ case X.text:
5653
5655
  return [
5654
5656
  fe(le.containsText, e),
5655
5657
  fe(le.notContainsText, e),
@@ -5662,7 +5664,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5662
5664
  fe(le.containsErrors, e),
5663
5665
  fe(le.notContainsErrors, e)
5664
5666
  ];
5665
- case G.number:
5667
+ case X.number:
5666
5668
  return [
5667
5669
  fe(J.between, e),
5668
5670
  fe(J.notBetween, e),
@@ -5673,7 +5675,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5673
5675
  fe(J.lessThan, e),
5674
5676
  fe(J.lessThanOrEqual, e)
5675
5677
  ];
5676
- case G.timePeriod:
5678
+ case X.timePeriod:
5677
5679
  return [
5678
5680
  fe(qe.yesterday, e),
5679
5681
  fe(qe.today, e),
@@ -5690,27 +5692,27 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5690
5692
  }, ii = (t) => {
5691
5693
  var b;
5692
5694
  const { interceptorManager: e, onChange: r } = t, n = he(Ie), i = ((b = t.rule) == null ? void 0 : b.type) === K.highlightCell ? t.rule : void 0, [o, c] = H(() => {
5693
- const l = G.text;
5695
+ const l = X.text;
5694
5696
  return i && i.subType || l;
5695
5697
  }), v = [
5696
5698
  {
5697
- value: G.text,
5699
+ value: X.text,
5698
5700
  label: n.t("sheet.cf.subRuleType.text")
5699
5701
  },
5700
5702
  {
5701
- value: G.number,
5703
+ value: X.number,
5702
5704
  label: n.t("sheet.cf.subRuleType.number")
5703
5705
  },
5704
5706
  {
5705
- value: G.timePeriod,
5707
+ value: X.timePeriod,
5706
5708
  label: n.t("sheet.cf.subRuleType.timePeriod")
5707
5709
  },
5708
5710
  {
5709
- value: G.duplicateValues,
5711
+ value: X.duplicateValues,
5710
5712
  label: n.t("sheet.cf.subRuleType.duplicateValues")
5711
5713
  },
5712
5714
  {
5713
- value: G.uniqueValues,
5715
+ value: X.uniqueValues,
5714
5716
  label: n.t("sheet.cf.subRuleType.uniqueValues")
5715
5717
  }
5716
5718
  ], d = Se(() => ri(o, n), [o]), [y, p] = H(() => {
@@ -5721,9 +5723,9 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5721
5723
  const l = "";
5722
5724
  return i ? (f = i.value) != null ? f : hn(i.subType, i.operator) : l;
5723
5725
  }), [w, S] = H({}), R = Se(() => (l) => {
5724
- var g, f, m, P, M, j, N, I, O, z, U, k, ie, ee, A;
5726
+ var g, f, m, P, M, j, N, I, O, z, U, k, re, ee, A;
5725
5727
  switch (l.subType || o) {
5726
- case G.text: {
5728
+ case X.text: {
5727
5729
  if ([
5728
5730
  le.beginsWith,
5729
5731
  le.endsWith,
@@ -5741,7 +5743,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5741
5743
  };
5742
5744
  break;
5743
5745
  }
5744
- case G.number: {
5746
+ case X.number: {
5745
5747
  if ([
5746
5748
  J.equal,
5747
5749
  J.notEqual,
@@ -5770,7 +5772,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5770
5772
  }
5771
5773
  return {
5772
5774
  type: K.highlightCell,
5773
- subType: (ie = l.subType) != null ? ie : o,
5775
+ subType: (re = l.subType) != null ? re : o,
5774
5776
  operator: (ee = l.operator) != null ? ee : y,
5775
5777
  style: (A = l.style) != null ? A : w
5776
5778
  };
@@ -5851,12 +5853,12 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5851
5853
  ] });
5852
5854
  }, oo = (t, e) => (st[t] || [])[Number(e)] || "", jl = (t) => {
5853
5855
  var d;
5854
- const e = he(ue), r = e.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), n = (d = e.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : d.getSheetId(), i = Se(() => t.error ? W.errorInput : "", [t.error]), o = Fe({}), [c, v] = H(!1);
5856
+ const e = he(ue), r = e.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), n = (d = e.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : d.getSheetId(), i = Se(() => t.error ? W.errorInput : "", [t.error]), o = Fe({}), [c, v] = H(!1);
5855
5857
  return Kt((y) => {
5856
5858
  var C;
5857
5859
  const p = (C = o.current) == null ? void 0 : C.handleOutClick;
5858
5860
  p && p(y, () => v(!1));
5859
- }), /* @__PURE__ */ x.jsx("div", { className: W.positionRelative, children: t.type !== te.formula ? /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
5861
+ }), /* @__PURE__ */ x.jsx("div", { className: W.positionRelative, children: t.type !== ne.formula ? /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
5860
5862
  /* @__PURE__ */ x.jsx(at, { className: i, value: Number(t.value) || 0, onChange: (y) => t.onChange(y != null ? y : 0) }),
5861
5863
  t.error && /* @__PURE__ */ x.jsx("div", { className: W.errorText, children: t.error })
5862
5864
  ] }) : /* @__PURE__ */ x.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ x.jsx(
@@ -5876,7 +5878,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5876
5878
  ) }) });
5877
5879
  }, oi = (t, e, r) => ({
5878
5880
  operator: J.greaterThan,
5879
- value: { type: te.num, value: (r.length - 1 - e) * 10 },
5881
+ value: { type: ne.num, value: (r.length - 1 - e) * 10 },
5880
5882
  iconType: t,
5881
5883
  iconId: String(e)
5882
5884
  }), Ll = ut((t, e) => {
@@ -5927,23 +5929,23 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
5927
5929
  { label: i.t(`sheet.cf.symbol.${J.greaterThan}`), value: J.greaterThan },
5928
5930
  { label: i.t(`sheet.cf.symbol.${J.greaterThanOrEqual}`), value: J.greaterThanOrEqual }
5929
5931
  ], c = [
5930
- { label: i.t(`sheet.cf.valueType.${te.num}`), value: te.num },
5931
- { label: i.t(`sheet.cf.valueType.${te.percent}`), value: te.percent },
5932
- { label: i.t(`sheet.cf.valueType.${te.percentile}`), value: te.percentile },
5933
- { label: i.t(`sheet.cf.valueType.${te.formula}`), value: te.formula }
5932
+ { label: i.t(`sheet.cf.valueType.${ne.num}`), value: ne.num },
5933
+ { label: i.t(`sheet.cf.valueType.${ne.percent}`), value: ne.percent },
5934
+ { label: i.t(`sheet.cf.valueType.${ne.percentile}`), value: ne.percentile },
5935
+ { label: i.t(`sheet.cf.valueType.${ne.formula}`), value: ne.formula }
5934
5936
  ], v = (C, _) => {
5935
5937
  e([String(_), "value", "value"], C);
5936
5938
  }, d = (C, _) => {
5937
5939
  e([String(_), "operator"], C);
5938
- const w = hn(G.number, C);
5940
+ const w = hn(X.number, C);
5939
5941
  v(w, _);
5940
5942
  }, y = (C, _) => {
5941
5943
  e([String(_), "value", "type"], C);
5942
- const w = r[_], S = hn(G.number, w.operator);
5944
+ const w = r[_], S = hn(X.number, w.operator);
5943
5945
  v(S, _);
5944
5946
  };
5945
5947
  return Se(() => r.map((C, _) => {
5946
- const w = n[_], S = oo(C.iconType, C.iconId), R = _ === r.length - 1, h = _ === 0, s = r[_ - 1], a = (s == null ? void 0 : s.value.type) === te.formula ? i.t("sheet.cf.valueType.formula") : s == null ? void 0 : s.value.value, u = (b, l) => {
5948
+ const w = n[_], S = oo(C.iconType, C.iconId), R = _ === r.length - 1, h = _ === 0, s = r[_ - 1], a = (s == null ? void 0 : s.value.type) === ne.formula ? i.t("sheet.cf.valueType.formula") : s == null ? void 0 : s.value.value, u = (b, l) => {
5947
5949
  const g = { ...C, iconId: l, iconType: b };
5948
5950
  e([String(_)], g);
5949
5951
  };
@@ -6153,7 +6155,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6153
6155
  const l = st[c] || [];
6154
6156
  return new Array(l.length).fill("").map((g, f, m) => f === m.length - 1 ? {
6155
6157
  operator: J.lessThanOrEqual,
6156
- value: { type: te.num, value: Number.MAX_SAFE_INTEGER },
6158
+ value: { type: ne.num, value: Number.MAX_SAFE_INTEGER },
6157
6159
  iconType: c,
6158
6160
  iconId: String(f)
6159
6161
  } : oi(c, f, m));
@@ -6168,8 +6170,8 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6168
6170
  f
6169
6171
  ) : /* @__PURE__ */ x.jsx(Zt, { className: W.icon }, f)) });
6170
6172
  }, [d]), w = (l) => {
6171
- if (l.reduce((f, m, P) => f.preType && !f.result || l.length - 1 === P ? f : m.value.type === te.formula ? {
6172
- preType: te.formula,
6173
+ if (l.reduce((f, m, P) => f.preType && !f.result || l.length - 1 === P ? f : m.value.type === ne.formula ? {
6174
+ preType: ne.formula,
6173
6175
  result: !1
6174
6176
  } : f.preType ? {
6175
6177
  result: f.preType === m.value.type,
@@ -6177,7 +6179,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6177
6179
  } : {
6178
6180
  result: !0,
6179
6181
  preType: m.value.type
6180
- }, { result: !0, preType: "" }).result && [te.num, te.percent, te.percentile].includes(l[0].value.type)) {
6182
+ }, { result: !0, preType: "" }).result && [ne.num, ne.percent, ne.percentile].includes(l[0].value.type)) {
6181
6183
  const f = {};
6182
6184
  return l.forEach((m, P, M) => {
6183
6185
  if (P - 1 < 0 || P === M.length - 1)
@@ -6294,9 +6296,9 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6294
6296
  switch (a) {
6295
6297
  case K.highlightCell:
6296
6298
  switch (i.subType) {
6297
- case G.average:
6299
+ case X.average:
6298
6300
  return [J.greaterThan, J.greaterThanOrEqual].includes(i.operator) ? "greaterThanAverage" : [J.lessThan, J.lessThanOrEqual].includes(i.operator) ? "lessThanAverage" : s;
6299
- case G.rank:
6301
+ case X.rank:
6300
6302
  return i.isBottom ? "isBottom" : "isNotBottom";
6301
6303
  }
6302
6304
  }
@@ -6308,7 +6310,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6308
6310
  switch (a) {
6309
6311
  case K.highlightCell:
6310
6312
  switch (i.subType) {
6311
- case G.rank:
6313
+ case X.rank:
6312
6314
  return i.value || 10;
6313
6315
  }
6314
6316
  }
@@ -6320,7 +6322,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6320
6322
  switch (a) {
6321
6323
  case K.highlightCell:
6322
6324
  switch (i.subType) {
6323
- case G.rank:
6325
+ case X.rank:
6324
6326
  return i.isPercent || !1;
6325
6327
  }
6326
6328
  }
@@ -6328,13 +6330,13 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6328
6330
  }), [_, w] = H({}), S = (s) => {
6329
6331
  const { type: a, isPercent: u, value: b, style: l } = s;
6330
6332
  if (a === "isNotBottom")
6331
- return { type: K.highlightCell, subType: G.rank, isPercent: u, isBottom: !1, value: b, style: l };
6333
+ return { type: K.highlightCell, subType: X.rank, isPercent: u, isBottom: !1, value: b, style: l };
6332
6334
  if (a === "isBottom")
6333
- return { type: K.highlightCell, subType: G.rank, isPercent: u, isBottom: !0, value: b, style: l };
6335
+ return { type: K.highlightCell, subType: X.rank, isPercent: u, isBottom: !0, value: b, style: l };
6334
6336
  if (a === "greaterThanAverage")
6335
- return { type: K.highlightCell, subType: G.average, operator: J.greaterThan, style: l };
6337
+ return { type: K.highlightCell, subType: X.average, operator: J.greaterThan, style: l };
6336
6338
  if (a === "lessThanAverage")
6337
- return { type: K.highlightCell, subType: G.average, operator: J.lessThan, style: l };
6339
+ return { type: K.highlightCell, subType: X.average, operator: J.lessThan, style: l };
6338
6340
  };
6339
6341
  we(() => r.intercept(r.getInterceptPoints().submit, {
6340
6342
  handler() {
@@ -6436,17 +6438,17 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6436
6438
  }
6437
6439
  )
6438
6440
  ] });
6439
- }, ql = pi("beforeSubmit"), Al = pi("submit"), si = (t) => t.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), ai = (t) => {
6441
+ }, ql = pi("beforeSubmit"), Al = pi("submit"), si = (t) => t.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), ai = (t) => {
6440
6442
  var e;
6441
- return (e = t.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
6443
+ return (e = t.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
6442
6444
  }, Wl = (t) => {
6443
6445
  var M, j, N;
6444
6446
  const e = he(Ie), r = he(ge), n = he(ue), i = he(me), o = he(ct), c = si(n), v = ai(n), [d, y] = H(!0), p = Fe({}), [C, _] = H(void 0), w = Fe((j = (M = t.rule) == null ? void 0 : M.ranges) != null ? j : []), S = Se(() => {
6445
6447
  var O, z, U;
6446
6448
  let I = (O = t.rule) == null ? void 0 : O.ranges;
6447
6449
  return I != null && I.length || (I = (U = (z = o.getCurrentSelections()) == null ? void 0 : z.map((k) => k.range)) != null ? U : []), w.current = I, I != null && I.length ? I.map((k) => {
6448
- const ie = Ii(k);
6449
- return ie === "NaN" ? "" : ie;
6450
+ const re = Ii(k);
6451
+ return re === "NaN" ? "" : re;
6450
6452
  }).filter((k) => !!k).join(",") : "";
6451
6453
  }, [t.rule]), R = [
6452
6454
  { label: e.t("sheet.cf.ruleType.highlightCell"), value: "1" },
@@ -6463,16 +6465,16 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6463
6465
  switch (I) {
6464
6466
  case K.highlightCell: {
6465
6467
  switch ((U = t.rule) == null ? void 0 : U.rule.subType) {
6466
- case G.number:
6467
- case G.text:
6468
- case G.duplicateValues:
6469
- case G.uniqueValues:
6470
- case G.timePeriod:
6468
+ case X.number:
6469
+ case X.text:
6470
+ case X.duplicateValues:
6471
+ case X.uniqueValues:
6472
+ case X.timePeriod:
6471
6473
  return "1";
6472
- case G.average:
6473
- case G.rank:
6474
+ case X.average:
6475
+ case X.rank:
6474
6476
  return "2";
6475
- case G.formula:
6477
+ case X.formula:
6476
6478
  return "5";
6477
6479
  }
6478
6480
  break;
@@ -6522,7 +6524,7 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6522
6524
  if (C)
6523
6525
  return;
6524
6526
  const O = (() => {
6525
- const U = n.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet();
6527
+ const U = n.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet();
6526
6528
  if (!U)
6527
6529
  throw new Error("No active sheet found");
6528
6530
  return w.current.map((ee) => $o(ee, U.getRowCount(), U.getColumnCount())).filter((ee) => !(Number.isNaN(ee.startRow) || Number.isNaN(ee.startColumn)));
@@ -6530,11 +6532,11 @@ const Pl = "univer-cf-style-edit", Ol = "univer-button-item", Dl = "univer-isAct
6530
6532
  if (u.fetchThroughInterceptors(u.getInterceptPoints().beforeSubmit)(!0, null)) {
6531
6533
  const U = u.fetchThroughInterceptors(u.getInterceptPoints().submit)(null, null);
6532
6534
  if (U) {
6533
- const k = si(n), ie = ai(n);
6534
- if (!k || !ie)
6535
+ const k = si(n), re = ai(n);
6536
+ if (!k || !re)
6535
6537
  throw new Error("No active sheet found");
6536
6538
  let ee = {};
6537
- t.rule && t.rule.cfId ? (ee = { ...t.rule, ranges: O, rule: U }, r.executeCommand(cr.id, { unitId: k, subUnitId: ie, rule: ee }), t.onCancel()) : (ee = { cfId: i.createCfId(k, ie), ranges: O, rule: U, stopIfTrue: !1 }, r.executeCommand(Pn.id, { unitId: k, subUnitId: ie, rule: ee }), t.onCancel());
6539
+ t.rule && t.rule.cfId ? (ee = { ...t.rule, ranges: O, rule: U }, r.executeCommand(cr.id, { unitId: k, subUnitId: re, rule: ee }), t.onCancel()) : (ee = { cfId: i.createCfId(k, re), ranges: O, rule: U, stopIfTrue: !1 }, r.executeCommand(Pn.id, { unitId: k, subUnitId: re, rule: ee }), t.onCancel());
6538
6540
  }
6539
6541
  }
6540
6542
  }, m = () => {
@@ -6608,7 +6610,7 @@ let Ht = class extends je {
6608
6610
  super();
6609
6611
  Xe(this, "_sidebarDisposable", null);
6610
6612
  this._univerInstanceService = e, this._injector = r, this._componentManager = n, this._sidebarService = i, this._localeService = o, this._initPanel(), this.disposeWithMe(
6611
- this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).subscribe((c) => {
6613
+ this._univerInstanceService.getCurrentTypeOfUnit$(ie.UNIVER_SHEET).subscribe((c) => {
6612
6614
  var v;
6613
6615
  c || (v = this._sidebarDisposable) == null || v.dispose();
6614
6616
  })
@@ -6660,7 +6662,7 @@ const jn = {
6660
6662
  ranges: o,
6661
6663
  rule: {
6662
6664
  type: K.highlightCell,
6663
- subType: G.rank
6665
+ subType: X.rank
6664
6666
  }
6665
6667
  };
6666
6668
  r.openPanel(d);
@@ -6672,7 +6674,7 @@ const jn = {
6672
6674
  ranges: o,
6673
6675
  rule: {
6674
6676
  type: K.highlightCell,
6675
- subType: G.formula,
6677
+ subType: X.formula,
6676
6678
  value: "="
6677
6679
  }
6678
6680
  };
@@ -6785,7 +6787,7 @@ let Ut = class extends je {
6785
6787
  }
6786
6788
  // eslint-disable-next-line max-lines-per-function
6787
6789
  _generateConditionalFormattingMutations(e, r) {
6788
- const n = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), i = n.getActiveSheet(), o = n.getUnitId();
6790
+ const n = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), i = n.getActiveSheet(), o = n.getUnitId();
6789
6791
  if (!i) return { redos: [], undos: [] };
6790
6792
  const c = i.getSheetId();
6791
6793
  if (r.copyType === br.CUT)
@@ -6957,7 +6959,7 @@ let Bt = class extends je {
6957
6959
  }), t.set(e(n, i, o.cfId), () => v.forEach((d) => d()));
6958
6960
  };
6959
6961
  this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((n) => {
6960
- const { unitId: i, subUnitId: o, rule: c } = n, v = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), d = v.getActiveSheet();
6962
+ const { unitId: i, subUnitId: o, rule: c } = n, v = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), d = v.getActiveSheet();
6961
6963
  if (!(n.unitId !== v.getUnitId() || n.subUnitId !== (d == null ? void 0 : d.getSheetId())))
6962
6964
  switch (n.type) {
6963
6965
  case "add": {
@@ -7006,7 +7008,7 @@ let Gt = class extends je {
7006
7008
  }
7007
7009
  _markDirtySkeleton() {
7008
7010
  var r, n, i;
7009
- const e = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId();
7011
+ const e = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId();
7010
7012
  (r = this._renderManagerService.getRenderById(e)) == null || r.with(Ti).reCalculate(), (i = (n = this._renderManagerService.getRenderById(e)) == null ? void 0 : n.mainComponent) == null || i.makeDirty();
7011
7013
  }
7012
7014
  _initSkeleton() {
@@ -7014,7 +7016,7 @@ let Gt = class extends je {
7014
7016
  fs(16),
7015
7017
  Cr((e) => !!e.length),
7016
7018
  Cr((e) => {
7017
- const r = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET);
7019
+ const r = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET);
7018
7020
  if (!r) return !1;
7019
7021
  const n = r.getActiveSheet();
7020
7022
  return n ? e.filter((i) => i.unitId === r.getUnitId() && i.subUnitId === n.getSheetId()).length > 0 : !1;
@@ -7083,7 +7085,7 @@ let Sn = class extends vi {
7083
7085
  }
7084
7086
  };
7085
7087
  lo(Sn, "pluginName", `${Yt}_MOBILE_UI_PLUGIN`);
7086
- lo(Sn, "type", re.UNIVER_SHEET);
7088
+ lo(Sn, "type", ie.UNIVER_SHEET);
7087
7089
  Sn = ac([
7088
7090
  mi(Ci),
7089
7091
  Kn(1, Q(We)),
@@ -7103,7 +7105,7 @@ let Cn = class extends je {
7103
7105
  _initAutoFill() {
7104
7106
  const t = () => ({ redos: [], undos: [] }), e = (i, o, c, v, d) => {
7105
7107
  var w;
7106
- const y = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), p = (w = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : w.getSheetId();
7108
+ const y = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET).getUnitId(), p = (w = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : w.getSheetId();
7107
7109
  if (!y || !p)
7108
7110
  return;
7109
7111
  const C = {
@@ -7175,7 +7177,7 @@ let Cn = class extends je {
7175
7177
  });
7176
7178
  }, r = (i, o) => {
7177
7179
  var s, a, u;
7178
- const c = (s = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : s.getUnitId(), v = (u = (a = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : a.getActiveSheet()) == null ? void 0 : u.getSheetId(), d = /* @__PURE__ */ new Map(), y = [], p = [];
7180
+ const c = (s = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : s.getUnitId(), v = (u = (a = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : a.getActiveSheet()) == null ? void 0 : u.getSheetId(), d = /* @__PURE__ */ new Map(), y = [], p = [];
7179
7181
  if (!c || !v)
7180
7182
  return t();
7181
7183
  const C = Ei([i, o]), [_, w] = C.ranges, { mapFunc: S } = C, R = {
@@ -7246,7 +7248,7 @@ let wn = class extends je {
7246
7248
  const o = (i = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : i.map((w) => w.range);
7247
7249
  if (!o)
7248
7250
  return n;
7249
- const c = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), v = c.getActiveSheet();
7251
+ const c = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), v = c.getActiveSheet();
7250
7252
  if (!v)
7251
7253
  return n;
7252
7254
  const d = c.getUnitId(), y = v.getSheetId(), p = this._conditionalFormattingRuleModel.getSubunitRules(d, y);
@@ -7410,14 +7412,14 @@ const ui = [
7410
7412
  new ot((y) => {
7411
7413
  const p = r.onCommandExecuted((C) => {
7412
7414
  var R;
7413
- const { id: _, params: w } = C, S = (R = n.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
7415
+ const { id: _, params: w } = C, S = (R = n.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
7414
7416
  ui.includes(_) && w.unitId === S && y.next(null);
7415
7417
  });
7416
7418
  return () => p.dispose();
7417
7419
  })
7418
7420
  ).pipe(wr(16)).subscribe(() => {
7419
7421
  var R;
7420
- const y = ((R = e.getCurrentSelections()) == null ? void 0 : R.map((h) => h.range)) || [], p = n.getCurrentUnitForType(re.UNIVER_SHEET);
7422
+ const y = ((R = e.getCurrentSelections()) == null ? void 0 : R.map((h) => h.range)) || [], p = n.getCurrentUnitForType(ie.UNIVER_SHEET);
7421
7423
  if (!p) return;
7422
7424
  const C = p.getActiveSheet();
7423
7425
  if (!C) return;
@@ -7427,12 +7429,12 @@ const ui = [
7427
7429
  (d) => new ot((y) => {
7428
7430
  const p = r.onCommandExecuted((C) => {
7429
7431
  var R;
7430
- const { id: _, params: w } = C, S = (R = n.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
7432
+ const { id: _, params: w } = C, S = (R = n.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
7431
7433
  ui.includes(_) && w.unitId === S && y.next(null);
7432
7434
  });
7433
7435
  return () => p.dispose();
7434
7436
  }).pipe(wr(16)).subscribe(() => {
7435
- const y = n.getCurrentUnitForType(re.UNIVER_SHEET);
7437
+ const y = n.getCurrentUnitForType(ie.UNIVER_SHEET);
7436
7438
  if (!y) return;
7437
7439
  const p = y.getActiveSheet();
7438
7440
  if (!p) return;
@@ -7457,7 +7459,7 @@ const ui = [
7457
7459
  icon: "Conditions",
7458
7460
  tooltip: "sheet.cf.title",
7459
7461
  selections: v,
7460
- hidden$: Ko(t, re.UNIVER_SHEET),
7462
+ hidden$: Ko(t, ie.UNIVER_SHEET),
7461
7463
  disabled$: cs(t, { workbookTypes: [wi], worksheetTypes: [xi, _i], rangeTypes: [Ri] })
7462
7464
  };
7463
7465
  }, yc = {
@@ -7673,7 +7675,7 @@ let xn = class extends je {
7673
7675
  switch (o) {
7674
7676
  case Vn.INFINITE:
7675
7677
  case Vn.ONCE: {
7676
- const y = (c = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : c.getUnitId(), p = (d = (v = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : v.getActiveSheet()) == null ? void 0 : d.getSheetId(), C = this._sheetsSelectionsService.getCurrentLastSelection(), _ = C == null ? void 0 : C.range;
7678
+ const y = (c = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : c.getUnitId(), p = (d = (v = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET)) == null ? void 0 : v.getActiveSheet()) == null ? void 0 : d.getSheetId(), C = this._sheetsSelectionsService.getCurrentLastSelection(), _ = C == null ? void 0 : C.range;
7677
7679
  y && p && _ && (this._painterConfig = { unitId: y, subUnitId: p, range: _ });
7678
7680
  break;
7679
7681
  }
@@ -7709,7 +7711,7 @@ let In = class extends je {
7709
7711
  super(), this._conditionalFormattingViewModel = t, this._univerInstanceService = e, this._renderManagerService = r, this._init();
7710
7712
  }
7711
7713
  _init() {
7712
- const t = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), e = (r) => {
7714
+ const t = this._univerInstanceService.getCurrentUnitForType(ie.UNIVER_SHEET), e = (r) => {
7713
7715
  const n = r.getUnitId(), i = this._renderManagerService.getRenderById(n);
7714
7716
  if (!i)
7715
7717
  return;
@@ -7721,7 +7723,7 @@ let In = class extends je {
7721
7723
  }
7722
7724
  }));
7723
7725
  };
7724
- t && e(t), this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).subscribe((r) => {
7726
+ t && e(t), this._univerInstanceService.getCurrentTypeOfUnit$(ie.UNIVER_SHEET).subscribe((r) => {
7725
7727
  r && e(r);
7726
7728
  });
7727
7729
  }
@@ -7807,7 +7809,7 @@ let En = class extends vi {
7807
7809
  }
7808
7810
  };
7809
7811
  uo(En, "pluginName", `${Yt}_UI_PLUGIN`);
7810
- uo(En, "type", re.UNIVER_SHEET);
7812
+ uo(En, "type", ie.UNIVER_SHEET);
7811
7813
  En = Dc([
7812
7814
  mi(Ci),
7813
7815
  Jn(1, Q(We)),