ia-table 0.15.7 → 0.15.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ia-table-menu-container{position:relative}@keyframes menuTravelFromTop{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes menuTravelToTop{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes menuTravelFromBottom{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes menuTravelToBottom{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(20px)}}@keyframes menuTravelFromLeft{0%{opacity:0;transform:translate(-20px)}to{opacity:1;transform:translate(0)}}@keyframes menuTravelToLeft{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-20px)}}@keyframes menuTravelFromRight{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}@keyframes menuTravelToRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(20px)}}@keyframes menuFadeIn{0%{opacity:0}to{opacity:1}}@keyframes menuFadeOut{0%{opacity:1}to{opacity:0}}.ia-table-menu-submenu{background-color:#fff;box-shadow:0 0 4px #0000001f;z-index:9999;margin-top:6px;border-radius:12px;padding:8px 6px;will-change:transform,opacity}.ia-table-menu-submenu.ia-table-submenu-only{margin-top:-5px}.ia-table-menu-submenu.menu-entered{opacity:1;transform:scale(1)}.ia-table-menu-submenu.ia-table-position-bottom.flip-center.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.flip-left.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.flip-right.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-bottom.menu-exiting{animation:menuTravelToBottom .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-top.flip-center.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.flip-left.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.flip-right.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-top.menu-exiting{animation:menuTravelToTop .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-left.flip-center.menu-entering{animation:menuTravelFromLeft .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.flip-top.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.flip-bottom.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-left.menu-exiting{animation:menuTravelToLeft .2s ease-in forwards}.ia-table-menu-submenu.ia-table-position-right.flip-center.menu-entering{animation:menuTravelFromRight .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.flip-top.menu-entering{animation:menuTravelFromTop .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.flip-bottom.menu-entering{animation:menuTravelFromBottom .3s ease-out forwards}.ia-table-menu-submenu.ia-table-position-right.menu-exiting{animation:menuTravelToRight .2s ease-in forwards}.ia-table-menu-submenu .ia-table-menu-option{padding:7.5px 12px;font-family:Manrope,sans-serif;font-size:14px;color:#0d152c;line-height:20px;position:relative}.ia-table-menu-submenu .ia-table-menu-option:hover{background-color:#eceefd}.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected{background-color:#eceefd;color:#0d152c}.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected .ia-table-menu-option-svg path,.ia-table-menu-submenu .ia-table-menu-option.ia-table-menu-option-selected .ia-table-menu-option-svg rect{fill:#4259ee}.ia-table-menu-submenu .ia-table-menu-option.submenu-active{background-color:#eceefd}.ia-table-menu-submenu .ia-table-menu-option.submenu-active .ia-table-menu-option-svg path,.ia-table-menu-submenu .ia-table-menu-option.submenu-active .ia-table-menu-option-svg rect{fill:#4259ee}.ia-table-menu-submenu .ia-table-menu-option .submenu-indicator{color:#6e7781}.ia-table-menu-submenu .ia-table-menu-option .submenu-indicator svg{width:6px;height:10px}.ia-table-menu-submenu button{background-color:inherit;height:35px;border:none;border-radius:8px;padding:7.5px 12px;font-family:Manrope,sans-serif;font-size:14px;color:#0d152c;line-height:20px;position:relative}.ia-table-menu-submenu button:hover{background-color:#eceefd}.ia-table-prompt-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:10000;animation:ia-table-prompt-fade-in .2s ease-out}.ia-table-prompt-overlay .ia-table-prompt{width:400px;height:224px;background-color:#fff;box-shadow:0 0 4px #0000001f;border-radius:8px;max-height:90vh;animation:ia-table-prompt-slide-in .2s ease-out;max-width:95vw;overflow:hidden}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-header{height:28px;padding:8px 16px 0}.ia-table-prompt-overlay .ia-table-prompt .ia-table-promt-cross-icon{height:20px;width:20px}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content{padding:0 60px;flex:1;overflow-y:auto}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content-icon{height:48px;width:48px}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content .ia-table-prompt-title{margin-top:8px;font-family:Manrope,sans-serif;font-weight:800;font-size:16px;line-height:24px;color:#0d152c}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-content .ia-table-prompt-message{margin-top:4px;font-family:Manrope,sans-serif;font-weight:500;font-size:12px;line-height:16px;color:#60697d;text-align:center}.ia-table-prompt-overlay .ia-table-prompt .ia-table-prompt-footer{padding:16px;flex-shrink:0;margin-top:auto}@keyframes ia-table-prompt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ia-table-prompt-slide-in{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@media(max-width:768px){.ia-table-prompt-overlay .ia-table-prompt{width:95vw}}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
2
  import * as J from "react";
3
- import Mn, { createContext as Tn, useContext as An, useMemo as Rn, useEffect as pe, useRef as Pe, useState as Ge, useCallback as Ie, useLayoutEffect as Fn, forwardRef as mn, useImperativeHandle as bn, memo as Hn } from "react";
3
+ import Mn, { createContext as Rn, useContext as An, useMemo as Tn, useEffect as pe, useRef as Pe, useState as Ge, useCallback as Ie, useLayoutEffect as Fn, forwardRef as mn, useImperativeHandle as bn, memo as Hn } from "react";
4
4
  import { jsx as de, jsxs as Le } from "react/jsx-runtime";
5
- import { createPortal as On } from "react-dom";
6
- import { g as M, U as zn, f as Ve, L as De, s as kn, p as Ke, h as Un, m as sn, S as Wn, B as dn } from "./RadioGroup-D3RQET6P.js";
5
+ import { createPortal as Sn } from "react-dom";
6
+ import { g as F, U as zn, f as Ve, L as De, s as kn, p as Ke, h as Un, m as sn, S as Wn, B as dn } from "./RadioGroup-D3RQET6P.js";
7
7
  import { create as Yn } from "zustand";
8
- const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ J.createElement("path", { d: "M8 11L4.25 7.25L5.3 6.1625L7.25 8.1125V2H8.75V8.1125L10.7 6.1625L11.75 7.25L8 11ZM3.5 14C3.0875 14 2.73438 13.8531 2.44063 13.5594C2.14687 13.2656 2 12.9125 2 12.5V10.25H3.5V12.5H12.5V10.25H14V12.5C14 12.9125 13.8531 13.2656 13.5594 13.5594C13.2656 13.8531 12.9125 14 12.5 14H3.5Z", fill: "#60697D" })), _n = (e, n) => (t, r, A) => (A.dispatch = (i) => (t((o) => e(o, i), !1, i), i), A.dispatchFromDevtools = !0, { dispatch: (...i) => A.dispatch(...i), ...n }), jn = _n, W = "_IATableOrdered", Me = (e = 100) => `${(/* @__PURE__ */ new Date()).getTime()}_${e}`, Sn = (e, n = { path: [] }) => {
9
- var f, c, u, g, C, L, a, p;
10
- const t = Me(), r = M(e), A = e._originalField || ((c = (f = r == null ? void 0 : r.split) == null ? void 0 : f.call(r, W)) == null ? void 0 : c[0]), i = ((C = (g = (u = e.column_name) == null ? void 0 : u.split) == null ? void 0 : g.call(u, W)) == null ? void 0 : C[0]) || e.column_name, o = ((p = (a = (L = e.accessor) == null ? void 0 : L.split) == null ? void 0 : a.call(L, W)) == null ? void 0 : p[0]) || e.accessor, d = r.split(W)[0];
8
+ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ J.createElement("path", { d: "M8 11L4.25 7.25L5.3 6.1625L7.25 8.1125V2H8.75V8.1125L10.7 6.1625L11.75 7.25L8 11ZM3.5 14C3.0875 14 2.73438 13.8531 2.44063 13.5594C2.14687 13.2656 2 12.9125 2 12.5V10.25H3.5V12.5H12.5V10.25H14V12.5C14 12.9125 13.8531 13.2656 13.5594 13.5594C13.2656 13.8531 12.9125 14 12.5 14H3.5Z", fill: "#60697D" })), _n = (e, n) => (t, r, A) => (A.dispatch = (i) => (t((o) => e(o, i), !1, i), i), A.dispatchFromDevtools = !0, { dispatch: (...i) => A.dispatch(...i), ...n }), jn = _n, W = "_IATableOrdered", Me = (e = 100) => `${(/* @__PURE__ */ new Date()).getTime()}_${e}`, On = (e, n = { path: [] }) => {
9
+ var f, c, E, g, u, P, a, p;
10
+ const t = Me(), r = F(e), A = e._originalField || ((c = (f = r == null ? void 0 : r.split) == null ? void 0 : f.call(r, W)) == null ? void 0 : c[0]), i = ((u = (g = (E = e.column_name) == null ? void 0 : E.split) == null ? void 0 : g.call(E, W)) == null ? void 0 : u[0]) || e.column_name, o = ((p = (a = (P = e.accessor) == null ? void 0 : P.split) == null ? void 0 : a.call(P, W)) == null ? void 0 : p[0]) || e.accessor, d = r.split(W)[0];
11
11
  return {
12
12
  accessor: `${o}${W}${t}`,
13
13
  field: `${A}${W}${t}`,
@@ -18,31 +18,31 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
18
18
  `${r}${W}${t}`
19
19
  ],
20
20
  originalId: d,
21
- originalPath: e.path ? [...e.path.map((R) => R.split(W)[0])] : [d],
21
+ originalPath: e.path ? [...e.path.map((T) => T.split(W)[0])] : [d],
22
22
  isReorderedColumn: !0
23
23
  };
24
24
  }, Kn = (e) => {
25
- var r, A, i, o, d, f, c, u, g, C, L, a, p, R, P, O, U, N;
25
+ var r, A, i, o, d, f, c, E, g, u, P, a, p, T, D, S, U, N;
26
26
  const n = { ...e };
27
27
  delete n.originalParentId, delete n.isReorderedColumn, delete n.originalId, delete n.uniqueSplitId, delete n.isSplitHierarchy, delete n.uniqueHierarchyId, delete n.originalPath;
28
- const t = M(e);
28
+ const t = F(e);
29
29
  return {
30
30
  ...n,
31
31
  // Get the original field name before any ORDERED_SUFFIX
32
32
  accessor: ((i = (A = (r = e.accessor) == null ? void 0 : r.split) == null ? void 0 : A.call(r, W)) == null ? void 0 : i[0]) || e.accessor,
33
33
  field: e._originalField || ((d = (o = t == null ? void 0 : t.split) == null ? void 0 : o.call(t, W)) == null ? void 0 : d[0]),
34
- column_name: ((u = (c = (f = e.column_name) == null ? void 0 : f.split) == null ? void 0 : c.call(f, W)) == null ? void 0 : u[0]) || e.column_name,
35
- _originalField: e._originalField || ((C = (g = t == null ? void 0 : t.split) == null ? void 0 : g.call(t, W)) == null ? void 0 : C[0]),
36
- path: e.originalPath ? (L = e.originalPath) == null ? void 0 : L.map((Q) => Q.split(W)[0]) : e.path,
37
- id: ((R = (p = (a = e.id) == null ? void 0 : a.split) == null ? void 0 : p.call(a, W)) == null ? void 0 : R[0]) || e.id,
34
+ column_name: ((E = (c = (f = e.column_name) == null ? void 0 : f.split) == null ? void 0 : c.call(f, W)) == null ? void 0 : E[0]) || e.column_name,
35
+ _originalField: e._originalField || ((u = (g = t == null ? void 0 : t.split) == null ? void 0 : g.call(t, W)) == null ? void 0 : u[0]),
36
+ path: e.originalPath ? (P = e.originalPath) == null ? void 0 : P.map((y) => y.split(W)[0]) : e.path,
37
+ id: ((T = (p = (a = e.id) == null ? void 0 : a.split) == null ? void 0 : p.call(a, W)) == null ? void 0 : T[0]) || e.id,
38
38
  originalPath: null,
39
- parent_id: (P = e.parent_id) == null ? void 0 : P.map(
40
- (Q) => {
39
+ parent_id: (D = e.parent_id) == null ? void 0 : D.map(
40
+ (y) => {
41
41
  var _, v;
42
- return typeof Q == "string" ? (v = (_ = Q == null ? void 0 : Q.split) == null ? void 0 : _.call(Q, W)) == null ? void 0 : v[0] : Q;
42
+ return typeof y == "string" ? (v = (_ = y == null ? void 0 : y.split) == null ? void 0 : _.call(y, W)) == null ? void 0 : v[0] : y;
43
43
  }
44
44
  ),
45
- parentField: (N = (U = (O = e.parentField) == null ? void 0 : O.split) == null ? void 0 : U.call(O, W)) == null ? void 0 : N[0]
45
+ parentField: (N = (U = (S = e.parentField) == null ? void 0 : S.split) == null ? void 0 : U.call(S, W)) == null ? void 0 : N[0]
46
46
  };
47
47
  }, on = (e) => {
48
48
  var r, A, i, o;
@@ -51,14 +51,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
51
51
  const n = [...e];
52
52
  let t = 0;
53
53
  for (; t < n.length - 1; ) {
54
- const d = n[t], f = n[t + 1], c = d.originalPath || d.path, u = f.originalPath || f.path;
55
- if (!c || !u) {
54
+ const d = n[t], f = n[t + 1], c = d.originalPath || d.path, E = f.originalPath || f.path;
55
+ if (!c || !E) {
56
56
  t++;
57
57
  continue;
58
58
  }
59
59
  const g = Xn(d, f);
60
- if (g.length > 0 && g.length === c.length && g.length === u.length) {
61
- const L = d.isReorderedColumn && f.isReorderedColumn, a = Me(t), p = g[g.length - 1].split(W)[0], R = L ? {
60
+ if (g.length > 0 && g.length === c.length && g.length === E.length) {
61
+ const P = d.isReorderedColumn && f.isReorderedColumn, a = Me(t), p = g[g.length - 1].split(W)[0], T = P ? {
62
62
  ...d,
63
63
  accessor: `${((i = (A = (r = d.accessor) == null ? void 0 : r.split) == null ? void 0 : A.call(r, W)) == null ? void 0 : i[0]) || d.accessor}${W}${a}`,
64
64
  field: `${p}${W}${a}`,
@@ -72,43 +72,43 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
72
72
  } : {
73
73
  ...Kn(d),
74
74
  children: []
75
- }, P = (U, N, Q) => {
76
- const _ = [...Q, M(U)], v = {
75
+ }, D = (U, N, y) => {
76
+ const _ = [...y, F(U)], v = {
77
77
  ...U,
78
- originalPath: _.map((K) => K.split(W)[0]),
78
+ originalPath: _.map((X) => X.split(W)[0]),
79
79
  path: _
80
80
  };
81
81
  return v.children && v.children.length > 0 && (v.children = v.children.map(
82
- (K) => P(
83
- K,
82
+ (X) => D(
83
+ X,
84
84
  N,
85
85
  v.path
86
86
  )
87
87
  )), v.path = _, v;
88
- }, O = [];
88
+ }, S = [];
89
89
  if (d.children && d.children.length > 0) {
90
- const U = M(R);
90
+ const U = F(T);
91
91
  d.children.forEach((N) => {
92
- const Q = P(
92
+ const y = D(
93
93
  N,
94
94
  d.path || [],
95
- R.path || []
95
+ T.path || []
96
96
  );
97
- Q.parent_id = [U], Q.parentField = U, O.push(Q);
97
+ y.parent_id = [U], y.parentField = U, S.push(y);
98
98
  });
99
99
  }
100
100
  if (f.children && f.children.length > 0) {
101
- const U = M(R);
101
+ const U = F(T);
102
102
  f.children.forEach((N) => {
103
- const Q = P(
103
+ const y = D(
104
104
  N,
105
105
  f.path || [],
106
- R.path || []
106
+ T.path || []
107
107
  );
108
- Q.parent_id = [U], Q.parentField = U, O.push(Q);
108
+ y.parent_id = [U], y.parentField = U, S.push(y);
109
109
  });
110
110
  }
111
- R.children = O, n.splice(t, 2, R);
111
+ T.children = S, n.splice(t, 2, T);
112
112
  } else
113
113
  t++;
114
114
  }
@@ -118,8 +118,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
118
118
  }, Xn = (e, n) => {
119
119
  const t = (c) => c ? c.split(W)[0] : "", r = e.path || [], A = n.path || [];
120
120
  if (r.length > 0 && A.length > 0) {
121
- const c = t(r[0]), u = t(A[0]);
122
- if (c !== u)
121
+ const c = t(r[0]), E = t(A[0]);
122
+ if (c !== E)
123
123
  return [];
124
124
  }
125
125
  const i = e.originalPath || e.path, o = n.originalPath || n.path;
@@ -130,7 +130,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
130
130
  return d;
131
131
  }, Dn = (e, n) => {
132
132
  for (const t of e) {
133
- if (M(t) === n)
133
+ if (F(t) === n)
134
134
  return t;
135
135
  if (t.children && t.children.length > 0) {
136
136
  const r = Dn(t.children, n);
@@ -139,7 +139,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
139
139
  }
140
140
  return null;
141
141
  }, en = (e, n) => {
142
- const t = M(e);
142
+ const t = F(e);
143
143
  if (t === n || t.split(W)[0] === n.split(W)[0])
144
144
  return e;
145
145
  if (e.children && e.children.length > 0)
@@ -198,101 +198,101 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
198
198
  ...d
199
199
  );
200
200
  }, qn = (e, n) => {
201
- var C, L;
201
+ var u, P;
202
202
  if (!n || n.length === 0 || n.length === 1)
203
203
  return { removed: !1, hierarchy: null };
204
- const t = (a, p) => M(a) === p, r = e.findIndex(
204
+ const t = (a, p) => F(a) === p, r = e.findIndex(
205
205
  (a) => t(a, n[0])
206
206
  );
207
207
  if (r === -1)
208
208
  return { removed: !1, hierarchy: null };
209
- const A = e[r], i = JSON.parse(JSON.stringify(A)), o = (a, p, R, P = [], O = 0) => {
210
- var Z, te, ae, se;
209
+ const A = e[r], i = JSON.parse(JSON.stringify(A)), o = (a, p, T, D = [], S = 0) => {
210
+ var Z, re, ae, se;
211
211
  if (!(a != null && a.children))
212
212
  return { success: !1, hierarchy: null };
213
- const U = R[0], N = a.children.findIndex(
214
- (Ee) => t(Ee, U)
213
+ const U = T[0], N = a.children.findIndex(
214
+ (Ce) => t(Ce, U)
215
215
  );
216
216
  if (N === -1)
217
217
  return { success: !1, hierarchy: null };
218
- const Q = (Z = p.children) == null ? void 0 : Z.find(
219
- (Ee) => t(Ee, U)
218
+ const y = (Z = p.children) == null ? void 0 : Z.find(
219
+ (Ce) => t(Ce, U)
220
220
  );
221
- if (!Q)
221
+ if (!y)
222
222
  return { success: !1, hierarchy: null };
223
- if (R.length === 1) {
223
+ if (T.length === 1) {
224
224
  a.children.splice(N, 1);
225
- const Ee = Me(), fe = M(Q).split(W)[0], he = `${W}${Ee}`, ie = `${fe}${he}`, ce = {
226
- ...Q,
225
+ const Ce = Me(), fe = F(y).split(W)[0], he = `${W}${Ce}`, ie = `${fe}${he}`, ce = {
226
+ ...y,
227
227
  field: ie,
228
- column_name: Q.column_name ? `${Q.column_name.split(W)[0]}${he}` : ie,
229
- accessor: Q.accessor ? `${Q.accessor.split(W)[0]}${he}` : ie,
230
- id: Q.id ? `${Q.id.split(W)[0]}${he}` : ie,
231
- path: [...P, ie],
232
- originalPath: Q.originalPath || ((te = Q.path) == null ? void 0 : te.map((Ae) => Ae.split(W)[0])),
228
+ column_name: y.column_name ? `${y.column_name.split(W)[0]}${he}` : ie,
229
+ accessor: y.accessor ? `${y.accessor.split(W)[0]}${he}` : ie,
230
+ id: y.id ? `${y.id.split(W)[0]}${he}` : ie,
231
+ path: [...D, ie],
232
+ originalPath: y.originalPath || ((re = y.path) == null ? void 0 : re.map((Ae) => Ae.split(W)[0])),
233
233
  originalId: fe,
234
- _originalField: Q._originalField || fe,
234
+ _originalField: y._originalField || fe,
235
235
  isReorderedColumn: !0
236
236
  };
237
- return P.length > 0 && (ce.parent_id = [P[P.length - 1]], ce.parentField = P[P.length - 1]), { success: !0, hierarchy: ce };
237
+ return D.length > 0 && (ce.parent_id = [D[D.length - 1]], ce.parentField = D[D.length - 1]), { success: !0, hierarchy: ce };
238
238
  }
239
- const _ = Me(), v = M(Q).split(W)[0], K = `${W}${_}`, j = `${v}${K}`, q = [...P, j], ee = a.children[N], ne = o(
239
+ const _ = Me(), v = F(y).split(W)[0], X = `${W}${_}`, K = `${v}${X}`, q = [...D, K], ee = a.children[N], ne = o(
240
240
  ee,
241
- Q,
242
- R.slice(1),
241
+ y,
242
+ T.slice(1),
243
243
  q,
244
- O + 1
244
+ S + 1
245
245
  );
246
246
  if (!ne.success)
247
247
  return ne;
248
248
  ((ae = ee.children) == null ? void 0 : ae.length) === 0 && !ee.isLeaf && a.children.splice(N, 1);
249
249
  const $ = {
250
- ...Q,
251
- field: j,
252
- column_name: Q.column_name ? `${Q.column_name.split(W)[0]}${K}` : j,
253
- accessor: Q.accessor ? `${Q.accessor.split(W)[0]}${K}` : j,
254
- id: Q.id ? `${Q.id.split(W)[0]}${K}` : j,
250
+ ...y,
251
+ field: K,
252
+ column_name: y.column_name ? `${y.column_name.split(W)[0]}${X}` : K,
253
+ accessor: y.accessor ? `${y.accessor.split(W)[0]}${X}` : K,
254
+ id: y.id ? `${y.id.split(W)[0]}${X}` : K,
255
255
  path: q,
256
- originalPath: Q.originalPath || ((se = Q.path) == null ? void 0 : se.map((Ee) => Ee.split(W)[0])),
256
+ originalPath: y.originalPath || ((se = y.path) == null ? void 0 : se.map((Ce) => Ce.split(W)[0])),
257
257
  originalId: v,
258
- _originalField: Q._originalField || v,
258
+ _originalField: y._originalField || v,
259
259
  isReorderedColumn: !0,
260
260
  children: [ne.hierarchy]
261
261
  };
262
- return P.length > 0 && ($.parent_id = [P[P.length - 1]], $.parentField = P[P.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [j], ne.hierarchy.parentField = j), {
262
+ return D.length > 0 && ($.parent_id = [D[D.length - 1]], $.parentField = D[D.length - 1]), ne.hierarchy && (ne.hierarchy.parent_id = [K], ne.hierarchy.parentField = K), {
263
263
  success: !0,
264
264
  hierarchy: $
265
265
  };
266
- }, d = Me(), f = M(i).split(W)[0], c = `${W}${d}`, u = `${f}${c}`, g = o(
266
+ }, d = Me(), f = F(i).split(W)[0], c = `${W}${d}`, E = `${f}${c}`, g = o(
267
267
  A,
268
268
  i,
269
269
  n.slice(1),
270
- [u],
270
+ [E],
271
271
  0
272
272
  );
273
273
  if (g.success) {
274
274
  const a = {
275
275
  ...i,
276
- field: u,
277
- column_name: i.column_name ? `${i.column_name.split(W)[0]}${c}` : u,
278
- accessor: i.accessor ? `${i.accessor.split(W)[0]}${c}` : u,
279
- id: i.id ? `${i.id.split(W)[0]}${c}` : u,
280
- path: [u],
281
- originalPath: i.originalPath || ((C = i.path) == null ? void 0 : C.map((p) => p.split(W)[0])),
276
+ field: E,
277
+ column_name: i.column_name ? `${i.column_name.split(W)[0]}${c}` : E,
278
+ accessor: i.accessor ? `${i.accessor.split(W)[0]}${c}` : E,
279
+ id: i.id ? `${i.id.split(W)[0]}${c}` : E,
280
+ path: [E],
281
+ originalPath: i.originalPath || ((u = i.path) == null ? void 0 : u.map((p) => p.split(W)[0])),
282
282
  originalId: f,
283
283
  _originalField: i._originalField || f,
284
284
  isReorderedColumn: !0,
285
285
  children: [g.hierarchy]
286
286
  };
287
- return g.hierarchy && (g.hierarchy.parent_id = [u], g.hierarchy.parentField = u), ((L = A.children) == null ? void 0 : L.length) === 0 && !A.isLeaf && e.splice(r, 1), { removed: !0, hierarchy: a };
287
+ return g.hierarchy && (g.hierarchy.parent_id = [E], g.hierarchy.parentField = E), ((P = A.children) == null ? void 0 : P.length) === 0 && !A.isLeaf && e.splice(r, 1), { removed: !0, hierarchy: a };
288
288
  }
289
289
  return { removed: !1, hierarchy: null };
290
290
  }, $n = (e, n, t) => {
291
291
  e.path || (e.path = []), n.path || (n.path = []);
292
292
  const r = e.path[0] || "", A = n.path[0] || "", i = t.findIndex(
293
- (N) => M(N) === r
293
+ (N) => F(N) === r
294
294
  ), o = t.findIndex(
295
- (N) => M(N) === A
295
+ (N) => F(N) === A
296
296
  );
297
297
  if (i === -1 || o === -1)
298
298
  return console.error("Could not find source or target column in columns array", {
@@ -306,70 +306,70 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
306
306
  pinned: f
307
307
  } = t[o];
308
308
  let c = o;
309
- const u = i === c;
310
- let g = 0, C = !1;
311
- if (u) {
309
+ const E = i === c;
310
+ let g = 0, u = !1;
311
+ if (E) {
312
312
  const { rightAddition: N } = et(
313
313
  e,
314
314
  n,
315
315
  t[c]
316
316
  );
317
- C = N;
317
+ u = N;
318
318
  } else
319
- C = i < c;
320
- const L = Ne(
319
+ u = i < c;
320
+ const P = Ne(
321
321
  t[i]
322
322
  );
323
323
  let a = null, p = null;
324
- const { removed: R, hierarchy: P } = qn(
324
+ const { removed: T, hierarchy: D } = qn(
325
325
  t,
326
326
  e.path
327
327
  );
328
- let O = P;
329
- if (C && R && !L)
328
+ let S = D;
329
+ if (u && T && !P)
330
330
  Ne(
331
331
  t[c]
332
332
  ) ? c++ : g++;
333
- else if (C && R && L)
333
+ else if (u && T && P)
334
334
  Ne(
335
335
  t[c - 1]
336
336
  ) || (c--, g++);
337
- else if (!C && R)
337
+ else if (!u && T)
338
338
  Ne(
339
339
  t[c]
340
340
  ) || g++;
341
- else if (!R) {
341
+ else if (!T) {
342
342
  const N = Ne(
343
343
  t[c]
344
344
  );
345
- !C && !N && g++, C && !N && g++;
345
+ !u && !N && g++, u && !N && g++;
346
346
  }
347
347
  if (n.path.length > 1) {
348
- const { before: N, after: Q } = nt(
348
+ const { before: N, after: y } = nt(
349
349
  t[c],
350
350
  0,
351
351
  n.path.slice(1),
352
- C
352
+ u
353
353
  );
354
- a = Q, p = N;
354
+ a = y, p = N;
355
355
  }
356
- if ((p || a) && !O) {
356
+ if ((p || a) && !S) {
357
357
  const N = Ne(
358
358
  t[c]
359
359
  );
360
- O = t.splice(i, 1)[0], C && !R && !N && c--;
360
+ S = t.splice(i, 1)[0], u && !T && !N && c--;
361
361
  }
362
- if (O)
362
+ if (S)
363
363
  Vn({
364
364
  beforeHierarchy: p,
365
365
  afterHierarchy: a,
366
- newHierarchy: O,
366
+ newHierarchy: S,
367
367
  targetColumFrozenState: d,
368
368
  targetColumnFrozenPinned: f
369
369
  }), Zn({
370
370
  beforeHierarchy: p,
371
371
  afterHierarchy: a,
372
- newHierarchy: O,
372
+ newHierarchy: S,
373
373
  updatedtargetIndex: c,
374
374
  removeColumnsCount: g,
375
375
  isChildrenUpdate: !1,
@@ -392,10 +392,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
392
392
  const n = e.children[0];
393
393
  return !n.children || n.children.length === 0 ? !0 : Ne(n);
394
394
  }, cn = (e, n) => e.findIndex((t) => {
395
- const r = M(t);
395
+ const r = F(t);
396
396
  return r === n || r.split(W)[0] === n;
397
397
  }), gn = (e, n) => e.findIndex((t) => {
398
- const r = M(t), A = r.split(W)[0], i = n.split(W)[0], o = r === n || A === i, d = !o && Dn([t], n) !== null;
398
+ const r = F(t), A = r.split(W)[0], i = n.split(W)[0], o = r === n || A === i, d = !o && Dn([t], n) !== null;
399
399
  return o || d;
400
400
  }), Pn = (e, n, t, r = 0) => {
401
401
  if (!e.children || e.children.length === 0)
@@ -421,169 +421,169 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
421
421
  }, et = (e, n, t) => {
422
422
  const r = e.path || e.originalPath || [], A = n.path || n.originalPath || [], i = Jn(r, A), o = r[i], d = A[i], f = r[i - 1];
423
423
  let c = t;
424
- if (f && M(c) !== f) {
424
+ if (f && F(c) !== f) {
425
425
  const a = en(c, f);
426
426
  a && (c = a);
427
427
  }
428
- let u = -1, g = -1;
429
- c.children && (u = cn(
428
+ let E = -1, g = -1;
429
+ c.children && (E = cn(
430
430
  c.children,
431
431
  o
432
432
  ), g = cn(
433
433
  c.children,
434
434
  d
435
435
  ));
436
- const C = (a, p, R, P, O) => {
437
- var N, Q;
436
+ const u = (a, p, T, D, S) => {
437
+ var N, y;
438
438
  let U = i - 1;
439
439
  for (; U >= 0; ) {
440
- const _ = p[U], v = R[U + 1];
441
- let K = t;
442
- if (_ && M(K) !== _) {
443
- const j = en(
440
+ const _ = p[U], v = T[U + 1];
441
+ let X = t;
442
+ if (_ && F(X) !== _) {
443
+ const K = en(
444
444
  t,
445
445
  _
446
446
  );
447
- j && (K = j);
447
+ K && (X = K);
448
448
  }
449
- if (K.children) {
450
- const j = K.children.findIndex((q) => {
451
- const ee = M(q);
452
- return ee === v || ee.split(W)[0] === v || ee.split(W)[0] === P;
449
+ if (X.children) {
450
+ const K = X.children.findIndex((q) => {
451
+ const ee = F(q);
452
+ return ee === v || ee.split(W)[0] === v || ee.split(W)[0] === D;
453
453
  });
454
- if (j !== -1) {
455
- c = K;
456
- const q = (a === "target" ? r : A)[U + 1], ee = a === "target" ? o : d, ne = (Q = (N = c.children) == null ? void 0 : N.findIndex) == null ? void 0 : Q.call(
454
+ if (K !== -1) {
455
+ c = X;
456
+ const q = (a === "target" ? r : A)[U + 1], ee = a === "target" ? o : d, ne = (y = (N = c.children) == null ? void 0 : N.findIndex) == null ? void 0 : y.call(
457
457
  N,
458
458
  ($) => {
459
- const Z = M($);
459
+ const Z = F($);
460
460
  return Z === q || Z.split(W)[0] === q || Z.split(W)[0] === ee;
461
461
  }
462
462
  );
463
463
  return {
464
464
  found: !0,
465
- missingIndex: j ?? -1,
465
+ missingIndex: K ?? -1,
466
466
  foundIndex: ne ?? -1
467
467
  };
468
468
  }
469
469
  }
470
470
  U--;
471
471
  }
472
- return console.warn(`Could not find ${a} in any common parent`), { found: !1, missingIndex: -1, foundIndex: O };
472
+ return console.warn(`Could not find ${a} in any common parent`), { found: !1, missingIndex: -1, foundIndex: S };
473
473
  };
474
- if (u === -1 && g === -1) {
475
- const a = o.split(W)[0], p = d.split(W)[0], R = Pn(
474
+ if (E === -1 && g === -1) {
475
+ const a = o.split(W)[0], p = d.split(W)[0], T = Pn(
476
476
  t,
477
477
  a,
478
478
  p
479
479
  );
480
- R ? (c = R.parent, u = R.sourceIndex, g = R.targetIndex) : console.warn(
480
+ T ? (c = T.parent, E = T.sourceIndex, g = T.targetIndex) : console.warn(
481
481
  "Abhay Could not find any common parent containing both source and target"
482
482
  );
483
483
  }
484
- if (u >= 0 && g === -1) {
485
- const a = C(
484
+ if (E >= 0 && g === -1) {
485
+ const a = u(
486
486
  "target",
487
487
  r,
488
488
  A,
489
489
  d,
490
- u
490
+ E
491
491
  );
492
- a.found && (g = a.missingIndex, u = a.foundIndex);
492
+ a.found && (g = a.missingIndex, E = a.foundIndex);
493
493
  }
494
- if (g >= 0 && u === -1) {
495
- const a = C(
494
+ if (g >= 0 && E === -1) {
495
+ const a = u(
496
496
  "source",
497
497
  A,
498
498
  r,
499
499
  o,
500
500
  g
501
501
  );
502
- a.found && (u = a.missingIndex, g = a.foundIndex);
502
+ a.found && (E = a.missingIndex, g = a.foundIndex);
503
503
  }
504
- const L = u < g;
504
+ const P = E < g;
505
505
  return {
506
- sourceIndexInCommonParent: u,
506
+ sourceIndexInCommonParent: E,
507
507
  targetIndexInCommonParent: g,
508
- rightAddition: L
508
+ rightAddition: P
509
509
  };
510
510
  }, nt = (e, n, t, r) => {
511
- function A(c, u) {
511
+ function A(c, E) {
512
512
  if (!c.children)
513
513
  return { before: null, after: null };
514
- const g = c.children, C = t[u], L = g.findIndex((v) => v.field === C);
515
- if (L === -1)
514
+ const g = c.children, u = t[E], P = g.findIndex((v) => v.field === u);
515
+ if (P === -1)
516
516
  return { before: null, after: null };
517
517
  const a = [], p = [];
518
- g.forEach((v, K) => {
519
- K < L ? a.push(JSON.parse(JSON.stringify(v))) : K > L ? p.push(JSON.parse(JSON.stringify(v))) : u === t.length - 1 && (v.isLeaf || !v.children || v.children.length === 0 || v.children.length === 1) ? r ? a.push(JSON.parse(JSON.stringify(v))) : p.push(JSON.parse(JSON.stringify(v))) : (a.push(null), p.push(null));
518
+ g.forEach((v, X) => {
519
+ X < P ? a.push(JSON.parse(JSON.stringify(v))) : X > P ? p.push(JSON.parse(JSON.stringify(v))) : E === t.length - 1 && (v.isLeaf || !v.children || v.children.length === 0 || v.children.length === 1) ? r ? a.push(JSON.parse(JSON.stringify(v))) : p.push(JSON.parse(JSON.stringify(v))) : (a.push(null), p.push(null));
520
520
  });
521
- const R = g[L];
522
- if (!(u === t.length - 1) || R.children && R.children.length > 1) {
523
- const { before: v, after: K } = A(
524
- R,
525
- u + 1
521
+ const T = g[P];
522
+ if (!(E === t.length - 1) || T.children && T.children.length > 1) {
523
+ const { before: v, after: X } = A(
524
+ T,
525
+ E + 1
526
526
  );
527
527
  if (v) {
528
- const j = a.indexOf(null);
529
- j !== -1 && (a[j] = v);
528
+ const K = a.indexOf(null);
529
+ K !== -1 && (a[K] = v);
530
530
  }
531
- if (K) {
532
- const j = p.indexOf(null);
533
- j !== -1 && (p[j] = K);
531
+ if (X) {
532
+ const K = p.indexOf(null);
533
+ K !== -1 && (p[K] = X);
534
534
  }
535
535
  }
536
536
  const U = a.filter(
537
537
  (v) => v !== null
538
538
  ), N = p.filter(
539
539
  (v) => v !== null
540
- ), Q = U.length > 0 ? {
540
+ ), y = U.length > 0 ? {
541
541
  ...JSON.parse(JSON.stringify(c)),
542
542
  children: U
543
543
  } : null, _ = N.length > 0 ? {
544
544
  ...JSON.parse(JSON.stringify(c)),
545
545
  children: N
546
546
  } : null;
547
- return { before: Q, after: _ };
547
+ return { before: y, after: _ };
548
548
  }
549
549
  const { before: i, after: o } = A(e, 0);
550
550
  let d = o;
551
- const f = (c, u = [], g = /* @__PURE__ */ new Map()) => {
552
- !c || !c.children || c.children.length === 0 || c.children.forEach((C) => {
553
- const L = M(C).split(W)[0], a = Me(), p = `${L}_${a}`, R = g.get(p) || 0;
554
- g.set(p, R + 1);
555
- const P = `${W}${a}_${R}`;
556
- if (!C.originalPath && C.path && (C.originalPath = [
557
- ...C.path.map((O) => O.split(W)[0])
558
- ]), C.originalId || (C.originalId = L), C.field = `${L}${P}`, C.accessor) {
559
- const O = C.accessor.split(W)[0];
560
- C.accessor = `${O}${P}`;
551
+ const f = (c, E = [], g = /* @__PURE__ */ new Map()) => {
552
+ !c || !c.children || c.children.length === 0 || c.children.forEach((u) => {
553
+ const P = F(u).split(W)[0], a = Me(), p = `${P}_${a}`, T = g.get(p) || 0;
554
+ g.set(p, T + 1);
555
+ const D = `${W}${a}_${T}`;
556
+ if (!u.originalPath && u.path && (u.originalPath = [
557
+ ...u.path.map((S) => S.split(W)[0])
558
+ ]), u.originalId || (u.originalId = P), u.field = `${P}${D}`, u.accessor) {
559
+ const S = u.accessor.split(W)[0];
560
+ u.accessor = `${S}${D}`;
561
561
  }
562
- if (C.column_name) {
563
- const O = C.column_name.split(W)[0];
564
- C.column_name = `${O}${P}`;
562
+ if (u.column_name) {
563
+ const S = u.column_name.split(W)[0];
564
+ u.column_name = `${S}${D}`;
565
565
  }
566
- if (C.id) {
567
- const O = C.id.split(W)[0];
568
- C.id = `${O}${P}`;
566
+ if (u.id) {
567
+ const S = u.id.split(W)[0];
568
+ u.id = `${S}${D}`;
569
569
  }
570
- C.path = [...u, C.field], u.length > 0 && (C.parent_id = [u[u.length - 1]]), C.isReorderedColumn = !0, f(C, C.path, g);
570
+ u.path = [...E, u.field], E.length > 0 && (u.parent_id = [E[E.length - 1]]), u.isReorderedColumn = !0, f(u, u.path, g);
571
571
  });
572
572
  };
573
573
  if (d) {
574
574
  const c = [];
575
- if (d.path && d.path[0] !== M(d)) {
575
+ if (d.path && d.path[0] !== F(d)) {
576
576
  const g = d.path.findIndex(
577
- (C) => C === M(d)
577
+ (u) => u === F(d)
578
578
  );
579
579
  c.push(...(d.path || []).slice(0, g));
580
580
  }
581
- const u = Sn(d, {
581
+ const E = On(d, {
582
582
  path: c
583
583
  });
584
584
  d = {
585
585
  ...d,
586
- ...u
586
+ ...E
587
587
  }, f(d, d.path);
588
588
  }
589
589
  return { before: i, after: d };
@@ -735,11 +735,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
735
735
  document.querySelectorAll(".ia-table-body-cell-selected").forEach((a) => {
736
736
  a.classList.remove("ia-table-body-cell-selected");
737
737
  }), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
738
- const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t, u = e.getAttribute("data-field") || "", g = e.getAttribute("data-pinned"), C = {
738
+ const f = n.iaTableInstanceId || "", c = e.getAttribute("data-row-id") || t, E = e.getAttribute("data-field") || "", g = e.getAttribute("data-pinned"), u = {
739
739
  rowIndex: t,
740
740
  colIndex: r,
741
741
  rowId: c,
742
- field: u,
742
+ field: E,
743
743
  pinnedType: g === "false" ? !1 : g,
744
744
  frozenColumnsLength: A,
745
745
  rowAttr: t,
@@ -747,9 +747,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
747
747
  tableId: i,
748
748
  target: o
749
749
  };
750
- window.iaTableSelectedCell = C;
751
- const L = window.iaTableState;
752
- L && (L.selectedCells.set(f, C), L.activeInstance = n), o.classList.add("ia-table-body-cell-selected"), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), setTimeout(() => {
750
+ window.iaTableSelectedCell = u;
751
+ const P = window.iaTableState;
752
+ P && (P.selectedCells.set(f, u), P.activeInstance = n), o.classList.add("ia-table-body-cell-selected"), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), setTimeout(() => {
753
753
  o.scrollIntoView({
754
754
  behavior: "auto",
755
755
  block: "nearest"
@@ -964,52 +964,52 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
964
964
  return;
965
965
  }
966
966
  }, 0);
967
- }, ar = (e, n, t, r, A, i, o, d, f, c, u) => {
968
- var R, P, O, U;
969
- e.stopPropagation(), !e.shiftKey && ((P = (R = window.iaTableState) == null ? void 0 : R.multiSelection) != null && P.anchor) && rt();
967
+ }, ar = (e, n, t, r, A, i, o, d, f, c, E) => {
968
+ var T, D, S, U;
969
+ e.stopPropagation(), !e.shiftKey && ((D = (T = window.iaTableState) == null ? void 0 : T.multiSelection) != null && D.anchor) && rt();
970
970
  const g = tt(n);
971
971
  if (!g) return;
972
- const C = g.iaTableInstanceId;
973
- (O = window.iaTableSelectedCell) != null && O.target && window.iaTableSelectedCell.target.classList.remove(
972
+ const u = g.iaTableInstanceId;
973
+ (S = window.iaTableSelectedCell) != null && S.target && window.iaTableSelectedCell.target.classList.remove(
974
974
  "ia-table-body-cell-selected"
975
975
  );
976
- const L = e.target.closest(
976
+ const P = e.target.closest(
977
977
  ".ia-table-body-cell"
978
978
  );
979
- if (!L) return;
980
- L.classList.add("ia-table-body-cell-selected"), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
981
- const a = L.getAttribute("data-row"), p = {
979
+ if (!P) return;
980
+ P.classList.add("ia-table-body-cell-selected"), window.dispatchEvent(new CustomEvent("ia-table-clear-selection"));
981
+ const a = P.getAttribute("data-row"), p = {
982
982
  rowIndex: t,
983
983
  colIndex: r,
984
984
  rowId: A,
985
985
  field: i,
986
986
  pinnedType: o,
987
987
  frozenColumnsLength: d,
988
- tableInstanceId: C,
988
+ tableInstanceId: u,
989
989
  tableId: ((U = g == null ? void 0 : g.api) == null ? void 0 : U.tableId) ?? "",
990
- target: L,
990
+ target: P,
991
991
  column: f,
992
992
  rowData: c,
993
- cellValue: u,
993
+ cellValue: E,
994
994
  rowAttr: a
995
995
  // Add the row attribute for keyboard navigation
996
996
  };
997
- window.iaTableSelectedCell = p, C && window.iaTableState && window.iaTableState.selectedCells.set(C, p), window.iaTableState && g && (window.iaTableState.activeInstance = g), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), lt(L);
997
+ window.iaTableSelectedCell = p, u && window.iaTableState && window.iaTableState.selectedCells.set(u, p), window.iaTableState && g && (window.iaTableState.activeInstance = g), document.activeElement && document.activeElement !== document.body && document.activeElement.blur(), lt(P);
998
998
  }, st = (e, n) => !e || !n ? void 0 : (Array.isArray(n) ? n : n.split(".")).reduce(
999
999
  (r, A) => r && r[A] !== void 0 ? r[A] : void 0,
1000
1000
  e
1001
1001
  ), sr = (e) => e == null ? "" : typeof e == "boolean" ? e ? "Yes" : "No" : e instanceof Date ? e.toLocaleString() : typeof e == "object" && e !== null ? Array.isArray(e) ? e.join(", ") : JSON.stringify(e) : String(e), dt = (e, n) => {
1002
- const t = e.groupingLevel, r = n.originalFields && t && n.originalFields[t] ? n.originalFields[t] : M(n);
1002
+ const t = e.groupingLevel, r = n.originalFields && t && n.originalFields[t] ? n.originalFields[t] : F(n);
1003
1003
  return e[r];
1004
1004
  }, dr = (e, n, t, r, A) => {
1005
1005
  if (!e || !n) return "";
1006
1006
  const i = e.groupingLevel || 0, o = i && n.rowGroup && n.originalFields && n.originalFields.length > i ? {
1007
1007
  ...A[n.originalFields[i]],
1008
- colId: M(
1008
+ colId: F(
1009
1009
  A[n.originalFields[i]]
1010
1010
  )
1011
- } : { ...n, colId: M(n) };
1012
- let d = o.field || M(o);
1011
+ } : { ...n, colId: F(n) };
1012
+ let d = o.field || F(o);
1013
1013
  if (o.isReorderedColumn && o.originalPath && (d = o.originalPath[o.originalPath.length - 1]), o.valueGetter)
1014
1014
  try {
1015
1015
  const c = {
@@ -1026,7 +1026,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1026
1026
  // Pass the table API to the valueGetter
1027
1027
  columnApi: r == null ? void 0 : r.columnApi,
1028
1028
  // Pass column API if available
1029
- getValue: (u) => e[u]
1029
+ getValue: (E) => e[E]
1030
1030
  };
1031
1031
  return o.valueGetter(c);
1032
1032
  } catch (c) {
@@ -1041,18 +1041,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1041
1041
  if (f && t) {
1042
1042
  const c = e[t];
1043
1043
  if (c && Array.isArray(c) && c.length > 0) {
1044
- const u = c;
1045
- for (const g of u)
1044
+ const E = c;
1045
+ for (const g of E)
1046
1046
  if (g && g[d] !== void 0)
1047
1047
  return g[d];
1048
1048
  }
1049
1049
  if (o.parent_id) {
1050
- const u = o.parent_id[0];
1051
- if (u && e[u]) {
1052
- const g = e[u];
1050
+ const E = o.parent_id[0];
1051
+ if (E && e[E]) {
1052
+ const g = e[E];
1053
1053
  if (typeof g == "object" && g !== null) {
1054
- const C = g;
1055
- return C[d] !== void 0 ? C[d] : "";
1054
+ const u = g;
1055
+ return u[d] !== void 0 ? u[d] : "";
1056
1056
  }
1057
1057
  }
1058
1058
  }
@@ -1083,54 +1083,54 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1083
1083
  n,
1084
1084
  t,
1085
1085
  typeof r == "string" ? r : void 0
1086
- ) : e(r, t) : null, Ct = (e, n, t) => !e || e.length === 0 || Object.keys(n).length === 0 ? e : e.filter((r) => Object.entries(n).every(([A, i]) => !i || !i.length ? !0 : i.every((o) => {
1087
- const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d], u = c == null ? void 0 : c.type, g = be.includes(u || "");
1088
- let C = o.pattern || o.value || "";
1089
- const L = gt(c, u);
1090
- if (L && c)
1086
+ ) : e(r, t) : null, ut = (e, n, t) => !e || e.length === 0 || Object.keys(n).length === 0 ? e : e.filter((r) => Object.entries(n).every(([A, i]) => !i || !i.length ? !0 : i.every((o) => {
1087
+ const d = o.column || o.field || A, f = o.search_type || o.operator || "", c = t[d], E = c == null ? void 0 : c.type, g = be.includes(E || "");
1088
+ let u = o.pattern || o.value || "";
1089
+ const P = gt(c, E);
1090
+ if (P && c)
1091
1091
  return ft(
1092
- L,
1092
+ P,
1093
1093
  f,
1094
1094
  r[d],
1095
- g ? { min_val: o.min_val, max_val: o.max_val } : C,
1096
- u
1095
+ g ? { min_val: o.min_val, max_val: o.max_val } : u,
1096
+ E
1097
1097
  );
1098
1098
  const a = r[d];
1099
1099
  if (a == null || a === "")
1100
1100
  return !1;
1101
- if (be.includes(u || "")) {
1101
+ if (be.includes(E || "")) {
1102
1102
  const p = parseFloat(a);
1103
1103
  switch (f) {
1104
1104
  case "equals":
1105
- return C = o.max_val ?? 0, p === parseFloat(String(C));
1105
+ return u = o.max_val ?? 0, p === parseFloat(String(u));
1106
1106
  case "lessThan":
1107
- return C = o.max_val ?? 0, p < parseFloat(String(C));
1107
+ return u = o.max_val ?? 0, p < parseFloat(String(u));
1108
1108
  case "lessThanOrEqual":
1109
- return C = o.max_val ?? 0, p <= parseFloat(String(C));
1109
+ return u = o.max_val ?? 0, p <= parseFloat(String(u));
1110
1110
  case "greaterThan":
1111
- return C = o.min_val ?? 0, p > parseFloat(String(C));
1111
+ return u = o.min_val ?? 0, p > parseFloat(String(u));
1112
1112
  case "greaterThanOrEqual":
1113
- return C = o.min_val ?? 0, p >= parseFloat(String(C));
1113
+ return u = o.min_val ?? 0, p >= parseFloat(String(u));
1114
1114
  case "inRange": {
1115
- const R = o.min_val, P = o.max_val;
1116
- return R !== void 0 && P !== void 0 ? p >= parseFloat(String(R)) && p <= parseFloat(String(P)) : !0;
1115
+ const T = o.min_val, D = o.max_val;
1116
+ return T !== void 0 && D !== void 0 ? p >= parseFloat(String(T)) && p <= parseFloat(String(D)) : !0;
1117
1117
  }
1118
1118
  default:
1119
1119
  return !0;
1120
1120
  }
1121
1121
  } else {
1122
- const p = String(a).toLowerCase(), R = String(C || "").toLowerCase(), P = R.includes(",") ? R.split(",").map((O) => O.trim()).filter(Boolean) : [R];
1122
+ const p = String(a).toLowerCase(), T = String(u || "").toLowerCase(), D = T.includes(",") ? T.split(",").map((S) => S.trim()).filter(Boolean) : [T];
1123
1123
  switch (f) {
1124
1124
  case "contains":
1125
- return P.some((O) => p.includes(O));
1125
+ return D.some((S) => p.includes(S));
1126
1126
  case "equals":
1127
- return P.some((O) => p === O);
1127
+ return D.some((S) => p === S);
1128
1128
  case "notEqual":
1129
- return P.every((O) => p !== O);
1129
+ return D.every((S) => p !== S);
1130
1130
  case "startsWith":
1131
- return P.some((O) => p.startsWith(O));
1131
+ return D.some((S) => p.startsWith(S));
1132
1132
  case "endsWith":
1133
- return P.some((O) => p.endsWith(O));
1133
+ return D.some((S) => p.endsWith(S));
1134
1134
  default:
1135
1135
  return !0;
1136
1136
  }
@@ -1141,52 +1141,52 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1141
1141
  if (!A) return [...e];
1142
1142
  const o = t == null ? void 0 : t[A], d = o == null ? void 0 : o.comparator;
1143
1143
  return [...e].sort((f, c) => {
1144
- const u = f[A], g = c[A];
1144
+ const E = f[A], g = c[A];
1145
1145
  return d ? d(
1146
- u,
1146
+ E,
1147
1147
  g,
1148
1148
  f,
1149
1149
  // nodeA (full row data)
1150
1150
  c,
1151
1151
  // nodeB (full row data)
1152
1152
  r ? n : n ? [n] : []
1153
- ) : u === g ? 0 : u == null ? 1 : g == null ? -1 : typeof u == "string" && typeof g == "string" ? i === "asc" ? u.localeCompare(g) : g.localeCompare(u) : i === "asc" ? u < g ? -1 : 1 : u > g ? -1 : 1;
1153
+ ) : E === g ? 0 : E == null ? 1 : g == null ? -1 : typeof E == "string" && typeof g == "string" ? i === "asc" ? E.localeCompare(g) : g.localeCompare(E) : i === "asc" ? E < g ? -1 : 1 : E > g ? -1 : 1;
1154
1154
  });
1155
1155
  }, Be = (e, n = { minWidth: 150 }) => {
1156
1156
  const t = {}, r = {};
1157
1157
  e.forEach((a) => {
1158
- const p = M(a);
1159
- a.children && Array.isArray(a.children) && (r[p] = [], a.children.forEach((R) => {
1160
- const P = M(R);
1161
- t[P] = p, r[p] ? r[p].push(P) : r[p] = [P];
1158
+ const p = F(a);
1159
+ a.children && Array.isArray(a.children) && (r[p] = [], a.children.forEach((T) => {
1160
+ const D = F(T);
1161
+ t[D] = p, r[p] ? r[p].push(D) : r[p] = [D];
1162
1162
  }));
1163
1163
  });
1164
1164
  const A = e.map((a) => {
1165
1165
  var q, ee;
1166
- const p = a.width !== void 0, R = a.field || M(a);
1167
- let P = a.is_frozen || !1, O = a.pinned === "right";
1166
+ const p = a.width !== void 0, T = a.field || F(a);
1167
+ let D = a.is_frozen || !1, S = a.pinned === "right";
1168
1168
  const U = [];
1169
- let N = R;
1169
+ let N = T;
1170
1170
  for (; t[N]; ) {
1171
1171
  const ne = t[N];
1172
1172
  U.push(ne), N = ne;
1173
1173
  }
1174
- const Q = a.children && a.children.length > 0;
1174
+ const y = a.children && a.children.length > 0;
1175
1175
  let _ = !1, v = !1;
1176
- Q && ((ee = (q = a.children) == null ? void 0 : q.forEach) == null || ee.call(q, (ne) => {
1177
- const $ = M(ne), Z = e.find(
1178
- (te) => M(te) === $
1176
+ y && ((ee = (q = a.children) == null ? void 0 : q.forEach) == null || ee.call(q, (ne) => {
1177
+ const $ = F(ne), Z = e.find(
1178
+ (re) => F(re) === $
1179
1179
  );
1180
1180
  Z && (Z.is_frozen && (_ = !0), Z.pinned === "right" && (v = !0));
1181
- }), _ && (P = !0), v && (O = !0));
1182
- const K = (n == null ? void 0 : n.minWidth) || 150, j = a.width ? Math.max(a.width, K) : K;
1181
+ }), _ && (D = !0), v && (S = !0));
1182
+ const X = (n == null ? void 0 : n.minWidth) || 150, K = a.width ? Math.max(a.width, X) : X;
1183
1183
  return {
1184
1184
  ...a,
1185
- field: R,
1185
+ field: T,
1186
1186
  headerName: a.headerName || a.label,
1187
1187
  // Set width and track if it's a custom width or auto width
1188
- width: j,
1189
- originalWidth: a.width || K,
1188
+ width: K,
1189
+ originalWidth: a.width || X,
1190
1190
  // Store original width
1191
1191
  isAutoWidth: !p,
1192
1192
  // Mark columns without explicit width as auto-width
@@ -1195,18 +1195,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1195
1195
  resizable: a.resizable !== !1,
1196
1196
  hidden: Ve(a),
1197
1197
  align: a.align || "left",
1198
- is_frozen: P,
1198
+ is_frozen: D,
1199
1199
  // Ensure left-pinned property is set
1200
- pinned: O ? "right" : a.pinned,
1200
+ pinned: S ? "right" : a.pinned,
1201
1201
  // Ensure right-pinned property is set
1202
1202
  originalIndex: e.indexOf(a),
1203
1203
  // Store original index
1204
1204
  parentColumns: U,
1205
1205
  // Store the ancestry chain
1206
1206
  // Add placeholder flag if this is a child with no explicit parent
1207
- isChildWithoutParent: U.length === 0 && t[R] === void 0,
1207
+ isChildWithoutParent: U.length === 0 && t[T] === void 0,
1208
1208
  // Store if this is a parent with children
1209
- hasChildren: Q,
1209
+ hasChildren: y,
1210
1210
  // Store whether any children are frozen or right-pinned
1211
1211
  hasAnyFrozenChildren: _,
1212
1212
  hasAnyRightPinnedChildren: v
@@ -1214,15 +1214,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1214
1214
  });
1215
1215
  A.forEach((a) => {
1216
1216
  a.is_frozen && a.parentColumns.forEach((p) => {
1217
- const R = A.find(
1218
- (P) => M(P) === p
1217
+ const T = A.find(
1218
+ (D) => F(D) === p
1219
1219
  );
1220
- R && (R.is_frozen = !0);
1220
+ T && (T.is_frozen = !0);
1221
1221
  }), a.pinned === "right" && a.parentColumns.forEach((p) => {
1222
- const R = A.find(
1223
- (P) => M(P) === p
1222
+ const T = A.find(
1223
+ (D) => F(D) === p
1224
1224
  );
1225
- R && (R.pinned = "right", R.is_frozen = !1);
1225
+ T && (T.pinned = "right", T.is_frozen = !1);
1226
1226
  });
1227
1227
  });
1228
1228
  const i = [
@@ -1245,38 +1245,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1245
1245
  ), c = A.filter(
1246
1246
  (a) => a.pinned === "right" && !a.hidden
1247
1247
  );
1248
- let u = 0;
1248
+ let E = 0;
1249
1249
  function g(a, p) {
1250
- var U, N, Q;
1251
- const R = M(a), P = p;
1252
- o.indexes.push(R), o.positions[R] = P;
1253
- let O;
1250
+ var U, N, y;
1251
+ const T = F(a), D = p;
1252
+ o.indexes.push(T), o.positions[T] = D;
1253
+ let S;
1254
1254
  if (a && a.children && ((U = a.children) == null ? void 0 : U.length) > 0) {
1255
1255
  let _ = 0;
1256
- (Q = (N = a.children) == null ? void 0 : N.forEach) == null || Q.call(N, (v) => {
1256
+ (y = (N = a.children) == null ? void 0 : N.forEach) == null || y.call(N, (v) => {
1257
1257
  if (Ve(v))
1258
1258
  return;
1259
- const K = P + _, j = g(v, K);
1260
- _ += j;
1261
- }), O = _;
1259
+ const X = D + _, K = g(v, X);
1260
+ _ += K;
1261
+ }), S = _;
1262
1262
  } else {
1263
1263
  const _ = n.minWidth || 150;
1264
- O = a.width && a.width < _ ? _ : a.width || _;
1264
+ S = a.width && a.width < _ ? _ : a.width || _;
1265
1265
  }
1266
- return O;
1266
+ return S;
1267
1267
  }
1268
1268
  f.forEach((a) => {
1269
1269
  if (Ve(a))
1270
1270
  return;
1271
- const p = g(a, u);
1272
- u += p;
1273
- }), o.totalWidth = u;
1274
- let C = 0;
1271
+ const p = g(a, E);
1272
+ E += p;
1273
+ }), o.totalWidth = E;
1274
+ let u = 0;
1275
1275
  return [...c].reverse().forEach((a) => {
1276
- const p = M(a);
1277
- d.indexes.push(p), d.positions[p] = C, C += a.width || n.minWidth;
1278
- }), d.totalWidth = C, d.rightIndexes = c.map(
1279
- (a) => M(a)
1276
+ const p = F(a);
1277
+ d.indexes.push(p), d.positions[p] = u, u += a.width || n.minWidth;
1278
+ }), d.totalWidth = u, d.rightIndexes = c.map(
1279
+ (a) => F(a)
1280
1280
  ), o.rightPinned = {
1281
1281
  indexes: d.indexes,
1282
1282
  positions: d.positions,
@@ -1290,14 +1290,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1290
1290
  return t;
1291
1291
  }, tn = (e, n = null, t = {}, r = {}) => (e.forEach((A) => {
1292
1292
  var o;
1293
- const i = M(A);
1293
+ const i = F(A);
1294
1294
  n && (t[n] || (t[n] = []), t[n].includes(i) || t[n].push(i), r[i] = n), A && A.children && ((o = A.children) == null ? void 0 : o.length) > 0 && (t[i] || (t[i] = []), tn(
1295
1295
  A.children || [],
1296
1296
  i,
1297
1297
  t,
1298
1298
  r
1299
1299
  ));
1300
- }), { parentToChildrenMap: t, childToParentMap: r }), Et = {
1300
+ }), { parentToChildrenMap: t, childToParentMap: r }), Ct = {
1301
1301
  [l.REORDER_COLUMNS]: "columnMoved",
1302
1302
  [l.SET_SELECTED_ROWS]: "selectionChanged",
1303
1303
  [l.TOGGLE_COLUMN_VISIBILITY]: "columnVisibilityChanged",
@@ -1316,7 +1316,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1316
1316
  [l.SET_PAGE]: "paginationChanged",
1317
1317
  [l.SET_PAGE_SIZE]: "paginationChanged",
1318
1318
  [l.TOGGLE_GROUP_EXPANSION]: "rowGroupToggled"
1319
- }, ut = [
1319
+ }, Et = [
1320
1320
  l.SET_COLUMNS,
1321
1321
  l.TOGGLE_COLUMN_VISIBILITY,
1322
1322
  l.REORDER_COLUMNS,
@@ -1339,22 +1339,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1339
1339
  state: r,
1340
1340
  column: A
1341
1341
  }) => {
1342
- var N, Q;
1342
+ var N, y;
1343
1343
  const { preventIfExceedsMaxWidth: i = !0 } = t, { newHierarchy: o, updatedColumns: d } = pt(
1344
1344
  r.columns,
1345
1345
  A,
1346
1346
  n,
1347
1347
  e
1348
- ), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0), u = (_) => {
1348
+ ), f = window.innerWidth * 0.6, c = r.frozenColumns.totalWidth - (((N = r.frozenColumns.rightPinned) == null ? void 0 : N.totalWidth) || 0), E = (_) => {
1349
1349
  let v = _.width || 150;
1350
1350
  return _.children && _.children.length > 0 && (v = _.children.reduce(
1351
- (K, j) => K + u(j),
1351
+ (X, K) => X + E(K),
1352
1352
  0
1353
1353
  )), v;
1354
- }, g = u(
1354
+ }, g = E(
1355
1355
  o || A
1356
- ), L = c + g > f;
1357
- if (n && L && i)
1356
+ ), P = c + g > f;
1357
+ if (n && P && i)
1358
1358
  return {
1359
1359
  ...r,
1360
1360
  notification: {
@@ -1366,129 +1366,129 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1366
1366
  };
1367
1367
  let a = -1;
1368
1368
  o && (a = d.findIndex((_) => {
1369
- const v = o.is_frozen, K = o.pinned, j = o.originalPath || o.path || [], q = _.originalPath || _.path || [];
1370
- return _.is_frozen === v && _.pinned === K && q[0] === j[0];
1369
+ const v = o.is_frozen, X = o.pinned, K = o.originalPath || o.path || [], q = _.originalPath || _.path || [];
1370
+ return _.is_frozen === v && _.pinned === X && q[0] === K[0];
1371
1371
  }));
1372
1372
  const p = [...d];
1373
1373
  o && a !== -1 ? p.splice(a, 0, o) : o && p.push(o);
1374
- const R = on(p), { processedColumns: P } = De(
1375
- R,
1374
+ const T = on(p), { processedColumns: D } = De(
1375
+ T,
1376
1376
  r.expandedColumnGroups,
1377
1377
  0,
1378
1378
  null,
1379
- ((Q = r.defaultColDef) == null ? void 0 : Q.minWidth) || 150
1380
- ), { columns: O, frozenData: U } = Be(
1381
- P,
1379
+ ((y = r.defaultColDef) == null ? void 0 : y.minWidth) || 150
1380
+ ), { columns: S, frozenData: U } = Be(
1381
+ D,
1382
1382
  r.defaultColDef || { minWidth: 150 }
1383
1383
  );
1384
1384
  return {
1385
1385
  ...r,
1386
- columns: O,
1386
+ columns: S,
1387
1387
  frozenColumns: U
1388
1388
  };
1389
1389
  }, pt = (e, n, t, r) => {
1390
- var L, a, p, R, P;
1391
- const A = ((L = n.path) == null ? void 0 : L.slice(0, -1)) || [], i = kn(e), o = ((p = (a = n.path) == null ? void 0 : a.slice(0, -1)) == null ? void 0 : p.join("/")) || "", d = i[(o == null ? void 0 : o.toLowerCase()) || ""], f = ((R = d == null ? void 0 : d.children) == null ? void 0 : R.length) || 0;
1390
+ var P, a, p, T, D;
1391
+ const A = ((P = n.path) == null ? void 0 : P.slice(0, -1)) || [], i = kn(e), o = ((p = (a = n.path) == null ? void 0 : a.slice(0, -1)) == null ? void 0 : p.join("/")) || "", d = i[(o == null ? void 0 : o.toLowerCase()) || ""], f = ((T = d == null ? void 0 : d.children) == null ? void 0 : T.length) || 0;
1392
1392
  let c = null;
1393
1393
  if (A.length === 0)
1394
1394
  return {
1395
1395
  newHierarchy: null,
1396
- updatedColumns: e.map((U) => M(U) === r ? {
1396
+ updatedColumns: e.map((U) => F(U) === r ? {
1397
1397
  ...U,
1398
1398
  is_frozen: t,
1399
1399
  pinned: t ? "left" : null
1400
1400
  } : U)
1401
1401
  };
1402
1402
  {
1403
- let O = null, U = null, N = "", Q = [];
1403
+ let S = null, U = null, N = "", y = [];
1404
1404
  for (let _ = 0; _ < A.length; _++) {
1405
1405
  const v = A[_];
1406
1406
  N = N ? `${N}/${v}` : v;
1407
- const K = i[N.toLowerCase()];
1408
- if (!K)
1407
+ const X = i[N.toLowerCase()];
1408
+ if (!X)
1409
1409
  continue;
1410
- const j = {
1411
- ...K,
1412
- ...t || f > 1 ? Sn(K, { path: Q }) : K,
1410
+ const K = {
1411
+ ...X,
1412
+ ...t || f > 1 ? On(X, { path: y }) : X,
1413
1413
  is_frozen: t,
1414
1414
  pinned: t ? "left" : null,
1415
1415
  children: []
1416
1416
  // Clear children as we'll rebuild the hierarchy
1417
1417
  };
1418
- Q = j.path || [], _ === 0 && (U = j), O && (O.children = [j]), O = j;
1418
+ y = K.path || [], _ === 0 && (U = K), S && (S.children = [K]), S = K;
1419
1419
  }
1420
- if (O) {
1421
- const _ = O.originalPath || (O.path ? O.path.map((q) => q.split(W)[0]) : []), v = M(n), K = v.split(W)[0], j = [..._, K];
1422
- O.children = [
1420
+ if (S) {
1421
+ const _ = S.originalPath || (S.path ? S.path.map((q) => q.split(W)[0]) : []), v = F(n), X = v.split(W)[0], K = [..._, X];
1422
+ S.children = [
1423
1423
  {
1424
1424
  ...n,
1425
1425
  is_frozen: t,
1426
1426
  pinned: t ? "left" : null,
1427
- originalPath: j,
1428
- path: [...O.path || [], v]
1427
+ originalPath: K,
1428
+ path: [...S.path || [], v]
1429
1429
  }
1430
1430
  ];
1431
1431
  }
1432
1432
  c = U;
1433
1433
  }
1434
- const u = (O, U) => {
1435
- let N = JSON.parse(JSON.stringify(O));
1436
- const Q = n.path || [];
1437
- if (Q.length === 0)
1434
+ const E = (S, U) => {
1435
+ let N = JSON.parse(JSON.stringify(S));
1436
+ const y = n.path || [];
1437
+ if (y.length === 0)
1438
1438
  return N.filter(
1439
- (j) => M(j) !== U
1439
+ (K) => F(K) !== U
1440
1440
  );
1441
- const _ = (j, q) => {
1442
- let ee = j, ne = null, $ = -1;
1441
+ const _ = (K, q) => {
1442
+ let ee = K, ne = null, $ = -1;
1443
1443
  for (let Z = 0; Z < q.length - 1; Z++) {
1444
- const te = q[Z], ae = ee.findIndex(
1445
- (se) => M(se) === te
1444
+ const re = q[Z], ae = ee.findIndex(
1445
+ (se) => F(se) === re
1446
1446
  );
1447
1447
  if (ae === -1)
1448
- return console.warn(`Could not find column with field ${te} in path`), { parent: null, targetIndex: -1 };
1448
+ return console.warn(`Could not find column with field ${re} in path`), { parent: null, targetIndex: -1 };
1449
1449
  ne = ee[ae], ee = ne.children || [];
1450
1450
  }
1451
1451
  if (q.length > 0) {
1452
1452
  const Z = q[q.length - 1];
1453
1453
  $ = ee.findIndex(
1454
- (te) => M(te) === Z
1454
+ (re) => F(re) === Z
1455
1455
  );
1456
1456
  }
1457
1457
  return { parent: ne, targetIndex: $ };
1458
- }, { parent: v, targetIndex: K } = _(N, Q);
1459
- if (v && v.children && K !== -1) {
1460
- const j = v.children[K];
1461
- if (j && M(j) === r)
1462
- v.children.splice(K, 1);
1458
+ }, { parent: v, targetIndex: X } = _(N, y);
1459
+ if (v && v.children && X !== -1) {
1460
+ const K = v.children[X];
1461
+ if (K && F(K) === r)
1462
+ v.children.splice(X, 1);
1463
1463
  else {
1464
1464
  const q = v.children.findIndex(
1465
- (ee) => M(ee) === r
1465
+ (ee) => F(ee) === r
1466
1466
  );
1467
1467
  q !== -1 && v.children.splice(q, 1);
1468
1468
  }
1469
1469
  if (v.children.length === 0) {
1470
1470
  const q = N.findIndex(
1471
- ($) => M($) === (v.path || [])[0]
1472
- ), ee = ($, Z, te) => {
1473
- if (te === -1 || !$[te]) return $;
1474
- const ae = $[te], se = Z || ae;
1475
- if (M(se) === M(ae)) {
1471
+ ($) => F($) === (v.path || [])[0]
1472
+ ), ee = ($, Z, re) => {
1473
+ if (re === -1 || !$[re]) return $;
1474
+ const ae = $[re], se = Z || ae;
1475
+ if (F(se) === F(ae)) {
1476
1476
  if (se.children && se.children.length > 0)
1477
1477
  return $;
1478
- $.splice(te, 1);
1478
+ $.splice(re, 1);
1479
1479
  } else {
1480
1480
  const fe = (ie, ce, Ae = null) => {
1481
1481
  if (!ie.children || ie.children.length === 0)
1482
1482
  return !1;
1483
- const ue = ie.children.findIndex(
1484
- (k) => M(k) === M(ce)
1483
+ const Ee = ie.children.findIndex(
1484
+ (k) => F(k) === F(ce)
1485
1485
  );
1486
- if (ue !== -1) {
1487
- const k = ie.children[ue];
1486
+ if (Ee !== -1) {
1487
+ const k = ie.children[Ee];
1488
1488
  if (!k.children || k.children.length === 0) {
1489
- if (ie.children.splice(ue, 1), ie.children.length === 0 && (Ae != null && Ae.children)) {
1490
- const V = M(ie), le = Ae.children.findIndex(
1491
- (s) => M(s) === V
1489
+ if (ie.children.splice(Ee, 1), ie.children.length === 0 && (Ae != null && Ae.children)) {
1490
+ const V = F(ie), le = Ae.children.findIndex(
1491
+ (s) => F(s) === V
1492
1492
  );
1493
1493
  le !== -1 && Ae.children.splice(le, 1);
1494
1494
  }
@@ -1499,8 +1499,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1499
1499
  for (const k of ie.children)
1500
1500
  if (fe(k, ce, ie)) {
1501
1501
  if (ie.children.length === 0 && (Ae != null && Ae.children)) {
1502
- const V = M(ie), le = Ae.children.findIndex(
1503
- (s) => M(s) === V
1502
+ const V = F(ie), le = Ae.children.findIndex(
1503
+ (s) => F(s) === V
1504
1504
  );
1505
1505
  le !== -1 && Ae.children.splice(le, 1);
1506
1506
  }
@@ -1514,26 +1514,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1514
1514
  null
1515
1515
  ) || console.warn(
1516
1516
  "Could not find nested parent to remove:",
1517
- M(se)
1518
- ), (!ae.children || ae.children.length === 0) && $.splice(te, 1);
1517
+ F(se)
1518
+ ), (!ae.children || ae.children.length === 0) && $.splice(re, 1);
1519
1519
  }
1520
1520
  if (se.path && se.path.length > 1) {
1521
1521
  const fe = se.path.slice(0, -1), ie = ((ce, Ae) => {
1522
1522
  if (Ae.length === 0) return -1;
1523
1523
  if (Ae.length === 1)
1524
1524
  return ce.findIndex(
1525
- (V) => M(V) === Ae[0]
1525
+ (V) => F(V) === Ae[0]
1526
1526
  );
1527
- let ue = ce, k = -1;
1527
+ let Ee = ce, k = -1;
1528
1528
  for (let V = 0; V < Ae.length - 1; V++) {
1529
1529
  const le = Ae[V];
1530
- if (k = ue.findIndex(
1531
- (s) => M(s) === le
1530
+ if (k = Ee.findIndex(
1531
+ (s) => F(s) === le
1532
1532
  ), k === -1) return -1;
1533
- ue = ue[k].children || [];
1533
+ Ee = Ee[k].children || [];
1534
1534
  }
1535
- return ue.findIndex(
1536
- (V) => M(V) === Ae[Ae.length - 1]
1535
+ return Ee.findIndex(
1536
+ (V) => F(V) === Ae[Ae.length - 1]
1537
1537
  );
1538
1538
  })($, fe);
1539
1539
  if (ie !== -1) {
@@ -1557,14 +1557,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1557
1557
  if (!$) return null;
1558
1558
  if (Array.isArray($))
1559
1559
  return $.map(
1560
- (te) => ne(te)
1560
+ (re) => ne(re)
1561
1561
  );
1562
1562
  const Z = {
1563
1563
  ...$
1564
1564
  // ...removeUniqueHierarchyFieldName(column),
1565
1565
  };
1566
1566
  return $.children && $.children.length > 0 && (Z.children = $.children.map(
1567
- (te) => ne(te)
1567
+ (re) => ne(re)
1568
1568
  )), Z;
1569
1569
  };
1570
1570
  c = ne(
@@ -1578,19 +1578,19 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1578
1578
  return N;
1579
1579
  };
1580
1580
  let g = e;
1581
- if (t || (((P = n.path) == null ? void 0 : P.length) || 0) > 1)
1582
- g = u(
1581
+ if (t || (((D = n.path) == null ? void 0 : D.length) || 0) > 1)
1582
+ g = E(
1583
1583
  e,
1584
1584
  r
1585
1585
  );
1586
1586
  else {
1587
- const O = e.findIndex(
1588
- (N) => M(N) === (n.path || [])[0]
1587
+ const S = e.findIndex(
1588
+ (N) => F(N) === (n.path || [])[0]
1589
1589
  );
1590
- O !== -1 && g.splice(O, 1);
1590
+ S !== -1 && g.splice(S, 1);
1591
1591
  const U = n.originalPath ? e.findIndex(
1592
- (N) => M(N) === (n.originalPath || [])[0]
1593
- ) : O;
1592
+ (N) => F(N) === (n.originalPath || [])[0]
1593
+ ) : S;
1594
1594
  U && c && g.splice(
1595
1595
  U,
1596
1596
  0,
@@ -1613,33 +1613,33 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1613
1613
  if (t.length) {
1614
1614
  let i = 0;
1615
1615
  t.forEach(({ rowId: o, rowIndex: d }) => {
1616
- var u;
1616
+ var E;
1617
1617
  let f = 0;
1618
1618
  Object.keys(A).forEach((g) => {
1619
1619
  g.startsWith(o) && (f += A[g].childRowsCount);
1620
1620
  });
1621
1621
  const c = d - i;
1622
- (u = r == null ? void 0 : r[c]) == null || delete u.__rowSpanInfo, r.splice(c + 1, f), i += f;
1622
+ (E = r == null ? void 0 : r[c]) == null || delete E.__rowSpanInfo, r.splice(c + 1, f), i += f;
1623
1623
  });
1624
1624
  }
1625
1625
  return r;
1626
1626
  }, me = (e, n, t = !0, r, A) => {
1627
- var o, d, f, c, u, g, C, L, a;
1627
+ var o, d, f, c, E, g, u, P, a;
1628
1628
  const i = (d = (o = e.api) == null ? void 0 : o.getInfiniteCacheInstance) == null ? void 0 : d.call(o);
1629
1629
  (f = i == null ? void 0 : i.updatePageData) == null || f.call(i, e.pagination.page, n, !0, {
1630
1630
  isRefreshData: !1
1631
- }), !e.serverSide && t && ((a = (L = (C = (g = (u = (c = e.api) == null ? void 0 : c.getInfiniteCache) == null ? void 0 : u.call(c)) == null ? void 0 : g.params) == null ? void 0 : C.datasource) == null ? void 0 : L.updateData) == null || a.call(
1632
- L,
1631
+ }), !e.serverSide && t && ((a = (P = (u = (g = (E = (c = e.api) == null ? void 0 : c.getInfiniteCache) == null ? void 0 : E.call(c)) == null ? void 0 : g.params) == null ? void 0 : u.datasource) == null ? void 0 : P.updateData) == null || a.call(
1632
+ P,
1633
1633
  e,
1634
1634
  n.filter((p) => !(p.__parentPath || p.isChildGroup)),
1635
1635
  r,
1636
1636
  A
1637
1637
  ));
1638
- }, Cn = (e) => {
1638
+ }, un = (e) => {
1639
1639
  var t, r;
1640
1640
  const n = (r = (t = e.api) == null ? void 0 : t.getInfiniteRowModel) == null ? void 0 : r.call(t);
1641
1641
  n && n.infiniteCache && n.infiniteCache.purgeCache && n.infiniteCache.purgeCache({ isRefreshData: !1 });
1642
- }, ke = (e) => Object.keys(e.expandedChildRows).length === 0, En = (e, n) => {
1642
+ }, ke = (e) => Object.keys(e.expandedChildRows).length === 0, Cn = (e, n) => {
1643
1643
  var r, A;
1644
1644
  const t = (A = (r = e.current) == null ? void 0 : r.querySelectorAll) == null ? void 0 : A.call(
1645
1645
  r,
@@ -1665,27 +1665,27 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1665
1665
  getSelectedRows: () => {
1666
1666
  const i = [];
1667
1667
  let o = [];
1668
- const { serverSide: d, data: f, api: c } = e, u = c == null ? void 0 : c.getInfiniteCache();
1669
- d && u ? o = u.getAllCachedData() || f : !d && u && (o = u.params.datasource.getWholeData() || f);
1668
+ const { serverSide: d, data: f, api: c } = e, E = c == null ? void 0 : c.getInfiniteCache();
1669
+ d && E ? o = E.getAllCachedData() || f : !d && E && (o = E.params.datasource.getWholeData() || f);
1670
1670
  let g = e.selectedRows;
1671
1671
  if (Array.isArray(n.payload)) {
1672
1672
  if (Array.isArray(n.payload) && (g = n.payload, o && g && g.length > 0)) {
1673
- const C = new Set(g.map(String));
1674
- for (let L = 0; L < o.length; L++) {
1675
- const a = o[L];
1673
+ const u = new Set(g.map(String));
1674
+ for (let P = 0; P < o.length; P++) {
1675
+ const a = o[P];
1676
1676
  if (!a) continue;
1677
1677
  const p = a[e.uniqueIdField] || a.id;
1678
- if (p !== void 0 && C.has(String(p)) && (i.push(a), i.length === g.length))
1678
+ if (p !== void 0 && u.has(String(p)) && (i.push(a), i.length === g.length))
1679
1679
  break;
1680
1680
  }
1681
1681
  }
1682
- } else return n.payload ? o.filter((C) => !C.__parentPath) : [];
1682
+ } else return n.payload ? o.filter((u) => !u.__parentPath) : [];
1683
1683
  return i;
1684
1684
  },
1685
1685
  getSelectedRowsID: () => {
1686
1686
  let i = e.selectedRows, o = [];
1687
- const { serverSide: d, data: f, api: c } = e, u = c == null ? void 0 : c.getInfiniteCache();
1688
- if (d && u ? o = u.getAllCachedData() || f : !d && u && (o = u.params.datasource.getWholeData() || f), Array.isArray(n.payload))
1687
+ const { serverSide: d, data: f, api: c } = e, E = c == null ? void 0 : c.getInfiniteCache();
1688
+ if (d && E ? o = E.getAllCachedData() || f : !d && E && (o = E.params.datasource.getWholeData() || f), Array.isArray(n.payload))
1689
1689
  Array.isArray(n.payload) && (i = n.payload);
1690
1690
  else return n.payload ? o.filter((g) => !g.__parentPath).map((g) => g[e.uniqueIdField]) : [];
1691
1691
  return i;
@@ -1708,10 +1708,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1708
1708
  let A = e.filteredData;
1709
1709
  if (e.isSingleSelect) {
1710
1710
  const f = n ? [t] : [], c = n ? { [t]: !0 } : {};
1711
- return A = A == null ? void 0 : A.map((u) => u.is_selected && !n && t === String(u[e.uniqueIdField]) ? {
1712
- ...u,
1711
+ return A = A == null ? void 0 : A.map((E) => E.is_selected && !n && t === String(E[e.uniqueIdField]) ? {
1712
+ ...E,
1713
1713
  is_selected: !1
1714
- } : u), {
1714
+ } : E), {
1715
1715
  selectedRowsUpdated: f,
1716
1716
  unCheckedRowsUpdated: e.unCheckedRows,
1717
1717
  selectedRowsObjectUpdated: c,
@@ -1786,13 +1786,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1786
1786
  const i = Ln(A, n);
1787
1787
  r.push(...i);
1788
1788
  }), r;
1789
- }, un = (e, n, t) => {
1789
+ }, En = (e, n, t) => {
1790
1790
  if (!n || !n.aggFunc)
1791
1791
  return null;
1792
1792
  const r = Ln(e, t);
1793
1793
  if (r.length === 0)
1794
1794
  return null;
1795
- const A = M(n), i = r.map((f) => Number(String(f[A]).replaceAll(",", ""))).filter((f) => f != null && !isNaN(f));
1795
+ const A = F(n), i = r.map((f) => Number(String(f[A]).replaceAll(",", ""))).filter((f) => f != null && !isNaN(f));
1796
1796
  if (i.length === 0)
1797
1797
  return null;
1798
1798
  const o = n.aggFunc, d = wt[o];
@@ -1800,7 +1800,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1800
1800
  `Aggregation function '${o}' not found for column '${A}'`
1801
1801
  ), null);
1802
1802
  }, ye = (e, n, t, r, A, i) => {
1803
- var f, c, u;
1803
+ var f, c, E;
1804
1804
  const o = {
1805
1805
  __isAggregationRow: !0,
1806
1806
  __parentId: i,
@@ -1814,26 +1814,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1814
1814
  groupingLevel: r
1815
1815
  }, d = e.columns.filter((g) => g.aggFunc);
1816
1816
  for (let g = 0; g < e.columns.length; g++) {
1817
- const C = e.columns[g], L = M(C);
1818
- if ((f = C == null ? void 0 : C.extra) != null && f.is_grouping_key && (t != null && t[L]) || C.rowGroup && !C.is_hidden) {
1819
- const a = (c = C == null ? void 0 : C.originalFields) != null && c[r] ? C.originalFields[r] : L, p = (u = C == null ? void 0 : C.originalFields) != null && u[r - 1] ? C.originalFields[r - 1] : L;
1817
+ const u = e.columns[g], P = F(u);
1818
+ if ((f = u == null ? void 0 : u.extra) != null && f.is_grouping_key && (t != null && t[P]) || u.rowGroup && !u.is_hidden) {
1819
+ const a = (c = u == null ? void 0 : u.originalFields) != null && c[r] ? u.originalFields[r] : P, p = (E = u == null ? void 0 : u.originalFields) != null && E[r - 1] ? u.originalFields[r - 1] : P;
1820
1820
  o[a] = t != null && t[p] ? `Total ${(t == null ? void 0 : t[p]) || ""}` : "Total", t != null && t[p] ? (o.grandTotalAggreRow = !1, o.subTotalAggreRow = !0) : (o.isGrandTotalRow = !0, o.grandTotalAggreRow = !0, o.subTotalAggreRow = !1);
1821
1821
  break;
1822
1822
  }
1823
1823
  }
1824
1824
  return d.forEach((g) => {
1825
1825
  if (g.aggFunc) {
1826
- const C = un(
1826
+ const u = En(
1827
1827
  t,
1828
1828
  g,
1829
1829
  e.childKeyField
1830
- ), L = M(g);
1831
- o[L] = C, n && n.length && (n = n.map((a) => {
1832
- const p = un(
1830
+ ), P = F(g);
1831
+ o[P] = u, n && n.length && (n = n.map((a) => {
1832
+ const p = En(
1833
1833
  a,
1834
1834
  g,
1835
1835
  e.childKeyField
1836
- ), R = a == null ? void 0 : a[e.childKeyField], P = Array.isArray(R) && R.length > 0;
1836
+ ), T = a == null ? void 0 : a[e.childKeyField], D = Array.isArray(T) && T.length > 0;
1837
1837
  return {
1838
1838
  ...a,
1839
1839
  __parentPath: a.__parentPath ? `${a.__parentPath}${String(a.__parentPath).includes(String(i)) ? "" : `/${i}`}` : String(i),
@@ -1841,9 +1841,9 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1841
1841
  parentRowIndex: A,
1842
1842
  parentRowData: t,
1843
1843
  groupingLevel: r,
1844
- [L]: p,
1845
- __isAggregationRow: !!P,
1846
- subTotalAggreRow: !!P
1844
+ [P]: p,
1845
+ __isAggregationRow: !!D,
1846
+ subTotalAggreRow: !!D
1847
1847
  };
1848
1848
  }));
1849
1849
  }
@@ -1852,61 +1852,61 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1852
1852
  aggreChildRows: n
1853
1853
  };
1854
1854
  }, fr = (e, n, t, r, A, i) => {
1855
- var u, g;
1856
- const o = t.parentRowIndex || r, d = e.columns.some((C) => C.aggFunc), f = ((u = t.__parentPath) == null ? void 0 : u.split("/").length) || 0;
1855
+ var E, g;
1856
+ const o = t.parentRowIndex || r, d = e.columns.some((u) => u.aggFunc), f = ((E = t.__parentPath) == null ? void 0 : E.split("/").length) || 0;
1857
1857
  let c = null;
1858
1858
  if (d && f) {
1859
- const C = n[o], L = C[i], a = C[e.childKeyField], p = Object.keys(
1859
+ const u = n[o], P = u[i], a = u[e.childKeyField], p = Object.keys(
1860
1860
  e.expandedChildRows
1861
- ).reduce((Q, _) => (_.startsWith(String(L)) && (Q += e.expandedChildRows[_].childRowsCount), Q), 0), R = !!C.__parentPath;
1862
- let P;
1863
- if (R) {
1864
- P = o + (a == null ? void 0 : a.length) + 1;
1865
- let Q = 0;
1861
+ ).reduce((y, _) => (_.startsWith(String(P)) && (y += e.expandedChildRows[_].childRowsCount), y), 0), T = !!u.__parentPath;
1862
+ let D;
1863
+ if (T) {
1864
+ D = o + (a == null ? void 0 : a.length) + 1;
1865
+ let y = 0;
1866
1866
  Object.keys(e.expandedChildRows).forEach((_) => {
1867
- const v = String(_).split("/"), K = String(L), j = v.indexOf(K);
1868
- j >= 0 && j < v.length - 1 && (Q += e.expandedChildRows[_].childRowsCount);
1869
- }), P += Q;
1867
+ const v = String(_).split("/"), X = String(P), K = v.indexOf(X);
1868
+ K >= 0 && K < v.length - 1 && (y += e.expandedChildRows[_].childRowsCount);
1869
+ }), D += y;
1870
1870
  } else
1871
- P = p;
1872
- const { aggreRow: O } = ye(
1871
+ D = p;
1872
+ const { aggreRow: S } = ye(
1873
1873
  e,
1874
1874
  a,
1875
- C,
1875
+ u,
1876
1876
  f,
1877
1877
  o,
1878
1878
  A
1879
1879
  );
1880
- n[P] = O;
1881
- let U = { ...O };
1882
- if (R) {
1883
- let Q = f - 1;
1884
- for (; Q !== 0; ) {
1885
- const _ = U.parentRowIndex, v = ((g = n[_]) == null ? void 0 : g.parentRowIndex) || _, K = v >= 0 ? v : _;
1886
- if (K >= 0) {
1887
- const j = n[K], q = j[i], ee = j[e.childKeyField], { aggreRow: ne } = ye(
1880
+ n[D] = S;
1881
+ let U = { ...S };
1882
+ if (T) {
1883
+ let y = f - 1;
1884
+ for (; y !== 0; ) {
1885
+ const _ = U.parentRowIndex, v = ((g = n[_]) == null ? void 0 : g.parentRowIndex) || _, X = v >= 0 ? v : _;
1886
+ if (X >= 0) {
1887
+ const K = n[X], q = K[i], ee = K[e.childKeyField], { aggreRow: ne } = ye(
1888
1888
  e,
1889
1889
  ee,
1890
- j,
1891
- Q,
1892
1890
  K,
1891
+ y,
1892
+ X,
1893
1893
  q
1894
- ), $ = !!j.__parentPath;
1894
+ ), $ = !!K.__parentPath;
1895
1895
  let Z;
1896
1896
  if ($) {
1897
- Z = K + (ee == null ? void 0 : ee.length) + 1;
1898
- let te = 0;
1897
+ Z = X + (ee == null ? void 0 : ee.length) + 1;
1898
+ let re = 0;
1899
1899
  Object.keys(e.expandedChildRows).forEach((ae) => {
1900
- const se = String(ae).split("/"), Ee = String(q), fe = se.indexOf(Ee);
1901
- fe >= 0 && fe < se.length - 1 && (te += e.expandedChildRows[ae].childRowsCount);
1902
- }), Z += te;
1900
+ const se = String(ae).split("/"), Ce = String(q), fe = se.indexOf(Ce);
1901
+ fe >= 0 && fe < se.length - 1 && (re += e.expandedChildRows[ae].childRowsCount);
1902
+ }), Z += re;
1903
1903
  } else
1904
1904
  Z = Object.keys(
1905
1905
  e.expandedChildRows
1906
- ).reduce((te, ae) => (ae.startsWith(String(q)) && (te += e.expandedChildRows[ae].childRowsCount), te), 0);
1907
- n[Z] = ne, U = ne, Q--;
1906
+ ).reduce((re, ae) => (ae.startsWith(String(q)) && (re += e.expandedChildRows[ae].childRowsCount), re), 0);
1907
+ n[Z] = ne, U = ne, y--;
1908
1908
  } else
1909
- Q = 0;
1909
+ y = 0;
1910
1910
  }
1911
1911
  }
1912
1912
  const { aggreRow: N } = ye(
@@ -1919,7 +1919,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1919
1919
  );
1920
1920
  c = N;
1921
1921
  } else if (d) {
1922
- const { aggreRow: C } = ye(
1922
+ const { aggreRow: u } = ye(
1923
1923
  e,
1924
1924
  [],
1925
1925
  { [e.childKeyField]: n },
@@ -1927,7 +1927,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1927
1927
  0,
1928
1928
  null
1929
1929
  );
1930
- c = C;
1930
+ c = u;
1931
1931
  }
1932
1932
  return {
1933
1933
  updatedData: n,
@@ -1952,7 +1952,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1952
1952
  });
1953
1953
  });
1954
1954
  }), t;
1955
- }, Cr = (e, n, t = "id", r, A) => {
1955
+ }, ur = (e, n, t = "id", r, A) => {
1956
1956
  if (!n || !e || !e.length)
1957
1957
  return {
1958
1958
  processedData: e || [],
@@ -1966,64 +1966,64 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
1966
1966
  };
1967
1967
  const o = {}, d = [...e];
1968
1968
  return i.forEach((f) => {
1969
- var u;
1969
+ var E;
1970
1970
  const c = /* @__PURE__ */ new Map();
1971
1971
  for (let g = 0; g < e.length; g++) {
1972
- const C = e[g];
1973
- delete C.__rowSpanInfo;
1974
- const L = C[t];
1975
- o[L] || (o[L] = {});
1976
- const a = o[L][f];
1972
+ const u = e[g];
1973
+ delete u.__rowSpanInfo;
1974
+ const P = u[t];
1975
+ o[P] || (o[P] = {});
1976
+ const a = o[P][f];
1977
1977
  if (!(a && a.span === 0))
1978
1978
  if (A && typeof A == "function") {
1979
1979
  const p = A(
1980
1980
  {
1981
- node: { rowIndex: g, data: C, api: r },
1981
+ node: { rowIndex: g, data: u, api: r },
1982
1982
  api: r,
1983
- data: C,
1983
+ data: u,
1984
1984
  wholeData: e
1985
1985
  },
1986
1986
  f
1987
1987
  );
1988
1988
  if (typeof p == "number") {
1989
- if (o[L][f] = {
1989
+ if (o[P][f] = {
1990
1990
  span: p,
1991
1991
  isFirst: p > 0,
1992
1992
  isLast: p <= 1
1993
- }, p > 1 && (o[L].isRowSpan = !0), p > 1) {
1994
- const R = [L];
1995
- for (let P = 1; P < p; P++) {
1996
- const O = g + P;
1997
- if (O < e.length) {
1998
- const U = e[O][t];
1999
- R.push(U), o[U] || (o[U] = {}), o[U][f] = {
1993
+ }, p > 1 && (o[P].isRowSpan = !0), p > 1) {
1994
+ const T = [P];
1995
+ for (let D = 1; D < p; D++) {
1996
+ const S = g + D;
1997
+ if (S < e.length) {
1998
+ const U = e[S][t];
1999
+ T.push(U), o[U] || (o[U] = {}), o[U][f] = {
2000
2000
  span: 0,
2001
2001
  isFirst: !1,
2002
- isLast: P === p - 1
2002
+ isLast: D === p - 1
2003
2003
  };
2004
2004
  }
2005
2005
  }
2006
- o[L][f].rowIds = R;
2006
+ o[P][f].rowIds = T;
2007
2007
  }
2008
2008
  } else
2009
- o[L][f] = {
2009
+ o[P][f] = {
2010
2010
  span: 1,
2011
2011
  isFirst: !0,
2012
2012
  isLast: !0
2013
2013
  };
2014
2014
  } else {
2015
- const p = C[f];
2015
+ const p = u[f];
2016
2016
  c.has(p) || c.set(p, []), c.get(p).push({
2017
2017
  index: g,
2018
- rowId: L,
2019
- rowData: C
2018
+ rowId: P,
2019
+ rowData: u
2020
2020
  });
2021
2021
  }
2022
2022
  }
2023
2023
  if (!(A && typeof A == "function"))
2024
- for (const [g, C] of c.entries()) {
2025
- if (C.length <= 1) {
2026
- const a = (u = C[0]) == null ? void 0 : u.rowId;
2024
+ for (const [g, u] of c.entries()) {
2025
+ if (u.length <= 1) {
2026
+ const a = (E = u[0]) == null ? void 0 : E.rowId;
2027
2027
  a && (o[a] || (o[a] = {}), o[a][f] = {
2028
2028
  span: 1,
2029
2029
  isFirst: !0,
@@ -2031,14 +2031,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2031
2031
  });
2032
2032
  continue;
2033
2033
  }
2034
- const L = C.map((a) => a.rowId);
2035
- C.forEach((a, p) => {
2036
- const R = a.rowId;
2037
- o[R] || (o[R] = {}), o[R][f] = {
2038
- span: p === 0 ? C.length : 0,
2034
+ const P = u.map((a) => a.rowId);
2035
+ u.forEach((a, p) => {
2036
+ const T = a.rowId;
2037
+ o[T] || (o[T] = {}), o[T][f] = {
2038
+ span: p === 0 ? u.length : 0,
2039
2039
  isFirst: p === 0,
2040
- isLast: p === C.length - 1,
2041
- rowIds: p === 0 ? L : void 0
2040
+ isLast: p === u.length - 1,
2041
+ rowIds: p === 0 ? P : void 0
2042
2042
  // Store row IDs only in the first row
2043
2043
  };
2044
2044
  });
@@ -2094,8 +2094,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2094
2094
  let d = !1;
2095
2095
  r.forEach((f) => {
2096
2096
  if (f === "Selection") {
2097
- const u = i.__rowSpanInfo && i.__rowSpanInfo[f];
2098
- u != null && u.span && (u == null ? void 0 : u.span) > 1 && (d = !0);
2097
+ const E = i.__rowSpanInfo && i.__rowSpanInfo[f];
2098
+ E != null && E.span && (E == null ? void 0 : E.span) > 1 && (d = !0);
2099
2099
  return;
2100
2100
  }
2101
2101
  const c = hn(
@@ -2116,10 +2116,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2116
2116
  }), c > 1 && (d = !0);
2117
2117
  }), d && (i.__rowSpanInfo.isRowSpan = !0);
2118
2118
  }), A;
2119
- }, Er = (e, n) => {
2119
+ }, Cr = (e, n) => {
2120
2120
  var r;
2121
- return (r = e.data) != null && r.__rowSpanInfo && e.data.__rowSpanInfo[n] ? e.data.__rowSpanInfo[n].span || 1 : Tt(e, n) ? 0 : yn(e, n);
2122
- }, Tt = (e, n) => {
2121
+ return (r = e.data) != null && r.__rowSpanInfo && e.data.__rowSpanInfo[n] ? e.data.__rowSpanInfo[n].span || 1 : Rt(e, n) ? 0 : yn(e, n);
2122
+ }, Rt = (e, n) => {
2123
2123
  var o, d;
2124
2124
  const t = e.api.getRowData(e, n), r = e.node.rowIndex - 1, A = r >= 0 ? e.api.getDisplayedRowAtIndex(
2125
2125
  r,
@@ -2137,7 +2137,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2137
2137
  e.wholeData,
2138
2138
  e.api
2139
2139
  );
2140
- return !t || !Rt(e.node, t, n) || e.node.rowIndex === ((A = (r = e.api) == null ? void 0 : r.rowRenderer) == null ? void 0 : A.lastRenderedRow) ? 1 : 1 + yn(
2140
+ return !t || !Tt(e.node, t, n) || e.node.rowIndex === ((A = (r = e.api) == null ? void 0 : r.rowRenderer) == null ? void 0 : A.lastRenderedRow) ? 1 : 1 + yn(
2141
2141
  {
2142
2142
  ...e,
2143
2143
  node: t,
@@ -2145,7 +2145,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2145
2145
  },
2146
2146
  n
2147
2147
  );
2148
- }, Rt = (e, n, t) => {
2148
+ }, Tt = (e, n, t) => {
2149
2149
  const r = e.api.getRowData(
2150
2150
  { node: e, data: e.data, api: e.api },
2151
2151
  t
@@ -2154,7 +2154,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2154
2154
  t
2155
2155
  ) : void 0;
2156
2156
  return n !== null && r === A;
2157
- }, ur = (e, n, t = "id", r) => {
2157
+ }, Er = (e, n, t = "id", r) => {
2158
2158
  if (!n || !e || !e.length)
2159
2159
  return {
2160
2160
  processedData: e || [],
@@ -2170,38 +2170,38 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2170
2170
  e,
2171
2171
  r || ["wp", "iaf", "ly"]
2172
2172
  ), o = {}, d = [...i], f = /* @__PURE__ */ new Map();
2173
- return i.forEach((c, u) => {
2173
+ return i.forEach((c, E) => {
2174
2174
  if (!c.__flattenedRowId) {
2175
- const C = c[t] || u;
2176
- f.has(C) || f.set(C, []), f.get(C).push({ row: c, index: u });
2175
+ const u = c[t] || E;
2176
+ f.has(u) || f.set(u, []), f.get(u).push({ row: c, index: E });
2177
2177
  return;
2178
2178
  }
2179
2179
  const g = c.__flattenedRowId.split("__")[0];
2180
- f.has(g) || f.set(g, []), f.get(g).push({ row: c, index: u });
2180
+ f.has(g) || f.set(g, []), f.get(g).push({ row: c, index: E });
2181
2181
  }), A.forEach((c) => {
2182
- for (const [u, g] of f.entries()) {
2183
- const C = g.length;
2182
+ for (const [E, g] of f.entries()) {
2183
+ const u = g.length;
2184
2184
  g.sort((a, p) => {
2185
- const R = a.row.__split, P = p.row.__split, O = (R == null ? void 0 : R.index) ?? 0, U = (P == null ? void 0 : P.index) ?? 0;
2186
- return O - U;
2185
+ const T = a.row.__split, D = p.row.__split, S = (T == null ? void 0 : T.index) ?? 0, U = (D == null ? void 0 : D.index) ?? 0;
2186
+ return S - U;
2187
2187
  });
2188
- const L = g.map(
2188
+ const P = g.map(
2189
2189
  (a) => a.row[t] || a.row.__flattenedRowId || a.index
2190
2190
  );
2191
2191
  g.forEach((a, p) => {
2192
- const { row: R, index: P } = a, O = R[t] || R.__flattenedRowId || P;
2193
- o[O] || (o[O] = {}), o[O][c] = {
2194
- span: p === 0 ? C : 0,
2192
+ const { row: T, index: D } = a, S = T[t] || T.__flattenedRowId || D;
2193
+ o[S] || (o[S] = {}), o[S][c] = {
2194
+ span: p === 0 ? u : 0,
2195
2195
  isFirst: p === 0,
2196
- isLast: p === C - 1,
2197
- rowIds: p === 0 ? L : void 0
2196
+ isLast: p === u - 1,
2197
+ rowIds: p === 0 ? P : void 0
2198
2198
  // Store row IDs only in the first row
2199
- }, C > 1 && p === 0 && (o[O].isRowSpan = !0);
2199
+ }, u > 1 && p === 0 && (o[S].isRowSpan = !0);
2200
2200
  });
2201
2201
  }
2202
2202
  }), d.forEach((c) => {
2203
- const u = c[t] || c.__flattenedRowId || c.id;
2204
- c.__rowSpanInfo = o[u] || {};
2203
+ const E = c[t] || c.__flattenedRowId || c.id;
2204
+ c.__rowSpanInfo = o[E] || {};
2205
2205
  }), {
2206
2206
  processedData: d,
2207
2207
  rowSpanMap: o
@@ -2396,7 +2396,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2396
2396
  disableCurrentPageRecords: !1,
2397
2397
  showForceLoading: !1
2398
2398
  }, mt = (e, n) => {
2399
- var t, r, A, i, o, d, f, c, u, g, C, L, a, p, R, P, O, U, N, Q, _, v, K, j, q, ee, ne, $, Z, te, ae, se, Ee, fe, he, ie, ce, Ae, ue, k, V, le;
2399
+ var t, r, A, i, o, d, f, c, E, g, u, P, a, p, T, D, S, U, N, y, _, v, X, K, q, ee, ne, $, Z, re, ae, se, Ce, fe, he, ie, ce, Ae, Ee, k, V, le;
2400
2400
  switch (n.type) {
2401
2401
  case l.SET_LOADING:
2402
2402
  return {
@@ -2409,12 +2409,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2409
2409
  tableId: n.payload
2410
2410
  };
2411
2411
  case l.SET_DATA: {
2412
- const { isCountUnknown: s, totalItems: E, totalPages: h, currentPage: B } = n.meta || {}, w = e.columns.some((S) => S.aggFunc), I = B || e.pagination.page || 1;
2412
+ const { isCountUnknown: s, totalItems: C, totalPages: h, currentPage: B } = n.meta || {}, w = e.columns.some((j) => j.aggFunc), I = B || e.pagination.page || 1;
2413
2413
  let m = null;
2414
2414
  const G = e.aggregationTotalRow && ((t = e.aggregationTotalRow) == null ? void 0 : t[I]);
2415
- let F = e.aggregationTotalRow;
2415
+ let b = e.aggregationTotalRow;
2416
2416
  if (w && !G) {
2417
- const { aggreRow: S } = ye(
2417
+ const { aggreRow: j } = ye(
2418
2418
  e,
2419
2419
  [],
2420
2420
  { [e.childKeyField]: n.payload },
@@ -2422,47 +2422,60 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2422
2422
  0,
2423
2423
  null
2424
2424
  );
2425
- m = S, F = {
2425
+ m = j, b = {
2426
2426
  ...e.aggregationTotalRow,
2427
2427
  [I]: m
2428
2428
  };
2429
2429
  } else G && (m = G);
2430
2430
  const x = n.payload;
2431
- if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) && s === e.isCountUnknown && E === e.totalItems && h === e.totalPages && B === e.currentPage && !m)
2431
+ if ((r = e.data) != null && r.length && JSON.stringify(x) === JSON.stringify(e.data) && s === e.isCountUnknown && C === e.totalItems && h === e.totalPages && B === e.currentPage && !m)
2432
2432
  return e;
2433
- const D = x.map((S) => (delete S._animationState, delete S._isDraggedRow, S)), y = [...e.selectedRows], z = {
2433
+ const O = x.map((j) => (delete j._animationState, delete j._isDraggedRow, j)), L = [...e.selectedRows], z = {
2434
2434
  ...e.selectedRowsObject
2435
- };
2436
- for (let S = 0; S < D.length; S++) {
2437
- const T = D[S];
2438
- if (T.is_selected && _e(
2435
+ }, Q = [...e.checkConfiguration];
2436
+ let R = e.prevAction;
2437
+ for (let j = 0; j < O.length; j++) {
2438
+ const H = O[j];
2439
+ if (H.is_selected && _e(
2439
2440
  e.rowSelectionRef,
2440
- S,
2441
- T,
2441
+ j,
2442
+ H,
2442
2443
  e.uniqueIdField
2443
2444
  ) || e.serverSide && e.removeSelectionOnOperation && e.isSelectAllRecords) {
2444
- const X = String(T[e.uniqueIdField]);
2445
- y.push(X), z[X] = !0;
2445
+ const M = String(H[e.uniqueIdField]);
2446
+ if (L.push(M), z[M] = !0, R === "checkedRows") {
2447
+ const te = Q.pop();
2448
+ Q.push({
2449
+ checkedRows: [
2450
+ .../* @__PURE__ */ new Set([...(te == null ? void 0 : te.checkedRows) || [], M])
2451
+ ]
2452
+ });
2453
+ } else
2454
+ Q.push({
2455
+ checkedRows: [M]
2456
+ }), R = "checkedRows";
2446
2457
  }
2447
2458
  }
2448
2459
  return {
2449
2460
  ...e,
2450
- data: D,
2451
- filteredData: D,
2461
+ data: O,
2462
+ filteredData: O,
2452
2463
  isLoading: !1,
2453
2464
  ...m ? {
2454
- aggregationTotalRow: F,
2465
+ aggregationTotalRow: b,
2455
2466
  pinnedBottomRows: [m]
2456
2467
  } : {},
2457
2468
  expandedChildRows: {},
2458
2469
  hasAggregation: w,
2459
- selectedRows: [.../* @__PURE__ */ new Set([...y])],
2470
+ selectedRows: [.../* @__PURE__ */ new Set([...L])],
2471
+ checkConfiguration: Q,
2472
+ prevAction: R,
2460
2473
  selectedRowsObject: z,
2461
2474
  pagination: {
2462
2475
  ...e.pagination,
2463
2476
  ...Object.keys(e.columnFilters).length && !e.serverSide ? {} : {
2464
2477
  isCountUnknown: s,
2465
- totalItems: E,
2478
+ totalItems: C,
2466
2479
  allTotalPages: h,
2467
2480
  currentLoadedPage: B,
2468
2481
  totalPages: h,
@@ -2477,7 +2490,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2477
2490
  filteredData: n.payload
2478
2491
  };
2479
2492
  case l.UPDATE_ROW_DATA: {
2480
- const { updatedData: s, dataRowIndex: E, aggregationRow: h, rowId: B, parentIndex: w } = n.payload, I = Fe(
2493
+ const { updatedData: s, dataRowIndex: C, aggregationRow: h, rowId: B, parentIndex: w } = n.payload, I = Fe(
2481
2494
  s,
2482
2495
  e.rowSpanColumn,
2483
2496
  e.api
@@ -2487,8 +2500,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2487
2500
  I,
2488
2501
  !0,
2489
2502
  B,
2490
- w >= 0 ? w : E
2491
- ), En(e.tableInstance, E);
2503
+ w >= 0 ? w : C
2504
+ ), Cn(e.tableInstance, C);
2492
2505
  const m = e.pagination.page || 1, G = h ? {
2493
2506
  ...e.aggregationTotalRow,
2494
2507
  [m]: h
@@ -2504,58 +2517,58 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2504
2517
  };
2505
2518
  }
2506
2519
  case l.UPDATE_ROW_DATA_OBJECT: {
2507
- const { rowId: s, data: E } = n.payload, h = e.uniqueIdField, B = e.expandedChildRows[s], w = { ...e.expandedChildRows };
2520
+ const { rowId: s, data: C } = n.payload, h = e.uniqueIdField, B = e.expandedChildRows[s], w = { ...e.expandedChildRows };
2508
2521
  let I = !1, m = -1, G = 0;
2509
2522
  B && (Object.keys(e.expandedChildRows).filter(
2510
- (y) => y.startsWith(String(s))
2511
- ).forEach((y) => {
2512
- G += e.expandedChildRows[y].childRowsCount;
2523
+ (L) => L.startsWith(String(s))
2524
+ ).forEach((L) => {
2525
+ G += e.expandedChildRows[L].childRowsCount;
2513
2526
  }), m = B.rowIndex);
2514
- let F = ((A = e.data) == null ? void 0 : A.map((D, y) => {
2515
- if (D[h] == s)
2516
- return m = y, { ...D, ...E };
2517
- if (D[e.childKeyField] && Array.isArray(D[e.childKeyField])) {
2518
- const z = D[e.childKeyField].map((S) => S[h] == s ? { ...S, ...E } : S);
2519
- if (z !== D[e.childKeyField])
2520
- return { ...D, [e.childKeyField]: z };
2527
+ let b = ((A = e.data) == null ? void 0 : A.map((O, L) => {
2528
+ if (O[h] == s)
2529
+ return m = L, { ...O, ...C };
2530
+ if (O[e.childKeyField] && Array.isArray(O[e.childKeyField])) {
2531
+ const z = O[e.childKeyField].map((Q) => Q[h] == s ? { ...Q, ...C } : Q);
2532
+ if (z !== O[e.childKeyField])
2533
+ return { ...O, [e.childKeyField]: z };
2521
2534
  }
2522
- return D;
2535
+ return O;
2523
2536
  })) || [];
2524
2537
  if (B && m !== -1) {
2525
- const D = G, y = E[e.childKeyField], S = (y ? y.length : 0) - D;
2526
- if (!y)
2527
- F.splice(m + 1, G);
2538
+ const O = G, L = C[e.childKeyField], Q = (L ? L.length : 0) - O;
2539
+ if (!L)
2540
+ b.splice(m + 1, G);
2528
2541
  else {
2529
- const T = typeof s == "string" ? s.split("/").length : 1, X = y.map((H) => ({
2542
+ const R = typeof s == "string" ? s.split("/").length : 1, j = L.map((H) => ({
2530
2543
  ...H,
2531
2544
  __parentPath: H.__parentPath ? `${H.__parentPath}/${H[s]}` : String(s),
2532
- level: T,
2545
+ level: R,
2533
2546
  parentRowIndex: m,
2534
- parentRowData: E
2547
+ parentRowData: C
2535
2548
  }));
2536
- F.splice(m + 1, G), F.splice(
2549
+ b.splice(m + 1, G), b.splice(
2537
2550
  m + 1,
2538
2551
  0,
2539
- ...X
2552
+ ...j
2540
2553
  ), w[s] = {
2541
2554
  ...w[s],
2542
- childRowsCount: y.length
2555
+ childRowsCount: L.length
2543
2556
  }, I = !0;
2544
2557
  }
2545
- S !== 0 && (Object.keys(w).forEach((T) => {
2546
- const X = w[T];
2547
- X.rowIndex > m && (w[T] = {
2548
- ...X,
2549
- rowIndex: X.rowIndex + S
2558
+ Q !== 0 && (Object.keys(w).forEach((R) => {
2559
+ const j = w[R];
2560
+ j.rowIndex > m && (w[R] = {
2561
+ ...j,
2562
+ rowIndex: j.rowIndex + Q
2550
2563
  });
2551
- }), F = F.map((T) => T.__parentPath && T.parentRowIndex !== void 0 && T.parentRowIndex > m ? {
2552
- ...T,
2553
- parentRowIndex: T.parentRowIndex + S
2554
- } : T));
2564
+ }), b = b.map((R) => R.__parentPath && R.parentRowIndex !== void 0 && R.parentRowIndex > m ? {
2565
+ ...R,
2566
+ parentRowIndex: R.parentRowIndex + Q
2567
+ } : R));
2555
2568
  }
2556
- m !== -1 && En(e.tableInstance, m);
2569
+ m !== -1 && Cn(e.tableInstance, m);
2557
2570
  const x = Fe(
2558
- F,
2571
+ b,
2559
2572
  e.rowSpanColumn,
2560
2573
  e.api
2561
2574
  );
@@ -2573,7 +2586,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2573
2586
  };
2574
2587
  }
2575
2588
  case l.SET_COLUMNS: {
2576
- const s = ((i = n.meta) == null ? void 0 : i.defaultColDef) || e.defaultColDef, { columns: E, frozenData: h } = Be(
2589
+ const s = ((i = n.meta) == null ? void 0 : i.defaultColDef) || e.defaultColDef, { columns: C, frozenData: h } = Be(
2577
2590
  n.payload,
2578
2591
  s ?? void 0
2579
2592
  );
@@ -2586,26 +2599,26 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2586
2599
  );
2587
2600
  h.indexes.forEach((w) => {
2588
2601
  var m;
2589
- const I = E.find((G) => M(G) === w);
2602
+ const I = C.find((G) => F(G) === w);
2590
2603
  I && !I.hidden && (B += I.width || ((m = e.defaultColDef) == null ? void 0 : m.minWidth) || 150);
2591
2604
  }), h.totalWidth = B;
2592
2605
  }
2593
2606
  return {
2594
2607
  ...e,
2595
- columns: E,
2608
+ columns: C,
2596
2609
  frozenColumns: h
2597
2610
  };
2598
2611
  }
2599
2612
  case l.MOVE_ROW: {
2600
- const { fromIndex: s, toIndex: E } = n.payload, h = [...e.data || []], B = h[s], w = String(B[e.uniqueIdField]);
2613
+ const { fromIndex: s, toIndex: C } = n.payload, h = [...e.data || []], B = h[s], w = String(B[e.uniqueIdField]);
2601
2614
  let I = 0;
2602
- Object.keys(e.expandedChildRows).forEach((D) => {
2603
- D.startsWith(w) && (I += e.expandedChildRows[D].childRowsCount);
2615
+ Object.keys(e.expandedChildRows).forEach((O) => {
2616
+ O.startsWith(w) && (I += e.expandedChildRows[O].childRowsCount);
2604
2617
  });
2605
2618
  const m = I + 1, G = h.splice(s, m);
2606
- let F = E;
2607
- s < E && (F -= m), h.splice(F, 0, ...G);
2608
- const x = h.map((D) => (delete D._isDraggedRow, delete D._animationState, D));
2619
+ let b = C;
2620
+ s < C && (b -= m), h.splice(b, 0, ...G);
2621
+ const x = h.map((O) => (delete O._isDraggedRow, delete O._animationState, O));
2609
2622
  return {
2610
2623
  ...e,
2611
2624
  data: x,
@@ -2616,7 +2629,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2616
2629
  case l.SET_SORT: {
2617
2630
  const s = ke(e);
2618
2631
  (e.isSelectAllRecords || ((o = e.selectedRows) == null ? void 0 : o.length) > 0) && e.removeSelectionOnOperation && qe({ state: e, action: { payload: null } });
2619
- const E = {
2632
+ const C = {
2620
2633
  ...e,
2621
2634
  ...s ? {} : { expandedChildRows: {} },
2622
2635
  sortState: n.payload,
@@ -2628,7 +2641,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2628
2641
  } : {},
2629
2642
  isSelectionChanged: !1,
2630
2643
  ...e.removeCheckConfigurationOnOperation ? {
2631
- checkConfiguration: []
2644
+ checkConfiguration: [],
2645
+ prevAction: ""
2632
2646
  } : {},
2633
2647
  pagination: {
2634
2648
  ...e.pagination,
@@ -2637,7 +2651,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2637
2651
  page: 1
2638
2652
  }
2639
2653
  };
2640
- return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload), E;
2654
+ return (f = (d = e.callBackRef) == null ? void 0 : d.current) != null && f.onSortChange && e.callBackRef.current.onSortChange(n.payload), C;
2641
2655
  }
2642
2656
  case l.ENABLE_ROW_SPAN:
2643
2657
  return {
@@ -2652,10 +2666,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2652
2666
  case l.SET_PAGE: {
2653
2667
  const s = Ze(e);
2654
2668
  me(e, s);
2655
- const E = ke(e);
2669
+ const C = ke(e);
2656
2670
  return {
2657
2671
  ...e,
2658
- ...E ? {} : { expandedChildRows: {} },
2672
+ ...C ? {} : { expandedChildRows: {} },
2659
2673
  pagination: {
2660
2674
  ...e.pagination,
2661
2675
  page: n.payload,
@@ -2664,7 +2678,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2664
2678
  };
2665
2679
  }
2666
2680
  case l.SET_PAGE_SIZE: {
2667
- const s = ke(e), { totalItems: E } = e.pagination;
2681
+ const s = ke(e), { totalItems: C } = e.pagination;
2668
2682
  return {
2669
2683
  ...e,
2670
2684
  ...s ? {} : { expandedChildRows: {} },
@@ -2680,7 +2694,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2680
2694
  page: 1,
2681
2695
  currentPage: 1,
2682
2696
  // Reset to first page when changing page size
2683
- ...e.serverSide ? {} : { totalPages: Math.ceil(E / n.payload) }
2697
+ ...e.serverSide ? {} : { totalPages: Math.ceil(C / n.payload) }
2684
2698
  }
2685
2699
  };
2686
2700
  }
@@ -2690,7 +2704,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2690
2704
  isSingleSelect: n.payload
2691
2705
  };
2692
2706
  case l.SET_SELECTED_ROWS: {
2693
- let s = e.selectedRows, E = e.unCheckedRows, h = e.selectedRowsObject, B = e.filteredData;
2707
+ let s = e.selectedRows, C = e.unCheckedRows, h = e.selectedRowsObject, B = e.filteredData;
2694
2708
  if (Array.isArray(n.payload))
2695
2709
  s = n.payload.map((w) => String(w)), h = n.payload.reduce(
2696
2710
  (w, I) => (w[I] = !0, w),
@@ -2704,18 +2718,18 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2704
2718
  singleEntry: G = !1
2705
2719
  } = n.payload;
2706
2720
  if (G) {
2707
- const F = Array.isArray(I) ? I[0] : I, {
2721
+ const b = Array.isArray(I) ? I[0] : I, {
2708
2722
  selectedRowsUpdated: x,
2709
- unCheckedRowsUpdated: D,
2710
- selectedRowsObjectUpdated: y,
2723
+ unCheckedRowsUpdated: O,
2724
+ selectedRowsObjectUpdated: L,
2711
2725
  filteredData: z
2712
2726
  } = It({
2713
2727
  state: e,
2714
2728
  isSelected: w,
2715
- selectUnselectRowId: String(F),
2729
+ selectUnselectRowId: String(b),
2716
2730
  isUnchecked: m
2717
2731
  });
2718
- s = x, E = D, h = y, B = z;
2732
+ s = x, C = O, h = L, B = z;
2719
2733
  }
2720
2734
  }
2721
2735
  return qe({
@@ -2727,15 +2741,15 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2727
2741
  selectedRows: s,
2728
2742
  selectedRowsObject: h,
2729
2743
  isSelectionChanged: !1,
2730
- unCheckedRows: E
2744
+ unCheckedRows: C
2731
2745
  };
2732
2746
  }
2733
2747
  case l.SET_COLUMN_FILTER: {
2734
- const { field: s, rules: E, isBulk: h, filters: B } = n.payload;
2748
+ const { field: s, rules: C, isBulk: h, filters: B } = n.payload;
2735
2749
  return {
2736
2750
  ...e,
2737
2751
  columnFilters: {
2738
- ...h ? B : { ...e.columnFilters, [s]: E }
2752
+ ...h ? B : { ...e.columnFilters, [s]: C }
2739
2753
  }
2740
2754
  };
2741
2755
  }
@@ -2752,11 +2766,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2752
2766
  };
2753
2767
  }
2754
2768
  case l.APPLY_FILTERS: {
2755
- const { isChildRowEmpty: s, updatedData: E, filteredData: h } = n.payload;
2769
+ const { isChildRowEmpty: s, updatedData: C, filteredData: h } = n.payload;
2756
2770
  return {
2757
2771
  ...e,
2758
2772
  ...s ? {} : { expandedChildRows: {} },
2759
- data: E,
2773
+ data: C,
2760
2774
  filteredData: h,
2761
2775
  ...e.removeSelectionOnOperation ? {
2762
2776
  selectedRows: [],
@@ -2766,7 +2780,8 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2766
2780
  } : {},
2767
2781
  isSelectionChanged: !1,
2768
2782
  ...e.removeCheckConfigurationOnOperation ? {
2769
- checkConfiguration: []
2783
+ checkConfiguration: [],
2784
+ prevAction: ""
2770
2785
  } : {},
2771
2786
  pagination: {
2772
2787
  ...e.pagination,
@@ -2784,58 +2799,58 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2784
2799
  };
2785
2800
  }
2786
2801
  case l.TOGGLE_GROUP_EXPANSION: {
2787
- const { rowId: s, rowIndex: E } = n.payload, h = String(s), B = e.filteredData || [];
2802
+ const { rowId: s, rowIndex: C } = n.payload, h = String(s), B = e.filteredData || [];
2788
2803
  let w;
2789
2804
  const I = [...B], m = h.split("/").length, G = !e.expandedChildRows[h];
2790
2805
  if (G) {
2791
- const F = B[E], x = (F == null ? void 0 : F[e.childKeyField]) || [], D = e.columns.some((H) => H.aggFunc);
2792
- let y = x, z = null;
2793
- if (D && x.length > 0) {
2794
- const { aggreRow: H, aggreChildRows: b } = ye(
2806
+ const b = B[C], x = (b == null ? void 0 : b[e.childKeyField]) || [], O = e.columns.some((H) => H.aggFunc);
2807
+ let L = x, z = null;
2808
+ if (O && x.length > 0) {
2809
+ const { aggreRow: H, aggreChildRows: M } = ye(
2795
2810
  e,
2796
- y,
2797
- F,
2811
+ L,
2812
+ b,
2798
2813
  m,
2799
- E,
2814
+ C,
2800
2815
  h
2801
2816
  );
2802
- z = H, y = b;
2817
+ z = H, L = M;
2803
2818
  } else
2804
- y = y.map((H) => ({
2819
+ L = L.map((H) => ({
2805
2820
  ...H,
2806
2821
  __parentPath: H.__parentPath ? `${H.__parentPath}/${h}` : h,
2807
2822
  level: m,
2808
- parentRowIndex: E,
2809
- parentRowData: F,
2823
+ parentRowIndex: C,
2824
+ parentRowData: b,
2810
2825
  groupingLevel: m
2811
2826
  }));
2812
- const S = x.length + (z ? 1 : 0);
2827
+ const Q = x.length + (z ? 1 : 0);
2813
2828
  w = {
2814
2829
  ...e.expandedChildRows,
2815
2830
  [h]: {
2816
2831
  rowId: h,
2817
- rowIndex: E,
2818
- childRowsCount: S
2832
+ rowIndex: C,
2833
+ childRowsCount: Q
2819
2834
  }
2820
2835
  };
2821
- const T = Fe(
2822
- [F, ...y],
2836
+ const R = Fe(
2837
+ [b, ...L],
2823
2838
  e.rowSpanColumn,
2824
2839
  e.api
2825
- ), X = z ? [...T, z] : T;
2826
- I.splice(E, 1), I.splice(E, 0, ...X);
2840
+ ), j = z ? [...R, z] : R;
2841
+ I.splice(C, 1), I.splice(C, 0, ...j);
2827
2842
  } else {
2828
2843
  w = {
2829
2844
  ...e.expandedChildRows
2830
2845
  };
2831
- let F = 0;
2846
+ let b = 0;
2832
2847
  Object.keys(w).forEach((x) => {
2833
- x.startsWith(h) && (F += w[x].childRowsCount, delete w[x]);
2834
- }), delete I[E].__rowSpanInfo, I.splice(E + 1, F);
2848
+ x.startsWith(h) && (b += w[x].childRowsCount, delete w[x]);
2849
+ }), delete I[C].__rowSpanInfo, I.splice(C + 1, b);
2835
2850
  }
2836
- return (u = (c = e.callBackRef) == null ? void 0 : c.current) != null && u.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
2851
+ return (E = (c = e.callBackRef) == null ? void 0 : c.current) != null && E.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
2837
2852
  rowId: h,
2838
- rowIndex: E,
2853
+ rowIndex: C,
2839
2854
  api: e.api,
2840
2855
  isExpanded: G
2841
2856
  }), me(e, I), {
@@ -2857,12 +2872,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2857
2872
  isSelectionChanged: !1
2858
2873
  } : e;
2859
2874
  case l.FREEZE_COLUMN: {
2860
- const { columnId: s } = n.payload, E = e.columns.map((I) => M(I) === s ? { ...I, is_frozen: !0, pinned: "left" } : I), { processedColumns: h } = De(
2861
- E,
2875
+ const { columnId: s } = n.payload, C = e.columns.map((I) => F(I) === s ? { ...I, is_frozen: !0, pinned: "left" } : I), { processedColumns: h } = De(
2876
+ C,
2862
2877
  e.expandedColumnGroups || {},
2863
2878
  0,
2864
2879
  null,
2865
- ((C = (g = n.meta) == null ? void 0 : g.defaultColDef) == null ? void 0 : C.minWidth) || ((L = e.defaultColDef) == null ? void 0 : L.minWidth) || 150
2880
+ ((u = (g = n.meta) == null ? void 0 : g.defaultColDef) == null ? void 0 : u.minWidth) || ((P = e.defaultColDef) == null ? void 0 : P.minWidth) || 150
2866
2881
  ), { columns: B, frozenData: w } = Be(
2867
2882
  h,
2868
2883
  ((a = n.meta) == null ? void 0 : a.defaultColDef) || e.defaultColDef || void 0
@@ -2874,87 +2889,87 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2874
2889
  };
2875
2890
  }
2876
2891
  case l.UNFREEZE_COLUMN: {
2877
- const { columnId: s } = n.payload, E = {}, h = {};
2878
- if (e.columns.forEach((y) => {
2879
- if (y.children && Array.isArray(y.children)) {
2880
- const z = M(y);
2881
- h[z] = [], y.children.forEach((S) => {
2882
- const T = M(S);
2883
- E[T] = z, h[z] ? h[z].push(T) : h[z] = [T];
2892
+ const { columnId: s } = n.payload, C = {}, h = {};
2893
+ if (e.columns.forEach((L) => {
2894
+ if (L.children && Array.isArray(L.children)) {
2895
+ const z = F(L);
2896
+ h[z] = [], L.children.forEach((Q) => {
2897
+ const R = F(Q);
2898
+ C[R] = z, h[z] ? h[z].push(R) : h[z] = [R];
2884
2899
  });
2885
2900
  }
2886
2901
  }), !e.columns.find(
2887
- (y) => M(y) === s
2902
+ (L) => F(L) === s
2888
2903
  )) return e;
2889
2904
  const w = [];
2890
2905
  let I = s;
2891
- for (; E[I]; ) {
2892
- const y = E[I];
2893
- w.push(y), I = y;
2906
+ for (; C[I]; ) {
2907
+ const L = C[I];
2908
+ w.push(L), I = L;
2894
2909
  }
2895
2910
  const m = {};
2896
- e.columns.forEach((y) => {
2897
- const z = M(y);
2898
- if (y.is_frozen && z !== s && w.includes(z) === !1) {
2899
- let S = z;
2900
- for (; E[S]; ) {
2901
- const T = E[S];
2902
- m[T] = !0, S = T;
2911
+ e.columns.forEach((L) => {
2912
+ const z = F(L);
2913
+ if (L.is_frozen && z !== s && w.includes(z) === !1) {
2914
+ let Q = z;
2915
+ for (; C[Q]; ) {
2916
+ const R = C[Q];
2917
+ m[R] = !0, Q = R;
2903
2918
  }
2904
2919
  }
2905
2920
  });
2906
- const G = e.columns.map((y) => {
2907
- const z = M(y);
2908
- return z === s ? { ...y, is_frozen: !1, pinned: null } : w.includes(z) ? m[z] ? y : { ...y, is_frozen: !1, pinned: null } : y;
2909
- }), { processedColumns: F } = De(
2921
+ const G = e.columns.map((L) => {
2922
+ const z = F(L);
2923
+ return z === s ? { ...L, is_frozen: !1, pinned: null } : w.includes(z) ? m[z] ? L : { ...L, is_frozen: !1, pinned: null } : L;
2924
+ }), { processedColumns: b } = De(
2910
2925
  G,
2911
2926
  e.expandedColumnGroups || {},
2912
2927
  0,
2913
2928
  null,
2914
- ((R = (p = n.meta) == null ? void 0 : p.defaultColDef) == null ? void 0 : R.minWidth) || ((P = e.defaultColDef) == null ? void 0 : P.minWidth) || 150
2915
- ), { columns: x, frozenData: D } = Be(
2916
- F,
2917
- ((O = n.meta) == null ? void 0 : O.defaultColDef) || e.defaultColDef || void 0
2929
+ ((T = (p = n.meta) == null ? void 0 : p.defaultColDef) == null ? void 0 : T.minWidth) || ((D = e.defaultColDef) == null ? void 0 : D.minWidth) || 150
2930
+ ), { columns: x, frozenData: O } = Be(
2931
+ b,
2932
+ ((S = n.meta) == null ? void 0 : S.defaultColDef) || e.defaultColDef || void 0
2918
2933
  );
2919
2934
  return {
2920
2935
  ...e,
2921
2936
  columns: x,
2922
- frozenColumns: D
2937
+ frozenColumns: O
2923
2938
  };
2924
2939
  }
2925
2940
  case l.SET_COLUMN_WIDTH: {
2926
2941
  const {
2927
2942
  field: s,
2928
- width: E,
2943
+ width: C,
2929
2944
  isAutoWidth: h
2930
2945
  } = n.payload, B = (G) => {
2931
- if (M(G) === s)
2946
+ if (F(G) === s)
2932
2947
  return {
2933
2948
  ...G,
2934
- width: E,
2949
+ width: C,
2935
2950
  isAutoWidth: h !== void 0 ? h : G.isAutoWidth
2936
2951
  };
2937
2952
  if (G.children && G.children.length > 0) {
2938
2953
  const x = G.children.some(
2939
- (y) => M(y) === s || y.path && y.path.includes(s)
2940
- ), D = G.children.map(
2954
+ (L) => F(L) === s || L.path && L.path.includes(s)
2955
+ ), O = G.children.map(
2941
2956
  B
2942
2957
  );
2943
2958
  if (x) {
2944
- const y = D.reduce(
2945
- (z, S) => S.hidden || S.is_hidden ? z : z + (S.width || 100),
2959
+ const L = O.reduce(
2960
+ (z, Q) => Q.hidden || Q.is_hidden ? z : z + (Q.width || 100),
2946
2961
  0
2947
2962
  );
2948
2963
  return {
2949
2964
  ...G,
2950
- children: D,
2965
+ children: O,
2951
2966
  // Update parent width based on children's total width
2952
- width: y
2967
+ width: L
2953
2968
  };
2954
2969
  }
2955
2970
  return {
2956
2971
  ...G,
2957
- children: D
2972
+ children: O
2958
2973
  };
2959
2974
  }
2960
2975
  return G;
@@ -2971,12 +2986,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2971
2986
  };
2972
2987
  }
2973
2988
  case l.SET_COLUMNS_WIDTH: {
2974
- const { widths: s, isAutoWidth: E } = n.payload, h = e.columns.map((w) => {
2975
- const I = M(w);
2989
+ const { widths: s, isAutoWidth: C } = n.payload, h = e.columns.map((w) => {
2990
+ const I = F(w);
2976
2991
  return s[I] !== void 0 ? {
2977
2992
  ...w,
2978
2993
  width: s[I],
2979
- isAutoWidth: E !== void 0 ? E : w.isAutoWidth
2994
+ isAutoWidth: C !== void 0 ? C : w.isAutoWidth
2980
2995
  } : w;
2981
2996
  }), B = { ...e.frozenColumns };
2982
2997
  if (B.indexes.length > 0) {
@@ -2987,10 +3002,10 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
2987
3002
  );
2988
3003
  B.indexes.forEach((I) => {
2989
3004
  const m = h.find(
2990
- (G) => M(G) === I
3005
+ (G) => F(G) === I
2991
3006
  );
2992
3007
  if (m && !m.hidden) {
2993
- const G = M(m);
3008
+ const G = F(m);
2994
3009
  B.positions[G] = w, w += m.width || 100;
2995
3010
  }
2996
3011
  }), B.totalWidth = w;
@@ -3023,14 +3038,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3023
3038
  }
3024
3039
  };
3025
3040
  case l.TOGGLE_COLUMN_VISIBILITY: {
3026
- const { columns: s, frozenData: E } = Be(
3041
+ const { columns: s, frozenData: C } = Be(
3027
3042
  n.payload,
3028
3043
  e.defaultColDef || { minWidth: 150 }
3029
3044
  );
3030
3045
  return {
3031
3046
  ...e,
3032
3047
  columns: s,
3033
- frozenColumns: E
3048
+ frozenColumns: C
3034
3049
  };
3035
3050
  }
3036
3051
  case l.AUTOSIZE_COLUMNS_REQUESTED:
@@ -3039,21 +3054,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3039
3054
  columnsToAutosize: n.payload.columnsToAutosize
3040
3055
  };
3041
3056
  case l.PIN_COLUMN_RIGHT: {
3042
- const { field: s } = n.payload, E = window.innerWidth * 0.3, h = e.columns.find(
3043
- (b) => M(b) === s
3057
+ const { field: s } = n.payload, C = window.innerWidth * 0.3, h = e.columns.find(
3058
+ (M) => F(M) === s
3044
3059
  );
3045
3060
  if (!h)
3046
3061
  return e;
3047
3062
  const w = e.columns.filter(
3048
- (b) => b.pinned === "right"
3063
+ (M) => M.pinned === "right"
3049
3064
  ).reduce(
3050
- (b, re) => {
3051
- var Ce;
3052
- return b + (re.width || ((Ce = e.defaultColDef) == null ? void 0 : Ce.minWidth) || 150);
3065
+ (M, te) => {
3066
+ var ue;
3067
+ return M + (te.width || ((ue = e.defaultColDef) == null ? void 0 : ue.minWidth) || 150);
3053
3068
  },
3054
3069
  0
3055
3070
  ), I = h.width || ((U = e.defaultColDef) == null ? void 0 : U.minWidth) || 150;
3056
- if (w + I > E)
3071
+ if (w + I > C)
3057
3072
  return {
3058
3073
  ...e,
3059
3074
  notification: {
@@ -3063,76 +3078,76 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3063
3078
  timeout: 5e3
3064
3079
  }
3065
3080
  };
3066
- const { parentToChildrenMap: F, childToParentMap: x } = tn(
3081
+ const { parentToChildrenMap: b, childToParentMap: x } = tn(
3067
3082
  e.columns
3068
- ), D = x[s], y = !!D, z = y ? fn(s, x) : [], S = y ? F[D] || [] : [], T = e.columns.map((b) => {
3069
- const re = M(b);
3070
- return re === s ? {
3071
- ...b,
3083
+ ), O = x[s], L = !!O, z = L ? fn(s, x) : [], Q = L ? b[O] || [] : [], R = e.columns.map((M) => {
3084
+ const te = F(M);
3085
+ return te === s ? {
3086
+ ...M,
3072
3087
  pinned: "right",
3073
3088
  is_frozen: !1
3074
3089
  // Ensure it's not left-pinned
3075
- } : z.includes(re) ? {
3076
- ...b,
3090
+ } : z.includes(te) ? {
3091
+ ...M,
3077
3092
  pinned: "right",
3078
3093
  is_frozen: !1
3079
- } : z.some((we) => (F[we] || []).includes(re)) ? {
3080
- ...b,
3094
+ } : z.some((we) => (b[we] || []).includes(te)) ? {
3095
+ ...M,
3081
3096
  pinned: "right",
3082
3097
  is_frozen: !1
3083
- } : S.includes(re) ? {
3084
- ...b,
3098
+ } : Q.includes(te) ? {
3099
+ ...M,
3085
3100
  pinned: "right",
3086
3101
  is_frozen: !1
3087
- } : b;
3088
- }), { columns: X, frozenData: H } = Be(
3089
- T,
3102
+ } : M;
3103
+ }), { columns: j, frozenData: H } = Be(
3104
+ R,
3090
3105
  ((N = n.meta) == null ? void 0 : N.defaultColDef) || e.defaultColDef || void 0
3091
3106
  );
3092
3107
  return {
3093
3108
  ...e,
3094
- columns: X,
3109
+ columns: j,
3095
3110
  frozenColumns: H
3096
3111
  };
3097
3112
  }
3098
3113
  case l.UNPIN_COLUMN_RIGHT: {
3099
- const { field: s } = n.payload, { parentToChildrenMap: E, childToParentMap: h } = tn(
3114
+ const { field: s } = n.payload, { parentToChildrenMap: C, childToParentMap: h } = tn(
3100
3115
  e.columns
3101
- ), B = h[s], w = !!B, I = w ? fn(s, h) : [], m = w ? E[B] || [] : [], G = e.columns.map((D) => {
3102
- const y = M(D);
3103
- return y === s ? {
3104
- ...D,
3116
+ ), B = h[s], w = !!B, I = w ? fn(s, h) : [], m = w ? C[B] || [] : [], G = e.columns.map((O) => {
3117
+ const L = F(O);
3118
+ return L === s ? {
3119
+ ...O,
3105
3120
  pinned: void 0
3106
- } : I.includes(y) ? {
3107
- ...D,
3121
+ } : I.includes(L) ? {
3122
+ ...O,
3108
3123
  pinned: void 0
3109
- } : I.some((S) => (E[S] || []).includes(y)) ? {
3110
- ...D,
3124
+ } : I.some((Q) => (C[Q] || []).includes(L)) ? {
3125
+ ...O,
3111
3126
  pinned: void 0
3112
- } : m.includes(y) ? {
3113
- ...D,
3127
+ } : m.includes(L) ? {
3128
+ ...O,
3114
3129
  pinned: void 0
3115
- } : D;
3116
- }), { columns: F, frozenData: x } = Be(
3130
+ } : O;
3131
+ }), { columns: b, frozenData: x } = Be(
3117
3132
  G,
3118
- ((Q = n.meta) == null ? void 0 : Q.defaultColDef) || e.defaultColDef || void 0
3133
+ ((y = n.meta) == null ? void 0 : y.defaultColDef) || e.defaultColDef || void 0
3119
3134
  );
3120
3135
  return {
3121
3136
  ...e,
3122
- columns: F,
3137
+ columns: b,
3123
3138
  frozenColumns: x
3124
3139
  };
3125
3140
  }
3126
3141
  case l.TOGGLE_FREEZE_COLUMN: {
3127
3142
  const {
3128
3143
  field: s,
3129
- column: E,
3144
+ column: C,
3130
3145
  frozen: h = !1,
3131
3146
  options: B = {}
3132
3147
  } = n.payload, w = ht({
3133
3148
  state: e,
3134
3149
  freezeColumnField: s,
3135
- column: E,
3150
+ column: C,
3136
3151
  frozen: h,
3137
3152
  options: B
3138
3153
  });
@@ -3142,11 +3157,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3142
3157
  };
3143
3158
  }
3144
3159
  case l.REORDER_COLUMNS: {
3145
- const { sourceColumn: s, targetColumn: E } = n.payload, h = e.frozenColumns.totalWidth, B = ((v = (_ = e.tableInstance) == null ? void 0 : _.current) == null ? void 0 : v.clientWidth) || 0, w = [...e.columns], I = s.children && s.children.length > 0, m = (T) => {
3146
- var X;
3147
- return T.children && T.children.length > 0 ? T.children.reduce((H, b) => H + m(b), 0) : T.width || ((X = e.defaultColDef) == null ? void 0 : X.minWidth) || 150;
3148
- }, G = I ? m(s) : s.width || ((K = e.defaultColDef) == null ? void 0 : K.minWidth) || 150;
3149
- if (E.is_frozen && !s.is_frozen && G && h + G > B * 0.7)
3160
+ const { sourceColumn: s, targetColumn: C } = n.payload, h = e.frozenColumns.totalWidth, B = ((v = (_ = e.tableInstance) == null ? void 0 : _.current) == null ? void 0 : v.clientWidth) || 0, w = [...e.columns], I = s.children && s.children.length > 0, m = (R) => {
3161
+ var j;
3162
+ return R.children && R.children.length > 0 ? R.children.reduce((H, M) => H + m(M), 0) : R.width || ((j = e.defaultColDef) == null ? void 0 : j.minWidth) || 150;
3163
+ }, G = I ? m(s) : s.width || ((X = e.defaultColDef) == null ? void 0 : X.minWidth) || 150;
3164
+ if (C.is_frozen && !s.is_frozen && G && h + G > B * 0.7)
3150
3165
  return {
3151
3166
  ...e,
3152
3167
  notification: {
@@ -3157,44 +3172,44 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3157
3172
  timeout: 3e3
3158
3173
  }
3159
3174
  };
3160
- if (!s || !E)
3175
+ if (!s || !C)
3161
3176
  return console.error("Invalid source or target column for reordering", {
3162
3177
  sourceColumn: s,
3163
- targetColumn: E
3178
+ targetColumn: C
3164
3179
  }), e;
3165
- let F = [...w];
3166
- F = $n(
3180
+ let b = [...w];
3181
+ b = $n(
3167
3182
  s,
3168
- E,
3169
- F
3170
- ), F.forEach((T, X) => {
3171
- T.order_of_display = X + 1;
3183
+ C,
3184
+ b
3185
+ ), b.forEach((R, j) => {
3186
+ R.order_of_display = j + 1;
3172
3187
  });
3173
3188
  const { initialGroupedColumns: x } = De(
3174
- F,
3189
+ b,
3175
3190
  e.expandedColumnGroups || {},
3176
3191
  0,
3177
3192
  null,
3178
- ((j = e.defaultColDef) == null ? void 0 : j.minWidth) || 150
3179
- ), D = { ...e.expandedColumnGroups };
3180
- x.forEach((T) => {
3181
- D[T] !== !0 && (D[T] = !0);
3193
+ ((K = e.defaultColDef) == null ? void 0 : K.minWidth) || 150
3194
+ ), O = { ...e.expandedColumnGroups };
3195
+ x.forEach((R) => {
3196
+ O[R] !== !0 && (O[R] = !0);
3182
3197
  });
3183
- const { processedColumns: y } = De(
3184
- F,
3185
- D,
3198
+ const { processedColumns: L } = De(
3199
+ b,
3200
+ O,
3186
3201
  0,
3187
3202
  null,
3188
3203
  ((q = e.defaultColDef) == null ? void 0 : q.minWidth) || 150
3189
- ), { columns: z, frozenData: S } = Be(
3190
- y,
3204
+ ), { columns: z, frozenData: Q } = Be(
3205
+ L,
3191
3206
  ((ee = n.meta) == null ? void 0 : ee.defaultColDef) || e.defaultColDef || void 0
3192
3207
  );
3193
3208
  return {
3194
3209
  ...e,
3195
3210
  columns: z,
3196
- frozenColumns: S,
3197
- expandedColumnGroups: D
3211
+ frozenColumns: Q,
3212
+ expandedColumnGroups: O
3198
3213
  };
3199
3214
  }
3200
3215
  case l.SET_PREV_ACTION:
@@ -3209,93 +3224,93 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3209
3224
  };
3210
3225
  case l.SET_IS_SELECT_ALL_RECORDS: {
3211
3226
  const s = (ne = e.api) == null ? void 0 : ne.getInfiniteCache();
3212
- let E = [];
3213
- e.serverSide ? E = (s == null ? void 0 : s.getAllCachedData()) || e.data || [] : E = (s == null ? void 0 : s.params.datasource.getWholeData()) || e.data || [];
3214
- let h = E, B = !1;
3227
+ let C = [];
3228
+ e.serverSide ? C = (s == null ? void 0 : s.getAllCachedData()) || e.data || [] : C = (s == null ? void 0 : s.params.datasource.getWholeData()) || e.data || [];
3229
+ let h = C, B = !1;
3215
3230
  if (!e.serverSide && e.columnFilters && Object.keys(e.columnFilters).length > 0) {
3216
- const S = Un(
3231
+ const Q = Un(
3217
3232
  e.columns
3218
3233
  );
3219
- h = Ct(
3220
- E,
3234
+ h = ut(
3235
+ C,
3221
3236
  e.columnFilters,
3222
- S
3237
+ Q
3223
3238
  ), B = !0;
3224
3239
  }
3225
3240
  const w = {};
3226
- for (let S = 0; S < h.length; S++) {
3227
- const T = h[S], X = String(T[e.uniqueIdField]);
3228
- T != null && T.__parentPath || T != null && T.isChildGroup || (w[X] = !0);
3241
+ for (let Q = 0; Q < h.length; Q++) {
3242
+ const R = h[Q], j = String(R[e.uniqueIdField]);
3243
+ R != null && R.__parentPath || R != null && R.isChildGroup || (w[j] = !0);
3229
3244
  }
3230
3245
  let I = [], m = {}, G = {};
3231
3246
  if (n.payload) {
3232
3247
  I = [...e.selectedRows], m = { ...e.selectedRowsObject }, G = { ...e.unCheckedRows };
3233
- for (const S in w) {
3234
- if (!m[S]) {
3235
- const T = h.findIndex(
3236
- (X) => String(X[e.uniqueIdField]) === S
3248
+ for (const Q in w) {
3249
+ if (!m[Q]) {
3250
+ const R = h.findIndex(
3251
+ (j) => String(j[e.uniqueIdField]) === Q
3237
3252
  );
3238
3253
  _e(
3239
3254
  e.rowSelectionRef,
3240
- T,
3241
- h[T],
3255
+ R,
3256
+ h[R],
3242
3257
  e.uniqueIdField
3243
- ) && (I.push(S), m[S] = !0);
3258
+ ) && (I.push(Q), m[Q] = !0);
3244
3259
  }
3245
- delete G[S];
3260
+ delete G[Q];
3246
3261
  }
3247
3262
  } else if (!n.payload && Object.keys(e.columnFilters).length === 0)
3248
- I = [], m = {}, G = {}, h = h.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S);
3263
+ I = [], m = {}, G = {}, h = h.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q);
3249
3264
  else {
3250
3265
  G = { ...e.unCheckedRows };
3251
- for (let S = 0; S < e.selectedRows.length; S++) {
3252
- const T = e.selectedRows[S];
3253
- if (w[T])
3254
- G[T] = !0;
3266
+ for (let Q = 0; Q < e.selectedRows.length; Q++) {
3267
+ const R = e.selectedRows[Q];
3268
+ if (w[R])
3269
+ G[R] = !0;
3255
3270
  else {
3256
- const X = h.findIndex(
3257
- (H) => String(H[e.uniqueIdField]) === T
3271
+ const j = h.findIndex(
3272
+ (H) => String(H[e.uniqueIdField]) === R
3258
3273
  );
3259
3274
  _e(
3260
3275
  e.rowSelectionRef,
3261
- X,
3262
- h[X],
3276
+ j,
3277
+ h[j],
3263
3278
  e.uniqueIdField
3264
- ) && (I.push(T), m[T] = !0);
3279
+ ) && (I.push(R), m[R] = !0);
3265
3280
  }
3266
3281
  }
3267
- h = h.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S);
3282
+ h = h.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q);
3268
3283
  }
3269
- let F = !0;
3270
- for (const S in w)
3271
- if (!m[S]) {
3272
- F = !1;
3284
+ let b = !0;
3285
+ for (const Q in w)
3286
+ if (!m[Q]) {
3287
+ b = !1;
3273
3288
  break;
3274
3289
  }
3275
- const x = I.length === 0 ? !1 : F, D = I.length === 0 ? {} : G;
3290
+ const x = I.length === 0 ? !1 : b, O = I.length === 0 ? {} : G;
3276
3291
  B || ($ = e.api) == null || $.updateSmartGridTableData(h), qe({
3277
3292
  state: e,
3278
3293
  action: { payload: I }
3279
3294
  });
3280
- const { pageSize: y, currentLoadedPage: z } = e.pagination;
3295
+ const { pageSize: L, currentLoadedPage: z } = e.pagination;
3281
3296
  return h = h.slice(
3282
- (z - 1) * y,
3283
- z * y
3284
- ), h.length || (h = e.filteredData.map((S) => S.is_selected ? { ...S, is_selected: !1 } : S)), {
3297
+ (z - 1) * L,
3298
+ z * L
3299
+ ), h.length || (h = e.filteredData.map((Q) => Q.is_selected ? { ...Q, is_selected: !1 } : Q)), {
3285
3300
  ...e,
3286
3301
  filteredData: h,
3287
3302
  isSelectAllRecords: x,
3288
3303
  selectedRows: I,
3289
3304
  selectedRowsObject: m,
3290
- unCheckedRows: D,
3305
+ unCheckedRows: O,
3291
3306
  isSelectionChanged: !1,
3292
3307
  checkConfiguration: x ? e.checkConfiguration : [],
3293
3308
  prevAction: x ? e.prevAction : ""
3294
3309
  };
3295
3310
  }
3296
3311
  case l.BATCH_UPDATE: {
3297
- const { prevAction: s, checkConfiguration: E, isSelectAllRecords: h } = n.payload, B = {};
3298
- return s !== void 0 && s !== e.prevAction && (B.prevAction = s), E !== void 0 && JSON.stringify(E) !== JSON.stringify(e.checkConfiguration) && (B.checkConfiguration = E), h !== void 0 && h !== e.isSelectAllRecords && (B.isSelectAllRecords = h), Object.keys(B).length === 0 ? e : {
3312
+ const { prevAction: s, checkConfiguration: C, isSelectAllRecords: h } = n.payload, B = {};
3313
+ return s !== void 0 && s !== e.prevAction && (B.prevAction = s), C !== void 0 && JSON.stringify(C) !== JSON.stringify(e.checkConfiguration) && (B.checkConfiguration = C), h !== void 0 && h !== e.isSelectAllRecords && (B.isSelectAllRecords = h), Object.keys(B).length === 0 ? e : {
3299
3314
  ...e,
3300
3315
  ...B
3301
3316
  };
@@ -3304,12 +3319,12 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3304
3319
  case l.TOGGLE_MASTER_DETAIL: {
3305
3320
  const {
3306
3321
  rowId: s,
3307
- rowData: E,
3322
+ rowData: C,
3308
3323
  rowIndex: h,
3309
3324
  currentRowStyles: B
3310
3325
  } = n.payload, w = ((Z = e.masterDetail) == null ? void 0 : Z.expandedRows) || [];
3311
3326
  let I, m = null, G = !1;
3312
- return w.includes(s) ? (I = [], G = !0) : (I = [s], m = E), {
3327
+ return w.includes(s) ? (I = [], G = !0) : (I = [s], m = C), {
3313
3328
  ...e,
3314
3329
  masterDetail: {
3315
3330
  ...e.masterDetail,
@@ -3337,11 +3352,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3337
3352
  }
3338
3353
  };
3339
3354
  case l.ADD_EVENT_LISTENER: {
3340
- const { eventType: s, listener: E, once: h = !1 } = n.payload, B = { ...e.eventListeners };
3355
+ const { eventType: s, listener: C, once: h = !1 } = n.payload, B = { ...e.eventListeners };
3341
3356
  return B[s] || (B[s] = []), B[s].some(
3342
- (I) => I.fn === E
3357
+ (I) => I.fn === C
3343
3358
  ) || B[s].push({
3344
- fn: E,
3359
+ fn: C,
3345
3360
  once: h
3346
3361
  }), {
3347
3362
  ...e,
@@ -3349,11 +3364,11 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3349
3364
  };
3350
3365
  }
3351
3366
  case l.REMOVE_EVENT_LISTENER: {
3352
- const { eventType: s, listener: E } = n.payload;
3367
+ const { eventType: s, listener: C } = n.payload;
3353
3368
  if (!e.eventListeners[s])
3354
3369
  return e;
3355
3370
  const h = e.eventListeners[s].filter(
3356
- (w) => w.fn !== E
3371
+ (w) => w.fn !== C
3357
3372
  ), B = { ...e.eventListeners };
3358
3373
  return h.length === 0 ? delete B[s] : B[s] = h, {
3359
3374
  ...e,
@@ -3362,28 +3377,28 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3362
3377
  }
3363
3378
  // Column grouping functionality
3364
3379
  case l.TOGGLE_COLUMN_GROUP: {
3365
- const { field: s } = n.payload, E = e.expandedColumnGroups || {}, h = E[s] === !0;
3380
+ const { field: s } = n.payload, C = e.expandedColumnGroups || {}, h = C[s] === !0;
3366
3381
  if (!h) {
3367
- const F = (D, y) => {
3368
- for (const z of D) {
3369
- if (M(z) === y)
3382
+ const b = (O, L) => {
3383
+ for (const z of O) {
3384
+ if (F(z) === L)
3370
3385
  return z;
3371
3386
  if (z.children && z.children.length > 0) {
3372
- const S = F(z.children, y);
3373
- if (S) return S;
3387
+ const Q = b(z.children, L);
3388
+ if (Q) return Q;
3374
3389
  }
3375
3390
  }
3376
3391
  return null;
3377
- }, x = F(
3392
+ }, x = b(
3378
3393
  e.columns,
3379
3394
  s
3380
3395
  );
3381
3396
  if (x && x.is_frozen) {
3382
- const D = ((ae = (te = e.tableInstance) == null ? void 0 : te.current) == null ? void 0 : ae.clientWidth) || 0, y = ((se = e.frozenColumns) == null ? void 0 : se.totalWidth) || 0, z = (b) => {
3383
- var re;
3384
- return !b.children || b.children.length === 0 ? b.width || ((re = e.defaultColDef) == null ? void 0 : re.minWidth) || 150 : b.children.reduce((Ce, we) => Ce + z(we), 0);
3385
- }, S = x.width || ((Ee = e.defaultColDef) == null ? void 0 : Ee.minWidth) || 150, X = z(x) - S, H = y + X;
3386
- if (D > 0 && H > D * 0.7)
3397
+ const O = ((ae = (re = e.tableInstance) == null ? void 0 : re.current) == null ? void 0 : ae.clientWidth) || 0, L = ((se = e.frozenColumns) == null ? void 0 : se.totalWidth) || 0, z = (M) => {
3398
+ var te;
3399
+ return !M.children || M.children.length === 0 ? M.width || ((te = e.defaultColDef) == null ? void 0 : te.minWidth) || 150 : M.children.reduce((ue, we) => ue + z(we), 0);
3400
+ }, Q = x.width || ((Ce = e.defaultColDef) == null ? void 0 : Ce.minWidth) || 150, j = z(x) - Q, H = L + j;
3401
+ if (O > 0 && H > O * 0.7)
3387
3402
  return {
3388
3403
  ...e,
3389
3404
  notification: {
@@ -3396,7 +3411,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3396
3411
  }
3397
3412
  }
3398
3413
  const w = {
3399
- ...E,
3414
+ ...C,
3400
3415
  [s]: !h
3401
3416
  }, { processedColumns: I } = De(
3402
3417
  e.columns,
@@ -3422,35 +3437,35 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3422
3437
  0,
3423
3438
  null,
3424
3439
  ((he = e.defaultColDef) == null ? void 0 : he.minWidth) || 150
3425
- ), { columns: E, frozenData: h } = Be(
3440
+ ), { columns: C, frozenData: h } = Be(
3426
3441
  s,
3427
3442
  e.defaultColDef || { minWidth: 150 }
3428
3443
  );
3429
3444
  return {
3430
3445
  ...e,
3431
3446
  expandedColumnGroups: n.payload,
3432
- columns: E,
3447
+ columns: C,
3433
3448
  frozenColumns: h
3434
3449
  };
3435
3450
  }
3436
3451
  // Row drag preview functionality with swap animation
3437
3452
  case l.PREVIEW_ROW_MOVE: {
3438
- const { fromIndex: s, toIndex: E, fromRowData: h, isDraggingDownward: B } = n.payload;
3453
+ const { fromIndex: s, toIndex: C, fromRowData: h, isDraggingDownward: B } = n.payload;
3439
3454
  if (e.previewMode) {
3440
3455
  const w = e.originalFromIndex, I = [...e.originalData ?? []], m = e.hasExpandedChildren;
3441
- I.forEach((x, D) => {
3442
- D === w ? (x._animationState = "moving", x._isDraggedRow = !0, x._hasExpandedChildren = m) : (D >= Math.min(w ?? 0, E) && D <= Math.max(w ?? 0, E) || D >= Math.min(w ?? 0, e.lastToIndex ?? 0) && D <= Math.max(w ?? 0, e.lastToIndex ?? 0)) && (x._animationState = "affected");
3456
+ I.forEach((x, O) => {
3457
+ O === w ? (x._animationState = "moving", x._isDraggedRow = !0, x._hasExpandedChildren = m) : (O >= Math.min(w ?? 0, C) && O <= Math.max(w ?? 0, C) || O >= Math.min(w ?? 0, e.lastToIndex ?? 0) && O <= Math.max(w ?? 0, e.lastToIndex ?? 0)) && (x._animationState = "affected");
3443
3458
  });
3444
3459
  const [G] = I.splice(w ?? 0, 1);
3445
- let F = E;
3460
+ let b = C;
3446
3461
  if (m && B) {
3447
- const x = h == null ? void 0 : h[e.childKeyField], D = (x == null ? void 0 : x.length) || 0;
3448
- D > 0 && e.expandedChildRows[h == null ? void 0 : h[e.uniqueIdField]] && (F = Math.max(
3449
- E - D,
3462
+ const x = h == null ? void 0 : h[e.childKeyField], O = (x == null ? void 0 : x.length) || 0;
3463
+ O > 0 && e.expandedChildRows[h == null ? void 0 : h[e.uniqueIdField]] && (b = Math.max(
3464
+ C - O,
3450
3465
  (w ?? 0) + 1
3451
3466
  ));
3452
3467
  }
3453
- return I.splice(F, 0, G), {
3468
+ return I.splice(b, 0, G), {
3454
3469
  ...e,
3455
3470
  originalData: e.originalData,
3456
3471
  // Keep the original data unchanged
@@ -3458,7 +3473,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3458
3473
  previewMode: !0,
3459
3474
  originalFromIndex: w,
3460
3475
  // Keep the original fromIndex unchanged
3461
- lastToIndex: F,
3476
+ lastToIndex: b,
3462
3477
  // Update the last position
3463
3478
  hasExpandedChildren: m,
3464
3479
  // Maintain whether the dragged row has expanded children
@@ -3467,16 +3482,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3467
3482
  };
3468
3483
  } else {
3469
3484
  const w = [...e.filteredData || []], I = [...w], m = h == null ? void 0 : h[e.childKeyField], G = h && m && Array.isArray(m) && m.length > 0;
3470
- I.forEach((D, y) => {
3471
- y === s ? (D._animationState = "moving", D._isDraggedRow = !0, D._hasExpandedChildren = G) : y >= Math.min(s, E) && y <= Math.max(s, E) && (D._animationState = "affected");
3485
+ I.forEach((O, L) => {
3486
+ L === s ? (O._animationState = "moving", O._isDraggedRow = !0, O._hasExpandedChildren = G) : L >= Math.min(s, C) && L <= Math.max(s, C) && (O._animationState = "affected");
3472
3487
  });
3473
- const [F] = I.splice(s, 1);
3474
- let x = E;
3488
+ const [b] = I.splice(s, 1);
3489
+ let x = C;
3475
3490
  if (G && B) {
3476
- const D = (m == null ? void 0 : m.length) || 0;
3477
- D > 0 && (x = Math.max(E - D, s + 1));
3491
+ const O = (m == null ? void 0 : m.length) || 0;
3492
+ O > 0 && (x = Math.max(C - O, s + 1));
3478
3493
  }
3479
- return I.splice(x, 0, F), {
3494
+ return I.splice(x, 0, b), {
3480
3495
  ...e,
3481
3496
  originalData: w,
3482
3497
  filteredData: I,
@@ -3495,7 +3510,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3495
3510
  case l.RESET_ROW_PREVIEW: {
3496
3511
  if (!e.previewMode)
3497
3512
  return e;
3498
- const s = (e.originalData || []).map((E) => (delete E._isDraggedRow, delete E._animationState, E));
3513
+ const s = (e.originalData || []).map((C) => (delete C._isDraggedRow, delete C._animationState, C));
3499
3514
  return {
3500
3515
  ...e,
3501
3516
  filteredData: s,
@@ -3522,40 +3537,40 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3522
3537
  case l.TOGGLE_ROW_GROUP: {
3523
3538
  const {
3524
3539
  groupId: s,
3525
- rowIndex: E,
3540
+ rowIndex: C,
3526
3541
  extra: { fieldName: h, value: B }
3527
- } = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[s]) != null && ie[s]), G = [...e.filteredData ?? []], F = I[s] || [], x = { ...w };
3528
- let D = 0;
3542
+ } = n.payload, { expandedGroups: w, loadedData: I } = e.rowGroupState, m = !((ie = w[s]) != null && ie[s]), G = [...e.filteredData ?? []], b = I[s] || [], x = { ...w };
3543
+ let O = 0;
3529
3544
  if (m)
3530
- F.length && (G.splice(E + 1, 0, ...F), D = F.length);
3545
+ b.length && (G.splice(C + 1, 0, ...b), O = b.length);
3531
3546
  else {
3532
- let S = -1;
3533
- for (let X = 0; X < G.length; X++)
3534
- if ((G[X].id || G[X][e.uniqueIdField]) == s) {
3535
- S = X;
3547
+ let Q = -1;
3548
+ for (let j = 0; j < G.length; j++)
3549
+ if ((G[j].id || G[j][e.uniqueIdField]) == s) {
3550
+ Q = j;
3536
3551
  break;
3537
3552
  }
3538
- S === -1 && (S = ((ce = w[s]) == null ? void 0 : ce.rowIndex) || E);
3539
- let T = 0;
3540
- Object.keys(w).forEach((X) => {
3541
- X.startsWith(s) && (delete x[X], T += w[X].count);
3542
- }), G.splice(S + 1, T);
3553
+ Q === -1 && (Q = ((ce = w[s]) == null ? void 0 : ce.rowIndex) || C);
3554
+ let R = 0;
3555
+ Object.keys(w).forEach((j) => {
3556
+ j.startsWith(s) && (delete x[j], R += w[j].count);
3557
+ }), G.splice(Q + 1, R);
3543
3558
  }
3544
- const y = { ...I };
3559
+ const L = { ...I };
3545
3560
  let z = { ...e.rowGroupState.pagination };
3546
3561
  return e.purgeClosedRowNodes && !m && (Object.keys(w).filter(
3547
- (T) => T.startsWith(s)
3548
- ).forEach((T) => {
3549
- delete y[T], delete z[T];
3562
+ (R) => R.startsWith(s)
3563
+ ).forEach((R) => {
3564
+ delete L[R], delete z[R];
3550
3565
  }), z = {
3551
3566
  ...z,
3552
3567
  [s]: {
3553
3568
  ...z[s],
3554
3569
  hasMore: !1
3555
3570
  }
3556
- }), (ue = (Ae = e.callBackRef) == null ? void 0 : Ae.current) != null && ue.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
3571
+ }), (Ee = (Ae = e.callBackRef) == null ? void 0 : Ae.current) != null && Ee.onRowGroupOpened && e.callBackRef.current.onRowGroupOpened({
3557
3572
  rowId: s,
3558
- rowIndex: E,
3573
+ rowIndex: C,
3559
3574
  api: e.api,
3560
3575
  isExpanded: m
3561
3576
  }), {
@@ -3565,14 +3580,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3565
3580
  rowGroupState: {
3566
3581
  ...e.rowGroupState,
3567
3582
  isLoadingSomething: m,
3568
- loadedData: y,
3583
+ loadedData: L,
3569
3584
  pagination: z,
3570
3585
  expandedGroups: m ? {
3571
3586
  ...e.rowGroupState.expandedGroups,
3572
3587
  [s]: {
3573
3588
  [s]: m,
3574
- rowIndex: E,
3575
- count: D,
3589
+ rowIndex: C,
3590
+ count: O,
3576
3591
  fieldName: h,
3577
3592
  value: B
3578
3593
  }
@@ -3581,21 +3596,21 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3581
3596
  };
3582
3597
  }
3583
3598
  case l.SET_ROW_GROUP_DATA: {
3584
- const { groupId: s, data: E, append: h } = n.payload, B = s.split("/").length, w = E.map((x, D) => ({
3599
+ const { groupId: s, data: C, append: h } = n.payload, B = s.split("/").length, w = C.map((x, O) => ({
3585
3600
  ...x,
3586
3601
  isChildGroup: !0,
3587
- childIndex: D,
3602
+ childIndex: O,
3588
3603
  groupingLevel: B,
3589
3604
  __parentPath: x.__parentPath ? `${x.__parentPath}/${s}` : s
3590
- })), I = (k = e.rowGroupState.expandedGroups[s]) == null ? void 0 : k.rowIndex, m = e.rowGroupState.loadedData[s] || [], G = h ? [...m, ...w] : w, F = [...e.filteredData ?? []];
3605
+ })), I = (k = e.rowGroupState.expandedGroups[s]) == null ? void 0 : k.rowIndex, m = e.rowGroupState.loadedData[s] || [], G = h ? [...m, ...w] : w, b = [...e.filteredData ?? []];
3591
3606
  if (I >= 0) {
3592
3607
  const x = h ? I + 1 + m.length : I + 1;
3593
- F.splice(x, 0, ...w);
3608
+ b.splice(x, 0, ...w);
3594
3609
  }
3595
3610
  return e.rowGroupState.expandedGroups[s] ? {
3596
3611
  ...e,
3597
- filteredData: F,
3598
- data: F,
3612
+ filteredData: b,
3613
+ data: b,
3599
3614
  rowGroupState: {
3600
3615
  ...e.rowGroupState,
3601
3616
  loadedData: {
@@ -3623,20 +3638,20 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3623
3638
  } : e;
3624
3639
  }
3625
3640
  case l.SET_ROW_GROUP_LOADING: {
3626
- const { groupId: s, isLoading: E } = n.payload;
3641
+ const { groupId: s, isLoading: C } = n.payload;
3627
3642
  return {
3628
3643
  ...e,
3629
3644
  rowGroupState: {
3630
3645
  ...e.rowGroupState,
3631
3646
  loading: {
3632
3647
  ...e.rowGroupState.loading,
3633
- [s]: E
3648
+ [s]: C
3634
3649
  }
3635
3650
  }
3636
3651
  };
3637
3652
  }
3638
3653
  case l.SET_ROW_GROUP_PAGINATION: {
3639
- const { groupId: s, pagination: E } = n.payload;
3654
+ const { groupId: s, pagination: C } = n.payload;
3640
3655
  return {
3641
3656
  ...e,
3642
3657
  rowGroupState: {
@@ -3645,22 +3660,22 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3645
3660
  ...e.rowGroupState.pagination,
3646
3661
  [s]: {
3647
3662
  ...e.rowGroupState.pagination[s],
3648
- ...E
3663
+ ...C
3649
3664
  }
3650
3665
  },
3651
- isLoadingSomething: E.hasMore ?? !1
3666
+ isLoadingSomething: C.hasMore ?? !1
3652
3667
  }
3653
3668
  };
3654
3669
  }
3655
3670
  case l.CLEAR_ROW_GROUP_CACHE: {
3656
- const { groupId: s } = n.payload, E = { ...e.rowGroupState.loadedData }, h = { ...e.rowGroupState.pagination }, B = { ...e.rowGroupState.cache.metadata };
3657
- return s ? (delete E[s], delete h[s], delete B[s]) : (Object.keys(E).forEach((w) => delete E[w]), Object.keys(h).forEach((w) => delete h[w]), Object.keys(B).forEach(
3671
+ const { groupId: s } = n.payload, C = { ...e.rowGroupState.loadedData }, h = { ...e.rowGroupState.pagination }, B = { ...e.rowGroupState.cache.metadata };
3672
+ return s ? (delete C[s], delete h[s], delete B[s]) : (Object.keys(C).forEach((w) => delete C[w]), Object.keys(h).forEach((w) => delete h[w]), Object.keys(B).forEach(
3658
3673
  (w) => delete B[w]
3659
3674
  )), {
3660
3675
  ...e,
3661
3676
  rowGroupState: {
3662
3677
  ...e.rowGroupState,
3663
- loadedData: E,
3678
+ loadedData: C,
3664
3679
  pagination: h,
3665
3680
  cache: {
3666
3681
  ...e.rowGroupState.cache,
@@ -3670,13 +3685,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3670
3685
  };
3671
3686
  }
3672
3687
  case l.REFRESH_ROW_GROUP_DATA: {
3673
- const { groupId: s } = n.payload, E = { ...e.rowGroupState.cache.metadata };
3674
- return s && E[s] ? E[s] = {
3675
- ...E[s],
3688
+ const { groupId: s } = n.payload, C = { ...e.rowGroupState.cache.metadata };
3689
+ return s && C[s] ? C[s] = {
3690
+ ...C[s],
3676
3691
  lastUpdated: Date.now()
3677
- } : s || Object.keys(E).forEach((h) => {
3678
- E[h] = {
3679
- ...E[h],
3692
+ } : s || Object.keys(C).forEach((h) => {
3693
+ C[h] = {
3694
+ ...C[h],
3680
3695
  lastUpdated: Date.now()
3681
3696
  };
3682
3697
  }), {
@@ -3685,7 +3700,7 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3685
3700
  ...e.rowGroupState,
3686
3701
  cache: {
3687
3702
  ...e.rowGroupState.cache,
3688
- metadata: E
3703
+ metadata: C
3689
3704
  }
3690
3705
  }
3691
3706
  };
@@ -3763,14 +3778,14 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3763
3778
  api: n.payload
3764
3779
  };
3765
3780
  case l.EXPAND_COLLAPSE_ALL_COLUMNS: {
3766
- const s = n.payload ? { isAllGroupExpanded: !0 } : { isAllGroupExpanded: !1 }, { processedColumns: E } = De(
3781
+ const s = n.payload ? { isAllGroupExpanded: !0 } : { isAllGroupExpanded: !1 }, { processedColumns: C } = De(
3767
3782
  e.columns,
3768
3783
  s,
3769
3784
  0,
3770
3785
  null,
3771
3786
  ((V = e.defaultColDef) == null ? void 0 : V.minWidth) || 150
3772
3787
  ), { columns: h, frozenData: B } = Be(
3773
- E,
3788
+ C,
3774
3789
  e.defaultColDef || { minWidth: 150 }
3775
3790
  );
3776
3791
  return {
@@ -3891,48 +3906,48 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3891
3906
  if (!s && ke(e))
3892
3907
  return e;
3893
3908
  if (s) {
3894
- const E = Ze(e), h = e.columns.some((D) => D.aggFunc), B = [], w = {};
3909
+ const C = Ze(e), h = e.columns.some((O) => O.aggFunc), B = [], w = {};
3895
3910
  let I = 0;
3896
- const { uniqueIdField: m, childKeyField: G, rowSpanColumn: F, api: x } = e;
3897
- for (const D of E) {
3898
- const y = String(D[m]), z = D[G] || [];
3911
+ const { uniqueIdField: m, childKeyField: G, rowSpanColumn: b, api: x } = e;
3912
+ for (const O of C) {
3913
+ const L = String(O[m]), z = O[G] || [];
3899
3914
  if (z.length > 0) {
3900
- let T, X = null;
3915
+ let R, j = null;
3901
3916
  if (h) {
3902
- const { aggreRow: re, aggreChildRows: Ce } = ye(
3917
+ const { aggreRow: te, aggreChildRows: ue } = ye(
3903
3918
  e,
3904
3919
  z,
3905
- D,
3920
+ O,
3906
3921
  1,
3907
3922
  I,
3908
- y
3923
+ L
3909
3924
  );
3910
- X = re, T = Ce;
3925
+ j = te, R = ue;
3911
3926
  } else
3912
- T = z.map(
3913
- (re) => ({
3914
- ...re,
3915
- __parentPath: y,
3927
+ R = z.map(
3928
+ (te) => ({
3929
+ ...te,
3930
+ __parentPath: L,
3916
3931
  level: 1,
3917
3932
  parentRowIndex: I,
3918
- parentRowData: D,
3933
+ parentRowData: O,
3919
3934
  groupingLevel: 1
3920
3935
  })
3921
3936
  );
3922
- const H = z.length + (X ? 1 : 0);
3923
- w[y] = {
3924
- rowId: y,
3937
+ const H = z.length + (j ? 1 : 0);
3938
+ w[L] = {
3939
+ rowId: L,
3925
3940
  rowIndex: I,
3926
3941
  childRowsCount: H
3927
3942
  };
3928
- const b = Fe(
3929
- [D, ...T],
3930
- F,
3943
+ const M = Fe(
3944
+ [O, ...R],
3945
+ b,
3931
3946
  x
3932
3947
  );
3933
- X ? (B.push(...b, X), I += b.length + 1) : (B.push(...b), I += b.length);
3948
+ j ? (B.push(...M, j), I += M.length + 1) : (B.push(...M), I += M.length);
3934
3949
  } else
3935
- B.push(D), I += 1;
3950
+ B.push(O), I += 1;
3936
3951
  }
3937
3952
  return me(e, B), {
3938
3953
  ...e,
@@ -3941,13 +3956,13 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3941
3956
  data: B
3942
3957
  };
3943
3958
  } else {
3944
- const E = Ze(e), h = e.enableRowSpan ? E.map((B) => {
3959
+ const C = Ze(e), h = e.enableRowSpan ? C.map((B) => {
3945
3960
  if (B.__rowSpanInfo) {
3946
3961
  const { __rowSpanInfo: w, ...I } = B;
3947
3962
  return I;
3948
3963
  }
3949
3964
  return B;
3950
- }) : E;
3965
+ }) : C;
3951
3966
  return me(e, h), {
3952
3967
  ...e,
3953
3968
  expandedChildRows: {},
@@ -3957,53 +3972,53 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
3957
3972
  }
3958
3973
  }
3959
3974
  case l.EXPAND_ROW_WITH_NESTED_CHILDREN: {
3960
- const { rowId: s, rowIndex: E, expand: h } = n.payload, { uniqueIdField: B, childKeyField: w, rowSpanColumn: I, api: m, columns: G } = e;
3975
+ const { rowId: s, rowIndex: C, expand: h } = n.payload, { uniqueIdField: B, childKeyField: w, rowSpanColumn: I, api: m, columns: G } = e;
3961
3976
  if (h) {
3962
- const F = e.filteredData || [], x = F[E];
3977
+ const b = e.filteredData || [], x = b[C];
3963
3978
  if (!x) return e;
3964
- const D = G.some((b) => b.aggFunc), y = { ...e.expandedChildRows }, z = (b, re, Ce, we) => {
3965
- const Oe = b[w] || [];
3966
- if (Oe.length === 0) return [b];
3979
+ const O = G.some((M) => M.aggFunc), L = { ...e.expandedChildRows }, z = (M, te, ue, we) => {
3980
+ const Se = M[w] || [];
3981
+ if (Se.length === 0) return [M];
3967
3982
  const ve = we.value;
3968
- let Re, Qe = null;
3969
- if (D) {
3970
- const { aggreRow: Se, aggreChildRows: ze } = ye(
3983
+ let Te, Qe = null;
3984
+ if (O) {
3985
+ const { aggreRow: Oe, aggreChildRows: ze } = ye(
3971
3986
  e,
3972
- Oe,
3973
- b,
3974
- Ce,
3987
+ Se,
3988
+ M,
3989
+ ue,
3975
3990
  ve,
3976
- re
3991
+ te
3977
3992
  );
3978
- Qe = Se, Re = ze;
3993
+ Qe = Oe, Te = ze;
3979
3994
  } else
3980
- Re = Oe.map((Se) => ({
3981
- ...Se,
3982
- __parentPath: re,
3983
- level: Ce,
3995
+ Te = Se.map((Oe) => ({
3996
+ ...Oe,
3997
+ __parentPath: te,
3998
+ level: ue,
3984
3999
  parentRowIndex: ve,
3985
- parentRowData: b,
3986
- groupingLevel: Ce
4000
+ parentRowData: M,
4001
+ groupingLevel: ue
3987
4002
  }));
3988
- y[re] = {
3989
- rowId: re,
4003
+ L[te] = {
4004
+ rowId: te,
3990
4005
  rowIndex: ve,
3991
- childRowsCount: Oe.length + (Qe ? 1 : 0)
4006
+ childRowsCount: Se.length + (Qe ? 1 : 0)
3992
4007
  };
3993
4008
  const oe = I ? Fe(
3994
- [b, ...Re],
4009
+ [M, ...Te],
3995
4010
  I,
3996
4011
  m
3997
- ) : [b, ...Re], Y = [oe[0]];
4012
+ ) : [M, ...Te], Y = [oe[0]];
3998
4013
  we.value += 1;
3999
- const Xe = Re.length;
4000
- for (let Se = 0; Se < Xe; Se++) {
4001
- const ze = Re[Se], an = oe[Se + 1], Je = ze[w];
4014
+ const Xe = Te.length;
4015
+ for (let Oe = 0; Oe < Xe; Oe++) {
4016
+ const ze = Te[Oe], an = oe[Oe + 1], Je = ze[w];
4002
4017
  if ((Je == null ? void 0 : Je.length) > 0) {
4003
4018
  const vn = String(ze[B]), Gn = z(
4004
4019
  an,
4005
- `${re}/${vn}`,
4006
- Ce + 1,
4020
+ `${te}/${vn}`,
4021
+ ue + 1,
4007
4022
  we
4008
4023
  );
4009
4024
  Y.push(...Gn);
@@ -4011,40 +4026,40 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
4011
4026
  Y.push(an), we.value += 1;
4012
4027
  }
4013
4028
  return Qe && (Y.push(Qe), we.value += 1), Y;
4014
- }, S = z(x, s, 1, {
4015
- value: E
4016
- }), T = F.slice(0, E), X = F.slice(E + 1), H = [
4017
- ...T,
4018
- ...S,
4019
- ...X
4029
+ }, Q = z(x, s, 1, {
4030
+ value: C
4031
+ }), R = b.slice(0, C), j = b.slice(C + 1), H = [
4032
+ ...R,
4033
+ ...Q,
4034
+ ...j
4020
4035
  ];
4021
4036
  return me(e, H), {
4022
4037
  ...e,
4023
- expandedChildRows: y,
4038
+ expandedChildRows: L,
4024
4039
  filteredData: H,
4025
4040
  data: H
4026
4041
  };
4027
4042
  } else {
4028
4043
  if (!e.expandedChildRows[s]) return e;
4029
- const F = e.filteredData || [], x = { ...e.expandedChildRows }, D = `${s}/`;
4030
- let y = 0;
4044
+ const b = e.filteredData || [], x = { ...e.expandedChildRows }, O = `${s}/`;
4045
+ let L = 0;
4031
4046
  const z = [];
4032
- for (const T of Object.keys(x))
4033
- (T === s || T.startsWith(D)) && (y += x[T].childRowsCount, z.push(T));
4034
- for (const T of z)
4035
- delete x[T];
4036
- const S = [
4037
- ...F.slice(0, E + 1),
4038
- ...F.slice(E + 1 + y)
4047
+ for (const R of Object.keys(x))
4048
+ (R === s || R.startsWith(O)) && (L += x[R].childRowsCount, z.push(R));
4049
+ for (const R of z)
4050
+ delete x[R];
4051
+ const Q = [
4052
+ ...b.slice(0, C + 1),
4053
+ ...b.slice(C + 1 + L)
4039
4054
  ];
4040
- return (le = S[E]) != null && le.__rowSpanInfo && (S[E] = {
4041
- ...S[E],
4055
+ return (le = Q[C]) != null && le.__rowSpanInfo && (Q[C] = {
4056
+ ...Q[C],
4042
4057
  __rowSpanInfo: void 0
4043
- }), me(e, S), {
4058
+ }), me(e, Q), {
4044
4059
  ...e,
4045
4060
  expandedChildRows: x,
4046
- filteredData: S,
4047
- data: S
4061
+ filteredData: Q,
4062
+ data: Q
4048
4063
  };
4049
4064
  }
4050
4065
  }
@@ -4098,16 +4113,16 @@ const Jt = (e) => /* @__PURE__ */ J.createElement("svg", { width: "1em", height:
4098
4113
  default:
4099
4114
  return e;
4100
4115
  }
4101
- }, ln = Tn(null), Ot = ({
4116
+ }, ln = Rn(null), St = ({
4102
4117
  tableId: e = "default",
4103
4118
  children: n
4104
4119
  }) => {
4105
- const t = Rn(() => Qn(e), [e]);
4120
+ const t = Tn(() => Qn(e), [e]);
4106
4121
  return pe(() => () => {
4107
4122
  Pt(e);
4108
4123
  }, [e]), /* @__PURE__ */ de(ln.Provider, { value: t, children: n });
4109
4124
  };
4110
- function St(e) {
4125
+ function Ot(e) {
4111
4126
  const t = An(ln) || xn;
4112
4127
  return e ? t(e) : t();
4113
4128
  }
@@ -4132,11 +4147,11 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4132
4147
  const r = (A) => {
4133
4148
  var g;
4134
4149
  const i = A.target, o = t.current && !t.current.contains(i), d = n && n.some(
4135
- (C) => C && C.current && C.current.contains(i)
4150
+ (u) => u && u.current && u.current.contains(i)
4136
4151
  ), f = (g = t.current) == null ? void 0 : g.querySelector(
4137
4152
  ".ia-table-menu-submenu"
4138
- ), u = !!f && (f == null ? void 0 : f.contains(i));
4139
- o && !d && !u && e();
4153
+ ), E = !!f && (f == null ? void 0 : f.contains(i));
4154
+ o && !d && !E && e();
4140
4155
  };
4141
4156
  return document.addEventListener("mousedown", r), () => {
4142
4157
  document.removeEventListener("mousedown", r);
@@ -4186,51 +4201,51 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4186
4201
  // Custom width for the menu
4187
4202
  horizontalAlign: c = xe.AUTO,
4188
4203
  // Horizontal alignment of the menu
4189
- isSubmenu: u = !1,
4204
+ isSubmenu: E = !1,
4190
4205
  parentOptionRef: g = null,
4191
- skipAnimation: C = !1,
4206
+ skipAnimation: u = !1,
4192
4207
  // Skip animation for submenus
4193
- portalContainer: L = document.body,
4208
+ portalContainer: P = document.body,
4194
4209
  additionalButtons: a = null,
4195
4210
  forcePosition: p = !1,
4196
4211
  // When true, prevents position flipping even if there's not enough space
4197
- anchorOrigin: R,
4198
- onClick: P
4212
+ anchorOrigin: T,
4213
+ onClick: D
4199
4214
  }) => {
4200
- const [O, U] = Ge({
4215
+ const [S, U] = Ge({
4201
4216
  top: 0,
4202
4217
  left: 0,
4203
4218
  width: 0,
4204
4219
  visibility: "hidden"
4205
4220
  // Hide menu initially until positioned
4206
- }), [N, Q] = Ge("entered"), [_, v] = Ge(d), [K, j] = Ge("center"), [q, ee] = Ge(
4221
+ }), [N, y] = Ge("entered"), [_, v] = Ge(d), [X, K] = Ge("center"), [q, ee] = Ge(
4207
4222
  null
4208
4223
  ), ne = Pe(
4209
4224
  null
4210
4225
  ), $ = Pe({}), Z = Pe(
4211
4226
  null
4212
- ), te = Ie(() => {
4213
- if (ee(null), C) {
4227
+ ), re = Ie(() => {
4228
+ if (ee(null), u) {
4214
4229
  A(!1);
4215
4230
  return;
4216
4231
  }
4217
- Q("exiting"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
4218
- A(!1), Q("entered");
4232
+ y("exiting"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
4233
+ A(!1), y("entered");
4219
4234
  }, 150);
4220
- }, [A, C]), ae = Ie(
4235
+ }, [A, u]), ae = Ie(
4221
4236
  (k) => {
4222
4237
  if (!(k.submenu && k.useHover)) {
4223
4238
  if (k.submenu) {
4224
4239
  ee(k.label === q ? null : k.label);
4225
4240
  return;
4226
4241
  }
4227
- k.onClick ? k.onClick(k.label) : P && P(k), k.noCloseOnSelect || (A(!1), ee(null));
4242
+ k.onClick ? k.onClick(k.label) : D && D(k), k.noCloseOnSelect || (A(!1), ee(null));
4228
4243
  }
4229
4244
  },
4230
- [q, A, P]
4245
+ [q, A, D]
4231
4246
  ), se = Ie((k) => {
4232
4247
  k.submenu && k.useHover && (Z.current && (clearTimeout(Z.current), Z.current = null), ee(k.label));
4233
- }, []), Ee = Ie(() => {
4248
+ }, []), Ce = Ie(() => {
4234
4249
  Z.current && (clearTimeout(Z.current), Z.current = null);
4235
4250
  }, []), fe = Ie(
4236
4251
  (k) => {
@@ -4263,8 +4278,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4263
4278
  }
4264
4279
  }, [i, o, r]), Fn(() => {
4265
4280
  if (r && (i != null && i.current || o || g != null && g.current)) {
4266
- C || (Q("entering"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
4267
- Q("entered");
4281
+ u || (y("entering"), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
4282
+ y("entered");
4268
4283
  }, 200));
4269
4284
  const k = (g == null ? void 0 : g.current) || (i == null ? void 0 : i.current) || o, V = (k == null ? void 0 : k.getBoundingClientRect()) || {
4270
4285
  top: 0,
@@ -4275,10 +4290,10 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4275
4290
  right: 0
4276
4291
  };
4277
4292
  let le = { top: 0, left: 0, width: 0 }, s = !1;
4278
- L !== document.body && L instanceof Element && (le = L.getBoundingClientRect(), s = !0);
4279
- const E = window.innerWidth, h = window.innerHeight, B = f || Math.max(V.width, 150), w = e.length * 40;
4293
+ P !== document.body && P instanceof Element && (le = P.getBoundingClientRect(), s = !0);
4294
+ const C = window.innerWidth, h = window.innerHeight, B = f || Math.max(V.width, 150), w = e.length * 40;
4280
4295
  let I = d;
4281
- const m = V.top > w, G = h - V.bottom > w, F = V.left > B, x = E - V.right > B;
4296
+ const m = V.top > w, G = h - V.bottom > w, b = V.left > B, x = C - V.right > B;
4282
4297
  if (p)
4283
4298
  I = d;
4284
4299
  else
@@ -4290,60 +4305,60 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4290
4305
  !G && m && (I = ge.TOP);
4291
4306
  break;
4292
4307
  case ge.LEFT:
4293
- !F && x && (I = ge.RIGHT);
4308
+ !b && x && (I = ge.RIGHT);
4294
4309
  break;
4295
4310
  case ge.RIGHT:
4296
- !x && F && (I = ge.LEFT);
4311
+ !x && b && (I = ge.LEFT);
4297
4312
  break;
4298
4313
  }
4299
- const D = u && (g != null && g.current) ? g.current.getBoundingClientRect() : V, y = V.left, z = V.right, S = V.width;
4300
- f && (D.width = f);
4301
- const T = yt(
4314
+ const O = E && (g != null && g.current) ? g.current.getBoundingClientRect() : V, L = V.left, z = V.right, Q = V.width;
4315
+ f && (O.width = f);
4316
+ const R = yt(
4302
4317
  I,
4303
4318
  s,
4304
- D,
4319
+ O,
4305
4320
  le,
4306
4321
  V
4307
4322
  );
4308
- if (R)
4309
- switch (R) {
4323
+ if (T)
4324
+ switch (T) {
4310
4325
  case "start":
4311
- s ? T.left = y - le.left : T.left = y + window.scrollX;
4326
+ s ? R.left = L - le.left : R.left = L + window.scrollX;
4312
4327
  break;
4313
4328
  case "end":
4314
- s ? T.left = z - B - le.left : T.left = z - B + window.scrollX;
4329
+ s ? R.left = z - B - le.left : R.left = z - B + window.scrollX;
4315
4330
  break;
4316
4331
  case "center":
4317
- s ? T.left = y + S / 2 - B / 2 - le.left : T.left = y + S / 2 - B / 2 + window.scrollX;
4332
+ s ? R.left = L + Q / 2 - B / 2 - le.left : R.left = L + Q / 2 - B / 2 + window.scrollX;
4318
4333
  break;
4319
4334
  }
4320
- if (!R && (I === ge.BOTTOM || I === ge.TOP)) {
4335
+ if (!T && (I === ge.BOTTOM || I === ge.TOP)) {
4321
4336
  let H = c;
4322
4337
  if (c === xe.AUTO) {
4323
- const b = V.right + B <= E, re = V.left - B >= 0;
4324
- b ? H = xe.START : re ? H = xe.END : H = xe.START;
4338
+ const M = V.right + B <= C, te = V.left - B >= 0;
4339
+ M ? H = xe.START : te ? H = xe.END : H = xe.START;
4325
4340
  }
4326
- if (H === xe.START ? s ? T.left = V.left - le.left : T.left = V.left + window.scrollX : H === xe.END && (s ? T.left = V.right - B - le.left : T.left = V.right - B + window.scrollX), s) {
4327
- const b = le.width;
4328
- (T.left ?? 0) + B > b && (T.left = Math.max(0, b - B));
4341
+ if (H === xe.START ? s ? R.left = V.left - le.left : R.left = V.left + window.scrollX : H === xe.END && (s ? R.left = V.right - B - le.left : R.left = V.right - B + window.scrollX), s) {
4342
+ const M = le.width;
4343
+ (R.left ?? 0) + B > M && (R.left = Math.max(0, M - B));
4329
4344
  } else
4330
- (T.left ?? 0) + B > E && (T.left = Math.max(0, E - B));
4331
- (T.left ?? 0) < 0 && (T.left = 0);
4332
- } else (I === ge.LEFT || I === ge.RIGHT) && (s || (T.top ?? 0) + w > h && (T.top = Math.max(0, h - w)));
4333
- let X = "center";
4345
+ (R.left ?? 0) + B > C && (R.left = Math.max(0, C - B));
4346
+ (R.left ?? 0) < 0 && (R.left = 0);
4347
+ } else (I === ge.LEFT || I === ge.RIGHT) && (s || (R.top ?? 0) + w > h && (R.top = Math.max(0, h - w)));
4348
+ let j = "center";
4334
4349
  if (I === ge.BOTTOM || I === ge.TOP) {
4335
- const H = V.left + V.width / 2, b = E / 2;
4336
- H < b && x ? X = "left" : H >= b && F && (X = "right");
4350
+ const H = V.left + V.width / 2, M = C / 2;
4351
+ H < M && x ? j = "left" : H >= M && b && (j = "right");
4337
4352
  } else if (I === ge.LEFT || I === ge.RIGHT) {
4338
- const H = V.top + V.height / 2, b = h / 2;
4339
- H < b && G ? X = "top" : H >= b && m && (X = "bottom");
4353
+ const H = V.top + V.height / 2, M = h / 2;
4354
+ H < M && G ? j = "top" : H >= M && m && (j = "bottom");
4340
4355
  }
4341
- v(I), j(X), U({
4342
- top: T.top ?? 0,
4343
- left: T.left ?? 0,
4344
- width: T.width ?? 0,
4345
- transform: T.transform,
4346
- transformOrigin: T.transformOrigin,
4356
+ v(I), K(j), U({
4357
+ top: R.top ?? 0,
4358
+ left: R.left ?? 0,
4359
+ width: R.width ?? 0,
4360
+ transform: R.transform,
4361
+ transformOrigin: R.transformOrigin,
4347
4362
  visibility: "visible"
4348
4363
  });
4349
4364
  }
@@ -4353,35 +4368,35 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4353
4368
  e.length,
4354
4369
  f,
4355
4370
  c,
4356
- C,
4357
- L,
4371
+ u,
4372
+ P,
4358
4373
  p,
4359
4374
  ie,
4360
4375
  // Add dependency on menuButtonPosition
4361
4376
  o,
4362
- R
4377
+ T
4363
4378
  ]);
4364
4379
  const Ae = Pe(o ?? null);
4365
4380
  Ae.current = o ?? null;
4366
- const ue = Lt(
4367
- te,
4368
- u ? [g] : [i || Ae]
4381
+ const Ee = Lt(
4382
+ re,
4383
+ E ? [g] : [i || Ae]
4369
4384
  );
4370
- return r ? On(
4385
+ return r ? Sn(
4371
4386
  /* @__PURE__ */ Le(
4372
4387
  "div",
4373
4388
  {
4374
- className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${_} flip-${K} ${!C && N === "entering" ? "menu-entering" : ""} ${!C && N === "entered" ? "menu-entered" : ""} ${!C && N === "exiting" ? "menu-exiting" : ""} ${u ? "ia-table-submenu-only" : ""}`,
4389
+ className: `ia-table-menu-submenu d-flex flex-column gap-2 ia-table-position-${_} flip-${X} ${!u && N === "entering" ? "menu-entering" : ""} ${!u && N === "entered" ? "menu-entered" : ""} ${!u && N === "exiting" ? "menu-exiting" : ""} ${E ? "ia-table-submenu-only" : ""}`,
4375
4390
  style: {
4376
- ...O,
4391
+ ...S,
4377
4392
  position: "absolute",
4378
- width: f ? `${f}px` : O.width ? `${O.width}px` : void 0,
4379
- minHeight: O.height ? `${O.height}px` : void 0,
4380
- transform: O.transform,
4381
- transformOrigin: O.transformOrigin,
4382
- visibility: O.visibility || "hidden"
4393
+ width: f ? `${f}px` : S.width ? `${S.width}px` : void 0,
4394
+ minHeight: S.height ? `${S.height}px` : void 0,
4395
+ transform: S.transform,
4396
+ transformOrigin: S.transformOrigin,
4397
+ visibility: S.visibility || "hidden"
4383
4398
  },
4384
- ref: ue,
4399
+ ref: Ee,
4385
4400
  children: [
4386
4401
  a,
4387
4402
  a && /* @__PURE__ */ de("div", { className: "ia-table-divider" }),
@@ -4429,7 +4444,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4429
4444
  k.submenu && q === k.label && /* @__PURE__ */ de(
4430
4445
  "div",
4431
4446
  {
4432
- onMouseEnter: Ee,
4447
+ onMouseEnter: Ce,
4433
4448
  onMouseLeave: () => fe(k.useHover),
4434
4449
  children: /* @__PURE__ */ de(
4435
4450
  Qt,
@@ -4446,7 +4461,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4446
4461
  current: $.current[k.label]
4447
4462
  },
4448
4463
  skipAnimation: !0,
4449
- portalContainer: ue.current ?? void 0,
4464
+ portalContainer: Ee.current ?? void 0,
4450
4465
  menuButtonRef: void 0
4451
4466
  },
4452
4467
  `submenu-${k.label}`
@@ -4457,9 +4472,9 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4457
4472
  ]
4458
4473
  }
4459
4474
  ),
4460
- L
4475
+ P
4461
4476
  ) : null;
4462
- }, Te = /* @__PURE__ */ new Map(), He = (e) => e ? typeof e == "string" ? e : "current" in e && e.current ? e.current.tableId || e.current.api && e.current.api.tableId || null : ("tableId" in e || "api" in e) && (e.tableId || e.api && e.api.tableId) || null : null, pn = (e, n, t, r, A = []) => {
4477
+ }, Re = /* @__PURE__ */ new Map(), He = (e) => e ? typeof e == "string" ? e : "current" in e && e.current ? e.current.tableId || e.current.api && e.current.api.tableId || null : ("tableId" in e || "api" in e) && (e.tableId || e.api && e.api.tableId) || null : null, pn = (e, n, t, r, A = []) => {
4463
4478
  if (!e) {
4464
4479
  console.warn("Cannot register grid without an ID");
4465
4480
  return;
@@ -4471,37 +4486,37 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4471
4486
  actionTypes: r,
4472
4487
  alignedWith: A
4473
4488
  };
4474
- Te.set(e, i), A.forEach((o) => {
4489
+ Re.set(e, i), A.forEach((o) => {
4475
4490
  const d = He(o);
4476
- if (d && Te.has(d)) {
4477
- const f = Te.get(d);
4491
+ if (d && Re.has(d)) {
4492
+ const f = Re.get(d);
4478
4493
  f.alignedWith.some(
4479
- (u) => He(u) === e
4494
+ (E) => He(E) === e
4480
4495
  ) || f.alignedWith.push(e);
4481
4496
  }
4482
4497
  });
4483
4498
  }, In = (e) => {
4484
- if (!e || !Te.has(e))
4499
+ if (!e || !Re.has(e))
4485
4500
  return;
4486
- const { alignedWith: n } = Te.get(e);
4501
+ const { alignedWith: n } = Re.get(e);
4487
4502
  n.forEach((t) => {
4488
4503
  const r = He(t);
4489
- if (r && Te.has(r)) {
4490
- const A = Te.get(r);
4504
+ if (r && Re.has(r)) {
4505
+ const A = Re.get(r);
4491
4506
  A.alignedWith = A.alignedWith.filter(
4492
4507
  (i) => He(i) !== e
4493
4508
  );
4494
4509
  }
4495
- }), Te.delete(e);
4510
+ }), Re.delete(e);
4496
4511
  }, xt = (e, n, t, r = {}) => {
4497
- if (!Te.has(e))
4512
+ if (!Re.has(e))
4498
4513
  return;
4499
- const A = Te.get(e), i = /* @__PURE__ */ new Set();
4514
+ const A = Re.get(e), i = /* @__PURE__ */ new Set();
4500
4515
  A.alignedWith.forEach((o) => {
4501
4516
  const d = He(o);
4502
4517
  if (!(!d || i.has(d))) {
4503
- if (i.add(d), Te.has(d))
4504
- Te.get(d).dispatchFn({
4518
+ if (i.add(d), Re.has(d))
4519
+ Re.get(d).dispatchFn({
4505
4520
  type: n,
4506
4521
  payload: t,
4507
4522
  meta: {
@@ -4515,8 +4530,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4515
4530
  if (typeof c == "function" && (n.includes("COLUMN") || n.includes("COLUMNS")))
4516
4531
  try {
4517
4532
  c(t);
4518
- } catch (u) {
4519
- console.log("Error Grid ALignemnt", u);
4533
+ } catch (E) {
4534
+ console.log("Error Grid ALignemnt", E);
4520
4535
  }
4521
4536
  }
4522
4537
  }
@@ -4664,42 +4679,42 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4664
4679
  enableRowSpan: d,
4665
4680
  rowSpanColumn: f,
4666
4681
  pageSize: c,
4667
- serverSide: u,
4682
+ serverSide: E,
4668
4683
  rowDragManaged: g,
4669
- infiniteScroll: C,
4670
- initialExpandedColumnGroups: L,
4684
+ infiniteScroll: u,
4685
+ initialExpandedColumnGroups: P,
4671
4686
  tableApi: a,
4672
4687
  smartGridMenuOptions: p,
4673
- purgeClosedRowNodes: R,
4674
- detailRendererTable: P,
4675
- isSaveViewEnabled: O,
4688
+ purgeClosedRowNodes: T,
4689
+ detailRendererTable: D,
4690
+ isSaveViewEnabled: S,
4676
4691
  isSavingViewLoading: U,
4677
4692
  savedViewsOptions: N,
4678
- rowHeight: Q,
4693
+ rowHeight: y,
4679
4694
  tableId: _,
4680
4695
  refObj: v,
4681
- callBackRef: K,
4682
- exportCallbackRef: j,
4696
+ callBackRef: X,
4697
+ exportCallbackRef: K,
4683
4698
  saveViewCallbackRef: q,
4684
4699
  saveViewOptionsRef: ee,
4685
4700
  isSingleSelect: ne,
4686
4701
  defaultColDef: $,
4687
4702
  disableSelectAllRecords: Z,
4688
- selectable: te,
4703
+ selectable: re,
4689
4704
  columnBufferSize: ae,
4690
4705
  lazyLoadCellRenderer: se,
4691
- hasSplitRenderer: Ee,
4706
+ hasSplitRenderer: Ce,
4692
4707
  splitRendererKeys: fe,
4693
4708
  removeSelectionOnOperation: he,
4694
4709
  removeCheckConfigurationOnOperation: ie,
4695
4710
  clickCallbackRef: ce,
4696
4711
  isChatEnabled: Ae,
4697
- isCommentFeatureEnabled: ue,
4712
+ isCommentFeatureEnabled: Ee,
4698
4713
  noHeaderSelection: k,
4699
4714
  treeData: V,
4700
4715
  virtualizationConfig: le,
4701
4716
  rowSelectionRef: s,
4702
- disableCurrentPageRecords: E
4717
+ disableCurrentPageRecords: C
4703
4718
  }) => (pe(() => {
4704
4719
  e({
4705
4720
  type: l.SET_COLUMN_MAP,
@@ -4722,7 +4737,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4722
4737
  payload: _
4723
4738
  }), e({
4724
4739
  type: l.SET_INITIAL_EXPANDED_COLUMN_GROUPS,
4725
- payload: L
4740
+ payload: P
4726
4741
  }), e({
4727
4742
  type: l.ROW_DRAG_MANAGED,
4728
4743
  payload: g
@@ -4740,7 +4755,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4740
4755
  payload: { uniqueIdField: i, childKeyField: o }
4741
4756
  }), e({
4742
4757
  type: l.INFINITE_SCROLL,
4743
- payload: C
4758
+ payload: u
4744
4759
  }), e({
4745
4760
  type: l.ADD_TABLE_INSTANCE,
4746
4761
  payload: r
@@ -4752,18 +4767,18 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4752
4767
  payload: p
4753
4768
  }), e({
4754
4769
  type: l.ROW_GROUP_CACHE_ENABLE,
4755
- payload: R
4770
+ payload: T
4756
4771
  }), e({
4757
4772
  type: l.DETAIL_RENDERER_TABLE,
4758
- payload: P
4773
+ payload: D
4759
4774
  }), e({
4760
4775
  type: l.IS_SAVE_VIEW_ENABLED,
4761
- payload: O
4776
+ payload: S
4762
4777
  }), e({
4763
4778
  type: l.SET_REFS,
4764
4779
  payload: {
4765
- callBackRef: K,
4766
- exportCallbackRef: j,
4780
+ callBackRef: X,
4781
+ exportCallbackRef: K,
4767
4782
  saveViewCallbackRef: q,
4768
4783
  saveViewOptionsRef: ee,
4769
4784
  clickCallbackRef: ce,
@@ -4777,7 +4792,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4777
4792
  payload: $
4778
4793
  }), e({
4779
4794
  type: l.SET_SELECTABLE,
4780
- payload: te
4795
+ payload: re
4781
4796
  }), e({
4782
4797
  type: l.SET_DISABLE_SELECT_ALL_RECORDS_OPTION,
4783
4798
  payload: Z
@@ -4789,7 +4804,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4789
4804
  payload: se
4790
4805
  }), e({
4791
4806
  type: l.SET_HAS_SPLIT_RENDERER,
4792
- payload: Ee
4807
+ payload: Ce
4793
4808
  }), e({
4794
4809
  type: l.SET_HAS_SPLIT_RENDERER_KEYS,
4795
4810
  payload: fe
@@ -4801,7 +4816,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4801
4816
  payload: Ae
4802
4817
  }), e({
4803
4818
  type: l.SET_COMMENT_ENABLED,
4804
- payload: ue
4819
+ payload: Ee
4805
4820
  }), e({
4806
4821
  type: l.SET_REMOVE_CHECK_CONFIGURATION_ON_OPERATION,
4807
4822
  payload: ie
@@ -4816,14 +4831,14 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4816
4831
  payload: le
4817
4832
  }), e({
4818
4833
  type: l.SET_DISABLE_CURRENT_PAGE_RECORDS,
4819
- payload: E
4834
+ payload: C
4820
4835
  });
4821
4836
  }, []), pe(() => {
4822
4837
  e({
4823
4838
  type: l.SET_ROW_HEIGHT,
4824
- payload: Q
4839
+ payload: y
4825
4840
  });
4826
- }, [Q]), pe(() => {
4841
+ }, [y]), pe(() => {
4827
4842
  e({
4828
4843
  type: l.SAVE_VIEW_CALLBACKS,
4829
4844
  payload: {
@@ -4834,9 +4849,9 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4834
4849
  }, [N, U]), pe(() => {
4835
4850
  e({
4836
4851
  type: l.SET_SERVER_SIDE,
4837
- payload: u
4852
+ payload: E
4838
4853
  });
4839
- }, [u]), null), Nn = Tn(
4854
+ }, [E]), null), Nn = Rn(
4840
4855
  void 0
4841
4856
  ), Ft = mn(
4842
4857
  ({
@@ -4851,58 +4866,58 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4851
4866
  // Grid alignment props
4852
4867
  tableId: f,
4853
4868
  alignedGrids: c = [],
4854
- initialExpandedColumnGroups: u = {},
4869
+ initialExpandedColumnGroups: E = {},
4855
4870
  enableRowSpan: g = !1,
4856
- rowSpanColumn: C = null,
4857
- columnMap: L = {},
4871
+ rowSpanColumn: u = null,
4872
+ columnMap: P = {},
4858
4873
  infiniteScroll: a = !1,
4859
4874
  rowDragManaged: p,
4860
- pinnedTopRows: R = [],
4861
- pinnedBottomRows: P = [],
4862
- getRowStyle: O,
4875
+ pinnedTopRows: T = [],
4876
+ pinnedBottomRows: D = [],
4877
+ getRowStyle: S,
4863
4878
  tableInstance: U,
4864
4879
  smartGridMenuOptions: N,
4865
- purgeClosedRowNodes: Q,
4880
+ purgeClosedRowNodes: y,
4866
4881
  detailRendererTable: _,
4867
4882
  // Save View Props
4868
4883
  isSaveViewEnabled: v,
4869
- isSavingViewLoading: K,
4870
- savedViewsOptions: j,
4884
+ isSavingViewLoading: X,
4885
+ savedViewsOptions: K,
4871
4886
  rowHeight: q,
4872
4887
  callBackRef: ee,
4873
4888
  exportCallbackRef: ne,
4874
4889
  saveViewCallbackRef: $,
4875
4890
  saveViewOptionsRef: Z,
4876
- clickCallbackRef: te,
4891
+ clickCallbackRef: re,
4877
4892
  // Row selection
4878
4893
  isSingleSelect: ae = !1,
4879
4894
  selectable: se,
4880
- disableSelectAllRecords: Ee,
4895
+ disableSelectAllRecords: Ce,
4881
4896
  columnBufferSize: fe,
4882
4897
  lazyLoadCellRenderer: he,
4883
4898
  hasSplitRenderer: ie,
4884
4899
  splitRendererKeys: ce,
4885
4900
  removeSelectionOnOperation: Ae,
4886
- removeCheckConfigurationOnOperation: ue,
4901
+ removeCheckConfigurationOnOperation: Ee,
4887
4902
  isChatEnabled: k,
4888
4903
  isCommentFeatureEnabled: V,
4889
4904
  noHeaderSelection: le,
4890
4905
  treeData: s,
4891
- virtualizationConfig: E,
4906
+ virtualizationConfig: C,
4892
4907
  rowSelectionRef: h,
4893
4908
  disableCurrentPageRecords: B
4894
4909
  }, w) => {
4895
4910
  const I = Pe(null), m = Pe(
4896
4911
  {}
4897
- ), F = Dt().getState().dispatch, x = Ie(
4912
+ ), b = Dt().getState().dispatch, x = Ie(
4898
4913
  (H) => {
4899
- var re, Ce, we, Oe, ve, Re;
4900
- F(H);
4901
- const b = m.current.state || {};
4902
- if (b != null && b.api && ((re = b.api) != null && re.dispatchEvent)) {
4903
- const Qe = Et[H.type];
4914
+ var te, ue, we, Se, ve, Te;
4915
+ b(H);
4916
+ const M = m.current.state || {};
4917
+ if (M != null && M.api && ((te = M.api) != null && te.dispatchEvent)) {
4918
+ const Qe = Ct[H.type];
4904
4919
  if (Qe) {
4905
- let oe = { api: b.api };
4920
+ let oe = { api: M.api };
4906
4921
  const Y = H.payload;
4907
4922
  switch (H.type) {
4908
4923
  case l.SET_COLUMN_WIDTH:
@@ -4928,22 +4943,22 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4928
4943
  case l.SET_COLUMN_FILTER:
4929
4944
  case l.REMOVE_COLUMN_FILTER:
4930
4945
  case l.APPLY_FILTERS:
4931
- Cn(b), oe = { ...oe, filterState: b.columnFilters };
4946
+ un(M), oe = { ...oe, filterState: M.columnFilters };
4932
4947
  break;
4933
4948
  case l.SET_PAGE:
4934
4949
  oe = {
4935
4950
  ...oe,
4936
4951
  paginationState: {
4937
- ...b.pagination,
4952
+ ...M.pagination,
4938
4953
  page: H.payload
4939
4954
  }
4940
4955
  };
4941
4956
  break;
4942
4957
  case l.SET_PAGE_SIZE:
4943
- Cn(b), oe = {
4958
+ un(M), oe = {
4944
4959
  ...oe,
4945
4960
  paginationState: {
4946
- ...b.pagination,
4961
+ ...M.pagination,
4947
4962
  pageSize: H.payload
4948
4963
  }
4949
4964
  };
@@ -4951,8 +4966,8 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4951
4966
  case l.UPDATE_ROW_DATA:
4952
4967
  oe = {
4953
4968
  ...oe,
4954
- data: Y != null && Y.rowId ? (Ce = b.data) == null ? void 0 : Ce.find(
4955
- (Xe) => Xe[b.uniqueIdField] === (Y == null ? void 0 : Y.rowId)
4969
+ data: Y != null && Y.rowId ? (ue = M.data) == null ? void 0 : ue.find(
4970
+ (Xe) => Xe[M.uniqueIdField] === (Y == null ? void 0 : Y.rowId)
4956
4971
  ) : null,
4957
4972
  column: { field: Y == null ? void 0 : Y.field },
4958
4973
  newValue: Y == null ? void 0 : Y.value,
@@ -4994,10 +5009,10 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
4994
5009
  };
4995
5010
  break;
4996
5011
  }
4997
- b.api.dispatchEvent(Qe, oe);
5012
+ M.api.dispatchEvent(Qe, oe);
4998
5013
  }
4999
5014
  }
5000
- !b.tableId || !((Oe = (we = I.current) == null ? void 0 : we.alignedGrids) != null && Oe.length) || (ve = H.meta) != null && ve.fromAlignedGrid || !ut.includes(H.type) || (Re = I.current) != null && Re.propagateChange && I.current.propagateChange(
5015
+ !M.tableId || !((Se = (we = I.current) == null ? void 0 : we.alignedGrids) != null && Se.length) || (ve = H.meta) != null && ve.fromAlignedGrid || !Et.includes(H.type) || (Te = I.current) != null && Te.propagateChange && I.current.propagateChange(
5001
5016
  H.type,
5002
5017
  H.payload,
5003
5018
  H.meta
@@ -5006,28 +5021,28 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5006
5021
  []
5007
5022
  );
5008
5023
  Mt({
5009
- dispatch: F,
5010
- pinnedTopRows: R,
5011
- pinnedBottomRows: P,
5024
+ dispatch: b,
5025
+ pinnedTopRows: T,
5026
+ pinnedBottomRows: D,
5012
5027
  tableInstance: U,
5013
- columnMap: L,
5028
+ columnMap: P,
5014
5029
  uniqueIdField: t,
5015
5030
  childKeyField: r,
5016
5031
  enableRowSpan: g,
5017
- rowSpanColumn: C,
5032
+ rowSpanColumn: u,
5018
5033
  pageSize: d,
5019
5034
  serverSide: o,
5020
5035
  rowDragManaged: p,
5021
5036
  infiniteScroll: a,
5022
- initialExpandedColumnGroups: u,
5037
+ initialExpandedColumnGroups: E,
5023
5038
  tableApi: A,
5024
5039
  smartGridMenuOptions: N,
5025
- purgeClosedRowNodes: Q,
5040
+ purgeClosedRowNodes: y,
5026
5041
  detailRendererTable: _,
5027
5042
  // Save View Props
5028
5043
  isSaveViewEnabled: v,
5029
- isSavingViewLoading: K,
5030
- savedViewsOptions: j,
5044
+ isSavingViewLoading: X,
5045
+ savedViewsOptions: K,
5031
5046
  rowHeight: q,
5032
5047
  tableId: f,
5033
5048
  refObj: m,
@@ -5038,49 +5053,49 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5038
5053
  saveViewOptionsRef: Z,
5039
5054
  isSingleSelect: ae,
5040
5055
  defaultColDef: i,
5041
- disableSelectAllRecords: Ee,
5056
+ disableSelectAllRecords: Ce,
5042
5057
  selectable: se,
5043
5058
  columnBufferSize: fe,
5044
5059
  lazyLoadCellRenderer: he,
5045
5060
  hasSplitRenderer: ie,
5046
5061
  splitRendererKeys: ce,
5047
5062
  removeSelectionOnOperation: Ae,
5048
- removeCheckConfigurationOnOperation: ue,
5049
- clickCallbackRef: te,
5063
+ removeCheckConfigurationOnOperation: Ee,
5064
+ clickCallbackRef: re,
5050
5065
  isChatEnabled: k,
5051
5066
  isCommentFeatureEnabled: V,
5052
5067
  noHeaderSelection: le,
5053
5068
  treeData: s,
5054
- virtualizationConfig: E,
5069
+ virtualizationConfig: C,
5055
5070
  rowSelectionRef: h,
5056
5071
  disableCurrentPageRecords: B
5057
5072
  }), pe(() => {
5058
- F({
5073
+ b({
5059
5074
  type: l.SET_COLUMNS,
5060
5075
  payload: n,
5061
5076
  meta: { defaultColDef: i }
5062
5077
  });
5063
5078
  const H = setTimeout(() => {
5064
- const b = {};
5065
- let re = !1;
5066
- n.forEach((Ce) => {
5067
- Ce.width || (re = !0, b[M(Ce)] = !0);
5068
- }), re && F({
5079
+ const M = {};
5080
+ let te = !1;
5081
+ n.forEach((ue) => {
5082
+ ue.width || (te = !0, M[F(ue)] = !0);
5083
+ }), te && b({
5069
5084
  type: l.AUTOSIZE_COLUMNS_REQUESTED,
5070
- payload: { columnsToAutosize: b }
5085
+ payload: { columnsToAutosize: M }
5071
5086
  });
5072
5087
  }, 100);
5073
5088
  return () => clearTimeout(H);
5074
5089
  }, [n]);
5075
- const D = Ie(
5076
- (H, b) => {
5090
+ const O = Ie(
5091
+ (H, M) => {
5077
5092
  H && x({
5078
5093
  type: l.TOGGLE_GROUP_EXPANSION,
5079
- payload: { rowId: String(H), rowIndex: b }
5094
+ payload: { rowId: String(H), rowIndex: M }
5080
5095
  });
5081
5096
  },
5082
5097
  [x]
5083
- ), { propagateChange: y } = Nt(
5098
+ ), { propagateChange: L } = Nt(
5084
5099
  f,
5085
5100
  c,
5086
5101
  A,
@@ -5088,12 +5103,12 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5088
5103
  );
5089
5104
  pe(() => {
5090
5105
  I.current = {
5091
- propagateChange: y,
5106
+ propagateChange: L,
5092
5107
  alignedGrids: c
5093
5108
  };
5094
- }, [y, c]);
5109
+ }, [L, c]);
5095
5110
  const z = Ie(
5096
- (H, b, re = !1) => {
5111
+ (H, M, te = !1) => {
5097
5112
  if (!We.includes(H)) {
5098
5113
  console.warn(
5099
5114
  `Invalid event type: ${H}. Valid types are: ${We.join(
@@ -5102,18 +5117,18 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5102
5117
  );
5103
5118
  return;
5104
5119
  }
5105
- if (typeof b != "function") {
5120
+ if (typeof M != "function") {
5106
5121
  console.warn("Event listener must be a function");
5107
5122
  return;
5108
5123
  }
5109
5124
  x({
5110
5125
  type: l.ADD_EVENT_LISTENER,
5111
- payload: { eventType: H, listener: b, once: re }
5126
+ payload: { eventType: H, listener: M, once: te }
5112
5127
  });
5113
5128
  },
5114
5129
  [x]
5115
- ), S = Ie(
5116
- (H, b) => {
5130
+ ), Q = Ie(
5131
+ (H, M) => {
5117
5132
  if (!We.includes(H)) {
5118
5133
  console.warn(
5119
5134
  `Invalid event type: ${H}. Valid types are: ${We.join(
@@ -5122,29 +5137,29 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5122
5137
  );
5123
5138
  return;
5124
5139
  }
5125
- if (typeof b != "function") {
5140
+ if (typeof M != "function") {
5126
5141
  console.warn("Event listener must be a function");
5127
5142
  return;
5128
5143
  }
5129
5144
  x({
5130
5145
  type: l.REMOVE_EVENT_LISTENER,
5131
- payload: { eventType: H, listener: b }
5146
+ payload: { eventType: H, listener: M }
5132
5147
  });
5133
5148
  },
5134
5149
  [x]
5135
- ), T = Ie(
5136
- (H, b) => {
5137
- const re = vt(m.current.state, H, b) || [];
5138
- Array.isArray(re) && re.forEach((Ce) => {
5139
- S(H, Ce);
5150
+ ), R = Ie(
5151
+ (H, M) => {
5152
+ const te = vt(m.current.state, H, M) || [];
5153
+ Array.isArray(te) && te.forEach((ue) => {
5154
+ Q(H, ue);
5140
5155
  });
5141
5156
  },
5142
- [S]
5157
+ [Q]
5143
5158
  );
5144
5159
  pe(() => () => {
5145
- F({ type: l.CLEANUP_TABLE_RESOURCES });
5160
+ b({ type: l.CLEANUP_TABLE_RESOURCES });
5146
5161
  }, []);
5147
- const X = Rn(() => {
5162
+ const j = Tn(() => {
5148
5163
  var H;
5149
5164
  return {
5150
5165
  state: {
@@ -5152,34 +5167,34 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5152
5167
  api: {
5153
5168
  ...A,
5154
5169
  addEventListener: z,
5155
- removeEventListener: S,
5156
- dispatchEvent: T
5170
+ removeEventListener: Q,
5171
+ dispatchEvent: R
5157
5172
  }
5158
5173
  },
5159
5174
  tableApi: A,
5160
5175
  dispatch: x,
5161
5176
  ACTION_TYPES: l,
5162
- toggleGroupExpansion: D,
5163
- dispatchEvent: T,
5164
- getRowStyle: O
5177
+ toggleGroupExpansion: O,
5178
+ dispatchEvent: R,
5179
+ getRowStyle: S
5165
5180
  };
5166
5181
  }, [
5167
- D,
5168
- T,
5169
5182
  O,
5170
- z,
5183
+ R,
5171
5184
  S,
5185
+ z,
5186
+ Q,
5172
5187
  x,
5173
5188
  A
5174
5189
  ]);
5175
- return m.current = X, bn(w, () => m.current), /* @__PURE__ */ Le(Nn.Provider, { value: X, children: [
5190
+ return m.current = j, bn(w, () => m.current), /* @__PURE__ */ Le(Nn.Provider, { value: j, children: [
5176
5191
  /* @__PURE__ */ de(
5177
5192
  bt,
5178
5193
  {
5179
5194
  refObj: m,
5180
5195
  addEventListener: z,
5181
- removeEventListener: S,
5182
- dispatchEvent: T
5196
+ removeEventListener: Q,
5197
+ dispatchEvent: R
5183
5198
  }
5184
5199
  ),
5185
5200
  e
@@ -5187,14 +5202,14 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5187
5202
  }
5188
5203
  ), pr = mn((e, n) => {
5189
5204
  const { tableId: t = "default" } = e;
5190
- return /* @__PURE__ */ de(Ot, { tableId: t, children: /* @__PURE__ */ de(Ft, { ...e, ref: n }) });
5205
+ return /* @__PURE__ */ de(St, { tableId: t, children: /* @__PURE__ */ de(Ft, { ...e, ref: n }) });
5191
5206
  }), bt = ({
5192
5207
  refObj: e,
5193
5208
  addEventListener: n,
5194
5209
  removeEventListener: t,
5195
5210
  dispatchEvent: r
5196
5211
  }) => {
5197
- const A = St((i) => i);
5212
+ const A = Ot((i) => i);
5198
5213
  return pe(() => {
5199
5214
  e.current.state = A, e.current.state = {
5200
5215
  ...A,
@@ -5229,25 +5244,25 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5229
5244
  secondaryButtonLabel: f = "Close",
5230
5245
  primaryButtonProps: c = {}
5231
5246
  }) => {
5232
- const u = Ie(() => {
5247
+ const E = Ie(() => {
5233
5248
  n();
5234
5249
  }, [n]), g = Ie(
5235
- (P) => {
5236
- P.stopPropagation(), d ? d(P) : n(P);
5250
+ (D) => {
5251
+ D.stopPropagation(), d ? d(D) : n(D);
5237
5252
  },
5238
5253
  [d, n]
5239
5254
  );
5240
5255
  if (!e) return null;
5241
- const C = `ia-table-prompt-${A}`, L = A === "delete" || A === "error" ? "danger" : "primary", a = o || f, p = o && A !== "success", R = /* @__PURE__ */ de("div", { className: "ia-table-prompt-overlay d-flex align-items-center justify-content-center", children: /* @__PURE__ */ Le(
5256
+ const u = `ia-table-prompt-${A}`, P = A === "delete" || A === "error" ? "danger" : "primary", a = o || f, p = o && A !== "success", T = /* @__PURE__ */ de("div", { className: "ia-table-prompt-overlay d-flex align-items-center justify-content-center", children: /* @__PURE__ */ Le(
5242
5257
  "div",
5243
5258
  {
5244
- className: `ia-table-prompt d-flex flex-column position-relative ${C}`,
5259
+ className: `ia-table-prompt d-flex flex-column position-relative ${u}`,
5245
5260
  children: [
5246
5261
  /* @__PURE__ */ de("div", { className: "ia-table-prompt-header d-flex justify-content-end", children: /* @__PURE__ */ de(
5247
5262
  "div",
5248
5263
  {
5249
5264
  className: "ia-table-prompt-close-icon cursor-pointer",
5250
- onClick: u,
5265
+ onClick: E,
5251
5266
  "aria-label": "Close",
5252
5267
  children: /* @__PURE__ */ de(Wn, { width: "11.67", height: "11.67" })
5253
5268
  }
@@ -5263,7 +5278,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5263
5278
  dn,
5264
5279
  {
5265
5280
  onClick: i,
5266
- variant: L,
5281
+ variant: P,
5267
5282
  ...c,
5268
5283
  children: o
5269
5284
  }
@@ -5272,7 +5287,7 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5272
5287
  ]
5273
5288
  }
5274
5289
  ) });
5275
- return On(R, document.body);
5290
+ return Sn(T, document.body);
5276
5291
  }, wr = Hn(Wt), Br = ({
5277
5292
  isMultiSelect: e,
5278
5293
  cellValue: n,
@@ -5293,13 +5308,13 @@ const Dt = () => An(ln) || xn, je = /* @__PURE__ */ new Map(), Qn = (e = "defaul
5293
5308
  return [];
5294
5309
  } else
5295
5310
  return t.find((r) => r.value === n) || null;
5296
- }, Tr = (e, n) => typeof n == "number" ? n : n === "center" ? e.height / 2 : n === "bottom" ? e.height : 0, Rr = (e, n) => typeof n == "number" ? n : n === "center" ? e.width / 2 : n === "right" ? e.width : 0, mr = (e) => {
5311
+ }, Rr = (e, n) => typeof n == "number" ? n : n === "center" ? e.height / 2 : n === "bottom" ? e.height : 0, Tr = (e, n) => typeof n == "number" ? n : n === "center" ? e.width / 2 : n === "right" ? e.width : 0, mr = (e) => {
5297
5312
  const n = typeof e.horizontal == "number" ? `${e.horizontal}px` : e.horizontal, t = typeof e.vertical == "number" ? `${e.vertical}px` : e.vertical;
5298
5313
  return `${n} ${t}`;
5299
- }, Or = {
5314
+ }, Sr = {
5300
5315
  vertical: "bottom",
5301
5316
  horizontal: "left"
5302
- }, Sr = {
5317
+ }, Or = {
5303
5318
  vertical: "top",
5304
5319
  horizontal: "left"
5305
5320
  };
@@ -5320,29 +5335,29 @@ export {
5320
5335
  ke as H,
5321
5336
  qe as I,
5322
5337
  fr as J,
5323
- Er as K,
5338
+ Cr as K,
5324
5339
  Vt as L,
5325
5340
  Qt as M,
5326
5341
  Pr as N,
5327
5342
  Dr as O,
5328
5343
  wr as P,
5329
- Or as Q,
5330
- Sr as R,
5344
+ Sr as Q,
5345
+ Or as R,
5331
5346
  Jt as S,
5332
5347
  pr as T,
5333
5348
  mr as U,
5334
- Tr as V,
5335
- Rr as W,
5349
+ Rr as V,
5350
+ Tr as W,
5336
5351
  Ir as a,
5337
5352
  be as b,
5338
- Cr as c,
5339
- Ct as d,
5353
+ ur as c,
5354
+ ut as d,
5340
5355
  rr as e,
5341
5356
  Ar as f,
5342
5357
  st as g,
5343
5358
  dr as h,
5344
5359
  Br as i,
5345
- un as j,
5360
+ En as j,
5346
5361
  sr as k,
5347
5362
  or as l,
5348
5363
  ar as m,
@@ -5351,9 +5366,9 @@ export {
5351
5366
  _e as p,
5352
5367
  ct as q,
5353
5368
  hr as r,
5354
- ur as s,
5369
+ Er as s,
5355
5370
  tt as t,
5356
- St as u,
5371
+ Ot as u,
5357
5372
  nr as v,
5358
5373
  qt as w,
5359
5374
  lr as x,