@gridsheet/react-core 3.0.0-rc.8 → 3.0.0

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.
Files changed (141) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +39 -1
  3. package/dist/components/Cell.d.ts.map +1 -0
  4. package/dist/components/CellStateOverlay.d.ts.map +1 -0
  5. package/dist/components/ColumnMenu.d.ts.map +1 -0
  6. package/dist/components/ColumnMenuFilterSection.d.ts.map +1 -0
  7. package/dist/components/ColumnMenuLabelSection.d.ts.map +1 -0
  8. package/dist/components/ColumnMenuSortSection.d.ts.map +1 -0
  9. package/dist/components/ContextMenu.d.ts.map +1 -0
  10. package/dist/components/Editor.d.ts.map +1 -0
  11. package/dist/components/EditorOptions.d.ts.map +1 -0
  12. package/dist/components/Emitter.d.ts.map +1 -0
  13. package/dist/components/Fixed.d.ts.map +1 -0
  14. package/dist/components/FormulaBar.d.ts.map +1 -0
  15. package/dist/{react-core/src/components → components}/FunctionGuide.d.ts +1 -2
  16. package/dist/components/FunctionGuide.d.ts.map +1 -0
  17. package/dist/components/GridSheet.d.ts.map +1 -0
  18. package/dist/components/HeaderCellLeft.d.ts.map +1 -0
  19. package/dist/components/HeaderCellTop.d.ts.map +1 -0
  20. package/dist/components/MenuItem.d.ts.map +1 -0
  21. package/dist/components/PluginBase.d.ts.map +1 -0
  22. package/dist/components/Resizer.d.ts.map +1 -0
  23. package/dist/components/RowMenu.d.ts.map +1 -0
  24. package/dist/components/ScrollHandle.d.ts.map +1 -0
  25. package/dist/components/SearchBar.d.ts.map +1 -0
  26. package/dist/components/StoreObserver.d.ts.map +1 -0
  27. package/dist/components/Tabular.d.ts.map +1 -0
  28. package/dist/components/svg/AddIcon.d.ts.map +1 -0
  29. package/dist/components/svg/Base.d.ts.map +1 -0
  30. package/dist/components/svg/CloseIcon.d.ts.map +1 -0
  31. package/dist/components/svg/SearchIcon.d.ts.map +1 -0
  32. package/dist/{react-core/src/components → components}/useAutocomplete.d.ts +1 -3
  33. package/dist/components/useAutocomplete.d.ts.map +1 -0
  34. package/dist/{hooks-6pHKH3g9.mjs → hooks-Y7BI_RNj.mjs} +141 -147
  35. package/dist/hooks-Y7BI_RNj.mjs.map +1 -0
  36. package/dist/index.d.ts +17 -2
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +441 -457
  39. package/dist/index.js.map +1 -1
  40. package/dist/{react-core/src/lib → lib}/clipboard.d.ts +1 -1
  41. package/dist/lib/clipboard.d.ts.map +1 -0
  42. package/dist/lib/events.d.ts.map +1 -0
  43. package/dist/{react-core/src/lib → lib}/hooks.d.ts +1 -1
  44. package/dist/lib/hooks.d.ts.map +1 -0
  45. package/dist/{react-core/src/lib → lib}/menu.d.ts +1 -1
  46. package/dist/lib/menu.d.ts.map +1 -0
  47. package/dist/lib/paste.d.ts.map +1 -0
  48. package/dist/lib/style.d.ts.map +1 -0
  49. package/dist/policy/checkbox.d.ts +3 -0
  50. package/dist/policy/checkbox.d.ts.map +1 -0
  51. package/dist/spellbook.d.ts +6 -2
  52. package/dist/spellbook.d.ts.map +1 -0
  53. package/dist/spellbook.js +1 -1
  54. package/dist/{react-core/src/store → store}/actions.d.ts +1 -1
  55. package/dist/store/actions.d.ts.map +1 -0
  56. package/dist/store/applyers.d.ts.map +1 -0
  57. package/dist/{react-core/src/store → store}/helpers.d.ts +1 -1
  58. package/dist/store/helpers.d.ts.map +1 -0
  59. package/dist/store/index.d.ts.map +1 -0
  60. package/dist/{react-core/src/types.d.ts → types.d.ts} +2 -5
  61. package/dist/types.d.ts.map +1 -0
  62. package/package.json +8 -10
  63. package/dist/hooks-6pHKH3g9.mjs.map +0 -1
  64. package/dist/react-core/src/components/Cell.d.ts.map +0 -1
  65. package/dist/react-core/src/components/CellStateOverlay.d.ts.map +0 -1
  66. package/dist/react-core/src/components/ColumnMenu.d.ts.map +0 -1
  67. package/dist/react-core/src/components/ColumnMenuFilterSection.d.ts.map +0 -1
  68. package/dist/react-core/src/components/ColumnMenuLabelSection.d.ts.map +0 -1
  69. package/dist/react-core/src/components/ColumnMenuSortSection.d.ts.map +0 -1
  70. package/dist/react-core/src/components/ContextMenu.d.ts.map +0 -1
  71. package/dist/react-core/src/components/Editor.d.ts.map +0 -1
  72. package/dist/react-core/src/components/EditorOptions.d.ts.map +0 -1
  73. package/dist/react-core/src/components/Emitter.d.ts.map +0 -1
  74. package/dist/react-core/src/components/Fixed.d.ts.map +0 -1
  75. package/dist/react-core/src/components/FormulaBar.d.ts.map +0 -1
  76. package/dist/react-core/src/components/FunctionGuide.d.ts.map +0 -1
  77. package/dist/react-core/src/components/GridSheet.d.ts.map +0 -1
  78. package/dist/react-core/src/components/HeaderCellLeft.d.ts.map +0 -1
  79. package/dist/react-core/src/components/HeaderCellTop.d.ts.map +0 -1
  80. package/dist/react-core/src/components/MenuItem.d.ts.map +0 -1
  81. package/dist/react-core/src/components/PluginBase.d.ts.map +0 -1
  82. package/dist/react-core/src/components/Resizer.d.ts.map +0 -1
  83. package/dist/react-core/src/components/RowMenu.d.ts.map +0 -1
  84. package/dist/react-core/src/components/ScrollHandle.d.ts.map +0 -1
  85. package/dist/react-core/src/components/SearchBar.d.ts.map +0 -1
  86. package/dist/react-core/src/components/StoreObserver.d.ts.map +0 -1
  87. package/dist/react-core/src/components/Tabular.d.ts.map +0 -1
  88. package/dist/react-core/src/components/svg/AddIcon.d.ts.map +0 -1
  89. package/dist/react-core/src/components/svg/Base.d.ts.map +0 -1
  90. package/dist/react-core/src/components/svg/CloseIcon.d.ts.map +0 -1
  91. package/dist/react-core/src/components/svg/SearchIcon.d.ts.map +0 -1
  92. package/dist/react-core/src/components/useAutocomplete.d.ts.map +0 -1
  93. package/dist/react-core/src/index.d.ts +0 -17
  94. package/dist/react-core/src/index.d.ts.map +0 -1
  95. package/dist/react-core/src/lib/clipboard.d.ts.map +0 -1
  96. package/dist/react-core/src/lib/events.d.ts.map +0 -1
  97. package/dist/react-core/src/lib/hooks.d.ts.map +0 -1
  98. package/dist/react-core/src/lib/menu.d.ts.map +0 -1
  99. package/dist/react-core/src/lib/paste.d.ts.map +0 -1
  100. package/dist/react-core/src/lib/style.d.ts.map +0 -1
  101. package/dist/react-core/src/policy/checkbox.d.ts +0 -3
  102. package/dist/react-core/src/policy/checkbox.d.ts.map +0 -1
  103. package/dist/react-core/src/spellbook.d.ts +0 -6
  104. package/dist/react-core/src/spellbook.d.ts.map +0 -1
  105. package/dist/react-core/src/store/actions.d.ts.map +0 -1
  106. package/dist/react-core/src/store/applyers.d.ts.map +0 -1
  107. package/dist/react-core/src/store/helpers.d.ts.map +0 -1
  108. package/dist/react-core/src/store/index.d.ts.map +0 -1
  109. package/dist/react-core/src/types.d.ts.map +0 -1
  110. /package/dist/{react-core/src/components → components}/Cell.d.ts +0 -0
  111. /package/dist/{react-core/src/components → components}/CellStateOverlay.d.ts +0 -0
  112. /package/dist/{react-core/src/components → components}/ColumnMenu.d.ts +0 -0
  113. /package/dist/{react-core/src/components → components}/ColumnMenuFilterSection.d.ts +0 -0
  114. /package/dist/{react-core/src/components → components}/ColumnMenuLabelSection.d.ts +0 -0
  115. /package/dist/{react-core/src/components → components}/ColumnMenuSortSection.d.ts +0 -0
  116. /package/dist/{react-core/src/components → components}/ContextMenu.d.ts +0 -0
  117. /package/dist/{react-core/src/components → components}/Editor.d.ts +0 -0
  118. /package/dist/{react-core/src/components → components}/EditorOptions.d.ts +0 -0
  119. /package/dist/{react-core/src/components → components}/Emitter.d.ts +0 -0
  120. /package/dist/{react-core/src/components → components}/Fixed.d.ts +0 -0
  121. /package/dist/{react-core/src/components → components}/FormulaBar.d.ts +0 -0
  122. /package/dist/{react-core/src/components → components}/GridSheet.d.ts +0 -0
  123. /package/dist/{react-core/src/components → components}/HeaderCellLeft.d.ts +0 -0
  124. /package/dist/{react-core/src/components → components}/HeaderCellTop.d.ts +0 -0
  125. /package/dist/{react-core/src/components → components}/MenuItem.d.ts +0 -0
  126. /package/dist/{react-core/src/components → components}/PluginBase.d.ts +0 -0
  127. /package/dist/{react-core/src/components → components}/Resizer.d.ts +0 -0
  128. /package/dist/{react-core/src/components → components}/RowMenu.d.ts +0 -0
  129. /package/dist/{react-core/src/components → components}/ScrollHandle.d.ts +0 -0
  130. /package/dist/{react-core/src/components → components}/SearchBar.d.ts +0 -0
  131. /package/dist/{react-core/src/components → components}/StoreObserver.d.ts +0 -0
  132. /package/dist/{react-core/src/components → components}/Tabular.d.ts +0 -0
  133. /package/dist/{react-core/src/components → components}/svg/AddIcon.d.ts +0 -0
  134. /package/dist/{react-core/src/components → components}/svg/Base.d.ts +0 -0
  135. /package/dist/{react-core/src/components → components}/svg/CloseIcon.d.ts +0 -0
  136. /package/dist/{react-core/src/components → components}/svg/SearchIcon.d.ts +0 -0
  137. /package/dist/{react-core/src/lib → lib}/events.d.ts +0 -0
  138. /package/dist/{react-core/src/lib → lib}/paste.d.ts +0 -0
  139. /package/dist/{react-core/src/lib → lib}/style.d.ts +0 -0
  140. /package/dist/{react-core/src/store → store}/applyers.d.ts +0 -0
  141. /package/dist/{react-core/src/store → store}/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,27 +1,11 @@
1
- import { BaseFunction as _r, BaseFunctionAsync as jr, DEFAULT_HISTORY_LIMIT as Vr, FormulaError as qr, FormulaParser as Gr, Lexer as Qr, Pending as Jr, Policy as eo, RangeEntity as to, RefEntity as no, Registry as so, Sheet as ro, Spilling as oo, ThousandSeparatorPolicyMixin as io, Time as lo, ValueEntity as ao, a2p as co, aa2oa as uo, addressesToAreas as go, addressesToCols as fo, addressesToRows as ho, areaToRange as mo, areaToZone as po, buildInitialCells as yo, buildInitialCellsFromOrigin as vo, c2x as bo, ch as wo, check as Ro, conditionArg as Co, createBook as So, createBooleanMask as No, createRegistry as Eo, eachMatrix as xo, ensureBoolean as ko, ensureDate as To, ensureNumber as Ao, ensureString as Mo, matrixShape as Do, oa2aa as Io, operations as Fo, p2a as Yo, r2y as $o, rh as Po, stripMatrix as Xo, toCellCols as Oo, toCellMatrix as Ho, toCellObject as Lo, toCellRows as Bo, toValueCols as Ko, toValueMatrix as Zo, toValueObject as Uo, toValueRows as zo, x2c as Wo, y2r as _o, zoneToArea as jo } from "@gridsheet/core";
1
+ import { calcSideStyle as Vn, clampPopup as Jt, clampLeft as qn, zoneToArea as de, focus as H, Lexer as qe, getFunctionHelps as $t, expandInput as Gn, y2r as ve, x2c as me, resetInput as Qn, handleFormulaQuoteAutoClose as en, areaToZone as Ge, insertTextAtCursor as tn, operations as O, isRefInsertable as nn, COLOR_PALETTE as De, DEFAULT_WIDTH as yt, DEFAULT_HEIGHT as vt, between as Te, makeSequence as Pt, p2a as Ne, MIN_HEIGHT as Xt, MIN_WIDTH as Ot, zoneShape as te, getLabel as bt, FormulaError as Jn, Pending as es, insertRef as Me, areaToRange as sn, calcBelowPosition as ts, hAlignTransform as ns, among as ss, getAreaInTabular as Ht, isFocus as rs, Autofill as os, getCellRectPositions as Ie, a2p as wt, virtualize as Lt, stripAddressAbsolute as is, stripSheetName as ls, preventSafariBounce as as, smartScroll as cs, isZoneNotSelected as us, Sheet as ds, embedStyle as gs, getMaxSizesFromCells as rn, HEADER_HEIGHT as hs, DEFAULT_ROW_KEY as fs, SHEET_HEIGHT as Bt, HEADER_WIDTH as ms, DEFAULT_COL_KEY as ps, SHEET_WIDTH as Kt } from "@gridsheet/core";
2
+ import { BaseFunction as Ir, BaseFunctionAsync as Fr, DEFAULT_HISTORY_LIMIT as Yr, FormulaError as $r, FormulaParser as Pr, Lexer as Xr, Pending as Or, Policy as Hr, RangeEntity as Lr, RefEntity as Br, Registry as Kr, Sheet as Zr, Spilling as Ur, ThousandSeparatorPolicyMixin as zr, Time as Wr, ValueEntity as _r, a2p as jr, aa2oa as Vr, addressesToAreas as qr, addressesToCols as Gr, addressesToRows as Qr, areaToRange as Jr, areaToZone as eo, buildInitialCells as to, buildInitialCellsFromOrigin as no, c2x as so, ch as ro, check as oo, conditionArg as io, createBook as lo, createBooleanMask as ao, createRegistry as co, eachMatrix as uo, ensureBoolean as go, ensureDate as ho, ensureNumber as fo, ensureString as mo, matrixShape as po, oa2aa as yo, operations as vo, p2a as bo, r2y as wo, rh as Ro, stripMatrix as Co, toCellCols as So, toCellMatrix as No, toCellObject as Eo, toCellRows as xo, toValueCols as ko, toValueMatrix as To, toValueObject as Ao, toValueRows as Mo, x2c as Do, y2r as Io, zoneToArea as Fo } from "@gridsheet/core";
2
3
  import { jsxs as F, jsx as c, Fragment as we } from "react/jsx-runtime";
3
- import at, { createContext as Jt, useRef as oe, useContext as ie, useLayoutEffect as qe, useState as J, useMemo as Ye, useCallback as M, memo as nt, useEffect as U, createRef as en, useReducer as Vn } from "react";
4
- import { DEFAULT_WIDTH as yt, DEFAULT_HEIGHT as vt, MIN_HEIGHT as $t, MIN_WIDTH as Pt, HEADER_HEIGHT as qn, DEFAULT_ROW_KEY as Gn, SHEET_HEIGHT as Xt, HEADER_WIDTH as Qn, DEFAULT_COL_KEY as Jn, SHEET_WIDTH as Ot } from "@gridsheet/core/constants";
5
- import { u as es, s as ue, w as Ze, a as re, b as Ue, r as ct, c as tn, d as nn, e as $e, f as sn, g as rn, h as be, i as _e, j as ts, k as Ht, l as ut, p as dt, m as Ge, n as Se, o as gt, q as ft, t as De, v as bt, x as on, y as ln, z as an, A as cn, B as un, C as dn, D as ze, E as Qe, F as ht, G as st, H as ns, I as Pe, J as he, K as xe, L as gn, M as Ke, N as Lt, O as fn, P as Bt, Q as Kt, R as ss, S as rs, T as Zt, U as os, V as is } from "./hooks-6pHKH3g9.mjs";
6
- import { W as qo } from "./hooks-6pHKH3g9.mjs";
7
- import { createPortal as wt } from "react-dom";
8
- import { calcSideStyle as ls, clampPopup as hn, clampLeft as as, calcBelowPosition as cs, hAlignTransform as us } from "@gridsheet/core/lib/popup";
9
- import { y2r as ve, x2c as me, p2a as Ne, a2p as Rt, stripAddressAbsolute as ds } from "@gridsheet/core/lib/coords";
10
- import { zoneToArea as de, areaToZone as Je, between as Te, makeSequence as Ut, zoneShape as te, areaToRange as mn, among as gs, isZoneNotSelected as fs, getMaxSizesFromCells as pn } from "@gridsheet/core/lib/spatial";
11
- import { focus as H, preventSafariBounce as hs } from "@gridsheet/core/lib/dom";
12
- import * as O from "@gridsheet/core/lib/operation";
13
- import { expandInput as ms, resetInput as ps, handleFormulaQuoteAutoClose as yn, insertTextAtCursor as vn, isRefInsertable as bn, insertRef as Me, isFocus as ys } from "@gridsheet/core/lib/input";
14
- import { Lexer as et, stripSheetName as vs } from "@gridsheet/core/formula/evaluator";
15
- import { COLOR_PALETTE as Ie } from "@gridsheet/core/lib/palette";
16
- import { getFunctionHelps as zt } from "@gridsheet/core/formula/mapping";
17
- import { getLabel as Ct } from "@gridsheet/core/lib/label";
18
- import { Sheet as bs } from "@gridsheet/core/lib/sheet";
19
- import { FormulaError as ws } from "@gridsheet/core/formula/formula-error";
20
- import { Pending as Rs } from "@gridsheet/core/sentinels";
21
- import { getAreaInTabular as Wt, getCellRectPositions as Fe, virtualize as _t, smartScroll as Cs } from "@gridsheet/core/lib/virtualization";
22
- import { Autofill as Ss } from "@gridsheet/core/lib/autofill";
23
- import { embedStyle as Ns } from "@gridsheet/core/styles/embedder";
24
- const le = Jt(
4
+ import at, { createContext as on, useRef as oe, useContext as ie, useLayoutEffect as Qe, useState as J, useMemo as Ye, useCallback as M, memo as nt, useEffect as U, createRef as ln, useReducer as ys } from "react";
5
+ import { u as vs, s as ue, w as Ze, a as re, b as Ue, r as ct, c as an, d as cn, e as $e, f as un, g as dn, h as be, i as _e, j as bs, k as Zt, l as ut, p as dt, m as Je, n as Se, o as gt, q as ht, t as Fe, v as Rt, x as gn, y as hn, z as fn, A as mn, B as pn, C as yn, D as ze, E as et, F as ft, G as st, H as ws, I as Pe, J as fe, K as xe, L as vn, M as Ke, N as Ut, O as bn, P as zt, Q as Wt, R as Rs, S as Cs, T as _t, U as Ss, V as Ns } from "./hooks-Y7BI_RNj.mjs";
6
+ import { W as $o } from "./hooks-Y7BI_RNj.mjs";
7
+ import { createPortal as Ct } from "react-dom";
8
+ const le = on(
25
9
  {}
26
10
  ), St = ({
27
11
  option: e,
@@ -30,13 +14,13 @@ const le = Jt(
30
14
  top: s,
31
15
  left: r
32
16
  }) => {
33
- const o = oe(null), i = oe(null), { store: f } = ie(le), h = !f.editorHovering;
34
- return qe(() => {
17
+ const o = oe(null), i = oe(null), { store: h } = ie(le), f = !h.editorHovering;
18
+ return Qe(() => {
35
19
  const a = i.current;
36
- a && ls(a);
37
- }), qe(() => {
20
+ a && Vn(a);
21
+ }), Qe(() => {
38
22
  const a = o.current;
39
- !a || r === void 0 || hn(a);
23
+ !a || r === void 0 || Jt(a);
40
24
  }), e ? /* @__PURE__ */ F(
41
25
  "div",
42
26
  {
@@ -71,7 +55,7 @@ const le = Jt(
71
55
  "div",
72
56
  {
73
57
  ref: o,
74
- className: `gs-fn-guide2 ${h ? "gs-fn-guide2-hidden" : ""}`,
58
+ className: `gs-fn-guide2 ${f ? "gs-fn-guide2-hidden" : ""}`,
75
59
  style: s !== void 0 && r !== void 0 ? { top: s + 4, left: r } : void 0,
76
60
  children: [
77
61
  n.category && /* @__PURE__ */ c("span", { className: `gs-fn-guide-category gs-fn-guide-category-${n.category}`, children: n.category }),
@@ -130,23 +114,23 @@ const le = Jt(
130
114
  selected: s,
131
115
  onOptionMouseDown: r
132
116
  }) => {
133
- const o = oe(null), [i, f] = J(t);
134
- return qe(() => {
117
+ const o = oe(null), [i, h] = J(t);
118
+ return Qe(() => {
135
119
  if (!o.current)
136
120
  return;
137
- const h = o.current.getBoundingClientRect().width;
138
- f(as(t, h));
139
- }, [t, e]), e.length === 0 ? null : /* @__PURE__ */ c("ul", { ref: o, className: "gs-editor-options", style: { top: n, left: i }, children: e.map((h, a) => /* @__PURE__ */ F(
121
+ const f = o.current.getBoundingClientRect().width;
122
+ h(qn(t, f));
123
+ }, [t, e]), e.length === 0 ? null : /* @__PURE__ */ c("ul", { ref: o, className: "gs-editor-options", style: { top: n, left: i }, children: e.map((f, a) => /* @__PURE__ */ F(
140
124
  "li",
141
125
  {
142
126
  className: `gs-editor-option ${s === a ? " gs-editor-option-selected" : ""}`,
143
127
  onMouseDown: (u) => r(u, a),
144
128
  children: [
145
129
  /* @__PURE__ */ F("div", { className: "gs-editor-option-content", children: [
146
- /* @__PURE__ */ c("span", { children: h.label ?? h.value }),
130
+ /* @__PURE__ */ c("span", { children: f.label ?? f.value }),
147
131
  s === a && /* @__PURE__ */ c("span", { className: "gs-editor-option-tab", children: "⇥ Tab" })
148
132
  ] }),
149
- (h.isFunction || h.tooltip) && s === a && /* @__PURE__ */ c(St, { option: h })
133
+ (f.isFunction || f.tooltip) && s === a && /* @__PURE__ */ c(St, { option: f })
150
134
  ]
151
135
  },
152
136
  a
@@ -155,9 +139,9 @@ const le = Jt(
155
139
  const { selectingZone: n, choosing: t, editorRef: s, sheetReactive: r } = e, o = r.current;
156
140
  if (!o)
157
141
  return { top: 0, left: 0, bottom: 0, right: 0 };
158
- const { y: i, x: f } = t;
142
+ const { y: i, x: h } = t;
159
143
  let a = de(n);
160
- a.left === -1 && (a = { top: i, left: f, bottom: i, right: f });
144
+ a.left === -1 && (a = { top: i, left: h, bottom: i, right: h });
161
145
  const u = s.current, w = o.trim(a), b = Es(w, {
162
146
  getter: (m, y) => m.getPolicy(y).serializeForClipboard({ point: y, sheet: m })
163
147
  }), d = xs(w, {
@@ -174,9 +158,9 @@ const le = Jt(
174
158
  } else u != null && (u.value = b, H(u), u.select(), document.execCommand("copy"), u.value = "", u.blur());
175
159
  return a;
176
160
  }, Es = (e, {
177
- getter: n = (i, f) => {
178
- var h;
179
- return String(((h = i.getCell(f)) == null ? void 0 : h.value) ?? "");
161
+ getter: n = (i, h) => {
162
+ var f;
163
+ return String(((f = i.getCell(h)) == null ? void 0 : f.value) ?? "");
180
164
  },
181
165
  filteredRowsIncluded: t = !1,
182
166
  trailingEmptyRowsOmitted: s = !1,
@@ -185,22 +169,22 @@ const le = Jt(
185
169
  `
186
170
  } = {}) => {
187
171
  const i = [];
188
- for (let f = e.top; f <= e.bottom; f++) {
189
- if (e.isRowFiltered(f) && !t)
172
+ for (let h = e.top; h <= e.bottom; h++) {
173
+ if (e.isRowFiltered(h) && !t)
190
174
  continue;
191
- const h = [];
175
+ const f = [];
192
176
  let a = !0;
193
177
  for (let u = e.left; u <= e.right; u++) {
194
- const b = n(e, { y: f, x: u });
178
+ const b = n(e, { y: h, x: u });
195
179
  b !== "" && (a = !1), b.indexOf(`
196
- `) !== -1 ? h.push(`"${b.replace(/"/g, '""')}"`) : h.push(b);
180
+ `) !== -1 ? f.push(`"${b.replace(/"/g, '""')}"`) : f.push(b);
197
181
  }
198
- i.push({ isEmpty: a, line: h.join(r) });
182
+ i.push({ isEmpty: a, line: f.join(r) });
199
183
  }
200
184
  if (s)
201
185
  for (; i.length > 0 && i[i.length - 1].isEmpty; )
202
186
  i.pop();
203
- return i.map((f) => f.line).join(o);
187
+ return i.map((h) => h.line).join(o);
204
188
  }, xs = (e, {
205
189
  getter: n = (r, o) => {
206
190
  var i;
@@ -214,28 +198,28 @@ const le = Jt(
214
198
  if (e.isRowFiltered(o) && !t)
215
199
  continue;
216
200
  const i = [];
217
- let f = !0;
218
- for (let h = e.left; h <= e.right; h++) {
219
- const u = n(e, { y: o, x: h });
220
- u !== "" && (f = !1);
201
+ let h = !0;
202
+ for (let f = e.left; f <= e.right; f++) {
203
+ const u = n(e, { y: o, x: f });
204
+ u !== "" && (h = !1);
221
205
  const w = u.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
222
206
  i.push(`<td>${w}</td>`);
223
207
  }
224
- r.push({ isEmpty: f, html: `<tr>${i.join("")}</tr>` });
208
+ r.push({ isEmpty: h, html: `<tr>${i.join("")}</tr>` });
225
209
  }
226
210
  if (s)
227
211
  for (; r.length > 0 && r[r.length - 1].isEmpty; )
228
212
  r.pop();
229
213
  return `<table>${r.map((o) => o.html).join("")}</table>`;
230
214
  }, Rn = ({ inputting: e, selectionStart: n, optionsAll: t, functions: s }) => {
231
- const [r, o] = J(0), { filteredOptions: i, matchParams: f, activeFunctionHelp: h, activeArgIndex: a } = Ye(() => {
215
+ const [r, o] = J(0), { filteredOptions: i, matchParams: h, activeFunctionHelp: f, activeArgIndex: a } = Ye(() => {
232
216
  var S, p;
233
217
  const d = e.startsWith("=");
234
218
  let m = null, y = 0;
235
219
  const D = e.slice(0, n), T = e.slice(n);
236
220
  if (d && D.length > 1)
237
221
  try {
238
- const l = D.slice(1), g = new et(l);
222
+ const l = D.slice(1), g = new qe(l);
239
223
  g.tokenize();
240
224
  const v = [];
241
225
  for (let x = 0; x < g.tokens.length; x++) {
@@ -246,7 +230,7 @@ const le = Jt(
246
230
  } else A.type === "COMMA" ? v.length > 0 && (v[v.length - 1].argIndex++, v[v.length - 1].hasWaitComma = !0) : A.type === "CLOSE" ? v.length > 0 && v.pop() : A.type !== "SPACE" && v.length > 0 && (v[v.length - 1].hasWaitComma = !1);
247
231
  }
248
232
  if (v.length > 0) {
249
- const x = v[v.length - 1], A = zt(s);
233
+ const x = v[v.length - 1], A = $t(s);
250
234
  y = x.argIndex, m = A.find((C) => C.name === x.name.toUpperCase()) || null;
251
235
  }
252
236
  } catch {
@@ -255,7 +239,7 @@ const le = Jt(
255
239
  let $ = [], P = !1;
256
240
  if (d)
257
241
  try {
258
- const l = new et(e.slice(1));
242
+ const l = new qe(e.slice(1));
259
243
  l.tokenize();
260
244
  let g = 1;
261
245
  for (const v of l.tokens) {
@@ -268,7 +252,7 @@ const le = Jt(
268
252
  }
269
253
  } catch {
270
254
  }
271
- return d && !P ? E.length > 0 && !I && ($ = zt(s).map((l) => {
255
+ return d && !P ? E.length > 0 && !I && ($ = $t(s).map((l) => {
272
256
  const g = l.name.toLowerCase(), v = g.startsWith(E), x = v ? 0 : -1, A = l.defs.length === 0;
273
257
  return {
274
258
  option: { ...l, value: l.name + (A ? "()" : "("), isFunction: !0, label: l.name },
@@ -311,13 +295,13 @@ const le = Jt(
311
295
  (d) => {
312
296
  if (!d)
313
297
  return { value: e, selectionStart: n };
314
- if (f.isFormula) {
315
- const m = e.slice(0, n - f.matchLengthBefore), y = e.slice(n + f.matchLengthAfter);
298
+ if (h.isFormula) {
299
+ const m = e.slice(0, n - h.matchLengthBefore), y = e.slice(n + h.matchLengthAfter);
316
300
  return { value: m + d.value + y, selectionStart: m.length + d.value.length };
317
301
  } else
318
302
  return { value: String(d.value), selectionStart: String(d.value).length };
319
303
  },
320
- [e, n, f]
304
+ [e, n, h]
321
305
  ), w = M(
322
306
  (d) => i.length > 1 ? (o((m) => m <= 0 ? i.length - 1 : m - 1), d.preventDefault(), !0) : !1,
323
307
  [i.length]
@@ -332,20 +316,20 @@ const le = Jt(
332
316
  replaceWithOption: u,
333
317
  handleArrowUp: w,
334
318
  handleArrowDown: b,
335
- isFormula: f.isFormula,
336
- activeFunctionHelp: h,
319
+ isFormula: h.isFormula,
320
+ activeFunctionHelp: f,
337
321
  activeArgIndex: a
338
322
  };
339
323
  }, rt = ({ children: e, style: n, className: t = "", ...s }) => {
340
- const { document: r } = es();
341
- return r == null ? null : wt(
324
+ const { document: r } = vs();
325
+ return r == null ? null : Ct(
342
326
  /* @__PURE__ */ c("div", { ...s, className: `gs-fixed ${t}`, style: n, children: e }),
343
327
  r.body
344
328
  );
345
329
  }, Cn = (e, n = !1) => {
346
- const s = new DOMParser().parseFromString(e, "text/html"), r = [], o = (h) => {
330
+ const s = new DOMParser().parseFromString(e, "text/html"), r = [], o = (f) => {
347
331
  var w, b;
348
- const a = /* @__PURE__ */ new Set(), u = h.querySelectorAll("tr,caption");
332
+ const a = /* @__PURE__ */ new Set(), u = f.querySelectorAll("tr,caption");
349
333
  for (let d = 0; d < u.length; d++) {
350
334
  const m = u[d];
351
335
  if (m.tagName === "CAPTION") {
@@ -370,19 +354,19 @@ const le = Jt(
370
354
  }
371
355
  r.push(D);
372
356
  }
373
- }, i = (h, a = []) => {
374
- if (h.nodeType === Node.ELEMENT_NODE) {
375
- const u = h, w = u.tagName;
357
+ }, i = (f, a = []) => {
358
+ if (f.nodeType === Node.ELEMENT_NODE) {
359
+ const u = f, w = u.tagName;
376
360
  w === "TABLE" ? (a.length > 0 && (r.push(a.slice()), a.length = 0), o(u)) : w === "BR" ? (r.push(a.slice()), a.length = 0) : ks.has(w) ? (a.length > 0 && (r.push(a.slice()), a.length = 0), u.childNodes.forEach((b) => i(b, a)), a.length > 0 && (r.push(a.slice()), a.length = 0)) : u.childNodes.forEach((b) => i(b, a));
377
- } else if (h.nodeType === Node.TEXT_NODE) {
378
- const w = (h.textContent ?? "").split(/\r?\n/);
361
+ } else if (f.nodeType === Node.TEXT_NODE) {
362
+ const w = (f.textContent ?? "").split(/\r?\n/);
379
363
  for (const b of w) {
380
364
  const d = b.trim();
381
365
  d && a.push({ value: d });
382
366
  }
383
367
  }
384
- }, f = [];
385
- return s.body.childNodes.forEach((h) => i(h, f)), f.length > 0 && r.push(f), r;
368
+ }, h = [];
369
+ return s.body.childNodes.forEach((f) => i(f, h)), h.length > 0 && r.push(h), r;
386
370
  };
387
371
  function jt(e) {
388
372
  if (!e)
@@ -392,7 +376,7 @@ function jt(e) {
392
376
  let [r, o] = s.split(":");
393
377
  if (!r || !o || (r = r.trim(), r === "height" || r === "width"))
394
378
  return;
395
- const i = r.trim().replace(/-([a-z])/g, (h, a) => a.toUpperCase());
379
+ const i = r.trim().replace(/-([a-z])/g, (f, a) => a.toUpperCase());
396
380
  if (i === "float" || i === "display" || i.startsWith("padding"))
397
381
  return;
398
382
  if (i === "border") {
@@ -431,8 +415,8 @@ function jt(e) {
431
415
  });
432
416
  return;
433
417
  }
434
- const f = o.trim();
435
- t[i] = f;
418
+ const h = o.trim();
419
+ t[i] = h;
436
420
  }), t;
437
421
  }
438
422
  const Sn = (e, n = " ") => {
@@ -440,25 +424,25 @@ const Sn = (e, n = " ") => {
440
424
  const t = [[]];
441
425
  let s = t[0], r = !1, o = "";
442
426
  for (let i = 0; i < e.length; i++) {
443
- const f = e[i];
444
- if (f === `
427
+ const h = e[i];
428
+ if (h === `
445
429
  ` && !r) {
446
430
  s.push({ value: ot(o) }), o = "", s = [], t.push(s);
447
431
  continue;
448
432
  }
449
- if (f === n) {
433
+ if (h === n) {
450
434
  s.push({ value: ot(o) }), o = "";
451
435
  continue;
452
436
  }
453
- if (f === '"' && !r && o === "") {
437
+ if (h === '"' && !r && o === "") {
454
438
  r = !0;
455
439
  continue;
456
440
  }
457
- if (f === '"' && r) {
441
+ if (h === '"' && r) {
458
442
  r = !1;
459
443
  continue;
460
444
  }
461
- o += f;
445
+ o += h;
462
446
  }
463
447
  return o && s.push({ value: ot(o) }), t;
464
448
  }, ot = (e) => e.replace(/\x00/g, '"'), ks = /* @__PURE__ */ new Set([
@@ -496,7 +480,7 @@ const Sn = (e, n = " ") => {
496
480
  "UL"
497
481
  ]), Ts = ({ mode: e }) => {
498
482
  var It, Ft;
499
- const { store: n, dispatch: t } = ie(le), [s, r] = J(!1), [o, i] = J(0), [f, h] = J(!1), {
483
+ const { store: n, dispatch: t } = ie(le), [s, r] = J(!1), [o, i] = J(0), [h, f] = J(!1), {
500
484
  choosing: a,
501
485
  inputting: u,
502
486
  selectingZone: w,
@@ -515,13 +499,13 @@ const Sn = (e, n = " ") => {
515
499
  dragging: S
516
500
  } = n, p = $.current, l = () => {
517
501
  var ce;
518
- if (!f || !X || typeof document > "u" || N.current !== document.activeElement)
502
+ if (!h || !X || typeof document > "u" || N.current !== document.activeElement)
519
503
  return null;
520
504
  const k = (ce = N.current) == null ? void 0 : ce.getBoundingClientRect();
521
505
  if (!k)
522
506
  return null;
523
507
  const { bottom: j, left: se } = k;
524
- return wt(
508
+ return Ct(
525
509
  /* @__PURE__ */ F(we, { children: [
526
510
  ae && A.length === 0 && (!w || w.endY === -1 && w.endX === -1) && /* @__PURE__ */ c(
527
511
  St,
@@ -569,7 +553,7 @@ const Sn = (e, n = " ") => {
569
553
  }, [p == null ? void 0 : p.registry.lastFocused, p, N, Y, t]), U(() => {
570
554
  p && (p.registry.editingSheetId = P, p.registry.editingAddress = d);
571
555
  }, [d, p, P]), U(() => {
572
- ms(N.current);
556
+ Gn(N.current);
573
557
  }, [u, d, N]);
574
558
  const { y: z, x: K } = a, G = `${ve(z)}`, Z = `${me(K)}${G}`, X = d === Z, Q = p == null ? void 0 : p.getCell({ y: z, x: K }, { resolution: "RAW" }), R = p ? p.getSerializedValue({ point: a, cell: Q, resolution: "RAW" }) : "", [_, ge] = J(R), ee = M(
575
559
  (k) => {
@@ -600,7 +584,7 @@ const Sn = (e, n = " ") => {
600
584
  [A, p, Z, u, ee, t, N]
601
585
  );
602
586
  U(() => {
603
- p && (ge(R), t(re(R)), ps(N.current, p, a));
587
+ p && (ge(R), t(re(R)), Qn(N.current, p, a));
604
588
  }, [a, R, t, N, p]);
605
589
  const { y: Ee, x: We, height: Tt, width: At } = b, Ln = R.split(`
606
590
  `).length, [Mt, Dt] = J(!1), Bn = M(
@@ -612,7 +596,7 @@ const Sn = (e, n = " ") => {
612
596
  Dt(!1);
613
597
  }));
614
598
  const j = k.currentTarget;
615
- if (yn(k, u))
599
+ if (en(k, u))
616
600
  return t(re(j.value)), !1;
617
601
  const se = k.shiftKey;
618
602
  switch (k.key) {
@@ -640,7 +624,7 @@ const Sn = (e, n = " ") => {
640
624
  return k.preventDefault(), !1;
641
625
  } else {
642
626
  if (k.altKey)
643
- return vn(j, `
627
+ return tn(j, `
644
628
  `), t(re(j.value)), k.preventDefault(), !1;
645
629
  if (k.nativeEvent.isComposing)
646
630
  return !1;
@@ -660,11 +644,11 @@ const Sn = (e, n = " ") => {
660
644
  ), k.preventDefault(), !1;
661
645
  case "Backspace":
662
646
  if (!X)
663
- return ((Ae = p.getSystem({ y: z, x: K })) == null ? void 0 : Ae.spilledFrom) != null ? (k.preventDefault(), !1) : (t(Ht(null)), t(re("")), !1);
647
+ return ((Ae = p.getSystem({ y: z, x: K })) == null ? void 0 : Ae.spilledFrom) != null ? (k.preventDefault(), !1) : (t(Zt(null)), t(re("")), !1);
664
648
  break;
665
649
  case "Delete":
666
650
  if (!X)
667
- return ((He = p.getSystem({ y: z, x: K })) == null ? void 0 : He.spilledFrom) != null ? (k.preventDefault(), !1) : (t(Ht(null)), t(re("")), !1);
651
+ return ((He = p.getSystem({ y: z, x: K })) == null ? void 0 : He.spilledFrom) != null ? (k.preventDefault(), !1) : (t(Zt(null)), t(re("")), !1);
668
652
  break;
669
653
  case "Shift":
670
654
  return r(!0), !1;
@@ -677,7 +661,7 @@ const Sn = (e, n = " ") => {
677
661
  case "NumLock":
678
662
  return !1;
679
663
  case "Escape":
680
- return t(ts(null)), t($e(void 0)), t(re(_)), !1;
664
+ return t(bs(null)), t($e(void 0)), t(re(_)), !1;
681
665
  case "ArrowLeft":
682
666
  if (!X)
683
667
  return t(
@@ -746,14 +730,14 @@ const Sn = (e, n = " ") => {
746
730
  if (!X) {
747
731
  k.preventDefault();
748
732
  const ye = tt(n);
749
- return t(rn(Je(ye))), H(j), !1;
733
+ return t(dn(Ge(ye))), H(j), !1;
750
734
  }
751
735
  return !0;
752
736
  }
753
737
  break;
754
738
  case "f":
755
739
  if ((k.ctrlKey || k.metaKey) && !X)
756
- return k.preventDefault(), typeof T > "u" && t($e("")), t(sn(!1)), requestAnimationFrame(() => H(E.current)), !1;
740
+ return k.preventDefault(), typeof T > "u" && t($e("")), t(un(!1)), requestAnimationFrame(() => H(E.current)), !1;
757
741
  break;
758
742
  case "r":
759
743
  // R
@@ -786,12 +770,12 @@ const Sn = (e, n = " ") => {
786
770
  if ((k.ctrlKey || k.metaKey) && !X) {
787
771
  k.preventDefault();
788
772
  const ye = tt(n);
789
- return t(nn(Je(ye))), H(j), !1;
773
+ return t(cn(Ge(ye))), H(j), !1;
790
774
  }
791
775
  break;
792
776
  case "z":
793
777
  if ((k.ctrlKey || k.metaKey) && !X)
794
- return k.preventDefault(), k.shiftKey ? t(ct(null)) : t(tn(null)), !1;
778
+ return k.preventDefault(), k.shiftKey ? t(ct(null)) : t(an(null)), !1;
795
779
  break;
796
780
  case ";":
797
781
  (k.ctrlKey || k.metaKey) && (X || (k.preventDefault(), ee((/* @__PURE__ */ new Date()).toDateString())));
@@ -818,7 +802,7 @@ const Sn = (e, n = " ") => {
818
802
  ]
819
803
  ), Kn = M(
820
804
  (k) => {
821
- h(!0), p && (p.registry.lastFocused = k.currentTarget);
805
+ f(!0), p && (p.registry.lastFocused = k.currentTarget);
822
806
  },
823
807
  [p]
824
808
  ), Zn = M(
@@ -837,14 +821,14 @@ const Sn = (e, n = " ") => {
837
821
  [Q, X, R, Z]
838
822
  ), Un = M(
839
823
  (k) => {
840
- if (h(!1), bn(k.currentTarget))
824
+ if (f(!1), nn(k.currentTarget))
841
825
  return !0;
842
826
  X && ee(k.currentTarget.value), t(ue(""));
843
827
  },
844
828
  [X, ee, t]
845
829
  ), zn = M(
846
830
  (k) => {
847
- O.hasOperation(Q == null ? void 0 : Q.prevention, O.Write) || (t(re(k.currentTarget.value)), L(0));
831
+ O.hasOperation(Q == null ? void 0 : Q.prevention, O.Write) || (t(re(k.currentTarget.value)), i(k.currentTarget.selectionStart), L(0));
848
832
  },
849
833
  [Q]
850
834
  ), Wn = M(
@@ -925,10 +909,10 @@ const Sn = (e, n = " ") => {
925
909
  onKeyDown: Bn,
926
910
  onKeyUp: _n,
927
911
  onMouseEnter: () => {
928
- t(Ge(!0));
912
+ t(Je(!0));
929
913
  },
930
914
  onMouseLeave: () => {
931
- t(Ge(!1));
915
+ t(Je(!1));
932
916
  }
933
917
  }
934
918
  )
@@ -943,7 +927,7 @@ const Sn = (e, n = " ") => {
943
927
  ), Nn = (e) => {
944
928
  if (e[0] !== "=")
945
929
  return /* @__PURE__ */ c(we, { children: e });
946
- const n = new et(e.substring(1));
930
+ const n = new qe(e.substring(1));
947
931
  n.tokenize();
948
932
  let t = 0;
949
933
  const s = {}, r = e.split("").reduce((o, i) => (o << 5) - o + i.charCodeAt(0) & 4294967295, 0);
@@ -952,44 +936,44 @@ const Sn = (e, n = " ") => {
952
936
  n.tokens.map((o, i) => {
953
937
  if (o.type === "SPACE")
954
938
  return /* @__PURE__ */ c(at.Fragment, { children: o.stringify() }, `${r}-SPACE-${i}`);
955
- const f = `${r}-${o.type}-${o.stringify()}-${i}`;
939
+ const h = `${r}-${o.type}-${o.stringify()}-${i}`;
956
940
  if (o.type === "REF" || o.type === "RANGE") {
957
- const h = o.stringify(), a = s[h];
941
+ const f = o.stringify(), a = s[f];
958
942
  if (a !== void 0)
959
943
  return /* @__PURE__ */ c(
960
944
  it,
961
945
  {
962
946
  token: o,
963
- tokenKey: f,
964
- color: Ie[a % Ie.length]
947
+ tokenKey: h,
948
+ color: De[a % De.length]
965
949
  },
966
- f
950
+ h
967
951
  );
968
- const u = Ie[t % Ie.length];
969
- return s[h] = t++, /* @__PURE__ */ c(
952
+ const u = De[t % De.length];
953
+ return s[f] = t++, /* @__PURE__ */ c(
970
954
  it,
971
955
  {
972
956
  token: o,
973
- tokenKey: f,
957
+ tokenKey: h,
974
958
  color: u,
975
959
  className: `gs-token-type-${o.type}`
976
960
  },
977
- f
961
+ h
978
962
  );
979
963
  }
980
964
  return /* @__PURE__ */ c(
981
965
  it,
982
966
  {
983
967
  token: o,
984
- tokenKey: f,
968
+ tokenKey: h,
985
969
  className: `gs-token-type-${o.type} gs-token-entity-type-${typeof o.entity}`
986
970
  },
987
- f
971
+ h
988
972
  );
989
973
  })
990
974
  ] });
991
- }, En = Jt({});
992
- function Xr() {
975
+ }, En = on({});
976
+ function Cr() {
993
977
  const [e, n] = J(void 0), [t, s] = J();
994
978
  return {
995
979
  provided: !0,
@@ -1003,7 +987,7 @@ function xn() {
1003
987
  const e = ie(En);
1004
988
  return (e == null ? void 0 : e.provided) == null ? [!1, e] : [!0, e];
1005
989
  }
1006
- function Or({ children: e, context: n }) {
990
+ function Sr({ children: e, context: n }) {
1007
991
  const [t] = xn();
1008
992
  return t ? /* @__PURE__ */ c(we, { children: e }) : /* @__PURE__ */ c(En.Provider, { value: n, children: e });
1009
993
  }
@@ -1016,38 +1000,38 @@ const As = ({
1016
1000
  editingOnEnter: o,
1017
1001
  mode: i
1018
1002
  }) => {
1019
- const { store: f, dispatch: h } = ie(le), { sheetReactive: a } = f, u = a.current;
1003
+ const { store: h, dispatch: f } = ie(le), { sheetReactive: a } = h, u = a.current;
1020
1004
  U(() => {
1021
1005
  u && e && e !== u.name && (u.name = e, u.registry.sheetIdsByName[e] = u.id, delete u.registry.sheetIdsByName[u.prevName], u.prevName = e);
1022
1006
  }, [e]), U(() => {
1023
1007
  if (!u)
1024
1008
  return;
1025
1009
  const { registry: d } = u;
1026
- requestAnimationFrame(() => d.boot()), d.contextsBySheetId[u.id] = { store: f, dispatch: h }, d.transmit(), s && (s.current = {
1010
+ requestAnimationFrame(() => d.boot()), d.contextsBySheetId[u.id] = { store: h, dispatch: f }, d.transmit(), s && (s.current = {
1027
1011
  sheet: u,
1028
1012
  apply: (m) => {
1029
- h(Ue(m));
1013
+ f(Ue(m));
1030
1014
  }
1031
1015
  }), r && (r.current = {
1032
- store: f,
1016
+ store: h,
1033
1017
  apply: (m) => {
1034
- h(Se(m));
1018
+ f(Se(m));
1035
1019
  },
1036
- dispatch: h
1020
+ dispatch: f
1037
1021
  });
1038
- }, [f, u, s, r]), U(() => {
1039
- n && h(Se({ sheetHeight: n }));
1040
- }, [n, h]), U(() => {
1041
- t && h(Se({ sheetWidth: t }));
1022
+ }, [h, u, s, r]), U(() => {
1023
+ n && f(Se({ sheetHeight: n }));
1024
+ }, [n, f]), U(() => {
1025
+ t && f(Se({ sheetWidth: t }));
1042
1026
  }, [t]), U(() => {
1043
- typeof o < "u" && h(Se({ editingOnEnter: o }));
1027
+ typeof o < "u" && f(Se({ editingOnEnter: o }));
1044
1028
  }, [o]), U(() => {
1045
- i && h(Se({ mode: i }));
1029
+ i && f(Se({ mode: i }));
1046
1030
  }, [i]);
1047
1031
  const [w, b] = xn();
1048
1032
  return U(() => {
1049
- w && (b.setStore(f), b.setApply(() => h));
1050
- }, [f, w, b]), /* @__PURE__ */ c(we, {});
1033
+ w && (b.setStore(h), b.setApply(() => f));
1034
+ }, [h, w, b]), /* @__PURE__ */ c(we, {});
1051
1035
  }, Ms = () => {
1052
1036
  const { store: e, dispatch: n } = ie(le), {
1053
1037
  resizingPositionY: t,
@@ -1055,11 +1039,11 @@ const As = ({
1055
1039
  sheetReactive: r,
1056
1040
  leftHeaderSelecting: o,
1057
1041
  topHeaderSelecting: i,
1058
- selectingZone: f,
1059
- editorRef: h,
1042
+ selectingZone: h,
1043
+ editorRef: f,
1060
1044
  mainRef: a
1061
1045
  } = e, u = r.current, [w, b, d] = t, [m, y, D] = s;
1062
- if (a.current == null || h.current == null || !u)
1046
+ if (a.current == null || f.current == null || !u)
1063
1047
  return /* @__PURE__ */ c("div", { className: "gs-resizing gs-hidden" });
1064
1048
  const T = u.getCell({ y: w === -1 ? 0 : w, x: m === -1 ? 0 : m }, { resolution: "SYSTEM" }), { y: N, x: Y } = a.current.getBoundingClientRect(), E = (T == null ? void 0 : T.width) || yt, I = (T == null ? void 0 : T.height) || vt, $ = E + (D - y), P = I + (d - b);
1065
1049
  return /* @__PURE__ */ F(
@@ -1067,16 +1051,16 @@ const As = ({
1067
1051
  {
1068
1052
  className: `gs-resizing ${w === -1 && m === -1 ? "gs-hidden" : ""}`,
1069
1053
  onMouseUp: () => {
1070
- const l = de(f), { top: g, left: v, bottom: x, right: A } = l, C = {};
1054
+ const l = de(h), { top: g, left: v, bottom: x, right: A } = l, C = {};
1071
1055
  if (m !== -1) {
1072
1056
  let L = [m];
1073
- i && Te({ start: v, end: A }, m) && (L = Ut(v, A + 1)), L.forEach((q) => {
1057
+ i && Te({ start: v, end: A }, m) && (L = Pt(v, A + 1)), L.forEach((q) => {
1074
1058
  C[Ne({ y: 0, x: q })] = { width: $ };
1075
1059
  });
1076
1060
  }
1077
1061
  if (w !== -1) {
1078
1062
  let L = [w];
1079
- o && Te({ start: g, end: x }, w) && (L = Ut(g, x + 1)), L.forEach((q) => {
1063
+ o && Te({ start: g, end: x }, w) && (L = Pt(g, x + 1)), L.forEach((q) => {
1080
1064
  C[Ne({ y: q, x: 0 })] = { height: P };
1081
1065
  });
1082
1066
  }
@@ -1084,22 +1068,22 @@ const As = ({
1084
1068
  diff: C,
1085
1069
  partial: !0,
1086
1070
  operator: "USER",
1087
- undoReflection: { selectingZone: f, sheetId: u.id }
1071
+ undoReflection: { selectingZone: h, sheetId: u.id }
1088
1072
  }), n(
1089
1073
  Se({
1090
1074
  sheetReactive: { current: u }
1091
1075
  })
1092
- ), n(gt([-1, -1, -1])), n(ft([-1, -1, -1])), H(h.current);
1076
+ ), n(gt([-1, -1, -1])), n(ht([-1, -1, -1])), H(f.current);
1093
1077
  },
1094
1078
  onMouseMove: (l) => {
1095
1079
  if (w !== -1) {
1096
1080
  let g = l.clientY;
1097
1081
  const v = I + (g - b);
1098
- v < $t && (g += $t - v), n(gt([w, b, g]));
1082
+ v < Xt && (g += Xt - v), n(gt([w, b, g]));
1099
1083
  } else if (m !== -1) {
1100
1084
  let g = l.clientX;
1101
1085
  const v = E + (g - y);
1102
- v < Pt && (g += Pt - v), n(ft([m, y, g]));
1086
+ v < Ot && (g += Ot - v), n(ht([m, y, g]));
1103
1087
  }
1104
1088
  },
1105
1089
  children: [
@@ -1137,23 +1121,23 @@ const As = ({
1137
1121
  }, [n, t]), null;
1138
1122
  }, kn = async ({ store: e, dispatch: n }) => {
1139
1123
  const { editorRef: t } = e, s = tt(e);
1140
- n(rn(Je(s))), H(t.current);
1124
+ n(dn(Ge(s))), H(t.current);
1141
1125
  }, Tn = async ({ store: e, dispatch: n }) => {
1142
1126
  const { editorRef: t } = e, s = tt(e);
1143
- n(nn(Je(s))), H(t.current);
1127
+ n(cn(Ge(s))), H(t.current);
1144
1128
  }, An = async ({ store: e, dispatch: n }, t = !1) => {
1145
1129
  const { editorRef: s } = e, r = await navigator.clipboard.read();
1146
1130
  let o = [];
1147
1131
  for (let i = 0; i < r.length; i++) {
1148
- const f = r[i];
1149
- if (f.types.indexOf("text/html") !== -1) {
1150
- const a = await (await f.getType("text/html")).text();
1132
+ const h = r[i];
1133
+ if (h.types.indexOf("text/html") !== -1) {
1134
+ const a = await (await h.getType("text/html")).text();
1151
1135
  if (a) {
1152
1136
  o = Cn(a, t);
1153
1137
  break;
1154
1138
  }
1155
- } else if (f.types.indexOf("text/plain") !== -1) {
1156
- const a = await (await f.getType("text/plain")).text();
1139
+ } else if (h.types.indexOf("text/plain") !== -1) {
1140
+ const a = await (await h.getType("text/plain")).text();
1157
1141
  if (a) {
1158
1142
  o = Sn(a);
1159
1143
  break;
@@ -1163,39 +1147,39 @@ const As = ({
1163
1147
  n(dt({ matrix: o, onlyValue: t })), H(s.current);
1164
1148
  }, Mn = async ({ store: e, dispatch: n }) => {
1165
1149
  const { editorRef: t } = e;
1166
- n(tn(null)), H(t.current);
1150
+ n(an(null)), H(t.current);
1167
1151
  }, Dn = async ({ store: e, dispatch: n }) => {
1168
1152
  const { editorRef: t } = e;
1169
1153
  n(ct(null)), H(t.current);
1170
1154
  }, Is = async ({ store: e, dispatch: n }) => {
1171
1155
  const { selectingZone: t, editorRef: s } = e, { top: r } = de(t), o = te(t).rows;
1172
- n(dn({ numRows: o, y: r, operator: "USER" })), H(s.current);
1156
+ n(yn({ numRows: o, y: r, operator: "USER" })), H(s.current);
1173
1157
  }, Fs = async ({ store: e, dispatch: n }) => {
1174
1158
  const { selectingZone: t, editorRef: s } = e, { bottom: r } = de(t), o = te(t).rows;
1175
- n(un({ numRows: o, y: r, operator: "USER" })), H(s.current);
1159
+ n(pn({ numRows: o, y: r, operator: "USER" })), H(s.current);
1176
1160
  }, Ys = async ({ store: e, dispatch: n }) => {
1177
1161
  const { selectingZone: t, editorRef: s } = e, { left: r } = de(t), o = te(t).cols;
1178
- n(cn({ numCols: o, x: r, operator: "USER" })), H(s.current);
1162
+ n(mn({ numCols: o, x: r, operator: "USER" })), H(s.current);
1179
1163
  }, $s = async ({ store: e, dispatch: n }) => {
1180
1164
  const { selectingZone: t, editorRef: s } = e, { right: r } = de(t), o = te(t).cols;
1181
- n(an({ numCols: o, x: r, operator: "USER" })), H(s.current);
1165
+ n(fn({ numCols: o, x: r, operator: "USER" })), H(s.current);
1182
1166
  }, Ps = async ({ store: e, dispatch: n }) => {
1183
1167
  const { selectingZone: t, editorRef: s } = e, { top: r } = de(t), o = te(t).rows;
1184
- n(ln({ numRows: o, y: r, operator: "USER" })), H(s.current);
1168
+ n(hn({ numRows: o, y: r, operator: "USER" })), H(s.current);
1185
1169
  }, Xs = async ({ store: e, dispatch: n }) => {
1186
1170
  const { selectingZone: t, editorRef: s } = e, { left: r } = de(t), o = te(t).cols;
1187
- n(on({ numCols: o, x: r, operator: "USER" })), H(s.current);
1171
+ n(gn({ numCols: o, x: r, operator: "USER" })), H(s.current);
1188
1172
  }, In = async ({ store: e, dispatch: n }, t) => {
1189
1173
  const s = e.sheetReactive.current;
1190
- s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(bt({ x: t, direction: "asc" })), H(e.editorRef.current);
1174
+ s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Rt({ x: t, direction: "asc" })), H(e.editorRef.current);
1191
1175
  }, Fn = async ({ store: e, dispatch: n }, t) => {
1192
1176
  const s = e.sheetReactive.current;
1193
- s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(bt({ x: t, direction: "desc" })), H(e.editorRef.current);
1177
+ s && (s.hasPendingCells() || s.registry.asyncPending.size > 0) && await s.waitForPending(), n(Rt({ x: t, direction: "desc" })), H(e.editorRef.current);
1194
1178
  }, Yn = async ({ store: e, dispatch: n }, t, s) => {
1195
1179
  const r = e.sheetReactive.current;
1196
- r && (r.hasPendingCells() || r.registry.asyncPending.size > 0) && await r.waitForPending(), n(De({ x: t, filter: s })), H(e.editorRef.current);
1180
+ r && (r.hasPendingCells() || r.registry.asyncPending.size > 0) && await r.waitForPending(), n(Fe({ x: t, filter: s })), H(e.editorRef.current);
1197
1181
  }, mt = async ({ store: e, dispatch: n }, t) => {
1198
- n(De({ x: t })), H(e.editorRef.current);
1182
+ n(Fe({ x: t })), H(e.editorRef.current);
1199
1183
  }, $n = ({ store: e, dispatch: n }, t) => {
1200
1184
  const s = e.sheetReactive.current;
1201
1185
  if (!s)
@@ -1209,8 +1193,8 @@ const As = ({
1209
1193
  const r = Ne({ y: t, x: 0 }), o = s.getCell({ y: t, x: 0 }, { resolution: "SYSTEM" }), i = !(o != null && o.filterFixed) || void 0;
1210
1194
  s.update({ diff: { [r]: { filterFixed: i } }, partial: !0 }), n(Ue(s)), H(e.editorRef.current);
1211
1195
  }, Xn = async ({ store: e, dispatch: n }) => {
1212
- typeof e.searchQuery > "u" && n($e("")), n(sn(!1)), requestAnimationFrame(() => H(e.searchInputRef.current));
1213
- }, Hr = {
1196
+ typeof e.searchQuery > "u" && n($e("")), n(un(!1)), requestAnimationFrame(() => H(e.searchInputRef.current));
1197
+ }, Nr = {
1214
1198
  copy: kn,
1215
1199
  cut: Tn,
1216
1200
  paste: An,
@@ -1539,22 +1523,22 @@ function Nt(e, n, t) {
1539
1523
  undo: () => Mn(s),
1540
1524
  redo: () => Dn(s),
1541
1525
  insertRowsAbove: (o, i) => {
1542
- n(dn({ numRows: i, y: o, operator: "USER" }));
1526
+ n(yn({ numRows: i, y: o, operator: "USER" }));
1543
1527
  },
1544
1528
  insertRowsBelow: (o, i) => {
1545
- n(un({ numRows: i, y: o, operator: "USER" }));
1529
+ n(pn({ numRows: i, y: o, operator: "USER" }));
1546
1530
  },
1547
1531
  removeRows: (o, i) => {
1548
- n(ln({ numRows: i, y: o, operator: "USER" }));
1532
+ n(hn({ numRows: i, y: o, operator: "USER" }));
1549
1533
  },
1550
1534
  insertColsLeft: (o, i) => {
1551
- n(cn({ numCols: i, x: o, operator: "USER" }));
1535
+ n(mn({ numCols: i, x: o, operator: "USER" }));
1552
1536
  },
1553
1537
  insertColsRight: (o, i) => {
1554
- n(an({ numCols: i, x: o, operator: "USER" }));
1538
+ n(fn({ numCols: i, x: o, operator: "USER" }));
1555
1539
  },
1556
1540
  removeCols: (o, i) => {
1557
- n(on({ numCols: i, x: o, operator: "USER" }));
1541
+ n(gn({ numCols: i, x: o, operator: "USER" }));
1558
1542
  },
1559
1543
  sortRows: async (o, i) => {
1560
1544
  i === "asc" ? await In(s, o) : await Fn(s, o);
@@ -1569,9 +1553,9 @@ function Nt(e, n, t) {
1569
1553
  updateColLabel: (o, i) => {
1570
1554
  if (!r)
1571
1555
  return;
1572
- const f = Ne({ y: 0, x: o });
1556
+ const h = Ne({ y: 0, x: o });
1573
1557
  r.update({
1574
- diff: { [f]: { label: i || void 0 } },
1558
+ diff: { [h]: { label: i || void 0 } },
1575
1559
  partial: !0,
1576
1560
  undoReflection: {
1577
1561
  sheetId: r.id,
@@ -1604,7 +1588,7 @@ const xt = ({
1604
1588
  onClick: o,
1605
1589
  className: i
1606
1590
  }) => {
1607
- const f = s !== void 0;
1591
+ const h = s !== void 0;
1608
1592
  return /* @__PURE__ */ F(
1609
1593
  "li",
1610
1594
  {
@@ -1612,13 +1596,13 @@ const xt = ({
1612
1596
  "data-testid": r,
1613
1597
  onClick: t ? void 0 : o,
1614
1598
  children: [
1615
- /* @__PURE__ */ F("div", { className: `gs-menu-name${f ? " gs-row-fixed-toggle" : ""}`, children: [
1616
- f && /* @__PURE__ */ c("span", { className: `gs-row-fixed-check${s ? " gs-row-fixed-active" : ""}`, children: "✓" }),
1599
+ /* @__PURE__ */ F("div", { className: `gs-menu-name${h ? " gs-row-fixed-toggle" : ""}`, children: [
1600
+ h && /* @__PURE__ */ c("span", { className: `gs-row-fixed-check${s ? " gs-row-fixed-active" : ""}`, children: "✓" }),
1617
1601
  e
1618
1602
  ] }),
1619
- n != null && n.length > 0 && /* @__PURE__ */ c("div", { className: "gs-menu-shortcut", children: n.map((h, a) => /* @__PURE__ */ F("span", { children: [
1603
+ n != null && n.length > 0 && /* @__PURE__ */ c("div", { className: "gs-menu-shortcut", children: n.map((f, a) => /* @__PURE__ */ F("span", { children: [
1620
1604
  a > 0 && /* @__PURE__ */ c("span", { className: "gs-menu-shortcut-sep", children: ", " }),
1621
- /* @__PURE__ */ c("span", { className: "gs-menu-shortcut-badge", children: h.split("+").map(
1605
+ /* @__PURE__ */ c("span", { className: "gs-menu-shortcut-badge", children: f.split("+").map(
1622
1606
  (u, w, b) => w < b.length - 1 ? /* @__PURE__ */ F("span", { children: [
1623
1607
  u,
1624
1608
  "+"
@@ -1630,23 +1614,23 @@ const xt = ({
1630
1614
  );
1631
1615
  }, kt = () => /* @__PURE__ */ c("li", { className: "gs-menu-divider" }), Ks = () => {
1632
1616
  const { store: e, dispatch: n } = ie(le), { contextMenuPosition: t, contextMenu: s } = e, { y: r, x: o } = t, i = oe(null);
1633
- if (qe(() => {
1634
- i.current && hn(i.current);
1617
+ if (Qe(() => {
1618
+ i.current && Jt(i.current);
1635
1619
  }), r === -1)
1636
1620
  return null;
1637
- const f = () => n(ze({ y: -1, x: -1 })), h = Nt(e, n, f);
1621
+ const h = () => n(ze({ y: -1, x: -1 })), f = Nt(e, n, h);
1638
1622
  return /* @__PURE__ */ c(
1639
1623
  rt,
1640
1624
  {
1641
1625
  className: "gs-menu-modal gs-context-menu-modal",
1642
- onClick: (a) => (a.preventDefault(), f(), !1),
1626
+ onClick: (a) => (a.preventDefault(), h(), !1),
1643
1627
  children: /* @__PURE__ */ c("div", { ref: i, className: "gs-context-menu", style: { top: r, left: o }, children: /* @__PURE__ */ c("ul", { className: "gs-menu-items", children: s.map((a, u) => {
1644
1628
  var D, T;
1645
1629
  if (a.type === "divider")
1646
- return a.visible && !a.visible(h) ? null : /* @__PURE__ */ c(kt, {}, u);
1647
- if (a.type === "component" || !(!a.visible || a.visible(h)))
1630
+ return a.visible && !a.visible(f) ? null : /* @__PURE__ */ c(kt, {}, u);
1631
+ if (a.type === "component" || !(!a.visible || a.visible(f)))
1648
1632
  return null;
1649
- const b = ((D = a.disabled) == null ? void 0 : D.call(a, h)) ?? !1, d = typeof a.label == "function" ? a.label(h) : a.label, m = typeof a.shortcuts == "function" ? a.shortcuts(h) : a.shortcuts, y = (T = a.checked) == null ? void 0 : T.call(a, h);
1633
+ const b = ((D = a.disabled) == null ? void 0 : D.call(a, f)) ?? !1, d = typeof a.label == "function" ? a.label(f) : a.label, m = typeof a.shortcuts == "function" ? a.shortcuts(f) : a.shortcuts, y = (T = a.checked) == null ? void 0 : T.call(a, f);
1650
1634
  return /* @__PURE__ */ c(
1651
1635
  xt,
1652
1636
  {
@@ -1655,7 +1639,7 @@ const xt = ({
1655
1639
  disabled: b,
1656
1640
  checked: y,
1657
1641
  testId: a.id ? `${a.id}-item` : void 0,
1658
- onClick: () => a.onClick(h)
1642
+ onClick: () => a.onClick(f)
1659
1643
  },
1660
1644
  u
1661
1645
  );
@@ -1674,7 +1658,7 @@ const xt = ({
1674
1658
  includes: "Includes",
1675
1659
  excludes: "Excludes"
1676
1660
  }, qt = ["blank", "nonblank"], je = { method: "eq", value: [""] }, Zs = ({ x: e, close: n, onWaiting: t }) => {
1677
- const { store: s, dispatch: r } = ie(le), { sheetReactive: o } = s, i = o.current, [f, h] = J([{ ...je }]), [a, u] = J("or"), [w, b] = J(null), d = M(
1661
+ const { store: s, dispatch: r } = ie(le), { sheetReactive: o } = s, i = o.current, [h, f] = J([{ ...je }]), [a, u] = J("or"), [w, b] = J(null), d = M(
1678
1662
  (S) => {
1679
1663
  S && S.focus();
1680
1664
  },
@@ -1684,7 +1668,7 @@ const xt = ({
1684
1668
  U(() => {
1685
1669
  if (i) {
1686
1670
  const S = i.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), p = S == null ? void 0 : S.filter;
1687
- p && p.conditions.length > 0 ? (h(p.conditions.map((l) => ({ ...l, value: [...l.value] }))), u(p.mode || "or")) : (h([{ ...je, value: [""] }]), u("or"));
1671
+ p && p.conditions.length > 0 ? (f(p.conditions.map((l) => ({ ...l, value: [...l.value] }))), u(p.mode || "or")) : (f([{ ...je, value: [""] }]), u("or"));
1688
1672
  }
1689
1673
  }, [e, i]);
1690
1674
  const m = M(() => {
@@ -1700,28 +1684,28 @@ const xt = ({
1700
1684
  if (S || !o.current)
1701
1685
  return;
1702
1686
  const { x: v, conditions: x, mode: A } = w;
1703
- x.length > 0 ? r(De({ x: v, filter: { mode: A, conditions: x } })) : r(De({ x: v })), t == null || t(null), b(null), n();
1687
+ x.length > 0 ? r(Fe({ x: v, filter: { mode: A, conditions: x } })) : r(Fe({ x: v })), t == null || t(null), b(null), n();
1704
1688
  }, l = o.current;
1705
1689
  return l && (l.hasPendingCells() || l.registry.asyncPending.size > 0) ? l.waitForPending().then(p) : p(), () => {
1706
1690
  S = !0;
1707
1691
  };
1708
1692
  }, [w]);
1709
1693
  const y = M((S, p) => {
1710
- h((l) => {
1694
+ f((l) => {
1711
1695
  const g = [...l];
1712
1696
  return g[S] = { ...g[S], ...p }, g;
1713
1697
  });
1714
1698
  }, []), D = M(() => {
1715
- h((S) => [...S, { ...je, value: [""] }]);
1699
+ f((S) => [...S, { ...je, value: [""] }]);
1716
1700
  }, []), T = M((S) => {
1717
- h((p) => p.length <= 1 ? [{ ...je, value: [""] }] : p.filter((l, g) => g !== S));
1701
+ f((p) => p.length <= 1 ? [{ ...je, value: [""] }] : p.filter((l, g) => g !== S));
1718
1702
  }, []), N = M(() => {
1719
- const S = f.filter((p) => qt.includes(p.method) ? !0 : p.value.some((l) => l.trim() !== ""));
1703
+ const S = h.filter((p) => qt.includes(p.method) ? !0 : p.value.some((l) => l.trim() !== ""));
1720
1704
  b({ x: e, conditions: S, mode: a });
1721
- }, [e, f, a]), Y = M(() => {
1722
- b(null), r(De({ x: e })), n();
1705
+ }, [e, h, a]), Y = M(() => {
1706
+ b(null), r(Fe({ x: e })), n();
1723
1707
  }, [r, e, n]), E = M(() => {
1724
- b(null), r(De({})), n();
1708
+ b(null), r(Fe({})), n();
1725
1709
  }, [r, n]);
1726
1710
  if (!i)
1727
1711
  return null;
@@ -1730,7 +1714,7 @@ const xt = ({
1730
1714
  /* @__PURE__ */ F("div", { className: "gs-filter-header", children: [
1731
1715
  /* @__PURE__ */ c("div", { className: "gs-menu-name", children: "Filter:" }),
1732
1716
  /* @__PURE__ */ c("button", { className: "gs-filter-add-btn", onClick: D, disabled: $, children: "+ ADD" }),
1733
- /* @__PURE__ */ F("div", { className: `gs-filter-mode-toggle${f.length <= 1 ? " gs-disabled" : ""}`, children: [
1717
+ /* @__PURE__ */ F("div", { className: `gs-filter-mode-toggle${h.length <= 1 ? " gs-disabled" : ""}`, children: [
1734
1718
  /* @__PURE__ */ F("label", { className: a === "and" ? "gs-active" : "", children: [
1735
1719
  /* @__PURE__ */ c(
1736
1720
  "input",
@@ -1739,7 +1723,7 @@ const xt = ({
1739
1723
  name: "gs-filter-mode",
1740
1724
  checked: a === "and",
1741
1725
  onChange: () => u("and"),
1742
- disabled: $ || f.length <= 1
1726
+ disabled: $ || h.length <= 1
1743
1727
  }
1744
1728
  ),
1745
1729
  "AND"
@@ -1752,14 +1736,14 @@ const xt = ({
1752
1736
  name: "gs-filter-mode",
1753
1737
  checked: a === "or",
1754
1738
  onChange: () => u("or"),
1755
- disabled: $ || f.length <= 1
1739
+ disabled: $ || h.length <= 1
1756
1740
  }
1757
1741
  ),
1758
1742
  "OR"
1759
1743
  ] })
1760
1744
  ] })
1761
1745
  ] }),
1762
- /* @__PURE__ */ c("div", { className: "gs-filter-conditions", children: f.map((S, p) => /* @__PURE__ */ F("div", { className: "gs-filter-condition-row", children: [
1746
+ /* @__PURE__ */ c("div", { className: "gs-filter-conditions", children: h.map((S, p) => /* @__PURE__ */ F("div", { className: "gs-filter-condition-row", children: [
1763
1747
  /* @__PURE__ */ c(
1764
1748
  "select",
1765
1749
  {
@@ -1809,22 +1793,22 @@ const xt = ({
1809
1793
  };
1810
1794
  Et("col-filter", Zs);
1811
1795
  const Us = ({ x: e, close: n, onWaiting: t }) => {
1812
- const { store: s, dispatch: r } = ie(le), { sheetReactive: o } = s, i = o.current, [f, h] = J(null), a = M(() => {
1813
- h(null), t == null || t(null), n();
1796
+ const { store: s, dispatch: r } = ie(le), { sheetReactive: o } = s, i = o.current, [h, f] = J(null), a = M(() => {
1797
+ f(null), t == null || t(null), n();
1814
1798
  }, [n, t]);
1815
1799
  if (U(() => {
1816
- f && (t == null || t("Sorting…", a));
1817
- }, [f]), U(() => {
1818
- if (!f)
1800
+ h && (t == null || t("Sorting…", a));
1801
+ }, [h]), U(() => {
1802
+ if (!h)
1819
1803
  return;
1820
1804
  let b = !1;
1821
1805
  const d = () => {
1822
- b || !o.current || (r(bt({ x: f.x, direction: f.direction })), t == null || t(null), h(null), n());
1806
+ b || !o.current || (r(Rt({ x: h.x, direction: h.direction })), t == null || t(null), f(null), n());
1823
1807
  }, m = o.current;
1824
1808
  return m && (m.hasPendingCells() || m.registry.asyncPending.size > 0) ? m.waitForPending().then(d) : d(), () => {
1825
1809
  b = !0;
1826
1810
  };
1827
- }, [f]), !i)
1811
+ }, [h]), !i)
1828
1812
  return null;
1829
1813
  const u = i.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), w = O.hasOperation(u == null ? void 0 : u.prevention, O.Sort);
1830
1814
  return /* @__PURE__ */ F("li", { className: `gs-menu-item gs-column-menu-sort${w ? " gs-disabled" : ""}`, children: [
@@ -1835,7 +1819,7 @@ const Us = ({ x: e, close: n, onWaiting: t }) => {
1835
1819
  {
1836
1820
  className: "gs-sort-btn gs-sort-btn-asc",
1837
1821
  onClick: (b) => {
1838
- b.stopPropagation(), w || h({ x: e, direction: "asc" });
1822
+ b.stopPropagation(), w || f({ x: e, direction: "asc" });
1839
1823
  },
1840
1824
  disabled: w,
1841
1825
  children: "↓ A to Z"
@@ -1846,7 +1830,7 @@ const Us = ({ x: e, close: n, onWaiting: t }) => {
1846
1830
  {
1847
1831
  className: "gs-sort-btn gs-sort-btn-desc",
1848
1832
  onClick: (b) => {
1849
- b.stopPropagation(), w || h({ x: e, direction: "desc" });
1833
+ b.stopPropagation(), w || f({ x: e, direction: "desc" });
1850
1834
  },
1851
1835
  disabled: w,
1852
1836
  children: "↑ Z to A"
@@ -1857,11 +1841,11 @@ const Us = ({ x: e, close: n, onWaiting: t }) => {
1857
1841
  };
1858
1842
  Et("col-sort", Us);
1859
1843
  const zs = ({ x: e, close: n }) => {
1860
- const { store: t, dispatch: s } = ie(le), { sheetReactive: r } = t, o = r.current, i = oe(null), [f, h] = J("");
1844
+ const { store: t, dispatch: s } = ie(le), { sheetReactive: r } = t, o = r.current, i = oe(null), [h, f] = J("");
1861
1845
  U(() => {
1862
1846
  if (o) {
1863
1847
  const d = o.getCell({ y: 0, x: e }, { resolution: "SYSTEM" });
1864
- h((d == null ? void 0 : d.label) ?? "");
1848
+ f((d == null ? void 0 : d.label) ?? "");
1865
1849
  }
1866
1850
  }, [e, o]);
1867
1851
  const a = M(() => {
@@ -1869,7 +1853,7 @@ const zs = ({ x: e, close: n }) => {
1869
1853
  return;
1870
1854
  const d = Ne({ y: 0, x: e });
1871
1855
  o.update({
1872
- diff: { [d]: { label: f || void 0 } },
1856
+ diff: { [d]: { label: h || void 0 } },
1873
1857
  partial: !0,
1874
1858
  ignoreFields: [],
1875
1859
  undoReflection: {
@@ -1883,10 +1867,10 @@ const zs = ({ x: e, close: n }) => {
1883
1867
  choosing: t.choosing
1884
1868
  }
1885
1869
  }), s(Se({ sheetReactive: { current: o } })), n();
1886
- }, [s, e, f, n, o, t.selectingZone, t.choosing]);
1870
+ }, [s, e, h, n, o, t.selectingZone, t.choosing]);
1887
1871
  if (!o)
1888
1872
  return null;
1889
- const u = o.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), w = O.hasOperation(u == null ? void 0 : u.prevention, O.SetLabel), b = Ct(o, u == null ? void 0 : u.label, { y: 0, x: e }, e) ?? me(e);
1873
+ const u = o.getCell({ y: 0, x: e }, { resolution: "SYSTEM" }), w = O.hasOperation(u == null ? void 0 : u.prevention, O.SetLabel), b = bt(o, u == null ? void 0 : u.label, { y: 0, x: e }, e) ?? me(e);
1890
1874
  return /* @__PURE__ */ c("li", { className: `gs-menu-item gs-column-menu-label${w ? " gs-disabled" : ""}`, children: /* @__PURE__ */ F("label", { className: "gs-label-input-row", children: [
1891
1875
  /* @__PURE__ */ c("div", { className: "gs-label-input-label", children: "Label:" }),
1892
1876
  /* @__PURE__ */ c(
@@ -1896,9 +1880,9 @@ const zs = ({ x: e, close: n }) => {
1896
1880
  className: "gs-label-input",
1897
1881
  type: "text",
1898
1882
  placeholder: b,
1899
- value: f,
1883
+ value: h,
1900
1884
  disabled: w,
1901
- onChange: (d) => h(d.target.value),
1885
+ onChange: (d) => f(d.target.value),
1902
1886
  onKeyDown: (d) => {
1903
1887
  d.nativeEvent.isComposing || (d.key === "Enter" && a(), d.key === "Escape" && n());
1904
1888
  }
@@ -1909,28 +1893,28 @@ const zs = ({ x: e, close: n }) => {
1909
1893
  };
1910
1894
  Et("col-label", zs);
1911
1895
  const Ws = () => {
1912
- const { store: e, dispatch: n } = ie(le), { columnMenuState: t, editorRef: s, colMenu: r } = e, o = e.sheetReactive.current, i = t == null ? void 0 : t.x, f = t == null ? void 0 : t.position, [h, a] = J(null), u = M(() => {
1913
- n(Qe(null)), H(s.current);
1896
+ const { store: e, dispatch: n } = ie(le), { columnMenuState: t, editorRef: s, colMenu: r } = e, o = e.sheetReactive.current, i = t == null ? void 0 : t.x, h = t == null ? void 0 : t.position, [f, a] = J(null), u = M(() => {
1897
+ n(et(null)), H(s.current);
1914
1898
  }, [n, s]), w = M(
1915
1899
  (d, m) => {
1916
1900
  a(d ? { message: d, cancel: m ?? u } : null);
1917
1901
  },
1918
1902
  [u]
1919
1903
  );
1920
- if (!t || !o || i == null || !f)
1904
+ if (!t || !o || i == null || !h)
1921
1905
  return null;
1922
1906
  const b = Nt(e, n, u);
1923
1907
  return /* @__PURE__ */ F(
1924
1908
  rt,
1925
1909
  {
1926
1910
  className: "gs-menu-modal gs-column-menu-modal",
1927
- onClick: (d) => (d.preventDefault(), h || u(), !1),
1911
+ onClick: (d) => (d.preventDefault(), f || u(), !1),
1928
1912
  children: [
1929
1913
  /* @__PURE__ */ c(
1930
1914
  "div",
1931
1915
  {
1932
1916
  className: "gs-column-menu",
1933
- style: { top: f.y, left: f.x, display: h ? "none" : void 0 },
1917
+ style: { top: h.y, left: h.x, display: f ? "none" : void 0 },
1934
1918
  onClick: (d) => d.stopPropagation(),
1935
1919
  children: /* @__PURE__ */ c("ul", { className: "gs-menu-items", children: r.map((d, m) => {
1936
1920
  var Y;
@@ -1953,7 +1937,7 @@ const Ws = () => {
1953
1937
  disabled: D,
1954
1938
  testId: d.id ? `${d.id}-item` : void 0,
1955
1939
  onClick: () => {
1956
- d.onClick(b, i), n(Qe(null));
1940
+ d.onClick(b, i), n(et(null));
1957
1941
  }
1958
1942
  },
1959
1943
  m
@@ -1961,16 +1945,16 @@ const Ws = () => {
1961
1945
  }) })
1962
1946
  }
1963
1947
  ),
1964
- h && /* @__PURE__ */ F(
1948
+ f && /* @__PURE__ */ F(
1965
1949
  "div",
1966
1950
  {
1967
1951
  className: "gs-column-menu gs-column-menu-waiting",
1968
- style: { top: f.y, left: f.x },
1952
+ style: { top: h.y, left: h.x },
1969
1953
  onClick: (d) => d.stopPropagation(),
1970
1954
  children: [
1971
- /* @__PURE__ */ c("div", { className: "gs-waiting-message", children: h.message }),
1955
+ /* @__PURE__ */ c("div", { className: "gs-waiting-message", children: f.message }),
1972
1956
  /* @__PURE__ */ c("div", { className: "gs-waiting-spinner" }),
1973
- /* @__PURE__ */ c("button", { className: "gs-waiting-cancel-btn", onClick: h.cancel, children: "CANCEL" })
1957
+ /* @__PURE__ */ c("button", { className: "gs-waiting-cancel-btn", onClick: f.cancel, children: "CANCEL" })
1974
1958
  ]
1975
1959
  }
1976
1960
  )
@@ -1984,12 +1968,12 @@ function _s(e, n, t, s, r) {
1984
1968
  return /* @__PURE__ */ c(kt, {}, s);
1985
1969
  if (e.type === "component" || !(!e.visible || e.visible(n, t)))
1986
1970
  return null;
1987
- const i = ((u = e.disabled) == null ? void 0 : u.call(e, n, t)) ?? !1, f = typeof e.label == "function" ? e.label(n, t) : e.label, h = typeof e.shortcuts == "function" ? e.shortcuts(n, t) : e.shortcuts, a = e.checked != null ? e.checked(n, t) : void 0;
1971
+ const i = ((u = e.disabled) == null ? void 0 : u.call(e, n, t)) ?? !1, h = typeof e.label == "function" ? e.label(n, t) : e.label, f = typeof e.shortcuts == "function" ? e.shortcuts(n, t) : e.shortcuts, a = e.checked != null ? e.checked(n, t) : void 0;
1988
1972
  return /* @__PURE__ */ c(
1989
1973
  xt,
1990
1974
  {
1991
- label: f,
1992
- shortcuts: h,
1975
+ label: h,
1976
+ shortcuts: f,
1993
1977
  disabled: i,
1994
1978
  checked: a,
1995
1979
  testId: e.id ? `${e.id}-item` : void 0,
@@ -2001,10 +1985,10 @@ function _s(e, n, t, s, r) {
2001
1985
  );
2002
1986
  }
2003
1987
  const js = () => {
2004
- const { store: e, dispatch: n } = ie(le), { rowMenuState: t, sheetReactive: s, editorRef: r, rowMenu: o } = e, i = s.current, f = t == null ? void 0 : t.y, h = t == null ? void 0 : t.position, a = () => {
2005
- n(ht(null)), H(r.current);
1988
+ const { store: e, dispatch: n } = ie(le), { rowMenuState: t, sheetReactive: s, editorRef: r, rowMenu: o } = e, i = s.current, h = t == null ? void 0 : t.y, f = t == null ? void 0 : t.position, a = () => {
1989
+ n(ft(null)), H(r.current);
2006
1990
  };
2007
- if (!t || !i || f == null || !h)
1991
+ if (!t || !i || h == null || !f)
2008
1992
  return null;
2009
1993
  const u = Nt(e, n, a);
2010
1994
  return /* @__PURE__ */ c(
@@ -2012,7 +1996,7 @@ const js = () => {
2012
1996
  {
2013
1997
  className: "gs-menu-modal gs-row-menu-modal",
2014
1998
  onClick: (w) => (w.preventDefault(), a(), !1),
2015
- children: /* @__PURE__ */ c("div", { className: "gs-row-menu", style: { top: h.y, left: h.x }, onClick: (w) => w.stopPropagation(), children: /* @__PURE__ */ c("ul", { className: "gs-menu-items", children: o.map((w, b) => _s(w, u, f, b, a)) }) })
1999
+ children: /* @__PURE__ */ c("div", { className: "gs-row-menu", style: { top: f.y, left: f.x }, onClick: (w) => w.stopPropagation(), children: /* @__PURE__ */ c("ul", { className: "gs-menu-items", children: o.map((w, b) => _s(w, u, h, b, a)) }) })
2016
2000
  }
2017
2001
  );
2018
2002
  }, Xe = (e) => {
@@ -2023,10 +2007,10 @@ const js = () => {
2023
2007
  return !!(n.buttons & 1) && n.button === 0;
2024
2008
  }
2025
2009
  return !1;
2026
- }, fe = (e) => {
2010
+ }, he = (e) => {
2027
2011
  e.type.startsWith("touch") || e.preventDefault();
2028
2012
  }, Vs = nt(({ y: e, x: n }) => {
2029
- const t = ve(e), r = `${me(n)}${t}`, { store: o, dispatch: i } = ie(le), f = oe(!0), h = oe(null), [a, u] = J(null), {
2013
+ const t = ve(e), r = `${me(n)}${t}`, { store: o, dispatch: i } = ie(le), h = oe(!0), f = oe(null), [a, u] = J(null), {
2030
2014
  sheetReactive: w,
2031
2015
  editingAddress: b,
2032
2016
  choosing: d,
@@ -2038,11 +2022,11 @@ const js = () => {
2038
2022
  contextMenu: Y
2039
2023
  } = o, E = w.current, I = st(o), $ = E == null ? void 0 : E.registry.lastFocused, P = de(m), S = b === r, p = d.y === e && d.x === n, l = M(() => {
2040
2024
  var _;
2041
- const R = (_ = h.current) == null ? void 0 : _.getBoundingClientRect();
2025
+ const R = (_ = f.current) == null ? void 0 : _.getBoundingClientRect();
2042
2026
  if (R == null)
2043
2027
  return null;
2044
2028
  i(
2045
- ns({
2029
+ ws({
2046
2030
  y: R.y,
2047
2031
  x: R.x,
2048
2032
  height: R.height,
@@ -2051,11 +2035,11 @@ const js = () => {
2051
2035
  );
2052
2036
  }, [i]);
2053
2037
  U(() => {
2054
- if (p && !f.current) {
2038
+ if (p && !h.current) {
2055
2039
  l();
2056
2040
  return;
2057
2041
  }
2058
- f.current = !1;
2042
+ h.current = !1;
2059
2043
  }, [p, S, l]);
2060
2044
  const g = E == null ? void 0 : E.getCell({ y: e, x: n }, { resolution: "SYSTEM" }), v = M(
2061
2045
  (R) => {
@@ -2072,15 +2056,15 @@ const js = () => {
2072
2056
  try {
2073
2057
  E && (C = E.render({ sheet: E, point: { y: e, x: n }, apply: x, value: void 0 }));
2074
2058
  } catch (R) {
2075
- ws.is(R) ? (A = R.message, C = R.code) : (A = R.message, C = "#UNKNOWN");
2059
+ Jn.is(R) ? (A = R.message, C = R.code) : (A = R.message, C = "#UNKNOWN");
2076
2060
  }
2077
- const [, L] = (E == null ? void 0 : E.getSolvedCache({ y: e, x: n })) ?? [void 0, void 0], q = Rs.is(L), W = T.current, ne = !!(E != null && E.registry.editingAddress || b), ae = M(
2061
+ const [, L] = (E == null ? void 0 : E.getSolvedCache({ y: e, x: n })) ?? [void 0, void 0], q = es.is(L), W = T.current, ne = !!(E != null && E.registry.editingAddress || b), ae = M(
2078
2062
  (R) => {
2079
- if (R.stopPropagation(), fe(R), !E || !Xe(R) || !W)
2063
+ if (R.stopPropagation(), he(R), !E || !Xe(R) || !W)
2080
2064
  return !1;
2081
2065
  if (R.type.startsWith("touch"))
2082
2066
  return ne && W && W.blur(), i(Pe({ y: e, x: n })), i(be({ startY: e, startX: n, endY: e, endX: n })), !0;
2083
- R.shiftKey ? i(he({ y: e, x: n })) : i(be({ startY: e, startX: n, endY: -1, endX: -1 })), i(xe(!0));
2067
+ R.shiftKey ? i(fe({ y: e, x: n })) : i(be({ startY: e, startX: n, endY: -1, endX: -1 })), i(xe(!0));
2084
2068
  const _ = `${E.sheetPrefix(!I)}${r}`;
2085
2069
  return ne && Me({ input: $ || null, ref: _ }) || (E.registry.lastFocused = W, H(W), i(ue("")), N) ? !1 : (ne && v(W.value), R.shiftKey || i(Pe({ y: e, x: n })), !0);
2086
2070
  },
@@ -2088,9 +2072,9 @@ const js = () => {
2088
2072
  ), B = M(
2089
2073
  (R) => {
2090
2074
  if (R.stopPropagation(), !R.type.startsWith("touch")) {
2091
- if (fe(R), i(xe(!1)), N)
2092
- return i(gn(N)), H(W), !1;
2093
- ne && i(he({ y: -1, x: -1 }));
2075
+ if (he(R), i(xe(!1)), N)
2076
+ return i(vn(N)), H(W), !1;
2077
+ ne && i(fe({ y: -1, x: -1 }));
2094
2078
  }
2095
2079
  },
2096
2080
  [N, ne, W]
@@ -2098,16 +2082,16 @@ const js = () => {
2098
2082
  (R) => {
2099
2083
  if (!Xe(R) || R.type.startsWith("touch") || !E)
2100
2084
  return !1;
2101
- if (fe(R), R.stopPropagation(), N)
2085
+ if (he(R), R.stopPropagation(), N)
2102
2086
  return i(Ke({ x: n, y: e })), !1;
2103
2087
  if (y)
2104
- return i(he({ y: e, x: E.numCols })), !1;
2088
+ return i(fe({ y: e, x: E.numCols })), !1;
2105
2089
  if (D)
2106
- return i(he({ y: E.numRows, x: n })), !1;
2107
- if (ne && !bn($ || null))
2090
+ return i(fe({ y: E.numRows, x: n })), !1;
2091
+ if (ne && !nn($ || null))
2108
2092
  return !1;
2109
- if (i(he({ y: e, x: n })), ne) {
2110
- const _ = de({ ...m, endY: e, endX: n }), ge = `${E.sheetPrefix(!I)}${mn(_)}`;
2093
+ if (i(fe({ y: e, x: n })), ne) {
2094
+ const _ = de({ ...m, endY: e, endX: n }), ge = `${E.sheetPrefix(!I)}${sn(_)}`;
2111
2095
  Me({ input: $ || null, ref: ge });
2112
2096
  }
2113
2097
  return !0;
@@ -2129,16 +2113,16 @@ const js = () => {
2129
2113
  [i, n, e]
2130
2114
  ), G = M(() => {
2131
2115
  var _;
2132
- const R = (_ = h.current) == null ? void 0 : _.getBoundingClientRect();
2133
- R && u(cs(R));
2116
+ const R = (_ = f.current) == null ? void 0 : _.getBoundingClientRect();
2117
+ R && u(ts(R));
2134
2118
  }, []), V = M(() => {
2135
2119
  u(null);
2136
2120
  }, []), Z = M(
2137
- (R) => Y.length > 0 ? (R.stopPropagation(), fe(R), i(ze({ y: R.clientY, x: R.clientX })), !1) : !0,
2121
+ (R) => Y.length > 0 ? (R.stopPropagation(), he(R), i(ze({ y: R.clientY, x: R.clientX })), !1) : !0,
2138
2122
  [Y.length]
2139
2123
  ), X = M(
2140
2124
  (R) => {
2141
- R.stopPropagation(), fe(R), ue(r);
2125
+ R.stopPropagation(), he(R), ue(r);
2142
2126
  const _ = document.createEvent("MouseEvents");
2143
2127
  return _.initEvent("dblclick", !0, !0), W == null || W.dispatchEvent(_), !1;
2144
2128
  },
@@ -2147,11 +2131,11 @@ const js = () => {
2147
2131
  return E ? W ? /* @__PURE__ */ c(
2148
2132
  "td",
2149
2133
  {
2150
- ref: h,
2134
+ ref: f,
2151
2135
  "data-x": n,
2152
2136
  "data-y": e,
2153
2137
  "data-address": r,
2154
- className: `gs-cell ${gs(P, { y: e, x: n }) ? "gs-selecting" : ""} ${p ? "gs-choosing" : ""} ${S ? "gs-editing" : ""} ${q ? "gs-pending" : ""}`,
2138
+ className: `gs-cell ${ss(P, { y: e, x: n }) ? "gs-selecting" : ""} ${p ? "gs-choosing" : ""} ${S ? "gs-editing" : ""} ${q ? "gs-pending" : ""}`,
2155
2139
  style: {
2156
2140
  ...g == null ? void 0 : g.style
2157
2141
  },
@@ -2195,7 +2179,7 @@ const js = () => {
2195
2179
  style: {
2196
2180
  top: a.y + 4,
2197
2181
  left: a.x,
2198
- transform: us(a.hAlign)
2182
+ transform: ns(a.hAlign)
2199
2183
  },
2200
2184
  children: A
2201
2185
  }
@@ -2214,8 +2198,8 @@ const js = () => {
2214
2198
  let Gt = (/* @__PURE__ */ new Date()).getTime(), Be = 0;
2215
2199
  function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" }) {
2216
2200
  const r = oe(null), { store: o, dispatch: i } = ie(le), {
2217
- tabularRef: f,
2218
- autofillDraggingTo: h,
2201
+ tabularRef: h,
2202
+ autofillDraggingTo: f,
2219
2203
  dragging: a,
2220
2204
  selectingZone: u,
2221
2205
  editorRef: w,
@@ -2229,33 +2213,33 @@ function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2229
2213
  if (!y)
2230
2214
  return { x: -1, y: -1 };
2231
2215
  if (n == 0 && t == 0) {
2232
- const A = f.current.getBoundingClientRect(), { left: C, top: L, right: q, bottom: W } = A;
2216
+ const A = h.current.getBoundingClientRect(), { left: C, top: L, right: q, bottom: W } = A;
2233
2217
  n = l.pageX > q ? 1 : l.pageX < C ? -1 : 0, n === 0 && (t = l.pageY > W ? 1 : l.pageY < L ? -1 : 0);
2234
2218
  }
2235
- const g = Wt(f.current);
2219
+ const g = Ht(h.current);
2236
2220
  let { endX: v, endY: x } = u;
2237
2221
  return n ? v = n > 0 ? g.right : g.left : t && (x = t > 0 ? g.bottom : g.top), { x: v, y: x };
2238
2222
  },
2239
2223
  [y, n, t, u]
2240
2224
  ), E = M(
2241
2225
  (l) => {
2242
- if (!D || f.current === null || !y)
2226
+ if (!D || h.current === null || !y)
2243
2227
  return;
2244
2228
  const g = (/* @__PURE__ */ new Date()).getTime();
2245
- g - Gt > 1e3 && (Be = 0), Gt = g, f.current.scrollBy({
2229
+ g - Gt > 1e3 && (Be = 0), Gt = g, h.current.scrollBy({
2246
2230
  left: Be * n,
2247
2231
  top: Be * t
2248
2232
  }), H(w.current);
2249
2233
  const { x: v, y: x } = Y(l);
2250
- if (h) {
2251
- const { y: A, x: C } = h;
2234
+ if (f) {
2235
+ const { y: A, x: C } = f;
2252
2236
  i(Ke({ y: x === -1 ? A : x, x: v === -1 ? C : v }));
2253
2237
  } else {
2254
2238
  if (N) {
2255
- const A = de({ ...u, endY: x, endX: v }), C = y.sheetPrefix(!T), L = mn(A), q = `${C}${L}`;
2239
+ const A = de({ ...u, endY: x, endX: v }), C = y.sheetPrefix(!T), L = sn(A), q = `${C}${L}`;
2256
2240
  Me({ input: w.current, ref: q });
2257
2241
  }
2258
- i(he({ y: x, x: v }));
2242
+ i(fe({ y: x, x: v }));
2259
2243
  }
2260
2244
  Be = Math.min(Be + qs, Gs), r.current = requestAnimationFrame(() => E(l));
2261
2245
  },
@@ -2264,7 +2248,7 @@ function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2264
2248
  y,
2265
2249
  n,
2266
2250
  t,
2267
- h,
2251
+ f,
2268
2252
  N,
2269
2253
  u,
2270
2254
  T,
@@ -2274,7 +2258,7 @@ function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2274
2258
  (l) => {
2275
2259
  if (l.preventDefault(), l.stopPropagation(), !D) {
2276
2260
  if (D = !0, n === 0 || t === 0) {
2277
- const g = f.current.getBoundingClientRect(), { left: v, top: x, right: A, bottom: C } = g;
2261
+ const g = h.current.getBoundingClientRect(), { left: v, top: x, right: A, bottom: C } = g;
2278
2262
  n || (n = l.pageX > A ? 1 : l.pageX < v ? -1 : 0), n === 0 && (t || (t = l.pageY > C ? 1 : l.pageY < x ? -1 : 0));
2279
2263
  }
2280
2264
  r.current = requestAnimationFrame(() => E(l));
@@ -2282,21 +2266,21 @@ function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2282
2266
  },
2283
2267
  [D, n, t, E]
2284
2268
  ), $ = M(() => {
2285
- r.current !== null && (cancelAnimationFrame(r.current), r.current = null), D = !1, ys(d.current) || H(w.current);
2269
+ r.current !== null && (cancelAnimationFrame(r.current), r.current = null), D = !1, rs(d.current) || H(w.current);
2286
2270
  }, []), P = M(
2287
2271
  (l) => {
2288
2272
  l.preventDefault(), l.stopPropagation();
2289
- const g = Wt(f.current);
2273
+ const g = Ht(h.current);
2290
2274
  if (g.bottom === -1 || g.right === -1)
2291
2275
  return;
2292
2276
  const { x: v, y: x } = Y(l);
2293
- if (h) {
2294
- const { y: A, x: C } = h;
2295
- i(gn({ y: x === -1 ? A : x, x: v === -1 ? C : v })), H(w.current);
2277
+ if (f) {
2278
+ const { y: A, x: C } = f;
2279
+ i(vn({ y: x === -1 ? A : x, x: v === -1 ? C : v })), H(w.current);
2296
2280
  } else
2297
- N && i(he({ y: -1, x: -1 }));
2281
+ N && i(fe({ y: -1, x: -1 }));
2298
2282
  },
2299
- [h, N, Y]
2283
+ [f, N, Y]
2300
2284
  ), S = M(
2301
2285
  (l) => {
2302
2286
  $(), i(xe(!1)), requestAnimationFrame(() => P(l));
@@ -2305,7 +2289,7 @@ function ke({ style: e, horizontal: n = 0, vertical: t = 0, className: s = "" })
2305
2289
  ), p = M(() => {
2306
2290
  $();
2307
2291
  }, [$]);
2308
- return U(() => $, [$]), !w.current || !a && !h ? /* @__PURE__ */ c("div", { className: `gs-scroll-handle gs-hidden ${s}` }) : /* @__PURE__ */ c(
2292
+ return U(() => $, [$]), !w.current || !a && !f ? /* @__PURE__ */ c("div", { className: `gs-scroll-handle gs-hidden ${s}` }) : /* @__PURE__ */ c(
2309
2293
  "div",
2310
2294
  {
2311
2295
  style: e,
@@ -2323,8 +2307,8 @@ const Qs = nt(({ x: e }) => {
2323
2307
  sheetReactive: r,
2324
2308
  editingAddress: o,
2325
2309
  choosing: i,
2326
- selectingZone: f,
2327
- topHeaderSelecting: h,
2310
+ selectingZone: h,
2311
+ topHeaderSelecting: f,
2328
2312
  editorRef: a,
2329
2313
  autofillDraggingTo: u,
2330
2314
  dragging: w,
@@ -2336,10 +2320,10 @@ const Qs = nt(({ x: e }) => {
2336
2320
  },
2337
2321
  [i]
2338
2322
  ), $ = M((l) => {
2339
- s(ft([e, l.clientX, l.clientX])), l.stopPropagation(), fe(l);
2323
+ s(ht([e, l.clientX, l.clientX])), l.stopPropagation(), he(l);
2340
2324
  }, []), P = M(
2341
2325
  (l) => {
2342
- if (l.stopPropagation(), fe(l), !Xe(l) || !m || w)
2326
+ if (l.stopPropagation(), he(l), !Xe(l) || !m || w)
2343
2327
  return !1;
2344
2328
  if (l.type.startsWith("touch"))
2345
2329
  return E && a.current && a.current.blur(), s(Pe({ y: 1, x: e })), s(be({ startY: 1, startX: e, endY: m.numRows, endX: e })), !0;
@@ -2347,9 +2331,9 @@ const Qs = nt(({ x: e }) => {
2347
2331
  const g = `${m.sheetPrefix(!N)}${n}:${n}`;
2348
2332
  if (E && Me({ input: Y || null, ref: g }))
2349
2333
  return s(be({ startY: m.numRows, startX: e, endY: 0, endX: e })), !1;
2350
- let v = l.shiftKey ? f.startX : e;
2334
+ let v = l.shiftKey ? h.startX : e;
2351
2335
  return v === -1 && (v = i.x), s(
2352
- Lt({
2336
+ Ut({
2353
2337
  range: { start: v, end: e },
2354
2338
  numRows: m.numRows
2355
2339
  })
@@ -2361,29 +2345,29 @@ const Qs = nt(({ x: e }) => {
2361
2345
  N,
2362
2346
  n,
2363
2347
  Y,
2364
- f,
2348
+ h,
2365
2349
  i,
2366
2350
  u,
2367
2351
  a
2368
2352
  ]
2369
2353
  ), S = M(
2370
2354
  (l) => {
2371
- if (l.stopPropagation(), !l.type.startsWith("touch") && (fe(l), s(xe(!1)), u))
2355
+ if (l.stopPropagation(), !l.type.startsWith("touch") && (he(l), s(xe(!1)), u))
2372
2356
  return H(a.current), !1;
2373
2357
  },
2374
2358
  [u]
2375
- ), p = fn((l) => {
2359
+ ), p = bn((l) => {
2376
2360
  if (!Xe(l) || !m || l.type.startsWith("touch"))
2377
2361
  return !1;
2378
- if (fe(l), l.stopPropagation(), u)
2362
+ if (he(l), l.stopPropagation(), u)
2379
2363
  return s(Ke({ y: 1, x: e })), !1;
2380
2364
  if (E) {
2381
- const g = de({ ...f, endY: 1, endX: e }), [v, x] = [me(g.left), me(g.right)], A = `${m.sheetPrefix(!N)}${v}:${x}`;
2365
+ const g = de({ ...h, endY: 1, endX: e }), [v, x] = [me(g.left), me(g.right)], A = `${m.sheetPrefix(!N)}${v}:${x}`;
2382
2366
  Me({ input: Y || null, ref: A });
2383
2367
  }
2384
2368
  if (u == null) {
2385
- const { startY: g } = f;
2386
- s(g === 1 ? he({ y: m.numRows, x: e }) : he({ y: 1, x: e }));
2369
+ const { startY: g } = h;
2370
+ s(g === 1 ? fe({ y: m.numRows, x: e }) : fe({ y: 1, x: e }));
2387
2371
  }
2388
2372
  return !1;
2389
2373
  }, 100);
@@ -2391,9 +2375,9 @@ const Qs = nt(({ x: e }) => {
2391
2375
  "th",
2392
2376
  {
2393
2377
  "data-x": e,
2394
- className: `gs-th gs-th-top ${i.x === e ? "gs-choosing" : ""} ${Te({ start: f.startX, end: f.endX }, e) ? h ? "gs-th-selecting" : "gs-selecting" : ""}`,
2378
+ className: `gs-th gs-th-top ${i.x === e ? "gs-choosing" : ""} ${Te({ start: h.startX, end: h.endX }, e) ? f ? "gs-th-selecting" : "gs-selecting" : ""}`,
2395
2379
  style: { ...y == null ? void 0 : y.style, width: D, minWidth: D, maxWidth: D },
2396
- onContextMenu: (l) => b.length > 0 ? (l.stopPropagation(), fe(l), s(ze({ y: l.clientY, x: l.clientX })), !1) : !0,
2380
+ onContextMenu: (l) => b.length > 0 ? (l.stopPropagation(), he(l), s(ze({ y: l.clientY, x: l.clientX })), !1) : !0,
2397
2381
  children: /* @__PURE__ */ c(
2398
2382
  "div",
2399
2383
  {
@@ -2408,13 +2392,13 @@ const Qs = nt(({ x: e }) => {
2408
2392
  {
2409
2393
  style: {
2410
2394
  position: "absolute",
2411
- zIndex: h ? -1 : 1
2395
+ zIndex: f ? -1 : 1
2412
2396
  },
2413
2397
  vertical: -1
2414
2398
  }
2415
2399
  ),
2416
2400
  (() => {
2417
- const l = Ct(m, y == null ? void 0 : y.label, { y: 0, x: e }, e) ?? n;
2401
+ const l = bt(m, y == null ? void 0 : y.label, { y: 0, x: e }, e) ?? n;
2418
2402
  return l !== n ? /* @__PURE__ */ F(we, { children: [
2419
2403
  /* @__PURE__ */ c("span", { className: "gs-col-addr", children: n }),
2420
2404
  l
@@ -2433,7 +2417,7 @@ const Qs = nt(({ x: e }) => {
2433
2417
  if (Math.abs(l.clientX - v) > 4 || Math.abs(l.clientY - x) > 4)
2434
2418
  return;
2435
2419
  const C = g.getBoundingClientRect();
2436
- (d == null ? void 0 : d.x) === e ? s(Qe(null)) : (Te({ start: f.startX, end: f.endX }, e) && f.startY === 1 && f.endY === m.numRows || s(Lt({ range: { start: e, end: e }, numRows: m.numRows })), s(Qe({ x: e, position: { y: C.bottom, x: C.left } })));
2420
+ (d == null ? void 0 : d.x) === e ? s(et(null)) : (Te({ start: h.startX, end: h.endX }, e) && h.startY === 1 && h.endY === m.numRows || s(Ut({ range: { start: e, end: e }, numRows: m.numRows })), s(et({ x: e, position: { y: C.bottom, x: C.left } })));
2437
2421
  },
2438
2422
  title: "Sort & Filter",
2439
2423
  children: "⋮"
@@ -2464,8 +2448,8 @@ const Qs = nt(({ x: e }) => {
2464
2448
  choosing: r,
2465
2449
  editingAddress: o,
2466
2450
  selectingZone: i,
2467
- leftHeaderSelecting: f,
2468
- editorRef: h,
2451
+ leftHeaderSelecting: h,
2452
+ editorRef: f,
2469
2453
  sheetReactive: a,
2470
2454
  autofillDraggingTo: u,
2471
2455
  dragging: w,
@@ -2477,24 +2461,24 @@ const Qs = nt(({ x: e }) => {
2477
2461
  },
2478
2462
  [r]
2479
2463
  ), I = M((l) => {
2480
- s(gt([e, l.clientY, l.clientY])), l.stopPropagation(), fe(l);
2464
+ s(gt([e, l.clientY, l.clientY])), l.stopPropagation(), he(l);
2481
2465
  }, []), $ = M(
2482
2466
  (l) => {
2483
- if (l.stopPropagation(), fe(l), !Xe(l) || !m || w)
2467
+ if (l.stopPropagation(), he(l), !Xe(l) || !m || w)
2484
2468
  return !1;
2485
2469
  if (l.type.startsWith("touch"))
2486
- return Y && h.current && h.current.blur(), s(Pe({ y: e, x: 1 })), s(be({ startY: e, startX: 1, endY: e, endX: m.numCols })), !0;
2470
+ return Y && f.current && f.current.blur(), s(Pe({ y: e, x: 1 })), s(be({ startY: e, startX: 1, endY: e, endX: m.numCols })), !0;
2487
2471
  s(be({ startY: e, startX: 1, endY: e, endX: -1 }));
2488
2472
  const g = `${m.sheetPrefix(!T)}${n}:${n}`;
2489
2473
  if (Y && Me({ input: N || null, ref: g }))
2490
2474
  return s(be({ startY: e, startX: m.numCols, endY: e, endX: 0 })), !1;
2491
2475
  let v = l.shiftKey ? i.startY : e;
2492
2476
  return v === -1 && (v = r.y), s(
2493
- Bt({
2477
+ zt({
2494
2478
  range: { start: v, end: e },
2495
2479
  numCols: m.numCols
2496
2480
  })
2497
- ), Y && E((N == null ? void 0 : N.value) ?? ""), s(ue("")), s(xe(!0)), H(h.current), !u;
2481
+ ), Y && E((N == null ? void 0 : N.value) ?? ""), s(ue("")), s(xe(!0)), H(f.current), !u;
2498
2482
  },
2499
2483
  [
2500
2484
  w,
@@ -2505,18 +2489,18 @@ const Qs = nt(({ x: e }) => {
2505
2489
  i,
2506
2490
  r,
2507
2491
  u,
2508
- h
2492
+ f
2509
2493
  ]
2510
2494
  ), P = M(
2511
2495
  (l) => {
2512
- if (l.stopPropagation(), !l.type.startsWith("touch") && (fe(l), s(xe(!1)), u))
2513
- return H(h.current), !1;
2496
+ if (l.stopPropagation(), !l.type.startsWith("touch") && (he(l), s(xe(!1)), u))
2497
+ return H(f.current), !1;
2514
2498
  },
2515
2499
  [u]
2516
- ), S = fn((l) => {
2500
+ ), S = bn((l) => {
2517
2501
  if (!Xe(l) || !m || l.type.startsWith("touch"))
2518
2502
  return !1;
2519
- if (fe(l), l.stopPropagation(), u)
2503
+ if (he(l), l.stopPropagation(), u)
2520
2504
  return s(Ke({ y: e, x: 1 })), !1;
2521
2505
  if (Y) {
2522
2506
  const g = de({ ...i, endY: e, endX: 1 }), [v, x] = [ve(g.top), ve(g.bottom)], A = `${m.sheetPrefix(!T)}${v}:${x}`;
@@ -2524,18 +2508,18 @@ const Qs = nt(({ x: e }) => {
2524
2508
  }
2525
2509
  if (u == null) {
2526
2510
  const { startX: g } = i;
2527
- s(g === 1 ? he({ y: e, x: m.numCols }) : he({ y: e, x: 1 }));
2511
+ s(g === 1 ? fe({ y: e, x: m.numCols }) : fe({ y: e, x: 1 }));
2528
2512
  }
2529
2513
  return !1;
2530
2514
  }, 100), p = M(
2531
- (l) => b.length > 0 ? (l.stopPropagation(), fe(l), s(ze({ y: l.clientY, x: l.clientX })), !1) : !0,
2515
+ (l) => b.length > 0 ? (l.stopPropagation(), he(l), s(ze({ y: l.clientY, x: l.clientX })), !1) : !0,
2532
2516
  [b.length]
2533
2517
  );
2534
2518
  return m ? /* @__PURE__ */ c(
2535
2519
  "th",
2536
2520
  {
2537
2521
  "data-y": e,
2538
- className: `gs-th gs-th-left ${r.y === e ? "gs-choosing" : ""} ${Te({ start: i.startY, end: i.endY }, e) ? f ? "gs-th-selecting" : "gs-selecting" : ""} ${y != null && y.filterFixed ? "gs-filter-fixed" : ""} ${y != null && y.sortFixed ? "gs-sort-fixed" : ""}`,
2522
+ className: `gs-th gs-th-left ${r.y === e ? "gs-choosing" : ""} ${Te({ start: i.startY, end: i.endY }, e) ? h ? "gs-th-selecting" : "gs-selecting" : ""} ${y != null && y.filterFixed ? "gs-filter-fixed" : ""} ${y != null && y.sortFixed ? "gs-sort-fixed" : ""}`,
2539
2523
  style: { ...y == null ? void 0 : y.style, height: D },
2540
2524
  onContextMenu: p,
2541
2525
  children: /* @__PURE__ */ c(
@@ -2552,12 +2536,12 @@ const Qs = nt(({ x: e }) => {
2552
2536
  {
2553
2537
  style: {
2554
2538
  position: "absolute",
2555
- zIndex: f ? -1 : 1
2539
+ zIndex: h ? -1 : 1
2556
2540
  },
2557
2541
  horizontal: -1
2558
2542
  }
2559
2543
  ),
2560
- Ct(m, y == null ? void 0 : y.label, { y: e, x: 0 }, e) ?? n,
2544
+ bt(m, y == null ? void 0 : y.label, { y: e, x: 0 }, e) ?? n,
2561
2545
  !O.hasOperation(y == null ? void 0 : y.prevention, O.RowMenu) && /* @__PURE__ */ c(
2562
2546
  "button",
2563
2547
  {
@@ -2571,7 +2555,7 @@ const Qs = nt(({ x: e }) => {
2571
2555
  if (Math.abs(l.clientX - v) > 4 || Math.abs(l.clientY - x) > 4)
2572
2556
  return;
2573
2557
  const C = g.getBoundingClientRect();
2574
- (d == null ? void 0 : d.y) === e ? s(ht(null)) : (Te({ start: i.startY, end: i.endY }, e) && i.startX === 1 && i.endX === m.numCols || s(Bt({ range: { start: e, end: e }, numCols: m.numCols })), s(ht({ y: e, position: { y: C.bottom, x: C.right } })));
2558
+ (d == null ? void 0 : d.y) === e ? s(ft(null)) : (Te({ start: i.startY, end: i.endY }, e) && i.startX === 1 && i.endX === m.numCols || s(zt({ range: { start: e, end: e }, numCols: m.numCols })), s(ft({ y: e, position: { y: C.bottom, x: C.right } })));
2575
2559
  },
2576
2560
  title: "Row menu",
2577
2561
  children: "⋮"
@@ -2595,14 +2579,14 @@ const Qs = nt(({ x: e }) => {
2595
2579
  ) : null;
2596
2580
  }), lt = "rgba(0, 119, 255, 1)", er = "rgba(0, 119, 255, 0.6)", tr = "rgba(0, 128, 255, 0.2)", nr = "#0077ff", sr = "#0077ff", rr = "rgba(0, 200, 100, 0.2)", or = "#00aa78", ir = "#0077aa", Qt = (e, n, t, s, r, o) => {
2597
2581
  e.fillStyle = o, e.fillRect(n, t, s, r);
2598
- }, pt = (e, n, t, s, r, o, i = 2, f = [], h) => {
2599
- h && (e.fillStyle = h, e.fillRect(n, t, s, r)), e.strokeStyle = o, e.lineWidth = i, e.setLineDash(f), e.strokeRect(n + i / 2, t + i / 2, s - i, r - i), e.setLineDash([]);
2600
- }, Ve = (e, n, t, s, r, o, i, f, h = 2, a = [], u) => {
2582
+ }, pt = (e, n, t, s, r, o, i = 2, h = [], f) => {
2583
+ f && (e.fillStyle = f, e.fillRect(n, t, s, r)), e.strokeStyle = o, e.lineWidth = i, e.setLineDash(h), e.strokeRect(n + i / 2, t + i / 2, s - i, r - i), e.setLineDash([]);
2584
+ }, Ve = (e, n, t, s, r, o, i, h, f = 2, a = [], u) => {
2601
2585
  const { top: w, left: b, bottom: d, right: m } = i;
2602
2586
  if (w === -1 || b === -1 || d === -1 || m === -1)
2603
2587
  return;
2604
- const y = Fe(n, { y: w, x: b }), D = Fe(n, { y: d, x: m }), T = y.left - s, N = y.top - t, Y = D.right - s, E = D.bottom - t;
2605
- Y < 0 || T > r || E < 0 || N > o || pt(e, T, N, Y - T, E - N, f, h, a, u);
2588
+ const y = Ie(n, { y: w, x: b }), D = Ie(n, { y: d, x: m }), T = y.left - s, N = y.top - t, Y = D.right - s, E = D.bottom - t;
2589
+ Y < 0 || T > r || E < 0 || N > o || pt(e, T, N, Y - T, E - N, h, f, a, u);
2606
2590
  }, lr = ({ refs: e = {} }) => {
2607
2591
  const { store: n } = ie(le), {
2608
2592
  sheetReactive: t,
@@ -2610,8 +2594,8 @@ const Qs = nt(({ x: e }) => {
2610
2594
  choosing: r,
2611
2595
  selectingZone: o,
2612
2596
  matchingCells: i,
2613
- matchingCellIndex: f,
2614
- autofillDraggingTo: h,
2597
+ matchingCellIndex: h,
2598
+ autofillDraggingTo: f,
2615
2599
  topHeaderSelecting: a,
2616
2600
  leftHeaderSelecting: u,
2617
2601
  mode: w,
@@ -2629,14 +2613,14 @@ const Qs = nt(({ x: e }) => {
2629
2613
  const { registry: l } = d, g = $.scrollTop, v = $.scrollLeft, x = d.headerWidth, A = d.headerHeight;
2630
2614
  I.save(), I.beginPath(), I.rect(x, A, S - x, p - A), I.clip();
2631
2615
  const C = de(o);
2632
- if (Ve(I, d, g, v, S, p, C, er, 1, [], tr), h) {
2633
- const B = new Ss(D.current, h);
2616
+ if (Ve(I, d, g, v, S, p, C, er, 1, [], tr), f) {
2617
+ const B = new os(D.current, f);
2634
2618
  Ve(I, d, g, v, S, p, B.wholeArea, ir, 1, [5, 5]);
2635
2619
  }
2636
2620
  {
2637
2621
  const { y: B, x: z } = r;
2638
2622
  if (B !== -1 && z !== -1) {
2639
- const K = Fe(d, { y: B, x: z }), G = K.left - v, V = K.top - g;
2623
+ const K = Ie(d, { y: B, x: z }), G = K.left - v, V = K.top - g;
2640
2624
  pt(I, G, V, K.width, K.height, lt, 2, []);
2641
2625
  }
2642
2626
  }
@@ -2646,17 +2630,17 @@ const Qs = nt(({ x: e }) => {
2646
2630
  Ve(I, d, g, v, S, p, B, W ? sr : nr, 2.5, W ? [4, 4] : [6, 4]);
2647
2631
  }
2648
2632
  Object.entries(e).forEach(([B, z]) => {
2649
- const K = Ie[z % Ie.length];
2633
+ const K = De[z % De.length];
2650
2634
  try {
2651
2635
  const G = d.rangeToArea(B);
2652
2636
  Ve(I, d, g, v, S, p, G, K, 2, [5, 5]);
2653
2637
  } catch {
2654
2638
  }
2655
2639
  }), i.forEach((B, z) => {
2656
- const { y: K, x: G } = Rt(B), V = Fe(d, { y: K, x: G }), Z = V.left - v, X = V.top - g;
2640
+ const { y: K, x: G } = wt(B), V = Ie(d, { y: K, x: G }), Z = V.left - v, X = V.top - g;
2657
2641
  if (Z + V.width < 0 || Z > S || X + V.height < 0 || X > p)
2658
2642
  return;
2659
- const Q = z === f;
2643
+ const Q = z === h;
2660
2644
  pt(
2661
2645
  I,
2662
2646
  Z,
@@ -2674,7 +2658,7 @@ const Qs = nt(({ x: e }) => {
2674
2658
  let z = null, K = null;
2675
2659
  if (Te({ start: o.startX, end: o.endX }, B) && (z = "rgba(80, 180, 255, 1)", K = a ? "rgba(128, 128, 128, 0.25)" : "rgba(0, 119, 255, 0.05)"), r.x === B && (z = lt, K = a ? "rgba(128, 128, 128, 0.45)" : "rgba(0, 119, 255, 0.15)"), !z)
2676
2660
  continue;
2677
- const G = Fe(d, { y: 1, x: B }), V = G.left - v;
2661
+ const G = Ie(d, { y: 1, x: B }), V = G.left - v;
2678
2662
  if (V + G.width < x || V > S)
2679
2663
  continue;
2680
2664
  const Z = Math.max(V, x), X = Math.min(V + G.width, S) - Z;
@@ -2686,7 +2670,7 @@ const Qs = nt(({ x: e }) => {
2686
2670
  let z = null, K = null;
2687
2671
  if (Te({ start: o.startY, end: o.endY }, B) && (z = "rgba(80, 180, 255, 1)", K = u ? "rgba(128, 128, 128, 0.25)" : "rgba(0, 119, 255, 0.05)"), r.y === B && (z = lt, K = u ? "rgba(128, 128, 128, 0.45)" : "rgba(0, 119, 255, 0.15)"), !z)
2688
2672
  continue;
2689
- const G = Fe(d, { y: B, x: 1 }), V = G.top - g;
2673
+ const G = Ie(d, { y: B, x: 1 }), V = G.top - g;
2690
2674
  if (V + G.height < A || V > p)
2691
2675
  continue;
2692
2676
  const Z = Math.max(V, A), X = Math.min(V + G.height, p) - Z;
@@ -2698,8 +2682,8 @@ const Qs = nt(({ x: e }) => {
2698
2682
  r,
2699
2683
  o,
2700
2684
  i,
2701
- f,
2702
2685
  h,
2686
+ f,
2703
2687
  a,
2704
2688
  u,
2705
2689
  w,
@@ -2748,8 +2732,8 @@ const Qs = nt(({ x: e }) => {
2748
2732
  sheetReactive: r,
2749
2733
  choosing: o,
2750
2734
  editingAddress: i,
2751
- tabularRef: f,
2752
- mainRef: h,
2735
+ tabularRef: h,
2736
+ mainRef: f,
2753
2737
  sheetWidth: a,
2754
2738
  sheetHeight: u,
2755
2739
  inputting: w,
@@ -2760,7 +2744,7 @@ const Qs = nt(({ x: e }) => {
2760
2744
  C.preventDefault(), C.stopPropagation();
2761
2745
  }, []), Y = M(
2762
2746
  (C) => {
2763
- y && T(_t(y, C.currentTarget));
2747
+ y && T(Lt(y, C.currentTarget));
2764
2748
  },
2765
2749
  [r]
2766
2750
  ), E = M(() => {
@@ -2782,14 +2766,14 @@ const Qs = nt(({ x: e }) => {
2782
2766
  n({}), y.registry.paletteBySheetName = {};
2783
2767
  return;
2784
2768
  }
2785
- const L = {}, q = {}, W = new et(w.substring(1));
2769
+ const L = {}, q = {}, W = new qe(w.substring(1));
2786
2770
  W.tokenize();
2787
2771
  let ne = 0;
2788
2772
  for (const ae of W.tokens)
2789
2773
  if (ae.type === "REF" || ae.type === "RANGE") {
2790
- const B = ds(ae.stringify()), z = B.indexOf("!");
2774
+ const B = is(ae.stringify()), z = B.indexOf("!");
2791
2775
  if (z !== -1) {
2792
- const K = B.substring(0, z), G = B.substring(z + 1), V = vs(K), Z = G.toUpperCase();
2776
+ const K = B.substring(0, z), G = B.substring(z + 1), V = ls(K), Z = G.toUpperCase();
2793
2777
  q[V] == null && (q[V] = {}), q[V][Z] == null && (q[V][Z] = ne++);
2794
2778
  } else {
2795
2779
  const K = B.toUpperCase();
@@ -2800,11 +2784,11 @@ const Qs = nt(({ x: e }) => {
2800
2784
  }, [t.inputting, t.editingAddress, r]), U(() => {
2801
2785
  y && (y.registry.choosingAddress = Ne(o), y.registry.choosingSheetId = y.id);
2802
2786
  }, [o]), U(() => {
2803
- y && T(_t(y, f.current));
2804
- }, [f.current, r, ($ = h.current) == null ? void 0 : $.clientHeight, (P = h.current) == null ? void 0 : P.clientWidth]), U(() => {
2805
- const C = f.current;
2787
+ y && T(Lt(y, h.current));
2788
+ }, [h.current, r, ($ = f.current) == null ? void 0 : $.clientHeight, (P = f.current) == null ? void 0 : P.clientWidth]), U(() => {
2789
+ const C = h.current;
2806
2790
  if (C)
2807
- return hs(C);
2791
+ return as(C);
2808
2792
  }, [r]);
2809
2793
  const I = {
2810
2794
  ...e,
@@ -2818,7 +2802,7 @@ const Qs = nt(({ x: e }) => {
2818
2802
  width: a === -1 ? void 0 : a,
2819
2803
  height: u === -1 ? void 0 : u
2820
2804
  },
2821
- ref: f,
2805
+ ref: h,
2822
2806
  onMouseMove: N,
2823
2807
  onScroll: Y,
2824
2808
  children: /* @__PURE__ */ F(
@@ -2917,7 +2901,7 @@ const Qs = nt(({ x: e }) => {
2917
2901
  ) });
2918
2902
  }, cr = ({ ready: e }) => {
2919
2903
  var X, Q;
2920
- const { store: n, dispatch: t } = ie(le), [s, r] = J(""), [o, i] = J(0), [f, h] = J(!1), {
2904
+ const { store: n, dispatch: t } = ie(le), [s, r] = J(""), [o, i] = J(0), [h, f] = J(!1), {
2921
2905
  choosing: a,
2922
2906
  selectingZone: u,
2923
2907
  editorRef: w,
@@ -2926,7 +2910,7 @@ const Qs = nt(({ x: e }) => {
2926
2910
  inputting: m,
2927
2911
  editingAddress: y,
2928
2912
  dragging: D
2929
- } = n, T = d.current, N = oe(null), Y = a.x === -1 ? "" : Ne(a), E = T == null ? void 0 : T.getCell(a, { resolution: "SYSTEM" }), I = (X = T == null ? void 0 : T.getSystem(a)) == null ? void 0 : X.spilledFrom, $ = I ? Rt(I) : void 0, P = $ != null ? Ne($) : void 0;
2913
+ } = n, T = d.current, N = oe(null), Y = a.x === -1 ? "" : Ne(a), E = T == null ? void 0 : T.getCell(a, { resolution: "SYSTEM" }), I = (X = T == null ? void 0 : T.getSystem(a)) == null ? void 0 : X.spilledFrom, $ = I ? wt(I) : void 0, P = $ != null ? Ne($) : void 0;
2930
2914
  U(() => {
2931
2915
  var _;
2932
2916
  if (!T)
@@ -2962,20 +2946,20 @@ const Qs = nt(({ x: e }) => {
2962
2946
  optionsAll: l,
2963
2947
  functions: T == null ? void 0 : T.registry.functions
2964
2948
  }), W = b.current, ne = M((R) => {
2965
- t(re(R.currentTarget.value));
2949
+ t(re(R.currentTarget.value)), i(R.currentTarget.selectionStart);
2966
2950
  }, []), ae = M((R) => {
2967
2951
  i(R.currentTarget.selectionStart);
2968
2952
  }, []), B = M(() => {
2969
2953
  !N.current || !b.current || (N.current.style.height = `${b.current.clientHeight}px`, N.current.scrollLeft = b.current.scrollLeft, N.current.scrollTop = b.current.scrollTop);
2970
2954
  }, []), z = M(
2971
2955
  (R) => {
2972
- !W || !T || (h(!0), t(ue(Y)), T.registry.lastFocused = R.currentTarget);
2956
+ !W || !T || (f(!0), t(ue(Y)), T.registry.lastFocused = R.currentTarget);
2973
2957
  },
2974
2958
  [W, Y, T]
2975
2959
  );
2976
2960
  M(
2977
2961
  (R) => {
2978
- if (h(!1), R.currentTarget.value.startsWith("="))
2962
+ if (f(!1), R.currentTarget.value.startsWith("="))
2979
2963
  return !0;
2980
2964
  y && S(R.currentTarget.value);
2981
2965
  },
@@ -2986,7 +2970,7 @@ const Qs = nt(({ x: e }) => {
2986
2970
  if (R.ctrlKey || !T)
2987
2971
  return !0;
2988
2972
  const _ = R.currentTarget;
2989
- if (yn(R, m))
2973
+ if (en(R, m))
2990
2974
  return t(re(_.value)), !1;
2991
2975
  switch (R.key) {
2992
2976
  case "Tab":
@@ -3022,7 +3006,7 @@ const Qs = nt(({ x: e }) => {
3022
3006
  }
3023
3007
  }
3024
3008
  if (R.altKey)
3025
- vn(_, `
3009
+ tn(_, `
3026
3010
  `);
3027
3011
  else
3028
3012
  return S(_.value), t(re("")), t(
@@ -3089,13 +3073,13 @@ const Qs = nt(({ x: e }) => {
3089
3073
  ] });
3090
3074
  const Z = () => {
3091
3075
  var ee;
3092
- if (!f || typeof document > "u" || b.current !== document.activeElement)
3076
+ if (!h || typeof document > "u" || b.current !== document.activeElement)
3093
3077
  return null;
3094
3078
  const R = (ee = b.current) == null ? void 0 : ee.getBoundingClientRect();
3095
3079
  if (!R)
3096
3080
  return null;
3097
3081
  const _ = R.bottom, ge = R.left;
3098
- return wt(
3082
+ return Ct(
3099
3083
  /* @__PURE__ */ F(we, { children: [
3100
3084
  L && g.length === 0 && (!u || u.endY === -1 && u.endX === -1) && /* @__PURE__ */ c(
3101
3085
  St,
@@ -3165,10 +3149,10 @@ const Qs = nt(({ x: e }) => {
3165
3149
  onKeyUp: B,
3166
3150
  onScroll: B,
3167
3151
  onMouseEnter: (R) => {
3168
- t(Ge(!0));
3152
+ t(Je(!0));
3169
3153
  },
3170
3154
  onMouseLeave: (R) => {
3171
- t(Ge(!1));
3155
+ t(Je(!1));
3172
3156
  }
3173
3157
  }
3174
3158
  ),
@@ -3208,8 +3192,8 @@ const Qs = nt(({ x: e }) => {
3208
3192
  searchInputRef: r,
3209
3193
  tabularRef: o,
3210
3194
  searchQuery: i,
3211
- searchCaseSensitive: f,
3212
- searchRegex: h,
3195
+ searchCaseSensitive: h,
3196
+ searchRegex: f,
3213
3197
  searchRange: a,
3214
3198
  selectingZone: u,
3215
3199
  matchingCellIndex: w,
@@ -3219,14 +3203,14 @@ const Qs = nt(({ x: e }) => {
3219
3203
  U(() => {
3220
3204
  if (!y || !m)
3221
3205
  return;
3222
- const g = Rt(y);
3223
- typeof g > "u" || Cs(m, o.current, g);
3224
- }, [i, w, f, h, m, o]);
3206
+ const g = wt(y);
3207
+ typeof g > "u" || cs(m, o.current, g);
3208
+ }, [i, w, h, f, m, o]);
3225
3209
  const D = M((g) => {
3226
3210
  const v = g.currentTarget.previousSibling;
3227
3211
  (v == null ? void 0 : v.nodeName) === "INPUT" && H(v);
3228
3212
  }, []), T = M(() => {
3229
- n(Kt(1));
3213
+ n(Wt(1));
3230
3214
  }, []), N = M((g) => {
3231
3215
  n($e(g.currentTarget.value));
3232
3216
  }, []), Y = M(
@@ -3235,15 +3219,15 @@ const Qs = nt(({ x: e }) => {
3235
3219
  const v = s == null ? void 0 : s.current;
3236
3220
  v && H(v), n($e(void 0));
3237
3221
  }
3238
- return g.key === "f" && (g.ctrlKey || g.metaKey) ? (g.preventDefault(), !1) : g.key === "Enter" ? (n(Kt(g.shiftKey ? -1 : 1)), g.preventDefault(), !1) : !0;
3222
+ return g.key === "f" && (g.ctrlKey || g.metaKey) ? (g.preventDefault(), !1) : g.key === "Enter" ? (n(Wt(g.shiftKey ? -1 : 1)), g.preventDefault(), !1) : !0;
3239
3223
  },
3240
3224
  [s]
3241
3225
  ), E = M(() => {
3242
- n(ss(!f));
3243
- }, [f]), I = M(() => {
3244
- n(rs(!h));
3245
- }, [h]), $ = Ye(() => {
3246
- if (!u || fs(u))
3226
+ n(Rs(!h));
3227
+ }, [h]), I = M(() => {
3228
+ n(Cs(!f));
3229
+ }, [f]), $ = Ye(() => {
3230
+ if (!u || us(u))
3247
3231
  return !1;
3248
3232
  const { startY: g, startX: v, endY: x, endX: A } = u;
3249
3233
  return !(g === x && v === A);
@@ -3254,11 +3238,11 @@ const Qs = nt(({ x: e }) => {
3254
3238
  return `${C}:${L}`;
3255
3239
  }, [u, $]), S = M(() => {
3256
3240
  if (a)
3257
- n(Zt(void 0));
3241
+ n(_t(void 0));
3258
3242
  else if (u && $) {
3259
3243
  const { startY: g, startX: v, endY: x, endX: A } = u;
3260
3244
  n(
3261
- Zt({
3245
+ _t({
3262
3246
  startY: Math.min(g, x),
3263
3247
  startX: Math.min(v, A),
3264
3248
  endY: Math.max(g, x),
@@ -3318,7 +3302,7 @@ const Qs = nt(({ x: e }) => {
3318
3302
  /* @__PURE__ */ c("div", { className: "gs-search-button gs-search-casesensitive", children: /* @__PURE__ */ c(
3319
3303
  "span",
3320
3304
  {
3321
- className: `${f ? "gs-search-button-on" : ""}`,
3305
+ className: `${h ? "gs-search-button-on" : ""}`,
3322
3306
  onClick: E,
3323
3307
  title: "Case sensitive",
3324
3308
  children: "Aa"
@@ -3327,7 +3311,7 @@ const Qs = nt(({ x: e }) => {
3327
3311
  /* @__PURE__ */ c("div", { className: "gs-search-button gs-search-regex", children: /* @__PURE__ */ c(
3328
3312
  "span",
3329
3313
  {
3330
- className: `${h ? "gs-search-button-on" : ""}`,
3314
+ className: `${f ? "gs-search-button-on" : ""}`,
3331
3315
  onClick: I,
3332
3316
  title: "Regular expression",
3333
3317
  children: ".*"
@@ -3336,8 +3320,8 @@ const Qs = nt(({ x: e }) => {
3336
3320
  ] }),
3337
3321
  /* @__PURE__ */ c("a", { className: "gs-search-close", onClick: l, children: /* @__PURE__ */ c(dr, { style: { verticalAlign: "middle" } }) })
3338
3322
  ] });
3339
- }, Lr = () => en(), fr = () => oe(null), Br = () => en(), hr = () => oe(null);
3340
- function Kr({
3323
+ }, Er = () => ln(), hr = () => oe(null), xr = () => ln(), fr = () => oe(null);
3324
+ function kr({
3341
3325
  initialCells: e,
3342
3326
  sheetName: n = "",
3343
3327
  sheetRef: t,
@@ -3345,13 +3329,13 @@ function Kr({
3345
3329
  options: r = {},
3346
3330
  className: o,
3347
3331
  style: i,
3348
- book: f
3332
+ book: h
3349
3333
  }) {
3350
3334
  var W, ne, ae, B;
3351
- const { sheetResize: h, showFormulaBar: a = !0, mode: u = "light" } = r, w = oe(null), b = oe(null), d = oe(null), m = oe(null), y = oe(null), D = oe(null), T = oe(null), N = fr(), Y = t ?? N, E = hr(), I = s ?? E, $ = os({}), P = f ?? $, { registry: S } = P, [p] = J(() => n ? (S._componentSheetIds.has(n) || S._componentSheetIds.set(n, ++S.sheetHead), S._componentSheetIds.get(n)) : ++S.sheetHead), l = oe(null), [g] = J(() => {
3335
+ const { sheetResize: f, showFormulaBar: a = !0, mode: u = "light" } = r, w = oe(null), b = oe(null), d = oe(null), m = oe(null), y = oe(null), D = oe(null), T = oe(null), N = hr(), Y = t ?? N, E = fr(), I = s ?? E, $ = Ss({}), P = h ?? $, { registry: S } = P, [p] = J(() => n ? (S._componentSheetIds.has(n) || S._componentSheetIds.set(n, ++S.sheetHead), S._componentSheetIds.get(n)) : ++S.sheetHead), l = oe(null), [g] = J(() => {
3352
3336
  var Q;
3353
3337
  n || (n = `Sheet${p}`, console.debug("GridSheet: sheetName is not provided, using default name:", n));
3354
- const { limits: z, contextMenu: K, rowMenu: G, colMenu: V } = r, Z = new bs({
3338
+ const { limits: z, contextMenu: K, rowMenu: G, colMenu: V } = r, Z = new ds({
3355
3339
  limits: z,
3356
3340
  name: n,
3357
3341
  registry: S
@@ -3394,13 +3378,13 @@ function Kr({
3394
3378
  editorHovering: !0,
3395
3379
  mode: "light"
3396
3380
  };
3397
- }), [v, x] = Vn(
3398
- is,
3381
+ }), [v, x] = ys(
3382
+ Ns,
3399
3383
  g,
3400
3384
  () => g
3401
3385
  );
3402
3386
  U(() => {
3403
- Ns();
3387
+ gs();
3404
3388
  }, []);
3405
3389
  const [A, C] = J((r == null ? void 0 : r.sheetHeight) || mr(e)), [L, q] = J((r == null ? void 0 : r.sheetWidth) || pr(e));
3406
3390
  return U(() => {
@@ -3438,7 +3422,7 @@ function Kr({
3438
3422
  maxWidth: (((ae = v.sheetReactive.current) == null ? void 0 : ae.totalWidth) || 0) + 2,
3439
3423
  maxHeight: (((B = v.sheetReactive.current) == null ? void 0 : B.fullHeight) || 0) + 2,
3440
3424
  overflow: "auto",
3441
- resize: h,
3425
+ resize: f,
3442
3426
  ...i
3443
3427
  },
3444
3428
  children: [
@@ -3458,28 +3442,28 @@ function Kr({
3458
3442
  ) });
3459
3443
  }
3460
3444
  const mr = (e) => {
3461
- var s, r, o, i, f;
3462
- const n = pn(e);
3463
- let t = ((s = e[0]) == null ? void 0 : s.height) ?? qn;
3464
- for (let h = 1; h <= n.numRows; h++) {
3465
- const a = ve(h), u = ((r = e == null ? void 0 : e[a]) == null ? void 0 : r.height) || ((o = e == null ? void 0 : e["0" + a]) == null ? void 0 : o.height) || ((i = e == null ? void 0 : e[Gn]) == null ? void 0 : i.height) || ((f = e == null ? void 0 : e.default) == null ? void 0 : f.height) || vt;
3466
- if (t + u > Xt)
3467
- return Xt;
3445
+ var s, r, o, i, h;
3446
+ const n = rn(e);
3447
+ let t = ((s = e[0]) == null ? void 0 : s.height) ?? hs;
3448
+ for (let f = 1; f <= n.numRows; f++) {
3449
+ const a = ve(f), u = ((r = e == null ? void 0 : e[a]) == null ? void 0 : r.height) || ((o = e == null ? void 0 : e["0" + a]) == null ? void 0 : o.height) || ((i = e == null ? void 0 : e[fs]) == null ? void 0 : i.height) || ((h = e == null ? void 0 : e.default) == null ? void 0 : h.height) || vt;
3450
+ if (t + u > Bt)
3451
+ return Bt;
3468
3452
  t += u;
3469
3453
  }
3470
3454
  return t + 3;
3471
3455
  }, pr = (e) => {
3472
- var s, r, o, i, f;
3473
- const n = pn(e);
3474
- let t = ((s = e[0]) == null ? void 0 : s.width) ?? Qn;
3475
- for (let h = 1; h <= n.numCols; h++) {
3476
- const a = me(h), u = ((r = e == null ? void 0 : e[a]) == null ? void 0 : r.width) || ((o = e == null ? void 0 : e[a + "0"]) == null ? void 0 : o.width) || ((i = e == null ? void 0 : e[Jn]) == null ? void 0 : i.width) || ((f = e == null ? void 0 : e.default) == null ? void 0 : f.width) || yt;
3477
- if (t + u > Ot)
3478
- return Ot;
3456
+ var s, r, o, i, h;
3457
+ const n = rn(e);
3458
+ let t = ((s = e[0]) == null ? void 0 : s.width) ?? ms;
3459
+ for (let f = 1; f <= n.numCols; f++) {
3460
+ const a = me(f), u = ((r = e == null ? void 0 : e[a]) == null ? void 0 : r.width) || ((o = e == null ? void 0 : e[a + "0"]) == null ? void 0 : o.width) || ((i = e == null ? void 0 : e[ps]) == null ? void 0 : i.width) || ((h = e == null ? void 0 : e.default) == null ? void 0 : h.width) || yt;
3461
+ if (t + u > Kt)
3462
+ return Kt;
3479
3463
  t += u;
3480
3464
  }
3481
3465
  return t + 3;
3482
- }, Zr = {
3466
+ }, Tr = {
3483
3467
  renderBool({ value: e, apply: n, sheet: t, point: s }) {
3484
3468
  return /* @__PURE__ */ c(
3485
3469
  "input",
@@ -3493,87 +3477,87 @@ const mr = (e) => {
3493
3477
  );
3494
3478
  }
3495
3479
  };
3496
- function Ur(e) {
3480
+ function Ar(e) {
3497
3481
  const n = {}, t = e.all;
3498
3482
  return (e.top ?? t) && (n.borderTop = e.top ?? t), (e.right ?? t) && (n.borderRight = e.right ?? t), (e.bottom ?? t) && (n.borderBottom = e.bottom ?? t), (e.left ?? t) && (n.borderLeft = e.left ?? t), n;
3499
3483
  }
3500
3484
  export {
3501
- _r as BaseFunction,
3502
- jr as BaseFunctionAsync,
3503
- Zr as CheckboxPolicyMixin,
3504
- Vr as DEFAULT_HISTORY_LIMIT,
3505
- qr as FormulaError,
3506
- Gr as FormulaParser,
3507
- Kr as GridSheet,
3508
- Qr as Lexer,
3485
+ Ir as BaseFunction,
3486
+ Fr as BaseFunctionAsync,
3487
+ Tr as CheckboxPolicyMixin,
3488
+ Yr as DEFAULT_HISTORY_LIMIT,
3489
+ $r as FormulaError,
3490
+ Pr as FormulaParser,
3491
+ kr as GridSheet,
3492
+ Xr as Lexer,
3509
3493
  kt as MenuDivider,
3510
3494
  xt as MenuItem,
3511
- Jr as Pending,
3512
- Or as PluginBase,
3513
- eo as Policy,
3514
- to as RangeEntity,
3515
- no as RefEntity,
3516
- so as Registry,
3517
- ro as Sheet,
3518
- oo as Spilling,
3519
- io as ThousandSeparatorPolicyMixin,
3520
- lo as Time,
3521
- ao as ValueEntity,
3522
- co as a2p,
3523
- uo as aa2oa,
3524
- go as addressesToAreas,
3525
- fo as addressesToCols,
3526
- ho as addressesToRows,
3527
- Hr as applyers,
3528
- mo as areaToRange,
3529
- po as areaToZone,
3530
- yo as buildInitialCells,
3531
- vo as buildInitialCellsFromOrigin,
3532
- bo as c2x,
3533
- wo as ch,
3534
- Ro as check,
3495
+ Or as Pending,
3496
+ Sr as PluginBase,
3497
+ Hr as Policy,
3498
+ Lr as RangeEntity,
3499
+ Br as RefEntity,
3500
+ Kr as Registry,
3501
+ Zr as Sheet,
3502
+ Ur as Spilling,
3503
+ zr as ThousandSeparatorPolicyMixin,
3504
+ Wr as Time,
3505
+ _r as ValueEntity,
3506
+ jr as a2p,
3507
+ Vr as aa2oa,
3508
+ qr as addressesToAreas,
3509
+ Gr as addressesToCols,
3510
+ Qr as addressesToRows,
3511
+ Nr as applyers,
3512
+ Jr as areaToRange,
3513
+ eo as areaToZone,
3514
+ to as buildInitialCells,
3515
+ no as buildInitialCellsFromOrigin,
3516
+ so as c2x,
3517
+ ro as ch,
3518
+ oo as check,
3535
3519
  tt as clip,
3536
- Co as conditionArg,
3537
- So as createBook,
3538
- No as createBooleanMask,
3539
- Eo as createRegistry,
3540
- Lr as createSheetRef,
3541
- Br as createStoreRef,
3520
+ io as conditionArg,
3521
+ lo as createBook,
3522
+ ao as createBooleanMask,
3523
+ co as createRegistry,
3524
+ Er as createSheetRef,
3525
+ xr as createStoreRef,
3542
3526
  Ls as defaultColMenuDescriptors,
3543
3527
  Os as defaultContextMenuDescriptors,
3544
3528
  Hs as defaultRowMenuDescriptors,
3545
- xo as eachMatrix,
3546
- ko as ensureBoolean,
3547
- To as ensureDate,
3548
- Ao as ensureNumber,
3549
- Mo as ensureString,
3550
- Ur as makeBorder,
3551
- Do as matrixShape,
3552
- Io as oa2aa,
3553
- Fo as operations,
3554
- Yo as p2a,
3555
- $o as r2y,
3529
+ uo as eachMatrix,
3530
+ go as ensureBoolean,
3531
+ ho as ensureDate,
3532
+ fo as ensureNumber,
3533
+ mo as ensureString,
3534
+ Ar as makeBorder,
3535
+ po as matrixShape,
3536
+ yo as oa2aa,
3537
+ vo as operations,
3538
+ bo as p2a,
3539
+ wo as r2y,
3556
3540
  Et as registerMenuComponent,
3557
- Po as rh,
3541
+ Ro as rh,
3558
3542
  Es as sheet2csv,
3559
- Xo as stripMatrix,
3560
- Oo as toCellCols,
3561
- Ho as toCellMatrix,
3562
- Lo as toCellObject,
3563
- Bo as toCellRows,
3564
- Ko as toValueCols,
3565
- Zo as toValueMatrix,
3566
- Uo as toValueObject,
3567
- zo as toValueRows,
3543
+ Co as stripMatrix,
3544
+ So as toCellCols,
3545
+ No as toCellMatrix,
3546
+ Eo as toCellObject,
3547
+ xo as toCellRows,
3548
+ ko as toValueCols,
3549
+ To as toValueMatrix,
3550
+ Ao as toValueObject,
3551
+ Mo as toValueRows,
3568
3552
  Ue as updateSheet,
3569
- os as useBook,
3570
- Xr as useInitialPluginContext,
3553
+ Ss as useBook,
3554
+ Cr as useInitialPluginContext,
3571
3555
  xn as usePluginContext,
3572
- fr as useSheetRef,
3573
- hr as useStoreRef,
3574
- qo as userActions,
3575
- Wo as x2c,
3576
- _o as y2r,
3577
- jo as zoneToArea
3556
+ hr as useSheetRef,
3557
+ fr as useStoreRef,
3558
+ $o as userActions,
3559
+ Do as x2c,
3560
+ Io as y2r,
3561
+ Fo as zoneToArea
3578
3562
  };
3579
3563
  //# sourceMappingURL=index.js.map