@gridsheet/react-core 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { f as Gn, u as gn, p as Qn, k as he, _ as z, t as gt, D as jt, a as Jn, s as ge, o as es, G as Ne, w as nt, b as ae, c as st, d as ke, e as ts, g as ns, r as kt, h as fn, i as hn, P as ft, j as ss, l as We, m as mn, n as rs, q as pn, v as Ae, x as lt, y as ct, z as os, A as Vt, R as yn, B as At, M as K, C as vn, E as Mt, F as ht, H as Oe, I as Ee, J as Tt, K as Me, L as ze, N as Re, O as Xt, Q as Lt, S as Dt, T as Ft, U as Ye, V as _t, W as Ie, X as qt, Z as Gt, Y as Be, $ as Ht, a0 as le, a1 as bn, a2 as wn, a3 as Rn, a4 as Cn, a5 as Sn, a6 as Nn, a7 as rt, a8 as Ot, a9 as tt, aa as Yt, ab as yt, ac as is, ad as as, ae as ls, af as Ue, ag as Xe, ah as xn, ai as cs, aj as us, ak as ds, al as Qt, am as gs, an as St, ao as En, ap as Jt, aq as fs, ar as hs, as as Ke, at as Bt, au as ms, av as ps, aw as en, ax as ys, ay as vs, az as bs, aA as ws, aB as Rs, aC as tn, aD as Cs, aE as Ss, aF as Ns, aG as nn, aH as xs, aI as Es, aJ as ks, aK as As, aL as Ms, aM as Ts, aN as sn, aO as kn, aP as Ds, aQ as Fs, aR as rn, aS as Ys, aT as Is, aU as on } from "./hooks-Bt6-NgDa.mjs";
2
- import { bi as jr, bj as Vr, bA as _r, bk as qr, bz as Gr, bx as Qr, bn as Jr, bl as eo, b6 as to, bB as no, by as so, b1 as ro, bm as oo, aW as io, a_ as ao, a$ as lo, b0 as co, aX as uo, aY as go, b2 as fo, b5 as ho, bs as mo, bv as po, b7 as yo, bu as vo, b8 as bo, bt as wo, bq as Ro, br as Co, bp as So, bo as No, aZ as xo, aV as Eo, b3 as ko, b4 as Ao, bw as Mo, bh as To, be as Do, bf as Fo, bg as Yo, bd as Io, b9 as $o, ba as Po, bb as Xo, bc as Lo, bC as Ho } from "./hooks-Bt6-NgDa.mjs";
1
+ import { f as Gn, u as gn, p as Qn, k as he, _ as z, t as gt, D as jt, a as Jn, s as ge, o as es, G as Ne, w as nt, b as ae, c as st, d as ke, e as ts, g as ns, r as kt, h as fn, i as hn, P as ft, j as ss, l as We, m as mn, n as rs, q as pn, v as Ae, x as lt, y as ct, z as os, A as Vt, R as yn, B as At, M as K, C as vn, E as Mt, F as ht, H as Oe, I as Ee, J as Tt, K as Me, L as ze, N as Re, O as Xt, Q as Ht, S as Dt, T as Ft, U as Ye, V as _t, W as Ie, X as qt, Z as Gt, Y as Be, $ as Lt, a0 as le, a1 as bn, a2 as wn, a3 as Rn, a4 as Cn, a5 as Sn, a6 as Nn, a7 as rt, a8 as Ot, a9 as tt, aa as Yt, ab as yt, ac as is, ad as as, ae as ls, af as Ue, ag as Xe, ah as xn, ai as cs, aj as us, ak as ds, al as Qt, am as gs, an as St, ao as En, ap as Jt, aq as fs, ar as hs, as as Ke, at as Bt, au as ms, av as ps, aw as en, ax as ys, ay as vs, az as bs, aA as ws, aB as Rs, aC as tn, aD as Cs, aE as Ss, aF as Ns, aG as nn, aH as xs, aI as Es, aJ as ks, aK as As, aL as Ms, aM as Ts, aN as sn, aO as kn, aP as Ds, aQ as Fs, aR as rn, aS as Ys, aT as Is, aU as on } from "./hooks-BhxFU0X7.mjs";
2
+ import { bi as jr, bj as Vr, bA as _r, bk as qr, bz as Gr, bx as Qr, bn as Jr, bl as eo, b6 as to, bB as no, by as so, b1 as ro, bm as oo, aW as io, a_ as ao, a$ as lo, b0 as co, aX as uo, aY as go, b2 as fo, b5 as ho, bs as mo, bv as po, b7 as yo, bu as vo, b8 as bo, bt as wo, bq as Ro, br as Co, bp as So, bo as No, aZ as xo, aV as Eo, b3 as ko, b4 as Ao, bw as Mo, bh as To, be as Do, bf as Fo, bg as Yo, bd as Io, b9 as $o, ba as Po, bb as Xo, bc as Ho, bC as Lo } from "./hooks-BhxFU0X7.mjs";
3
3
  import { jsx as l, jsxs as $, Fragment as Te } from "react/jsx-runtime";
4
4
  import It, { createContext as An, forwardRef as $s, useState as J, useImperativeHandle as Ps, useRef as ee, useContext as ce, useLayoutEffect as mt, useMemo as Ze, useCallback as D, memo as vt, useEffect as U, createRef as Mn, useReducer as Xs } from "react";
5
5
  import { createPortal as Kt } from "react-dom";
@@ -14,7 +14,7 @@ const ue = An(
14
14
  ] }),
15
15
  t && /* @__PURE__ */ l("div", { className: "gs-progress-track", children: /* @__PURE__ */ l("div", { className: "gs-progress-fill", style: { width: `${s}%` } }) })
16
16
  ] }) });
17
- }, Ls = $s(({ label: e }, n) => {
17
+ }, Hs = $s(({ label: e }, n) => {
18
18
  const [t, s] = J(0);
19
19
  return Ps(n, () => ({ setProgress: s }), []), /* @__PURE__ */ l(Tn, { progress: t, label: e });
20
20
  }), Wt = ({
@@ -152,7 +152,7 @@ const ue = An(
152
152
  const { y: a, x: g } = t;
153
153
  let c = he(n);
154
154
  c.left === -1 && (c = { top: a, left: g, bottom: a, right: g });
155
- const d = s.current, b = o.trim(c), p = Hs(b, {
155
+ const d = s.current, b = o.trim(c), p = Ls(b, {
156
156
  getter: (f, v) => f.getPolicy(v).serializeForClipboard({ point: v, sheet: f })
157
157
  }), h = Os(b, {
158
158
  getter: (f, v) => f.getPolicy(v).serializeForClipboard({ point: v, sheet: f })
@@ -167,7 +167,7 @@ const ue = An(
167
167
  ]);
168
168
  } else d != null && (d.value = p, z(d), d.select(), document.execCommand("copy"), d.value = "", d.blur());
169
169
  return c;
170
- }, Hs = (e, {
170
+ }, Ls = (e, {
171
171
  getter: n = (a, g) => {
172
172
  var m;
173
173
  return String(((m = a.getCell(g)) == null ? void 0 : m.value) ?? "");
@@ -246,7 +246,7 @@ const ue = An(
246
246
  } catch {
247
247
  }
248
248
  const x = ((k = P.match(/[a-zA-Z0-9_.]+$/)) == null ? void 0 : k[0]) || "", E = ((Y = y.match(/^[a-zA-Z0-9_.]+/)) == null ? void 0 : Y[0]) || "", S = h ? (x + E).toLowerCase() : e.toLocaleLowerCase(), F = h && y.slice(E.length).trimStart().startsWith("(");
249
- let O = [], L = !1;
249
+ let O = [], H = !1;
250
250
  if (h)
251
251
  try {
252
252
  const i = new gt(e.slice(1));
@@ -255,14 +255,14 @@ const ue = An(
255
255
  for (const R of i.tokens) {
256
256
  const N = R.length();
257
257
  if (n > u && n < u + N) {
258
- ["REF", "RANGE", "ID", "ID_RANGE", "UNREFERENCED"].includes(R.type) && (L = !0), R.type === "VALUE" && typeof R.entity == "string" && (L = !0);
258
+ ["REF", "RANGE", "ID", "ID_RANGE", "UNREFERENCED"].includes(R.type) && (H = !0), R.type === "VALUE" && typeof R.entity == "string" && (H = !0);
259
259
  break;
260
260
  }
261
- (n === u || n === u + N) && ["REF", "RANGE", "ID", "ID_RANGE", "UNREFERENCED"].includes(R.type) && (L = !0), u += N;
261
+ (n === u || n === u + N) && ["REF", "RANGE", "ID", "ID_RANGE", "UNREFERENCED"].includes(R.type) && (H = !0), u += N;
262
262
  }
263
263
  } catch {
264
264
  }
265
- return h && !L ? S.length > 0 && !F && (O = jt(s).map((i) => {
265
+ return h && !H ? S.length > 0 && !F && (O = jt(s).map((i) => {
266
266
  const u = i.name.toLowerCase(), R = u.startsWith(S), N = R ? 0 : -1, T = i.defs.length === 0;
267
267
  return {
268
268
  option: { ...i, value: i.name + (T ? "()" : "("), isFunction: !0, label: i.name },
@@ -351,16 +351,16 @@ const ue = An(
351
351
  let y = 0;
352
352
  for (const x of v) {
353
353
  const E = ((p = x.textContent) == null ? void 0 : p.trim()) ?? "", S = n ? void 0 : (() => {
354
- const L = an(x.firstElementChild);
355
- return { ...an(x), ...L };
354
+ const H = an(x.firstElementChild);
355
+ return { ...an(x), ...H };
356
356
  })();
357
357
  for (; c.has(`${h}-${++y}`); )
358
358
  P.push({ value: "", style: S, skip: !0 });
359
359
  P.push({ value: E, style: S });
360
360
  const F = parseInt(x.getAttribute("rowspan") ?? "1", 10), O = parseInt(x.getAttribute("colspan") ?? "1", 10);
361
- for (let L = 0; L < F; L++)
361
+ for (let H = 0; H < F; H++)
362
362
  for (let k = 0; k < O; k++)
363
- c.add(`${h + L}-${y + k}`);
363
+ c.add(`${h + H}-${y + k}`);
364
364
  }
365
365
  r.push(P);
366
366
  }
@@ -504,10 +504,10 @@ const In = (e, n = " ") => {
504
504
  largeEditorRef: S,
505
505
  searchInputRef: F,
506
506
  editingOnEnter: O,
507
- sheetReactive: L,
507
+ sheetReactive: H,
508
508
  sheetId: k,
509
509
  dragging: Y
510
- } = n, i = L.current, u = () => {
510
+ } = n, i = H.current, u = () => {
511
511
  var fe;
512
512
  if (!g || !X || typeof document > "u" || E.current !== document.activeElement)
513
513
  return null;
@@ -524,7 +524,7 @@ const In = (e, n = " ") => {
524
524
  Wt,
525
525
  {
526
526
  activeFunctionGuide: te,
527
- activeArgIndex: se,
527
+ activeArgIndex: ne,
528
528
  top: G,
529
529
  left: ie
530
530
  }
@@ -548,11 +548,11 @@ const In = (e, n = " ") => {
548
548
  filteredOptions: M,
549
549
  selected: I,
550
550
  setSelected: A,
551
- replaceWithOption: H,
551
+ replaceWithOption: L,
552
552
  handleArrowUp: B,
553
553
  handleArrowDown: Q,
554
554
  activeFunctionHelp: te,
555
- activeArgIndex: se
555
+ activeArgIndex: ne
556
556
  } = Fn({
557
557
  inputting: b,
558
558
  selectionStart: o,
@@ -580,7 +580,7 @@ const In = (e, n = " ") => {
580
580
  const G = M[C];
581
581
  if (G) {
582
582
  if (G.isFunction) {
583
- const { value: ie, selectionStart: fe } = H(G);
583
+ const { value: ie, selectionStart: fe } = L(G);
584
584
  t(ae(ie)), setTimeout(() => {
585
585
  E.current && (z(E.current), E.current.setSelectionRange(fe, fe));
586
586
  }, 0);
@@ -599,7 +599,7 @@ const In = (e, n = " ") => {
599
599
  U(() => {
600
600
  i && (de(w), t(ae(w)), ts(E.current, i, d));
601
601
  }, [d, w, t, E, i]);
602
- const { y: Ce, x: Le, height: Ve, width: He } = h, Rt = w.split(`
602
+ const { y: Ce, x: He, height: Ve, width: Le } = h, Rt = w.split(`
603
603
  `).length, [_e, ve] = J(!1), ot = D(
604
604
  (C) => {
605
605
  var fe, Ge, Pe, Qe, Je, Ut;
@@ -888,12 +888,12 @@ const In = (e, n = " ") => {
888
888
  bt,
889
889
  {
890
890
  className: `gs-editor ${X ? "gs-editing" : ""}`,
891
- style: X ? { top: Ce, left: Le, height: Ve } : {},
891
+ style: X ? { top: Ce, left: He, height: Ve } : {},
892
892
  "data-mode": e,
893
893
  "data-sheet-id": k,
894
894
  children: [
895
895
  /* @__PURE__ */ l("div", { className: `gs-cell-label ${X ? " gs-hidden" : ""}`, children: Z }),
896
- /* @__PURE__ */ $("div", { className: "gs-editor-inner", style: { width: He }, children: [
896
+ /* @__PURE__ */ $("div", { className: "gs-editor-inner", style: { width: Le }, children: [
897
897
  /* @__PURE__ */ l(
898
898
  "pre",
899
899
  {
@@ -918,7 +918,7 @@ const In = (e, n = " ") => {
918
918
  ref: E,
919
919
  rows: Rt,
920
920
  onFocus: it,
921
- style: { minWidth: He, minHeight: Ve },
921
+ style: { minWidth: Le, minHeight: Ve },
922
922
  onDoubleClick: at,
923
923
  onBlur: oe,
924
924
  value: b,
@@ -1012,7 +1012,7 @@ function Xn() {
1012
1012
  const e = ce(Pn);
1013
1013
  return (e == null ? void 0 : e.provided) == null ? [!1, e] : [!0, e];
1014
1014
  }
1015
- function Lr({ children: e, context: n }) {
1015
+ function Hr({ children: e, context: n }) {
1016
1016
  const [t] = Xn();
1017
1017
  return t ? /* @__PURE__ */ l(Te, { children: e }) : /* @__PURE__ */ l(Pn.Provider, { value: n, children: e });
1018
1018
  }
@@ -1030,7 +1030,7 @@ const Ws = ({
1030
1030
  const { store: c, dispatch: d } = ce(ue), { sheetReactive: b } = c, p = b.current, h = ee({ store: c, dispatch: d });
1031
1031
  h.current = { store: c, dispatch: d }, U(() => {
1032
1032
  let P = 0, y = !1, x = !1, E = 0, S = 0, F = "", O = 0;
1033
- const L = 0, k = 18, Y = () => {
1033
+ const H = 0, k = 18, Y = () => {
1034
1034
  y = !1, cancelAnimationFrame(P);
1035
1035
  }, i = () => {
1036
1036
  if (x)
@@ -1039,28 +1039,28 @@ const Ws = ({
1039
1039
  const { store: I, dispatch: A } = h.current;
1040
1040
  I.autofillDraggingTo && A(Tt(I.autofillDraggingTo)), I.dragging && A(Me(!1));
1041
1041
  }, u = () => {
1042
- var se, W;
1042
+ var ne, W;
1043
1043
  if (x || !y)
1044
1044
  return;
1045
- const { store: I, dispatch: A } = h.current, H = (se = I.tabularRef) == null ? void 0 : se.current;
1046
- if (!H || !(I.dragging || I.autofillDraggingTo)) {
1045
+ const { store: I, dispatch: A } = h.current, L = (ne = I.tabularRef) == null ? void 0 : ne.current;
1046
+ if (!L || !(I.dragging || I.autofillDraggingTo)) {
1047
1047
  y = !1;
1048
1048
  return;
1049
1049
  }
1050
- const B = H.getBoundingClientRect(), Q = S > B.bottom - L ? k : S < B.top + L ? -18 : 0, te = E > B.right - L ? k : E < B.left + L ? -18 : 0;
1050
+ const B = L.getBoundingClientRect(), Q = S > B.bottom - H ? k : S < B.top + H ? -18 : 0, te = E > B.right - H ? k : E < B.left + H ? -18 : 0;
1051
1051
  if (Q || te) {
1052
- H.scrollTop += Q, H.scrollLeft += te;
1053
- const V = Math.min(Math.max(E, B.left + 1), B.right - 1), _ = Math.min(Math.max(S, B.top + 1), B.bottom - 1), ne = (W = document.elementFromPoint(V, _)) == null ? void 0 : W.closest(".gs-cell");
1054
- if (ne) {
1055
- const Z = Number(ne.dataset.y), X = Number(ne.dataset.x), j = Z + ":" + X, w = performance.now();
1052
+ L.scrollTop += Q, L.scrollLeft += te;
1053
+ const V = Math.min(Math.max(E, B.left + 1), B.right - 1), _ = Math.min(Math.max(S, B.top + 1), B.bottom - 1), se = (W = document.elementFromPoint(V, _)) == null ? void 0 : W.closest(".gs-cell");
1054
+ if (se) {
1055
+ const Z = Number(se.dataset.y), X = Number(se.dataset.x), j = Z + ":" + X, w = performance.now();
1056
1056
  !Number.isNaN(Z) && !Number.isNaN(X) && j !== F && w - O > 80 && (F = j, O = w, A(I.autofillDraggingTo ? ze({ x: X, y: Z }) : Re({ y: Z, x: X })));
1057
1057
  }
1058
1058
  }
1059
1059
  P = requestAnimationFrame(u);
1060
1060
  }, R = (I) => {
1061
1061
  if (I.buttons === 0) {
1062
- const { store: H } = h.current;
1063
- !x && (y || H.autofillDraggingTo != null || H.dragging) && i();
1062
+ const { store: L } = h.current;
1063
+ !x && (y || L.autofillDraggingTo != null || L.dragging) && i();
1064
1064
  return;
1065
1065
  }
1066
1066
  E = I.clientX, S = I.clientY;
@@ -1122,7 +1122,7 @@ const Ws = ({
1122
1122
  } = e, d = r.current, [b, p, h] = t, [f, v, P] = s;
1123
1123
  if (c.current == null || m.current == null || !d)
1124
1124
  return /* @__PURE__ */ l("div", { className: "gs-resizing gs-hidden" });
1125
- const y = d.getCell({ y: b === -1 ? 0 : b, x: f === -1 ? 0 : f }, { resolution: "SYSTEM" }), { y: x, x: E } = c.current.getBoundingClientRect(), S = (y == null ? void 0 : y.width) || Xt, F = (y == null ? void 0 : y.height) || Lt, O = S + (P - v), L = F + (h - p);
1125
+ const y = d.getCell({ y: b === -1 ? 0 : b, x: f === -1 ? 0 : f }, { resolution: "SYSTEM" }), { y: x, x: E } = c.current.getBoundingClientRect(), S = (y == null ? void 0 : y.width) || Xt, F = (y == null ? void 0 : y.height) || Ht, O = S + (P - v), H = F + (h - p);
1126
1126
  return /* @__PURE__ */ $(
1127
1127
  "div",
1128
1128
  {
@@ -1138,7 +1138,7 @@ const Ws = ({
1138
1138
  if (b !== -1) {
1139
1139
  let I = [b];
1140
1140
  o && Ye({ start: u, end: N }, b) && (I = _t(u, N + 1)), I.forEach((A) => {
1141
- M[Ie({ y: A, x: 0 })] = { height: L };
1141
+ M[Ie({ y: A, x: 0 })] = { height: H };
1142
1142
  });
1143
1143
  }
1144
1144
  d.update({
@@ -1169,7 +1169,7 @@ const Ws = ({
1169
1169
  "px"
1170
1170
  ] }) }) }),
1171
1171
  /* @__PURE__ */ l("div", { className: `gs-line-horizontal ${b === -1 ? "gs-hidden" : ""}`, children: /* @__PURE__ */ l("div", { className: "gs-line", style: { width: "100%", height: 1, top: h - x }, children: /* @__PURE__ */ $("span", { style: { top: "-50%" }, children: [
1172
- L,
1172
+ H,
1173
1173
  "px"
1174
1174
  ] }) }) })
1175
1175
  ]
@@ -1196,10 +1196,10 @@ const Ws = ({
1196
1196
  }
1197
1197
  });
1198
1198
  }, [n, t]), null;
1199
- }, Ln = async ({ store: e, dispatch: n }) => {
1199
+ }, Hn = async ({ store: e, dispatch: n }) => {
1200
1200
  const { editorRef: t } = e, s = pt(e);
1201
1201
  n(pn(ft(s))), z(t.current);
1202
- }, Hn = async ({ store: e, dispatch: n }) => {
1202
+ }, Ln = async ({ store: e, dispatch: n }) => {
1203
1203
  const { editorRef: t } = e, s = pt(e);
1204
1204
  n(hn(ft(s))), z(t.current);
1205
1205
  }, On = async ({ store: e, dispatch: n }, t = !1) => {
@@ -1248,10 +1248,10 @@ const Ws = ({
1248
1248
  n(bn({ numCols: o, x: r, operator: "USER" })), z(s.current);
1249
1249
  }, Wn = async ({ store: e, dispatch: n }, t) => {
1250
1250
  const s = e.sheetReactive.current;
1251
- s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Ht({ x: t, direction: "asc" })), z(e.editorRef.current);
1251
+ s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Lt({ x: t, direction: "asc" })), z(e.editorRef.current);
1252
1252
  }, Zn = async ({ store: e, dispatch: n }, t) => {
1253
1253
  const s = e.sheetReactive.current;
1254
- s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Ht({ x: t, direction: "desc" })), z(e.editorRef.current);
1254
+ s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Lt({ x: t, direction: "desc" })), z(e.editorRef.current);
1255
1255
  }, zn = async ({ store: e, dispatch: n }, t, s) => {
1256
1256
  const r = e.sheetReactive.current;
1257
1257
  r && (r.hasPendingCells() || r.registry.asyncPending.size > 0) && await r.waitForPending(), n(Be({ x: t, filter: s })), z(e.editorRef.current);
@@ -1271,9 +1271,9 @@ const Ws = ({
1271
1271
  s.update({ diff: { [r]: { filterFixed: a } }, partial: !0 }), n(st(s)), z(e.editorRef.current);
1272
1272
  }, Vn = async ({ store: e, dispatch: n }) => {
1273
1273
  typeof e.searchQuery > "u" && n(We("")), n(mn(!1)), requestAnimationFrame(() => z(e.searchInputRef.current));
1274
- }, Hr = {
1275
- copy: Ln,
1276
- cut: Hn,
1274
+ }, Lr = {
1275
+ copy: Hn,
1276
+ cut: Ln,
1277
1277
  paste: On,
1278
1278
  undo: Bn,
1279
1279
  redo: Kn,
@@ -1594,8 +1594,8 @@ function Zt(e, n, t) {
1594
1594
  selectingZone: e.selectingZone,
1595
1595
  leftHeaderSelecting: e.leftHeaderSelecting,
1596
1596
  topHeaderSelecting: e.topHeaderSelecting,
1597
- cut: () => Hn(s),
1598
- copy: () => Ln(s),
1597
+ cut: () => Ln(s),
1598
+ copy: () => Hn(s),
1599
1599
  paste: (o = !1) => On(s, o),
1600
1600
  undo: () => Bn(s),
1601
1601
  redo: () => Kn(s),
@@ -1853,7 +1853,7 @@ const nr = ({
1853
1853
  }, [r, n]);
1854
1854
  if (!a)
1855
1855
  return null;
1856
- const F = a.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), O = K.hasOperation(F == null ? void 0 : F.prevention, K.Filter), L = a.hasActiveFilters();
1856
+ const F = a.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), O = K.hasOperation(F == null ? void 0 : F.prevention, K.Filter), H = a.hasActiveFilters();
1857
1857
  return /* @__PURE__ */ l("li", { className: `gs-column-menu-filter${O ? " gs-disabled" : ""}`, children: /* @__PURE__ */ $(Te, { children: [
1858
1858
  /* @__PURE__ */ $("div", { className: "gs-filter-header", children: [
1859
1859
  /* @__PURE__ */ l("div", { className: "gs-menu-name", children: "Filter:" }),
@@ -1927,7 +1927,7 @@ const nr = ({
1927
1927
  )
1928
1928
  ] }, Y)) }),
1929
1929
  /* @__PURE__ */ $("div", { className: "gs-filter-actions", children: [
1930
- L && /* @__PURE__ */ l("button", { className: "gs-filter-reset-all-btn", onClick: S, children: "RESET ALL" }),
1930
+ H && /* @__PURE__ */ l("button", { className: "gs-filter-reset-all-btn", onClick: S, children: "RESET ALL" }),
1931
1931
  /* @__PURE__ */ $("div", { className: "gs-filter-actions-right", children: [
1932
1932
  (F == null ? void 0 : F.filter) && /* @__PURE__ */ l("button", { className: "gs-filter-reset-btn", onClick: E, children: "RESET" }),
1933
1933
  /* @__PURE__ */ l("button", { className: "gs-filter-apply-btn", onClick: x, disabled: O, children: "APPLY" })
@@ -1947,7 +1947,7 @@ const ar = ({ x: e, close: n, onWaiting: t }) => {
1947
1947
  return;
1948
1948
  let p = !1;
1949
1949
  const h = () => {
1950
- p || !o.current || (r(Ht({ x: g.x, direction: g.direction })), t == null || t(null), m(null), n());
1950
+ p || !o.current || (r(Lt({ x: g.x, direction: g.direction })), t == null || t(null), m(null), n());
1951
1951
  }, f = o.current;
1952
1952
  return f && (f.hasPendingCells() || f.registry.asyncPending.size > 0) ? f.waitForPending().then(h) : h(), () => {
1953
1953
  p = !0;
@@ -2135,7 +2135,7 @@ const cr = () => {
2135
2135
  editorRef: y,
2136
2136
  autofillDraggingTo: x,
2137
2137
  contextMenu: E
2138
- } = o, S = b.current, F = yt(o), O = S == null ? void 0 : S.registry.lastFocused, L = he(f), k = p === r, Y = h.y === e && h.x === n, i = D(() => {
2138
+ } = o, S = b.current, F = yt(o), O = S == null ? void 0 : S.registry.lastFocused, H = he(f), k = p === r, Y = h.y === e && h.x === n, i = D(() => {
2139
2139
  var q;
2140
2140
  const w = (q = m.current) == null ? void 0 : q.getBoundingClientRect();
2141
2141
  if (w == null)
@@ -2173,23 +2173,23 @@ const cr = () => {
2173
2173
  } catch (w) {
2174
2174
  as.is(w) ? (T = w.message, M = w.code) : (T = w.message, M = "#UNKNOWN");
2175
2175
  }
2176
- const [, I] = (S == null ? void 0 : S.getSolvedCache({ y: e, x: n })) ?? [void 0, void 0], A = ls.is(I), H = y.current, B = !!(S != null && S.registry.editingAddress || p), Q = D(
2176
+ const [, I] = (S == null ? void 0 : S.getSolvedCache({ y: e, x: n })) ?? [void 0, void 0], A = ls.is(I), L = y.current, B = !!(S != null && S.registry.editingAddress || p), Q = D(
2177
2177
  (w) => {
2178
- if (w.stopPropagation(), me(w), !S || !je(w) || !H)
2178
+ if (w.stopPropagation(), me(w), !S || !je(w) || !L)
2179
2179
  return !1;
2180
2180
  if (w.type.startsWith("touch"))
2181
- return B && H && H.blur(), a(Ue({ y: e, x: n })), a(Ae({ startY: e, startX: n, endY: e, endX: n })), !0;
2181
+ return B && L && L.blur(), a(Ue({ y: e, x: n })), a(Ae({ startY: e, startX: n, endY: e, endX: n })), !0;
2182
2182
  w.shiftKey ? a(Re({ y: e, x: n })) : a(Ae({ startY: e, startX: n, endY: -1, endX: -1 })), a(Me(!0));
2183
2183
  const q = `${S.sheetPrefix(!F)}${r}`;
2184
- return B && Xe({ input: O || null, ref: q }) || (S.registry.lastFocused = H, z(H), a(ge("")), x) ? !1 : (B && R(H.value), w.shiftKey || a(Ue({ y: e, x: n })), !0);
2184
+ return B && Xe({ input: O || null, ref: q }) || (S.registry.lastFocused = L, z(L), a(ge("")), x) ? !1 : (B && R(L.value), w.shiftKey || a(Ue({ y: e, x: n })), !0);
2185
2185
  },
2186
- [B, H, r, F, O, x, R, S]
2186
+ [B, L, r, F, O, x, R, S]
2187
2187
  ), te = D(
2188
2188
  (w) => {
2189
2189
  w.stopPropagation(), !w.type.startsWith("touch") && (me(w), a(Me(!1)), B && a(Re({ y: -1, x: -1 })));
2190
2190
  },
2191
2191
  [B]
2192
- ), se = D(
2192
+ ), ne = D(
2193
2193
  (w) => {
2194
2194
  if (!je(w) || w.type.startsWith("touch") || !S)
2195
2195
  return !1;
@@ -2228,29 +2228,29 @@ const cr = () => {
2228
2228
  w && d(cs(w));
2229
2229
  }, []), _ = D(() => {
2230
2230
  d(null);
2231
- }, []), ne = D(
2231
+ }, []), se = D(
2232
2232
  (w) => E.length > 0 ? (w.stopPropagation(), me(w), a(rt({ y: w.clientY, x: w.clientX })), !1) : !0,
2233
2233
  [E.length]
2234
2234
  ), Z = D(
2235
2235
  (w) => {
2236
2236
  w.stopPropagation(), me(w), ge(r);
2237
2237
  const q = document.createEvent("MouseEvents");
2238
- return q.initEvent("dblclick", !0, !0), H == null || H.dispatchEvent(q), !1;
2238
+ return q.initEvent("dblclick", !0, !0), L == null || L.dispatchEvent(q), !1;
2239
2239
  },
2240
- [r, H]
2241
- ), X = Ze(() => !k && Y && L.bottom === -1 || L.bottom === e && L.right === n ? "gs-autofill-drag" : "gs-autofill-drag gs-hidden", [k, Y, L]);
2242
- return S ? H ? /* @__PURE__ */ l(
2240
+ [r, L]
2241
+ ), X = Ze(() => !k && Y && H.bottom === -1 || H.bottom === e && H.right === n ? "gs-autofill-drag" : "gs-autofill-drag gs-hidden", [k, Y, H]);
2242
+ return S ? L ? /* @__PURE__ */ l(
2243
2243
  "td",
2244
2244
  {
2245
2245
  ref: m,
2246
2246
  "data-x": n,
2247
2247
  "data-y": e,
2248
2248
  "data-address": r,
2249
- className: `gs-cell ${ds(L, { y: e, x: n }) ? "gs-selecting" : ""} ${Y ? "gs-choosing" : ""} ${k ? "gs-editing" : ""} ${A ? "gs-pending" : ""}`,
2249
+ className: `gs-cell ${ds(H, { y: e, x: n }) ? "gs-selecting" : ""} ${Y ? "gs-choosing" : ""} ${k ? "gs-editing" : ""} ${A ? "gs-pending" : ""}`,
2250
2250
  style: {
2251
2251
  ...u == null ? void 0 : u.style
2252
2252
  },
2253
- onContextMenu: ne,
2253
+ onContextMenu: se,
2254
2254
  onDoubleClick: Z,
2255
2255
  children: /* @__PURE__ */ $(
2256
2256
  "div",
@@ -2258,7 +2258,7 @@ const cr = () => {
2258
2258
  className: "gs-cell-inner-wrap",
2259
2259
  onMouseDown: Q,
2260
2260
  onTouchStart: Q,
2261
- onMouseEnter: se,
2261
+ onMouseEnter: ne,
2262
2262
  onMouseUp: te,
2263
2263
  children: [
2264
2264
  /* @__PURE__ */ $(
@@ -2336,8 +2336,8 @@ function $e({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2336
2336
  if (!v)
2337
2337
  return { x: -1, y: -1 };
2338
2338
  if (n == 0 && t == 0) {
2339
- const A = g.current.getBoundingClientRect(), { left: H, top: B, right: Q, bottom: te } = A;
2340
- n = N.pageX > Q ? 1 : N.pageX < H ? -1 : 0, n === 0 && (t = N.pageY > te ? 1 : N.pageY < B ? -1 : 0);
2339
+ const A = g.current.getBoundingClientRect(), { left: L, top: B, right: Q, bottom: te } = A;
2340
+ n = N.pageX > Q ? 1 : N.pageX < L ? -1 : 0, n === 0 && (t = N.pageY > te ? 1 : N.pageY < B ? -1 : 0);
2341
2341
  }
2342
2342
  const T = Qt(g.current);
2343
2343
  let { endX: M, endY: I } = d;
@@ -2360,11 +2360,11 @@ function $e({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2360
2360
  }), z(b.current);
2361
2361
  const { x: I, y: A } = S(N);
2362
2362
  if (T.autofillDraggingTo) {
2363
- const { y: H, x: B } = T.autofillDraggingTo;
2364
- a(ze({ y: A === -1 ? H : A, x: I === -1 ? B : I }));
2363
+ const { y: L, x: B } = T.autofillDraggingTo;
2364
+ a(ze({ y: A === -1 ? L : A, x: I === -1 ? B : I }));
2365
2365
  } else {
2366
2366
  if (E) {
2367
- const H = he({ ...d, endY: A, endX: I }), B = v.sheetPrefix(!x), Q = xn(H), te = `${B}${Q}`;
2367
+ const L = he({ ...d, endY: A, endX: I }), B = v.sheetPrefix(!x), Q = xn(L), te = `${B}${Q}`;
2368
2368
  Xe({ input: b.current, ref: te });
2369
2369
  }
2370
2370
  a(Re({ y: A, x: I }));
@@ -2386,14 +2386,14 @@ function $e({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2386
2386
  (N) => {
2387
2387
  if (N.preventDefault(), N.stopPropagation(), !y) {
2388
2388
  if (y = !0, n === 0 || t === 0) {
2389
- const T = g.current.getBoundingClientRect(), { left: M, top: I, right: A, bottom: H } = T;
2390
- n || (n = N.pageX > A ? 1 : N.pageX < M ? -1 : 0), n === 0 && (t || (t = N.pageY > H ? 1 : N.pageY < I ? -1 : 0));
2389
+ const T = g.current.getBoundingClientRect(), { left: M, top: I, right: A, bottom: L } = T;
2390
+ n || (n = N.pageX > A ? 1 : N.pageX < M ? -1 : 0), n === 0 && (t || (t = N.pageY > L ? 1 : N.pageY < I ? -1 : 0));
2391
2391
  }
2392
2392
  r.current = requestAnimationFrame(() => F(N));
2393
2393
  }
2394
2394
  },
2395
2395
  [y, n, t, F]
2396
- ), L = D(() => {
2396
+ ), H = D(() => {
2397
2397
  r.current !== null && (cancelAnimationFrame(r.current), r.current = null), y = !1, gs(h.current) || z(b.current);
2398
2398
  }, []), k = D(
2399
2399
  (N) => {
@@ -2403,21 +2403,21 @@ function $e({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2403
2403
  return;
2404
2404
  const { x: M, y: I } = S(N);
2405
2405
  if (m) {
2406
- const { y: A, x: H } = m;
2407
- a(Tt({ y: I === -1 ? A : I, x: M === -1 ? H : M })), z(b.current);
2406
+ const { y: A, x: L } = m;
2407
+ a(Tt({ y: I === -1 ? A : I, x: M === -1 ? L : M })), z(b.current);
2408
2408
  } else
2409
2409
  E && a(Re({ y: -1, x: -1 }));
2410
2410
  },
2411
2411
  [m, E, S]
2412
2412
  ), Y = D(
2413
2413
  (N) => {
2414
- L(), a(Me(!1)), requestAnimationFrame(() => k(N));
2414
+ H(), a(Me(!1)), requestAnimationFrame(() => k(N));
2415
2415
  },
2416
- [L, k]
2416
+ [H, k]
2417
2417
  ), i = D(() => {
2418
- L();
2419
- }, [L]);
2420
- U(() => L, [L]);
2418
+ H();
2419
+ }, [H]);
2420
+ U(() => H, [H]);
2421
2421
  const u = g.current, R = !!u && (n > 0 && u.scrollLeft + u.clientWidth >= u.scrollWidth - 1 || n < 0 && u.scrollLeft <= 0 || t > 0 && u.scrollTop + u.clientHeight >= u.scrollHeight - 1 || t < 0 && u.scrollTop <= 0);
2422
2422
  return !b.current || !c && !m || R ? /* @__PURE__ */ l("div", { className: `gs-scroll-handle gs-hidden ${s}` }) : /* @__PURE__ */ l(
2423
2423
  "div",
@@ -2451,7 +2451,7 @@ const hr = vt(({ x: e }) => {
2451
2451
  [a]
2452
2452
  ), O = D((i) => {
2453
2453
  s(Ft([e, i.clientX, i.clientX])), i.stopPropagation(), me(i);
2454
- }, []), L = D(
2454
+ }, []), H = D(
2455
2455
  (i) => {
2456
2456
  if (i.stopPropagation(), me(i), !je(i) || !f || b)
2457
2457
  return !1;
@@ -2519,8 +2519,8 @@ const hr = vt(({ x: e }) => {
2519
2519
  "div",
2520
2520
  {
2521
2521
  className: "gs-th-inner-wrap",
2522
- onMouseDown: L,
2523
- onTouchStart: L,
2522
+ onMouseDown: H,
2523
+ onTouchStart: H,
2524
2524
  onMouseEnter: Y,
2525
2525
  onMouseUp: k,
2526
2526
  children: /* @__PURE__ */ $("div", { className: "gs-th-inner", style: { height: f.headerHeight, position: "relative" }, children: [
@@ -2591,7 +2591,7 @@ const hr = vt(({ x: e }) => {
2591
2591
  dragging: b,
2592
2592
  contextMenu: p,
2593
2593
  rowMenuState: h
2594
- } = t, f = c.current, v = f == null ? void 0 : f.getCell({ y: e, x: 0 }, { resolution: "SYSTEM" }), P = (v == null ? void 0 : v.height) || Lt, y = yt(t), x = f == null ? void 0 : f.registry.lastFocused, E = !!(f != null && f.registry.editingAddress || o), S = D(
2594
+ } = t, f = c.current, v = f == null ? void 0 : f.getCell({ y: e, x: 0 }, { resolution: "SYSTEM" }), P = (v == null ? void 0 : v.height) || Ht, y = yt(t), x = f == null ? void 0 : f.registry.lastFocused, E = !!(f != null && f.registry.editingAddress || o), S = D(
2595
2595
  (i) => {
2596
2596
  s(nt({ value: i, point: r }));
2597
2597
  },
@@ -2627,7 +2627,7 @@ const hr = vt(({ x: e }) => {
2627
2627
  d,
2628
2628
  m
2629
2629
  ]
2630
- ), L = D(
2630
+ ), H = D(
2631
2631
  (i) => {
2632
2632
  if (i.stopPropagation(), !i.type.startsWith("touch") && (me(i), s(Me(!1)), d))
2633
2633
  return z(m.current), !1;
@@ -2665,7 +2665,7 @@ const hr = vt(({ x: e }) => {
2665
2665
  onMouseDown: O,
2666
2666
  onTouchStart: O,
2667
2667
  onMouseEnter: k,
2668
- onMouseUp: L,
2668
+ onMouseUp: H,
2669
2669
  children: /* @__PURE__ */ $("div", { className: "gs-th-inner", style: { width: f.headerWidth, position: "relative" }, children: [
2670
2670
  /* @__PURE__ */ l(
2671
2671
  $e,
@@ -2743,8 +2743,8 @@ const hr = vt(({ x: e }) => {
2743
2743
  const S = f.current, F = S.getContext("2d");
2744
2744
  if (!F)
2745
2745
  return;
2746
- const O = s.current, L = window.devicePixelRatio || 1, k = O.clientWidth, Y = O.clientHeight;
2747
- (S.width !== k * L || S.height !== Y * L) && (S.style.width = `${k}px`, S.style.height = `${Y}px`, S.width = k * L, S.height = Y * L), F.setTransform(L, 0, 0, L, 0, 0), F.clearRect(0, 0, k, Y);
2746
+ const O = s.current, H = window.devicePixelRatio || 1, k = O.clientWidth, Y = O.clientHeight;
2747
+ (S.width !== k * H || S.height !== Y * H) && (S.style.width = `${k}px`, S.style.height = `${Y}px`, S.width = k * H, S.height = Y * H), F.setTransform(H, 0, 0, H, 0, 0), F.clearRect(0, 0, k, Y);
2748
2748
  const { registry: i } = h, u = fs(h, O.scrollTop, O.clientHeight), R = O.scrollLeft, N = h.headerWidth, T = h.headerHeight;
2749
2749
  F.save(), F.beginPath(), F.rect(N, T, k - N, Y - T), F.clip();
2750
2750
  const M = he(o);
@@ -2755,24 +2755,24 @@ const hr = vt(({ x: e }) => {
2755
2755
  {
2756
2756
  const { y: W, x: V } = r;
2757
2757
  if (W !== -1 && V !== -1) {
2758
- const _ = Ke(h, { y: W, x: V }), ne = _.left - R, Z = _.top - u;
2759
- Pt(F, ne, Z, _.width, _.height, Et, 2, []);
2758
+ const _ = Ke(h, { y: W, x: V }), se = _.left - R, Z = _.top - u;
2759
+ Pt(F, se, Z, _.width, _.height, Et, 2, []);
2760
2760
  }
2761
2761
  }
2762
- const { copyingSheetId: I, copyingZone: A, cutting: H } = i;
2762
+ const { copyingSheetId: I, copyingZone: A, cutting: L } = i;
2763
2763
  if (h.id === I) {
2764
2764
  const W = he(A);
2765
- dt(F, h, u, R, k, Y, W, H ? br : vr, 2.5, H ? [4, 4] : [6, 4]);
2765
+ dt(F, h, u, R, k, Y, W, L ? br : vr, 2.5, L ? [4, 4] : [6, 4]);
2766
2766
  }
2767
2767
  Object.entries(e).forEach(([W, V]) => {
2768
2768
  const _ = Oe[V % Oe.length];
2769
2769
  try {
2770
- const ne = h.rangeToArea(W);
2771
- dt(F, h, u, R, k, Y, ne, _, 2, [5, 5]);
2770
+ const se = h.rangeToArea(W);
2771
+ dt(F, h, u, R, k, Y, se, _, 2, [5, 5]);
2772
2772
  } catch {
2773
2773
  }
2774
2774
  }), a.forEach((W, V) => {
2775
- const { y: _, x: ne } = Bt(W), Z = Ke(h, { y: _, x: ne }), X = Z.left - R, j = Z.top - u;
2775
+ const { y: _, x: se } = Bt(W), Z = Ke(h, { y: _, x: se }), X = Z.left - R, j = Z.top - u;
2776
2776
  if (X + Z.width < 0 || X > k || j + Z.height < 0 || j > Y)
2777
2777
  return;
2778
2778
  const w = V === g;
@@ -2788,27 +2788,27 @@ const hr = vt(({ x: e }) => {
2788
2788
  wr
2789
2789
  );
2790
2790
  }), F.restore();
2791
- const [B, Q] = ms(h, R, k), [te, se] = ps(h, u, Y);
2791
+ const [B, Q] = ms(h, R, k), [te, ne] = ps(h, u, Y);
2792
2792
  for (let W = B; W <= Q; W++) {
2793
2793
  let V = null, _ = null;
2794
2794
  if (Ye({ start: o.startX, end: o.endX }, W) && (V = "rgba(80, 180, 255, 1)", _ = c ? "rgba(128, 128, 128, 0.25)" : "rgba(0, 119, 255, 0.05)"), r.x === W && (V = Et, _ = c ? "rgba(128, 128, 128, 0.45)" : "rgba(0, 119, 255, 0.15)"), !V)
2795
2795
  continue;
2796
- const ne = Ke(h, { y: 1, x: W }), Z = ne.left - R;
2797
- if (Z + ne.width < N || Z > k)
2796
+ const se = Ke(h, { y: 1, x: W }), Z = se.left - R;
2797
+ if (Z + se.width < N || Z > k)
2798
2798
  continue;
2799
- const X = Math.max(Z, N), j = Math.min(Z + ne.width, k) - X;
2799
+ const X = Math.max(Z, N), j = Math.min(Z + se.width, k) - X;
2800
2800
  j > 0 && (_ && dn(F, X, 0, j, T, _), F.strokeStyle = V, F.lineWidth = 2, F.beginPath(), F.moveTo(X, T + 1), F.lineTo(X + j, T + 1), F.stroke());
2801
2801
  }
2802
- for (let W = te; W <= se; W++) {
2802
+ for (let W = te; W <= ne; W++) {
2803
2803
  if (h.isRowFiltered(W))
2804
2804
  continue;
2805
2805
  let V = null, _ = null;
2806
2806
  if (Ye({ start: o.startY, end: o.endY }, W) && (V = "rgba(80, 180, 255, 1)", _ = d ? "rgba(128, 128, 128, 0.25)" : "rgba(0, 119, 255, 0.05)"), r.y === W && (V = Et, _ = d ? "rgba(128, 128, 128, 0.45)" : "rgba(0, 119, 255, 0.15)"), !V)
2807
2807
  continue;
2808
- const ne = Ke(h, { y: W, x: 1 }), Z = ne.top - u;
2809
- if (Z + ne.height < T || Z > Y)
2808
+ const se = Ke(h, { y: W, x: 1 }), Z = se.top - u;
2809
+ if (Z + se.height < T || Z > Y)
2810
2810
  continue;
2811
- const X = Math.max(Z, T), j = Math.min(Z + ne.height, Y) - X;
2811
+ const X = Math.max(Z, T), j = Math.min(Z + se.height, Y) - X;
2812
2812
  j > 0 && (_ && dn(F, 0, X, N, j, _), F.strokeStyle = V, F.lineWidth = 2, F.beginPath(), F.moveTo(N + 1, X), F.lineTo(N + 1, X + j), F.stroke());
2813
2813
  }
2814
2814
  }, [
@@ -2886,12 +2886,12 @@ const hr = vt(({ x: e }) => {
2886
2886
  contextMenu: P
2887
2887
  } = t, y = r.current, [x, E] = J(null);
2888
2888
  U(() => {
2889
- const A = g.current, H = m.current;
2890
- if (!A || !H)
2889
+ const A = g.current, L = m.current;
2890
+ if (!A || !L)
2891
2891
  return;
2892
2892
  const B = requestAnimationFrame(() => {
2893
2893
  const Q = String(A.scrollWidth > A.clientWidth + 1), te = String(A.scrollHeight > A.clientHeight + 1);
2894
- H.getAttribute("data-overflow-x") !== Q && H.setAttribute("data-overflow-x", Q), H.getAttribute("data-overflow-y") !== te && H.setAttribute("data-overflow-y", te);
2894
+ L.getAttribute("data-overflow-x") !== Q && L.setAttribute("data-overflow-x", Q), L.getAttribute("data-overflow-y") !== te && L.setAttribute("data-overflow-y", te);
2895
2895
  });
2896
2896
  return () => cancelAnimationFrame(B);
2897
2897
  });
@@ -2921,21 +2921,21 @@ const hr = vt(({ x: e }) => {
2921
2921
  n({}), y.registry.paletteBySheetName = {};
2922
2922
  return;
2923
2923
  }
2924
- const H = {}, B = {}, Q = new gt(h.substring(1));
2924
+ const L = {}, B = {}, Q = new gt(h.substring(1));
2925
2925
  Q.tokenize();
2926
2926
  let te = 0;
2927
- for (const se of Q.tokens)
2928
- if (se.type === "REF" || se.type === "RANGE") {
2929
- const W = ys(se.stringify()), V = W.indexOf("!");
2927
+ for (const ne of Q.tokens)
2928
+ if (ne.type === "REF" || ne.type === "RANGE") {
2929
+ const W = ys(ne.stringify()), V = W.indexOf("!");
2930
2930
  if (V !== -1) {
2931
- const _ = W.substring(0, V), ne = W.substring(V + 1), Z = vs(_), X = ne.toUpperCase();
2931
+ const _ = W.substring(0, V), se = W.substring(V + 1), Z = vs(_), X = se.toUpperCase();
2932
2932
  B[Z] == null && (B[Z] = {}), B[Z][X] == null && (B[Z][X] = te++);
2933
2933
  } else {
2934
2934
  const _ = W.toUpperCase();
2935
- H[_] == null && (H[_] = te++);
2935
+ L[_] == null && (L[_] = te++);
2936
2936
  }
2937
2937
  }
2938
- n(H), y.registry.paletteBySheetName = B;
2938
+ n(L), y.registry.paletteBySheetName = B;
2939
2939
  }, [t.inputting, t.editingAddress, r]), U(() => {
2940
2940
  y && (y.registry.choosingAddress = Ie(o), y.registry.choosingSheetId = y.id);
2941
2941
  }, [o]), U(() => {
@@ -2954,7 +2954,7 @@ const hr = vt(({ x: e }) => {
2954
2954
  }, [r]), U(() => {
2955
2955
  !y || !y.eager || !y.registry.ready || y.resolveAll();
2956
2956
  }, [y, r]);
2957
- const L = {
2957
+ const H = {
2958
2958
  ...e,
2959
2959
  ...y ? y.registry.paletteBySheetName[y.name] : {}
2960
2960
  };
@@ -2983,7 +2983,7 @@ const hr = vt(({ x: e }) => {
2983
2983
  overflow: "clip"
2984
2984
  },
2985
2985
  children: [
2986
- /* @__PURE__ */ l(Sr, { refs: L }),
2986
+ /* @__PURE__ */ l(Sr, { refs: H }),
2987
2987
  /* @__PURE__ */ $("table", { className: "gs-table", children: [
2988
2988
  /* @__PURE__ */ l("thead", { className: "gs-thead", style: { height: y.headerHeight }, children: /* @__PURE__ */ $("tr", { className: "gs-row", children: [
2989
2989
  /* @__PURE__ */ l(
@@ -3012,11 +3012,11 @@ const hr = vt(({ x: e }) => {
3012
3012
  },
3013
3013
  onMouseUp: (A) => {
3014
3014
  A.stopPropagation();
3015
- const H = A.currentTarget, B = Number(H.dataset.pressX ?? A.clientX), Q = Number(H.dataset.pressY ?? A.clientY);
3015
+ const L = A.currentTarget, B = Number(L.dataset.pressX ?? A.clientX), Q = Number(L.dataset.pressY ?? A.clientY);
3016
3016
  if (Math.abs(A.clientX - B) > 4 || Math.abs(A.clientY - Q) > 4)
3017
3017
  return;
3018
- const se = H.getBoundingClientRect();
3019
- s(rt({ y: se.bottom, x: se.left }));
3018
+ const ne = L.getBoundingClientRect();
3019
+ s(rt({ y: ne.bottom, x: ne.left }));
3020
3020
  },
3021
3021
  children: "⋮"
3022
3022
  }
@@ -3053,11 +3053,11 @@ const hr = vt(({ x: e }) => {
3053
3053
  /* @__PURE__ */ l("th", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical" })
3054
3054
  ] }) }),
3055
3055
  /* @__PURE__ */ l("tbody", { className: "gs-sheet-body-data", children: (I = x == null ? void 0 : x.ys) == null ? void 0 : I.map((A) => {
3056
- var H;
3056
+ var L;
3057
3057
  return /* @__PURE__ */ $("tr", { className: `gs-row ${A % 2 === 0 ? "gs-row-even" : "gs-row-odd"}`, children: [
3058
3058
  /* @__PURE__ */ l(mr, { y: A }),
3059
3059
  /* @__PURE__ */ l("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left" }),
3060
- (H = x == null ? void 0 : x.xs) == null ? void 0 : H.map((B) => /* @__PURE__ */ l(dr, { y: A, x: B }, B)),
3060
+ (L = x == null ? void 0 : x.xs) == null ? void 0 : L.map((B) => /* @__PURE__ */ l(dr, { y: A, x: B }, B)),
3061
3061
  /* @__PURE__ */ l("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right" })
3062
3062
  ] }, A);
3063
3063
  }) })
@@ -3078,7 +3078,7 @@ const hr = vt(({ x: e }) => {
3078
3078
  inputting: f,
3079
3079
  editingAddress: v,
3080
3080
  dragging: P
3081
- } = n, y = h.current, x = ee(null), E = c.x === -1 ? "" : Ie(c), S = y == null ? void 0 : y.getCell(c, { resolution: "SYSTEM" }), F = (X = y == null ? void 0 : y.getSystem(c)) == null ? void 0 : X.spilledFrom, O = F ? Bt(F) : void 0, L = O != null ? Ie(O) : void 0;
3081
+ } = n, y = h.current, x = ee(null), E = c.x === -1 ? "" : Ie(c), S = y == null ? void 0 : y.getCell(c, { resolution: "SYSTEM" }), F = (X = y == null ? void 0 : y.getSystem(c)) == null ? void 0 : X.spilledFrom, O = F ? Bt(F) : void 0, H = O != null ? Ie(O) : void 0;
3082
3082
  U(() => {
3083
3083
  var q;
3084
3084
  if (!y)
@@ -3094,7 +3094,7 @@ const hr = vt(({ x: e }) => {
3094
3094
  );
3095
3095
  U(() => {
3096
3096
  const w = new ResizeObserver((q) => {
3097
- q.forEach(se);
3097
+ q.forEach(ne);
3098
3098
  });
3099
3099
  return p.current && w.observe(p.current), () => {
3100
3100
  w.disconnect();
@@ -3113,11 +3113,11 @@ const hr = vt(({ x: e }) => {
3113
3113
  selectionStart: o,
3114
3114
  optionsAll: i,
3115
3115
  functions: y == null ? void 0 : y.registry.functions
3116
- }), H = ee(!1), B = p.current, Q = D((w) => {
3116
+ }), L = ee(!1), B = p.current, Q = D((w) => {
3117
3117
  t(ae(w.currentTarget.value)), a(w.currentTarget.selectionStart);
3118
3118
  }, []), te = D((w) => {
3119
3119
  a(w.currentTarget.selectionStart);
3120
- }, []), se = D(() => {
3120
+ }, []), ne = D(() => {
3121
3121
  !x.current || !p.current || (x.current.style.height = `${p.current.clientHeight}px`, x.current.scrollLeft = p.current.scrollLeft, x.current.scrollTop = p.current.scrollTop);
3122
3122
  }, []), W = D(
3123
3123
  (w) => {
@@ -3135,7 +3135,7 @@ const hr = vt(({ x: e }) => {
3135
3135
  );
3136
3136
  const V = D(
3137
3137
  (w) => {
3138
- if (w.nativeEvent.isComposing || H.current)
3138
+ if (w.nativeEvent.isComposing || L.current)
3139
3139
  return;
3140
3140
  if (w.ctrlKey || !y)
3141
3141
  return !0;
@@ -3145,9 +3145,9 @@ const hr = vt(({ x: e }) => {
3145
3145
  if (w.preventDefault(), u.length) {
3146
3146
  const re = u[R];
3147
3147
  if (re == null ? void 0 : re.isFunction) {
3148
- const { value: Ce, selectionStart: Le } = N(re);
3148
+ const { value: Ce, selectionStart: He } = N(re);
3149
3149
  return t(ae(Ce)), setTimeout(() => {
3150
- p.current && (z(p.current), p.current.setSelectionRange(Le, Le));
3150
+ p.current && (z(p.current), p.current.setSelectionRange(He, He));
3151
3151
  }, 0), !1;
3152
3152
  } else {
3153
3153
  const Ce = y.update({ diff: { [E]: { value: re.value } }, partial: !0 });
@@ -3204,7 +3204,7 @@ const hr = vt(({ x: e }) => {
3204
3204
  break;
3205
3205
  }
3206
3206
  const de = y.getCell(c, { resolution: "SYSTEM" });
3207
- return K.hasOperation(de == null ? void 0 : de.prevention, K.Write) && (console.warn("This cell is protected from writing."), w.preventDefault()), se(), !1;
3207
+ return K.hasOperation(de == null ? void 0 : de.prevention, K.Write) && (console.warn("This cell is protected from writing."), w.preventDefault()), ne(), !1;
3208
3208
  },
3209
3209
  [
3210
3210
  y,
@@ -3212,7 +3212,7 @@ const hr = vt(({ x: e }) => {
3212
3212
  E,
3213
3213
  s,
3214
3214
  k,
3215
- se,
3215
+ ne,
3216
3216
  u,
3217
3217
  R,
3218
3218
  N,
@@ -3232,9 +3232,9 @@ const hr = vt(({ x: e }) => {
3232
3232
  }
3233
3233
  },
3234
3234
  [u, N, k, t]
3235
- ), ne = e ? {} : { visibility: "hidden" };
3235
+ ), se = e ? {} : { visibility: "hidden" };
3236
3236
  if (!y)
3237
- return /* @__PURE__ */ $("label", { className: "gs-formula-bar gs-hidden", style: ne, children: [
3237
+ return /* @__PURE__ */ $("label", { className: "gs-formula-bar gs-hidden", style: se, children: [
3238
3238
  /* @__PURE__ */ l("div", { className: "gs-selecting-address" }),
3239
3239
  /* @__PURE__ */ l("div", { className: "gs-fx", children: "fx" }),
3240
3240
  /* @__PURE__ */ l("div", { className: "gs-formula-bar-editor-inner", children: /* @__PURE__ */ l("textarea", {}) })
@@ -3277,11 +3277,11 @@ const hr = vt(({ x: e }) => {
3277
3277
  {
3278
3278
  className: "gs-formula-bar",
3279
3279
  "data-sheet-id": n.sheetId,
3280
- "data-spill": L != null ? "true" : void 0,
3281
- style: ne,
3280
+ "data-spill": H != null ? "true" : void 0,
3281
+ style: se,
3282
3282
  children: [
3283
3283
  /* @__PURE__ */ l($e, { style: { position: "absolute", left: 0, top: 0, zIndex: 2 }, vertical: -1 }),
3284
- /* @__PURE__ */ l("div", { className: "gs-selecting-address", children: L ?? E }),
3284
+ /* @__PURE__ */ l("div", { className: "gs-selecting-address", children: H ?? E }),
3285
3285
  /* @__PURE__ */ l("div", { className: "gs-fx", children: "fx" }),
3286
3286
  /* @__PURE__ */ $("div", { className: "gs-formula-bar-editor-inner", children: [
3287
3287
  /* @__PURE__ */ l(
@@ -3306,7 +3306,7 @@ const hr = vt(({ x: e }) => {
3306
3306
  spellCheck: !1,
3307
3307
  ref: p,
3308
3308
  value: f,
3309
- readOnly: L != null,
3309
+ readOnly: H != null,
3310
3310
  onInput: Q,
3311
3311
  onFocus: W,
3312
3312
  onSelect: te,
@@ -3314,14 +3314,14 @@ const hr = vt(({ x: e }) => {
3314
3314
  w.stopPropagation();
3315
3315
  },
3316
3316
  onKeyDown: V,
3317
- onKeyUp: se,
3317
+ onKeyUp: ne,
3318
3318
  onCompositionStart: () => {
3319
- H.current = !0;
3319
+ L.current = !0;
3320
3320
  },
3321
3321
  onCompositionEnd: (w) => {
3322
- H.current = !1, t(ae(w.currentTarget.value));
3322
+ L.current = !1, t(ae(w.currentTarget.value));
3323
3323
  },
3324
- onScroll: se,
3324
+ onScroll: ne,
3325
3325
  onMouseEnter: (w) => {
3326
3326
  t(ht(!0));
3327
3327
  },
@@ -3405,7 +3405,7 @@ const hr = vt(({ x: e }) => {
3405
3405
  return !1;
3406
3406
  const { startY: u, startX: R, endY: N, endX: T } = d;
3407
3407
  return !(u === N && R === T);
3408
- }, [d]), L = Ze(() => {
3408
+ }, [d]), H = Ze(() => {
3409
3409
  if (!d || !O)
3410
3410
  return "";
3411
3411
  const { startY: u, startX: R, endY: N, endX: T } = d, M = `${Ne(Math.min(R, T))}${ke(Math.min(u, N))}`, I = `${Ne(Math.max(R, T))}${ke(Math.max(u, N))}`;
@@ -3469,9 +3469,9 @@ const hr = vt(({ x: e }) => {
3469
3469
  ]
3470
3470
  }
3471
3471
  ) }),
3472
- !c && O && /* @__PURE__ */ l("div", { className: "gs-search-button gs-search-range", children: /* @__PURE__ */ $("span", { onClick: k, title: `Limit to range: ${L}`, children: [
3472
+ !c && O && /* @__PURE__ */ l("div", { className: "gs-search-button gs-search-range", children: /* @__PURE__ */ $("span", { onClick: k, title: `Limit to range: ${H}`, children: [
3473
3473
  "in ",
3474
- L
3474
+ H
3475
3475
  ] }) }),
3476
3476
  /* @__PURE__ */ l("div", { className: "gs-search-button gs-search-casesensitive", children: /* @__PURE__ */ l(
3477
3477
  "span",
@@ -3524,7 +3524,7 @@ function Kr({
3524
3524
  "--gs-mx-bt": P(v, "top"),
3525
3525
  "--gs-mx-br": P(v, "right"),
3526
3526
  "--gs-mx-bb": P(v, "bottom")
3527
- }, x = ee(null), E = ee(null), S = ee(null), F = ee(null), O = ee(null), L = ee(null), k = ee(null), Y = Mr(), i = t ?? Y, u = Tr(), R = s ?? u, N = xs({}), T = g ?? N, { registry: M } = T, [I] = J(() => n ? (M._componentSheetIds.has(n) || M._componentSheetIds.set(n, ++M.sheetHead), M._componentSheetIds.get(n)) : ++M.sheetHead), A = ee(null), [H] = J(() => {
3527
+ }, x = ee(null), E = ee(null), S = ee(null), F = ee(null), O = ee(null), H = ee(null), k = ee(null), Y = Mr(), i = t ?? Y, u = Tr(), R = s ?? u, N = xs({}), T = g ?? N, { registry: M } = T, [I] = J(() => n ? (M._componentSheetIds.has(n) || M._componentSheetIds.set(n, ++M.sheetHead), M._componentSheetIds.get(n)) : ++M.sheetHead), A = ee(null), [L] = J(() => {
3528
3528
  var C;
3529
3529
  n || (n = `Sheet${I}`, console.debug("GridSheet: sheetName is not provided, using default name:", n));
3530
3530
  const { limits: oe, contextMenu: pe, rowMenu: be, colMenu: we, eager: qe } = r, Se = new Es({
@@ -3541,7 +3541,7 @@ function Kr({
3541
3541
  mainRef: S,
3542
3542
  searchInputRef: F,
3543
3543
  editorRef: O,
3544
- largeEditorRef: L,
3544
+ largeEditorRef: H,
3545
3545
  tabularRef: k,
3546
3546
  choosing: { y: 1, x: 1 },
3547
3547
  inputting: "",
@@ -3576,13 +3576,13 @@ function Kr({
3576
3576
  };
3577
3577
  }), [B, Q] = Xs(
3578
3578
  ks,
3579
- H,
3580
- () => H
3579
+ L,
3580
+ () => L
3581
3581
  );
3582
3582
  U(() => {
3583
3583
  As();
3584
3584
  }, []);
3585
- const te = typeof r.sheetWidth == "string", se = typeof r.sheetHeight == "string", W = r.matrixAlignment ?? "none", V = W === "horizontal" || W === "both", _ = W === "vertical" || W === "both", [ne, Z] = J(!1), [X, j] = J(!1), w = V && (r.sheetWidth != null || ne), q = _ && (r.sheetHeight != null || X), [de, re] = J(
3585
+ const te = typeof r.sheetWidth == "string", ne = typeof r.sheetHeight == "string", W = r.matrixAlignment ?? "none", V = W === "horizontal" || W === "both", _ = W === "vertical" || W === "both", [se, Z] = J(!1), [X, j] = J(!1), w = V && (r.sheetWidth != null || se), q = _ && (r.sheetHeight != null || X), [de, re] = J(
3586
3586
  typeof (r == null ? void 0 : r.sheetHeight) == "number" ? r.sheetHeight : Dr(e)
3587
3587
  ), [ye, Ce] = J(
3588
3588
  typeof (r == null ? void 0 : r.sheetWidth) == "number" ? r.sheetWidth : Fr(e)
@@ -3593,23 +3593,23 @@ function Kr({
3593
3593
  return;
3594
3594
  let pe = !0;
3595
3595
  const be = new ResizeObserver(() => {
3596
- if (oe.style.width && Z(!0), oe.style.height && j(!0), pe && (pe = !1, !te && !se))
3596
+ if (oe.style.width && Z(!0), oe.style.height && j(!0), pe && (pe = !1, !te && !ne))
3597
3597
  return;
3598
3598
  const we = x.current;
3599
- re(we ? Math.min(oe.clientHeight, we.clientHeight) : oe.clientHeight), Ce(we ? Math.min(oe.clientWidth, we.clientWidth) : oe.clientWidth);
3599
+ (ne || oe.style.height) && re(we ? Math.min(oe.clientHeight, we.clientHeight) : oe.clientHeight), Ce(we ? Math.min(oe.clientWidth, we.clientWidth) : oe.clientWidth);
3600
3600
  });
3601
3601
  return be.observe(oe), () => be.disconnect();
3602
- }, [te, se]), U(() => {
3602
+ }, [te, ne]), U(() => {
3603
3603
  typeof r.sheetHeight == "number" && re(r.sheetHeight);
3604
3604
  }, [r.sheetHeight]), U(() => {
3605
3605
  typeof r.sheetWidth == "number" && Ce(r.sheetWidth);
3606
3606
  }, [r.sheetWidth]);
3607
- const [Le, Ve] = J(!1), He = ee(B);
3608
- He.current = B;
3607
+ const [He, Ve] = J(!1), Le = ee(B);
3608
+ Le.current = B;
3609
3609
  const Rt = D(
3610
3610
  (oe) => {
3611
3611
  const pe = Ms(oe.type), be = Ts(oe.type);
3612
- if (!(He.current.pendingAsyncOp != null && (pe || be))) {
3612
+ if (!(Le.current.pendingAsyncOp != null && (pe || be))) {
3613
3613
  if (pe) {
3614
3614
  Q(oe);
3615
3615
  return;
@@ -3648,7 +3648,7 @@ function Kr({
3648
3648
  })
3649
3649
  ), (be = ve.postCommit) == null || be.call(ve));
3650
3650
  } catch (we) {
3651
- console.error("[gridsheet] async op failed:", we), oe || Q(sn({ sheet: He.current.sheetReactive.current, selectingZone: ve.selectingZone }));
3651
+ console.error("[gridsheet] async op failed:", we), oe || Q(sn({ sheet: Le.current.sheetReactive.current, selectingZone: ve.selectingZone }));
3652
3652
  }
3653
3653
  })
3654
3654
  );
@@ -3667,13 +3667,13 @@ function Kr({
3667
3667
  "data-matrix-align": W,
3668
3668
  "data-rows": ((ot = B.sheetReactive.current) == null ? void 0 : ot.numRows) ?? 0,
3669
3669
  "data-cols": ((it = B.sheetReactive.current) == null ? void 0 : it.numCols) ?? 0,
3670
- style: te || se ? {
3670
+ style: te || ne ? {
3671
3671
  ...y,
3672
3672
  // inline-flex (when width isn't filled) keeps the prior shrink-to-content width.
3673
3673
  display: te ? "flex" : "inline-flex",
3674
3674
  flexDirection: "column",
3675
3675
  ...te ? { width: r.sheetWidth } : null,
3676
- ...se ? { height: r.sheetHeight } : null
3676
+ ...ne ? { height: r.sheetHeight } : null
3677
3677
  } : y,
3678
3678
  children: [
3679
3679
  /* @__PURE__ */ l("div", { className: "gs-flash-overlay", ref: E }),
@@ -3690,8 +3690,11 @@ function Kr({
3690
3690
  ...te ? { width: "100%" } : null,
3691
3691
  maxWidth: "100%",
3692
3692
  // In fill-height mode the parent's height is the limit (flex:1 fills the remaining
3693
- // space below the formula bar); otherwise cap at the viewport bottom as before.
3694
- ...se ? { flex: 1, minHeight: 0, maxHeight: "100%" } : {
3693
+ // space below the formula bar). With an explicit fixed height, honor it exactly
3694
+ // (never shrink to the viewport otherwise a grid placed low on a page or in a
3695
+ // short viewport collapses). Only the shrink-to-content case caps at the viewport
3696
+ // bottom so a very tall grid stays usable within the current view.
3697
+ ...ne ? { flex: 1, minHeight: 0, maxHeight: "100%" } : q ? { maxHeight: de } : {
3695
3698
  maxHeight: S.current ? window.innerHeight - S.current.getBoundingClientRect().top : (((at = B.sheetReactive.current) == null ? void 0 : at.fullHeight) || 0) + 2
3696
3699
  },
3697
3700
  resize: c,
@@ -3720,8 +3723,8 @@ function Kr({
3720
3723
  /* @__PURE__ */ l(zs, {}),
3721
3724
  B.pendingAsyncOp != null ? (
3722
3725
  // Chunked async mutation (large fill/paste): imperative progress, grid not re-rendered.
3723
- /* @__PURE__ */ l(Ls, { ref: _e, label: B.pendingAsyncOp.label })
3724
- ) : Le ? (
3726
+ /* @__PURE__ */ l(Hs, { ref: _e, label: B.pendingAsyncOp.label })
3727
+ ) : He ? (
3725
3728
  // Internal sync mutation in flight: brief indeterminate spinner.
3726
3729
  /* @__PURE__ */ l("div", { className: "gs-loading-overlay", children: /* @__PURE__ */ l("div", { className: "gs-loading-spinner" }) })
3727
3730
  ) : m ? (
@@ -3746,7 +3749,7 @@ const Dr = (e) => {
3746
3749
  const n = kn(e);
3747
3750
  let t = ((s = e[0]) == null ? void 0 : s.height) ?? Ds;
3748
3751
  for (let m = 1; m <= n.numRows; m++) {
3749
- const c = ke(m), d = ((r = e == null ? void 0 : e[c]) == null ? void 0 : r.height) || ((o = e == null ? void 0 : e["0" + c]) == null ? void 0 : o.height) || ((a = e == null ? void 0 : e[Fs]) == null ? void 0 : a.height) || ((g = e == null ? void 0 : e.default) == null ? void 0 : g.height) || Lt;
3752
+ const c = ke(m), d = ((r = e == null ? void 0 : e[c]) == null ? void 0 : r.height) || ((o = e == null ? void 0 : e["0" + c]) == null ? void 0 : o.height) || ((a = e == null ? void 0 : e[Fs]) == null ? void 0 : a.height) || ((g = e == null ? void 0 : e.default) == null ? void 0 : g.height) || Ht;
3750
3753
  if (t + d > rn)
3751
3754
  return rn;
3752
3755
  t += d;
@@ -3794,7 +3797,7 @@ export {
3794
3797
  nr as MenuItem,
3795
3798
  ls as Pending,
3796
3799
  Gr as PercentagePolicyMixin,
3797
- Lr as PluginBase,
3800
+ Hr as PluginBase,
3798
3801
  Qr as Policy,
3799
3802
  Tn as ProgressOverlay,
3800
3803
  Jr as RangeEntity,
@@ -3810,7 +3813,7 @@ export {
3810
3813
  ao as addressesToAreas,
3811
3814
  lo as addressesToCols,
3812
3815
  co as addressesToRows,
3813
- Hr as applyers,
3816
+ Lr as applyers,
3814
3817
  xn as areaToRange,
3815
3818
  ft as areaToZone,
3816
3819
  uo as buildInitialCells,
@@ -3842,7 +3845,7 @@ export {
3842
3845
  ko as r2y,
3843
3846
  zt as registerMenuComponent,
3844
3847
  Ao as rh,
3845
- Hs as sheet2csv,
3848
+ Ls as sheet2csv,
3846
3849
  Mo as stripMatrix,
3847
3850
  To as toCellCols,
3848
3851
  Do as toCellMatrix,
@@ -3852,14 +3855,14 @@ export {
3852
3855
  $o as toValueMatrix,
3853
3856
  Po as toValueMatrixAsync,
3854
3857
  Xo as toValueObject,
3855
- Lo as toValueRows,
3858
+ Ho as toValueRows,
3856
3859
  st as updateSheet,
3857
3860
  xs as useBook,
3858
3861
  Xr as useInitialPluginContext,
3859
3862
  Xn as usePluginContext,
3860
3863
  Mr as useSheetRef,
3861
3864
  Tr as useStoreRef,
3862
- Ho as userActions,
3865
+ Lo as userActions,
3863
3866
  Ne as x2c,
3864
3867
  ke as y2r,
3865
3868
  he as zoneToArea