@owp/core 2.5.30 → 2.5.32

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 (44) hide show
  1. package/dist/_virtual/index20.js +2 -2
  2. package/dist/_virtual/index21.js +2 -2
  3. package/dist/_virtual/index22.js +2 -2
  4. package/dist/components/OwpPageContent/OwpPageContent.js +1 -1
  5. package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
  6. package/dist/components/OwpSection/OwpSection.js +1 -1
  7. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  8. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +813 -241
  9. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  10. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +266 -252
  11. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  12. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js +59 -0
  13. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js.map +1 -0
  14. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js +27 -0
  15. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js.map +1 -0
  16. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +607 -510
  17. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  18. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js +61 -0
  19. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js.map +1 -0
  20. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +157 -154
  21. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  22. package/dist/hooks/useMinimumVisibleState.js.map +1 -0
  23. package/dist/hooks.js +47 -45
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  26. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  30. package/dist/types/components/OwpSelectorBase/types/types.d.ts +2 -0
  31. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -1
  32. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.d.ts +12 -0
  33. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.d.ts +17 -0
  34. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
  35. package/dist/types/components/OwpTreeGrid/internal/treeGridSelection.d.ts +12 -0
  36. package/dist/types/hooks/index.d.ts +1 -0
  37. package/dist/types/hooks/useMinimumVisibleState.d.ts +6 -0
  38. package/dist/types/utils/treeGridUtil.d.ts +6 -1
  39. package/dist/utils/treeGridUtil.js +299 -251
  40. package/dist/utils/treeGridUtil.js.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/hooks/internal/useMinimumVisibleState.js.map +0 -1
  43. package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +0 -7
  44. /package/dist/hooks/{internal/useMinimumVisibleState.js → useMinimumVisibleState.js} +0 -0
@@ -1,14 +1,15 @@
1
- var Ze = Object.defineProperty;
2
- var i = (e, n) => Ze(e, "name", { value: n, configurable: !0 });
3
- import { getTreeGridTextResourceUrl as qe, TREEGRID_CELL_CHANGED_CLASS as xe } from "../../../constants/treeGrid.js";
4
- import { isTreeGridRowAddedById as P, getTreeGridAddedRowHighlightColumns as ce, getTreeGridCellComparableValue as Ie, clearTreeGridCellHighlightById as Qe, highlightTreeGridCellById as He, normalizeTreeGridExternalRows as en } from "../../../utils/treeGridUtil.js";
5
- import { applyTreeGridLayoutToGrid as nn } from "./treeGridLayout.js";
6
- import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as tn, TREE_GRID_SELECT_ALL_CHECKED_CLASS as le, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as de, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as ue, TREE_GRID_SELECTED_CHANGED_CELL_CLASS as fe, TREE_GRID_THEME_WRAPPER_CLASS as rn, TREE_GRID_ERROR_CELL_CLASS as on } from "./treeGridTheme.js";
7
- import { countTreeGridPerf as Oe, logTreeGridPerf as sn, measureTreeGridPerf as be } from "./utils/perf.js";
8
- import { debounce as V } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
9
- import { isEmpty as cn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
10
- import { get as ln } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
11
- const jt = 300, dn = 3, un = {
1
+ var dn = Object.defineProperty;
2
+ var o = (e, n) => dn(e, "name", { value: n, configurable: !0 });
3
+ import { getTreeGridTextResourceUrl as un, TREEGRID_CELL_CHANGED_CLASS as Pe } from "../../../constants/treeGrid.js";
4
+ import { isTreeGridRowAddedById as P, getTreeGridAddedRowHighlightColumns as Te, getTreeGridCellComparableValue as $e, clearTreeGridCellHighlightById as fn, highlightTreeGridCellById as an, normalizeTreeGridExternalRows as Tn } from "../../../utils/treeGridUtil.js";
5
+ import { applyTreeGridLayoutToGrid as pn } from "./treeGridLayout.js";
6
+ import { resolveTreeGridSelectedRows as En } from "./treeGridSelection.js";
7
+ import { TREE_GRID_PANEL_CHECKBOX_SELECT_CLASS as Cn, TREE_GRID_SELECT_ALL_CHECKED_CLASS as pe, TREE_GRID_SELECT_ALL_INDETERMINATE_CLASS as Ee, TREE_GRID_SELECT_ALL_UNCHECKED_CLASS as Ce, TREE_GRID_SELECTED_CHANGED_CELL_CLASS as Ge, TREE_GRID_THEME_WRAPPER_CLASS as Gn, TREE_GRID_ERROR_CELL_CLASS as Sn } from "./treeGridTheme.js";
8
+ import { countTreeGridPerf as De, logTreeGridPerf as hn, measureTreeGridPerf as Fe } from "./utils/perf.js";
9
+ import { debounce as W } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/function/debounce.js";
10
+ import { isEmpty as gn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js";
11
+ import { get as Rn } from "../../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/object/get.js";
12
+ const fr = 300, An = 3, _n = {
12
13
  1: {
13
14
  onEnter: "TabDownEdit",
14
15
  onEnterEdit: "AcceptEdit AND TabDownEdit,1"
@@ -25,37 +26,37 @@ const jt = 300, dn = 3, un = {
25
26
  onEnter: "TabRightEditAdd",
26
27
  onEnterEdit: "AcceptEdit AND TabRightEditAdd,1"
27
28
  }
28
- }, fn = [240, 240, 240], Tn = [248, 248, 248], an = [255, 255, 255], Cn = [255, 255, 254], En = [242, 242, 242], pn = [
29
+ }, mn = [240, 240, 240], Ln = [248, 248, 248], On = [255, 255, 255], xn = [255, 255, 254], In = [242, 242, 242], bn = [
29
30
  [255, 210, 210],
30
31
  [249, 209, 209],
31
32
  [115, 16, 11]
32
- ], Gn = "#D7FFD7", gn = "transparent", Te = "Button", ae = xe.split(/\s+/).filter(
33
+ ], wn = "#D7FFD7", yn = "transparent", Se = "Button", he = Pe.split(/\s+/).filter(
33
34
  Boolean
34
- ), Sn = /* @__PURE__ */ new Set([
35
+ ), Pn = /* @__PURE__ */ new Set([
35
36
  "Text",
36
37
  "Lines",
37
38
  "Int",
38
39
  "Float",
39
40
  "Date",
40
41
  "Pass"
41
- ]), Ce = /* @__PURE__ */ i((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), hn = {
42
+ ]), ge = /* @__PURE__ */ o((e) => !!(e && /\b(?:EnterMode|OnEnterEdit|OnEnter)\s*[:=]/.test(e)), "hasTreeGridExplicitEnterMode"), $n = {
42
43
  Visible: "1",
43
44
  CanHide: "0",
44
45
  Delete: "1",
45
46
  Width: "33"
46
- }, An = {
47
+ }, Dn = {
47
48
  Spanned: "1"
48
- }, N = {
49
- OnClickCell: "Focus"
50
49
  }, k = {
50
+ OnClickCell: "Focus"
51
+ }, U = {
51
52
  OnClickPanelSelectAll: "SelectAll OR DeselectAll"
52
- }, Pe = ["Formula", "FormulaFormula"], Rn = /<Grid\b[^>]*>/i, _n = /<\/Grid\s*>/i, Ln = /<Toolbar\b[^>]*\/?>/i, mn = [
53
+ }, Ne = "Panel", ve = ["Formula", "FormulaFormula"], Fn = /<Grid\b[^>]*>/i, Nn = /<\/Grid\s*>/i, vn = /<Toolbar\b[^>]*\/?>/i, kn = [
53
54
  "Undo",
54
55
  "Deleting",
55
56
  "Selecting",
56
57
  "SelectingSingle",
57
58
  "SuppressCfg"
58
- ], xn = {
59
+ ], Un = {
59
60
  addRow: ["Add", "AddRows", "AddChildren", "AddRowsChildren"],
60
61
  deleteRow: [
61
62
  "Delete",
@@ -76,80 +77,80 @@ const jt = 300, dn = 3, un = {
76
77
  "UndeleteVisibleRowsChildren"
77
78
  ],
78
79
  selectRow: ["Select", "SelectRows", "Deselect", "DeselectRows"]
79
- }, S = /* @__PURE__ */ i((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), y = /* @__PURE__ */ i((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), M = /* @__PURE__ */ i((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), D = /* @__PURE__ */ i((e, n) => String(e ?? "").trim().toLowerCase() === n.toLowerCase(), "isTreeGridConfigValue"), q = /* @__PURE__ */ i((e, n) => !y(e) && !M(n), "isTreeGridCheckboxSelectionMode"), ye = /* @__PURE__ */ i((e) => {
80
+ }, S = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && !Array.isArray(e), "isTreeGridJsonRecord"), $ = /* @__PURE__ */ o((e) => e === 0 || e === !1 || e === "0" || e === "false", "isTreeGridDisabledConfigValue"), K = /* @__PURE__ */ o((e) => e === 1 || e === !0 || e === "1" || e === "true", "isTreeGridExplicitEnabledConfigValue"), F = /* @__PURE__ */ o((e, n) => String(e ?? "").trim().toLowerCase() === n.toLowerCase(), "isTreeGridConfigValue"), te = /* @__PURE__ */ o((e, n) => !$(e) && !K(n), "isTreeGridCheckboxSelectionMode"), ke = /* @__PURE__ */ o((e) => {
80
81
  const n = e.Cfg;
81
82
  return Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [];
82
- }, "getTreeGridJsonCfgRecords"), J = /* @__PURE__ */ i((e, n) => {
83
+ }, "getTreeGridJsonCfgRecords"), j = /* @__PURE__ */ o((e, n) => {
83
84
  let t;
84
- return ye(e).forEach((r) => {
85
+ return ke(e).forEach((r) => {
85
86
  n in r && (t = r[n]);
86
87
  }), t;
87
- }, "getTreeGridJsonCfgValue"), $e = /* @__PURE__ */ i((e, n) => {
88
+ }, "getTreeGridJsonCfgValue"), Ue = /* @__PURE__ */ o((e, n) => {
88
89
  const t = new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i").exec(
89
90
  e
90
91
  );
91
92
  return t == null ? void 0 : t[2];
92
- }, "getTreeGridXmlTagAttributeValue"), $ = /* @__PURE__ */ i((e, n) => new RegExp(`\\b${n}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), De = /* @__PURE__ */ i((e) => String(e).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), "escapeTreeGridXmlAttributeValue"), w = /* @__PURE__ */ i((e, n, t) => {
93
+ }, "getTreeGridXmlTagAttributeValue"), D = /* @__PURE__ */ o((e, n) => new RegExp(`\\b${n}\\s*=`, "i").test(e), "hasTreeGridXmlTagAttribute"), Be = /* @__PURE__ */ o((e) => String(e).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), "escapeTreeGridXmlAttributeValue"), N = /* @__PURE__ */ o((e, n, t) => {
93
94
  const r = e.endsWith("/>") ? e.length - 2 : e.length - 1;
94
- return `${e.slice(0, r)} ${n}="${De(
95
+ return `${e.slice(0, r)} ${n}="${Be(
95
96
  t
96
97
  )}"${e.slice(r)}`;
97
- }, "appendTreeGridXmlTagAttribute"), W = /* @__PURE__ */ i((e, n, t) => $(e, n) ? e.replace(
98
+ }, "appendTreeGridXmlTagAttribute"), z = /* @__PURE__ */ o((e, n, t) => D(e, n) ? e.replace(
98
99
  new RegExp(`\\b${n}\\s*=\\s*(['"])(.*?)\\1`, "i"),
99
- () => `${n}="${De(t)}"`
100
- ) : w(e, n, t), "setTreeGridXmlTagAttribute"), we = /* @__PURE__ */ i((e, n) => {
100
+ () => `${n}="${Be(t)}"`
101
+ ) : N(e, n, t), "setTreeGridXmlTagAttribute"), Ve = /* @__PURE__ */ o((e, n) => {
101
102
  let t = e;
102
- return Object.entries(n).forEach(([r, o]) => {
103
- t = W(t, r, o);
103
+ return Object.entries(n).forEach(([r, i]) => {
104
+ t = z(t, r, i);
104
105
  }), t;
105
- }, "setTreeGridXmlTagAttributes"), U = /* @__PURE__ */ i((e, n) => {
106
+ }, "setTreeGridXmlTagAttributes"), B = /* @__PURE__ */ o((e, n) => {
106
107
  let t = e;
107
- return Object.entries(n).forEach(([r, o]) => {
108
- $(t, r) || (t = w(t, r, o));
108
+ return Object.entries(n).forEach(([r, i]) => {
109
+ D(t, r) || (t = N(t, r, i));
109
110
  }), t;
110
- }, "appendMissingTreeGridXmlTagAttributes"), x = /* @__PURE__ */ i((e) => {
111
+ }, "appendMissingTreeGridXmlTagAttributes"), x = /* @__PURE__ */ o((e) => {
111
112
  var a;
112
113
  const n = /<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!\[CDATA\[[\s\S]*?\]\]>|<\/?([A-Za-z][\w:-]*)\b[^>]*>/g, t = {
113
114
  cfgValues: {}
114
115
  };
115
- let r, o = 0, l = !1;
116
+ let r, i = 0, c = !1;
116
117
  for (; r = n.exec(e); ) {
117
- const f = r[0], E = (a = r[1]) == null ? void 0 : a.toLowerCase();
118
- if (!E || f.startsWith("<!--") || f.startsWith("<?") || f.startsWith("<!"))
118
+ const f = r[0], C = (a = r[1]) == null ? void 0 : a.toLowerCase();
119
+ if (!C || f.startsWith("<!--") || f.startsWith("<?") || f.startsWith("<!"))
119
120
  continue;
120
- !t.hasFastPanel && $(f, "FastPanel") && (t.hasFastPanel = !0);
121
+ !t.hasFastPanel && D(f, "FastPanel") && (t.hasFastPanel = !0);
121
122
  const G = f.startsWith("</"), h = /\/>\s*$/.test(f);
122
- if (!l) {
123
- !G && E === "grid" && (l = !0, t.gridOpenTagEndIndex = r.index + f.length, o = h ? 0 : 1);
123
+ if (!c) {
124
+ !G && C === "grid" && (c = !0, t.gridOpenTagEndIndex = r.index + f.length, i = h ? 0 : 1);
124
125
  continue;
125
126
  }
126
127
  if (G) {
127
- if (o = Math.max(0, o - 1), E === "grid" && o === 0)
128
+ if (i = Math.max(0, i - 1), C === "grid" && i === 0)
128
129
  break;
129
130
  continue;
130
131
  }
131
- o === 1 && (E === "cfg" ? (t.defaultCfgTag || (t.defaultCfgTag = {
132
+ i === 1 && (C === "cfg" ? (t.defaultCfgTag || (t.defaultCfgTag = {
132
133
  index: r.index,
133
134
  tag: f
134
- }), mn.forEach((A) => {
135
- const L = $e(f, A);
136
- L !== void 0 && (t.cfgValues[A] = L);
137
- }), t.lastCfgEndIndex = r.index + f.length) : E === "actions" && !t.defaultActionsTag ? t.defaultActionsTag = {
135
+ }), kn.forEach((g) => {
136
+ const m = Ue(f, g);
137
+ m !== void 0 && (t.cfgValues[g] = m);
138
+ }), t.lastCfgEndIndex = r.index + f.length) : C === "actions" && !t.defaultActionsTag ? t.defaultActionsTag = {
138
139
  index: r.index,
139
140
  tag: f
140
- } : E === "panel" && !t.defaultPanelTag && In(f) ? t.defaultPanelTag = {
141
+ } : C === "panel" && !t.defaultPanelTag && Bn(f) ? t.defaultPanelTag = {
141
142
  index: r.index,
142
143
  tag: f
143
- } : E === "animations" && !t.animationsTag && (t.animationsTag = {
144
+ } : C === "animations" && !t.animationsTag && (t.animationsTag = {
144
145
  index: r.index,
145
146
  tag: f
146
- })), h || (o += 1);
147
+ })), h || (i += 1);
147
148
  }
148
149
  return t;
149
- }, "scanTreeGridXmlDefaultLayout"), In = /* @__PURE__ */ i((e) => {
150
- const n = $e(e, "Name");
150
+ }, "scanTreeGridXmlDefaultLayout"), Bn = /* @__PURE__ */ o((e) => {
151
+ const n = Ue(e, "Name");
151
152
  return n === void 0 || n === "" || n.toLowerCase() === "panel";
152
- }, "isTreeGridXmlDefaultPanelTag"), On = /* @__PURE__ */ i((e) => {
153
+ }, "isTreeGridXmlDefaultPanelTag"), Vn = /* @__PURE__ */ o((e) => {
153
154
  const n = /<([A-Za-z][\w:-]*)\b[^>]*(?:\/>|>)/g, t = [];
154
155
  let r;
155
156
  for (; r = n.exec(e); ) {
@@ -164,101 +165,101 @@ const jt = 300, dn = 3, un = {
164
165
  });
165
166
  }
166
167
  return t;
167
- }, "getLeadingTreeGridXmlHeaderTags"), bn = /* @__PURE__ */ i((e) => {
168
- const n = On(e);
168
+ }, "getLeadingTreeGridXmlHeaderTags"), Mn = /* @__PURE__ */ o((e) => {
169
+ const n = Vn(e);
169
170
  if (n.length <= 1)
170
171
  return {
171
172
  headContent: e,
172
173
  isApplied: !1
173
174
  };
174
175
  const [t, ...r] = n;
175
- if ($(t.tag, "PanelRowSpan") || r.some(({ tag: l }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(l)))
176
+ if (D(t.tag, "PanelRowSpan") || r.some(({ tag: c }) => /\bPanel[A-Za-z0-9_]*\s*=/i.test(c)))
176
177
  return {
177
178
  headContent: e,
178
179
  isApplied: !1
179
180
  };
180
- let o = t.tag;
181
- return $(o, "Spanned") || (o = w(o, "Spanned", 1)), o = w(
182
- o,
181
+ let i = t.tag;
182
+ return D(i, "Spanned") || (i = N(i, "Spanned", 1)), i = N(
183
+ i,
183
184
  "PanelRowSpan",
184
185
  n.length
185
186
  ), {
186
- headContent: `${e.slice(0, t.index)}${o}${e.slice(
187
+ headContent: `${e.slice(0, t.index)}${i}${e.slice(
187
188
  t.index + t.tag.length
188
189
  )}`,
189
190
  isApplied: !0
190
191
  };
191
- }, "applyTreeGridXmlHeadPanelRowSpanDefault"), Pn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), yn = /* @__PURE__ */ i((e) => !!e.defaultPanelTag || Q(e.cfgValues) || Ne(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), $n = /* @__PURE__ */ i((e, n) => {
192
- if (n.gridOpenTagEndIndex === void 0 || !yn(n))
192
+ }, "applyTreeGridXmlHeadPanelRowSpanDefault"), Xn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlPanelSpannedInsertionIndex"), Wn = /* @__PURE__ */ o((e) => !!e.defaultPanelTag || We(e.cfgValues) || Je(e.cfgValues), "isTreeGridXmlPanelSpannedDefaultLayout"), Jn = /* @__PURE__ */ o((e, n) => {
193
+ if (n.gridOpenTagEndIndex === void 0 || !Wn(n))
193
194
  return e;
194
195
  const t = n.defaultPanelTag;
195
196
  if (t) {
196
- const o = U(
197
+ const i = B(
197
198
  t.tag,
198
- An
199
+ Dn
199
200
  );
200
- return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
201
+ return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
201
202
  t.index + t.tag.length
202
203
  )}`;
203
204
  }
204
- const r = Pn(n);
205
+ const r = Xn(n);
205
206
  return r === void 0 ? e : `${e.slice(0, r)}
206
207
  <Panel Spanned="1" />${e.slice(
207
208
  r
208
209
  )}`;
209
- }, "applyTreeGridXmlDefaultPanelSpannedLayout"), Dn = /* @__PURE__ */ i((e) => {
210
+ }, "applyTreeGridXmlDefaultPanelSpannedLayout"), Kn = /* @__PURE__ */ o((e) => {
210
211
  if (!/<Head\b/i.test(e) || /\bPanelRowSpan\s*[:=]/i.test(e))
211
212
  return e;
212
213
  let n = !1;
213
214
  const t = e.replace(
214
215
  /(<Head\b[^>]*>)([\s\S]*?)(<\/Head>)/i,
215
- (r, o, l, a) => {
216
- const f = bn(l);
217
- return f.isApplied ? (n = !0, `${o}${f.headContent}${a}`) : r;
216
+ (r, i, c, a) => {
217
+ const f = Mn(c);
218
+ return f.isApplied ? (n = !0, `${i}${f.headContent}${a}`) : r;
218
219
  }
219
220
  );
220
- return n ? $n(
221
+ return n ? Jn(
221
222
  t,
222
223
  x(t)
223
224
  ) : e;
224
- }, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), Fe = /* @__PURE__ */ i((e) => q(
225
- J(e, "Selecting"),
226
- J(e, "SelectingSingle")
227
- ), "isTreeGridJsonCheckboxSelectionLayout"), Q = /* @__PURE__ */ i((e) => q(
225
+ }, "applyTreeGridDefaultHeaderPanelRowSpanLayout"), Me = /* @__PURE__ */ o((e) => te(
226
+ j(e, "Selecting"),
227
+ j(e, "SelectingSingle")
228
+ ), "isTreeGridJsonCheckboxSelectionLayout"), Xe = /* @__PURE__ */ o((e) => te(
228
229
  e.Selecting,
229
230
  e.SelectingSingle
230
- ), "isTreeGridXmlCheckboxSelectionLayout"), wn = /* @__PURE__ */ i((e) => !y(e.Selecting), "isTreeGridXmlSelectingLayout"), Ne = /* @__PURE__ */ i((e) => D(e.Undo, "1") && D(e.Deleting, "2") && D(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), Fn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), Nn = /* @__PURE__ */ i((e, n) => {
231
- if (n.gridOpenTagEndIndex === void 0 || !wn(n.cfgValues) || /\bOnClickCell\s*=/i.test(e))
231
+ ), "isTreeGridXmlCheckboxSelectionLayout"), We = /* @__PURE__ */ o((e) => !$(e.Selecting), "isTreeGridXmlSelectingLayout"), Je = /* @__PURE__ */ o((e) => F(e.Undo, "1") && F(e.Deleting, "2") && F(e.Selecting, "0"), "isTreeGridXmlDeletePanelDefaultLayout"), jn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlCellClickActionInsertionIndex"), zn = /* @__PURE__ */ o((e, n) => {
232
+ if (n.gridOpenTagEndIndex === void 0 || !We(n.cfgValues) || /\bOnClickCell\s*=/i.test(e))
232
233
  return e;
233
234
  const t = n.defaultActionsTag;
234
235
  if (t) {
235
- const o = U(
236
+ const i = B(
236
237
  t.tag,
237
- N
238
+ k
238
239
  );
239
- return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
240
+ return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
240
241
  t.index + t.tag.length
241
242
  )}`;
242
243
  }
243
- const r = Fn(n);
244
+ const r = jn(n);
244
245
  return r === void 0 ? e : `${e.slice(0, r)}
245
246
  <Actions OnClickCell="Focus" />${e.slice(
246
247
  r
247
248
  )}`;
248
- }, "applyTreeGridXmlDefaultCellClickActionLayout"), kn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), Un = /* @__PURE__ */ i((e, n) => {
249
- if (n.gridOpenTagEndIndex === void 0 || !Q(n.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
249
+ }, "applyTreeGridXmlDefaultCellClickActionLayout"), Hn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlSelectAllPanelActionInsertionIndex"), Yn = /* @__PURE__ */ o((e, n) => {
250
+ if (n.gridOpenTagEndIndex === void 0 || !Xe(n.cfgValues) || /\bOnClickPanelSelectAll\s*=/i.test(e))
250
251
  return e;
251
252
  const t = n.defaultActionsTag;
252
253
  if (t) {
253
- const o = U(
254
+ const i = B(
254
255
  t.tag,
255
- k
256
+ U
256
257
  );
257
- return o === t.tag ? e : `${e.slice(0, t.index)}${o}${e.slice(
258
+ return i === t.tag ? e : `${e.slice(0, t.index)}${i}${e.slice(
258
259
  t.index + t.tag.length
259
260
  )}`;
260
261
  }
261
- const r = kn(n);
262
+ const r = Hn(n);
262
263
  return r === void 0 ? e : `${e.slice(
263
264
  0,
264
265
  r
@@ -266,33 +267,33 @@ const jt = 300, dn = 3, un = {
266
267
  <Actions OnClickPanelSelectAll="SelectAll OR DeselectAll" />${e.slice(
267
268
  r
268
269
  )}`;
269
- }, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), vn = /* @__PURE__ */ i((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), Bn = /* @__PURE__ */ i((e, n) => {
270
- if (n.gridOpenTagEndIndex === void 0 || !Ne(n.cfgValues))
270
+ }, "applyTreeGridXmlDefaultSelectAllPanelActionLayout"), Zn = /* @__PURE__ */ o((e) => e.lastCfgEndIndex ?? e.gridOpenTagEndIndex, "getTreeGridXmlDeletePanelInsertionIndex"), qn = /* @__PURE__ */ o((e, n) => {
271
+ if (n.gridOpenTagEndIndex === void 0 || !Je(n.cfgValues))
271
272
  return e;
272
273
  const t = n.defaultPanelTag;
273
274
  if (t) {
274
- const l = U(
275
+ const c = B(
275
276
  t.tag,
276
- hn
277
+ $n
277
278
  );
278
- return l === t.tag ? e : `${e.slice(0, t.index)}${l}${e.slice(
279
+ return c === t.tag ? e : `${e.slice(0, t.index)}${c}${e.slice(
279
280
  t.index + t.tag.length
280
281
  )}`;
281
282
  }
282
- const r = vn(n);
283
+ const r = Zn(n);
283
284
  return r === void 0 ? e : `${e.slice(0, r)}
284
285
  <Panel Visible="1" CanHide="0" Delete="1" Width="33" />${e.slice(
285
286
  r
286
287
  )}`;
287
- }, "applyTreeGridXmlDefaultDeletePanelLayout"), Vn = /* @__PURE__ */ i((e, n) => {
288
- if (n.hasFastPanel || !Q(n.cfgValues))
288
+ }, "applyTreeGridXmlDefaultDeletePanelLayout"), Qn = /* @__PURE__ */ o((e, n) => {
289
+ if (n.hasFastPanel || !Xe(n.cfgValues))
289
290
  return e;
290
291
  const t = n.gridOpenTagEndIndex;
291
292
  return t === void 0 ? e : `${e.slice(0, t)}
292
293
  <Cfg FastPanel="0" />${e.slice(
293
294
  t
294
295
  )}`;
295
- }, "applyTreeGridXmlDefaultFastPanelLayout"), Xn = /* @__PURE__ */ i((e) => {
296
+ }, "applyTreeGridXmlDefaultFastPanelLayout"), et = /* @__PURE__ */ o((e) => {
296
297
  const n = e.Cfg;
297
298
  if (Array.isArray(n)) {
298
299
  n.some((t) => S(t) && "FastPanel" in t) || (e.Cfg = [{ FastPanel: 0 }, ...n]);
@@ -303,118 +304,118 @@ const jt = 300, dn = 3, un = {
303
304
  return;
304
305
  }
305
306
  e.Cfg = { FastPanel: 0 };
306
- }, "applyTreeGridJsonFastPanelDefault"), Mn = /* @__PURE__ */ i((e) => {
307
+ }, "applyTreeGridJsonFastPanelDefault"), nt = /* @__PURE__ */ o((e) => {
307
308
  const n = e.Actions;
308
309
  if (Array.isArray(n)) {
309
310
  n.some(
310
311
  (t) => S(t) && "OnClickPanelSelectAll" in t
311
- ) || (e.Actions = [{ ...k }, ...n]);
312
+ ) || (e.Actions = [{ ...U }, ...n]);
312
313
  return;
313
314
  }
314
315
  if (S(n)) {
315
- "OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll = k.OnClickPanelSelectAll);
316
+ "OnClickPanelSelectAll" in n || (n.OnClickPanelSelectAll = U.OnClickPanelSelectAll);
316
317
  return;
317
318
  }
318
- n === void 0 && (e.Actions = { ...k });
319
- }, "applyTreeGridJsonSelectAllPanelActionDefault"), Jn = /* @__PURE__ */ i((e) => {
319
+ n === void 0 && (e.Actions = { ...U });
320
+ }, "applyTreeGridJsonSelectAllPanelActionDefault"), tt = /* @__PURE__ */ o((e) => {
320
321
  const n = e.Actions;
321
322
  if (Array.isArray(n)) {
322
- n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...N }, ...n]);
323
+ n.some((t) => S(t) && "OnClickCell" in t) || (e.Actions = [{ ...k }, ...n]);
323
324
  return;
324
325
  }
325
326
  if (S(n)) {
326
- "OnClickCell" in n || (n.OnClickCell = N.OnClickCell);
327
+ "OnClickCell" in n || (n.OnClickCell = k.OnClickCell);
327
328
  return;
328
329
  }
329
- n === void 0 && (e.Actions = { ...N });
330
- }, "applyTreeGridJsonCellClickActionDefault"), Wn = /* @__PURE__ */ i((e) => {
330
+ n === void 0 && (e.Actions = { ...k });
331
+ }, "applyTreeGridJsonCellClickActionDefault"), rt = /* @__PURE__ */ o((e) => {
331
332
  try {
332
333
  const n = JSON.parse(e);
333
- return !S(n) || y(J(n, "Selecting")) ? e : (Jn(n), JSON.stringify(n));
334
+ return !S(n) || $(j(n, "Selecting")) ? e : (tt(n), JSON.stringify(n));
334
335
  } catch {
335
336
  return e;
336
337
  }
337
- }, "applyTreeGridJsonDefaultCellClickActionLayout"), Ee = /* @__PURE__ */ i((e, n) => {
338
+ }, "applyTreeGridJsonDefaultCellClickActionLayout"), Re = /* @__PURE__ */ o((e, n) => {
338
339
  const t = e.trim();
339
- return t ? t.startsWith("{") ? Wn(e) : Nn(
340
+ return t ? t.startsWith("{") ? rt(e) : zn(
340
341
  e,
341
342
  n ?? x(e)
342
343
  ) : e;
343
- }, "applyTreeGridDefaultCellClickActionLayout"), Kn = /* @__PURE__ */ i((e) => {
344
+ }, "applyTreeGridDefaultCellClickActionLayout"), it = /* @__PURE__ */ o((e) => {
344
345
  try {
345
346
  const n = JSON.parse(e);
346
- return !S(n) || !Fe(n) ? e : (Mn(n), JSON.stringify(n));
347
+ return !S(n) || !Me(n) ? e : (nt(n), JSON.stringify(n));
347
348
  } catch {
348
349
  return e;
349
350
  }
350
- }, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), pe = /* @__PURE__ */ i((e, n) => {
351
+ }, "applyTreeGridJsonDefaultSelectAllPanelActionLayout"), Ae = /* @__PURE__ */ o((e, n) => {
351
352
  const t = e.trim();
352
- return t ? t.startsWith("{") ? Kn(e) : Un(
353
+ return t ? t.startsWith("{") ? it(e) : Yn(
353
354
  e,
354
355
  n ?? x(e)
355
356
  ) : e;
356
- }, "applyTreeGridDefaultSelectAllPanelActionLayout"), jn = /* @__PURE__ */ i((e, n) => {
357
+ }, "applyTreeGridDefaultSelectAllPanelActionLayout"), ot = /* @__PURE__ */ o((e, n) => {
357
358
  if (n === void 0)
358
359
  return e;
359
360
  try {
360
361
  const t = JSON.parse(e);
361
362
  if (!S(t))
362
363
  return e;
363
- const r = ye(t);
364
- return r.some((o) => "SuppressCfg" in o) ? e : (r[0] ? r[0].SuppressCfg = n : t.Cfg = { SuppressCfg: n }, JSON.stringify(t));
364
+ const r = ke(t);
365
+ return r.some((i) => "SuppressCfg" in i) ? e : (r[0] ? r[0].SuppressCfg = n : t.Cfg = { SuppressCfg: n }, JSON.stringify(t));
365
366
  } catch {
366
367
  return e;
367
368
  }
368
- }, "applyTreeGridJsonDefaultSuppressCfgLayout"), zn = /* @__PURE__ */ i((e, n, t) => {
369
+ }, "applyTreeGridJsonDefaultSuppressCfgLayout"), st = /* @__PURE__ */ o((e, n, t) => {
369
370
  if (t === void 0 || n.cfgValues.SuppressCfg !== void 0)
370
371
  return e;
371
372
  const r = n.defaultCfgTag;
372
373
  if (r) {
373
- const l = w(r.tag, "SuppressCfg", t);
374
- return `${e.slice(0, r.index)}${l}${e.slice(
374
+ const c = N(r.tag, "SuppressCfg", t);
375
+ return `${e.slice(0, r.index)}${c}${e.slice(
375
376
  r.index + r.tag.length
376
377
  )}`;
377
378
  }
378
- const o = n.gridOpenTagEndIndex;
379
- return o === void 0 ? e : `${e.slice(0, o)}
379
+ const i = n.gridOpenTagEndIndex;
380
+ return i === void 0 ? e : `${e.slice(0, i)}
380
381
  <Cfg SuppressCfg="${t}" />${e.slice(
381
- o
382
+ i
382
383
  )}`;
383
- }, "applyTreeGridXmlDefaultSuppressCfgLayout"), Yn = /* @__PURE__ */ i((e, n) => {
384
+ }, "applyTreeGridXmlDefaultSuppressCfgLayout"), ct = /* @__PURE__ */ o((e, n) => {
384
385
  const t = e.trim();
385
- return n === void 0 || !t ? e : t.startsWith("{") ? jn(e, n) : zn(
386
+ return n === void 0 || !t ? e : t.startsWith("{") ? ot(e, n) : st(
386
387
  e,
387
388
  x(e),
388
389
  n
389
390
  );
390
- }, "applyTreeGridDefaultSuppressCfgLayout"), Zn = /* @__PURE__ */ i((e) => Pe.some((n) => n in e), "hasTreeGridToolbarFormulaField"), qn = /* @__PURE__ */ i((e) => {
391
- const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [], o = Array.isArray(t) ? t.filter(
392
- (l) => S(l) && D(l.Kind, "Toolbar")
393
- ) : S(t) && D(t.Kind, "Toolbar") ? [t] : [];
394
- return [...r, ...o];
395
- }, "getTreeGridJsonToolbarRecords"), Qn = /* @__PURE__ */ i((e, n) => {
391
+ }, "applyTreeGridDefaultSuppressCfgLayout"), lt = /* @__PURE__ */ o((e) => ve.some((n) => n in e), "hasTreeGridToolbarFormulaField"), dt = /* @__PURE__ */ o((e) => {
392
+ const n = e.Toolbar, t = e.Solid, r = Array.isArray(n) ? n.filter(S) : S(n) ? [n] : [], i = Array.isArray(t) ? t.filter(
393
+ (c) => S(c) && F(c.Kind, "Toolbar")
394
+ ) : S(t) && F(t.Kind, "Toolbar") ? [t] : [];
395
+ return [...r, ...i];
396
+ }, "getTreeGridJsonToolbarRecords"), ut = /* @__PURE__ */ o((e, n) => {
396
397
  if (!n)
397
398
  return e;
398
399
  try {
399
400
  const t = JSON.parse(e);
400
401
  if (!S(t))
401
402
  return e;
402
- const r = qn(t);
403
- return r.some(Zn) ? e : (r[0] ? r[0].FormulaFormula = n : t.Toolbar = { FormulaFormula: n }, JSON.stringify(t));
403
+ const r = dt(t);
404
+ return r.some(lt) ? e : (r[0] ? r[0].FormulaFormula = n : t.Toolbar = { FormulaFormula: n }, JSON.stringify(t));
404
405
  } catch {
405
406
  return e;
406
407
  }
407
- }, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), Hn = /* @__PURE__ */ i((e) => Pe.some(
408
- (n) => $(e, n)
409
- ), "hasTreeGridXmlToolbarFormulaAttribute"), et = /* @__PURE__ */ i((e, n) => {
408
+ }, "applyTreeGridJsonDefaultToolbarTotalCountLayout"), ft = /* @__PURE__ */ o((e) => ve.some(
409
+ (n) => D(e, n)
410
+ ), "hasTreeGridXmlToolbarFormulaAttribute"), at = /* @__PURE__ */ o((e, n) => {
410
411
  if (!n)
411
412
  return e;
412
- const t = Ln.exec(e);
413
+ const t = vn.exec(e);
413
414
  if (t) {
414
415
  const a = t[0];
415
- if (Hn(a))
416
+ if (ft(a))
416
417
  return e;
417
- const f = W(
418
+ const f = z(
418
419
  a,
419
420
  "Formula",
420
421
  n
@@ -423,58 +424,58 @@ const jt = 300, dn = 3, un = {
423
424
  t.index + a.length
424
425
  )}`;
425
426
  }
426
- const r = W(
427
+ const r = z(
427
428
  "<Toolbar />",
428
429
  "Formula",
429
430
  n
430
- ), o = _n.exec(e);
431
- if (o)
432
- return `${e.slice(0, o.index)} ${r}
431
+ ), i = Nn.exec(e);
432
+ if (i)
433
+ return `${e.slice(0, i.index)} ${r}
433
434
  ${e.slice(
434
- o.index
435
+ i.index
435
436
  )}`;
436
- const l = Rn.exec(e);
437
- return l ? `${e.slice(
437
+ const c = Fn.exec(e);
438
+ return c ? `${e.slice(
438
439
  0,
439
- l.index + l[0].length
440
+ c.index + c[0].length
440
441
  )}
441
- ${r}${e.slice(l.index + l[0].length)}` : e;
442
- }, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), nt = /* @__PURE__ */ i((e, n) => {
442
+ ${r}${e.slice(c.index + c[0].length)}` : e;
443
+ }, "applyTreeGridXmlDefaultToolbarTotalCountLayout"), Tt = /* @__PURE__ */ o((e, n) => {
443
444
  const t = e.trim();
444
- return !n || !t ? e : t.startsWith("{") ? Qn(
445
+ return !n || !t ? e : t.startsWith("{") ? ut(
445
446
  e,
446
447
  n
447
- ) : et(e, n);
448
- }, "applyTreeGridDefaultToolbarTotalCountLayout"), tt = /* @__PURE__ */ i((e) => {
448
+ ) : at(e, n);
449
+ }, "applyTreeGridDefaultToolbarTotalCountLayout"), pt = /* @__PURE__ */ o((e) => {
449
450
  try {
450
451
  const n = JSON.parse(e);
451
- return !S(n) || !Fe(n) ? e : (Xn(n), JSON.stringify(n));
452
+ return !S(n) || !Me(n) ? e : (et(n), JSON.stringify(n));
452
453
  } catch {
453
454
  return e;
454
455
  }
455
- }, "applyTreeGridJsonDefaultFastPanelLayout"), Ge = /* @__PURE__ */ i((e, n) => {
456
+ }, "applyTreeGridJsonDefaultFastPanelLayout"), _e = /* @__PURE__ */ o((e, n) => {
456
457
  const t = e.trim();
457
- return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : tt(e) : Vn(
458
+ return t ? t.startsWith("{") ? /\bFastPanel\s*[:=]/i.test(e) ? e : pt(e) : Qn(
458
459
  e,
459
460
  n ?? x(e)
460
461
  ) : e;
461
- }, "applyTreeGridDefaultFastPanelLayout"), rt = /* @__PURE__ */ i((e) => {
462
+ }, "applyTreeGridDefaultFastPanelLayout"), Et = /* @__PURE__ */ o((e) => {
462
463
  const n = {};
463
464
  return e == null || e.forEach((t) => {
464
465
  var r;
465
- (r = xn[t]) == null || r.forEach((o) => {
466
- n[o] = "";
466
+ (r = Un[t]) == null || r.forEach((i) => {
467
+ n[i] = "";
467
468
  });
468
469
  }), n;
469
- }, "getTreeGridDisabledAnimationAttributes"), it = /* @__PURE__ */ i((e, n) => {
470
+ }, "getTreeGridDisabledAnimationAttributes"), Ct = /* @__PURE__ */ o((e, n) => {
470
471
  try {
471
472
  const t = JSON.parse(e);
472
473
  if (!S(t))
473
474
  return e;
474
475
  const r = t.Animations;
475
476
  if (Array.isArray(r)) {
476
- const o = r.find(S);
477
- o ? Object.assign(o, n) : r.unshift({ ...n });
477
+ const i = r.find(S);
478
+ i ? Object.assign(i, n) : r.unshift({ ...n });
478
479
  } else if (S(r))
479
480
  Object.assign(r, n);
480
481
  else if (r === void 0)
@@ -485,54 +486,54 @@ ${e.slice(
485
486
  } catch {
486
487
  return e;
487
488
  }
488
- }, "applyTreeGridJsonDisabledAnimationsLayout"), ot = /* @__PURE__ */ i((e) => we("<Animations />", e), "createTreeGridDisabledAnimationsTag"), st = /* @__PURE__ */ i((e, n) => {
489
+ }, "applyTreeGridJsonDisabledAnimationsLayout"), Gt = /* @__PURE__ */ o((e) => Ve("<Animations />", e), "createTreeGridDisabledAnimationsTag"), St = /* @__PURE__ */ o((e, n) => {
489
490
  const t = x(e);
490
491
  if (t.gridOpenTagEndIndex === void 0)
491
492
  return e;
492
493
  const r = t.animationsTag;
493
494
  if (r) {
494
- const l = we(r.tag, n);
495
- return l === r.tag ? e : `${e.slice(0, r.index)}${l}${e.slice(
495
+ const c = Ve(r.tag, n);
496
+ return c === r.tag ? e : `${e.slice(0, r.index)}${c}${e.slice(
496
497
  r.index + r.tag.length
497
498
  )}`;
498
499
  }
499
- const o = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
500
- return `${e.slice(0, o)}
501
- ${ot(
500
+ const i = t.lastCfgEndIndex ?? t.gridOpenTagEndIndex;
501
+ return `${e.slice(0, i)}
502
+ ${Gt(
502
503
  n
503
- )}${e.slice(o)}`;
504
- }, "applyTreeGridXmlDisabledAnimationsLayout"), ge = /* @__PURE__ */ i((e, n) => {
505
- const t = rt(n);
504
+ )}${e.slice(i)}`;
505
+ }, "applyTreeGridXmlDisabledAnimationsLayout"), me = /* @__PURE__ */ o((e, n) => {
506
+ const t = Et(n);
506
507
  if (!Object.keys(t).length)
507
508
  return e;
508
509
  const r = e.trim();
509
- return r ? r.startsWith("{") ? it(e, t) : st(e, t) : e;
510
- }, "applyTreeGridDisabledAnimationsLayout"), K = /* @__PURE__ */ i((e, n, t, r) => {
511
- const o = nt(
512
- Dn(
513
- Yn(e, r)
510
+ return r ? r.startsWith("{") ? Ct(e, t) : St(e, t) : e;
511
+ }, "applyTreeGridDisabledAnimationsLayout"), H = /* @__PURE__ */ o((e, n, t, r) => {
512
+ const i = Tt(
513
+ Kn(
514
+ ct(e, r)
514
515
  ),
515
516
  t
516
- ), l = o.trim();
517
- if (!l || l.startsWith("{"))
518
- return ge(
519
- Ge(
520
- Ee(
521
- pe(o)
517
+ ), c = i.trim();
518
+ if (!c || c.startsWith("{"))
519
+ return me(
520
+ _e(
521
+ Re(
522
+ Ae(i)
522
523
  )
523
524
  ),
524
525
  n
525
526
  );
526
- const a = x(o), f = pe(
527
- o,
527
+ const a = x(i), f = Ae(
528
+ i,
528
529
  a
529
- ), E = f === o ? a : x(f), G = Ee(
530
+ ), C = f === i ? a : x(f), G = Re(
530
531
  f,
531
- E
532
- ), h = G === f ? E : x(G);
533
- return ge(
534
- Bn(
535
- Ge(
532
+ C
533
+ ), h = G === f ? C : x(G);
534
+ return me(
535
+ qn(
536
+ _e(
536
537
  G,
537
538
  h
538
539
  ),
@@ -540,103 +541,103 @@ ${e.slice(
540
541
  ),
541
542
  n
542
543
  );
543
- }, "applyTreeGridDefaultLayout"), ct = /* @__PURE__ */ i((e) => {
544
+ }, "applyTreeGridDefaultLayout"), ht = /* @__PURE__ */ o((e) => {
544
545
  var n;
545
- return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${rn}`)) ?? null;
546
- }, "getTreeGridWrapperElement"), lt = /* @__PURE__ */ i((e) => {
547
- if (M(e.AllSelected))
546
+ return typeof document > "u" ? null : ((n = document.getElementById(e)) == null ? void 0 : n.closest(`.${Gn}`)) ?? null;
547
+ }, "getTreeGridWrapperElement"), gt = /* @__PURE__ */ o((e) => {
548
+ if (K(e.AllSelected))
548
549
  return "checked";
549
- if (y(e.AllSelected))
550
+ if ($(e.AllSelected))
550
551
  return "unchecked";
551
552
  let n = 0, t = 0;
552
- return Be(e).forEach((r) => {
553
- !R(r) || y(r.CanSelect) || (n += 1, M(e.IsSelected(r)) && (t += 1));
553
+ return V(e).forEach((r) => {
554
+ !R(r) || $(r.CanSelect) || (n += 1, K(e.IsSelected(r)) && (t += 1));
554
555
  }), t ? n > 0 && t >= n ? "checked" : "indeterminate" : "unchecked";
555
- }, "getTreeGridSelectAllState"), j = /* @__PURE__ */ i((e, n) => {
556
- const t = ct(n), r = !y(e.Selecting), o = q(
556
+ }, "getTreeGridSelectAllState"), Y = /* @__PURE__ */ o((e, n) => {
557
+ const t = ht(n), r = !$(e.Selecting), i = te(
557
558
  e.Selecting,
558
559
  e.SelectingSingle
559
- ), l = e.Header;
560
+ ), c = e.Header;
560
561
  if (t == null || t.classList.toggle(
561
- tn,
562
- o
563
- ), !o)
562
+ Cn,
563
+ i
564
+ ), !i)
564
565
  t == null || t.classList.remove(
565
- le,
566
- de,
567
- ue
566
+ pe,
567
+ Ee,
568
+ Ce
568
569
  );
569
570
  else {
570
- const a = lt(e);
571
+ const a = gt(e);
571
572
  t == null || t.classList.toggle(
572
- le,
573
+ pe,
573
574
  a === "checked"
574
575
  ), t == null || t.classList.toggle(
575
- de,
576
+ Ee,
576
577
  a === "indeterminate"
577
578
  ), t == null || t.classList.toggle(
578
- ue,
579
+ Ce,
579
580
  a === "unchecked"
580
581
  );
581
582
  }
582
- l && r && (l.CanSelect = o ? 1 : 0);
583
- }, "syncTreeGridSelectionPanelState"), X = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ i((e, n) => {
583
+ c && r && (c.CanSelect = i ? 1 : 0);
584
+ }, "syncTreeGridSelectionPanelState"), J = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ o((e, n) => {
584
585
  if (typeof window > "u")
585
586
  return;
586
- const t = X.get(n);
587
+ const t = J.get(n);
587
588
  t !== void 0 && window.clearTimeout(t);
588
589
  const r = window.setTimeout(() => {
589
- X.delete(n), j(e, n);
590
+ J.delete(n), Y(e, n);
590
591
  }, 0);
591
- X.set(n, r);
592
- }, "scheduleTreeGridSelectionPanelStateSync"), dt = /* @__PURE__ */ i((e, n) => {
592
+ J.set(n, r);
593
+ }, "scheduleTreeGridSelectionPanelStateSync"), Rt = /* @__PURE__ */ o((e, n) => {
593
594
  e.EnterMode = n;
594
- const t = un[n];
595
+ const t = _n[n];
595
596
  if (!t)
596
597
  return;
597
598
  const r = e;
598
599
  r.Actions ?? (r.Actions = {}), r.Actions.OnEnter = t.onEnter, r.Actions.OnEnterEdit = t.onEnterEdit;
599
- }, "applyTreeGridDefaultEnterMode"), ke = /* @__PURE__ */ i((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), he = /* @__PURE__ */ new Map(), ut = /* @__PURE__ */ i((e) => {
600
+ }, "applyTreeGridDefaultEnterMode"), Ke = /* @__PURE__ */ o((e) => (e == null ? void 0 : e.startsWith("data:")) || (e == null ? void 0 : e.startsWith("blob:")), "isTreeGridInlineUrl"), Oe = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ o((e) => {
600
601
  if (!e || !e.startsWith("data:"))
601
602
  return e;
602
- const n = he.get(e);
603
+ const n = Oe.get(e);
603
604
  if (n)
604
605
  return n;
605
606
  try {
606
- const [t, r = ""] = e.split(",", 2), o = /^data:([^;]*)(;base64)?$/i.exec(t), l = (o == null ? void 0 : o[1]) || "application/octet-stream", a = o != null && o[2] ? atob(r) : decodeURIComponent(r), f = new Uint8Array(a.length);
607
+ const [t, r = ""] = e.split(",", 2), i = /^data:([^;]*)(;base64)?$/i.exec(t), c = (i == null ? void 0 : i[1]) || "application/octet-stream", a = i != null && i[2] ? atob(r) : decodeURIComponent(r), f = new Uint8Array(a.length);
607
608
  for (let G = 0; G < a.length; G += 1)
608
609
  f[G] = a.charCodeAt(G);
609
- const E = URL.createObjectURL(new Blob([f], { type: l }));
610
- return he.set(e, E), E;
610
+ const C = URL.createObjectURL(new Blob([f], { type: c }));
611
+ return Oe.set(e, C), C;
611
612
  } catch {
612
613
  return e;
613
614
  }
614
- }, "resolveTreeGridInlineUrl"), z = /* @__PURE__ */ i((e) => {
615
- if (!e || ke(e))
616
- return ut(e);
617
- const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""], o = t.includes("?") ? "&" : "?";
618
- return `${t}${o}noCache=${Date.now()}${r}`;
619
- }, "appendNoCacheQuery"), Ae = /* @__PURE__ */ i((e, n, t) => {
615
+ }, "resolveTreeGridInlineUrl"), Z = /* @__PURE__ */ o((e) => {
616
+ if (!e || Ke(e))
617
+ return At(e);
618
+ const n = e.indexOf("#"), [t, r] = n >= 0 ? [e.slice(0, n), e.slice(n)] : [e, ""], i = t.includes("?") ? "&" : "?";
619
+ return `${t}${i}noCache=${Date.now()}${r}`;
620
+ }, "appendNoCacheQuery"), xe = /* @__PURE__ */ o((e, n, t) => {
620
621
  if (!e)
621
622
  return;
622
- const r = t.canEdit, o = t.highlightColumns ?? [], l = t.highlightBackgroundColor;
623
- if (!(r === void 0 && !o.length)) {
623
+ const r = t.canEdit, i = t.highlightColumns ?? [], c = t.highlightBackgroundColor;
624
+ if (!(r === void 0 && !i.length)) {
624
625
  typeof e.StartUpdate == "function" && e.StartUpdate();
625
626
  try {
626
- r !== void 0 && (n.CanEdit = r), o.forEach((a) => {
627
+ r !== void 0 && (n.CanEdit = r), i.forEach((a) => {
627
628
  a && (e.SetValue(
628
629
  n,
629
630
  `${a}Class`,
630
- l ? xe : "",
631
+ c ? Pe : "",
631
632
  0
632
- ), e.SetValue(n, `${a}Color`, l ?? "", 0));
633
+ ), e.SetValue(n, `${a}Color`, c ?? "", 0));
633
634
  });
634
635
  } finally {
635
636
  typeof e.EndUpdate == "function" && e.EndUpdate();
636
637
  }
637
638
  typeof e.RefreshRow == "function" && e.RefreshRow(n);
638
639
  }
639
- }, "syncTreeGridDeletedRowState"), ft = /* @__PURE__ */ i((e) => e ? ke(e) || e.includes("assets") ? z(e) : z(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), Tt = /* @__PURE__ */ i((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), at = /* @__PURE__ */ i((e, n, t, r) => {
640
+ }, "syncTreeGridDeletedRowState"), _t = /* @__PURE__ */ o((e) => e ? Ke(e) || e.includes("assets") ? Z(e) : Z(`undefined/${e}`) : "", "resolveTreeGridDataUrl"), mt = /* @__PURE__ */ o((e) => (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function", "isTreeGridPromiseLike"), Lt = /* @__PURE__ */ o((e, n, t, r) => {
640
641
  if (!(!e || t === "cancel")) {
641
642
  if (t === "remove") {
642
643
  e.RemoveRow(n), r(e);
@@ -644,37 +645,37 @@ ${e.slice(
644
645
  }
645
646
  e.DeleteRowT(n, 3);
646
647
  }
647
- }, "applyTreeGridBeforeRowUndeleteAction"), Ct = /* @__PURE__ */ i((e, n, t) => e ? { Url: ft(n) } : { Data: { Body: [cn(t) ? [] : t] } }, "buildTreeGridDataSource"), zt = /* @__PURE__ */ i(({
648
+ }, "applyTreeGridBeforeRowUndeleteAction"), Ot = /* @__PURE__ */ o((e, n, t) => e ? { Url: _t(n) } : { Data: { Body: [gn(t) ? [] : t] } }, "buildTreeGridDataSource"), ar = /* @__PURE__ */ o(({
648
649
  id: e,
649
650
  layoutUrl: n,
650
651
  layoutData: t,
651
652
  toolbarTotalCountFormula: r,
652
- suppressCfg: o,
653
- disabledAnimations: l,
653
+ suppressCfg: i,
654
+ disabledAnimations: c,
654
655
  dataUrl: a,
655
656
  bodyData: f,
656
- useDataUrl: E,
657
+ useDataUrl: C,
657
658
  width: G,
658
659
  height: h,
659
- languageId: A
660
+ languageId: g
660
661
  }) => ({
661
662
  id: e,
662
663
  Layout: t ? {
663
- Data: K(
664
+ Data: H(
664
665
  t,
665
- l,
666
+ c,
666
667
  r,
667
- o
668
+ i
668
669
  )
669
- } : { Url: z(n ?? "") },
670
- Data: Ct(E, a, f),
670
+ } : { Url: Z(n ?? "") },
671
+ Data: Ot(C, a, f),
671
672
  Text: {
672
- Url: qe(A)
673
+ Url: un(g)
673
674
  },
674
675
  width: G,
675
676
  height: h,
676
677
  Debug: "Error"
677
- }), "buildTreeGridInitializationOptions"), Re = /* @__PURE__ */ i((e) => ln(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), _e = /* @__PURE__ */ i((e) => {
678
+ }), "buildTreeGridInitializationOptions"), Ie = /* @__PURE__ */ o((e) => Rn(e, "Data.Data.Data.Body.0"), "getTreeGridBodyData"), be = /* @__PURE__ */ o((e) => {
678
679
  if (typeof e == "number")
679
680
  return Number.isFinite(e) && e > 0 ? e : void 0;
680
681
  if (typeof e != "string")
@@ -684,63 +685,63 @@ ${e.slice(
684
685
  return;
685
686
  const t = Number(n);
686
687
  return Number.isFinite(t) && t > 0 ? t : void 0;
687
- }, "parseTreeGridPositiveNumber"), Y = /* @__PURE__ */ i((e, n, t, r) => {
688
+ }, "parseTreeGridPositiveNumber"), q = /* @__PURE__ */ o((e, n, t, r) => {
688
689
  if (!n || !t)
689
690
  return;
690
- const o = e.GetAttribute(n, t, r), l = _e(o);
691
- return l !== void 0 ? l : _e(
691
+ const i = e.GetAttribute(n, t, r), c = be(i);
692
+ return c !== void 0 ? c : be(
692
693
  n[`${t}${r}`]
693
694
  );
694
- }, "getTreeGridHeaderCellSpanAttribute"), Et = /* @__PURE__ */ i((e, n, t) => !n || !t || n.Fixed !== "Head" || (Y(e, n, t, "Span") ?? 1) <= 1 ? !1 : (Y(e, n, t, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), Le = /* @__PURE__ */ i((e, n, t) => {
695
+ }, "getTreeGridHeaderCellSpanAttribute"), xt = /* @__PURE__ */ o((e, n, t) => !n || !t || n.Fixed !== "Head" || (q(e, n, t, "Span") ?? 1) <= 1 ? !1 : (q(e, n, t, "RowSpan") ?? 1) === 1, "isTreeGridGroupHeaderCell"), we = /* @__PURE__ */ o((e, n, t) => {
695
696
  const r = e.get(n);
696
697
  if (r) {
697
698
  r.add(t);
698
699
  return;
699
700
  }
700
701
  e.set(n, /* @__PURE__ */ new Set([t]));
701
- }, "addTreeGridHeaderButtonAttributeTarget"), Ue = /* @__PURE__ */ i((e, n, t, r) => {
702
- const o = /* @__PURE__ */ new Map();
703
- return n.forEach((l, a) => {
704
- t.forEach((f, E) => {
705
- if (!Et(e, l, f) || (Le(o, l, f), !r))
702
+ }, "addTreeGridHeaderButtonAttributeTarget"), je = /* @__PURE__ */ o((e, n, t, r) => {
703
+ const i = /* @__PURE__ */ new Map();
704
+ return n.forEach((c, a) => {
705
+ t.forEach((f, C) => {
706
+ if (!xt(e, c, f) || (we(i, c, f), !r))
706
707
  return;
707
- const G = Math.floor(Y(e, l, f, "Span") ?? 1), h = Math.min(t.length, E + G);
708
- for (let A = a + 1; A < n.length; A += 1) {
709
- const L = n[A];
710
- for (let I = E; I < h; I += 1)
711
- Le(o, L, t[I]);
708
+ const G = Math.floor(q(e, c, f, "Span") ?? 1), h = Math.min(t.length, C + G);
709
+ for (let g = a + 1; g < n.length; g += 1) {
710
+ const m = n[g];
711
+ for (let b = C; b < h; b += 1)
712
+ we(i, m, t[b]);
712
713
  }
713
714
  });
714
- }), o;
715
- }, "getTreeGridGroupHeaderSortButtonTargets"), pt = /* @__PURE__ */ i((e, n, t, r) => {
715
+ }), i;
716
+ }, "getTreeGridGroupHeaderSortButtonTargets"), It = /* @__PURE__ */ o((e, n, t, r) => {
716
717
  var a;
717
718
  if (!n || !t || n.Fixed !== "Head")
718
719
  return !1;
719
- const o = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((f) => f.Fixed === "Head") : [], l = typeof e.GetCols == "function" ? e.GetCols() : [];
720
- return !o.length || !l.length ? !1 : ((a = Ue(
720
+ const i = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((f) => f.Fixed === "Head") : [], c = typeof e.GetCols == "function" ? e.GetCols() : [];
721
+ return !i.length || !c.length ? !1 : ((a = je(
721
722
  e,
722
- o,
723
- l,
723
+ i,
724
+ c,
724
725
  r
725
726
  ).get(n)) == null ? void 0 : a.has(t)) === !0;
726
- }, "isTreeGridGroupHeaderSortButtonTarget"), me = /* @__PURE__ */ i((e, n, t = !1, r = !0) => {
727
- const o = typeof performance < "u" ? performance.now() : Date.now(), l = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
728
- if (!l.length || !a.length)
727
+ }, "isTreeGridGroupHeaderSortButtonTarget"), ye = /* @__PURE__ */ o((e, n, t = !1, r = !0) => {
728
+ const i = typeof performance < "u" ? performance.now() : Date.now(), c = typeof e.GetFixedRows == "function" ? e.GetFixedRows().filter((h) => h.Fixed === "Head") : [], a = typeof e.GetCols == "function" ? e.GetCols() : [];
729
+ if (!c.length || !a.length)
729
730
  return;
730
731
  const f = /* @__PURE__ */ new Set();
731
- let E = 0;
732
- const G = Ue(
732
+ let C = 0;
733
+ const G = je(
733
734
  e,
734
- l,
735
+ c,
735
736
  a,
736
737
  r
737
738
  );
738
739
  if (G.size) {
739
740
  typeof e.StartUpdate == "function" && e.StartUpdate();
740
741
  try {
741
- G.forEach((h, A) => {
742
- h.forEach((L) => {
743
- e.GetAttribute(A, L, Te) !== "" && (e.SetAttribute(A, L, Te, "", 0, 0), f.add(A), E += 1);
742
+ G.forEach((h, g) => {
743
+ h.forEach((m) => {
744
+ e.GetAttribute(g, m, Se) !== "" && (e.SetAttribute(g, m, Se, "", 0, 0), f.add(g), C += 1);
744
745
  });
745
746
  });
746
747
  } finally {
@@ -748,18 +749,18 @@ ${e.slice(
748
749
  }
749
750
  f.size && (t && f.forEach((h) => {
750
751
  typeof e.RefreshRow == "function" && e.RefreshRow(h);
751
- }), Oe(n, "group header button attribute apply"), be(n, "group header button attribute apply", o, {
752
- updatedCellCount: E,
752
+ }), De(n, "group header button attribute apply"), Fe(n, "group header button attribute apply", i, {
753
+ updatedCellCount: C,
753
754
  updatedRowCount: f.size
754
755
  }));
755
756
  }
756
- }, "applyTreeGridGroupHeaderSortButtonAttributes"), Gt = /* @__PURE__ */ i((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), gt = /* @__PURE__ */ i((e) => {
757
+ }, "applyTreeGridGroupHeaderSortButtonAttributes"), bt = /* @__PURE__ */ o((e) => Array.isArray(e) ? e.length : 0, "getTreeGridBodyDataCount"), wt = /* @__PURE__ */ o((e) => {
757
758
  const n = e == null ? void 0 : e.Visible;
758
759
  return !!e && n !== 0 && n !== !1 && n !== "0";
759
- }, "isVisibleTreeGridRow"), F = /* @__PURE__ */ i((e) => {
760
+ }, "isVisibleTreeGridRow"), v = /* @__PURE__ */ o((e) => {
760
761
  const n = e == null ? void 0 : e.Added;
761
762
  return !!e && n !== 0 && n !== !1 && n !== "0" && n !== void 0;
762
- }, "isAddedTreeGridRow"), R = /* @__PURE__ */ i((e) => !e || e.Fixed === "Foot" || !gt(e) ? !1 : e.Kind === "Data" || F(e), "isDisplayTreeGridRow"), ve = /* @__PURE__ */ i((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), Be = /* @__PURE__ */ i((e) => {
763
+ }, "isAddedTreeGridRow"), R = /* @__PURE__ */ o((e) => !e || e.Fixed === "Foot" || !wt(e) ? !1 : e.Kind === "Data" || v(e), "isDisplayTreeGridRow"), ze = /* @__PURE__ */ o((e) => Object.keys(e.Cols ?? {}).filter(Boolean), "getTreeGridColumnNames"), V = /* @__PURE__ */ o((e) => {
763
764
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
764
765
  const n = [];
765
766
  let t = e.GetFirst();
@@ -768,144 +769,213 @@ ${e.slice(
768
769
  return n;
769
770
  }
770
771
  return Object.values(e.Rows ?? {});
771
- }, "getTreeGridRows"), St = /* @__PURE__ */ i((e, n) => {
772
+ }, "getTreeGridRows"), Q = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ o((e) => {
773
+ e && Q.delete(e);
774
+ }, "clearTreeGridSelectionRowSpanAnchorRowMap"), He = /* @__PURE__ */ o((e, n) => {
775
+ const t = e, r = t == null ? void 0 : t[`${n}RowSpan`], i = typeof r == "number" ? r : Number.parseFloat(String(r ?? ""));
776
+ return Number.isFinite(i) && i > 1 ? Math.floor(i) : 1;
777
+ }, "getTreeGridRowSpanCount"), yt = /* @__PURE__ */ o((e) => {
778
+ const n = /* @__PURE__ */ new WeakMap();
779
+ let t = null, r = -1;
780
+ return V(e).forEach((i, c) => {
781
+ if (!R(i)) {
782
+ n.set(i, null);
783
+ return;
784
+ }
785
+ const a = He(i, Ne);
786
+ if (a > 1) {
787
+ t = i, r = c + a - 1, n.set(i, i);
788
+ return;
789
+ }
790
+ n.set(i, t && c <= r ? t : null), c >= r && (t = null, r = -1);
791
+ }), n;
792
+ }, "createTreeGridSelectionRowSpanAnchorRowMap"), re = /* @__PURE__ */ o((e, n) => {
793
+ if (!n || !R(n))
794
+ return null;
795
+ let t = Q.get(e);
796
+ return t != null && t.has(n) || (t = yt(e), Q.set(e, t)), t.get(n) ?? null;
797
+ }, "getTreeGridSelectionRowSpanAnchorRow"), Ye = /* @__PURE__ */ o((e, n) => {
798
+ const t = re(e, n);
799
+ if (!t)
800
+ return [];
801
+ const r = He(t, Ne), i = [];
802
+ let c = t;
803
+ for (let a = 0; c && a < r; a += 1)
804
+ R(c) && i.push(c), c = typeof e.GetNext == "function" ? e.GetNext(c) : null;
805
+ return i;
806
+ }, "getTreeGridSelectionRowSpanRows"), Pt = /* @__PURE__ */ o((e) => {
807
+ const n = /* @__PURE__ */ new Set();
808
+ return (e.GetSelRows() ?? []).forEach((t) => {
809
+ Ye(e, t).forEach((r) => {
810
+ n.add(r);
811
+ });
812
+ }), [...n];
813
+ }, "getTreeGridSelectedRowSpanRows"), $t = /* @__PURE__ */ o((e, n) => {
772
814
  if (!e)
773
815
  return;
774
- const t = ve(e);
775
- Be(e).forEach((r) => {
816
+ const t = ze(e);
817
+ V(e).forEach((r) => {
776
818
  R(r) && n.set(
777
819
  r,
778
- new Map(t.map((o) => [o, Ie(e, r, o)]))
820
+ new Map(t.map((i) => [i, $e(e, r, i)]))
779
821
  );
780
822
  });
781
- }, "captureTreeGridChangeBaselines"), Z = /* @__PURE__ */ i((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), ht = /* @__PURE__ */ i((e, n, t) => {
823
+ }, "captureTreeGridChangeBaselines"), ee = /* @__PURE__ */ o((e) => e != null && e !== "" && e !== 0 && e !== !1 && e !== "0", "isTreeGridChangedFlag"), Dt = /* @__PURE__ */ o((e, n, t) => {
782
824
  const r = n;
783
- return ve(e).some((o) => o !== t && Z(r[`${o}Changed`]));
784
- }, "hasOtherTreeGridChangedCells"), At = /* @__PURE__ */ i((e, n, t) => {
825
+ return ze(e).some((i) => i !== t && ee(r[`${i}Changed`]));
826
+ }, "hasOtherTreeGridChangedCells"), Ft = /* @__PURE__ */ o((e, n, t) => {
785
827
  const r = n;
786
- r[`${t}Changed`] = 0, !F(n) && !P(n) && !ht(e, n, t) && (r.Changed = 0);
787
- }, "clearTreeGridCellChangedState"), Rt = /* @__PURE__ */ i((e, n, t) => {
828
+ r[`${t}Changed`] = 0, !v(n) && !P(n) && !Dt(e, n, t) && (r.Changed = 0);
829
+ }, "clearTreeGridCellChangedState"), Nt = /* @__PURE__ */ o((e, n, t) => {
788
830
  const r = e.get(n);
789
831
  if (r != null && r.has(t))
790
832
  return r.get(t);
791
- }, "resolveTreeGridCellBaselineValue"), _t = /* @__PURE__ */ i(({
833
+ }, "resolveTreeGridCellBaselineValue"), vt = /* @__PURE__ */ o(({
792
834
  gridId: e,
793
835
  grid: n,
794
836
  row: t,
795
837
  col: r,
796
- backgroundColor: o,
797
- baselineMap: l,
838
+ backgroundColor: i,
839
+ baselineMap: c,
798
840
  highlightRefresh: a
799
841
  }) => {
800
- if (!R(t) || F(t) || P(t))
842
+ if (!R(t) || v(t) || P(t))
801
843
  return;
802
- const f = Rt(l, t, r), E = Ie(n, t, r);
803
- if (f !== void 0 && E === f) {
804
- Qe(e, { row: t, col: r }), At(n, t, r);
844
+ const f = Nt(c, t, r), C = $e(n, t, r);
845
+ if (f !== void 0 && C === f) {
846
+ fn(e, { row: t, col: r }), Ft(n, t, r);
805
847
  return;
806
848
  }
807
- He(e, {
849
+ an(e, {
808
850
  row: t,
809
851
  col: r,
810
- backgroundColor: o,
852
+ backgroundColor: i,
811
853
  refresh: a
812
854
  });
813
- }, "syncTreeGridChangedCellHighlight"), Lt = /* @__PURE__ */ i((e, n, t) => !n || !t || !R(n) ? !1 : e.CanEdit(n, t) === 1, "isEditableTreeGridCell"), Ve = /* @__PURE__ */ i((e, n, t) => {
855
+ }, "syncTreeGridChangedCellHighlight"), kt = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) ? !1 : e.CanEdit(n, t) === 1, "isEditableTreeGridCell"), Ze = /* @__PURE__ */ o((e, n, t) => {
814
856
  const r = e.GetAttribute(n, t, "Color");
815
857
  if (typeof r == "number")
816
- return Je(r);
858
+ return en(r);
817
859
  if (typeof r == "string")
818
860
  return r.trim() || void 0;
819
- }, "getExplicitTreeGridCellColor"), mt = /* @__PURE__ */ i((e, n, t) => Ve(e, n, t) !== void 0, "hasExplicitTreeGridCellColor"), H = /* @__PURE__ */ i((e, n, t) => {
861
+ }, "getExplicitTreeGridCellColor"), Ut = /* @__PURE__ */ o((e, n, t) => Ze(e, n, t) !== void 0, "hasExplicitTreeGridCellColor"), ie = /* @__PURE__ */ o((e, n, t) => {
820
862
  if (!n || !t || !R(n))
821
863
  return !1;
822
864
  const r = typeof e.IsFocused == "function" ? e.IsFocused(n, t) : e.FRow === n && e.FCol === t;
823
865
  return r !== 0 && r !== !1 && r !== void 0 && r !== null;
824
- }, "isTreeGridFocusedCellState"), v = /* @__PURE__ */ i((e, n, t) => {
866
+ }, "isTreeGridFocusedCellState"), M = /* @__PURE__ */ o((e, n, t) => {
825
867
  if (!n || !t || !R(n))
826
868
  return !1;
827
869
  const r = e.IsSelected(n, t);
828
- return r !== 0 && r !== !1 && r !== void 0 && r !== null;
829
- }, "isTreeGridSelectedCellState"), Xe = /* @__PURE__ */ i((e) => {
830
- if (!ae.length)
870
+ if (r !== 0 && r !== !1 && r !== void 0 && r !== null)
871
+ return !0;
872
+ const i = re(e, n);
873
+ if (!i || i === n)
874
+ return !1;
875
+ const c = e.IsSelected(i, t);
876
+ return c !== 0 && c !== !1 && c !== void 0 && c !== null;
877
+ }, "isTreeGridSelectedCellState"), qe = /* @__PURE__ */ o((e) => {
878
+ if (!he.length)
831
879
  return !1;
832
880
  const n = e.split(/\s+/).filter(Boolean);
833
- return ae.every(
881
+ return he.every(
834
882
  (t) => n.includes(t)
835
883
  );
836
- }, "hasTreeGridChangedCellDisplayClass"), xt = /* @__PURE__ */ i((e) => {
837
- if (!(!e || e.split(/\s+/).includes(fe) || !Xe(e)))
838
- return `${e} ${fe}`;
839
- }, "appendTreeGridSelectedChangedCellDisplayClass"), It = /* @__PURE__ */ i((e) => !e || !R(e) ? !1 : Object.entries(e).some(([n, t]) => n.endsWith("Class") && typeof t == "string" && Xe(t)), "hasTreeGridChangedCellDisplayClassInRow"), Ot = /* @__PURE__ */ i((e, n) => {
840
- if (!n || !It(n) || typeof e.RefreshRow != "function")
884
+ }, "hasTreeGridChangedCellDisplayClass"), Bt = /* @__PURE__ */ o((e) => {
885
+ if (!(!e || e.split(/\s+/).includes(Ge) || !qe(e)))
886
+ return `${e} ${Ge}`;
887
+ }, "appendTreeGridSelectedChangedCellDisplayClass"), Vt = /* @__PURE__ */ o((e) => !e || !R(e) ? !1 : Object.entries(e).some(([n, t]) => n.endsWith("Class") && typeof t == "string" && qe(t)), "hasTreeGridChangedCellDisplayClassInRow"), Mt = /* @__PURE__ */ o((e, n) => {
888
+ if (!n || !Vt(n) || typeof e.RefreshRow != "function")
841
889
  return;
842
890
  const t = n;
843
891
  window.setTimeout(() => {
844
892
  e.RefreshRow(t);
845
893
  }, 0);
846
- }, "scheduleTreeGridSelectionChangedClassRefresh"), Me = /* @__PURE__ */ i((e, n, t, r) => {
847
- if (!(!n || r === void 0 || !Lt(e, n, t) || F(n) || P(n) || H(e, n, t) || v(e, n, t) || mt(e, n, t)))
894
+ }, "scheduleTreeGridSelectionChangedClassRefresh"), oe = /* @__PURE__ */ o((e, n) => {
895
+ if (!n.length || typeof window > "u" || typeof e.RefreshRow != "function")
896
+ return;
897
+ const t = [...new Set(n)];
898
+ window.setTimeout(() => {
899
+ t.forEach((r) => {
900
+ e.RefreshRow(r);
901
+ });
902
+ }, 0);
903
+ }, "scheduleTreeGridRowsRefresh"), Xt = /* @__PURE__ */ o((e, n) => {
904
+ if (!n)
905
+ return;
906
+ const t = Ye(e, n);
907
+ t.length <= 1 || oe(e, t);
908
+ }, "scheduleTreeGridSelectionRowSpanRefresh"), Wt = /* @__PURE__ */ o((e) => {
909
+ const n = V(e).filter((t) => R(t) && re(e, t));
910
+ oe(e, n);
911
+ }, "scheduleTreeGridSelectionRowSpanRefreshAll"), Qe = /* @__PURE__ */ o((e, n, t, r) => {
912
+ if (!(!n || r === void 0 || !kt(e, n, t) || v(n) || P(n) || ie(e, n, t) || M(e, n, t) || Ut(e, n, t)))
848
913
  return r;
849
- }, "getEditableTreeGridCellDefaultColor"), b = /* @__PURE__ */ i((e, n, t, r) => e === r[0] && n === r[1] && t === r[2], "matchesTreeGridRgbColor"), bt = /* @__PURE__ */ i((e, n, t) => pn.some(
850
- (r) => b(e, n, t, r)
851
- ), "isTreeGridNativeErrorBackgroundColor"), Je = /* @__PURE__ */ i((e) => {
914
+ }, "getEditableTreeGridCellDefaultColor"), y = /* @__PURE__ */ o((e, n, t, r) => e === r[0] && n === r[1] && t === r[2], "matchesTreeGridRgbColor"), Jt = /* @__PURE__ */ o((e, n, t) => bn.some(
915
+ (r) => y(e, n, t, r)
916
+ ), "isTreeGridNativeErrorBackgroundColor"), en = /* @__PURE__ */ o((e) => {
852
917
  if (!(e === void 0 || !Number.isFinite(e)))
853
918
  return `#${Math.trunc(e).toString(16).padStart(6, "0")}`;
854
- }, "toTreeGridCssHexColor"), We = /* @__PURE__ */ i((e, n, t) => {
855
- if (!n || !t || !R(n))
856
- return !1;
857
- const r = e.GetAttribute(n, t, "Error");
858
- return r != null && r !== "";
859
- }, "hasTreeGridCellError"), Pt = /* @__PURE__ */ i((e, n) => {
919
+ }, "toTreeGridCssHexColor"), ne = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) ? "" : e.GetAttribute(n, t, "Error") ?? "", "getTreeGridCellError"), nn = /* @__PURE__ */ o((e, n, t) => ne(e, n, t) !== "", "hasTreeGridCellError"), Kt = /* @__PURE__ */ o((e) => {
920
+ const n = e == null ? void 0 : e.target;
921
+ if (typeof HTMLElement > "u" || typeof Element > "u" || typeof Node > "u")
922
+ return null;
923
+ const t = n instanceof Element ? n : null, r = n instanceof Node ? n.parentElement : null, i = t ?? r;
924
+ if (i) {
925
+ const c = i.closest("td,th");
926
+ return c instanceof HTMLElement ? c : i instanceof HTMLElement ? i : null;
927
+ }
928
+ return null;
929
+ }, "getTreeGridMouseEventAnchorElement"), jt = /* @__PURE__ */ o((e, n) => {
860
930
  if (!e || !n || !R(e))
861
931
  return !1;
862
932
  const t = e;
863
- return Z(t[`${n}Changed`]) || Z(t.Changed);
864
- }, "isChangedTreeGridRowOrCell"), yt = /* @__PURE__ */ i((e, n, t) => Sn.has(e.GetType(n, t)), "isTreeGridNativeInputEditType"), $t = /* @__PURE__ */ i((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 0, "isTreeGridReadonlyHoveredCellState"), Dt = /* @__PURE__ */ i((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 2, "isTreeGridPreviewHoveredCellState"), wt = /* @__PURE__ */ i(({
933
+ return ee(t[`${n}Changed`]) || ee(t.Changed);
934
+ }, "isChangedTreeGridRowOrCell"), zt = /* @__PURE__ */ o((e, n, t) => Pn.has(e.GetType(n, t)), "isTreeGridNativeInputEditType"), Ht = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 0, "isTreeGridReadonlyHoveredCellState"), Yt = /* @__PURE__ */ o((e, n, t) => !n || !t || !R(n) || e.ARow !== n || e.ACol !== t ? !1 : e.CanEdit(n, t) === 2, "isTreeGridPreviewHoveredCellState"), Zt = /* @__PURE__ */ o(({
865
935
  grid: e,
866
936
  row: n,
867
937
  col: t,
868
938
  r,
869
- g: o,
870
- b: l,
939
+ g: i,
940
+ b: c,
871
941
  focusedCellBackgroundColor: a,
872
942
  selectedCellBackgroundColor: f,
873
- hoverCellBackgroundColor: E,
943
+ hoverCellBackgroundColor: C,
874
944
  changedCellBackgroundColor: G,
875
945
  editableCellBackgroundColorValue: h
876
946
  }) => {
877
- if (H(e, n, t))
947
+ if (ie(e, n, t))
878
948
  return a;
879
- if (v(e, n, t))
949
+ if (M(e, n, t))
880
950
  return f;
881
- if ($t(e, n, t) && (b(r, o, l, fn) || b(r, o, l, Tn)) || Dt(e, n, t) && (b(r, o, l, an) || b(r, o, l, Cn) || b(r, o, l, En)))
882
- return E;
883
- if (!We(e, n, t) || !bt(r, o, l))
951
+ if (Ht(e, n, t) && (y(r, i, c, mn) || y(r, i, c, Ln)) || Yt(e, n, t) && (y(r, i, c, On) || y(r, i, c, xn) || y(r, i, c, In)))
952
+ return C;
953
+ if (!nn(e, n, t) || !Jt(r, i, c))
884
954
  return;
885
- const A = Ve(e, n, t);
886
- if (A)
887
- return A;
888
- if (F(n) || P(n))
889
- return Gn;
890
- if (Pt(n, t))
955
+ const g = Ze(e, n, t);
956
+ if (g)
957
+ return g;
958
+ if (v(n) || P(n))
959
+ return wn;
960
+ if (jt(n, t))
891
961
  return G;
892
- const L = Me(
962
+ const m = Qe(
893
963
  e,
894
964
  n,
895
965
  t,
896
966
  h
897
967
  );
898
- return Je(L) ?? gn;
899
- }, "resolveTreeGridStateBackgroundColor"), Ft = /* @__PURE__ */ i((e, n) => {
968
+ return en(m) ?? yn;
969
+ }, "resolveTreeGridStateBackgroundColor"), qt = /* @__PURE__ */ o((e, n) => {
900
970
  const t = e.split(/\s+/).filter(Boolean);
901
971
  return t.includes(n) ? e : [...t, n].join(" ");
902
- }, "appendTreeGridClassToken"), Nt = /* @__PURE__ */ i((e, n, t, r) => !We(e, n, t) || !n ? r : Ft(r, on), "appendTreeGridErrorCellDisplayClass"), kt = /* @__PURE__ */ i((e, n, t, r) => {
903
- const o = Nt(e, n, t, r);
904
- if (!v(e, n, t))
905
- return o === r ? void 0 : o;
906
- const l = xt(o) ?? o;
907
- return l === r ? void 0 : l;
908
- }, "resolveTreeGridCellDisplayClass"), Yt = /* @__PURE__ */ i((e) => {
972
+ }, "appendTreeGridClassToken"), Qt = /* @__PURE__ */ o((e, n, t, r) => !nn(e, n, t) || !n ? r : qt(r, Sn), "appendTreeGridErrorCellDisplayClass"), er = /* @__PURE__ */ o((e, n, t, r) => {
973
+ const i = Qt(e, n, t, r);
974
+ if (!M(e, n, t))
975
+ return i === r ? void 0 : i;
976
+ const c = Bt(i) ?? i;
977
+ return c === r ? void 0 : c;
978
+ }, "resolveTreeGridCellDisplayClass"), Tr = /* @__PURE__ */ o((e) => {
909
979
  if (!e)
910
980
  return !1;
911
981
  if (typeof e.GetFirst == "function" && typeof e.GetNext == "function") {
@@ -918,273 +988,300 @@ ${e.slice(
918
988
  return !1;
919
989
  }
920
990
  return Object.values(e.Rows ?? {}).some((n) => R(n));
921
- }, "hasTreeGridDisplayDataRows"), Zt = /* @__PURE__ */ i((e, n, t) => {
922
- var o;
923
- const r = (o = e.Data) == null ? void 0 : o.Data;
991
+ }, "hasTreeGridDisplayDataRows"), pr = /* @__PURE__ */ o((e, n, t) => {
992
+ var i;
993
+ L(e);
994
+ const r = (i = e.Data) == null ? void 0 : i.Data;
924
995
  e.Data.Data = {
925
996
  ...r,
926
997
  Data: { Body: [n || []] },
927
998
  Url: ""
928
999
  }, e.ReloadBody(t);
929
- }, "replaceTreeGridBodyData"), qt = /* @__PURE__ */ i(({
1000
+ }, "replaceTreeGridBodyData"), Er = /* @__PURE__ */ o(({
930
1001
  id: e,
931
1002
  latestEventHandlersRef: n,
932
1003
  layoutHasExplicitEnterModeRef: t,
933
1004
  highlightEditableCellsRef: r,
934
- highlightChangedCellsRef: o,
935
- syncDeletedRowCanEditRef: l,
1005
+ highlightChangedCellsRef: i,
1006
+ syncDeletedRowCanEditRef: c,
936
1007
  editableCellBackgroundColorValueRef: a,
937
1008
  changedCellBackgroundColorRef: f,
938
- focusedCellBackgroundColorRef: E,
1009
+ focusedCellBackgroundColorRef: C,
939
1010
  selectedCellBackgroundColorRef: G,
940
1011
  hoverCellBackgroundColorRef: h,
941
- changedCellBaselineRef: A,
942
- treeGridInstanceRef: L,
943
- treeGridInitStartedAtRef: I,
944
- latestLayoutOverridesRef: Ke,
945
- latestToolbarTotalCountFormulaRef: ee,
946
- latestSuppressCfgRef: ne,
947
- latestHideChildHeaderSortButtonsRef: B,
948
- latestDisabledAnimationsRef: te,
949
- appliedLayoutOverridesRef: je,
950
- appliedBodyDataPropRef: ze,
951
- hasAppliedInitialLayoutRef: re,
952
- syncHasDisplayDataRows: O,
953
- setIsTreeGridReady: Ye
1012
+ changedCellBaselineRef: g,
1013
+ treeGridInstanceRef: m,
1014
+ treeGridInitStartedAtRef: b,
1015
+ latestLayoutOverridesRef: tn,
1016
+ latestToolbarTotalCountFormulaRef: se,
1017
+ latestSuppressCfgRef: ce,
1018
+ latestHideChildHeaderSortButtonsRef: X,
1019
+ latestSelectionScopeRef: rn,
1020
+ latestDisabledAnimationsRef: le,
1021
+ appliedLayoutOverridesRef: on,
1022
+ appliedBodyDataPropRef: sn,
1023
+ hasAppliedInitialLayoutRef: de,
1024
+ syncHasDisplayDataRows: w,
1025
+ setIsTreeGridReady: cn,
1026
+ showErrorTooltip: ln,
1027
+ hideErrorTooltip: I
954
1028
  }) => {
955
- const g = n.current;
956
- if (window.TGSetEvent("OnRowAdd", e, (s, c) => {
1029
+ const A = n.current;
1030
+ if (window.TGSetEvent("OnRowAdd", e, (s, l) => {
957
1031
  var d, u;
958
- c.CanEdit = 1, c.CanDelete = 1, (u = (d = n.current) == null ? void 0 : d.onRowAdd) == null || u.call(d, s, c);
1032
+ L(s), l.CanEdit = 1, l.CanDelete = 1, (u = (d = n.current) == null ? void 0 : d.onRowAdd) == null || u.call(d, s, l);
959
1033
  }), window.TGSetEvent("OnRowAdded", e, (s) => {
960
- O(s);
1034
+ L(s), w(s);
961
1035
  }), window.TGSetEvent("OnRowRemove", e, (s) => {
962
- O(s);
963
- }), window.TGSetEvent("OnCanRowDelete", e, (s, c, d) => {
964
- var C;
1036
+ L(s), I(), w(s);
1037
+ }), window.TGSetEvent("OnMouseOver", e, (s, l, d, u, T, p) => {
1038
+ const E = ne(s, l, d);
1039
+ if (!E) {
1040
+ I();
1041
+ return;
1042
+ }
1043
+ const _ = Kt(p);
1044
+ if (!_) {
1045
+ I();
1046
+ return;
1047
+ }
1048
+ s.HideTip(), ln({ anchorEl: _, row: l, col: d, message: E });
1049
+ }), window.TGSetEvent("OnTip", e, (s, l, d, u) => ne(s, l, d) ? "" : u), window.TGSetEvent("OnCanRowDelete", e, (s, l, d) => {
1050
+ var p;
965
1051
  if (d !== 3)
966
1052
  return d;
967
- const u = (C = n.current) == null ? void 0 : C.onBeforeRowUndelete;
1053
+ const u = (p = n.current) == null ? void 0 : p.onBeforeRowUndelete;
968
1054
  if (typeof u != "function")
969
1055
  return d;
970
- const T = /* @__PURE__ */ i((p) => {
1056
+ const T = /* @__PURE__ */ o((E) => {
971
1057
  window.setTimeout(() => {
972
- at(
973
- L.current ?? s,
974
- c,
975
- p,
976
- O
1058
+ Lt(
1059
+ m.current ?? s,
1060
+ l,
1061
+ E,
1062
+ w
977
1063
  );
978
1064
  }, 0);
979
1065
  }, "scheduleAction");
980
1066
  try {
981
- const p = u(s, c);
982
- return Tt(p) ? (p.then(T).catch(() => {
1067
+ const E = u(s, l);
1068
+ return mt(E) ? (E.then(T).catch(() => {
983
1069
  T("undelete");
984
- }), 0) : (T(p), 0);
1070
+ }), 0) : (T(E), 0);
985
1071
  } catch {
986
1072
  return T("undelete"), 0;
987
1073
  }
988
- }), typeof (g == null ? void 0 : g.onRowClick) == "function" || typeof (g == null ? void 0 : g.onInternalCellClick) == "function") {
989
- const s = V((c, d, u, T, C, p) => {
990
- var _, m;
991
- (m = (_ = n.current) == null ? void 0 : _.onRowClick) == null || m.call(
1074
+ }), typeof (A == null ? void 0 : A.onRowClick) == "function" || typeof (A == null ? void 0 : A.onInternalCellClick) == "function") {
1075
+ const s = W((l, d, u, T, p, E) => {
1076
+ var _, O;
1077
+ (O = (_ = n.current) == null ? void 0 : _.onRowClick) == null || O.call(
992
1078
  _,
993
- c,
1079
+ l,
994
1080
  d,
995
1081
  u,
996
1082
  T,
997
- C,
998
- p
1083
+ p,
1084
+ E
999
1085
  );
1000
1086
  }, 300);
1001
- window.TGSetEvent("OnClick", e, (c, d, u, T, C, p) => {
1002
- var m, oe, se;
1003
- const _ = (oe = (m = n.current) == null ? void 0 : m.onInternalCellClick) == null ? void 0 : oe.call(
1004
- m,
1005
- c,
1087
+ window.TGSetEvent("OnClick", e, (l, d, u, T, p, E) => {
1088
+ var O, fe, ae;
1089
+ const _ = (fe = (O = n.current) == null ? void 0 : O.onInternalCellClick) == null ? void 0 : fe.call(
1090
+ O,
1091
+ l,
1006
1092
  d,
1007
1093
  u,
1008
1094
  T,
1009
- C,
1010
- p
1095
+ p,
1096
+ E
1011
1097
  );
1012
1098
  if (_ !== void 0)
1013
1099
  return _;
1014
- typeof ((se = n.current) == null ? void 0 : se.onRowClick) == "function" && s(c, d, u, T, C, p);
1100
+ typeof ((ae = n.current) == null ? void 0 : ae.onRowClick) == "function" && s(l, d, u, T, p, E);
1015
1101
  });
1016
1102
  }
1017
- (typeof (g == null ? void 0 : g.onClickButton) == "function" || typeof (g == null ? void 0 : g.onInternalButtonClick) == "function") && window.TGSetEvent(
1103
+ (typeof (A == null ? void 0 : A.onClickButton) == "function" || typeof (A == null ? void 0 : A.onInternalButtonClick) == "function") && window.TGSetEvent(
1018
1104
  "OnClickButton",
1019
1105
  e,
1020
- (s, c, d, u) => {
1021
- var C, p, _, m;
1022
- const T = (p = (C = n.current) == null ? void 0 : C.onInternalButtonClick) == null ? void 0 : p.call(
1023
- C,
1106
+ (s, l, d, u) => {
1107
+ var p, E, _, O;
1108
+ const T = (E = (p = n.current) == null ? void 0 : p.onInternalButtonClick) == null ? void 0 : E.call(
1109
+ p,
1024
1110
  s,
1025
- c,
1111
+ l,
1026
1112
  d,
1027
1113
  u
1028
1114
  );
1029
1115
  if (T !== void 0)
1030
1116
  return T;
1031
- (m = (_ = n.current) == null ? void 0 : _.onClickButton) == null || m.call(
1117
+ (O = (_ = n.current) == null ? void 0 : _.onClickButton) == null || O.call(
1032
1118
  _,
1033
1119
  s,
1034
- c,
1120
+ l,
1035
1121
  d,
1036
1122
  u
1037
1123
  );
1038
1124
  }
1039
- ), typeof (g == null ? void 0 : g.onInternalKeyDown) == "function" && (window.TGSetEvent(
1125
+ ), typeof (A == null ? void 0 : A.onInternalKeyDown) == "function" && (window.TGSetEvent(
1040
1126
  "OnKeyDown",
1041
1127
  e,
1042
- (s, c, d, u, T) => {
1043
- var C, p;
1044
- return (p = (C = n.current) == null ? void 0 : C.onInternalKeyDown) == null ? void 0 : p.call(C, s, c, d, u, T);
1128
+ (s, l, d, u, T) => {
1129
+ var p, E;
1130
+ return (E = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : E.call(p, s, l, d, u, T);
1045
1131
  }
1046
1132
  ), window.TGSetEvent(
1047
1133
  "OnKeyPress",
1048
1134
  e,
1049
- (s, c, d, u, T) => {
1050
- var C, p;
1051
- return (p = (C = n.current) == null ? void 0 : C.onInternalKeyDown) == null ? void 0 : p.call(C, s, c, d, u, T);
1052
- }
1053
- )), typeof (g == null ? void 0 : g.onInternalStartEdit) == "function" && window.TGSetEvent(
1054
- "OnStartEdit",
1055
- e,
1056
- (s, c, d) => {
1057
- var u, T;
1058
- return (T = (u = n.current) == null ? void 0 : u.onInternalStartEdit) == null ? void 0 : T.call(
1059
- u,
1060
- s,
1061
- c,
1062
- d
1063
- );
1135
+ (s, l, d, u, T) => {
1136
+ var p, E;
1137
+ return (E = (p = n.current) == null ? void 0 : p.onInternalKeyDown) == null ? void 0 : E.call(p, s, l, d, u, T);
1064
1138
  }
1065
- ), window.TGSetEvent("OnRowDelete", e, (s, c, d) => {
1066
- var T, C;
1067
- const u = P(c) ? ce(c) : [];
1068
- Ae(s, c, {
1069
- canEdit: l.current !== !1 ? 2 : void 0,
1139
+ )), window.TGSetEvent("OnStartEdit", e, (s, l, d) => {
1140
+ var u, T;
1141
+ return I(), (T = (u = n.current) == null ? void 0 : u.onInternalStartEdit) == null ? void 0 : T.call(
1142
+ u,
1143
+ s,
1144
+ l,
1145
+ d
1146
+ );
1147
+ }), window.TGSetEvent("OnRowDelete", e, (s, l, d) => {
1148
+ var T, p;
1149
+ L(s), I();
1150
+ const u = P(l) ? Te(l) : [];
1151
+ xe(s, l, {
1152
+ canEdit: c.current !== !1 ? 2 : void 0,
1070
1153
  highlightColumns: u
1071
- }), O(s), (C = (T = n.current) == null ? void 0 : T.onRowDelete) == null || C.call(
1154
+ }), w(s), (p = (T = n.current) == null ? void 0 : T.onRowDelete) == null || p.call(
1072
1155
  T,
1073
1156
  s,
1074
- c,
1157
+ l,
1075
1158
  d
1076
1159
  );
1077
- }), window.TGSetEvent("OnRowUndelete", e, (s, c) => {
1160
+ }), window.TGSetEvent("OnRowUndelete", e, (s, l) => {
1078
1161
  var u, T;
1079
- const d = P(c) ? ce(c) : [];
1080
- Ae(s, c, {
1081
- canEdit: l.current !== !1 ? 1 : void 0,
1162
+ L(s), I();
1163
+ const d = P(l) ? Te(l) : [];
1164
+ xe(s, l, {
1165
+ canEdit: c.current !== !1 ? 1 : void 0,
1082
1166
  highlightColumns: d,
1083
1167
  highlightBackgroundColor: d.length ? f.current : void 0
1084
- }), O(s), (T = (u = n.current) == null ? void 0 : u.onRowUndelete) == null || T.call(u, s, c);
1085
- }), window.TGSetEvent("OnGetDefaultColor", e, (s, c, d) => {
1086
- if (!(!r.current || !R(c)))
1087
- return Me(
1168
+ }), w(s), (T = (u = n.current) == null ? void 0 : u.onRowUndelete) == null || T.call(u, s, l);
1169
+ }), window.TGSetEvent("OnGetDefaultColor", e, (s, l, d) => {
1170
+ if (!(!r.current || !R(l)))
1171
+ return Qe(
1088
1172
  s,
1089
- c,
1173
+ l,
1090
1174
  d,
1091
1175
  a.current
1092
1176
  );
1093
- }), window.TGSetEvent("OnGetColor", e, (s, c, d, u, T, C, p) => {
1094
- if (!p)
1095
- return wt({
1177
+ }), window.TGSetEvent("OnGetColor", e, (s, l, d, u, T, p, E) => {
1178
+ if (!E)
1179
+ return Zt({
1096
1180
  grid: s,
1097
- row: c,
1181
+ row: l,
1098
1182
  col: d,
1099
1183
  r: u,
1100
1184
  g: T,
1101
- b: C,
1102
- focusedCellBackgroundColor: E.current,
1185
+ b: p,
1186
+ focusedCellBackgroundColor: C.current,
1103
1187
  selectedCellBackgroundColor: G.current,
1104
1188
  hoverCellBackgroundColor: h.current,
1105
1189
  changedCellBackgroundColor: f.current,
1106
1190
  editableCellBackgroundColorValue: a.current
1107
1191
  });
1108
- }), window.TGSetEvent("OnGetClass", e, (s, c, d, u) => kt(s, c, d, typeof u == "string" ? u : "")), window.TGSetEvent("OnAfterValueChanged", e, (s, c, d, u) => {
1109
- var C, p;
1110
- if (o.current && R(c)) {
1111
- const _ = !yt(s, c, d) || v(s, c, d) && !H(s, c, d);
1112
- _t({
1192
+ }), window.TGSetEvent("OnGetClass", e, (s, l, d, u) => er(s, l, d, typeof u == "string" ? u : "")), window.TGSetEvent("OnAfterValueChanged", e, (s, l, d, u) => {
1193
+ var p, E;
1194
+ if (I(), i.current && R(l)) {
1195
+ const _ = !zt(s, l, d) || M(s, l, d) && !ie(s, l, d);
1196
+ vt({
1113
1197
  gridId: e,
1114
1198
  grid: s,
1115
- row: c,
1199
+ row: l,
1116
1200
  col: d,
1117
1201
  backgroundColor: f.current,
1118
- baselineMap: A.current,
1202
+ baselineMap: g.current,
1119
1203
  highlightRefresh: _
1120
1204
  });
1121
1205
  }
1122
- const T = ((C = n.current) == null ? void 0 : C.onAfterValueChanged) ?? ((p = n.current) == null ? void 0 : p.onRowChange);
1123
- T == null || T(s, c, d, u);
1206
+ const T = ((p = n.current) == null ? void 0 : p.onAfterValueChanged) ?? ((E = n.current) == null ? void 0 : E.onRowChange);
1207
+ T == null || T(s, l, d, u);
1124
1208
  });
1125
- const ie = V((s) => {
1126
- var d, u;
1127
- const c = s.GetSelRows() ?? [];
1128
- (u = (d = n.current) == null ? void 0 : d.onSelect) == null || u.call(
1129
- d,
1130
- en(s, c)
1209
+ const ue = W((s) => {
1210
+ var u, T;
1211
+ const l = s.GetSelRows() ?? [], d = En(s, l, {
1212
+ selectionScope: rn.current
1213
+ });
1214
+ (T = (u = n.current) == null ? void 0 : u.onSelect) == null || T.call(
1215
+ u,
1216
+ Tn(s, d)
1131
1217
  );
1132
1218
  }, 100);
1133
- window.TGSetEvent("OnSelect", e, (s, c, d, u, T) => {
1134
- var C;
1135
- T || (Ot(s, c), Se(s, e), typeof ((C = n.current) == null ? void 0 : C.onSelect) == "function" && ie(s));
1136
- }), window.TGSetEvent("OnSelectAll", e, (s, c, d, u) => {
1219
+ window.TGSetEvent("OnSelect", e, (s, l, d, u, T) => {
1220
+ var E;
1221
+ if (T)
1222
+ return;
1223
+ const p = Pt(s);
1224
+ Mt(s, l), oe(s, p), Xt(s, l), Le(s, e), typeof ((E = n.current) == null ? void 0 : E.onSelect) == "function" && ue(s);
1225
+ }), window.TGSetEvent("OnSelectAll", e, (s, l, d, u) => {
1137
1226
  var T;
1138
- u || (Se(s, e), typeof ((T = n.current) == null ? void 0 : T.onSelect) == "function" && ie(s));
1139
- }), typeof (g == null ? void 0 : g.onSave) == "function" && window.TGSetEvent("OnSave", e, (s, c, d) => {
1227
+ u || (Wt(s), Le(s, e), typeof ((T = n.current) == null ? void 0 : T.onSelect) == "function" && ue(s));
1228
+ }), typeof (A == null ? void 0 : A.onSave) == "function" && window.TGSetEvent("OnSave", e, (s, l, d) => {
1140
1229
  var u, T;
1141
1230
  (T = (u = n.current) == null ? void 0 : u.onSave) == null || T.call(
1142
1231
  u,
1143
1232
  s,
1144
- c,
1233
+ l,
1145
1234
  d
1146
1235
  );
1147
- }), window.TGSetEvent("OnSort", e, (s, c) => {
1236
+ }), window.TGSetEvent("OnSort", e, (s, l) => {
1148
1237
  var d;
1149
- if (!(!c || !pt(
1238
+ if (!(!l || !It(
1150
1239
  s,
1151
1240
  s.ARow,
1152
- c,
1153
- B.current !== !1
1241
+ l,
1242
+ X.current !== !1
1154
1243
  )))
1155
- return Oe(e, "group header sort blocked"), sn(e, "group header sort blocked", {
1244
+ return De(e, "group header sort blocked"), hn(e, "group header sort blocked", {
1156
1245
  rowId: (d = s.ARow) == null ? void 0 : d.id,
1157
- col: c
1246
+ col: l
1158
1247
  }), -1;
1248
+ }), window.TGSetEvent("OnSortFinish", e, (s) => {
1249
+ L(s);
1250
+ }), window.TGSetEvent("OnFilterFinish", e, (s) => {
1251
+ L(s);
1252
+ }), window.TGSetEvent("OnGroupFinish", e, (s) => {
1253
+ L(s);
1254
+ }), window.TGSetEvent("OnSearchFinish", e, (s) => {
1255
+ L(s);
1159
1256
  }), window.TGSetEvent("OnRenderStart", e, (s) => {
1160
- j(s, e), me(
1257
+ L(s), Y(s, e), ye(
1161
1258
  s,
1162
1259
  e,
1163
1260
  !1,
1164
- B.current !== !1
1261
+ X.current !== !1
1165
1262
  );
1166
1263
  }), window.TGSetEvent("OnRenderFinish", e, (s) => {
1167
- j(s, e);
1168
- }), window.TGSetEvent("OnDataGet", e, (s, c, d) => {
1169
- if ((c == null ? void 0 : c.Name) === "Layout" && typeof d == "string") {
1170
- t.current = Ce(d);
1171
- const u = K(
1264
+ Y(s, e);
1265
+ }), window.TGSetEvent("OnDataGet", e, (s, l, d) => {
1266
+ if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
1267
+ t.current = ge(d);
1268
+ const u = H(
1172
1269
  d,
1173
- te.current,
1174
- ee.current,
1175
- ne.current
1270
+ le.current,
1271
+ se.current,
1272
+ ce.current
1176
1273
  );
1177
1274
  return u === d ? null : u;
1178
1275
  }
1179
1276
  return null;
1180
- }), window.TGSetEvent("OnDataParse", e, (s, c, d) => {
1181
- if ((c == null ? void 0 : c.Name) === "Layout" && typeof d == "string") {
1182
- t.current = Ce(d);
1183
- const u = K(
1277
+ }), window.TGSetEvent("OnDataParse", e, (s, l, d) => {
1278
+ if ((l == null ? void 0 : l.Name) === "Layout" && typeof d == "string") {
1279
+ t.current = ge(d);
1280
+ const u = H(
1184
1281
  d,
1185
- te.current,
1186
- ee.current,
1187
- ne.current
1282
+ le.current,
1283
+ se.current,
1284
+ ce.current
1188
1285
  );
1189
1286
  return u === d ? null : u;
1190
1287
  }
@@ -1192,33 +1289,33 @@ ${e.slice(
1192
1289
  }), window.TGSetEvent(
1193
1290
  "OnReady",
1194
1291
  e,
1195
- V((s) => {
1196
- var c, d;
1197
- if (!re.current) {
1198
- const u = Ke.current;
1199
- re.current = !0, !t.current && (s.EnterMode === void 0 || s.EnterMode === null || s.EnterMode === 0) && dt(s, dn), nn(s, u), L.current = s, je.current = u, ze.current = Re(s), A.current = /* @__PURE__ */ new WeakMap(), St(s, A.current), O(s), Ye(!0), me(
1292
+ W((s) => {
1293
+ var l, d;
1294
+ if (!de.current) {
1295
+ const u = tn.current;
1296
+ de.current = !0, !t.current && (s.EnterMode === void 0 || s.EnterMode === null || s.EnterMode === 0) && Rt(s, An), pn(s, u), m.current = s, on.current = u, sn.current = Ie(s), g.current = /* @__PURE__ */ new WeakMap(), $t(s, g.current), w(s), cn(!0), ye(
1200
1297
  s,
1201
1298
  e,
1202
1299
  !0,
1203
- B.current !== !1
1204
- ), be(e, "TreeGrid init ready", I.current, {
1205
- bodyRowCount: Gt(
1206
- Re(s)
1300
+ X.current !== !1
1301
+ ), Fe(e, "TreeGrid init ready", b.current, {
1302
+ bodyRowCount: bt(
1303
+ Ie(s)
1207
1304
  )
1208
- }), I.current = null, (d = (c = n.current) == null ? void 0 : c.onReady) == null || d.call(c, s);
1305
+ }), b.current = null, (d = (l = n.current) == null ? void 0 : l.onReady) == null || d.call(l, s);
1209
1306
  }
1210
1307
  }, 100)
1211
1308
  );
1212
1309
  }, "bindTreeGridEvents");
1213
1310
  export {
1214
- jt as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
1215
- qt as bindTreeGridEvents,
1216
- zt as buildTreeGridInitializationOptions,
1217
- St as captureTreeGridChangeBaselines,
1218
- Gt as getTreeGridBodyDataCount,
1219
- Yt as hasTreeGridDisplayDataRows,
1220
- Ce as hasTreeGridExplicitEnterMode,
1221
- Zt as replaceTreeGridBodyData,
1222
- _t as syncTreeGridChangedCellHighlight
1311
+ fr as TREE_GRID_BINDING_LOADING_MIN_VISIBLE_MS,
1312
+ Er as bindTreeGridEvents,
1313
+ ar as buildTreeGridInitializationOptions,
1314
+ $t as captureTreeGridChangeBaselines,
1315
+ bt as getTreeGridBodyDataCount,
1316
+ Tr as hasTreeGridDisplayDataRows,
1317
+ ge as hasTreeGridExplicitEnterMode,
1318
+ pr as replaceTreeGridBodyData,
1319
+ vt as syncTreeGridChangedCellHighlight
1223
1320
  };
1224
1321
  //# sourceMappingURL=treeGridRuntime.js.map