@sheetxl/grid-react 0.8.0-beta.18 → 0.8.0-beta.19

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/grid-react - Grid React - Advanced grid component for React - v0.8.0-beta.18
2
+ * @license @sheetxl/grid-react - Grid React - Advanced grid component for React - v0.8.0-beta.19
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
@@ -272,7 +272,7 @@ var ie = (e, t = !0) => `M ${e.left} ${e.top} L ${e.right} ${e.top} L ${e.right}
272
272
  const t = e?.getElement();
273
273
  return t && "function" == typeof t.isStage && t.isStage() ? t : null;
274
274
  }, Ee = i(o((e, t) => {
275
- const { className: n, onFocus: r, onBlur: o, onDragStart: l, children: i, ...s } = e, d = Je(), u = f(d);
275
+ const { className: n, onFocus: r, onBlur: o, onDragStart: l, children: i, ...s } = e, d = Qe(), u = f(d);
276
276
  u.current = d;
277
277
  const g = f(/* @__PURE__ */ new Set()), h = f(0), p = a((e) => {
278
278
  const t = {
@@ -481,6 +481,9 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
481
481
  }
482
482
  } });
483
483
  }, Pe = (e) => `${e.rowStart},${e.colStart},${e.rowEnd},${e.colEnd}`, Re = H("grid", 10), Me = n(0), De = n(!1), ke = (e, t) => {
484
+ for (const n of e) Array.isArray(n) ? ke(n, t) : null != n && "boolean" != typeof n && t.push(n);
485
+ return t;
486
+ }, Te = (e, t) => {
484
487
  const { rowDims: n, columnDims: r, computeRowDims: o, computeColumnDims: l, viewport: i, zoom: a, containerWidth: s, containerHeight: c, getRangeFromCell: d, invalidate: u, totalRange: g, getSurfacePointFromPointer: h, scrollTo: f, scrollCellCoordsIntoView: p, getAllPanes: m } = t, w = e.anchor, x = n[e.rowIndex], v = r[e.columnIndex];
485
488
  if (x.minIndex > x.maxIndex || v.minIndex > v.maxIndex) return null;
486
489
  const y = e.scrollOrientation, b = Object.freeze({
@@ -502,7 +505,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
502
505
  }, I = {
503
506
  width: s,
504
507
  height: c
505
- }, P = ze(), R = ze();
508
+ }, P = Oe(), R = Oe();
506
509
  let M = null, D = null;
507
510
  const k = () => {
508
511
  const t = i.getSnapshot();
@@ -678,8 +681,8 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
678
681
  const n = h(e, t);
679
682
  if (!n) return null;
680
683
  const r = m();
681
- for (let e = 0; e < Te.length; e++) {
682
- const t = r[Te[e]];
684
+ for (let e = 0; e < ze.length; e++) {
685
+ const t = r[ze[e]];
683
686
  if (t && me(n.x, n.y, t.getPaneBounds())) return t;
684
687
  }
685
688
  return null;
@@ -705,12 +708,12 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
705
708
  scrollTo: (e) => f(e),
706
709
  getAllPanes: m
707
710
  };
708
- }, Te = [
711
+ }, ze = [
709
712
  K.TopLeft,
710
713
  K.Top,
711
714
  K.Left,
712
715
  K.Center
713
- ], ze = () => {
716
+ ], Oe = () => {
714
717
  let e = /* @__PURE__ */ new Float64Array(0), t = /* @__PURE__ */ new Uint32Array(0), n = 0;
715
718
  return (r, o, l) => {
716
719
  const i = o - r + 2;
@@ -729,7 +732,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
729
732
  return s[t] = o, c[t] = a, o;
730
733
  };
731
734
  };
732
- }, Oe = (e, t, n) => {
735
+ }, Le = (e, t, n) => {
733
736
  const r = (t?.left ?? 0) + (n?.x ?? 0), o = (t?.top ?? 0) + (n?.y ?? 0);
734
737
  return {
735
738
  getColOffset: (t) => e.getColOffset(t) - r,
@@ -737,7 +740,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
737
740
  getRowOffset: (t) => e.getRowOffset(t) - o,
738
741
  getRowIndex: (t) => e.getRowIndex(t + o)
739
742
  };
740
- }, Le = Object.freeze([{
743
+ }, $e = Object.freeze([{
741
744
  minIndex: 0,
742
745
  maxIndex: 0,
743
746
  minCoord: 0,
@@ -754,13 +757,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
754
757
  maxVirtualBounds: 0,
755
758
  scrollOffset: 0,
756
759
  freezeOffset: 0
757
- }]), $e = n(null), Ae = ({ pane: e, viewport: t, children: n }) => {
760
+ }]), Ae = n(null), Fe = ({ pane: e, viewport: t, children: n }) => {
758
761
  const r = B(t, (e) => e.getSnapshot()), o = g(() => ({ pane: e }), [e, r]);
759
- return x($e.Provider, {
762
+ return x(Ae.Provider, {
760
763
  value: o,
761
764
  children: n
762
765
  });
763
- }, Fe = () => {
766
+ }, Ne = () => {
764
767
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
765
768
  return {
766
769
  has: (t) => e.has(t),
@@ -778,14 +781,14 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
778
781
  };
779
782
  }
780
783
  };
781
- }, Ne = n(null), Be = ({ store: e, children: t }) => {
782
- const n = s(Ne), r = f(null);
784
+ }, Be = n(null), Ve = ({ store: e, children: t }) => {
785
+ const n = s(Be), r = f(null);
783
786
  let o = e ?? n;
784
- return o || (r.current || (r.current = Fe()), o = r.current), x(Ne.Provider, {
787
+ return o || (r.current || (r.current = Ne()), o = r.current), x(Be.Provider, {
785
788
  value: o,
786
789
  children: t
787
790
  });
788
- }, Ve = { "sheetxl-grid": "_sheetxl-grid_5yo0n_7" }, He = i(o((e, n) => {
791
+ }, He = { "sheetxl-grid": "_sheetxl-grid_5yo0n_7" }, Ke = i(o((e, n) => {
789
792
  const { rowCount: o = 1, columnCount: i = 1, viewport: s, metrics: d, getRangeFromCell: u = W.cellToRange, hiddenRowsAt: m, hiddenColumnsAt: y, freezeLeft: b = 0, freezeTop: S = 0, propsFreezeLeft: E, propsFreezeTop: C, onFirstRender: I, children: P, wrapPane: R, onFocus: D, onBlur: k, className: T, style: z, ...L } = e, $ = O(D, [D]), N = O(k, [k]), B = O(I, [I]), [V, H] = p(K.Center), [_, j] = h((e) => e + 1, 0), G = g(() => new M({}), []), X = s ?? G, [q, Z] = p(() => {
790
793
  const e = X.getClient();
791
794
  return {
@@ -808,7 +811,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
808
811
  return e(), X.subscribe(e);
809
812
  }, [X]);
810
813
  const J = q.zoom, Q = g(() => {
811
- const e = d ?? Ke;
814
+ const e = d ?? _e;
812
815
  return {
813
816
  getColOffset: (t) => e.getColOffset(t) * J,
814
817
  getColIndex: (t) => e.getColIndex(t / J),
@@ -830,13 +833,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
830
833
  ]), se = g(() => {
831
834
  let e = NaN, t = null;
832
835
  return (n) => (n === e && t || (e = n, t = ((e) => {
833
- if (0 === ae) return Le;
836
+ if (0 === ae) return $e;
834
837
  const t = [];
835
838
  let n = 0, r = 0;
836
839
  "number" == typeof S ? n = S : (n = S.index ?? 0, r = (S.offset ?? 0) * J);
837
840
  const l = r, i = Q.getRowOffset(n), a = i - l;
838
841
  if (n > 0) {
839
- const e = Oe(Q, { top: r + Q.getRowOffset(0) }), o = Q.getRowIndex(l), s = Q.getRowIndex(i - 1);
842
+ const e = Le(Q, { top: r + Q.getRowOffset(0) }), o = Q.getRowIndex(l), s = Q.getRowIndex(i - 1);
840
843
  let c;
841
844
  t[1] = {
842
845
  minIndex: o,
@@ -852,7 +855,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
852
855
  freezeOffset: r
853
856
  };
854
857
  }
855
- const s = Math.max(0, ae - a), c = Oe(Q, { top: e + a }), d = c.getRowIndex(0), u = c.getRowIndex(s - 1);
858
+ const s = Math.max(0, ae - a), c = Le(Q, { top: e + a }), d = c.getRowIndex(0), u = c.getRowIndex(s - 1);
856
859
  let g;
857
860
  return t[0] = {
858
861
  minIndex: d,
@@ -880,13 +883,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
880
883
  ]), ce = g(() => se(0), [se]), de = g(() => {
881
884
  let e = NaN, t = null;
882
885
  return (n) => (n === e && t || (e = n, t = ((e) => {
883
- if (0 === ie) return Le;
886
+ if (0 === ie) return $e;
884
887
  const t = [];
885
888
  let n = 0, r = 0;
886
889
  "number" == typeof b ? n = b : (n = b.index ?? 0, r = (b.offset ?? 0) * J);
887
890
  const o = r, l = Q.getColOffset(n), a = l - o;
888
891
  if (n > 0) {
889
- const e = Oe(Q, { left: r + Q.getColOffset(0) }), i = Q.getColIndex(o), s = Q.getColIndex(l - 1);
892
+ const e = Le(Q, { left: r + Q.getColOffset(0) }), i = Q.getColIndex(o), s = Q.getColIndex(l - 1);
890
893
  let c;
891
894
  t[1] = {
892
895
  minIndex: i,
@@ -902,7 +905,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
902
905
  freezeOffset: r
903
906
  };
904
907
  }
905
- const s = Math.max(0, ie - a), c = Oe(Q, { left: e + a }), d = c.getColIndex(0), u = c.getColIndex(s - 1);
908
+ const s = Math.max(0, ie - a), c = Le(Q, { left: e + a }), d = c.getColIndex(0), u = c.getColIndex(s - 1);
906
909
  let g;
907
910
  return t[0] = {
908
911
  minIndex: d,
@@ -960,7 +963,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
960
963
  }
961
964
  }), e.push(i);
962
965
  };
963
- return t(0, 0, K.Center, Ge, je), t(0, 1, K.Top, Xe), t(1, 0, K.Left, Ye), t(1, 1, K.TopLeft, qe), e;
966
+ return t(0, 0, K.Center, Xe, Ge), t(0, 1, K.Top, Ye), t(1, 0, K.Left, qe), t(1, 1, K.TopLeft, Ze), e;
964
967
  }, [ye, be]), Ce = g(() => {
965
968
  let e = {};
966
969
  const t = {
@@ -968,7 +971,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
968
971
  rowStart: 0,
969
972
  colEnd: i - 1,
970
973
  rowEnd: o - 1
971
- }, n = (n) => ke(n, {
974
+ }, n = (n) => Te(n, {
972
975
  rowDims: ce,
973
976
  columnDims: ge,
974
977
  computeRowDims: se,
@@ -980,9 +983,9 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
980
983
  getRangeFromCell: u,
981
984
  invalidate: le,
982
985
  totalRange: t,
983
- getSurfacePointFromPointer: (e, t) => $e(e, t),
984
- scrollTo: (e) => et(e),
985
- scrollCellCoordsIntoView: (e, t, n) => Qe(e, t, n),
986
+ getSurfacePointFromPointer: (e, t) => Ae(e, t),
987
+ scrollTo: (e) => tt(e),
988
+ scrollCellCoordsIntoView: (e, t, n) => et(e, t, n),
986
989
  getAllPanes: () => e
987
990
  }), r = Se.length;
988
991
  for (let t = 0; t < r; t++) {
@@ -999,13 +1002,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
999
1002
  X,
1000
1003
  u,
1001
1004
  xe
1002
- ]), Ie = ge[0]?.maxVirtualBounds ?? 0, Pe = ce[0]?.maxVirtualBounds ?? 0, Re = q.ready, Te = g(() => {
1005
+ ]), Ie = ge[0]?.maxVirtualBounds ?? 0, Pe = ce[0]?.maxVirtualBounds ?? 0, Re = q.ready, ze = g(() => {
1003
1006
  const e = ge[1], t = ce[1];
1004
1007
  return {
1005
1008
  left: e ? e.metrics.getColOffset(e.maxIndex + 1) : 0,
1006
1009
  top: t ? t.metrics.getRowOffset(t.maxIndex + 1) : 0
1007
1010
  };
1008
- }, [ce, ge]), ze = O((e) => {
1011
+ }, [ce, ge]), Oe = O((e) => {
1009
1012
  U.canUseDOM && setTimeout(() => {
1010
1013
  (Ce[V] ?? ue(Ce))?.focus({
1011
1014
  preventScroll: !0,
@@ -1020,8 +1023,8 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1020
1023
  we.current = [];
1021
1024
  }
1022
1025
  }, [Ce]);
1023
- const $e = a((e, t) => {
1024
- const n = tt.current?.getBoundingClientRect();
1026
+ const Ae = a((e, t) => {
1027
+ const n = nt.current?.getBoundingClientRect();
1025
1028
  return n ? {
1026
1029
  x: e - n.x,
1027
1030
  y: t - n.y
@@ -1029,13 +1032,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1029
1032
  x: e,
1030
1033
  y: t
1031
1034
  };
1032
- }, []), Fe = O((e, t) => {
1035
+ }, []), Ne = O((e, t) => {
1033
1036
  if (1 === Object.keys(Ce).length) return ue(Ce);
1034
- const n = $e(e, t);
1037
+ const n = Ae(e, t);
1035
1038
  if (!n) return ue(Ce);
1036
1039
  const { x: r, y: o } = n;
1037
1040
  let l = null;
1038
- const i = Ze, a = i.length;
1041
+ const i = Je, a = i.length;
1039
1042
  for (let e = 0; !l && e < a; e++) {
1040
1043
  const t = Ce[i[e]];
1041
1044
  t && me(r, o, t.getPaneBounds()) && (l = t);
@@ -1052,21 +1055,21 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1052
1055
  ge,
1053
1056
  ce
1054
1057
  ]);
1055
- const Ne = O((e) => {
1058
+ const Be = O((e) => {
1056
1059
  let t = e?.left ?? e?.[0], n = e?.top ?? e?.[1];
1057
1060
  if (void 0 === t && void 0 === n) return;
1058
1061
  const r = e?.behavior ?? "auto", o = X.getTarget();
1059
- void 0 !== t && (t = o.left + (t ?? 0)), void 0 !== n && (n = o.top + (n ?? 0)), o.left === t && o.top === n || et({
1062
+ void 0 !== t && (t = o.left + (t ?? 0)), void 0 !== n && (n = o.top + (n ?? 0)), o.left === t && o.top === n || tt({
1060
1063
  left: t,
1061
1064
  top: n,
1062
1065
  behavior: r
1063
1066
  });
1064
- }, []), He = O((e) => void 0 !== e ? Ce[e] ?? null : Ce[V] ?? ue(Ce), [Ce, V]), Je = O((e) => {
1067
+ }, []), Ke = O((e) => void 0 !== e ? Ce[e] ?? null : Ce[V] ?? ue(Ce), [Ce, V]), Qe = O((e) => {
1065
1068
  const t = Ce[V];
1066
1069
  if (!t) return ue(Ce);
1067
1070
  const n = t.getScrollOrientation(), r = { ...t.getVisibleRange() };
1068
1071
  return n.vertical && (r.rowStart = ce[0].minCoord, r.rowEnd = ce[0].maxCoord), n.horizontal && (r.colStart = ge[0].minCoord, r.colEnd = ge[0].maxCoord), n && W.isCellWithinRange(e, r) ? t : ue(Ce);
1069
- }, [Ce, V]), Qe = O((e, t = {
1072
+ }, [Ce, V]), et = O((e, t = {
1070
1073
  inline: "nearest",
1071
1074
  block: "nearest"
1072
1075
  }, n = null) => {
@@ -1080,7 +1083,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1080
1083
  if (o = Ce[n], !o) return new Promise((e, t) => {
1081
1084
  t("Invalid view");
1082
1085
  });
1083
- } else o = Je(r);
1086
+ } else o = Qe(r);
1084
1087
  if (!o) return Promise.resolve({});
1085
1088
  const l = u(r), i = o.getMetrics(), a = i.getColOffset(l.colStart), s = i.getRowOffset(l.rowStart), c = i.getColOffset(l.colEnd + 1), d = i.getRowOffset(l.rowEnd + 1), g = o.getPaneBounds(), h = o.getTotalSize(), f = o.getScrollTopLeft(), p = ((e, t, n = !0) => {
1086
1089
  n = !0 === n ? {
@@ -1114,13 +1117,13 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1114
1117
  }, t);
1115
1118
  if (!p) return Promise.resolve({ ...f });
1116
1119
  const m = { ...p }, { left: w, top: x } = X.getScroll();
1117
- void 0 !== m.left && (m.left > w ? m.left += We : m.left < w && (m.left -= _e)), void 0 !== m.top && (m.top > x ? m.top += We : m.top < x && (m.top -= _e));
1120
+ void 0 !== m.left && (m.left > w ? m.left += Ue : m.left < w && (m.left -= We)), void 0 !== m.top && (m.top > x ? m.top += Ue : m.top < x && (m.top -= We));
1118
1121
  const v = o.getScrollOrientation();
1119
1122
  v.horizontal && void 0 !== e.colIndex || delete m.left, v.vertical && void 0 !== e.rowIndex || delete m.top;
1120
- const y = void 0 !== m.left ? Math.abs(m.left - w) : 0, b = void 0 !== m.top ? Math.abs(m.top - x) : 0, S = ("object" == typeof t ? t?.behavior : void 0) ?? (Math.max(y, b) < Ue || !X.isSettled() ? "instant" : "smooth");
1123
+ const y = void 0 !== m.left ? Math.abs(m.left - w) : 0, b = void 0 !== m.top ? Math.abs(m.top - x) : 0, S = ("object" == typeof t ? t?.behavior : void 0) ?? (Math.max(y, b) < je || !X.isSettled() ? "instant" : "smooth");
1121
1124
  return new Promise((e, t) => {
1122
1125
  try {
1123
- et({
1126
+ tt({
1124
1127
  ...m,
1125
1128
  behavior: S
1126
1129
  }), e(m);
@@ -1133,46 +1136,46 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1133
1136
  Pe,
1134
1137
  Ce,
1135
1138
  u
1136
- ]), et = O((e) => {
1139
+ ]), tt = O((e) => {
1137
1140
  const t = e?.left ?? e?.[0], n = e?.top ?? e?.[1], r = X.getTarget(), o = t ?? r.left, l = n ?? r.top, i = "smooth" === e?.behavior;
1138
1141
  X.setTarget(o, l, i);
1139
- }, []), tt = A(n, () => ({
1140
- focus: ze,
1142
+ }, []), nt = A(n, () => ({
1143
+ focus: Oe,
1141
1144
  invalidate: le,
1142
- scrollTo: et,
1143
- scrollBy: Ne,
1144
- scrollCellCoordsIntoView: Qe,
1145
- getPaneFromClient: Fe,
1146
- getPaneFromCell: Je,
1147
- getPane: He,
1145
+ scrollTo: tt,
1146
+ scrollBy: Be,
1147
+ scrollCellCoordsIntoView: et,
1148
+ getPaneFromClient: Ne,
1149
+ getPaneFromCell: Qe,
1150
+ getPane: Ke,
1148
1151
  onPaneChangeOnce: (e) => {
1149
1152
  we.current.push(e);
1150
1153
  }
1151
1154
  }), [Ce]);
1152
- c(() => X.observe(tt.current), [X]);
1153
- const nt = (e, t) => {
1155
+ c(() => X.observe(nt.current), [X]);
1156
+ const rt = (e, t) => {
1154
1157
  const n = ((e) => {
1155
1158
  if (!e) return null;
1156
1159
  if (!Array.isArray(e)) return e;
1157
1160
  const t = (e) => l(e) && null != e.props?.zIndex ? e.props.zIndex : 0;
1158
- return [...e].sort((e, n) => t(e) - t(n)).map((e, t) => l(e) ? r(Me.Provider, {
1161
+ return ke(e, []).sort((e, n) => t(e) - t(n)).map((e, t) => l(e) ? r(Me.Provider, {
1159
1162
  key: e.key ?? `layer-${t}`,
1160
1163
  value: t
1161
1164
  }, e) : e);
1162
1165
  })(t);
1163
1166
  return n ? x(De.Provider, {
1164
1167
  value: !1,
1165
- children: x(Ae, {
1168
+ children: x(Fe, {
1166
1169
  pane: e,
1167
1170
  viewport: X,
1168
1171
  children: R ? R(e, n) : n
1169
1172
  })
1170
1173
  }) : null;
1171
- }, rt = g(() => {
1174
+ }, ot = g(() => {
1172
1175
  const e = {}, t = Object.keys(Ce), n = t.length;
1173
1176
  for (let r = 0; r < n; r++) {
1174
1177
  const n = t[r];
1175
- e[n] = nt(Ce[n], P);
1178
+ e[n] = rt(Ce[n], P);
1176
1179
  }
1177
1180
  return e;
1178
1181
  }, [
@@ -1182,7 +1185,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1182
1185
  R,
1183
1186
  o,
1184
1187
  i
1185
- ]), ot = g(() => 0 === Te.left ? null : x(re, {
1188
+ ]), lt = g(() => 0 === ze.left ? null : x(re, {
1186
1189
  linePoints: [
1187
1190
  0,
1188
1191
  0,
@@ -1190,7 +1193,7 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1190
1193
  ae + 1
1191
1194
  ],
1192
1195
  bounds: {
1193
- x: Te.left,
1196
+ x: ze.left,
1194
1197
  y: 0,
1195
1198
  width: 1,
1196
1199
  height: ae + 1
@@ -1198,10 +1201,10 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1198
1201
  ...E
1199
1202
  }), [
1200
1203
  _,
1201
- Te.left,
1204
+ ze.left,
1202
1205
  ae,
1203
1206
  E
1204
- ]), lt = g(() => 0 === Te.top ? null : x(re, {
1207
+ ]), it = g(() => 0 === ze.top ? null : x(re, {
1205
1208
  linePoints: [
1206
1209
  0,
1207
1210
  0,
@@ -1210,20 +1213,20 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1210
1213
  ],
1211
1214
  bounds: {
1212
1215
  x: 0,
1213
- y: Te.top,
1216
+ y: ze.top,
1214
1217
  width: ie + 1,
1215
1218
  height: 1
1216
1219
  },
1217
1220
  ...C
1218
1221
  }), [
1219
1222
  _,
1220
- Te.top,
1223
+ ze.top,
1221
1224
  ie,
1222
1225
  C
1223
- ]), it = f(!1), at = g(() => {
1226
+ ]), at = f(!1), st = g(() => {
1224
1227
  if (!Re) return null;
1225
1228
  const e = (e, n) => {
1226
- const r = e.anchor, o = n.getPaneBounds(), l = Te.left > 0, i = Te.top > 0, a = i && (r === K.Center || r === K.Left), s = i && (r === K.Top || r === K.TopLeft), c = l && (r === K.Center || r === K.Top), d = l && (r === K.Left || r === K.TopLeft), u = 1e6, g = a ? -1 : -1e6, h = c ? -1 : -1e6, f = d ? o.width + 2 : u, p = s ? o.height + 2 : u, m = a || s || c || d, w = {
1229
+ const r = e.anchor, o = n.getPaneBounds(), l = ze.left > 0, i = ze.top > 0, a = i && (r === K.Center || r === K.Left), s = i && (r === K.Top || r === K.TopLeft), c = l && (r === K.Center || r === K.Top), d = l && (r === K.Left || r === K.TopLeft), u = 1e6, g = a ? -1 : -1e6, h = c ? -1 : -1e6, f = d ? o.width + 2 : u, p = s ? o.height + 2 : u, m = a || s || c || d, w = {
1227
1230
  position: "absolute",
1228
1231
  left: o.x,
1229
1232
  top: o.y,
@@ -1231,10 +1234,10 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1231
1234
  height: o.height,
1232
1235
  clip: m ? `rect(${g}px, ${f}px, ${p}px, ${h}px)` : void 0
1233
1236
  };
1234
- return x(Ae, {
1237
+ return x(Fe, {
1235
1238
  pane: n,
1236
1239
  viewport: X,
1237
- children: e.elemStage ? t(e.elemStage, { style: w }, rt?.[r]) : null
1240
+ children: e.elemStage ? t(e.elemStage, { style: w }, ot?.[r]) : null
1238
1241
  }, `pane:${r}`);
1239
1242
  }, n = Se.length, r = new Array(n);
1240
1243
  for (let t = 0; t < n; t++) {
@@ -1243,75 +1246,75 @@ var Ce = Object.freeze([]), Ie = (e, t) => {
1243
1246
  }
1244
1247
  return v(w, { children: [
1245
1248
  r,
1246
- ot,
1247
- lt
1249
+ lt,
1250
+ it
1248
1251
  ] });
1249
1252
  }, [
1250
1253
  Ce,
1251
1254
  Se,
1252
- rt,
1255
+ ot,
1253
1256
  ie,
1254
1257
  ae,
1255
1258
  Re,
1256
- Te,
1257
- ot,
1258
- lt
1259
+ ze,
1260
+ lt,
1261
+ it
1259
1262
  ]);
1260
1263
  c(() => {
1261
- !it.current && at && Re && (it.current = !0, B?.(tt.current));
1262
- }, [at, Re]);
1263
- const st = F();
1264
+ !at.current && st && Re && (at.current = !0, B?.(nt.current));
1265
+ }, [st, Re]);
1266
+ const ct = F();
1264
1267
  return x("div", {
1265
- ref: tt,
1266
- className: Y(T, "grid-surface", Ve["sheetxl-grid"], { "touch-input": "touch" === st }),
1268
+ ref: nt,
1269
+ className: Y(T, "grid-surface", He["sheetxl-grid"], { "touch-input": "touch" === ct }),
1267
1270
  style: {
1268
1271
  overflow: "hidden",
1269
1272
  ...z
1270
1273
  },
1271
1274
  ...L,
1272
- children: x(Be, { children: at })
1275
+ children: x(Ve, { children: st })
1273
1276
  });
1274
1277
  }));
1275
- He.displayName = "GridSurface";
1276
- var Ke = Object.freeze({
1278
+ Ke.displayName = "GridSurface";
1279
+ var _e = Object.freeze({
1277
1280
  getColOffset: (e) => 75 * e,
1278
1281
  getColIndex: (e) => Math.floor(e / 75),
1279
1282
  getRowOffset: (e) => 20 * e,
1280
1283
  getRowIndex: (e) => Math.floor(e / 20)
1281
- }), _e = 0, We = 20, Ue = 150, je = Object.freeze({
1284
+ }), We = 0, Ue = 20, je = 150, Ge = Object.freeze({
1282
1285
  bottom: -4,
1283
1286
  right: -4
1284
- }), Ge = Object.freeze({
1287
+ }), Xe = Object.freeze({
1285
1288
  horizontal: !0,
1286
1289
  vertical: !0
1287
- }), Xe = Object.freeze({
1290
+ }), Ye = Object.freeze({
1288
1291
  horizontal: !0,
1289
1292
  vertical: !1
1290
- }), Ye = Object.freeze({
1293
+ }), qe = Object.freeze({
1291
1294
  horizontal: !1,
1292
1295
  vertical: !0
1293
- }), qe = Object.freeze({
1296
+ }), Ze = Object.freeze({
1294
1297
  horizontal: !1,
1295
1298
  vertical: !1
1296
- }), Ze = [
1299
+ }), Je = [
1297
1300
  K.TopLeft,
1298
1301
  K.Top,
1299
1302
  K.Left,
1300
1303
  K.Center
1301
1304
  ];
1302
- function Je() {
1303
- const e = s($e);
1305
+ function Qe() {
1306
+ const e = s(Ae);
1304
1307
  if (!e) throw new Error("useGridPane must be used within a GridPaneProvider");
1305
1308
  return e.pane;
1306
1309
  }
1307
- function Qe() {
1308
- return s($e)?.pane ?? null;
1310
+ function et() {
1311
+ return s(Ae)?.pane ?? null;
1309
1312
  }
1310
- var et = (e) => `k:${e}`;
1311
- function tt(e, t) {
1312
- const n = s(Ne), r = f(null);
1313
- r.current || (r.current = Fe());
1314
- const o = n ?? r.current, l = et(e), i = f(null);
1313
+ var tt = (e) => `k:${e}`;
1314
+ function nt(e, t) {
1315
+ const n = s(Be), r = f(null);
1316
+ r.current || (r.current = Ne());
1317
+ const o = n ?? r.current, l = tt(e), i = f(null);
1315
1318
  null === i.current && (i.current = { v: "function" == typeof t ? t() : t });
1316
1319
  const c = a(() => o.has(l) ? o.get(l) : i.current.v, [o, l]);
1317
1320
  return [m(a((e) => o.subscribe(l, e), [o, l]), c, c), a((e) => {
@@ -1319,51 +1322,51 @@ function tt(e, t) {
1319
1322
  o.set(l, "function" == typeof e ? e(t) : e);
1320
1323
  }, [o, l])];
1321
1324
  }
1322
- function nt(e, t) {
1323
- const n = s(Ne), r = f(null);
1324
- r.current || (r.current = Fe());
1325
- const o = n ?? r.current, l = et(e), i = f(t);
1325
+ function rt(e, t) {
1326
+ const n = s(Be), r = f(null);
1327
+ r.current || (r.current = Ne());
1328
+ const o = n ?? r.current, l = tt(e), i = f(t);
1326
1329
  return a((e) => {
1327
1330
  const t = o.has(l) ? o.get(l) : i.current;
1328
1331
  o.set(l, "function" == typeof e ? e(t) : e);
1329
1332
  }, [o, l]);
1330
1333
  }
1331
- function rt(e, t, n) {
1332
- const r = et(t), o = a(() => e.has(r) ? e.get(r) : n, [
1334
+ function ot(e, t, n) {
1335
+ const r = tt(t), o = a(() => e.has(r) ? e.get(r) : n, [
1333
1336
  e,
1334
1337
  r,
1335
1338
  n
1336
1339
  ]);
1337
1340
  return m(a((t) => e.subscribe(r, t), [e, r]), o, o);
1338
1341
  }
1339
- var ot = () => ({
1342
+ var lt = () => ({
1340
1343
  zIndex: s(Me),
1341
- pane: Qe()
1342
- }), lt = i((e) => {
1344
+ pane: et()
1345
+ }), it = i((e) => {
1343
1346
  const { onPointerDown: t, onPointerMove: n, onPointerUp: r, onPointerLeave: o, onMouseDown: l, onMouseEnter: i, onMouseLeave: a, onMouseMove: d, onMouseOut: u, onMouseOver: g, onMouseUp: h, onDoubleClick: p, onKeyDown: m, onKeyPress: w, onKeyUp: v, onFocus: y, onBlur: b, onContextMenu: S, zIndex: E, className: C, style: I, children: P } = e, R = s(De);
1344
1347
  c(() => {
1345
- R && !at && (at = !0, console.error("<Layer> nested inside another <Layer>. Layers exist only as direct children of the grid (law 4: the stack is flat) — a composite renders exactly one Layer at its root. For a full-view container inside a layer, use <VirtualDiv fill>. This error fires once."));
1348
+ R && !st && (st = !0, console.error("<Layer> nested inside another <Layer>. Layers exist only as direct children of the grid (law 4: the stack is flat) — a composite renders exactly one Layer at its root. For a full-view container inside a layer, use <VirtualDiv fill>. This error fires once."));
1346
1349
  }, [R]);
1347
- const D = Se(Qe()), k = s(Me), T = f({});
1350
+ const D = Se(et()), k = s(Me), T = f({});
1348
1351
  T.current = {
1349
- pointerdown: it(t),
1350
- pointermove: it(n),
1351
- pointerup: it(r),
1352
- pointerleave: it(o),
1353
- mousedown: it(l),
1354
- mouseenter: it(i),
1355
- mouseleave: it(a),
1356
- mousemove: it(d),
1357
- mouseout: it(u),
1358
- mouseover: it(g),
1359
- mouseup: it(h),
1360
- dblclick: it(p),
1361
- keydown: it(m),
1362
- keypress: it(w),
1363
- keyup: it(v),
1364
- focus: it(y),
1365
- blur: it(b),
1366
- contextmenu: it(S)
1352
+ pointerdown: at(t),
1353
+ pointermove: at(n),
1354
+ pointerup: at(r),
1355
+ pointerleave: at(o),
1356
+ mousedown: at(l),
1357
+ mouseenter: at(i),
1358
+ mouseleave: at(a),
1359
+ mousemove: at(d),
1360
+ mouseout: at(u),
1361
+ mouseover: at(g),
1362
+ mouseup: at(h),
1363
+ dblclick: at(p),
1364
+ keydown: at(m),
1365
+ keypress: at(w),
1366
+ keyup: at(v),
1367
+ focus: at(y),
1368
+ blur: at(b),
1369
+ contextmenu: at(S)
1367
1370
  };
1368
1371
  const z = f(null);
1369
1372
  return c(() => {
@@ -1395,15 +1398,15 @@ var ot = () => ({
1395
1398
  })
1396
1399
  });
1397
1400
  });
1398
- lt.displayName = "Layer";
1399
- var it = (e) => e ? (t) => e(t) : void 0, at = !1, st = !1, ct = "_virtual-div_16eab_1", dt = i(o((e, t) => {
1401
+ it.displayName = "Layer";
1402
+ var at = (e) => e ? (t) => e(t) : void 0, st = !1, ct = !1, dt = "_virtual-div_16eab_1", ut = i(o((e, t) => {
1400
1403
  const { range: n, bounds: r, fill: o = !1, clipInsets: l, disableAlign: i = !1, coverGridlines: d = !1, alignWidth: u, keepMounted: g = !1, className: h, style: p, children: m, ...w } = e;
1401
- s(De) || ut || (ut = !0, console.warn("VirtualDiv rendered outside a <Layer>. The grid's children are Layers; place VirtualDivs inside one (law 4: the stack is flat). This warning fires once."));
1404
+ s(De) || gt || (gt = !0, console.warn("VirtualDiv rendered outside a <Layer>. The grid's children are Layers; place VirtualDivs inside one (law 4: the stack is flat). This warning fires once."));
1402
1405
  const v = f(null), y = a((e) => {
1403
1406
  v.current = e, "function" == typeof t ? t(e) : t && (t.current = e);
1404
1407
  }, [t]);
1405
1408
  (({ getElement: e, handlerProps: t }) => {
1406
- const r = Se(Qe()), o = s(Me);
1409
+ const r = Se(et()), o = s(Me);
1407
1410
  let l = !1;
1408
1411
  if (t) {
1409
1412
  for (let e = 0; e < ve.length; e++) if ("function" == typeof t[ve[e]]) {
@@ -1440,13 +1443,13 @@ var it = (e) => e ? (t) => e(t) : void 0, at = !1, st = !1, ct = "_virtual-div_1
1440
1443
  handlerProps: w
1441
1444
  });
1442
1445
  const b = (({ range: e, bounds: t, fill: n, clipInsets: r }) => {
1443
- const o = Je();
1446
+ const o = Qe();
1444
1447
  if (!o) return null;
1445
1448
  let l = null, i = !1;
1446
1449
  if (e) l = o.getBoundsFromRange(e), i = null === o.toClipBounds(l, r);
1447
1450
  else if (t) i = null === o.toClipBounds(t, r), l = t;
1448
1451
  else {
1449
- if (!n) return st || (st = !0, console.warn("VirtualDiv: provide exactly one of 'range' | 'bounds' | 'fill'. (The implicit \"no placement = pane-sized\" fallback was removed — use 'fill'.) This warning fires once.")), null;
1452
+ if (!n) return ct || (ct = !0, console.warn("VirtualDiv: provide exactly one of 'range' | 'bounds' | 'fill'. (The implicit \"no placement = pane-sized\" fallback was removed — use 'fill'.) This warning fires once.")), null;
1450
1453
  {
1451
1454
  const e = o.getPaneBounds();
1452
1455
  l = {
@@ -1488,7 +1491,7 @@ var it = (e) => e ? (t) => e(t) : void 0, at = !1, st = !1, ct = "_virtual-div_1
1488
1491
  height: S.height
1489
1492
  };
1490
1493
  return x("div", {
1491
- className: q(h, ct),
1494
+ className: q(h, dt),
1492
1495
  style: {
1493
1496
  width: `${k}px`,
1494
1497
  height: `${T}px`,
@@ -1508,8 +1511,8 @@ var it = (e) => e ? (t) => e(t) : void 0, at = !1, st = !1, ct = "_virtual-div_1
1508
1511
  })
1509
1512
  });
1510
1513
  }));
1511
- dt.displayName = "VirtualDiv";
1512
- var ut = !1, gt = (e, t, n, r) => ({
1514
+ ut.displayName = "VirtualDiv";
1515
+ var gt = !1, ht = (e, t, n, r) => ({
1513
1516
  x: e,
1514
1517
  y: t,
1515
1518
  width: n,
@@ -1518,44 +1521,44 @@ var ut = !1, gt = (e, t, n, r) => ({
1518
1521
  left: e,
1519
1522
  right: e + n,
1520
1523
  bottom: t + r
1521
- }), ht = gt(0, 0, 0, 0), ft = (e) => {
1524
+ }), ft = ht(0, 0, 0, 0), pt = (e) => {
1522
1525
  const t = e.getElement()?.getBoundingClientRect?.();
1523
1526
  return {
1524
1527
  x: t?.left ?? 0,
1525
1528
  y: t?.top ?? 0
1526
1529
  };
1527
- }, pt = (e) => {
1530
+ }, mt = (e) => {
1528
1531
  const t = e.getElement()?.ownerDocument?.documentElement;
1529
- return t ? gt(0, 0, t.clientWidth, t.clientHeight) : null;
1530
- }, mt = (e, t) => {
1532
+ return t ? ht(0, 0, t.clientWidth, t.clientHeight) : null;
1533
+ }, wt = (e, t) => {
1531
1534
  if (!t) return e;
1532
1535
  const n = Math.max(e.left, t.left), r = Math.max(e.top, t.top), o = Math.max(n, Math.min(e.right, t.right)), l = Math.max(r, Math.min(e.bottom, t.bottom));
1533
- return gt(n, r, o - n, l - r);
1534
- }, wt = (e) => {
1536
+ return ht(n, r, o - n, l - r);
1537
+ }, xt = (e) => {
1535
1538
  const t = e.getElement()?.getBoundingClientRect?.();
1536
- return t ? gt(t.left, t.top, t.width, t.height) : ht;
1537
- }, xt = {
1539
+ return t ? ht(t.left, t.top, t.width, t.height) : ft;
1540
+ }, vt = {
1538
1541
  side: "t",
1539
1542
  align: "center"
1540
- }, vt = {
1543
+ }, yt = {
1541
1544
  side: "flip",
1542
1545
  align: "slide"
1543
- }, yt = [
1546
+ }, bt = [
1544
1547
  K.TopLeft,
1545
1548
  K.Top,
1546
1549
  K.Left,
1547
1550
  K.Center
1548
- ], bt = /* @__PURE__ */ new Set([K.Top, K.TopLeft]), St = /* @__PURE__ */ new Set([K.Left, K.TopLeft]), Et = (e, t) => {
1549
- const n = bt.has(e.getAnchor()), r = St.has(t.getAnchor());
1551
+ ], St = /* @__PURE__ */ new Set([K.Top, K.TopLeft]), Et = /* @__PURE__ */ new Set([K.Left, K.TopLeft]), Ct = (e, t) => {
1552
+ const n = St.has(e.getAnchor()), r = Et.has(t.getAnchor());
1550
1553
  return n && r ? K.TopLeft : n ? K.Top : r ? K.Left : K.Center;
1551
- }, Ct = (e, t) => {
1554
+ }, It = (e, t) => {
1552
1555
  const n = (t.left + t.right) / 2, r = (t.top + t.bottom) / 2;
1553
1556
  return r < e.top ? "t" : r > e.bottom ? "b" : n < e.left ? "l" : n > e.right ? "r" : null;
1554
- }, It = (e, t, n, r, o, l) => {
1557
+ }, Pt = (e, t, n, r, o, l) => {
1555
1558
  const i = "row" === r ? o.rowStart : o.colStart, a = "row" === r ? o.rowEnd : o.colEnd, s = ((e, t, n, r, o) => {
1556
1559
  let l = null, i = null, a = 1 / 0, s = !1;
1557
- for (let c = 0; c < yt.length; c++) {
1558
- const d = e[yt[c]];
1560
+ for (let c = 0; c < bt.length; c++) {
1561
+ const d = e[bt[c]];
1559
1562
  if (!d) continue;
1560
1563
  const u = d.getVisibleRange(), g = "row" === t ? u.rowStart : u.colStart, h = "row" === t ? u.rowEnd : u.colEnd;
1561
1564
  if (n > h || r < g) continue;
@@ -1568,9 +1571,9 @@ var ut = !1, gt = (e, t, n, r) => ({
1568
1571
  visible: s
1569
1572
  };
1570
1573
  })(t, r, i, a, "start" === l ? i : "end" === l ? a : Math.round((i + a) / 2)), c = s.pane ?? ue(t) ?? e, d = ((e, t) => {
1571
- const n = wt(e), r = e.getBoundsFromRange(t);
1572
- return gt(n.left + r.x, n.top + r.y, r.width, r.height);
1573
- })(c, o), u = "row" === r ? d.top : d.left, g = "row" === r ? d.bottom : d.right, h = "start" === l ? u : "end" === l ? g : (u + g) / 2, f = mt(wt(c), n);
1574
+ const n = xt(e), r = e.getBoundsFromRange(t);
1575
+ return ht(n.left + r.x, n.top + r.y, r.width, r.height);
1576
+ })(c, o), u = "row" === r ? d.top : d.left, g = "row" === r ? d.bottom : d.right, h = "start" === l ? u : "end" === l ? g : (u + g) / 2, f = wt(xt(c), n);
1574
1577
  return {
1575
1578
  pane: c,
1576
1579
  visible: s.visible,
@@ -1580,8 +1583,8 @@ var ut = !1, gt = (e, t, n, r) => ({
1580
1583
  vLo: "row" === r ? f.top : f.left,
1581
1584
  vHi: "row" === r ? f.bottom : f.right
1582
1585
  };
1583
- }, Pt = (e, t, n, r, o, l, i) => {
1584
- const a = It(e, t, n, r, o, l);
1586
+ }, Rt = (e, t, n, r, o, l, i) => {
1587
+ const a = Pt(e, t, n, r, o, l);
1585
1588
  if (!a.visible) return {
1586
1589
  res: a,
1587
1590
  edge: l,
@@ -1598,7 +1601,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1598
1601
  hidden: !0
1599
1602
  };
1600
1603
  if ("flip" === i && "center" !== l) {
1601
- const i = "start" === l ? "end" : "start", a = It(e, t, n, r, o, i);
1604
+ const i = "start" === l ? "end" : "start", a = Pt(e, t, n, r, o, i);
1602
1605
  if (a.visible && a.value >= a.vLo && a.value <= a.vHi) return {
1603
1606
  res: a,
1604
1607
  edge: i,
@@ -1610,15 +1613,15 @@ var ut = !1, gt = (e, t, n, r) => ({
1610
1613
  edge: l,
1611
1614
  hidden: !1
1612
1615
  };
1613
- }, Rt = (e, t, n = "data", r = 0, o = xt, l = "hide", i = vt) => {
1616
+ }, Mt = (e, t, n = "data", r = 0, o = vt, l = "hide", i = yt) => {
1614
1617
  const a = {
1615
1618
  side: o.side,
1616
1619
  align: o.align ?? "center"
1617
1620
  };
1618
1621
  if (!e) return {
1619
- rect: ht,
1622
+ rect: ft,
1620
1623
  clipped: !0,
1621
- boundaryRect: ht,
1624
+ boundaryRect: ft,
1622
1625
  clampedTo: null,
1623
1626
  anchorPoint: {
1624
1627
  x: 0,
@@ -1632,13 +1635,13 @@ var ut = !1, gt = (e, t, n, r) => ({
1632
1635
  const s = ((e, t) => {
1633
1636
  if (t && "object" == typeof t) {
1634
1637
  const e = t;
1635
- return gt(e.x, e.y, e.width, e.height);
1638
+ return ht(e.x, e.y, e.width, e.height);
1636
1639
  }
1637
- const n = pt(e);
1640
+ const n = mt(e);
1638
1641
  if ("viewport" === t && n) return n;
1639
1642
  if ("pane" === t) {
1640
- const t = ft(e), r = e.getPaneBounds();
1641
- return mt(gt(t.x, t.y, r.width, r.height), n);
1643
+ const t = pt(e), r = e.getPaneBounds();
1644
+ return wt(ht(t.x, t.y, r.width, r.height), n);
1642
1645
  }
1643
1646
  const r = e.getAllPanes();
1644
1647
  let o = 1 / 0, l = 1 / 0, i = -1 / 0, a = -1 / 0;
@@ -1647,10 +1650,10 @@ var ut = !1, gt = (e, t, n, r) => ({
1647
1650
  t && (o = Math.min(o, t.left), l = Math.min(l, t.top), i = Math.max(i, t.right), a = Math.max(a, t.bottom));
1648
1651
  }
1649
1652
  if (o === 1 / 0) {
1650
- const t = ft(e), r = e.getPaneBounds();
1651
- return mt(gt(t.x, t.y, r.width, r.height), n);
1653
+ const t = pt(e), r = e.getPaneBounds();
1654
+ return wt(ht(t.x, t.y, r.width, r.height), n);
1652
1655
  }
1653
- return mt(gt(o, l, i - o, a - l), n);
1656
+ return wt(ht(o, l, i - o, a - l), n);
1654
1657
  })(e, n), c = (e) => {
1655
1658
  if (r <= 0) return !1;
1656
1659
  const t = (n = e, o = s, {
@@ -1661,7 +1664,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1661
1664
  return t.w <= r || t.h <= r;
1662
1665
  };
1663
1666
  if ("point" in t) {
1664
- const n = gt(t.point.x, t.point.y, 0, 0), r = Ct(s, n), o = e.getPaneFromPointer(t.point.x, t.point.y);
1667
+ const n = ht(t.point.x, t.point.y, 0, 0), r = It(s, n), o = e.getPaneFromPointer(t.point.x, t.point.y);
1665
1668
  return {
1666
1669
  rect: n,
1667
1670
  clipped: null !== r,
@@ -1675,12 +1678,12 @@ var ut = !1, gt = (e, t, n, r) => ({
1675
1678
  };
1676
1679
  }
1677
1680
  if ("edge" in t) {
1678
- const n = ft(e), r = e.getPaneBounds();
1681
+ const n = pt(e), r = e.getPaneBounds();
1679
1682
  let o = n.x + r.width / 2, l = n.y + r.height / 2;
1680
1683
  "t" === t.edge ? l = n.y : "b" === t.edge ? l = n.y + r.height : "l" === t.edge ? o = n.x : "r" === t.edge && (o = n.x + r.width);
1681
1684
  const i = e.getPaneFromPointer(o, l) ?? e;
1682
1685
  return {
1683
- rect: gt(o, l, 0, 0),
1686
+ rect: ht(o, l, 0, 0),
1684
1687
  clipped: !1,
1685
1688
  boundaryRect: s,
1686
1689
  clampedTo: null,
@@ -1695,7 +1698,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1695
1698
  };
1696
1699
  }
1697
1700
  if ("bounds" in t) {
1698
- const n = ft(e), r = t.bounds, o = e.toClipBounds(r, 0), l = gt(n.x + r.x, n.y + r.y, r.width, r.height), i = null === o || c(l), u = ((e, t) => {
1701
+ const n = pt(e), r = t.bounds, o = e.toClipBounds(r, 0), l = ht(n.x + r.x, n.y + r.y, r.width, r.height), i = null === o || c(l), u = ((e, t) => {
1699
1702
  const { side: n, align: r = "center" } = t;
1700
1703
  if ("t" === n || "b" === n) {
1701
1704
  const t = "t" === n ? e.top : e.bottom;
@@ -1713,7 +1716,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1713
1716
  rect: l,
1714
1717
  clipped: i,
1715
1718
  boundaryRect: s,
1716
- clampedTo: Ct(s, (d = u, gt(d.x, d.y, 0, 0))),
1719
+ clampedTo: It(s, (d = u, ht(d.x, d.y, 0, 0))),
1717
1720
  anchorPoint: u,
1718
1721
  owner: e.getAnchor(),
1719
1722
  slid: null,
@@ -1734,16 +1737,16 @@ var ut = !1, gt = (e, t, n, r) => ({
1734
1737
  };
1735
1738
  }
1736
1739
  return null;
1737
- })(t), g = e.getAllPanes(), h = pt(e), { side: f, align: p } = a, m = "t" === f || "b" === f ? "row" : "col", w = "row" === m ? "col" : "row", x = "t" === f || "l" === f ? "start" : "end", v = {
1738
- side: i.side ?? vt.side,
1739
- align: i.align ?? vt.align
1740
- }, y = Pt(e, g, h, m, u, x, v.side), b = Pt(e, g, h, w, u, p, v.align), S = "row" === m ? y : b, E = "col" === m ? y : b, C = S.res.visible && E.res.visible && !S.hidden && !E.hidden, I = {
1740
+ })(t), g = e.getAllPanes(), h = mt(e), { side: f, align: p } = a, m = "t" === f || "b" === f ? "row" : "col", w = "row" === m ? "col" : "row", x = "t" === f || "l" === f ? "start" : "end", v = {
1741
+ side: i.side ?? yt.side,
1742
+ align: i.align ?? yt.align
1743
+ }, y = Rt(e, g, h, m, u, x, v.side), b = Rt(e, g, h, w, u, p, v.align), S = "row" === m ? y : b, E = "col" === m ? y : b, C = S.res.visible && E.res.visible && !S.hidden && !E.hidden, I = {
1741
1744
  side: "row" === m ? "start" === y.edge ? "t" : "b" : "start" === y.edge ? "l" : "r",
1742
1745
  align: b.edge
1743
1746
  }, P = E.res.value, R = S.res.value, M = (e) => Math.max(E.res.vLo, Math.min(E.res.vHi, e)), D = (e) => Math.max(S.res.vLo, Math.min(S.res.vHi, e)), k = M(P), T = D(R), z = {
1744
1747
  x: k,
1745
1748
  y: T
1746
- }, O = M(E.res.lo), L = D(S.res.lo), $ = gt(O, L, M(E.res.hi) - O, D(S.res.hi) - L), A = k - P, F = T - R, N = Math.abs(F) >= Math.abs(A) ? F < 0 ? "b" : F > 0 ? "t" : A < 0 ? "r" : A > 0 ? "l" : null : A < 0 ? "r" : A > 0 ? "l" : F < 0 ? "b" : F > 0 ? "t" : null, B = A || F ? {
1749
+ }, O = M(E.res.lo), L = D(S.res.lo), $ = ht(O, L, M(E.res.hi) - O, D(S.res.hi) - L), A = k - P, F = T - R, N = Math.abs(F) >= Math.abs(A) ? F < 0 ? "b" : F > 0 ? "t" : A < 0 ? "r" : A > 0 ? "l" : null : A < 0 ? "r" : A > 0 ? "l" : F < 0 ? "b" : F > 0 ? "t" : null, B = A || F ? {
1747
1750
  dx: A,
1748
1751
  dy: F,
1749
1752
  distance: Math.hypot(A, F),
@@ -1755,7 +1758,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1755
1758
  boundaryRect: s,
1756
1759
  clampedTo: N,
1757
1760
  anchorPoint: z,
1758
- owner: Et(S.res.pane, E.res.pane),
1761
+ owner: Ct(S.res.pane, E.res.pane),
1759
1762
  slid: B,
1760
1763
  outOfView: !C,
1761
1764
  placement: I
@@ -1770,13 +1773,13 @@ var ut = !1, gt = (e, t, n, r) => ({
1770
1773
  outOfView: !0,
1771
1774
  placement: I
1772
1775
  };
1773
- }, Mt = n(null), Dt = () => {
1774
- const e = s(Mt);
1776
+ }, Dt = n(null), kt = () => {
1777
+ const e = s(Dt);
1775
1778
  if (!e) throw new Error("useSticky must be used within a <StickyAnchor>");
1776
1779
  return e;
1777
- }, kt = () => s(Mt), Tt = (e) => {
1778
- const { anchor: t, placement: n = xt, boundary: r = "data", whenOff: o = "hide", whenPartial: l, minVisible: i = 0, children: s } = e, { reference: c, getBoundaryRect: d, getAnchorPoint: h, anchorPoint: p, owner: m, clipped: w, slid: v, outOfView: y, pane: b, placement: S } = ((e, t) => {
1779
- const n = Qe(), r = t?.pane ?? n, o = t?.boundary ?? "data", l = t?.minVisible ?? 0, i = t?.placement ?? xt, a = t?.whenOff ?? "hide", s = t?.whenPartial ?? vt, c = f({
1780
+ }, Tt = () => s(Dt), zt = (e) => {
1781
+ const { anchor: t, placement: n = vt, boundary: r = "data", whenOff: o = "hide", whenPartial: l, minVisible: i = 0, children: s } = e, { reference: c, getBoundaryRect: d, getAnchorPoint: h, anchorPoint: p, owner: m, clipped: w, slid: v, outOfView: y, pane: b, placement: S } = ((e, t) => {
1782
+ const n = et(), r = t?.pane ?? n, o = t?.boundary ?? "data", l = t?.minVisible ?? 0, i = t?.placement ?? vt, a = t?.whenOff ?? "hide", s = t?.whenPartial ?? yt, c = f({
1780
1783
  pane: r,
1781
1784
  anchor: e,
1782
1785
  boundary: o,
@@ -1797,7 +1800,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1797
1800
  const d = g(() => {
1798
1801
  const e = () => {
1799
1802
  const e = c.current;
1800
- return Rt(e.pane, e.anchor, e.boundary, e.minVisible, e.placement, e.whenOff, e.whenPartial);
1803
+ return Mt(e.pane, e.anchor, e.boundary, e.minVisible, e.placement, e.whenOff, e.whenPartial);
1801
1804
  };
1802
1805
  return {
1803
1806
  reference: {
@@ -1809,7 +1812,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1809
1812
  getBoundaryRect: () => e().boundaryRect,
1810
1813
  getAnchorPoint: () => e().anchorPoint
1811
1814
  };
1812
- }, []), u = Rt(r, e, o, l, i, a, s);
1815
+ }, []), u = Mt(r, e, o, l, i, a, s);
1813
1816
  return {
1814
1817
  reference: d.reference,
1815
1818
  getBoundaryRect: d.getBoundaryRect,
@@ -1842,7 +1845,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1842
1845
  const P = f(b);
1843
1846
  P.current = b;
1844
1847
  const R = a((e) => {
1845
- const t = zt(I.current), n = P.current;
1848
+ const t = Ot(I.current), n = P.current;
1846
1849
  return n && t ? n.scrollCellCoordsIntoView(t, e) : Promise.resolve(void 0);
1847
1850
  }, []), M = g(() => ({
1848
1851
  reference: c,
@@ -1889,7 +1892,7 @@ var ut = !1, gt = (e, t, n, r) => ({
1889
1892
  position: "absolute",
1890
1893
  left: 0,
1891
1894
  top: 0,
1892
- transform: `translate3d(${t}px, ${n}px, 0) ${Ot(S)}`,
1895
+ transform: `translate3d(${t}px, ${n}px, 0) ${Lt(S)}`,
1893
1896
  willChange: "transform"
1894
1897
  },
1895
1898
  children: x("div", {
@@ -1905,28 +1908,28 @@ var ut = !1, gt = (e, t, n, r) => ({
1905
1908
  if (!r) return;
1906
1909
  let o = 0, l = 0;
1907
1910
  n.left < r.left ? o = r.left - n.left : n.right > r.right && (o = Math.min(0, r.right - n.right)), n.top < r.top ? l = r.top - n.top : n.bottom > r.bottom && (l = Math.min(0, r.bottom - n.bottom)), t.style.transform = o || l ? `translate(${o}px, ${l}px)` : "";
1908
- }), x(Mt.Provider, {
1911
+ }), x(Dt.Provider, {
1909
1912
  value: M,
1910
1913
  children: O
1911
1914
  });
1912
- }, zt = (e) => "range" in e ? {
1915
+ }, Ot = (e) => "range" in e ? {
1913
1916
  rowIndex: e.range.rowStart,
1914
1917
  colIndex: e.range.colStart
1915
1918
  } : "cell" in e ? {
1916
1919
  rowIndex: e.cell.rowIndex,
1917
1920
  colIndex: e.cell.colIndex
1918
- } : null, Ot = (e) => {
1921
+ } : null, Lt = (e) => {
1919
1922
  const { side: t, align: n = "center" } = e;
1920
1923
  let r = "-50%", o = "-50%";
1921
1924
  "t" === t ? o = "-100%" : "b" === t ? o = "0%" : "l" === t ? r = "-100%" : "r" === t && (r = "0%");
1922
1925
  const l = "start" === n ? "0%" : "end" === n ? "-100%" : "-50%";
1923
1926
  return "t" === t || "b" === t ? r = l : o = l, `translate(${r}, ${o})`;
1924
1927
  };
1925
- Tt.displayName = "StickyAnchor";
1926
- var Lt = (e) => {
1928
+ zt.displayName = "StickyAnchor";
1929
+ var $t = (e) => {
1927
1930
  const { side: t, align: n = "center" } = e;
1928
1931
  return ("t" === t ? "top" : "b" === t ? "bottom" : "l" === t ? "left" : "right") + ("start" === n ? "-start" : "end" === n ? "-end" : "");
1929
- }, $t = { padding: 4 }, At = (e) => {
1932
+ }, At = { padding: 4 }, Ft = (e) => {
1930
1933
  const { state: t, offset: n, alignOffset: r, open: o, container: l, className: i, style: a, zIndex: s, themeFrom: c, renderOffscreen: d, children: g, onMount: h, onOpening: p, onOpen: m, onClosing: v, onClose: y } = e, S = f(null);
1931
1934
  u(() => {
1932
1935
  S.current?.instance()?.update();
@@ -1939,13 +1942,13 @@ var Lt = (e) => {
1939
1942
  ref: S,
1940
1943
  open: o,
1941
1944
  anchorEl: t.reference,
1942
- placement: Lt(t.placement),
1945
+ placement: $t(t.placement),
1943
1946
  offsets: {
1944
1947
  mainAxis: n,
1945
1948
  alignmentAxis: r
1946
1949
  },
1947
1950
  boundary: t.getBoundaryRect,
1948
- shift: $t,
1951
+ shift: At,
1949
1952
  strategy: "fixed",
1950
1953
  resizeOnOverflow: !1,
1951
1954
  transition: !1,
@@ -1961,16 +1964,16 @@ var Lt = (e) => {
1961
1964
  onClose: y,
1962
1965
  children: Array.isArray(E) ? x(w, { children: E }) : E
1963
1966
  });
1964
- }, Ft = (e) => {
1967
+ }, Nt = (e) => {
1965
1968
  const { anchor: t, placement: n, whenOff: r, whenPartial: o, boundary: l, minVisible: i, offset: a = 4, alignOffset: s = 0, open: c = !0, container: d, className: u, style: g, zIndex: h = H("grid"), themeFrom: f = "anchor", renderOffscreen: p, children: m, onMount: w, onOpening: v, onOpen: y, onClosing: b, onClose: S } = e;
1966
- return x(Tt, {
1969
+ return x(zt, {
1967
1970
  anchor: t,
1968
1971
  placement: n,
1969
1972
  whenOff: r,
1970
1973
  whenPartial: o,
1971
1974
  boundary: l,
1972
1975
  minVisible: i,
1973
- children: (e) => x(At, {
1976
+ children: (e) => x(Ft, {
1974
1977
  state: e,
1975
1978
  offset: a,
1976
1979
  alignOffset: s,
@@ -1990,22 +1993,22 @@ var Lt = (e) => {
1990
1993
  })
1991
1994
  });
1992
1995
  };
1993
- Ft.displayName = "StickyPortal";
1994
- var Nt = (e) => {
1996
+ Nt.displayName = "StickyPortal";
1997
+ var Bt = (e) => {
1995
1998
  const [t, n] = (e ?? "bottom-start").split("-");
1996
1999
  return {
1997
2000
  side: "top" === t ? "t" : "left" === t ? "l" : "right" === t ? "r" : "b",
1998
2001
  align: "start" === n ? "start" : "end" === n ? "end" : "center"
1999
2002
  };
2000
- }, Bt = (e) => {
2003
+ }, Vt = (e) => {
2001
2004
  const { open: t, anchorEl: n, floatReference: r, renderPopupPanel: o, propsPopper: l, onMount: i, onOpening: a, onOpen: s, onClosing: c, onClose: d, children: u, className: g, label: h, anchorPosition: m, ...w } = e, b = f(null), [S, E] = p(), C = O((e, t) => {
2002
2005
  E(e), i?.(b.current, t);
2003
2006
  }, [i]), I = O(() => {
2004
2007
  r?.close(0);
2005
2008
  }, [r]), P = l?.offsets, [R, M] = Array.isArray(P) ? [P[0] ?? 0, P[1] ?? 2] : [P?.alignmentAxis ?? P?.crossAxis ?? 0, P?.mainAxis ?? 2];
2006
- return x(Ft, {
2009
+ return x(Nt, {
2007
2010
  anchor: n,
2008
- placement: Nt(l?.placement),
2011
+ placement: Bt(l?.placement),
2009
2012
  offset: M,
2010
2013
  alignOffset: R,
2011
2014
  zIndex: H("popup"),
@@ -2026,22 +2029,22 @@ var Nt = (e) => {
2026
2029
  renderPopupPanel: o,
2027
2030
  ...w,
2028
2031
  children: u
2029
- }), x(Vt, {
2032
+ }), x(Ht, {
2030
2033
  outOfView: t && e.outOfView,
2031
2034
  close: I
2032
2035
  })]
2033
2036
  })
2034
2037
  });
2035
2038
  };
2036
- Bt.displayName = "GridFloatPanel";
2037
- var Vt = ({ outOfView: t, close: n }) => (e.useEffect(() => {
2039
+ Vt.displayName = "GridFloatPanel";
2040
+ var Ht = ({ outOfView: t, close: n }) => (e.useEffect(() => {
2038
2041
  t && n();
2039
- }, [t]), null), Ht = (e) => x(Bt, { ...e }), Kt = {
2042
+ }, [t]), null), Kt = (e) => x(Vt, { ...e }), _t = {
2040
2043
  enterDelay: 300,
2041
2044
  enterNextDelay: 0,
2042
2045
  armedFor: 800,
2043
2046
  leaveDelay: 400
2044
- }, _t = () => {
2047
+ }, Wt = () => {
2045
2048
  let e = null;
2046
2049
  const t = /* @__PURE__ */ new Set();
2047
2050
  let n = -1 / 0, r = null;
@@ -2079,13 +2082,13 @@ var Vt = ({ outOfView: t, close: n }) => (e.useEffect(() => {
2079
2082
  for (const e of [...t]) e.forceClose();
2080
2083
  }
2081
2084
  };
2082
- }, Wt = {
2083
- timing: Kt,
2084
- group: _t()
2085
- }, Ut = n(null), jt = () => s(Ut) ?? Wt, Gt = (e) => {
2086
- const { timing: t, renderTooltip: n, isolate: r, children: o } = e, l = s(Ut), i = r || !l, a = f(null);
2087
- i && null === a.current && (a.current = _t());
2088
- const c = i ? a.current : l.group, d = l ?? Wt, u = g(() => ({
2085
+ }, Ut = {
2086
+ timing: _t,
2087
+ group: Wt()
2088
+ }, jt = n(null), Gt = () => s(jt) ?? Ut, Xt = (e) => {
2089
+ const { timing: t, renderTooltip: n, isolate: r, children: o } = e, l = s(jt), i = r || !l, a = f(null);
2090
+ i && null === a.current && (a.current = Wt());
2091
+ const c = i ? a.current : l.group, d = l ?? Ut, u = g(() => ({
2089
2092
  timing: t ? {
2090
2093
  ...d.timing,
2091
2094
  ...t
@@ -2101,13 +2104,13 @@ var Vt = ({ outOfView: t, close: n }) => (e.useEffect(() => {
2101
2104
  t?.armedFor,
2102
2105
  t?.leaveDelay
2103
2106
  ]);
2104
- return x(Ut.Provider, {
2107
+ return x(jt.Provider, {
2105
2108
  value: u,
2106
2109
  children: o
2107
2110
  });
2108
2111
  };
2109
- Gt.displayName = "TooltipProvider";
2110
- var Xt = {
2112
+ Xt.displayName = "TooltipProvider";
2113
+ var Yt = {
2111
2114
  boxSizing: "border-box",
2112
2115
  maxWidth: 300,
2113
2116
  padding: "2px 6px",
@@ -2119,20 +2122,20 @@ var Xt = {
2119
2122
  border: "1px solid var(--sxl-color-base-300, rgba(0, 0, 0, 0.2))",
2120
2123
  boxShadow: "0 2px 8px var(--sxl-color-shadow, rgba(0, 0, 0, 0.35))",
2121
2124
  overflowWrap: "break-word"
2122
- }, Yt = (e) => {
2125
+ }, qt = (e) => {
2123
2126
  const { children: t, interactive: n, tipProps: r, className: o, style: l } = e;
2124
2127
  return x("div", {
2125
2128
  ...r,
2126
2129
  className: o,
2127
2130
  style: {
2128
- ...Xt,
2131
+ ...Yt,
2129
2132
  ...l,
2130
2133
  pointerEvents: n ? "auto" : "none"
2131
2134
  },
2132
2135
  children: t
2133
2136
  });
2134
- }, qt = { pointerEvents: "auto" }, Zt = (e = {}) => {
2135
- const { openDelay: t, closeDelay: n, group: r = !0, name: o, gesture: l = !1 } = e, i = jt(), s = L(), u = d(), h = o ?? u, [m, w] = p(!1), x = f(!1), v = f(null), y = f(!1), b = f(null), S = f(null), E = f(null), C = f({
2137
+ }, Zt = { pointerEvents: "auto" }, Jt = (e = {}) => {
2138
+ const { openDelay: t, closeDelay: n, group: r = !0, name: o, gesture: l = !1 } = e, i = Gt(), s = L(), u = d(), h = o ?? u, [m, w] = p(!1), x = f(!1), v = f(null), y = f(!1), b = f(null), S = f(null), E = f(null), C = f({
2136
2139
  surface: i,
2137
2140
  popupOpen: s,
2138
2141
  openDelay: t,
@@ -2207,7 +2210,7 @@ var Xt = {
2207
2210
  onPointerLeave: () => {
2208
2211
  y.current = !1, T();
2209
2212
  },
2210
- style: qt
2213
+ style: Zt
2211
2214
  }), [T]);
2212
2215
  return c(() => () => {
2213
2216
  I(), P(), x.current && C.current.group && C.current.surface.group.release(M);
@@ -2217,27 +2220,27 @@ var Xt = {
2217
2220
  tipProps: $,
2218
2221
  close: O
2219
2222
  };
2220
- }, Jt = { pointerEvents: "none" }, Qt = { display: "contents" }, en = (e) => {
2223
+ }, Qt = { pointerEvents: "none" }, en = { display: "contents" }, tn = (e) => {
2221
2224
  e.stopPropagation();
2222
- }, tn = {
2225
+ }, nn = {
2223
2226
  target: null,
2224
2227
  aimed: null
2225
- }, nn = (e) => ({
2228
+ }, rn = (e) => ({
2226
2229
  key: e.key ?? Pe(e.range),
2227
2230
  range: e.range,
2228
2231
  data: e.data,
2229
2232
  placement: e.placement,
2230
2233
  alignOffset: e.alignOffset
2231
- }), rn = (e) => e ? e.key ?? Pe(e.range) : null, on = (e) => {
2234
+ }), on = (e) => e ? e.key ?? Pe(e.range) : null, ln = (e) => {
2232
2235
  const t = e.getCoords();
2233
2236
  return t ? `${t.rowIndex},${t.colIndex}` : null;
2234
- }, ln = (t) => {
2235
- const { hovered: n, selection: r, probe: o, name: l, target: i, dismiss: a, placement: d, offset: u = 6, alignOffset: g = 0, openDelay: h, closeDelay: m, group: w, hold: v = !1, whenOff: y = "hide", whenPartial: b, boundary: S, zIndex: E, interactive: C = "pointer", onDismiss: I, children: P, style: R } = t, M = Je(), D = s(Me), k = void 0 !== n, T = !!r, z = void 0 !== i, L = `range-float:${l ?? D}`, { open: $, setTarget: A, tipProps: F, close: N } = Zt({
2237
+ }, an = (t) => {
2238
+ const { hovered: n, selection: r, probe: o, name: l, target: i, dismiss: a, placement: d, offset: u = 6, alignOffset: g = 0, openDelay: h, closeDelay: m, group: w, hold: v = !1, whenOff: y = "hide", whenPartial: b, boundary: S, zIndex: E, interactive: C = "pointer", onDismiss: I, children: P, style: R } = t, M = Qe(), D = s(Me), k = void 0 !== n, T = !!r, z = void 0 !== i, L = `range-float:${l ?? D}`, { open: $, setTarget: A, tipProps: F, close: N } = Jt({
2236
2239
  openDelay: h,
2237
2240
  closeDelay: m,
2238
2241
  name: L,
2239
2242
  group: w
2240
- }), [V, H] = tt(L, tn), K = k ? rn(n) : null, _ = e.useRef(n);
2243
+ }), [V, H] = nt(L, nn), K = k ? on(n) : null, _ = e.useRef(n);
2241
2244
  _.current = n, c(() => {
2242
2245
  if (!k) return;
2243
2246
  const e = _.current;
@@ -2245,7 +2248,7 @@ var Xt = {
2245
2248
  target: e.target,
2246
2249
  aimed: null
2247
2250
  });
2248
- const t = nn(e);
2251
+ const t = rn(e);
2249
2252
  H((e) => e.aimed === t.key && e.target?.key === t.key ? e : {
2250
2253
  target: t,
2251
2254
  aimed: t.key
@@ -2261,7 +2264,7 @@ var Xt = {
2261
2264
  }, [W, A]);
2262
2265
  const [U, j] = p(null), G = f(null), X = f(!1);
2263
2266
  c(() => {
2264
- a && (N(), j(null), H(tn));
2267
+ a && (N(), j(null), H(nn));
2265
2268
  }, [
2266
2269
  a,
2267
2270
  N,
@@ -2269,7 +2272,7 @@ var Xt = {
2269
2272
  ]);
2270
2273
  const Y = O((e) => {
2271
2274
  const t = null !== U;
2272
- if (N(), j(null), H(tn), I?.(), !t) return;
2275
+ if (N(), j(null), H(nn), I?.(), !t) return;
2273
2276
  const n = M.getElement()?.ownerDocument.activeElement;
2274
2277
  e && n && n !== n.ownerDocument.body || M.focus();
2275
2278
  }, [
@@ -2278,13 +2281,13 @@ var Xt = {
2278
2281
  H,
2279
2282
  I,
2280
2283
  M
2281
- ]), q = B(T ? r : void 0, on);
2284
+ ]), q = B(T ? r : void 0, ln);
2282
2285
  let Z = null;
2283
2286
  if (T && !a && r && null !== q) {
2284
2287
  const e = o?.(r.getCoords(), M);
2285
- e && e.range && (Z = nn(e));
2288
+ e && e.range && (Z = rn(e));
2286
2289
  }
2287
- const J = k ? V.target : null, Q = ($ || v) && null !== J, ee = z ? null === i ? null : nn(i) : Q ? J : Z ?? J, te = U ? ee?.key === U.key ? ee : U : ee, ne = null !== U || (z ? null !== te : Q || null !== Z), re = "focus" === C && ne && null !== te;
2290
+ const J = k ? V.target : null, Q = ($ || v) && null !== J, ee = z ? null === i ? null : rn(i) : Q ? J : Z ?? J, te = U ? ee?.key === U.key ? ee : U : ee, ne = null !== U || (z ? null !== te : Q || null !== Z), re = "focus" === C && ne && null !== te;
2288
2291
  if (c(() => {
2289
2292
  if (!re) return;
2290
2293
  const e = M.getElement()?.ownerDocument ?? ("undefined" != typeof document ? document : null);
@@ -2307,9 +2310,9 @@ var Xt = {
2307
2310
  }, []), !te) return null;
2308
2311
  const oe = "none" === C ? {
2309
2312
  ...F,
2310
- style: Jt
2313
+ style: Qt
2311
2314
  } : F;
2312
- return x(Ft, {
2315
+ return x(Nt, {
2313
2316
  anchor: { range: te.range },
2314
2317
  placement: te.placement ?? d,
2315
2318
  offset: u,
@@ -2321,7 +2324,7 @@ var Xt = {
2321
2324
  whenPartial: b,
2322
2325
  style: "none" === C ? {
2323
2326
  ...R,
2324
- ...Jt
2327
+ ...Qt
2325
2328
  } : R,
2326
2329
  children: (e) => {
2327
2330
  const t = P({
@@ -2334,25 +2337,25 @@ var Xt = {
2334
2337
  const n = "focus" === C;
2335
2338
  return x("div", {
2336
2339
  className: "range-float-frame",
2337
- style: Qt,
2340
+ style: en,
2338
2341
  onPointerDownCapture: n ? () => {
2339
2342
  X.current = !0;
2340
2343
  } : void 0,
2341
- onPointerDown: en,
2342
- onPointerUp: en,
2343
- onMouseDown: en,
2344
- onMouseUp: en,
2345
- onClick: en,
2346
- onDoubleClick: en,
2347
- onContextMenu: en,
2344
+ onPointerDown: tn,
2345
+ onPointerUp: tn,
2346
+ onMouseDown: tn,
2347
+ onMouseUp: tn,
2348
+ onClick: tn,
2349
+ onDoubleClick: tn,
2350
+ onContextMenu: tn,
2348
2351
  onKeyDown: (e) => {
2349
2352
  e.stopPropagation(), n && "Escape" === e.key && !e.defaultPrevented && Y(!1);
2350
2353
  },
2351
- onKeyUp: en,
2352
- onCopy: en,
2353
- onCut: en,
2354
- onPaste: en,
2355
- onWheel: en,
2354
+ onKeyUp: tn,
2355
+ onCopy: tn,
2356
+ onCut: tn,
2357
+ onPaste: tn,
2358
+ onWheel: tn,
2356
2359
  onFocus: n ? () => {
2357
2360
  G.current && (clearTimeout(G.current), G.current = null), U || j(te);
2358
2361
  } : void 0,
@@ -2366,19 +2369,19 @@ var Xt = {
2366
2369
  }
2367
2370
  });
2368
2371
  };
2369
- ln.displayName = "VirtualRangeFloat";
2370
- var an = (e, t) => Array.isArray(e) ? e.includes(t) : e === t, sn = (e) => {
2371
- const { activateOn: t, probe: n, selection: r, hoveredOver: o, className: l, onPointerMove: i, onPointerLeave: a, ...s } = e, c = Je(), d = an(t, "hover"), u = an(t, "selection"), [g, h] = p(null), f = O((e) => {
2372
+ an.displayName = "VirtualRangeFloat";
2373
+ var sn = (e, t) => Array.isArray(e) ? e.includes(t) : e === t, cn = (e) => {
2374
+ const { activateOn: t, probe: n, selection: r, hoveredOver: o, className: l, onPointerMove: i, onPointerLeave: a, ...s } = e, c = Qe(), d = sn(t, "hover"), u = sn(t, "selection"), [g, h] = p(null), f = O((e) => {
2372
2375
  const t = c.getCellFromPointer(e.clientX, e.clientY), r = t ? n?.(t, c) ?? null : null, o = r?.range ? r : null;
2373
- h((e) => rn(e) === rn(o) ? e : o);
2376
+ h((e) => on(e) === on(o) ? e : o);
2374
2377
  }, [c, n]), m = O(() => {
2375
2378
  h(null);
2376
2379
  }, []);
2377
- return x(lt, {
2380
+ return x(it, {
2378
2381
  className: Y(l, "range-float"),
2379
2382
  onPointerMove: d ? f : void 0,
2380
2383
  onPointerLeave: d ? m : void 0,
2381
- children: x(ln, {
2384
+ children: x(an, {
2382
2385
  ...s,
2383
2386
  hovered: d ? o ?? g : void 0,
2384
2387
  selection: u ? r : void 0,
@@ -2386,10 +2389,10 @@ var an = (e, t) => Array.isArray(e) ? e.includes(t) : e === t, sn = (e) => {
2386
2389
  })
2387
2390
  });
2388
2391
  };
2389
- sn.displayName = "RangeFloatLayer";
2390
- var cn = (e) => {
2391
- const { children: t, className: n, style: r, interactive: o = !1, bubble: l = !0, ...i } = e, { renderTooltip: a } = jt(), s = a ?? Yt;
2392
- return x(sn, {
2392
+ cn.displayName = "RangeFloatLayer";
2393
+ var dn = (e) => {
2394
+ const { children: t, className: n, style: r, interactive: o = !1, bubble: l = !0, ...i } = e, { renderTooltip: a } = Gt(), s = a ?? qt;
2395
+ return x(cn, {
2393
2396
  ...i,
2394
2397
  activateOn: "hover",
2395
2398
  className: Y(n, "range-tooltip"),
@@ -2415,15 +2418,15 @@ var cn = (e) => {
2415
2418
  }
2416
2419
  });
2417
2420
  };
2418
- cn.displayName = "RangeTooltipLayer";
2419
- var dn = {
2421
+ dn.displayName = "RangeTooltipLayer";
2422
+ var un = {
2420
2423
  side: "b",
2421
2424
  align: "end"
2422
- }, un = (e) => {
2425
+ }, gn = (e) => {
2423
2426
  const { side: t, align: n = "center" } = e;
2424
2427
  return ("t" === t ? "top" : "b" === t ? "bottom" : "l" === t ? "left" : "right") + ("start" === n ? "-start" : "end" === n ? "-end" : "");
2425
- }, gn = { pointerEvents: "none" }, hn = (e) => {
2426
- const { active: t, anchor: n, placement: r = dn, offset: o = 8, alignOffset: l = 0, glide: i, boundary: a, themeFrom: s = "provider", name: c, className: d, children: g } = e, { renderTooltip: h } = jt(), m = h ?? Yt, { open: w, setTarget: v, close: y, tipProps: S } = Zt({
2428
+ }, hn = { pointerEvents: "none" }, fn = (e) => {
2429
+ const { active: t, anchor: n, placement: r = un, offset: o = 8, alignOffset: l = 0, glide: i, boundary: a, themeFrom: s = "provider", name: c, className: d, children: g } = e, { renderTooltip: h } = Gt(), m = h ?? qt, { open: w, setTarget: v, close: y, tipProps: S } = Jt({
2427
2430
  gesture: !0,
2428
2431
  name: c
2429
2432
  }), E = f(null), [C, P] = p(!1);
@@ -2441,14 +2444,14 @@ var dn = {
2441
2444
  R || P(!1);
2442
2445
  }, [R]), !R) return null;
2443
2446
  const M = Y(d, "gesture-tip"), D = () => P(!0), k = C && i?.duration ? {
2444
- ...gn,
2447
+ ...hn,
2445
2448
  transition: `transform ${i.duration}ms ${i.easing ?? "ease-in-out"}`
2446
- } : gn;
2449
+ } : hn;
2447
2450
  return ((e) => void 0 !== e.element)(n) ? x(b, {
2448
2451
  ref: E,
2449
2452
  open: !0,
2450
2453
  anchorEl: n.element,
2451
- placement: un(r),
2454
+ placement: gn(r),
2452
2455
  offsets: {
2453
2456
  mainAxis: o,
2454
2457
  alignmentAxis: l
@@ -2471,7 +2474,7 @@ var dn = {
2471
2474
  tipProps: S
2472
2475
  }
2473
2476
  })
2474
- }) : x(Ft, {
2477
+ }) : x(Nt, {
2475
2478
  className: M,
2476
2479
  anchor: n,
2477
2480
  placement: r,
@@ -2494,22 +2497,22 @@ var dn = {
2494
2497
  })
2495
2498
  });
2496
2499
  };
2497
- hn.displayName = "GestureTip";
2498
- var fn = {
2500
+ fn.displayName = "GestureTip";
2501
+ var pn = {
2499
2502
  t: "↑",
2500
2503
  b: "↓",
2501
2504
  l: "←",
2502
2505
  r: "→"
2503
- }, pn = (e) => {
2506
+ }, mn = (e) => {
2504
2507
  let t = "", n = e;
2505
2508
  do
2506
2509
  t = String.fromCharCode(65 + n % 26) + t, n = Math.floor(n / 26) - 1;
2507
2510
  while (n >= 0);
2508
2511
  return t;
2509
- }, mn = (e) => {
2510
- const t = `${pn(e.colStart)}${e.rowStart + 1}`, n = `${pn(e.colEnd)}${e.rowEnd + 1}`;
2512
+ }, wn = (e) => {
2513
+ const t = `${mn(e.colStart)}${e.rowStart + 1}`, n = `${mn(e.colEnd)}${e.rowEnd + 1}`;
2511
2514
  return t === n ? t : `${t}:${n}`;
2512
- }, wn = {
2515
+ }, xn = {
2513
2516
  border: "none",
2514
2517
  background: "transparent",
2515
2518
  color: "inherit",
@@ -2520,7 +2523,7 @@ var fn = {
2520
2523
  height: 18,
2521
2524
  borderRadius: 4,
2522
2525
  opacity: .6
2523
- }, xn = {
2526
+ }, vn = {
2524
2527
  position: "relative",
2525
2528
  background: "var(--sxl-color-base-100, white)",
2526
2529
  color: "var(--sxl-color-base-content, #222)",
@@ -2530,7 +2533,7 @@ var fn = {
2530
2533
  boxShadow: "0 6px 24px var(--sxl-color-shadow, rgba(0,0,0,0.2))",
2531
2534
  pointerEvents: "auto",
2532
2535
  maxWidth: 320
2533
- }, vn = {
2536
+ }, yn = {
2534
2537
  display: "inline-flex",
2535
2538
  alignItems: "center",
2536
2539
  gap: 8,
@@ -2540,8 +2543,8 @@ var fn = {
2540
2543
  padding: "4px 6px 4px 12px",
2541
2544
  boxShadow: "0 2px 10px var(--sxl-color-shadow, rgba(0,0,0,0.3))",
2542
2545
  pointerEvents: "auto"
2543
- }, yn = ({ direction: e, label: t, onGoto: n, onCancel: r }) => v("div", {
2544
- style: vn,
2546
+ }, bn = ({ direction: e, label: t, onGoto: n, onCancel: r }) => v("div", {
2547
+ style: yn,
2545
2548
  children: [v("button", {
2546
2549
  onClick: n,
2547
2550
  style: {
@@ -2552,7 +2555,7 @@ var fn = {
2552
2555
  font: "12px system-ui"
2553
2556
  },
2554
2557
  children: [
2555
- fn[e],
2558
+ pn[e],
2556
2559
  " ",
2557
2560
  t
2558
2561
  ]
@@ -2560,17 +2563,17 @@ var fn = {
2560
2563
  "aria-label": "Cancel",
2561
2564
  onClick: r,
2562
2565
  style: {
2563
- ...wn,
2566
+ ...xn,
2564
2567
  opacity: .8
2565
2568
  },
2566
2569
  children: "×"
2567
2570
  })]
2568
- }), bn = (e) => {
2571
+ }), Sn = (e) => {
2569
2572
  const { range: t, placement: n = {
2570
2573
  side: "t",
2571
2574
  align: "start"
2572
2575
  }, offset: r = 8, alignOffset: o = 0, address: l, onGoto: i, onCancel: a, zIndex: s, className: c, style: d, children: u } = e;
2573
- return x(Ft, {
2576
+ return x(Nt, {
2574
2577
  anchor: { range: t },
2575
2578
  placement: n,
2576
2579
  offset: r,
@@ -2578,23 +2581,23 @@ var fn = {
2578
2581
  whenOff: "clamp",
2579
2582
  zIndex: s,
2580
2583
  open: !0,
2581
- renderOffscreen: (e) => x(yn, {
2584
+ renderOffscreen: (e) => x(bn, {
2582
2585
  direction: e.slid?.direction ?? n.side,
2583
- label: l ?? mn(t),
2586
+ label: l ?? wn(t),
2584
2587
  onGoto: () => i ? i(e) : e.scrollIntoView(),
2585
2588
  onCancel: a
2586
2589
  }),
2587
2590
  children: (e) => v("div", {
2588
2591
  className: c,
2589
2592
  style: {
2590
- ...xn,
2593
+ ...vn,
2591
2594
  ...d
2592
2595
  },
2593
2596
  children: [a && x("button", {
2594
2597
  "aria-label": "Cancel",
2595
2598
  onClick: a,
2596
2599
  style: {
2597
- ...wn,
2600
+ ...xn,
2598
2601
  position: "absolute",
2599
2602
  top: 4,
2600
2603
  right: 4
@@ -2604,8 +2607,8 @@ var fn = {
2604
2607
  })
2605
2608
  });
2606
2609
  };
2607
- bn.displayName = "RangePrompt";
2608
- var Sn = (e) => (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1), En = () => {
2610
+ Sn.displayName = "RangePrompt";
2611
+ var En = (e) => (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1), Cn = () => {
2609
2612
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
2610
2613
  let n = 0, r = 0;
2611
2614
  const o = () => {
@@ -2635,7 +2638,7 @@ var Sn = (e) => (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1), En =
2635
2638
  for (const o of e.values()) {
2636
2639
  const e = o.props.range;
2637
2640
  if (!W.isCellWithinRange(t, e)) continue;
2638
- const l = Sn(e);
2641
+ const l = En(e);
2639
2642
  (l < r || l === r && null !== n && o.order > n.order) && (n = o, r = l);
2640
2643
  }
2641
2644
  return n;
@@ -2645,18 +2648,18 @@ var Sn = (e) => (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1), En =
2645
2648
  }),
2646
2649
  version: () => r
2647
2650
  };
2648
- }, Cn = n(null), In = !1, Pn = () => s(Cn), Rn = (e) => {
2649
- const { isolate: t, children: n } = e, r = s(Cn), o = f(null), l = t || !r;
2650
- l && null === o.current && (o.current = En());
2651
+ }, In = n(null), Pn = !1, Rn = () => s(In), Mn = (e) => {
2652
+ const { isolate: t, children: n } = e, r = s(In), o = f(null), l = t || !r;
2653
+ l && null === o.current && (o.current = Cn());
2651
2654
  const i = l ? o.current : r;
2652
- return x(Cn.Provider, {
2655
+ return x(In.Provider, {
2653
2656
  value: i,
2654
2657
  children: n
2655
2658
  });
2656
2659
  };
2657
- Rn.displayName = "RangeTooltipProvider";
2658
- var Mn = (e) => {
2659
- const t = s(Cn), n = Qe(), r = d(), o = null !== t && (null === n || n === ue(n.getAllPanes())), l = f(e);
2660
+ Mn.displayName = "RangeTooltipProvider";
2661
+ var Dn = (e) => {
2662
+ const t = s(In), n = et(), r = d(), o = null !== t && (null === n || n === ue(n.getAllPanes())), l = f(e);
2660
2663
  return l.current = e, u(() => {
2661
2664
  if (o) return t.add(r, l.current);
2662
2665
  }, [
@@ -2666,13 +2669,13 @@ var Mn = (e) => {
2666
2669
  ]), u(() => {
2667
2670
  o && t.set(r, e);
2668
2671
  }), u(() => {
2669
- null !== t || In || (In = !0, console.warn("<RangeTooltip> outside any grid. Declare it among a grid's children, or under a <RangeTooltipProvider> that encloses the grid. This warning fires once."));
2672
+ null !== t || Pn || (Pn = !0, console.warn("<RangeTooltip> outside any grid. Declare it among a grid's children, or under a <RangeTooltipProvider> that encloses the grid. This warning fires once."));
2670
2673
  }, [t]), null;
2671
2674
  };
2672
- Mn.displayName = "RangeTooltip";
2673
- var Dn = () => () => {}, kn = () => 0, Tn = i((e) => {
2674
- const { className: t, dismiss: n, ...r } = e, o = s(Cn), l = Je(), { renderTooltip: i } = jt(), a = i ?? Yt;
2675
- m(o?.subscribe ?? Dn, o?.version ?? kn);
2675
+ Dn.displayName = "RangeTooltip";
2676
+ var kn = () => () => {}, Tn = () => 0, zn = i((e) => {
2677
+ const { className: t, dismiss: n, ...r } = e, o = s(In), l = Qe(), { renderTooltip: i } = Gt(), a = i ?? qt;
2678
+ m(o?.subscribe ?? kn, o?.version ?? Tn);
2676
2679
  const [c, d] = p(null), u = O((e) => {
2677
2680
  const t = l.getCellFromPointer(e.clientX, e.clientY), n = t && o ? o.find(t) : null, r = n ? {
2678
2681
  range: n.props.range,
@@ -2687,12 +2690,12 @@ var Dn = () => () => {}, kn = () => 0, Tn = i((e) => {
2687
2690
  }, []), h = f(null), w = c && o ? o.get(c.data) : null;
2688
2691
  w && (h.current = w);
2689
2692
  const v = w ?? h.current;
2690
- return x(lt, {
2693
+ return x(it, {
2691
2694
  ...r,
2692
2695
  className: Y(t, "range-tooltips"),
2693
2696
  onPointerMove: o ? u : void 0,
2694
2697
  onPointerLeave: o ? g : void 0,
2695
- children: o ? x(ln, {
2698
+ children: o ? x(an, {
2696
2699
  name: "range-tooltips",
2697
2700
  hovered: n ? null : c,
2698
2701
  dismiss: n,
@@ -2721,13 +2724,13 @@ var Dn = () => () => {}, kn = () => 0, Tn = i((e) => {
2721
2724
  }) : null
2722
2725
  });
2723
2726
  });
2724
- Tn.displayName = "RangeTooltipHost";
2725
- var zn = {
2727
+ zn.displayName = "RangeTooltipHost";
2728
+ var On = {
2726
2729
  stroke: "var(--sxl-color-primary, rgb(33, 115, 70))",
2727
2730
  alignWidth: 2,
2728
2731
  fill: "color-mix(in srgb, var(--sxl-color-primary, rgb(33, 115, 70)) 10%, transparent)"
2729
- }, On = i((e) => {
2730
- const { range: t, hole: n, clipInsets: r, alignWidth: o = 1, animatedTransition: l, className: i, ...a } = e, s = C.getDevicePixelRatio(), c = o / s, d = r ?? -c / 2, u = Qe(), g = u ? u.getBoundsFromRange(t) : null, h = c + 4;
2732
+ }, Ln = i((e) => {
2733
+ const { range: t, hole: n, clipInsets: r, alignWidth: o = 1, animatedTransition: l, className: i, ...a } = e, s = C.getDevicePixelRatio(), c = o / s, d = r ?? -c / 2, u = et(), g = u ? u.getBoundsFromRange(t) : null, h = c + 4;
2731
2734
  if (u && g && !u.toClipBounds(g, d)) return null;
2732
2735
  const f = u ? u.getPaneBounds() : null, p = f ? {
2733
2736
  x: -h,
@@ -2751,7 +2754,7 @@ var zn = {
2751
2754
  width: y.width,
2752
2755
  height: y.height
2753
2756
  } : void 0;
2754
- return x(dt, {
2757
+ return x(ut, {
2755
2758
  className: Y(i),
2756
2759
  bounds: p ?? void 0,
2757
2760
  clipInsets: d,
@@ -2765,9 +2768,9 @@ var zn = {
2765
2768
  })
2766
2769
  });
2767
2770
  });
2768
- On.displayName = "RangeRect";
2769
- var Ln = i((e) => {
2770
- const { range: t, axis: n, color: r = "var(--sxl-color-primary, rgb(33, 115, 70))", alignWidth: o = 3, capExtent: l = 3, transitionDuration: i = 100, transitionEasing: a = "cubic-bezier(0.16, 1, 0.3, 1)", axisDuration: s = 70 } = e, c = Qe(), d = c?.getBoundsFromRange(t);
2771
+ Ln.displayName = "RangeRect";
2772
+ var $n = i((e) => {
2773
+ const { range: t, axis: n, color: r = "var(--sxl-color-primary, rgb(33, 115, 70))", alignWidth: o = 3, capExtent: l = 3, transitionDuration: i = 100, transitionEasing: a = "cubic-bezier(0.16, 1, 0.3, 1)", axisDuration: s = 70 } = e, c = et(), d = c?.getBoundsFromRange(t);
2771
2774
  if (!c || !d) return null;
2772
2775
  const u = C.getDevicePixelRatio(), g = o / u, h = l / u, f = c.getPaneBounds(), p = (e) => e.x >= -h && e.y >= -h && e.x + e.width <= f.width + h && e.y + e.height <= f.height + h, m = i > 0 ? `${i}ms ${a}` : null, v = s > 0 ? `${s}ms ${a}` : null, y = [m && `transform ${m}, width ${m}, height ${m}, background-color ${m}`, v && `scale ${v}`].filter(Boolean).join(", ");
2773
2776
  return x(w, { children: [!0, !1].map((e) => ((e) => {
@@ -2813,7 +2816,7 @@ var Ln = i((e) => {
2813
2816
  ["insert-bar-cap-start", p(r.start) ? r.start : null],
2814
2817
  ["insert-bar-cap-end", p(r.end) ? r.end : null]
2815
2818
  ];
2816
- })(e).map(([t, o]) => o && x(dt, {
2819
+ })(e).map(([t, o]) => o && x(ut, {
2817
2820
  className: q(t, e ? "row" : "column"),
2818
2821
  bounds: o,
2819
2822
  style: {
@@ -2826,8 +2829,8 @@ var Ln = i((e) => {
2826
2829
  }
2827
2830
  }, `${e ? "row" : "column"}-${t}`))) });
2828
2831
  });
2829
- Ln.displayName = "RangeInsertBar";
2830
- var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, Nn = (e, t, n = {
2832
+ $n.displayName = "RangeInsertBar";
2833
+ var An = () => "undefined" != typeof window ? window : null, Fn = 60, Nn = 24, Bn = (e, t, n = {
2831
2834
  x: !0,
2832
2835
  y: !0
2833
2836
  }) => {
@@ -2837,33 +2840,33 @@ var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, N
2837
2840
  if (!o && !l) return !1;
2838
2841
  const i = e.getVisibleRange(), a = e.getTotalRange(), s = e.getCellFromPointer(t.x, t.y), c = {};
2839
2842
  return o > 0 && i.colEnd < a.colEnd ? c.colIndex = Math.min(a.colEnd, Math.max(i.colEnd + 1, s?.colIndex ?? 0)) : o < 0 && i.colStart > a.colStart && (c.colIndex = Math.max(a.colStart, Math.min(i.colStart - 1, s?.colIndex ?? Number.MAX_SAFE_INTEGER))), l > 0 && i.rowEnd < a.rowEnd ? c.rowIndex = Math.min(a.rowEnd, Math.max(i.rowEnd + 1, s?.rowIndex ?? 0)) : l < 0 && i.rowStart > a.rowStart && (c.rowIndex = Math.max(a.rowStart, Math.min(i.rowStart - 1, s?.rowIndex ?? Number.MAX_SAFE_INTEGER))), (void 0 !== c.colIndex || void 0 !== c.rowIndex) && ((ue(e.getAllPanes()) ?? e).scrollCellCoordsIntoView(c), !0);
2840
- }, Bn = Object.freeze({
2843
+ }, Vn = Object.freeze({
2841
2844
  ctrlKey: !1,
2842
2845
  shiftKey: !1,
2843
2846
  altKey: !1,
2844
2847
  metaKey: !1
2845
- }), Vn = (e) => ({
2848
+ }), Hn = (e) => ({
2846
2849
  ctrlKey: !!e.ctrlKey,
2847
2850
  shiftKey: !!e.shiftKey,
2848
2851
  altKey: !!e.altKey,
2849
2852
  metaKey: !!e.metaKey
2850
- }), Hn = (e, t) => e.ctrlKey === t.ctrlKey && e.shiftKey === t.shiftKey && e.altKey === t.altKey && e.metaKey === t.metaKey, Kn = (e, t, n, r) => {
2853
+ }), Kn = (e, t) => e.ctrlKey === t.ctrlKey && e.shiftKey === t.shiftKey && e.altKey === t.altKey && e.metaKey === t.metaKey, _n = (e, t, n, r) => {
2851
2854
  const o = ((e) => "function" == typeof e ? e : () => e)(e), l = r ?? ((e, t) => o().getCellFromPointer(e, t));
2852
2855
  let i = null, a = null, s = null, c = null;
2853
2856
  const d = () => {
2854
2857
  c && clearTimeout(c), c = null;
2855
2858
  };
2856
- let u = Bn, g = null;
2859
+ let u = Vn, g = null;
2857
2860
  const h = (e) => {
2858
2861
  if (!i) return;
2859
- const t = Vn(e);
2860
- Hn(u, t) || (u = t, i.modifiers?.(t));
2862
+ const t = Hn(e);
2863
+ Kn(u, t) || (u = t, i.modifiers?.(t));
2861
2864
  }, f = () => {
2862
- g && ($n()?.removeEventListener("keydown", g, !0), $n()?.removeEventListener("keyup", g, !0), g = null);
2865
+ g && (An()?.removeEventListener("keydown", g, !0), An()?.removeEventListener("keyup", g, !0), g = null);
2863
2866
  }, p = (e, t, n) => {
2864
2867
  if (!i) return !1;
2865
2868
  const r = l(e, t);
2866
- return r && (W.isEqualCells(r, a) || (a = r, i.drag(r, n)), i.point?.(r, e, t, n)), (i.edgeScroll ?? ((e) => Nn(o(), e)))({
2869
+ return r && (W.isEqualCells(r, a) || (a = r, i.drag(r, n)), i.point?.(r, e, t, n)), (i.edgeScroll ?? ((e) => Bn(o(), e)))({
2867
2870
  x: e,
2868
2871
  y: t
2869
2872
  });
@@ -2876,9 +2879,9 @@ var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, N
2876
2879
  if (!r) return null;
2877
2880
  const o = t(r, e);
2878
2881
  return o ? (i = o, a = r, s = null, ((e) => {
2879
- if (u = Vn(e), g) return;
2882
+ if (u = Hn(e), g) return;
2880
2883
  const t = (e) => h(e);
2881
- g = t, $n()?.addEventListener("keydown", t, !0), $n()?.addEventListener("keyup", t, !0);
2884
+ g = t, An()?.addEventListener("keydown", t, !0), An()?.addEventListener("keyup", t, !0);
2882
2885
  })(e), n?.(o.dragMode ?? null), o) : null;
2883
2886
  },
2884
2887
  move: (e, t, n) => {
@@ -2891,19 +2894,19 @@ var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, N
2891
2894
  },
2892
2895
  reset: () => {
2893
2896
  const e = i;
2894
- return i = null, a = null, s = null, d(), f(), u = Bn, e && n?.(null), e;
2897
+ return i = null, a = null, s = null, d(), f(), u = Vn, e && n?.(null), e;
2895
2898
  },
2896
2899
  dispose: () => {
2897
2900
  d(), f();
2898
2901
  }
2899
2902
  };
2900
- }, _n = (e, t, n) => {
2901
- const r = Kn(e, t, n);
2903
+ }, Wn = (e, t, n) => {
2904
+ const r = _n(e, t, n);
2902
2905
  let o = !1, l = null, i = null, a = null, s = null, c = null;
2903
2906
  const d = () => {
2904
- a && l && l.removeEventListener?.("pointercancel", a), a = null, s && $n()?.removeEventListener("keydown", s, !0), s = null;
2907
+ a && l && l.removeEventListener?.("pointercancel", a), a = null, s && An()?.removeEventListener("keydown", s, !0), s = null;
2905
2908
  }, u = () => {
2906
- c && ($n()?.removeEventListener("pointerup", c), $n()?.removeEventListener("pointercancel", c), c = null);
2909
+ c && (An()?.removeEventListener("pointerup", c), An()?.removeEventListener("pointercancel", c), c = null);
2907
2910
  }, g = () => {
2908
2911
  l && null !== i && l.hasPointerCapture?.(i) && l.releasePointerCapture(i), l = null, i = null;
2909
2912
  }, h = (e, t) => {
@@ -2917,8 +2920,8 @@ var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, N
2917
2920
  const t = e.currentTarget;
2918
2921
  t.setPointerCapture?.(e.pointerId), l = t, i = e.pointerId, o = !0, a = (e) => h(!0, e), t.addEventListener?.("pointercancel", a), s = (e) => {
2919
2922
  "Escape" === e.key && (e.preventDefault(), e.stopPropagation(), h(!0));
2920
- }, $n()?.addEventListener("keydown", s, !0);
2921
- } else o = !1, c = (e) => h("pointercancel" === e.type, e), $n()?.addEventListener("pointerup", c), $n()?.addEventListener("pointercancel", c);
2923
+ }, An()?.addEventListener("keydown", s, !0);
2924
+ } else o = !1, c = (e) => h("pointercancel" === e.type, e), An()?.addEventListener("pointerup", c), An()?.addEventListener("pointercancel", c);
2922
2925
  },
2923
2926
  onPointerMove: (e) => {
2924
2927
  r.hasSession() && o && (!1 !== r.captureEvents() && e.stopPropagation(), r.move(e.clientX, e.clientY, e));
@@ -2930,8 +2933,8 @@ var $n = () => "undefined" != typeof window ? window : null, An = 60, Fn = 24, N
2930
2933
  }
2931
2934
  };
2932
2935
  };
2933
- function Wn(e, t, n, r) {
2934
- const o = Kn(e, t, n, r);
2936
+ function Un(e, t, n, r) {
2937
+ const o = _n(e, t, n, r);
2935
2938
  let l = null, i = null, a = null, s = null;
2936
2939
  const c = () => {
2937
2940
  l?.(), l = null, s = null;
@@ -2972,8 +2975,8 @@ function Wn(e, t, n, r) {
2972
2975
  }
2973
2976
  };
2974
2977
  }
2975
- var Un = (e) => {
2976
- const t = Je(), n = O(() => t, [t]), [r, o] = p(null), l = O(e, [e]), i = g(() => _n(n, l, o), [n, l]);
2978
+ var jn = (e) => {
2979
+ const t = Qe(), n = O(() => t, [t]), [r, o] = p(null), l = O(e, [e]), i = g(() => Wn(n, l, o), [n, l]);
2977
2980
  return c(() => () => i.dispose(), [i]), {
2978
2981
  onPointerDown: i.onPointerDown,
2979
2982
  onPointerMove: i.onPointerMove,
@@ -2981,14 +2984,14 @@ var Un = (e) => {
2981
2984
  onPointerCancel: i.onPointerCancel,
2982
2985
  dragMode: r
2983
2986
  };
2984
- }, jn = (e) => {
2985
- const t = Je(), n = O(() => t, [t]), [r, o] = p(null), l = O(e, [e]), i = g(() => Wn(n, l, o), [n, l]);
2987
+ }, Gn = (e) => {
2988
+ const t = Qe(), n = O(() => t, [t]), [r, o] = p(null), l = O(e, [e]), i = g(() => Un(n, l, o), [n, l]);
2986
2989
  return c(() => () => i.dispose(), [i]), {
2987
2990
  start: i.start,
2988
2991
  cancel: i.cancel,
2989
2992
  dragMode: r
2990
2993
  };
2991
- }, Gn = (e) => {
2994
+ }, Xn = (e) => {
2992
2995
  const t = f(null), n = f(!1);
2993
2996
  return c(() => {
2994
2997
  const e = (e) => {
@@ -3006,12 +3009,12 @@ var Un = (e) => {
3006
3009
  n.current = !1;
3007
3010
  }, 500), !0);
3008
3011
  };
3009
- }, Xn = (e) => {
3010
- const { range: t, anchor: n, size: r = 8, cursor: o, dragCursor: l, background: i = "var(--sxl-color-primary, rgb(33, 115, 70))", onDragStart: a, onDragMove: s, onDragEnd: c, onDragCancel: d, onDoubleClick: u, onHoverChange: g, hoverStyle: h, animatedTransition: f, renderHandle: m, children: w, className: v, style: y, preserveFocus: b, clampToView: S, secondaryButton: E } = e, P = Je(), [R, M] = p(!1), D = Gn(!!u), { start: k, cancel: T, dragMode: z } = jn((e, t) => {
3012
+ }, Yn = (e) => {
3013
+ const { range: t, anchor: n, size: r = 8, cursor: o, dragCursor: l, background: i = "var(--sxl-color-primary, rgb(33, 115, 70))", onDragStart: a, onDragMove: s, onDragEnd: c, onDragCancel: d, onDoubleClick: u, onHoverChange: g, hoverStyle: h, animatedTransition: f, renderHandle: m, children: w, className: v, style: y, preserveFocus: b, clampToView: S, secondaryButton: E } = e, P = Qe(), [R, M] = p(!1), D = Xn(!!u), { start: k, cancel: T, dragMode: z } = Gn((e, t) => {
3011
3014
  const n = 2 === t.button && !0 === E;
3012
3015
  if (0 !== t.button && !n) return null;
3013
3016
  t.stopPropagation(), b && t.preventDefault();
3014
- const r = n ? Yn() : null, o = e;
3017
+ const r = n ? qn() : null, o = e;
3015
3018
  let l = e;
3016
3019
  return a?.(o, t, T), {
3017
3020
  dragMode: "handle",
@@ -3025,10 +3028,10 @@ var Un = (e) => {
3025
3028
  r?.(), d?.();
3026
3029
  }
3027
3030
  };
3028
- }), O = null !== z && l ? l : o ?? Qn[n], L = P.getBoundsFromRange(t);
3031
+ }), O = null !== z && l ? l : o ?? er[n], L = P.getBoundsFromRange(t);
3029
3032
  if (!L) return null;
3030
3033
  const $ = C.getDevicePixelRatio();
3031
- let A = Jn(L.x, L.x + L.width, qn[n], $), F = Jn(L.y, L.y + L.height, Zn[n], $);
3034
+ let A = Qn(L.x, L.x + L.width, Zn[n], $), F = Qn(L.y, L.y + L.height, Jn[n], $);
3032
3035
  if (S) {
3033
3036
  if (!P.toClipBounds(P.getBoundsFromRange(t))) return null;
3034
3037
  const e = P.getPaneBounds(), n = r / 2 + 1;
@@ -3088,15 +3091,15 @@ var Un = (e) => {
3088
3091
  children: w
3089
3092
  });
3090
3093
  };
3091
- Xn.displayName = "DragHandle";
3092
- var Yn = () => {
3094
+ Yn.displayName = "DragHandle";
3095
+ var qn = () => {
3093
3096
  const e = (e) => {
3094
3097
  e.preventDefault(), e.stopPropagation();
3095
3098
  };
3096
3099
  return window.addEventListener("contextmenu", e, !0), () => {
3097
3100
  setTimeout(() => window.removeEventListener("contextmenu", e, !0), 0);
3098
3101
  };
3099
- }, qn = {
3102
+ }, Zn = {
3100
3103
  tl: "leading",
3101
3104
  l: "leading",
3102
3105
  bl: "leading",
@@ -3105,7 +3108,7 @@ var Yn = () => {
3105
3108
  tr: "trailing",
3106
3109
  r: "trailing",
3107
3110
  br: "trailing"
3108
- }, Zn = {
3111
+ }, Jn = {
3109
3112
  tl: "leading",
3110
3113
  t: "leading",
3111
3114
  tr: "leading",
@@ -3114,7 +3117,7 @@ var Yn = () => {
3114
3117
  bl: "trailing",
3115
3118
  b: "trailing",
3116
3119
  br: "trailing"
3117
- }, Jn = (e, t, n, r) => "center" === n ? C.snapDeviceEdge((e + t) / 2, r) : C.edgeCenter("leading" === n ? e : t, n, 2, r), Qn = {
3120
+ }, Qn = (e, t, n, r) => "center" === n ? C.snapDeviceEdge((e + t) / 2, r) : C.edgeCenter("leading" === n ? e : t, n, 2, r), er = {
3118
3121
  tl: "nwse-resize",
3119
3122
  br: "nwse-resize",
3120
3123
  tr: "nesw-resize",
@@ -3123,7 +3126,7 @@ var Yn = () => {
3123
3126
  b: "ns-resize",
3124
3127
  l: "ew-resize",
3125
3128
  r: "ew-resize"
3126
- }, er = (e, t, n, r, o, l) => {
3129
+ }, tr = (e, t, n, r, o, l) => {
3127
3130
  const i = e.getPanePointFromPointer(n, r), a = e.getCellFromPointer(n, r, !0) ?? t, s = e.getBoundsFromRange(W.cellToRange(a));
3128
3131
  if (!i || !s || s.width <= 0 || s.height <= 0) return l;
3129
3132
  const c = (i.x - s.x) / s.width, d = (i.y - s.y) / s.height, u = o ?? (c < .25 || c > .75 ? G.Column : G.Row);
@@ -3140,13 +3143,13 @@ var Yn = () => {
3140
3143
  colIndex: a.colIndex
3141
3144
  }
3142
3145
  };
3143
- }, tr = (e, t, n, r) => {
3146
+ }, nr = (e, t, n, r) => {
3144
3147
  const o = e.getPanePointFromPointer(n, r), l = e.getBoundsFromRange(t);
3145
3148
  if (!o || !l) return null;
3146
3149
  const i = Math.abs(o.y - l.y), a = Math.abs(o.y - (l.y + l.height)), s = Math.abs(o.x - l.x), c = Math.abs(o.x - (l.x + l.width)), d = Math.min(i, a, s, c);
3147
3150
  return d === i ? "top" : d === a ? "bottom" : d === s ? "left" : "right";
3148
- }, nr = (e, t, n, r, o) => {
3149
- const l = tr(e, t, r, o);
3151
+ }, rr = (e, t, n, r, o) => {
3152
+ const l = nr(e, t, r, o);
3150
3153
  if (!l) return null;
3151
3154
  const i = e.getCellFromPointer(r, o, !0) ?? n;
3152
3155
  return {
@@ -3156,7 +3159,7 @@ var Yn = () => {
3156
3159
  colIndex: ge(i.colIndex, t.colStart, t.colEnd)
3157
3160
  }
3158
3161
  };
3159
- }, rr = (e, t) => e === t || !!e && !!t && e.axis === t.axis && W.isEqualCells(e.origin, t.origin), or = (e, t, n) => {
3162
+ }, or = (e, t) => e === t || !!e && !!t && e.axis === t.axis && W.isEqualCells(e.origin, t.origin), lr = (e, t, n) => {
3160
3163
  const r = e.rowEnd - e.rowStart, o = e.colEnd - e.colStart, l = ge(t.origin.rowIndex, n.rowStart, n.rowEnd - r), i = ge(t.origin.colIndex, n.colStart, n.colEnd - o);
3161
3164
  return {
3162
3165
  ...e,
@@ -3165,8 +3168,8 @@ var Yn = () => {
3165
3168
  colStart: i,
3166
3169
  colEnd: i + o
3167
3170
  };
3168
- }, lr = (e) => {
3169
- const { range: t, children: n, grip: r = "entire", hitSize: o = 10, onHoverChange: l, onDragStateChange: i, onDragStart: a, onDragMove: s, onDragEnd: c, renderMove: d, dragCursor: u = "grabbing", preserveFocus: g, onEdgeDoubleClick: h, className: p } = e, m = Je(), y = t ? `range-move:${t.rowStart}:${t.colStart}:${t.rowEnd}:${t.colEnd}` : "range-move", b = f(null), [S, E] = tt(y, null), { start: P, cancel: R, dragMode: M } = jn((e, n) => {
3171
+ }, ir = (e) => {
3172
+ const { range: t, children: n, grip: r = "entire", hitSize: o = 10, onHoverChange: l, onDragStateChange: i, onDragStart: a, onDragMove: s, onDragEnd: c, renderMove: d, dragCursor: u = "grabbing", preserveFocus: g, onEdgeDoubleClick: h, className: p } = e, m = Qe(), y = t ? `range-move:${t.rowStart}:${t.colStart}:${t.rowEnd}:${t.colEnd}` : "range-move", b = f(null), [S, E] = nt(y, null), { start: P, cancel: R, dragMode: M } = Gn((e, n) => {
3170
3173
  if (0 !== n.button) return null;
3171
3174
  if (!t) return null;
3172
3175
  n.stopPropagation(), g && n.preventDefault();
@@ -3175,9 +3178,9 @@ var Yn = () => {
3175
3178
  n.clientX, n.clientY;
3176
3179
  const u = ((e, t) => e.colStart <= t.colStart && e.colEnd >= t.colEnd ? G.Row : e.rowStart <= t.rowStart && e.rowEnd >= t.rowEnd ? G.Column : null)(o, m.getTotalRange());
3177
3180
  let h = {
3178
- mods: Vn(n),
3179
- insert: er(m, e, n.clientX, n.clientY, u, null),
3180
- grab: nr(m, o, e, n.clientX, n.clientY)
3181
+ mods: Hn(n),
3182
+ insert: tr(m, e, n.clientX, n.clientY, u, null),
3183
+ grab: rr(m, o, e, n.clientX, n.clientY)
3181
3184
  };
3182
3185
  const f = h.insert;
3183
3186
  let p = n;
@@ -3192,11 +3195,11 @@ var Yn = () => {
3192
3195
  return {
3193
3196
  dragMode: "move",
3194
3197
  drag: (e) => {
3195
- l = ((e) => ir(o, e.rowIndex - r.rowIndex, e.colIndex - r.colIndex, m.getTotalRange()))(e), x = !0;
3198
+ l = ((e) => ar(o, e.rowIndex - r.rowIndex, e.colIndex - r.colIndex, m.getTotalRange()))(e), x = !0;
3196
3199
  },
3197
3200
  point: (e, t, n, r) => {
3198
3201
  r && (p = r);
3199
- const o = er(m, e, t, n, u, h.insert), l = x || !rr(o, h.insert);
3202
+ const o = tr(m, e, t, n, u, h.insert), l = x || !or(o, h.insert);
3200
3203
  x = !1, l && (h = {
3201
3204
  ...h,
3202
3205
  insert: o
@@ -3210,8 +3213,8 @@ var Yn = () => {
3210
3213
  },
3211
3214
  end: (e) => {
3212
3215
  i?.(!1), d && E(null);
3213
- const t = Vn(e);
3214
- (!W.isEqualRanges(l, o) || t.shiftKey && !rr(h.insert, f)) && c?.(l, e, {
3216
+ const t = Hn(e);
3217
+ (!W.isEqualRanges(l, o) || t.shiftKey && !or(h.insert, f)) && c?.(l, e, {
3215
3218
  ...h,
3216
3219
  mods: t
3217
3220
  });
@@ -3220,11 +3223,11 @@ var Yn = () => {
3220
3223
  i?.(!1), d && E(null);
3221
3224
  }
3222
3225
  };
3223
- }), D = Gn(!!h), k = null !== M ? u : "move";
3226
+ }), D = Xn(!!h), k = null !== M ? u : "move";
3224
3227
  if (!t) return null;
3225
3228
  const T = { onPointerDown: (e) => {
3226
3229
  if (D(e)) {
3227
- const n = m ? tr(m, t, e.clientX, e.clientY) : null;
3230
+ const n = m ? nr(m, t, e.clientX, e.clientY) : null;
3228
3231
  n && h(t, n, e);
3229
3232
  return;
3230
3233
  }
@@ -3239,7 +3242,7 @@ var Yn = () => {
3239
3242
  height: L.height + 2 * O
3240
3243
  } : void 0;
3241
3244
  return v(w, { children: [
3242
- x(dt, "entire" === r ? {
3245
+ x(ut, "entire" === r ? {
3243
3246
  ref: b,
3244
3247
  className: Y("drag-grip", p),
3245
3248
  ...$ ? { bounds: $ } : { range: t },
@@ -3280,8 +3283,8 @@ var Yn = () => {
3280
3283
  }) : null
3281
3284
  ] });
3282
3285
  };
3283
- lr.displayName = "Draggable";
3284
- var ir = (e, t, n, r) => {
3286
+ ir.displayName = "Draggable";
3287
+ var ar = (e, t, n, r) => {
3285
3288
  const o = e.rowEnd - e.rowStart, l = e.colEnd - e.colStart, i = ge(e.rowStart + t, r.rowStart, r.rowEnd - o), a = ge(e.colStart + n, r.colStart, r.colEnd - l);
3286
3289
  return {
3287
3290
  rowStart: i,
@@ -3289,12 +3292,12 @@ var ir = (e, t, n, r) => {
3289
3292
  rowEnd: i + o,
3290
3293
  colEnd: a + l
3291
3294
  };
3292
- }, ar = [
3295
+ }, sr = [
3293
3296
  "tl",
3294
3297
  "tr",
3295
3298
  "br",
3296
3299
  "bl"
3297
- ], sr = [
3300
+ ], cr = [
3298
3301
  "tl",
3299
3302
  "t",
3300
3303
  "tr",
@@ -3303,18 +3306,18 @@ var ir = (e, t, n, r) => {
3303
3306
  "b",
3304
3307
  "bl",
3305
3308
  "l"
3306
- ], cr = (e) => {
3307
- const { range: t, anchors: n = sr, onDragStart: r, onDragMove: o, onDragEnd: l, onDragCancel: i, onHandleHoverChange: a, size: s = 8, renderHandle: c, preserveFocus: d, ...u } = e, g = {
3308
- ...zn,
3309
+ ], dr = (e) => {
3310
+ const { range: t, anchors: n = cr, onDragStart: r, onDragMove: o, onDragEnd: l, onDragCancel: i, onHandleHoverChange: a, size: s = 8, renderHandle: c, preserveFocus: d, ...u } = e, g = {
3311
+ ...On,
3309
3312
  ...u
3310
- }, h = g.stroke ?? "rgb(33, 115, 70)", m = Je(), [y, b] = p(null), S = f(null);
3313
+ }, h = g.stroke ?? "rgb(33, 115, 70)", m = Qe(), [y, b] = p(null), S = f(null);
3311
3314
  if (!t) return null;
3312
3315
  const E = y ?? t;
3313
- return v(w, { children: [x(On, {
3316
+ return v(w, { children: [x(Ln, {
3314
3317
  className: "resizer-outline",
3315
3318
  range: E,
3316
3319
  ...g
3317
- }), n.map((e) => x(Xn, {
3320
+ }), n.map((e) => x(Yn, {
3318
3321
  className: `resize-handle ${e}`,
3319
3322
  range: E,
3320
3323
  anchor: e,
@@ -3334,11 +3337,11 @@ var ir = (e, t, n, r) => {
3334
3337
  S.current = t, r?.(t, n);
3335
3338
  },
3336
3339
  onDragMove: (n, r, l) => {
3337
- const i = dr(S.current ?? t, e, r, m.getTotalRange());
3340
+ const i = ur(S.current ?? t, e, r, m.getTotalRange());
3338
3341
  b(i), o?.(i, l);
3339
3342
  },
3340
3343
  onDragEnd: (n, r, o) => {
3341
- const i = dr(S.current ?? t, e, r, m.getTotalRange());
3344
+ const i = ur(S.current ?? t, e, r, m.getTotalRange());
3342
3345
  S.current = null, b(null), l?.(i, o);
3343
3346
  },
3344
3347
  onDragCancel: () => {
@@ -3346,8 +3349,8 @@ var ir = (e, t, n, r) => {
3346
3349
  }
3347
3350
  }, e))] });
3348
3351
  };
3349
- cr.displayName = "RangeResizer";
3350
- var dr = (e, t, n, r) => {
3352
+ dr.displayName = "RangeResizer";
3353
+ var ur = (e, t, n, r) => {
3351
3354
  let { rowStart: o, colStart: l, rowEnd: i, colEnd: a } = e;
3352
3355
  return t.includes("t") && (o = ge(n.rowIndex, r.rowStart, r.rowEnd)), t.includes("b") && (i = ge(n.rowIndex, r.rowStart, r.rowEnd)), t.includes("l") && (l = ge(n.colIndex, r.colStart, r.colEnd)), t.includes("r") && (a = ge(n.colIndex, r.colStart, r.colEnd)), {
3353
3356
  rowStart: Math.min(o, i),
@@ -3355,7 +3358,7 @@ var dr = (e, t, n, r) => {
3355
3358
  rowEnd: Math.max(o, i),
3356
3359
  colEnd: Math.max(l, a)
3357
3360
  };
3358
- }, ur = (e, t, n) => {
3361
+ }, gr = (e, t, n) => {
3359
3362
  const r = t.rowIndex - e.rowEnd, o = e.rowStart - t.rowIndex, l = t.colIndex - e.colEnd, i = e.colStart - t.colIndex, a = Math.max(r, o, 0), s = Math.max(l, i, 0);
3360
3363
  if (a > 0 || s > 0) return a >= s ? r > 0 ? {
3361
3364
  ...e,
@@ -3378,21 +3381,21 @@ var dr = (e, t, n, r) => {
3378
3381
  ...e,
3379
3382
  colEnd: t.colIndex
3380
3383
  };
3381
- }, gr = (e, t) => t.rowEnd < e.rowEnd ? {
3384
+ }, hr = (e, t) => t.rowEnd < e.rowEnd ? {
3382
3385
  ...e,
3383
3386
  rowStart: t.rowEnd + 1
3384
3387
  } : t.colEnd < e.colEnd ? {
3385
3388
  ...e,
3386
3389
  colStart: t.colEnd + 1
3387
- } : null, hr = (e) => {
3390
+ } : null, fr = (e) => {
3388
3391
  const { range: t, snapDestination: n, onDragStart: r, onDragMove: o, onDragEnd: l, onMenu: i, onDragDone: a, onDoubleClick: s, renderHandle: c, ...d } = e, u = {
3389
- ...zn,
3392
+ ...On,
3390
3393
  fill: void 0,
3391
3394
  ...d
3392
3395
  }, g = u.stroke, h = {
3393
3396
  ...u,
3394
3397
  strokeDasharray: "3 2"
3395
- }, p = Je(), m = f(null), [y, b] = tt("range-fill", null);
3398
+ }, p = Qe(), m = f(null), [y, b] = nt("range-fill", null);
3396
3399
  if (!t) return null;
3397
3400
  const S = p.getTotalRange(), E = t.rowStart === S.rowStart && t.rowEnd === S.rowEnd, C = t.colStart === S.colStart && t.colEnd === S.colEnd;
3398
3401
  if (E && C) return null;
@@ -3418,9 +3421,9 @@ var dr = (e, t, n, r) => {
3418
3421
  }, c))) return !1;
3419
3422
  return !0;
3420
3423
  })(p, t, E, C)) return null;
3421
- const z = y ? gr(t, y) : null;
3424
+ const z = y ? hr(t, y) : null;
3422
3425
  return v(w, { children: [
3423
- x(Xn, {
3426
+ x(Yn, {
3424
3427
  className: "fill-handle",
3425
3428
  range: t,
3426
3429
  anchor: k,
@@ -3434,7 +3437,7 @@ var dr = (e, t, n, r) => {
3434
3437
  m.current = null, b(null), r?.(t, n, o);
3435
3438
  },
3436
3439
  onDragMove: (e, r, l) => {
3437
- let i = ur(t, r, p.getTotalRange());
3440
+ let i = gr(t, r, p.getTotalRange());
3438
3441
  i && n && (i = n(t, i)), m.current = i, b(i), i && o?.(i, l);
3439
3442
  },
3440
3443
  onDragEnd: (e, t, n) => {
@@ -3445,40 +3448,40 @@ var dr = (e, t, n, r) => {
3445
3448
  m.current = null, b(null), a?.();
3446
3449
  }
3447
3450
  }),
3448
- y && x(On, {
3451
+ y && x(Ln, {
3449
3452
  className: "fill-preview",
3450
3453
  range: y,
3451
3454
  ...h
3452
3455
  }),
3453
- z && x(On, {
3456
+ z && x(Ln, {
3454
3457
  className: "fill-vacated",
3455
3458
  range: z,
3456
3459
  fill: "rgba(128, 128, 128, 0.28)"
3457
3460
  })
3458
3461
  ] });
3459
3462
  };
3460
- hr.displayName = "FillHandle";
3461
- var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) => !!e?.closest?.(`[${fr}]`), wr = (e) => {
3462
- const t = (e?.closest?.(`[${fr}]`))?.closest("[data-rc]")?.getAttribute("data-rc");
3463
+ fr.displayName = "FillHandle";
3464
+ var pr = "data-cell-interactive", mr = Object.freeze({ [pr]: "" }), wr = (e) => !!e?.closest?.(`[${pr}]`), xr = (e) => {
3465
+ const t = (e?.closest?.(`[${pr}]`))?.closest("[data-rc]")?.getAttribute("data-rc");
3463
3466
  if (!t) return null;
3464
3467
  const [n, r] = t.split(":").map(Number);
3465
3468
  return Number.isInteger(n) && Number.isInteger(r) ? {
3466
3469
  rowIndex: n,
3467
3470
  colIndex: r
3468
3471
  } : null;
3469
- }, xr = i((e) => {
3472
+ }, vr = i((e) => {
3470
3473
  const { value: t, zoom: n, bounds: r, cell: o, range: l, children: i, className: a, ...s } = e;
3471
3474
  return x("div", {
3472
3475
  className: Y(a, "cell"),
3473
3476
  ...s,
3474
3477
  children: t
3475
3478
  });
3476
- }), vr = Object.freeze({
3479
+ }), yr = Object.freeze({
3477
3480
  cells: [],
3478
3481
  rangesH: [],
3479
3482
  rangesV: []
3480
- }), yr = !1, br = /* @__PURE__ */ new WeakMap(), Sr = (e, t = {}) => {
3481
- const n = e.getVisibleRange(), r = e.getScrollTopLeft(), o = t.bufferRange, l = !!o, i = o ? o.rowStart : 0, a = o ? o.colStart : 0, s = o ? o.rowEnd : 0, c = o ? o.colEnd : 0, d = br.get(e);
3483
+ }), br = !1, Sr = /* @__PURE__ */ new WeakMap(), Er = (e, t = {}) => {
3484
+ const n = e.getVisibleRange(), r = e.getScrollTopLeft(), o = t.bufferRange, l = !!o, i = o ? o.rowStart : 0, a = o ? o.colStart : 0, s = o ? o.rowEnd : 0, c = o ? o.colEnd : 0, d = Sr.get(e);
3482
3485
  if (d && d.rowStart === n.rowStart && d.colStart === n.colStart && d.rowEnd === n.rowEnd && d.colEnd === n.colEnd && d.scrollLeft === r.left && d.scrollTop === r.top && d.hasBuffer === l && d.bRowStart === i && d.bColStart === a && d.bRowEnd === s && d.bColEnd === c && d.options.cacheToken === t.cacheToken && d.options.getVisibleCells === t.getVisibleCells && d.options.hiddenCellAt === t.hiddenCellAt) return d.model;
3483
3486
  const u = ((e, t = {}) => {
3484
3487
  const { getVisibleCells: n, hiddenCellAt: r, bufferRange: o } = t, l = e.getTotalRange(), i = o ? {
@@ -3487,7 +3490,7 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3487
3490
  colStart: Math.max(o.colStart, l.colStart),
3488
3491
  colEnd: Math.min(o.colEnd, l.colEnd)
3489
3492
  } : null, a = i ? e.getVisibleColumns(i.colStart, i.colEnd) : e.getVisibleColumns(), s = i ? e.getVisibleRows(i.rowStart, i.rowEnd) : e.getVisibleRows();
3490
- if (0 === a.length || 0 === s.length) return vr;
3493
+ if (0 === a.length || 0 === s.length) return yr;
3491
3494
  const c = (t) => e.getRangeFromCell(t);
3492
3495
  let d;
3493
3496
  if (n) d = n(e, o);
@@ -3509,7 +3512,7 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3509
3512
  }
3510
3513
  }
3511
3514
  const u = d ? d.length : 0;
3512
- if (0 === u) return vr;
3515
+ if (0 === u) return yr;
3513
3516
  const g = e.getVisibleRange(), h = o ?? g, f = [], p = [], m = [], w = /* @__PURE__ */ new Set();
3514
3517
  for (let t = 0; t < u; t++) {
3515
3518
  const n = d[t];
@@ -3531,7 +3534,7 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3531
3534
  rowIndex: t.rowStart,
3532
3535
  colIndex: t.colStart
3533
3536
  });
3534
- const n = Pr(l.rowStart, l.colStart);
3537
+ const n = Rr(l.rowStart, l.colStart);
3535
3538
  if (w.has(n)) continue;
3536
3539
  w.add(n), l.rowEnd - l.rowStart > 0 && p.push(l), l.colEnd - l.colStart > 0 && m.push(l), a = e.getBoundsFromRange(l);
3537
3540
  } else {
@@ -3548,7 +3551,7 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3548
3551
  range: l,
3549
3552
  bounds: a,
3550
3553
  value: n?.value
3551
- }) : yr || (yr = !0, console.warn("grid-react: no bounds for cell", Pr(l.rowStart, l.colStart)));
3554
+ }) : br || (br = !0, console.warn("grid-react: no bounds for cell", Rr(l.rowStart, l.colStart)));
3552
3555
  }
3553
3556
  return {
3554
3557
  cells: f,
@@ -3556,7 +3559,7 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3556
3559
  rangesV: m
3557
3560
  };
3558
3561
  })(e, t);
3559
- return br.set(e, {
3562
+ return Sr.set(e, {
3560
3563
  rowStart: n.rowStart,
3561
3564
  colStart: n.colStart,
3562
3565
  rowEnd: n.rowEnd,
@@ -3571,17 +3574,17 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3571
3574
  options: t,
3572
3575
  model: u
3573
3576
  }), u;
3574
- }, Er = Object.freeze({
3577
+ }, Cr = Object.freeze({
3575
3578
  rangesH: [],
3576
3579
  rangesV: []
3577
- }), Cr = /* @__PURE__ */ new WeakMap(), Ir = (e, t = {}) => {
3578
- const n = e.getVisibleRange(), r = Cr.get(e);
3580
+ }), Ir = /* @__PURE__ */ new WeakMap(), Pr = (e, t = {}) => {
3581
+ const n = e.getVisibleRange(), r = Ir.get(e);
3579
3582
  if (r && r.rowStart === n.rowStart && r.colStart === n.colStart && r.rowEnd === n.rowEnd && r.colEnd === n.colEnd && r.cacheToken === t.cacheToken && r.getVisibleCells === t.getVisibleCells) return r.ranges;
3580
3583
  const o = ((e, t = {}) => {
3581
3584
  const { getVisibleCells: n } = t, r = e.getVisibleRange(), o = [], l = [], i = /* @__PURE__ */ new Set(), a = (e) => {
3582
3585
  if (W.isSingleCell(e)) return;
3583
3586
  if (!W.isRangesIntersect(e, r) && !W.isRangeWithinRange(e, r)) return;
3584
- const t = Pr(e.rowStart, e.colStart);
3587
+ const t = Rr(e.rowStart, e.colStart);
3585
3588
  i.has(t) || (i.add(t), e.rowEnd - e.rowStart > 0 && o.push(e), e.colEnd - e.colStart > 0 && l.push(e));
3586
3589
  };
3587
3590
  if (n) {
@@ -3600,12 +3603,12 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3600
3603
  }));
3601
3604
  }
3602
3605
  }
3603
- return 0 === o.length && 0 === l.length ? Er : {
3606
+ return 0 === o.length && 0 === l.length ? Cr : {
3604
3607
  rangesH: o,
3605
3608
  rangesV: l
3606
3609
  };
3607
3610
  })(e, t);
3608
- return Cr.set(e, {
3611
+ return Ir.set(e, {
3609
3612
  rowStart: n.rowStart,
3610
3613
  colStart: n.colStart,
3611
3614
  rowEnd: n.rowEnd,
@@ -3614,11 +3617,11 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3614
3617
  cacheToken: t.cacheToken,
3615
3618
  ranges: o
3616
3619
  }), o;
3617
- }, Pr = (e, t) => `${e}:${t}`, Rr = {
3620
+ }, Rr = (e, t) => `${e}:${t}`, Mr = {
3618
3621
  tiles: "_tiles_v3ek7_7",
3619
3622
  gridlines: "_gridlines_v3ek7_32"
3620
- }, Mr = i((e) => {
3621
- const { renderCell: t, cacheToken: n, getVisibleCells: r, hiddenCellAt: o, suppressCell: l, className: i, style: a } = e, s = Je(), u = s.getAnchor(), h = d(), m = g(() => `sxl-cl-${h.replace(/[^a-zA-Z0-9_-]/g, "")}`, [h]), y = f({
3623
+ }, Dr = i((e) => {
3624
+ const { renderCell: t, cacheToken: n, getVisibleCells: r, hiddenCellAt: o, suppressCell: l, className: i, style: a } = e, s = Qe(), u = s.getAnchor(), h = d(), m = g(() => `sxl-cl-${h.replace(/[^a-zA-Z0-9_-]/g, "")}`, [h]), y = f({
3622
3625
  token: void 0,
3623
3626
  renderCell: void 0,
3624
3627
  getVisibleCells: void 0,
@@ -3627,43 +3630,43 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3627
3630
  rebaseLeft: 0,
3628
3631
  rebaseTop: 0,
3629
3632
  map: /* @__PURE__ */ new Map()
3630
- }), b = s.getScrollTopLeft(), S = s.getFreezeTopLeft(), E = b.left + S.left, I = b.top + S.top, P = Math.floor(E / Tr) * Tr, R = Math.floor(I / Tr) * Tr, M = s.getVisibleRange();
3633
+ }), b = s.getScrollTopLeft(), S = s.getFreezeTopLeft(), E = b.left + S.left, I = b.top + S.top, P = Math.floor(E / zr) * zr, R = Math.floor(I / zr) * zr, M = s.getVisibleRange();
3631
3634
  let D = 0, k = -1, T = 0, z = -1;
3632
- M && (D = Math.max(0, Math.floor(M.rowStart / kr) - Or), k = Math.floor(M.rowEnd / kr) + Or, T = Math.max(0, Math.floor(M.colStart / kr) - Or), z = Math.floor(M.colEnd / kr) + Or);
3635
+ M && (D = Math.max(0, Math.floor(M.rowStart / Tr) - Lr), k = Math.floor(M.rowEnd / Tr) + Lr, T = Math.max(0, Math.floor(M.colStart / Tr) - Lr), z = Math.floor(M.colEnd / Tr) + Lr);
3633
3636
  const O = g(() => {
3634
3637
  if (!M || k < D) return null;
3635
3638
  const e = y.current;
3636
3639
  e.token === n && e.pane === s && e.renderCell === t && e.getVisibleCells === r && e.hiddenCellAt === o && e.rebaseLeft === P && e.rebaseTop === R || (e.map = /* @__PURE__ */ new Map(), e.token = n, e.pane = s, e.renderCell = t, e.getVisibleCells = r, e.hiddenCellAt = o, e.rebaseLeft = P, e.rebaseTop = R);
3637
3640
  const l = e.map, i = s.getZoom(), a = s.getTotalRange(), c = {
3638
- rowStart: Math.max(a.rowStart, D * kr),
3639
- colStart: Math.max(a.colStart, T * kr),
3640
- rowEnd: Math.min(a.rowEnd, (k + 1) * kr - 1),
3641
- colEnd: Math.min(a.colEnd, (z + 1) * kr - 1)
3642
- }, { cells: d } = Sr(s, {
3641
+ rowStart: Math.max(a.rowStart, D * Tr),
3642
+ colStart: Math.max(a.colStart, T * Tr),
3643
+ rowEnd: Math.min(a.rowEnd, (k + 1) * Tr - 1),
3644
+ colEnd: Math.min(a.colEnd, (z + 1) * Tr - 1)
3645
+ }, { cells: d } = Er(s, {
3643
3646
  getVisibleCells: r,
3644
3647
  hiddenCellAt: o,
3645
3648
  bufferRange: c,
3646
3649
  cacheToken: n
3647
3650
  }), g = /* @__PURE__ */ new Map();
3648
3651
  for (let e = 0; e < d.length; e++) {
3649
- const t = d[e], n = `${Math.floor(t.cell.rowIndex / kr)}:${Math.floor(t.cell.colIndex / kr)}`;
3652
+ const t = d[e], n = `${Math.floor(t.cell.rowIndex / Tr)}:${Math.floor(t.cell.colIndex / Tr)}`;
3650
3653
  let r = g.get(n);
3651
3654
  r || (r = [], g.set(n, r)), r.push(t);
3652
3655
  }
3653
3656
  const h = [], f = (e, n) => {
3654
- if (e * kr > a.rowEnd || n * kr > a.colEnd) return;
3657
+ if (e * Tr > a.rowEnd || n * Tr > a.colEnd) return;
3655
3658
  const r = e >= D && e <= k && n >= T && n <= z, o = `${e}:${n}`;
3656
3659
  let c = l.get(o);
3657
3660
  if (void 0 === c) {
3658
3661
  const d = g.get(o);
3659
- if (!d && !$r) return;
3662
+ if (!d && !Ar) return;
3660
3663
  const h = s.getBoundsFromRange({
3661
- rowStart: e * kr,
3662
- colStart: n * kr,
3663
- rowEnd: Math.min(a.rowEnd, e * kr + kr - 1),
3664
- colEnd: Math.min(a.colEnd, n * kr + kr - 1)
3664
+ rowStart: e * Tr,
3665
+ colStart: n * Tr,
3666
+ rowEnd: Math.min(a.rowEnd, e * Tr + Tr - 1),
3667
+ colEnd: Math.min(a.colEnd, n * Tr + Tr - 1)
3665
3668
  }), f = E + h.x - P, p = I + h.y - R, m = [];
3666
- if ($r && m.push(x("div", { style: {
3669
+ if (Ar && m.push(x("div", { style: {
3667
3670
  position: "absolute",
3668
3671
  left: 0,
3669
3672
  top: 0,
@@ -3674,13 +3677,13 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3674
3677
  } }, "__bg")), d) for (let e = 0; e < d.length; e++) {
3675
3678
  const { cell: n, range: r, bounds: o, value: l } = d[e];
3676
3679
  o && m.push(t({
3677
- key: `pane:${u}:cell:${Pr(n.rowIndex, n.colIndex)}`,
3680
+ key: `pane:${u}:cell:${Rr(n.rowIndex, n.colIndex)}`,
3678
3681
  cell: n,
3679
3682
  bounds: o,
3680
3683
  range: r,
3681
3684
  zoom: i,
3682
3685
  value: l,
3683
- "data-rc": Pr(n.rowIndex, n.colIndex),
3686
+ "data-rc": Rr(n.rowIndex, n.colIndex),
3684
3687
  style: {
3685
3688
  left: o.x - h.x,
3686
3689
  top: o.y - h.y,
@@ -3693,15 +3696,15 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3693
3696
  className: "tile",
3694
3697
  style: { transform: `translate(${f}px, ${p}px)` },
3695
3698
  children: m
3696
- }, `pane:${u}:tile:${e}:${n}`), r && (l.set(o, c), l.size > Lr)) {
3699
+ }, `pane:${u}:tile:${e}:${n}`), r && (l.set(o, c), l.size > $r)) {
3697
3700
  const e = l.keys().next().value;
3698
3701
  void 0 !== e && l.delete(e);
3699
3702
  }
3700
3703
  }
3701
3704
  c && h.push(c);
3702
3705
  };
3703
- if ($r) {
3704
- for (let e = D; e <= k && !(e * kr > a.rowEnd); e++) for (let t = T; t <= z && !(t * kr > a.colEnd); t++) f(e, t);
3706
+ if (Ar) {
3707
+ for (let e = D; e <= k && !(e * Tr > a.rowEnd); e++) for (let t = T; t <= z && !(t * Tr > a.colEnd); t++) f(e, t);
3705
3708
  for (const e of g.keys()) {
3706
3709
  const t = e.indexOf(":"), n = Number(e.slice(0, t)), r = Number(e.slice(t + 1));
3707
3710
  (n < D || n > k || r < T || r > z) && f(n, r);
@@ -3730,15 +3733,15 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3730
3733
  const e = A.current;
3731
3734
  e.left === E && e.top === I || (e.left = E, e.top = I, $(!0), e.timer && clearTimeout(e.timer), e.timer = setTimeout(() => {
3732
3735
  e.timer = null, $(!1);
3733
- }, zr));
3736
+ }, Or));
3734
3737
  }, [E, I]), c(() => () => {
3735
3738
  const e = A.current.timer;
3736
3739
  e && clearTimeout(e);
3737
3740
  }, []);
3738
3741
  const F = C.getDevicePixelRatio(), N = Math.round((P - E) * F) / F, B = Math.round((R - I) * F) / F;
3739
- return v(w, { children: [x(dt, {
3742
+ return v(w, { children: [x(ut, {
3740
3743
  fill: !0,
3741
- className: Y("tiles", Rr.tiles, m, i),
3744
+ className: Y("tiles", Mr.tiles, m, i),
3742
3745
  style: {
3743
3746
  pointerEvents: "none",
3744
3747
  ...a,
@@ -3751,15 +3754,15 @@ var fr = "data-cell-interactive", pr = Object.freeze({ [fr]: "" }), mr = (e) =>
3751
3754
  }
3752
3755
  },
3753
3756
  children: O
3754
- }), l ? x("style", { children: `.${m} [data-rc="${Pr(l.rowIndex, l.colIndex)}"]{visibility:hidden !important;}` }) : null] });
3757
+ }), l ? x("style", { children: `.${m} [data-rc="${Rr(l.rowIndex, l.colIndex)}"]{visibility:hidden !important;}` }) : null] });
3755
3758
  });
3756
- Mr.displayName = "CellTileDiv";
3757
- var Dr = i((e) => {
3759
+ Dr.displayName = "CellTileDiv";
3760
+ var kr = i((e) => {
3758
3761
  const { renderCell: t, cacheToken: n, getVisibleCells: r, hiddenCellAt: o, suppressCell: l, className: i, style: a, ...s } = e;
3759
- return x(lt, {
3762
+ return x(it, {
3760
3763
  className: Y(i, "cells"),
3761
3764
  ...s,
3762
- children: x(Mr, {
3765
+ children: x(Dr, {
3763
3766
  renderCell: t,
3764
3767
  cacheToken: n,
3765
3768
  getVisibleCells: r,
@@ -3769,9 +3772,9 @@ var Dr = i((e) => {
3769
3772
  })
3770
3773
  });
3771
3774
  });
3772
- Dr.displayName = "CellLayer";
3773
- var kr = 8, Tr = 1 << 19, zr = 150, Or = 1, Lr = 512, $r = !1, Ar = (e, t, n, r) => {
3774
- const o = C.getDevicePixelRatio(), l = (r?.width ?? Hr) / o, i = r?.shift ?? 0, a = r?.breaksAt, s = e.getVisibleRange(), c = (t) => e.getColumnSize(t).offset, d = (t) => {
3775
+ kr.displayName = "CellLayer";
3776
+ var Tr = 8, zr = 1 << 19, Or = 150, Lr = 1, $r = 512, Ar = !1, Fr = (e, t, n, r) => {
3777
+ const o = C.getDevicePixelRatio(), l = (r?.width ?? Kr) / o, i = r?.shift ?? 0, a = r?.breaksAt, s = e.getVisibleRange(), c = (t) => e.getColumnSize(t).offset, d = (t) => {
3775
3778
  const n = e.getColumnSize(t);
3776
3779
  return n.offset + n.size;
3777
3780
  }, u = (t) => e.getRowSize(t).offset, g = (t) => {
@@ -3801,7 +3804,7 @@ var kr = 8, Tr = 1 << 19, zr = 150, Or = 1, Lr = 512, $r = !1, Ar = (e, t, n, r)
3801
3804
  }
3802
3805
  p = !0;
3803
3806
  }
3804
- const S = C.snapLineCenter(y + i, l, o), E = Fr(f, a?.(r), o);
3807
+ const S = C.snapLineCenter(y + i, l, o), E = Nr(f, a?.(r), o);
3805
3808
  let I = w;
3806
3809
  const P = E.length;
3807
3810
  for (let e = 0; e < P; e += 2) {
@@ -3832,7 +3835,7 @@ var kr = 8, Tr = 1 << 19, zr = 150, Or = 1, Lr = 512, $r = !1, Ar = (e, t, n, r)
3832
3835
  }
3833
3836
  p = !0;
3834
3837
  }
3835
- const S = C.snapLineCenter(y + i, l, o), E = Fr(f, a?.(r), o);
3838
+ const S = C.snapLineCenter(y + i, l, o), E = Nr(f, a?.(r), o);
3836
3839
  let I = w;
3837
3840
  const P = E.length;
3838
3841
  for (let e = 0; e < P; e += 2) {
@@ -3843,22 +3846,22 @@ var kr = 8, Tr = 1 << 19, zr = 150, Or = 1, Lr = 512, $r = !1, Ar = (e, t, n, r)
3843
3846
  }
3844
3847
  }
3845
3848
  return m;
3846
- }, Fr = (e, t, n) => {
3849
+ }, Nr = (e, t, n) => {
3847
3850
  if (!t || 0 === t.length) return e;
3848
3851
  const r = [];
3849
3852
  let o = 0, l = 0;
3850
3853
  for (; o < e.length || l < t.length;) l >= t.length || o < e.length && e[o] <= C.snapDeviceEdge(t[l], n) ? (r.push(e[o], e[o + 1]), o += 2) : (r.push(C.snapDeviceEdge(t[l], n), C.snapDeviceEdge(t[l + 1], n)), l += 2);
3851
3854
  return r;
3852
- }, Nr = (e) => {
3855
+ }, Br = (e) => {
3853
3856
  let t = "";
3854
3857
  for (let n = 0; n < e.length; n++) {
3855
3858
  const r = e[n];
3856
3859
  t += `${r.rowStart},${r.colStart},${r.rowEnd},${r.colEnd};`;
3857
3860
  }
3858
3861
  return t;
3859
- }, Br = (e, t, n, r, o) => {
3862
+ }, Vr = (e, t, n, r, o) => {
3860
3863
  if (!n) return null;
3861
- const l = e.getPaneBounds(), i = Math.ceil(l.width), a = Math.ceil(l.height), s = String(Hr / C.getDevicePixelRatio());
3864
+ const l = e.getPaneBounds(), i = Math.ceil(l.width), a = Math.ceil(l.height), s = String(Kr / C.getDevicePixelRatio());
3862
3865
  return x("svg", {
3863
3866
  className: Y(t ? "horizontal" : "vertical"),
3864
3867
  width: `${i}`,
@@ -3874,35 +3877,35 @@ var kr = 8, Tr = 1 << 19, zr = 150, Or = 1, Lr = 512, $r = !1, Ar = (e, t, n, r)
3874
3877
  ...o
3875
3878
  })
3876
3879
  });
3877
- }, Vr = i((e) => {
3878
- const { showGridLines: t = !0, gridLineColor: n = "var(--sxl-color-base-300, rgb(224, 224, 224))", propsRows: r, propsColumns: o, getVisibleCells: l, hiddenCellAt: i, cacheToken: a, bufferRange: s, className: c, style: d, ...u } = e, h = Je(), f = t, p = !0 === t || !0 === f?.horizontal, m = !0 === t || !0 === f?.vertical, { rangesH: w, rangesV: y } = Ir(h, {
3880
+ }, Hr = i((e) => {
3881
+ const { showGridLines: t = !0, gridLineColor: n = "var(--sxl-color-base-300, rgb(224, 224, 224))", propsRows: r, propsColumns: o, getVisibleCells: l, hiddenCellAt: i, cacheToken: a, bufferRange: s, className: c, style: d, ...u } = e, h = Qe(), f = t, p = !0 === t || !0 === f?.horizontal, m = !0 === t || !0 === f?.vertical, { rangesH: w, rangesV: y } = Pr(h, {
3879
3882
  getVisibleCells: l,
3880
3883
  cacheToken: a
3881
- }), b = C.getDevicePixelRatio(), { top: S, left: E } = h.getScrollTopLeft(), I = h.getPaneBounds(), P = h.getVisibleRange(), R = h.getColumnSize(P.colEnd), M = h.getRowSize(P.rowEnd), D = Math.min(I.width, R ? R.offset + R.size : I.width), k = Math.min(I.height, M ? M.offset + M.size : I.height), T = 0 === w.length ? `${S}|${D}|${b}` : `${S}|${E}|${D}|${b}|${Nr(w)}`, z = 0 === y.length ? `${E}|${k}|${b}` : `${E}|${S}|${k}|${b}|${Nr(y)}`, O = g(() => p ? Ar(h, !0, w) : null, [
3884
+ }), b = C.getDevicePixelRatio(), { top: S, left: E } = h.getScrollTopLeft(), I = h.getPaneBounds(), P = h.getVisibleRange(), R = h.getColumnSize(P.colEnd), M = h.getRowSize(P.rowEnd), D = Math.min(I.width, R ? R.offset + R.size : I.width), k = Math.min(I.height, M ? M.offset + M.size : I.height), T = 0 === w.length ? `${S}|${D}|${b}` : `${S}|${E}|${D}|${b}|${Br(w)}`, z = 0 === y.length ? `${E}|${k}|${b}` : `${E}|${S}|${k}|${b}|${Br(y)}`, O = g(() => p ? Fr(h, !0, w) : null, [
3882
3885
  h,
3883
3886
  p,
3884
3887
  T
3885
- ]), L = g(() => m ? Ar(h, !1, y) : null, [
3888
+ ]), L = g(() => m ? Fr(h, !1, y) : null, [
3886
3889
  h,
3887
3890
  m,
3888
3891
  z
3889
3892
  ]);
3890
- return p || m ? x(lt, {
3893
+ return p || m ? x(it, {
3891
3894
  ...u,
3892
3895
  className: Y(c, "gridlines"),
3893
- children: v(dt, {
3896
+ children: v(ut, {
3894
3897
  fill: !0,
3895
- className: Y("gridlines-box", Rr.gridlines),
3898
+ className: Y("gridlines-box", Mr.gridlines),
3896
3899
  style: {
3897
3900
  pointerEvents: "none",
3898
3901
  ...d
3899
3902
  },
3900
- children: [p && O ? Br(h, !0, O, n, r) : null, m && L ? Br(h, !1, L, n, o) : null]
3903
+ children: [p && O ? Vr(h, !0, O, n, r) : null, m && L ? Vr(h, !1, L, n, o) : null]
3901
3904
  })
3902
3905
  }) : null;
3903
3906
  });
3904
- Vr.displayName = "GridlineLayer";
3905
- var Hr = 1, Kr = -10, _r = class {
3907
+ Hr.displayName = "GridlineLayer";
3908
+ var Kr = 1, _r = -10, Wr = class {
3906
3909
  constructor(e = {}) {
3907
3910
  this.listeners = /* @__PURE__ */ new Set(), this._coords = e.initial ?? {
3908
3911
  cell: {
@@ -3911,7 +3914,7 @@ var Hr = 1, Kr = -10, _r = class {
3911
3914
  },
3912
3915
  ranges: W.EmptyRanges,
3913
3916
  rangeIndex: -1
3914
- }, this._getBounds = e.getBounds ?? (() => jr);
3917
+ }, this._getBounds = e.getBounds ?? (() => Gr);
3915
3918
  }
3916
3919
  getSelection() {
3917
3920
  return this._coords;
@@ -3972,12 +3975,12 @@ var Hr = 1, Kr = -10, _r = class {
3972
3975
  return e >= 0 ? this._coords.ranges[e] : W.cellToRange(this._coords.cell);
3973
3976
  }
3974
3977
  modify(e, t = this._coords.cell) {
3975
- const n = this._activeRange(), o = Wr({
3978
+ const n = this._activeRange(), o = Ur({
3976
3979
  rowStart: Math.min(e.rowIndex ?? n.rowStart, t.rowIndex ?? n.rowStart),
3977
3980
  colStart: Math.min(e.colIndex ?? n.colStart, t.colIndex ?? n.colStart),
3978
3981
  rowEnd: Math.max(e.rowIndex ?? n.rowEnd, t.rowIndex ?? n.rowEnd),
3979
3982
  colEnd: Math.max(e.colIndex ?? n.colEnd, t.colIndex ?? n.colEnd)
3980
- }, this._getBounds()), l = this._coords, i = this._activeIndex(), a = i >= 0 ? l.ranges.map((e, t) => t === i ? o : e) : [o], s = Ur(l.cell, o);
3983
+ }, this._getBounds()), l = this._coords, i = this._activeIndex(), a = i >= 0 ? l.ranges.map((e, t) => t === i ? o : e) : [o], s = jr(l.cell, o);
3981
3984
  this.setSelection({
3982
3985
  cell: s,
3983
3986
  ranges: a,
@@ -3985,7 +3988,7 @@ var Hr = 1, Kr = -10, _r = class {
3985
3988
  });
3986
3989
  }
3987
3990
  append(e, t = e) {
3988
- const n = Wr({
3991
+ const n = Ur({
3989
3992
  rowStart: Math.min(e.rowIndex, t.rowIndex),
3990
3993
  colStart: Math.min(e.colIndex, t.colIndex),
3991
3994
  rowEnd: Math.max(e.rowIndex, t.rowIndex),
@@ -4061,64 +4064,64 @@ var Hr = 1, Kr = -10, _r = class {
4061
4064
  this.listeners.delete(e);
4062
4065
  };
4063
4066
  }
4064
- }, Wr = (e, t) => ({
4067
+ }, Ur = (e, t) => ({
4065
4068
  rowStart: ge(e.rowStart, t.rowStart, t.rowEnd),
4066
4069
  colStart: ge(e.colStart, t.colStart, t.colEnd),
4067
4070
  rowEnd: ge(e.rowEnd, t.rowStart, t.rowEnd),
4068
4071
  colEnd: ge(e.colEnd, t.colStart, t.colEnd)
4069
- }), Ur = (e, t) => ({
4072
+ }), jr = (e, t) => ({
4070
4073
  rowIndex: ge(e.rowIndex, t.rowStart, t.rowEnd),
4071
4074
  colIndex: ge(e.colIndex, t.colStart, t.colEnd)
4072
- }), jr = {
4075
+ }), Gr = {
4073
4076
  rowStart: 0,
4074
4077
  colStart: 0,
4075
4078
  rowEnd: Number.MAX_SAFE_INTEGER,
4076
4079
  colEnd: Number.MAX_SAFE_INTEGER
4077
- }, Gr = "var(--sxl-color-primary, rgb(33, 115, 70))", Xr = "var(--sxl-color-base-100, rgb(255, 255, 255))", Yr = "var(--sxl-color-warning, rgb(255, 0, 0))", qr = (e) => `color-mix(in srgb, var(--sxl-color-primary, rgb(33, 115, 70)) ${e}%, transparent)`, Zr = {
4078
- fill: { fill: qr(10) },
4080
+ }, Xr = "var(--sxl-color-primary, rgb(33, 115, 70))", Yr = "var(--sxl-color-base-100, rgb(255, 255, 255))", qr = "var(--sxl-color-warning, rgb(255, 0, 0))", Zr = (e) => `color-mix(in srgb, var(--sxl-color-primary, rgb(33, 115, 70)) ${e}%, transparent)`, Jr = {
4081
+ fill: { fill: Zr(10) },
4079
4082
  border: {
4080
- stroke: Gr,
4083
+ stroke: Xr,
4081
4084
  alignWidth: 2,
4082
4085
  style: { filter: "drop-shadow(1px 1px 0.3px var(--sxl-color-shadow, rgba(0, 0, 0, 0.24)))" }
4083
4086
  },
4084
4087
  inner: {
4085
- stroke: Xr,
4088
+ stroke: Yr,
4086
4089
  alignWidth: 2,
4087
4090
  inset: 1
4088
4091
  }
4089
- }, Jr = {
4090
- fill: { fill: qr(6) },
4092
+ }, Qr = {
4093
+ fill: { fill: Zr(6) },
4091
4094
  border: {
4092
- stroke: Gr,
4095
+ stroke: Xr,
4093
4096
  alignWidth: 1
4094
4097
  },
4095
4098
  inner: {
4096
- stroke: Xr,
4099
+ stroke: Yr,
4097
4100
  alignWidth: 1,
4098
4101
  inset: 1
4099
4102
  }
4100
- }, Qr = {
4101
- stroke: Gr,
4103
+ }, eo = {
4104
+ stroke: Xr,
4102
4105
  alignWidth: 1,
4103
4106
  inset: 2
4104
- }, eo = {
4105
- fill: { fill: `color-mix(in srgb, ${Yr} 10%, transparent)` },
4107
+ }, to = {
4108
+ fill: { fill: `color-mix(in srgb, ${qr} 10%, transparent)` },
4106
4109
  border: {
4107
- stroke: Yr,
4110
+ stroke: qr,
4108
4111
  alignWidth: 2
4109
4112
  }
4110
- }, to = {
4111
- color: Gr,
4112
- refusedColor: Yr,
4113
+ }, no = {
4114
+ color: Xr,
4115
+ refusedColor: qr,
4113
4116
  alignWidth: 3,
4114
4117
  capExtent: 3,
4115
4118
  transitionDuration: 100,
4116
4119
  transitionEasing: "cubic-bezier(0.16, 1, 0.3, 1)",
4117
4120
  axisDuration: 70
4118
- }, no = { fill: { fill: `color-mix(in srgb, ${Xr} 62%, transparent)` } }, ro = (e, t) => {
4119
- const n = Je(), r = t?.allowDeselect ?? !0, o = t?.allowMulti ?? !0, l = f(null), [i, a] = p(null), s = f(t?.onSelectionEnd);
4121
+ }, ro = { fill: { fill: `color-mix(in srgb, ${Yr} 62%, transparent)` } }, oo = (e, t) => {
4122
+ const n = Qe(), r = t?.allowDeselect ?? !0, o = t?.allowMulti ?? !0, l = f(null), [i, a] = p(null), s = f(t?.onSelectionEnd);
4120
4123
  s.current = t?.onSelectionEnd;
4121
- const c = Un((t, i) => {
4124
+ const c = jn((t, i) => {
4122
4125
  if ("touch" === i.pointerType) {
4123
4126
  const t = n.getScrollTopLeft(), r = {
4124
4127
  x: i.clientX,
@@ -4141,8 +4144,8 @@ var Hr = 1, Kr = -10, _r = class {
4141
4144
  }
4142
4145
  };
4143
4146
  }
4144
- if (0 === i.button && !i.shiftKey && !i.ctrlKey && !i.metaKey && mr(i.target)) {
4145
- const r = wr(i.target) ?? t;
4147
+ if (0 === i.button && !i.shiftKey && !i.ctrlKey && !i.metaKey && wr(i.target)) {
4148
+ const r = xr(i.target) ?? t;
4146
4149
  return e.setSelection({
4147
4150
  cell: r,
4148
4151
  ranges: W.EmptyRanges,
@@ -4213,15 +4216,15 @@ var Hr = 1, Kr = -10, _r = class {
4213
4216
  removePreview: i,
4214
4217
  dragMode: c.dragMode
4215
4218
  };
4216
- }, oo = "selection-grip-drag", lo = (e, t) => void 0 === t ? e : null === t ? null : {
4219
+ }, lo = "selection-grip-drag", io = (e, t) => void 0 === t ? e : null === t ? null : {
4217
4220
  ...e,
4218
4221
  ...t
4219
- }, io = (e, t) => t ? {
4220
- fill: lo(e.fill, t.fill),
4221
- border: lo(e.border, t.border),
4222
- inner: lo(e.inner, t.inner)
4223
- } : e, ao = (e) => {
4224
- const { selection: t } = e, n = Qe(), o = go(z(t, (e) => e.getSelection())), l = n ? ue(n.getAllPanes()) ?? n : void 0, i = ((e, t, n) => {
4222
+ }, ao = (e, t) => t ? {
4223
+ fill: io(e.fill, t.fill),
4224
+ border: io(e.border, t.border),
4225
+ inner: io(e.inner, t.inner)
4226
+ } : e, so = (e) => {
4227
+ const { selection: t } = e, n = et(), o = ho(z(t, (e) => e.getSelection())), l = n ? ue(n.getAllPanes()) ?? n : void 0, i = ((e, t, n) => {
4225
4228
  const r = !!t && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd, o = !!t && e.colStart === t.colStart && e.colEnd === t.colEnd;
4226
4229
  if (r && o) return [];
4227
4230
  if (r) {
@@ -4315,7 +4318,7 @@ var Hr = 1, Kr = -10, _r = class {
4315
4318
  },
4316
4319
  axis: "both"
4317
4320
  }];
4318
- })(o, n?.getTotalRange(), l?.getVisibleRange()), [a, s] = p(!1), d = nt(oo, null), u = f(null);
4321
+ })(o, n?.getTotalRange(), l?.getVisibleRange()), [a, s] = p(!1), d = rt(lo, null), u = f(null);
4319
4322
  c(() => () => {
4320
4323
  u.current?.dispose(), d(null);
4321
4324
  }, [d]);
@@ -4331,13 +4334,13 @@ var Hr = 1, Kr = -10, _r = class {
4331
4334
  } : {
4332
4335
  x: !0,
4333
4336
  y: !0
4334
- }, c = t.getSelection(), g = Wn(e, () => (s(!0), d(i), {
4337
+ }, c = t.getSelection(), g = Un(e, () => (s(!0), d(i), {
4335
4338
  dragMode: "grip",
4336
4339
  drag: (e) => {
4337
4340
  const n = "col" === l ? { colIndex: e.colIndex } : "row" === l ? { rowIndex: e.rowIndex } : e;
4338
4341
  t.modify(n, o);
4339
4342
  },
4340
- edgeScroll: (t) => Nn(e, t, a),
4343
+ edgeScroll: (t) => Bn(e, t, a),
4341
4344
  end: () => {
4342
4345
  s(!1), d(null);
4343
4346
  },
@@ -4347,24 +4350,24 @@ var Hr = 1, Kr = -10, _r = class {
4347
4350
  }), void 0, (t, n) => (e.getPaneFromPointer(t, n) ?? e).getCellFromPointer(t, n));
4348
4351
  u.current = g, g.start(r, r.currentTarget);
4349
4352
  };
4350
- return x(w, { children: i.map((e) => x(co, {
4353
+ return x(w, { children: i.map((e) => x(uo, {
4351
4354
  spec: e,
4352
4355
  dragging: a,
4353
4356
  onBeginDrag: g
4354
4357
  }, e.key)) });
4355
4358
  };
4356
- ao.displayName = "SelectionTouchGrips";
4357
- var so = {
4359
+ so.displayName = "SelectionTouchGrips";
4360
+ var co = {
4358
4361
  side: "slide",
4359
4362
  align: "slide"
4360
- }, co = (e) => {
4363
+ }, uo = (e) => {
4361
4364
  const { spec: t, dragging: n, onBeginDrag: r } = e;
4362
- return x(Tt, {
4365
+ return x(zt, {
4363
4366
  anchor: { cell: t.cell },
4364
4367
  placement: t.placement,
4365
4368
  whenOff: "hide",
4366
- whenPartial: so,
4367
- children: (e) => e.slid ? null : x(uo, {
4369
+ whenPartial: co,
4370
+ children: (e) => e.slid ? null : x(go, {
4368
4371
  state: e,
4369
4372
  dragging: n,
4370
4373
  pin: t.pin,
@@ -4373,7 +4376,7 @@ var so = {
4373
4376
  }
4374
4377
  })
4375
4378
  });
4376
- }, uo = (e) => {
4379
+ }, go = (e) => {
4377
4380
  const { state: t, dragging: n, pin: r, onBeginDrag: o } = e, l = f({
4378
4381
  state: t,
4379
4382
  pin: r
@@ -4454,33 +4457,33 @@ var so = {
4454
4457
  } })
4455
4458
  })
4456
4459
  });
4457
- }, go = (e) => {
4460
+ }, ho = (e) => {
4458
4461
  const { ranges: t, rangeIndex: n, cell: r } = e;
4459
4462
  if (t && t.length > 0) {
4460
4463
  const e = n ?? -1;
4461
4464
  return t[e >= 0 ? e : t.length - 1];
4462
4465
  }
4463
4466
  return W.cellToRange(r);
4464
- }, ho = [
4467
+ }, fo = [
4465
4468
  j.Left,
4466
4469
  j.Right,
4467
4470
  j.Up,
4468
4471
  j.Down
4469
- ], fo = {
4472
+ ], po = {
4470
4473
  [j.Left]: "ArrowLeft",
4471
4474
  [j.Right]: "ArrowRight",
4472
4475
  [j.Up]: "ArrowUp",
4473
4476
  [j.Down]: "ArrowDown"
4474
- }, po = {
4477
+ }, mo = {
4475
4478
  [j.Left]: "Left",
4476
4479
  [j.Right]: "Right",
4477
4480
  [j.Up]: "Up",
4478
4481
  [j.Down]: "Down"
4479
4482
  };
4480
- var mo = {
4483
+ var wo = {
4481
4484
  side: "b",
4482
4485
  align: "end"
4483
- }, wo = (e, t, n) => {
4486
+ }, xo = (e, t, n) => {
4484
4487
  const r = e.rowStart <= t.rowStart && e.rowEnd >= t.rowEnd;
4485
4488
  return r === (e.colStart <= t.colStart && e.colEnd >= t.colEnd) ? null : r ? {
4486
4489
  side: n ? "r" : "l",
@@ -4489,7 +4492,7 @@ var mo = {
4489
4492
  side: n ? "b" : "t",
4490
4493
  align: "start"
4491
4494
  };
4492
- }, xo = { display: "contents" }, vo = (e, t, n, r) => {
4495
+ }, vo = { display: "contents" }, yo = (e, t, n, r) => {
4493
4496
  const { edge: o } = n, l = t.rowStart + n.cell.rowIndex - e.rowStart, i = t.colStart + n.cell.colIndex - e.colStart, a = r.boundsOf(t), s = r.boundsOf({
4494
4497
  rowStart: l,
4495
4498
  rowEnd: l,
@@ -4513,10 +4516,10 @@ var mo = {
4513
4516
  side: p ? "b" : "t",
4514
4517
  align: w
4515
4518
  };
4516
- }, yo = {
4519
+ }, bo = {
4517
4520
  row: "b",
4518
4521
  col: "r"
4519
- }, bo = (e, t) => {
4522
+ }, So = (e, t) => {
4520
4523
  const n = t.rowStart, r = t.colStart;
4521
4524
  return e ? {
4522
4525
  row: n > e.rowAt ? "b" : n < e.rowAt ? "t" : e.row,
@@ -4524,19 +4527,19 @@ var mo = {
4524
4527
  rowAt: n,
4525
4528
  colAt: r
4526
4529
  } : {
4527
- ...yo,
4530
+ ...bo,
4528
4531
  rowAt: n,
4529
4532
  colAt: r
4530
4533
  };
4531
- }, So = e.forwardRef((t, n) => {
4532
- const { selection: r, getContentBounds: o, getRegionBounds: l, scrollIntoView: i, singleStyle: a, multiStyle: s, multiAnchorStyle: c, singleAnchorStyle: d, removePreviewStyle: u, insertBarStyle: g, isDropRefused: h, snapMoveDestination: f, moveSourceStyle: p, singleLayer: m, multiLayer: y, enabledMove: b, onMove: S, onMoveStart: C, onMoveUpdate: I, onMoveEnd: P, moveCursor: R, enableFill: M, snapFillDestination: D, onFill: k, onFillStart: T, onFillPreview: O, onFillEnd: L, onFillMenu: $, resolveFillExtent: A, onEdgeDoubleClick: F, onSelectionEnd: N, onDragModeChange: B, externalDrag: V = !1, renderTip: H, tipPlacement: K, disableKeyboard: U, anchorHole: X = !0, ...Y } = t, q = z(r, (e) => e.getSelection()), Z = ro(r, { onSelectionEnd: N }), J = e.useRef(B);
4534
+ }, Eo = e.forwardRef((t, n) => {
4535
+ const { selection: r, getContentBounds: o, getRegionBounds: l, scrollIntoView: i, singleStyle: a, multiStyle: s, multiAnchorStyle: c, singleAnchorStyle: d, removePreviewStyle: u, insertBarStyle: g, isDropRefused: h, snapMoveDestination: f, moveSourceStyle: p, singleLayer: m, multiLayer: y, enabledMove: b, onMove: S, onMoveStart: C, onMoveUpdate: I, onMoveEnd: P, moveCursor: R, enableFill: M, snapFillDestination: D, onFill: k, onFillStart: T, onFillPreview: O, onFillEnd: L, onFillMenu: $, resolveFillExtent: A, onEdgeDoubleClick: F, onSelectionEnd: N, onDragModeChange: B, externalDrag: V = !1, renderTip: H, tipPlacement: K, disableKeyboard: U, anchorHole: X = !0, ...Y } = t, q = z(r, (e) => e.getSelection()), Z = oo(r, { onSelectionEnd: N }), J = e.useRef(B);
4533
4536
  J.current = B, e.useEffect(() => {
4534
4537
  J.current?.(Z.dragMode);
4535
4538
  }, [Z.dragMode]);
4536
4539
  const [Q, ee] = e.useState(null), te = e.useRef(null), ne = e.useRef(null), re = e.useRef(null), le = e.useRef({
4537
4540
  width: 0,
4538
4541
  height: 0
4539
- }), ie = Je(), ae = e.useRef(r);
4542
+ }), ie = Qe(), ae = e.useRef(r);
4540
4543
  ae.current = r;
4541
4544
  const se = e.useRef(ie);
4542
4545
  se.current = ie;
@@ -4637,8 +4640,8 @@ var mo = {
4637
4640
  run: n
4638
4641
  });
4639
4642
  }, b = E.Shift, S = E.Ctrl, C = E.Alt;
4640
- for (const e of ho) {
4641
- const t = po[e], n = fo[e];
4643
+ for (const e of fo) {
4644
+ const t = mo[e], n = po[e];
4642
4645
  y(`move${t}`, { key: n }, () => f(e, !1)), y(`select${t}`, {
4643
4646
  key: n,
4644
4647
  modifiers: [b]
@@ -4763,15 +4766,15 @@ var mo = {
4763
4766
  getRegionBounds: (e) => de.current?.(e) ?? null
4764
4767
  }), []);
4765
4768
  e.useImperativeHandle(n, () => ge, [ge]);
4766
- const he = !!q.ranges && q.ranges.length > 0, fe = he ? [...q.ranges] : [W.cellToRange(q.cell)], pe = fe.length > 1, me = q.rangeIndex ?? -1, we = he ? me >= 0 ? me : fe.length - 1 : 0, xe = fe[we] ?? W.cellToRange(q.cell), ve = ie.getRangeFromCell(q.cell), ye = W.intersectRanges(ve, xe) ?? W.cellToRange(q.cell), be = fe.filter((e, t) => t !== we), Se = pe ? io(Jr, s) : io(Zr, a), Ee = {
4767
- ...Qr,
4769
+ const he = !!q.ranges && q.ranges.length > 0, fe = he ? [...q.ranges] : [W.cellToRange(q.cell)], pe = fe.length > 1, me = q.rangeIndex ?? -1, we = he ? me >= 0 ? me : fe.length - 1 : 0, xe = fe[we] ?? W.cellToRange(q.cell), ve = ie.getRangeFromCell(q.cell), ye = W.intersectRanges(ve, xe) ?? W.cellToRange(q.cell), be = fe.filter((e, t) => t !== we), Se = pe ? ao(Qr, s) : ao(Jr, a), Ee = {
4770
+ ...eo,
4768
4771
  ...c
4769
- }, Ce = io(eo, u), { refusedColor: Ie, ...Pe } = {
4770
- ...to,
4772
+ }, Ce = ao(to, u), { refusedColor: Ie, ...Pe } = {
4773
+ ...no,
4771
4774
  ...g
4772
- }, Re = null === p ? null : io(no, p), Me = (e, t) => {
4775
+ }, Re = null === p ? null : ao(ro, p), Me = (e, t) => {
4773
4776
  const n = t.mods.shiftKey ? t.insert : null, r = t.mods.ctrlKey || t.mods.metaKey, o = {
4774
- to: n ? or(e, n, ie.getTotalRange()) : e,
4777
+ to: n ? lr(e, n, ie.getTotalRange()) : e,
4775
4778
  copy: r,
4776
4779
  insert: n?.axis
4777
4780
  };
@@ -4786,7 +4789,7 @@ var mo = {
4786
4789
  ranges: i,
4787
4790
  rangeIndex: l
4788
4791
  });
4789
- }, [ke] = tt(oo, null), Te = "extend" === Z.dragMode || null !== ke || V, ze = Q ?? (Te ? {
4792
+ }, [ke] = nt(lo, null), Te = "extend" === Z.dragMode || null !== ke || V, ze = Q ?? (Te ? {
4790
4793
  kind: "select",
4791
4794
  range: xe
4792
4795
  } : null), Oe = ze && H ? H(ze) : null, Le = {
@@ -4800,16 +4803,16 @@ var mo = {
4800
4803
  }))(o, t);
4801
4804
  return {
4802
4805
  range: o,
4803
- placement: wo(o, r, o.rowStart <= r.rowStart && o.rowEnd >= r.rowEnd ? "end" === l.align : "b" === l.side) ?? l
4806
+ placement: xo(o, r, o.rowStart <= r.rowStart && o.rowEnd >= r.rowEnd ? "end" === l.align : "b" === l.side) ?? l
4804
4807
  };
4805
4808
  }
4806
4809
  if ("fill" === e.kind) {
4807
- const { template: t, destination: n } = e, o = wo(n, r, n.rowEnd > t.rowEnd || n.colEnd > t.colEnd);
4810
+ const { template: t, destination: n } = e, o = xo(n, r, n.rowEnd > t.rowEnd || n.colEnd > t.colEnd);
4808
4811
  if (o) return {
4809
4812
  range: n,
4810
4813
  placement: o
4811
4814
  };
4812
- let l = mo;
4815
+ let l = wo;
4813
4816
  return n.rowEnd > t.rowEnd ? l = {
4814
4817
  side: "r",
4815
4818
  align: "end"
@@ -4865,20 +4868,20 @@ var mo = {
4865
4868
  align: "start"
4866
4869
  }
4867
4870
  };
4868
- const c = wo(a, r, "left" !== l?.edge && "top" !== l?.edge);
4871
+ const c = xo(a, r, "left" !== l?.edge && "top" !== l?.edge);
4869
4872
  return c ? {
4870
4873
  range: a,
4871
4874
  placement: c
4872
4875
  } : l && i ? {
4873
4876
  range: a,
4874
- placement: vo(e.from, a, l, i)
4877
+ placement: yo(e.from, a, l, i)
4875
4878
  } : {
4876
4879
  range: a,
4877
- placement: mo
4880
+ placement: wo
4878
4881
  };
4879
- })(ze, ye, ke, ie.getTotalRange(), te.current ?? yo, ne.current, Le) : {
4882
+ })(ze, ye, ke, ie.getTotalRange(), te.current ?? bo, ne.current, Le) : {
4880
4883
  range: xe,
4881
- placement: mo
4884
+ placement: wo
4882
4885
  };
4883
4886
  let Ae;
4884
4887
  "move" === ze?.kind && (Ae = ze.drop.insert ? {
@@ -4903,7 +4906,7 @@ var mo = {
4903
4906
  }
4904
4907
  });
4905
4908
  });
4906
- return v(lt, {
4909
+ return v(it, {
4907
4910
  ...Y,
4908
4911
  onPointerDown: Z.onPointerDown,
4909
4912
  onPointerMove: Z.onPointerMove,
@@ -4912,33 +4915,33 @@ var mo = {
4912
4915
  ge.handleKey(e) && (e.preventDefault(), e.stopPropagation());
4913
4916
  },
4914
4917
  children: [
4915
- "move" === Q?.kind && !Q.drop.copy && Re && !W.isEqualRanges(Q.to, Q.from) && Eo(Re, Q.from, void 0, !1, "move-source"),
4918
+ "move" === Q?.kind && !Q.drop.copy && Re && !W.isEqualRanges(Q.to, Q.from) && Co(Re, Q.from, void 0, !1, "move-source"),
4916
4919
  v(w, pe ? { children: [
4917
- be.map((t, n) => x(e.Fragment, { children: Eo(Se, t) }, `other-${n}`)),
4918
- Eo(Se, xe, X ? ye : void 0),
4919
- x(On, {
4920
+ be.map((t, n) => x(e.Fragment, { children: Co(Se, t) }, `other-${n}`)),
4921
+ Co(Se, xe, X ? ye : void 0),
4922
+ x(Ln, {
4920
4923
  className: "anchor",
4921
4924
  range: ye,
4922
4925
  ...Ee
4923
4926
  })
4924
- ] } : { children: [Eo(Se, xe, X ? ye : void 0), d && x(On, {
4927
+ ] } : { children: [Co(Se, xe, X ? ye : void 0), d && x(Ln, {
4925
4928
  className: "anchor",
4926
4929
  range: ye,
4927
4930
  ...d
4928
4931
  })] }),
4929
- !pe && b && x(lr, {
4932
+ !pe && b && x(ir, {
4930
4933
  className: "move-grip",
4931
4934
  range: xe,
4932
4935
  grip: "edges",
4933
4936
  dragCursor: R,
4934
4937
  renderMove: ({ range: e, info: t }) => {
4935
4938
  const n = Me(e, t);
4936
- return n.insert ? x(Ln, {
4939
+ return n.insert ? x($n, {
4937
4940
  range: n.to,
4938
4941
  axis: n.insert,
4939
4942
  ...Pe,
4940
4943
  color: (n.refused ? Ie : void 0) ?? Pe.color
4941
- }) : Se.border && x(On, {
4944
+ }) : Se.border && x(Ln, {
4942
4945
  className: "move-ghost",
4943
4946
  range: n.to,
4944
4947
  ...Se.border,
@@ -4950,7 +4953,7 @@ var mo = {
4950
4953
  onEdgeDoubleClick: F,
4951
4954
  onDragStart: (e, t, n, r) => {
4952
4955
  const o = Me(e, n);
4953
- C?.(e, t, o, r), te.current = bo(null, o.to), ne.current = n.grab, ee({
4956
+ C?.(e, t, o, r), te.current = So(null, o.to), ne.current = n.grab, ee({
4954
4957
  kind: "move",
4955
4958
  from: e,
4956
4959
  to: o.to,
@@ -4959,7 +4962,7 @@ var mo = {
4959
4962
  },
4960
4963
  onDragMove: (e, t, n) => {
4961
4964
  const r = Me(e, n);
4962
- I?.(xe, r.to, t, r), te.current = bo(te.current, r.to), ee({
4965
+ I?.(xe, r.to, t, r), te.current = So(te.current, r.to), ee({
4963
4966
  kind: "move",
4964
4967
  from: xe,
4965
4968
  to: r.to,
@@ -4980,7 +4983,7 @@ var mo = {
4980
4983
  }));
4981
4984
  }
4982
4985
  }),
4983
- !pe && M && x(hr, {
4986
+ !pe && M && x(fr, {
4984
4987
  range: xe,
4985
4988
  snapDestination: D,
4986
4989
  ...Se.border,
@@ -5012,9 +5015,9 @@ var mo = {
5012
5015
  n && !W.isEqualRanges(n, e) && (k?.(e, n, t), De(n));
5013
5016
  } : void 0
5014
5017
  }),
5015
- Z.removePreview && Eo(Ce, Z.removePreview, void 0, !1, "remove-preview"),
5018
+ Z.removePreview && Co(Ce, Z.removePreview, void 0, !1, "remove-preview"),
5016
5019
  Fe,
5017
- H && x(hn, {
5020
+ H && x(fn, {
5018
5021
  name: "selection-gesture",
5019
5022
  active: null !== ze,
5020
5023
  anchor: { range: $e.range },
@@ -5024,7 +5027,7 @@ var mo = {
5024
5027
  glide: Ae,
5025
5028
  children: (Ne = Oe, null == Ne || !1 === Ne || "" === Ne ? Oe : x("span", {
5026
5029
  ref: re,
5027
- style: xo,
5030
+ style: vo,
5028
5031
  children: Oe
5029
5032
  }))
5030
5033
  })
@@ -5032,28 +5035,28 @@ var mo = {
5032
5035
  });
5033
5036
  var Ne;
5034
5037
  });
5035
- So.displayName = "SelectionLayer";
5036
- var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5037
- e.fill && x(On, {
5038
+ Eo.displayName = "SelectionLayer";
5039
+ var Co = (e, t, n, r = !1, o = "range") => v(w, { children: [
5040
+ e.fill && x(Ln, {
5038
5041
  className: `${o} fill`,
5039
5042
  animatedTransition: r,
5040
5043
  range: t,
5041
5044
  hole: n,
5042
5045
  ...e.fill
5043
5046
  }),
5044
- e.inner && x(On, {
5047
+ e.inner && x(Ln, {
5045
5048
  className: `${o} inner`,
5046
5049
  animatedTransition: r,
5047
5050
  range: t,
5048
5051
  ...e.inner
5049
5052
  }),
5050
- e.border && x(On, {
5053
+ e.border && x(Ln, {
5051
5054
  className: `${o} border`,
5052
5055
  animatedTransition: r,
5053
5056
  range: t,
5054
5057
  ...e.border
5055
5058
  })
5056
- ] }), Co = [
5059
+ ] }), Io = [
5057
5060
  "#1a73e8",
5058
5061
  "#d93025",
5059
5062
  "#1e8e3e",
@@ -5061,13 +5064,13 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5061
5064
  "#e37400",
5062
5065
  "#12a4af",
5063
5066
  "#d01884"
5064
- ], Io = Array.from({ length: P }, (e, t) => `var(--sxl-color-series-${t + 1}, ${Co[t]})`), Po = "var(--sxl-color-primary, rgb(0, 120, 215))", Ro = (e, t, n) => ({
5067
+ ], Po = Array.from({ length: P }, (e, t) => `var(--sxl-color-series-${t + 1}, ${Io[t]})`), Ro = "var(--sxl-color-primary, rgb(0, 120, 215))", Mo = (e, t, n) => ({
5065
5068
  rowStart: Math.max(n.rowStart, Math.min(e.rowIndex, t.rowIndex)),
5066
5069
  colStart: Math.max(n.colStart, Math.min(e.colIndex, t.colIndex)),
5067
5070
  rowEnd: Math.min(n.rowEnd, Math.max(e.rowIndex, t.rowIndex)),
5068
5071
  colEnd: Math.min(n.colEnd, Math.max(e.colIndex, t.colIndex))
5069
- }), Mo = (e) => ({ stroke: Io.length ? Io[e % Io.length] : Po }), Do = (e) => {
5070
- const { selection: t, getRangeStyle: n = Mo, anchors: r = ar, enabledMove: o, disableDraw: l, allowMulti: i = !0, size: a, animated: s, renderHandle: d, preserveFocus: u = !0, onDragActiveChange: g, rangeStyle: h = _.EmptyObject, className: m, ...w } = e, y = Je(), b = z(t, (e) => e.getSelection()), S = b.ranges ?? W.EmptyRanges, E = Math.min(Math.max(0, b.rangeIndex ?? S.length - 1), Math.max(0, S.length - 1)), [C, I] = p(null), [P, R] = p(null), [M, D] = p(!1), k = null !== P || M, T = f(g);
5072
+ }), Do = (e) => ({ stroke: Po.length ? Po[e % Po.length] : Ro }), ko = (e) => {
5073
+ const { selection: t, getRangeStyle: n = Do, anchors: r = sr, enabledMove: o, disableDraw: l, allowMulti: i = !0, size: a, animated: s, renderHandle: d, preserveFocus: u = !0, onDragActiveChange: g, rangeStyle: h = _.EmptyObject, className: m, ...w } = e, y = Qe(), b = z(t, (e) => e.getSelection()), S = b.ranges ?? W.EmptyRanges, E = Math.min(Math.max(0, b.rangeIndex ?? S.length - 1), Math.max(0, S.length - 1)), [C, I] = p(null), [P, R] = p(null), [M, D] = p(!1), k = null !== P || M, T = f(g);
5071
5074
  T.current = g, c(() => {
5072
5075
  T.current?.(k, P);
5073
5076
  }, [k, P]), c(() => () => {
@@ -5093,7 +5096,7 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5093
5096
  ...n,
5094
5097
  rangeIndex: e
5095
5098
  });
5096
- }, F = Un((e, t) => {
5099
+ }, F = jn((e, t) => {
5097
5100
  if (0 !== t.button) return null;
5098
5101
  const n = (b.rangeIndex ?? -1) >= 0 ? b.rangeIndex : -1;
5099
5102
  if (t.shiftKey && n >= 0 && S[n]) {
@@ -5101,24 +5104,24 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5101
5104
  rowIndex: S[n].rowStart,
5102
5105
  colIndex: S[n].colStart
5103
5106
  };
5104
- return D(!0), $(n, Ro(t, e, y.getTotalRange())), {
5105
- drag: (e) => $(n, Ro(t, e, y.getTotalRange())),
5107
+ return D(!0), $(n, Mo(t, e, y.getTotalRange())), {
5108
+ drag: (e) => $(n, Mo(t, e, y.getTotalRange())),
5106
5109
  end: () => D(!1),
5107
5110
  captureEvents: !1
5108
5111
  };
5109
5112
  }
5110
5113
  const r = (!t.ctrlKey && !t.metaKey || !i) && n >= 0 ? n : S.length;
5111
5114
  return D(!0), $(r, W.cellToRange(e)), {
5112
- drag: (t) => $(r, Ro(e, t, y.getTotalRange())),
5115
+ drag: (t) => $(r, Mo(e, t, y.getTotalRange())),
5113
5116
  end: () => D(!1),
5114
5117
  captureEvents: !1
5115
5118
  };
5116
5119
  }), N = S.map((e, t) => n(t, t === E)), B = [];
5117
5120
  for (let e = 0; e < N.length; e++) N[e] && B.push(e);
5118
- return v(lt, {
5121
+ return v(it, {
5119
5122
  ...w,
5120
5123
  children: [
5121
- (!l || M) && x(dt, {
5124
+ (!l || M) && x(ut, {
5122
5125
  fill: !0,
5123
5126
  className: Y(m, "ranges-picker-draw"),
5124
5127
  style: { touchAction: "none" },
@@ -5130,7 +5133,7 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5130
5133
  e.stopPropagation(), F.onPointerUp(e);
5131
5134
  }
5132
5135
  }),
5133
- o && B.map((e) => x(lr, {
5136
+ o && B.map((e) => x(ir, {
5134
5137
  range: S[e],
5135
5138
  grip: "edges",
5136
5139
  preserveFocus: u,
@@ -5143,7 +5146,7 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5143
5146
  }, `move-${e}`)),
5144
5147
  B.map((e) => {
5145
5148
  const t = e === E, n = e === O, o = ((e, t, n) => {
5146
- const r = e.stroke ?? h.stroke ?? Po;
5149
+ const r = e.stroke ?? h.stroke ?? Ro;
5147
5150
  return {
5148
5151
  ...h,
5149
5152
  ...e,
@@ -5153,7 +5156,7 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5153
5156
  ...s && t ? { animatedStroke: !0 } : void 0
5154
5157
  };
5155
5158
  })(N[e], t, n);
5156
- return x(cr, {
5159
+ return x(dr, {
5157
5160
  range: S[e],
5158
5161
  anchors: r,
5159
5162
  size: a,
@@ -5173,8 +5176,8 @@ var Eo = (e, t, n, r = !1, o = "range") => v(w, { children: [
5173
5176
  ]
5174
5177
  });
5175
5178
  };
5176
- Do.displayName = "RangesPickerLayer";
5177
- var ko = 0, To = class {
5179
+ ko.displayName = "RangesPickerLayer";
5180
+ var To = 0, zo = class {
5178
5181
  constructor(e, t = {}) {
5179
5182
  this.pending = null, this.cancelled = !1, this.listeners = /* @__PURE__ */ new Set(), this.commitListeners = /* @__PURE__ */ new Set(), this.cancelListeners = /* @__PURE__ */ new Set(), this.editors = /* @__PURE__ */ new Set(), this.activeEditor = null, this.activeEditorId = null, this.auxState = null, this.commitFn = e.commit, this.validateFn = e.validate, this.onCommitError = e.onCommitError, this.state = {
5180
5183
  mode: t.mode ?? "enter",
@@ -5183,7 +5186,7 @@ var ko = 0, To = class {
5183
5186
  dirty: t.dirty,
5184
5187
  initialSelection: t.initialSelection ?? null,
5185
5188
  autoFocus: t.autoFocus ?? !0,
5186
- token: ++ko
5189
+ token: ++To
5187
5190
  };
5188
5191
  }
5189
5192
  getState() {
@@ -5307,7 +5310,7 @@ var ko = 0, To = class {
5307
5310
  notify() {
5308
5311
  this.listeners.forEach((e) => e());
5309
5312
  }
5310
- }, zo = (e) => e.ctrlKey || e.metaKey || e.altKey || e.isComposing ? null : "Process" === e.key || 229 === e.keyCode ? {
5313
+ }, Oo = (e) => e.ctrlKey || e.metaKey || e.altKey || e.isComposing ? null : "Process" === e.key || 229 === e.keyCode ? {
5311
5314
  mode: "enter",
5312
5315
  dirty: ""
5313
5316
  } : 1 === e.key.length ? " " === e.key && e.shiftKey ? null : {
@@ -5316,7 +5319,7 @@ var ko = 0, To = class {
5316
5319
  } : e.shiftKey ? null : "F2" === e.key ? { mode: "edit" } : "Backspace" === e.key ? {
5317
5320
  mode: "enter",
5318
5321
  dirty: ""
5319
- } : null, Oo = (e, t) => {
5322
+ } : null, Lo = (e, t) => {
5320
5323
  const n = f(null);
5321
5324
  return u(() => {
5322
5325
  const t = n.current;
@@ -5324,9 +5327,9 @@ var ko = 0, To = class {
5324
5327
  }, [t]), O((e) => {
5325
5328
  n.current = e;
5326
5329
  }, []);
5327
- }, Lo = (e, t) => {
5330
+ }, $o = (e, t) => {
5328
5331
  if (e.which === S.Enter && t.ctrlKey) return t.shiftKey ? { arrayFixed: !0 } : { broadcast: !0 };
5329
- }, $o = (e) => {
5332
+ }, Ao = (e) => {
5330
5333
  const { mode: t, value: n, onDirtyChange: r, onModeChange: o, onCommit: l, onCancel: i, onNavigate: a, onTraverse: s, setCaret: c } = e;
5331
5334
  return O((e) => {
5332
5335
  const d = e.nativeEvent;
@@ -5343,7 +5346,7 @@ var ko = 0, To = class {
5343
5346
  if (u && "edit" === t) return void e.stopPropagation();
5344
5347
  if (e.which === S.Enter || e.which === S.Tab || u && "enter" === t) {
5345
5348
  e.preventDefault();
5346
- const t = Lo(e, d), n = l(t);
5349
+ const t = $o(e, d), n = l(t);
5347
5350
  if (!1 === n) return void e.stopPropagation();
5348
5351
  if (t) return void e.stopPropagation();
5349
5352
  const r = e.which === S.Enter || e.which === S.Tab, o = e.which === S.Tab ? G.Row : G.Column, i = e.shiftKey, c = r ? null : ((e) => {
@@ -5376,7 +5379,7 @@ var ko = 0, To = class {
5376
5379
  s,
5377
5380
  c
5378
5381
  ]);
5379
- }, Ao = class {
5382
+ }, Fo = class {
5380
5383
  constructor(e, t, n) {
5381
5384
  this.current = null, this.leaveTarget = null, this.listeners = /* @__PURE__ */ new Set(), this.commitErrorListeners = /* @__PURE__ */ new Set(), this.anchor = e, this.createEdit = t, this.revertAnchor = n?.revertAnchor, this.unsubscribeAnchor = e.subscribe(() => this.onAnchorChange());
5382
5385
  }
@@ -5408,7 +5411,7 @@ var ko = 0, To = class {
5408
5411
  startEdit(e, t = {}) {
5409
5412
  const n = this.createEdit(e);
5410
5413
  if (!n) return !1;
5411
- return this.current = new To({
5414
+ return this.current = new zo({
5412
5415
  ...n,
5413
5416
  coords: n.coords ?? e,
5414
5417
  onCommitError: (e) => {
@@ -5434,7 +5437,7 @@ var ko = 0, To = class {
5434
5437
  notify() {
5435
5438
  this.listeners.forEach((e) => e());
5436
5439
  }
5437
- }, Fo = (e, t, n, r = "left", o = 0) => {
5440
+ }, No = (e, t, n, r = "left", o = 0) => {
5438
5441
  if (!t) return null;
5439
5442
  const l = e.getRangeFromCell(t), i = e.getBoundsFromRange(l);
5440
5443
  if (!i) return null;
@@ -5456,7 +5459,7 @@ var ko = 0, To = class {
5456
5459
  },
5457
5460
  inView: a
5458
5461
  };
5459
- }, No = 96 / 72 * 11, Bo = "Calibri, sans-serif", Vo = (e) => {
5462
+ }, Bo = 96 / 72 * 11, Vo = "Calibri, sans-serif", Ho = (e) => {
5460
5463
  const { open: t, mode: n, clean: r, dirty: o, token: l, autoFocus: i, initialSelection: a, zoom: s, readOnly: c, onDirtyChange: d, onModeChange: g, onCommit: h, onCancel: p, onNaturalSize: m } = e, y = o ?? r ?? "", b = f(null), S = f(null), E = f(0);
5461
5464
  u(() => {
5462
5465
  if (!t || !i) return;
@@ -5481,14 +5484,14 @@ var ko = 0, To = class {
5481
5484
  height: e.offsetHeight
5482
5485
  });
5483
5486
  }, [y, m]);
5484
- const I = $o({
5487
+ const I = Ao({
5485
5488
  mode: n,
5486
5489
  value: y,
5487
5490
  onDirtyChange: d,
5488
5491
  onModeChange: g,
5489
5492
  onCommit: h,
5490
5493
  onCancel: p,
5491
- setCaret: Oo(b, y)
5494
+ setCaret: Lo(b, y)
5492
5495
  });
5493
5496
  return v(w, { children: [x("textarea", {
5494
5497
  ref: b,
@@ -5508,8 +5511,8 @@ var ko = 0, To = class {
5508
5511
  resize: "none",
5509
5512
  overflow: "hidden",
5510
5513
  background: "transparent",
5511
- fontFamily: Bo,
5512
- fontSize: No * s + "px",
5514
+ fontFamily: Vo,
5515
+ fontSize: Bo * s + "px",
5513
5516
  lineHeight: 1.2,
5514
5517
  whiteSpace: "pre",
5515
5518
  userSelect: "text"
@@ -5529,15 +5532,15 @@ var ko = 0, To = class {
5529
5532
  visibility: "hidden",
5530
5533
  pointerEvents: "none",
5531
5534
  whiteSpace: "pre",
5532
- fontFamily: Bo,
5533
- fontSize: `${No}px`,
5535
+ fontFamily: Vo,
5536
+ fontSize: `${Bo}px`,
5534
5537
  lineHeight: 1.2
5535
5538
  },
5536
5539
  children: 0 === y.length ? " " : y
5537
5540
  })] });
5538
5541
  };
5539
- function Ho(e) {
5540
- const { editable: t, renderEditor: n, alignment: r = "left", background: o = "var(--sxl-color-base-100, rgb(255, 255, 255))", borderColor: l = "var(--sxl-color-primary, rgb(33, 115, 70))", borderWidth: i = 2, zIndex: a, className: s, style: d, ...u } = e, g = Qe(), h = z(t, (e) => e.getSession()), f = B(h, (e) => e.getState()), [m, w] = p(null), v = O((e) => {
5542
+ function Ko(e) {
5543
+ const { editable: t, renderEditor: n, alignment: r = "left", background: o = "var(--sxl-color-base-100, rgb(255, 255, 255))", borderColor: l = "var(--sxl-color-primary, rgb(33, 115, 70))", borderWidth: i = 2, zIndex: a, className: s, style: d, ...u } = e, g = et(), h = z(t, (e) => e.getSession()), f = B(h, (e) => e.getState()), [m, w] = p(null), v = O((e) => {
5541
5544
  w((t) => t && t.width === e.width && t.height === e.height ? t : e);
5542
5545
  }, []), y = O((e) => {
5543
5546
  const n = t.commit(e);
@@ -5560,7 +5563,7 @@ function Ho(e) {
5560
5563
  rowEnd: e.rowStart,
5561
5564
  colEnd: e.colStart
5562
5565
  })), f) {
5563
- const e = Fo(g, S, m, r, i);
5566
+ const e = No(g, S, m, r, i);
5564
5567
  E = e?.bounds ?? null, C = e?.inView ?? !1;
5565
5568
  } else E = g.getBoundsFromRange(e);
5566
5569
  }
@@ -5589,7 +5592,7 @@ function Ho(e) {
5589
5592
  onCancel: b,
5590
5593
  onNaturalSize: v
5591
5594
  }, k = "function" == typeof o ? (S ? o(S) : void 0) ?? "transparent" : o;
5592
- return x(lt, { children: E ? x(dt, {
5595
+ return x(it, { children: E ? x(ut, {
5593
5596
  ...u,
5594
5597
  className: Y(s, "editor"),
5595
5598
  bounds: E,
@@ -5608,30 +5611,30 @@ function Ho(e) {
5608
5611
  children: n ? x(I, {
5609
5612
  render: n,
5610
5613
  props: D
5611
- }) : x(Vo, { ...D })
5614
+ }) : x(Ho, { ...D })
5612
5615
  }) : null });
5613
5616
  }
5614
- function Ko(e) {
5615
- const { editable: t } = e, n = Qe(), r = O((e) => {
5617
+ function _o(e) {
5618
+ const { editable: t } = e, n = et(), r = O((e) => {
5616
5619
  if (t.getSession()) return;
5617
5620
  const r = n?.getElement();
5618
5621
  if (r && e.target !== r && e.target !== n?.getFocusTarget()) return;
5619
5622
  const o = t.getAnchor().getCoords();
5620
5623
  if (!o) return;
5621
- const l = zo(e.nativeEvent);
5624
+ const l = Oo(e.nativeEvent);
5622
5625
  l && ("Process" !== e.nativeEvent.key && 229 !== e.nativeEvent.keyCode && e.preventDefault(), e.stopPropagation(), t.startEdit(o, l));
5623
5626
  }, [t, n]), o = O((e) => {
5624
5627
  if (t.getSession()) return;
5625
5628
  const r = n?.getCellFromPointer(e.clientX, e.clientY) ?? t.getAnchor().getCoords();
5626
5629
  r && t.startEdit(r, { mode: "edit" });
5627
5630
  }, [n, t]);
5628
- return x(lt, {
5631
+ return x(it, {
5629
5632
  className: "editor-start",
5630
5633
  onKeyDown: r,
5631
5634
  onDoubleClick: o
5632
5635
  });
5633
5636
  }
5634
- function _o(e) {
5637
+ function Wo(e) {
5635
5638
  const { editable: t, renderEditor: n, idleClean: r = null, mapClean: o, editorId: l, readOnly: i, className: a, style: s } = e, c = z(t, (e) => e.getSession()), d = B(c, (e) => e.getState()), u = d?.clean ?? r, g = o ? o(u) : u, h = O((e) => t.commit(e), [t]), p = O(() => t.cancel(), [t]), m = O(() => {
5636
5639
  i || (t.getSession() || t.startEdit(t.getAnchor().getCoords(), {
5637
5640
  mode: "edit",
@@ -5669,11 +5672,11 @@ function _o(e) {
5669
5672
  children: n ? x(I, {
5670
5673
  render: n,
5671
5674
  props: y
5672
- }) : x(Vo, { ...y })
5675
+ }) : x(Ho, { ...y })
5673
5676
  });
5674
5677
  }
5675
- Vo.displayName = "DefaultEditorInput", _o.displayName = "EditorDiv";
5676
- var Wo = "header-divider", Uo = "ew-resize", jo = "ns-resize", Go = "var(--sxl-color-base-100, #f5f5f5)", Xo = "var(--sxl-color-primary, rgb(33, 115, 70))", Yo = (e, t, n, r) => ({
5678
+ Ho.displayName = "DefaultEditorInput", Wo.displayName = "EditorDiv";
5679
+ var Uo = "header-divider", jo = "ew-resize", Go = "ns-resize", Xo = "var(--sxl-color-base-100, #f5f5f5)", Yo = "var(--sxl-color-primary, rgb(33, 115, 70))", qo = (e, t, n, r) => ({
5677
5680
  position: "absolute",
5678
5681
  boxSizing: "border-box",
5679
5682
  left: e ? t - n / 2 : "50%",
@@ -5685,21 +5688,21 @@ var Wo = "header-divider", Uo = "ew-resize", jo = "ns-resize", Go = "var(--sxl-c
5685
5688
  display: "flex",
5686
5689
  alignItems: "center",
5687
5690
  justifyContent: "center"
5688
- }), qo = (e, t) => x("div", {
5691
+ }), Zo = (e, t) => x("div", {
5689
5692
  className: "header-divider-handle",
5690
5693
  style: {
5691
- ...Yo(e, t, 6, 16),
5694
+ ...qo(e, t, 6, 16),
5692
5695
  pointerEvents: "none",
5693
5696
  border: "1px solid var(--sxl-color-neutral, grey)",
5694
- background: Go
5697
+ background: Xo
5695
5698
  }
5696
- }), Zo = i((e) => {
5697
- const { isColumn: t, lineOffset: n, onUnhide: r } = e, [o, l] = p(!1), i = o ? Go : Xo;
5699
+ }), Jo = i((e) => {
5700
+ const { isColumn: t, lineOffset: n, onUnhide: r } = e, [o, l] = p(!1), i = o ? Xo : Yo;
5698
5701
  return x("div", {
5699
5702
  className: "header-divider-unhide",
5700
5703
  role: "button",
5701
5704
  style: {
5702
- ...Yo(t, n, 20, 12),
5705
+ ...qo(t, n, 20, 12),
5703
5706
  ...t ? {
5704
5707
  top: "calc(100% - 4px)",
5705
5708
  height: 12,
@@ -5712,8 +5715,8 @@ var Wo = "header-divider", Uo = "ew-resize", jo = "ns-resize", Go = "var(--sxl-c
5712
5715
  zIndex: 1,
5713
5716
  pointerEvents: "auto",
5714
5717
  cursor: "pointer",
5715
- border: `1px solid ${Xo}`,
5716
- background: o ? Xo : Go
5718
+ border: `1px solid ${Yo}`,
5719
+ background: o ? Yo : Xo
5717
5720
  },
5718
5721
  onPointerEnter: () => l(!0),
5719
5722
  onPointerLeave: () => l(!1),
@@ -5733,8 +5736,8 @@ var Wo = "header-divider", Uo = "ew-resize", jo = "ns-resize", Go = "var(--sxl-c
5733
5736
  })
5734
5737
  });
5735
5738
  });
5736
- Zo.displayName = "UnhideButton";
5737
- var Jo = i(o((e, t) => {
5739
+ Jo.displayName = "UnhideButton";
5740
+ var Qo = i(o((e, t) => {
5738
5741
  const { axis: n, index: r, className: o, style: l, disabled: i = !1, disabledResize: a = !1, isNextHidden: s, isHidden: c, isSelected: d, isSelectedAll: u, showTouchDivider: g, bounds: h, onPointerDown: f, onAutoFit: m, onUnhide: w, isActive: y = !1, onPointerEnter: b, onPointerLeave: S, pane: E, ...I } = e, P = n === G.Column, [R, M] = p(null), D = R === r, k = 1 / C.getDevicePixelRatio(), T = d || u, z = T ? "color-mix(in srgb, var(--sxl-color-primary, rgb(33, 115, 70)) 35%, var(--sxl-color-base-300, rgb(171, 171, 171)))" : "var(--sxl-color-base-300, rgb(171, 171, 171))", O = "var(--sxl-color-base-100, #f5f5f5)", L = "touch" === F();
5739
5742
  let $ = P ? 14 : 8;
5740
5743
  const A = E.getZoom();
@@ -5743,7 +5746,7 @@ var Jo = i(o((e, t) => {
5743
5746
  s && (B = -2), c && (B = 2), c && ($ = $ / 2 + B, N = 2 * B);
5744
5747
  const V = T || 0 !== B ? `linear-gradient(${z}, ${z})` : `linear-gradient(${P ? 180 : 90}deg, ${O}, ${z} 55%, ${z} 100%)`;
5745
5748
  return v("div", {
5746
- className: Y(Wo, { disabled: i }, o, `index-${r}`),
5749
+ className: Y(Uo, { disabled: i }, o, `index-${r}`),
5747
5750
  ref: t,
5748
5751
  onPointerDown: L ? void 0 : f,
5749
5752
  onDoubleClick: L ? void 0 : () => m?.(),
@@ -5764,17 +5767,17 @@ var Jo = i(o((e, t) => {
5764
5767
  backgroundPosition: P ? `${N}px 0` : `0 ${N}px`,
5765
5768
  backgroundRepeat: "no-repeat",
5766
5769
  pointerEvents: "auto",
5767
- cursor: i || a || L ? void 0 : P ? Uo : jo,
5770
+ cursor: i || a || L ? void 0 : P ? jo : Go,
5768
5771
  ...l
5769
5772
  },
5770
5773
  ...I,
5771
- children: [!D && !y || L || i || a ? null : w ? x(Zo, {
5774
+ children: [!D && !y || L || i || a ? null : w ? x(Jo, {
5772
5775
  isColumn: P,
5773
5776
  lineOffset: N,
5774
5777
  onUnhide: () => {
5775
5778
  M(null), w();
5776
5779
  }
5777
- }) : qo(P, N), g && L ? x("div", {
5780
+ }) : Zo(P, N), g && L ? x("div", {
5778
5781
  style: {
5779
5782
  position: "absolute",
5780
5783
  cursor: "grab",
@@ -5805,8 +5808,8 @@ var Jo = i(o((e, t) => {
5805
5808
  } })
5806
5809
  }) : null]
5807
5810
  });
5808
- })), Qo = (e) => x(Jo, { ...e }), el = i(o((e, t) => {
5809
- const { axis: n, index: r, disabled: o = !1, disabledResize: l = !1, resizeThreshold: i = 1, renderDivider: a = Qo, onDividerMouseDown: s, onDividerResizeStart: c, onDividerResize: d, onDividerResizeEnd: u, onDividerMouseUp: g, onDividerAutoFit: h, onDividerUnhide: m, onPointerDown: y, visibleBounds: b, ...S } = e, E = Je(), I = O(y, [y]), P = O(h, [h]), R = n === G.Column, M = void 0 !== b ? b : tl(E, n), D = f(null), [k, T] = p(null), z = (e, t) => R ? e.clientX - t.clientX : e.clientY - t.clientY, L = E.getMetrics(), A = R ? L.getColOffset(r + 1) : L.getRowOffset(r + 1), F = C.getDevicePixelRatio(), N = 1 / F, B = C.snapLineCenter(A, N, F) - N / 2, H = V({
5811
+ })), el = (e) => x(Qo, { ...e }), tl = i(o((e, t) => {
5812
+ const { axis: n, index: r, disabled: o = !1, disabledResize: l = !1, resizeThreshold: i = 1, renderDivider: a = el, onDividerMouseDown: s, onDividerResizeStart: c, onDividerResize: d, onDividerResizeEnd: u, onDividerMouseUp: g, onDividerAutoFit: h, onDividerUnhide: m, onPointerDown: y, visibleBounds: b, ...S } = e, E = Qe(), I = O(y, [y]), P = O(h, [h]), R = n === G.Column, M = void 0 !== b ? b : nl(E, n), D = f(null), [k, T] = p(null), z = (e, t) => R ? e.clientX - t.clientX : e.clientY - t.clientY, L = E.getMetrics(), A = R ? L.getColOffset(r + 1) : L.getRowOffset(r + 1), F = C.getDevicePixelRatio(), N = 1 / F, B = C.snapLineCenter(A, N, F) - N / 2, H = V({
5810
5813
  processTouch: !0,
5811
5814
  onPointerDown: (e) => {
5812
5815
  if (I?.(e), !o && !l) {
@@ -5872,15 +5875,15 @@ var Jo = i(o((e, t) => {
5872
5875
  let U = null;
5873
5876
  return k && k.isResizing && k.index === r && (U = Z(x("div", { style: {
5874
5877
  position: "absolute",
5875
- cursor: R ? Uo : jo,
5878
+ cursor: R ? jo : Go,
5876
5879
  left: 0,
5877
5880
  top: 0,
5878
5881
  width: "100%",
5879
5882
  height: "100%"
5880
5883
  } }), _(), "divider:" + r)), v(w, { children: [U, W] });
5881
5884
  }));
5882
- el.displayName = "HeaderDividerAnchor";
5883
- var tl = (e, t) => {
5885
+ tl.displayName = "HeaderDividerAnchor";
5886
+ var nl = (e, t) => {
5884
5887
  const n = t === G.Column, r = n ? e.getVisibleColumns() : e.getVisibleRows();
5885
5888
  if (0 === r.length) return null;
5886
5889
  const o = r[0].index, l = r[r.length - 1].index, i = n ? e.getBoundsFromRange({
@@ -5895,7 +5898,7 @@ var tl = (e, t) => {
5895
5898
  colEnd: 0
5896
5899
  });
5897
5900
  return e.toClipBounds(i, -10);
5898
- }, nl = (e, t, n, r) => {
5901
+ }, rl = (e, t, n, r) => {
5899
5902
  const o = t ? n : r, l = t ? r : n, i = e.getPanePointFromPointer(o, l), a = t ? e.getPaneBounds().x : e.getPaneBounds().y, s = (i ? t ? i.x : i.y : 0) + a, c = n - s;
5900
5903
  let d = {
5901
5904
  index: 0,
@@ -5923,8 +5926,8 @@ var tl = (e, t) => {
5923
5926
  snapClient: d.pos + c,
5924
5927
  pointerClient: s < 0 ? void 0 : n
5925
5928
  };
5926
- }, rl = (e) => {
5927
- const { axis: t, disabled: n, isOwner: r } = e, o = Je(), l = t === G.Column, i = O(e.onFreezeDragStart, [e.onFreezeDragStart]), a = O(e.onFreezeDrag, [e.onFreezeDrag]), s = O(e.onFreezeDragEnd, [e.onFreezeDragEnd]), d = O(e.onFreezeDragCancel, [e.onFreezeDragCancel]), u = O(e.onActiveChange, [e.onActiveChange]), [g, h] = p(!1), [m, w] = p(!1), v = f(null), y = (e, t) => l ? nl(o, !0, e.clientX, t.clientY) : nl(o, !1, e.clientY, t.clientX), b = V({
5929
+ }, ol = (e) => {
5930
+ const { axis: t, disabled: n, isOwner: r } = e, o = Qe(), l = t === G.Column, i = O(e.onFreezeDragStart, [e.onFreezeDragStart]), a = O(e.onFreezeDrag, [e.onFreezeDrag]), s = O(e.onFreezeDragEnd, [e.onFreezeDragEnd]), d = O(e.onFreezeDragCancel, [e.onFreezeDragCancel]), u = O(e.onActiveChange, [e.onActiveChange]), [g, h] = p(!1), [m, w] = p(!1), v = f(null), y = (e, t) => l ? rl(o, !0, e.clientX, t.clientY) : rl(o, !1, e.clientY, t.clientX), b = V({
5928
5931
  processTouch: !0,
5929
5932
  onPointerDown: (e) => {
5930
5933
  if (e.stopPropagation(), e.preventDefault(), n) return !1;
@@ -5978,8 +5981,8 @@ var tl = (e, t) => {
5978
5981
  },
5979
5982
  backdrop: I
5980
5983
  };
5981
- }, ol = i((e) => {
5982
- const { axis: t, disabled: n = !1, highlight: r = !1, onFreezeDragStart: o, onFreezeDrag: l, onFreezeDragEnd: i, onFreezeDragCancel: a, onActiveChange: s } = e, c = Je(), d = t === G.Column, u = d ? K.Left : K.Top, g = !!c.getAllPanes()[u], h = g ? c.getAnchor() === u : c === ue(c.getAllPanes()), { isActive: f, cursor: p, hitProps: m, backdrop: y } = rl({
5984
+ }, ll = i((e) => {
5985
+ const { axis: t, disabled: n = !1, highlight: r = !1, onFreezeDragStart: o, onFreezeDrag: l, onFreezeDragEnd: i, onFreezeDragCancel: a, onActiveChange: s } = e, c = Qe(), d = t === G.Column, u = d ? K.Left : K.Top, g = !!c.getAllPanes()[u], h = g ? c.getAnchor() === u : c === ue(c.getAllPanes()), { isActive: f, cursor: p, hitProps: m, backdrop: y } = ol({
5983
5986
  axis: t,
5984
5987
  disabled: n,
5985
5988
  isOwner: h,
@@ -5990,7 +5993,7 @@ var tl = (e, t) => {
5990
5993
  onActiveChange: s
5991
5994
  });
5992
5995
  if (!h) return null;
5993
- const b = g ? d ? c.getPaneBounds().width : c.getPaneBounds().height : 0, S = g ? b - 3 : 0, E = g ? b : f ? 1 : 0, C = g || f ? 0 : 2, I = g || f ? 2 : 3, P = (d ? c.getPaneBounds().height : c.getPaneBounds().width) - C, R = f || r && !n ? "var(--sxl-color-primary, rgb(33, 115, 70))" : "var(--sxl-color-neutral, grey)";
5996
+ const b = g ? d ? c.getPaneBounds().width : c.getPaneBounds().height : 0, S = g ? b - 3 : 0, E = g ? b : f ? 1 : 0, C = g || f ? 0 : 1, I = g || f ? 2 : 3, P = (d ? c.getPaneBounds().height : c.getPaneBounds().width) - C, R = f || r && !n ? "var(--sxl-color-primary, rgb(33, 115, 70))" : "var(--sxl-color-neutral, grey)";
5994
5997
  return v(w, { children: [
5995
5998
  y,
5996
5999
  x("div", {
@@ -6038,9 +6041,9 @@ var tl = (e, t) => {
6038
6041
  })
6039
6042
  ] });
6040
6043
  });
6041
- ol.displayName = "HeaderFreezeAnchor";
6042
- var ll = i((e) => {
6043
- const { axis: t, disabled: n = !1, onFreezeDragStart: r, onFreezeDrag: o, onFreezeDragEnd: l, onFreezeDragCancel: i, onActiveChange: a } = e, s = Je(), c = t === G.Column, d = s.getAnchor(), u = d === K.TopLeft || d === (c ? K.Left : K.Top), { cursor: g, hitProps: h, backdrop: f } = rl({
6044
+ ll.displayName = "HeaderFreezeAnchor";
6045
+ var il = i((e) => {
6046
+ const { axis: t, disabled: n = !1, onFreezeDragStart: r, onFreezeDrag: o, onFreezeDragEnd: l, onFreezeDragCancel: i, onActiveChange: a } = e, s = Qe(), c = t === G.Column, d = s.getAnchor(), u = d === K.TopLeft || d === (c ? K.Left : K.Top), { cursor: g, hitProps: h, backdrop: f } = ol({
6044
6047
  axis: t,
6045
6048
  disabled: n,
6046
6049
  isOwner: u,
@@ -6067,26 +6070,26 @@ var ll = i((e) => {
6067
6070
  }
6068
6071
  })] });
6069
6072
  });
6070
- ll.displayName = "GridFreezeAnchor";
6071
- var il = (e, t, n) => t === G.Column ? {
6073
+ il.displayName = "GridFreezeAnchor";
6074
+ var al = (e, t, n) => t === G.Column ? {
6072
6075
  rowIndex: n.rowStart,
6073
6076
  colIndex: e.colIndex
6074
6077
  } : {
6075
6078
  rowIndex: e.rowIndex,
6076
6079
  colIndex: n.colStart
6077
- }, al = (e, t, n) => t === G.Column ? {
6080
+ }, sl = (e, t, n) => t === G.Column ? {
6078
6081
  rowIndex: n.rowEnd,
6079
6082
  colIndex: e.colIndex
6080
6083
  } : {
6081
6084
  rowIndex: e.rowIndex,
6082
6085
  colIndex: n.colEnd
6083
- }, sl = (e, t, n) => t === G.Column ? {
6086
+ }, cl = (e, t, n) => t === G.Column ? {
6084
6087
  rowIndex: n.rowStart,
6085
6088
  colIndex: e.colIndex
6086
6089
  } : {
6087
6090
  rowIndex: e.rowIndex,
6088
6091
  colIndex: n.colStart
6089
- }, cl = (e, t, n, r) => n === G.Column ? {
6092
+ }, dl = (e, t, n, r) => n === G.Column ? {
6090
6093
  rowStart: r.rowStart,
6091
6094
  rowEnd: r.rowEnd,
6092
6095
  colStart: Math.min(e.colIndex, t.colIndex),
@@ -6096,7 +6099,7 @@ var il = (e, t, n) => t === G.Column ? {
6096
6099
  colEnd: r.colEnd,
6097
6100
  rowStart: Math.min(e.rowIndex, t.rowIndex),
6098
6101
  rowEnd: Math.max(e.rowIndex, t.rowIndex)
6099
- }, dl = (e, t, n) => {
6102
+ }, ul = (e, t, n) => {
6100
6103
  const r = "function" == typeof t ? t : () => t;
6101
6104
  let o = null, l = null, i = 0;
6102
6105
  const a = () => ue(r().getAllPanes()) ?? r(), s = (t, n, r) => {
@@ -6140,21 +6143,21 @@ var il = (e, t, n) => t === G.Column ? {
6140
6143
  let i = null;
6141
6144
  return t === G.Column ? e.x >= o.right - 24 && l.colEnd < r.colEnd ? i = { colIndex: l.colEnd + 1 } : e.x <= o.left + 24 && l.colStart > r.colStart && (i = { colIndex: l.colStart - 1 }) : e.y >= o.bottom - 24 && l.rowEnd < r.rowEnd ? i = { rowIndex: l.rowEnd + 1 } : e.y <= o.top + 24 && l.rowStart > r.rowStart && (i = { rowIndex: l.rowStart - 1 }), !!i && (d(i), !0);
6142
6145
  }, g = (e) => {
6143
- const { axis: t, entireRange: r, replaceActive: d = !1 } = n(), u = cl(o ?? e, e, t, r), g = l ?? sl(e, t, a().getVisibleRange());
6146
+ const { axis: t, entireRange: r, replaceActive: d = !1 } = n(), u = dl(o ?? e, e, t, r), g = l ?? cl(e, t, a().getVisibleRange());
6144
6147
  d ? c(i, u, g) : s(u, g, "replace");
6145
6148
  };
6146
- return _n(r, (t, r) => {
6149
+ return Wn(r, (t, r) => {
6147
6150
  if (!e) return null;
6148
6151
  const h = 0 === r.button, f = 2 === r.button;
6149
6152
  if (!h && !f) return null;
6150
6153
  const { axis: p, entireRange: m, allowMulti: w = !0, replaceActive: x = !1, preserveFocus: v = !1, onPointerDownInterceptor: y, onDragStart: b, onDragEnd: S, onPointerUp: E } = n();
6151
6154
  if (!1 === y?.(r, t)) return null;
6152
6155
  x && r.stopPropagation(), v && h && r.preventDefault(), b?.();
6153
- const C = sl(t, p, a().getVisibleRange()), I = r.shiftKey, P = (r.ctrlKey || r.metaKey) && w;
6156
+ const C = cl(t, p, a().getVisibleRange()), I = r.shiftKey, P = (r.ctrlKey || r.metaKey) && w;
6154
6157
  if (x) {
6155
6158
  const n = e.getSelection(), r = n.ranges ?? [], a = n.rangeIndex ?? -1;
6156
- I && o ? (i = a >= 0 ? a : Math.max(0, r.length - 1), c(i, cl(o, t, p, m), l ?? C)) : (o = t, l = C, i = P || a < 0 ? r.length : a, c(i, cl(t, t, p, m), C));
6157
- } else I && o ? s(cl(o, t, p, m), l ?? C, "replace") : P ? (o = t, l = C, s(cl(t, t, p, m), C, "append")) : (o = t, l = C, s(cl(t, t, p, m), C, "clear"));
6159
+ I && o ? (i = a >= 0 ? a : Math.max(0, r.length - 1), c(i, dl(o, t, p, m), l ?? C)) : (o = t, l = C, i = P || a < 0 ? r.length : a, c(i, dl(t, t, p, m), C));
6160
+ } else I && o ? s(dl(o, t, p, m), l ?? C, "replace") : P ? (o = t, l = C, s(dl(t, t, p, m), C, "append")) : (o = t, l = C, s(dl(t, t, p, m), C, "clear"));
6158
6161
  return ((e) => {
6159
6162
  d(n().axis === G.Column ? { colIndex: e.colIndex } : { rowIndex: e.rowIndex });
6160
6163
  })(t), {
@@ -6170,16 +6173,16 @@ var il = (e, t, n) => t === G.Column ? {
6170
6173
  captureEvents: x
6171
6174
  };
6172
6175
  });
6173
- }, ul = (e, t) => {
6174
- const n = Je(), r = O(() => n, [n]), o = f(t);
6176
+ }, gl = (e, t) => {
6177
+ const n = Qe(), r = O(() => n, [n]), o = f(t);
6175
6178
  o.current = t;
6176
- const l = g(() => dl(e, r, () => o.current), [e, r]);
6179
+ const l = g(() => ul(e, r, () => o.current), [e, r]);
6177
6180
  return c(() => () => l.dispose(), [l]), {
6178
6181
  onPointerDown: l.onPointerDown,
6179
6182
  onPointerMove: l.onPointerMove,
6180
6183
  onPointerUp: l.onPointerUp
6181
6184
  };
6182
- }, gl = (e) => null == e ? [] : Array.isArray(e) ? e : [e], hl = i(o((e, t) => {
6185
+ }, hl = (e) => null == e ? [] : Array.isArray(e) ? e : [e], fl = i(o((e, t) => {
6183
6186
  const { rowCount: n = 1, columnCount: r = 1, getRowHeight: o, getColumnWidth: l, metrics: i, renderCells: s, borderLayers: c, showGridLines: d = !0, gridLineColor: u, propsGridLineRows: f, propsGridLineColumns: p, getVisibleCells: m, hiddenCellAt: w, layersBelow: v, children: y, ...b } = e, S = ee({
6184
6187
  rowCount: n,
6185
6188
  columnCount: r,
@@ -6189,19 +6192,19 @@ var il = (e, t, n) => t === G.Column ? {
6189
6192
  I();
6190
6193
  }, []), M = A(t, () => ({ invalidate: R }), [R]), D = g(() => {
6191
6194
  const e = [];
6192
- return !1 !== d && e.push(x(Vr, {
6195
+ return !1 !== d && e.push(x(Hr, {
6193
6196
  showGridLines: d,
6194
6197
  gridLineColor: u,
6195
6198
  propsRows: f,
6196
6199
  propsColumns: p,
6197
6200
  getVisibleCells: m,
6198
6201
  hiddenCellAt: w
6199
- }, "__gridlines")), e.push(...gl(v)), e.push(...gl(c)), s && e.push(x(Dr, {
6202
+ }, "__gridlines")), e.push(...hl(v)), e.push(...hl(c)), s && e.push(x(kr, {
6200
6203
  renderCell: s,
6201
6204
  getVisibleCells: m,
6202
6205
  hiddenCellAt: w,
6203
6206
  cacheToken: P
6204
- }, "__cells")), e.push(...gl(y)), e.push(x(Tn, {}, "__range-tooltips")), e;
6207
+ }, "__cells")), e.push(...hl(y)), e.push(x(zn, {}, "__range-tooltips")), e;
6205
6208
  }, [
6206
6209
  d,
6207
6210
  u,
@@ -6215,7 +6218,7 @@ var il = (e, t, n) => t === G.Column ? {
6215
6218
  P,
6216
6219
  y
6217
6220
  ]);
6218
- return x(Rn, { children: x(He, {
6221
+ return x(Mn, { children: x(Ke, {
6219
6222
  ref: M,
6220
6223
  ...b,
6221
6224
  rowCount: n,
@@ -6224,16 +6227,16 @@ var il = (e, t, n) => t === G.Column ? {
6224
6227
  children: D
6225
6228
  }) });
6226
6229
  }));
6227
- hl.displayName = "Grid";
6228
- var fl, pl = {
6230
+ fl.displayName = "Grid";
6231
+ var pl, ml = {
6229
6232
  fill: { fill: "color-mix(in srgb, var(--sxl-color-primary, rgb(0, 120, 215)) 14%, transparent)" },
6230
6233
  border: null,
6231
6234
  inner: null
6232
- }, ml = {
6235
+ }, wl = {
6233
6236
  stroke: "var(--sxl-color-primary, rgb(0, 120, 215))",
6234
6237
  alignWidth: 1,
6235
6238
  inset: 1
6236
- }, wl = o(function(e, t) {
6239
+ }, xl = o(function(e, t) {
6237
6240
  const { itemCount: n, renderCell: r, getVisibleCells: o, itemHeight: l = 24, contentWidth: i, selection: a, propsLayer: s, autoFocus: d, showScrollbar: u = "auto", scrollTo: h, viewport: p, cacheToken: m, className: w, style: y, children: b, ...S } = e, E = g(() => new M(), []), C = p ?? E, I = z(C, (e) => e.getMetrics()), P = "auto" === u ? I.totalHeight > I.height : u, D = f(null);
6238
6241
  c(() => {
6239
6242
  d && D.current?.focus();
@@ -6251,7 +6254,7 @@ var fl, pl = {
6251
6254
  e = !0, t && cancelAnimationFrame(t), r?.();
6252
6255
  };
6253
6256
  }, [h, C]);
6254
- const k = g(() => new _r({ getBounds: () => ({
6257
+ const k = g(() => new Wr({ getBounds: () => ({
6255
6258
  rowStart: 0,
6256
6259
  colStart: 0,
6257
6260
  rowEnd: Math.max(0, n - 1),
@@ -6289,7 +6292,7 @@ var fl, pl = {
6289
6292
  width: "100%",
6290
6293
  height: "100%"
6291
6294
  },
6292
- children: v(He, {
6295
+ children: v(Ke, {
6293
6296
  ref: D,
6294
6297
  viewport: C,
6295
6298
  style: {
@@ -6300,25 +6303,25 @@ var fl, pl = {
6300
6303
  columnCount: 1,
6301
6304
  metrics: V,
6302
6305
  children: [
6303
- x(So, {
6306
+ x(Eo, {
6304
6307
  selection: T,
6305
6308
  anchorHole: !1,
6306
- singleStyle: pl,
6307
- singleAnchorStyle: ml,
6308
- multiAnchorStyle: ml
6309
+ singleStyle: ml,
6310
+ singleAnchorStyle: wl,
6311
+ multiAnchorStyle: wl
6309
6312
  }, "__selection"),
6310
- x(Dr, {
6313
+ x(kr, {
6311
6314
  renderCell: r,
6312
6315
  getVisibleCells: o,
6313
6316
  cacheToken: m
6314
6317
  }, "__cells"),
6315
- s ? x(lt, { ...s }, "__taps") : null
6318
+ s ? x(it, { ...s }, "__taps") : null
6316
6319
  ]
6317
6320
  })
6318
6321
  })
6319
6322
  })
6320
6323
  });
6321
- }), xl = o(function(e, t) {
6324
+ }), vl = o(function(e, t) {
6322
6325
  const { itemCount: n, renderItem: r, itemHeight: o, selection: l, onKeyDown: i, cacheToken: s, scrollTo: c, autoFocus: d, viewport: u, className: h, style: f, children: p, ...m } = e, w = A(t, () => ({ isList: () => !0 }), []), v = a((e) => {
6323
6326
  const { key: t, style: n, range: o, cell: l } = e, i = o?.rowStart ?? l.rowIndex;
6324
6327
  return x("div", {
@@ -6338,7 +6341,7 @@ var fl, pl = {
6338
6341
  children: r(i)
6339
6342
  }, t);
6340
6343
  }, [r]), y = g(() => i ? { onKeyDown: i } : void 0, [i]);
6341
- return x(wl, {
6344
+ return x(xl, {
6342
6345
  ref: w,
6343
6346
  className: Y("list", h),
6344
6347
  style: f,
@@ -6353,7 +6356,7 @@ var fl, pl = {
6353
6356
  viewport: u,
6354
6357
  ...m
6355
6358
  });
6356
- }), vl = ({ checked: e, indeterminate: t }) => x("input", {
6359
+ }), yl = ({ checked: e, indeterminate: t }) => x("input", {
6357
6360
  type: "checkbox",
6358
6361
  checked: e,
6359
6362
  ref: (e) => {
@@ -6362,10 +6365,10 @@ var fl, pl = {
6362
6365
  readOnly: !0,
6363
6366
  tabIndex: -1,
6364
6367
  style: { margin: 0 }
6365
- }), yl = o(function(e, t) {
6366
- const { itemCount: n, isChecked: r, isIndeterminate: o, onCheckedChange: l, renderValue: i, renderCheckbox: s = vl, renderDivider: d, selectAllLabel: u, selectAllTitle: p, propsSelectAll: m, itemHeight: y, selection: b, cacheToken: S, autoFocus: E, viewport: C, className: I, style: P, children: R, ...M } = e, D = f(n);
6368
+ }), bl = o(function(e, t) {
6369
+ const { itemCount: n, isChecked: r, isIndeterminate: o, onCheckedChange: l, renderValue: i, renderCheckbox: s = yl, renderDivider: d, selectAllLabel: u, selectAllTitle: p, propsSelectAll: m, itemHeight: y, selection: b, cacheToken: S, autoFocus: E, viewport: C, className: I, style: P, children: R, ...M } = e, D = f(n);
6367
6370
  D.current = n;
6368
- const k = g(() => new _r({ getBounds: () => ({
6371
+ const k = g(() => new Wr({ getBounds: () => ({
6369
6372
  rowStart: 0,
6370
6373
  colStart: 0,
6371
6374
  rowEnd: Math.max(0, D.current - 1),
@@ -6502,7 +6505,7 @@ var fl, pl = {
6502
6505
  indeterminate: _
6503
6506
  })
6504
6507
  }), u]
6505
- }), d?.()] }), x(xl, {
6508
+ }), d?.()] }), x(vl, {
6506
6509
  itemCount: n,
6507
6510
  itemHeight: y,
6508
6511
  selection: T,
@@ -6518,21 +6521,21 @@ var fl, pl = {
6518
6521
  }
6519
6522
  })]
6520
6523
  });
6521
- }), bl = (e, t) => {
6524
+ }), Sl = (e, t) => {
6522
6525
  const n = (() => {
6523
- if (void 0 !== fl) return fl;
6526
+ if (void 0 !== pl) return pl;
6524
6527
  try {
6525
- fl = ("undefined" != typeof document ? document.createElement("canvas").getContext("2d") : null) ?? null;
6528
+ pl = ("undefined" != typeof document ? document.createElement("canvas").getContext("2d") : null) ?? null;
6526
6529
  } catch {
6527
- fl = null;
6530
+ pl = null;
6528
6531
  }
6529
- return fl;
6532
+ return pl;
6530
6533
  })();
6531
6534
  if (n) return n.font = t, n.measureText(e).width;
6532
6535
  const r = Number.parseFloat((/(\d+(?:\.\d+)?)px/.exec(t) ?? [])[1] ?? "16") || 16;
6533
6536
  return e.length * r * .55;
6534
- }, Sl = (e, t) => t <= 0 ? -1 : Math.min(Math.max(0, e), t - 1), El = o(function(e, t) {
6535
- const { items: n, onChoose: r, highlightIndex: o, itemHeight: l = 24, visibleRows: i = 8, contentWidth: s, measureText: c, renderItem: d, autoFocus: u, viewport: p, className: m, style: w, children: v, ...y } = e, b = n.length, E = Sl(o ?? 0, b), C = g(() => new _r({
6537
+ }, El = (e, t) => t <= 0 ? -1 : Math.min(Math.max(0, e), t - 1), Cl = o(function(e, t) {
6538
+ const { items: n, onChoose: r, highlightIndex: o, itemHeight: l = 24, visibleRows: i = 8, contentWidth: s, measureText: c, renderItem: d, autoFocus: u, viewport: p, className: m, style: w, children: v, ...y } = e, b = n.length, E = El(o ?? 0, b), C = g(() => new Wr({
6536
6539
  initial: { cell: {
6537
6540
  rowIndex: Math.max(0, E),
6538
6541
  colIndex: 0
@@ -6553,7 +6556,7 @@ var fl, pl = {
6553
6556
  b
6554
6557
  ]), k = O(() => 0 === b ? -1 : C.getSelection().cell.rowIndex, [C, b]), T = O((e) => {
6555
6558
  if (0 === b) return;
6556
- const t = Sl(C.getSelection().cell.rowIndex + e, b);
6559
+ const t = El(C.getSelection().cell.rowIndex + e, b);
6557
6560
  C.setSelection({ cell: {
6558
6561
  rowIndex: t,
6559
6562
  colIndex: 0
@@ -6573,7 +6576,7 @@ var fl, pl = {
6573
6576
  const t = e?.fontSize, n = e?.fontFamily, r = "number" == typeof t ? `${t}px` : t ?? "16px", o = [];
6574
6577
  return e?.fontStyle && "normal" !== e.fontStyle && o.push(String(e.fontStyle)), e?.fontWeight && "normal" !== e.fontWeight && o.push(String(e.fontWeight)), o.push(r, n ? String(n) : "sans-serif"), o.join(" ");
6575
6578
  })(w);
6576
- return (t) => bl(t, e);
6579
+ return (t) => Sl(t, e);
6577
6580
  }, [c, w]), $ = g(() => {
6578
6581
  if (null != s) return s;
6579
6582
  let e = 0;
@@ -6620,7 +6623,7 @@ var fl, pl = {
6620
6623
  e.which !== S.Enter && e.which !== S.Space || (e.preventDefault(), e.stopPropagation(), D(k()));
6621
6624
  }
6622
6625
  }), [D, k]);
6623
- return x(wl, {
6626
+ return x(xl, {
6624
6627
  ref: z,
6625
6628
  className: Y("pick-list", m),
6626
6629
  role: "listbox",
@@ -6640,10 +6643,10 @@ var fl, pl = {
6640
6643
  cacheToken: n,
6641
6644
  ...y
6642
6645
  });
6643
- }), Cl = "_field_q34pi_8", Il = "_search_q34pi_28", Pl = "_icon_q34pi_47", Rl = "_clear_q34pi_56", Ml = "_row_q34pi_84", Dl = (e, t) => {
6646
+ }), Il = "_field_q34pi_8", Pl = "_search_q34pi_28", Rl = "_icon_q34pi_47", Ml = "_clear_q34pi_56", Dl = "_row_q34pi_84", kl = (e, t) => {
6644
6647
  const n = t.trim().toLowerCase();
6645
6648
  return n ? e.filter((e) => e.text.toLowerCase().includes(n)) : e;
6646
- }, kl = (e) => v("svg", {
6649
+ }, Tl = (e) => v("svg", {
6647
6650
  className: e.className,
6648
6651
  viewBox: "0 0 16 16",
6649
6652
  "aria-hidden": "true",
@@ -6664,7 +6667,7 @@ var fl, pl = {
6664
6667
  strokeWidth: "1.5",
6665
6668
  strokeLinecap: "round"
6666
6669
  })]
6667
- }), Tl = o(function(e, t) {
6670
+ }), zl = o(function(e, t) {
6668
6671
  const { value: n, onChange: r, onClose: o, clearLabel: l, glyph: i, leading: s, trailing: c, onKeyDown: d, className: u, ...g } = e, h = a((e) => {
6669
6672
  if (e.which === S.Escape) return e.preventDefault(), e.stopPropagation(), void (n ? r("") : o?.());
6670
6673
  d?.(e);
@@ -6674,16 +6677,16 @@ var fl, pl = {
6674
6677
  o,
6675
6678
  d
6676
6679
  ]), f = v("div", {
6677
- className: Y(Cl, "list-search-field", u),
6680
+ className: Y(Il, "list-search-field", u),
6678
6681
  children: [
6679
- i ?? x(kl, { className: Pl }),
6682
+ i ?? x(Tl, { className: Rl }),
6680
6683
  x("input", {
6681
6684
  ref: t,
6682
6685
  type: "text",
6683
6686
  role: "searchbox",
6684
6687
  autoComplete: "off",
6685
6688
  spellCheck: !1,
6686
- className: Y(Il, "list-search"),
6689
+ className: Y(Pl, "list-search"),
6687
6690
  value: n,
6688
6691
  onChange: (e) => r(e.target.value),
6689
6692
  onKeyDown: h,
@@ -6691,7 +6694,7 @@ var fl, pl = {
6691
6694
  }),
6692
6695
  n ? x("button", {
6693
6696
  type: "button",
6694
- className: Y(Rl, "list-search-clear"),
6697
+ className: Y(Ml, "list-search-clear"),
6695
6698
  "aria-label": l,
6696
6699
  title: l,
6697
6700
  tabIndex: -1,
@@ -6712,20 +6715,20 @@ var fl, pl = {
6712
6715
  ]
6713
6716
  });
6714
6717
  return null == s && null == c ? f : v("div", {
6715
- className: Y(Ml, "list-search-row"),
6718
+ className: Y(Dl, "list-search-row"),
6716
6719
  children: [
6717
6720
  s,
6718
6721
  f,
6719
6722
  c
6720
6723
  ]
6721
6724
  });
6722
- }), zl = {
6725
+ }), Ol = {
6723
6726
  light: {},
6724
6727
  dark: {
6725
6728
  "color-base-100": "#1e1e1e",
6726
6729
  "color-base-300": "#3a3a3a"
6727
6730
  }
6728
- }, Ol = {
6731
+ }, Ll = {
6729
6732
  light: {
6730
6733
  "color-base-100": "#f2f2f2",
6731
6734
  "color-base-hover": "#ececec",
@@ -6736,7 +6739,7 @@ var fl, pl = {
6736
6739
  "color-base-hover": "#2e2e2e",
6737
6740
  "color-base-300": "#4a4a4a"
6738
6741
  }
6739
- }, Ll = (e, ...t) => T(e, zl[e], ...t), $l = (e, ...t) => T(e, Ol[e], ...t), Al = ({ app: e, grid: t = zl, header: n = Ol, layer: r = "sxl-defaults", scope: o } = {}) => {
6742
+ }, $l = (e, ...t) => T(e, Ol[e], ...t), Al = (e, ...t) => T(e, Ll[e], ...t), Fl = ({ app: e, grid: t = Ol, header: n = Ll, layer: r = "sxl-defaults", scope: o } = {}) => {
6740
6743
  const l = e ?? k, i = Object.fromEntries(Object.keys(n).map((e) => [e, {
6741
6744
  "color-base-100": l[e]?.["color-base-200"],
6742
6745
  ...n[e]
@@ -6751,4 +6754,4 @@ var fl, pl = {
6751
6754
  scope: o
6752
6755
  });
6753
6756
  };
6754
- export { An as AUTO_SCROLL_INTERVAL_MS, fr as CELL_INTERACTIVE_ATTRIBUTE, pr as CELL_INTERACTIVE_PROPS, Dr as CellLayer, Mr as CellTileDiv, yl as CheckboxList, Qr as DEFAULT_ANCHOR_STYLE, zn as DEFAULT_HANDLE_STYLE, to as DEFAULT_INSERT_BAR_STYLE, no as DEFAULT_MOVE_SOURCE_STYLE, Jr as DEFAULT_MULTI_STYLE, eo as DEFAULT_REMOVE_PREVIEW_STYLE, Zr as DEFAULT_SINGLE_STYLE, Kt as DEFAULT_TOOLTIP_TIMING, xr as DefaultCellRenderer, Ao as DefaultEditable, Vo as DefaultEditorInput, Jo as DefaultHeaderDivider, _r as DefaultSelection, Xn as DragHandle, lr as Draggable, Fn as EDGE_AUTO_SCROLL_MARGIN_PX, To as EditSession, _o as EditorDiv, Ho as EditorLayer, Ko as EditorStartLayer, hr as FillHandle, zl as GRID_SURFACE, hn as GestureTip, hl as Grid, Bt as GridFloatPanel, ll as GridFreezeAnchor, He as GridSurface, Vr as GridlineLayer, Wo as HEADER_DIVIDER_CLASS, Ol as HEADER_SURFACE, el as HeaderDividerAnchor, ol as HeaderFreezeAnchor, lt as Layer, re as LineSVG, xl as List, Tl as ListSearch, kl as ListSearchGlyph, wl as ListSurface, Bn as NO_DRAG_MODIFIERS, Io as PICKER_COLORS, El as PickList, ar as RESIZE_ANCHORS_4, sr as RESIZE_ANCHORS_8, sn as RangeFloatLayer, Ln as RangeInsertBar, bn as RangePrompt, On as RangeRect, cr as RangeResizer, Mn as RangeTooltip, Tn as RangeTooltipHost, cn as RangeTooltipLayer, Rn as RangeTooltipProvider, Do as RangesPickerLayer, le as RectangleSVG, Kr as SELECTION_CLIP_INSETS, So as SelectionLayer, ao as SelectionTouchGrips, te as ShapeBoundsContext, Tt as StickyAnchor, Ft as StickyPortal, Ne as SurfaceStateContext, Be as SurfaceStateProvider, Gt as TooltipProvider, dt as VirtualDiv, ln as VirtualRangeFloat, Al as buildGridThemeCSS, Ar as buildGridlinePath, Lo as commitArgsFromKey, Q as createAxis, _n as createDragCells, dl as createHeaderSelectionPointer, En as createRangeTooltipRegistry, Fe as createSurfaceStateStore, _t as createTooltipGroup, Wn as createWindowDragCells, Mo as defaultRangeStyle, Yt as defaultRenderTooltip, Nn as edgeScrollPane, Fo as expandEditorBounds, Dl as filterByText, wr as getCellInteractiveCoords, tl as getHeaderDividerBounds, ue as getPrimaryPane, Ll as gridThemeVars, sl as headerAnchorCell, al as headerEntireEnd, il as headerEntireStart, cl as headerRange, $l as headerThemeVars, er as insertAt, or as insertRange, mr as isCellInteractiveTarget, Hn as isSameDragModifiers, Vn as readDragModifiers, Ht as renderGridFloatPanel, ur as resolveFillDestination, zo as startEventFromKey, Gn as useDoubleClick, Un as useDragCells, $o as useEditorKeymap, ee as useGridMetrics, Je as useGridPane, Qe as useGridPaneOptional, ul as useHeaderSelectionPointer, Zt as useHoverIntent, ot as useLayer, Oo as usePendingCaret, Pn as useRangeTooltipRegistry, ro as useSelectionPointer, ne as useShapeBounds, Dt as useSticky, kt as useStickyOptional, tt as useSurfaceState, nt as useSurfaceStateSetter, rt as useSurfaceStateValue, jt as useTooltipSurface, jn as useWindowDragCells, gr as vacatedByFill };
6757
+ export { Fn as AUTO_SCROLL_INTERVAL_MS, pr as CELL_INTERACTIVE_ATTRIBUTE, mr as CELL_INTERACTIVE_PROPS, kr as CellLayer, Dr as CellTileDiv, bl as CheckboxList, eo as DEFAULT_ANCHOR_STYLE, On as DEFAULT_HANDLE_STYLE, no as DEFAULT_INSERT_BAR_STYLE, ro as DEFAULT_MOVE_SOURCE_STYLE, Qr as DEFAULT_MULTI_STYLE, to as DEFAULT_REMOVE_PREVIEW_STYLE, Jr as DEFAULT_SINGLE_STYLE, _t as DEFAULT_TOOLTIP_TIMING, vr as DefaultCellRenderer, Fo as DefaultEditable, Ho as DefaultEditorInput, Qo as DefaultHeaderDivider, Wr as DefaultSelection, Yn as DragHandle, ir as Draggable, Nn as EDGE_AUTO_SCROLL_MARGIN_PX, zo as EditSession, Wo as EditorDiv, Ko as EditorLayer, _o as EditorStartLayer, fr as FillHandle, Ol as GRID_SURFACE, fn as GestureTip, fl as Grid, Vt as GridFloatPanel, il as GridFreezeAnchor, Ke as GridSurface, Hr as GridlineLayer, Uo as HEADER_DIVIDER_CLASS, Ll as HEADER_SURFACE, tl as HeaderDividerAnchor, ll as HeaderFreezeAnchor, it as Layer, re as LineSVG, vl as List, zl as ListSearch, Tl as ListSearchGlyph, xl as ListSurface, Vn as NO_DRAG_MODIFIERS, Po as PICKER_COLORS, Cl as PickList, sr as RESIZE_ANCHORS_4, cr as RESIZE_ANCHORS_8, cn as RangeFloatLayer, $n as RangeInsertBar, Sn as RangePrompt, Ln as RangeRect, dr as RangeResizer, Dn as RangeTooltip, zn as RangeTooltipHost, dn as RangeTooltipLayer, Mn as RangeTooltipProvider, ko as RangesPickerLayer, le as RectangleSVG, _r as SELECTION_CLIP_INSETS, Eo as SelectionLayer, so as SelectionTouchGrips, te as ShapeBoundsContext, zt as StickyAnchor, Nt as StickyPortal, Be as SurfaceStateContext, Ve as SurfaceStateProvider, Xt as TooltipProvider, ut as VirtualDiv, an as VirtualRangeFloat, Fl as buildGridThemeCSS, Fr as buildGridlinePath, $o as commitArgsFromKey, Q as createAxis, Wn as createDragCells, ul as createHeaderSelectionPointer, Cn as createRangeTooltipRegistry, Ne as createSurfaceStateStore, Wt as createTooltipGroup, Un as createWindowDragCells, Do as defaultRangeStyle, qt as defaultRenderTooltip, Bn as edgeScrollPane, No as expandEditorBounds, kl as filterByText, xr as getCellInteractiveCoords, nl as getHeaderDividerBounds, ue as getPrimaryPane, $l as gridThemeVars, cl as headerAnchorCell, sl as headerEntireEnd, al as headerEntireStart, dl as headerRange, Al as headerThemeVars, tr as insertAt, lr as insertRange, wr as isCellInteractiveTarget, Kn as isSameDragModifiers, Hn as readDragModifiers, Kt as renderGridFloatPanel, gr as resolveFillDestination, Oo as startEventFromKey, Xn as useDoubleClick, jn as useDragCells, Ao as useEditorKeymap, ee as useGridMetrics, Qe as useGridPane, et as useGridPaneOptional, gl as useHeaderSelectionPointer, Jt as useHoverIntent, lt as useLayer, Lo as usePendingCaret, Rn as useRangeTooltipRegistry, oo as useSelectionPointer, ne as useShapeBounds, kt as useSticky, Tt as useStickyOptional, nt as useSurfaceState, rt as useSurfaceStateSetter, ot as useSurfaceStateValue, Gt as useTooltipSurface, Gn as useWindowDragCells, hr as vacatedByFill };