@warkypublic/oranguru 0.0.40 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as ye from "react";
2
- import $, { forwardRef as Be, useMemo as yt, useRef as U, useCallback as oe, useEffect as I, useImperativeHandle as Ge, useState as le, createElement as ce, createContext as zt, useContext as $t } from "react";
2
+ import $, { forwardRef as Be, useMemo as yt, useRef as U, useCallback as oe, useEffect as I, useImperativeHandle as Ge, useState as se, createElement as ce, createContext as zt, useContext as $t } from "react";
3
3
  import { TextInput as Ve, Loader as Nt, ActionIcon as _e, Combobox as te, Checkbox as Lt, useVirtualizedCombobox as Bt, ScrollArea as Gt, rem as We, Group as we, Button as re, Paper as Vt, Text as Ke, Collapse as qt, Code as Ht, Switch as wt, Tooltip as Q, ScrollAreaAutosize as Wt, LoadingOverlay as Kt, Drawer as Ut, Modal as Jt, Popover as Re, VisuallyHidden as Yt, NativeSelect as Xt, PasswordInput as Qt, Textarea as Zt, Portal as en, Menu as K, Stack as bt, Select as tn, useMantineTheme as nn, useMantineColorScheme as rn, lighten as Ue, darken as on } from "@mantine/core";
4
4
  import { flushSync as sn } from "react-dom";
5
5
  import { createSyncStore as Ce } from "@warkypublic/zustandsyncstore";
@@ -8,7 +8,7 @@ import { IconX as qe, IconExclamationCircle as an, IconDeviceFloppy as ln, IconG
8
8
  import { useForm as hn, FormProvider as mn, Controller as he } from "react-hook-form";
9
9
  import { newUUID as gn, getUUID as xt } from "@warkypublic/artemis-kit";
10
10
  import { get as pn, set as Sn } from "idb-keyval";
11
- import { CompactSelection as ne, GridCellKind as ie, DataEditor as vn } from "@glideapps/glide-data-grid";
11
+ import { CompactSelection as ne, GridCellKind as ae, DataEditor as vn } from "@glideapps/glide-data-grid";
12
12
  import { useDebouncedValue as _t, useDebouncedCallback as yn, useElementSize as wn, useMergedRef as bn } from "@mantine/hooks";
13
13
  function xn(r) {
14
14
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
@@ -40,12 +40,12 @@ var de = {};
40
40
  var Qe;
41
41
  function Cn() {
42
42
  return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && (function() {
43
- function r(f) {
44
- if (f == null) return null;
45
- if (typeof f == "function")
46
- return f.$$typeof === F ? null : f.displayName || f.name || null;
47
- if (typeof f == "string") return f;
48
- switch (f) {
43
+ function r(h) {
44
+ if (h == null) return null;
45
+ if (typeof h == "function")
46
+ return h.$$typeof === T ? null : h.displayName || h.name || null;
47
+ if (typeof h == "string") return h;
48
+ switch (h) {
49
49
  case _:
50
50
  return "Fragment";
51
51
  case x:
@@ -59,145 +59,145 @@ function Cn() {
59
59
  case L:
60
60
  return "Activity";
61
61
  }
62
- if (typeof f == "object")
63
- switch (typeof f.tag == "number" && console.error(
62
+ if (typeof h == "object")
63
+ switch (typeof h.tag == "number" && console.error(
64
64
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
65
- ), f.$$typeof) {
65
+ ), h.$$typeof) {
66
66
  case y:
67
67
  return "Portal";
68
68
  case O:
69
- return f.displayName || "Context";
69
+ return h.displayName || "Context";
70
70
  case R:
71
- return (f._context.displayName || "Context") + ".Consumer";
71
+ return (h._context.displayName || "Context") + ".Consumer";
72
72
  case N:
73
- var b = f.render;
74
- return f = f.displayName, f || (f = b.displayName || b.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
73
+ var b = h.render;
74
+ return h = h.displayName, h || (h = b.displayName || b.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
75
75
  case E:
76
- return b = f.displayName || null, b !== null ? b : r(f.type) || "Memo";
76
+ return b = h.displayName || null, b !== null ? b : r(h.type) || "Memo";
77
77
  case D:
78
- b = f._payload, f = f._init;
78
+ b = h._payload, h = h._init;
79
79
  try {
80
- return r(f(b));
80
+ return r(h(b));
81
81
  } catch {
82
82
  }
83
83
  }
84
84
  return null;
85
85
  }
86
- function o(f) {
87
- return "" + f;
86
+ function o(h) {
87
+ return "" + h;
88
88
  }
89
- function e(f) {
89
+ function e(h) {
90
90
  try {
91
- o(f);
91
+ o(h);
92
92
  var b = !1;
93
93
  } catch {
94
94
  b = !0;
95
95
  }
96
96
  if (b) {
97
97
  b = console;
98
- var k = b.error, v = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
98
+ var k = b.error, v = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
99
99
  return k.call(
100
100
  b,
101
101
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
102
102
  v
103
- ), o(f);
103
+ ), o(h);
104
104
  }
105
105
  }
106
- function t(f) {
107
- if (f === _) return "<>";
108
- if (typeof f == "object" && f !== null && f.$$typeof === D)
106
+ function t(h) {
107
+ if (h === _) return "<>";
108
+ if (typeof h == "object" && h !== null && h.$$typeof === D)
109
109
  return "<...>";
110
110
  try {
111
- var b = r(f);
111
+ var b = r(h);
112
112
  return b ? "<" + b + ">" : "<...>";
113
113
  } catch {
114
114
  return "<...>";
115
115
  }
116
116
  }
117
117
  function n() {
118
- var f = M.A;
119
- return f === null ? null : f.getOwner();
118
+ var h = M.A;
119
+ return h === null ? null : h.getOwner();
120
120
  }
121
121
  function s() {
122
122
  return Error("react-stack-top-frame");
123
123
  }
124
- function i(f) {
125
- if (A.call(f, "key")) {
126
- var b = Object.getOwnPropertyDescriptor(f, "key").get;
124
+ function i(h) {
125
+ if (A.call(h, "key")) {
126
+ var b = Object.getOwnPropertyDescriptor(h, "key").get;
127
127
  if (b && b.isReactWarning) return !1;
128
128
  }
129
- return f.key !== void 0;
129
+ return h.key !== void 0;
130
130
  }
131
- function a(f, b) {
131
+ function a(h, b) {
132
132
  function k() {
133
133
  j || (j = !0, console.error(
134
134
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
135
135
  b
136
136
  ));
137
137
  }
138
- k.isReactWarning = !0, Object.defineProperty(f, "key", {
138
+ k.isReactWarning = !0, Object.defineProperty(h, "key", {
139
139
  get: k,
140
140
  configurable: !0
141
141
  });
142
142
  }
143
143
  function l() {
144
- var f = r(this.type);
145
- return J[f] || (J[f] = !0, console.error(
144
+ var h = r(this.type);
145
+ return J[h] || (J[h] = !0, console.error(
146
146
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
147
- )), f = this.props.ref, f !== void 0 ? f : null;
147
+ )), h = this.props.ref, h !== void 0 ? h : null;
148
148
  }
149
- function h(f, b, k, v, z, P) {
150
- var T = k.ref;
151
- return f = {
149
+ function f(h, b, k, v, z, P) {
150
+ var F = k.ref;
151
+ return h = {
152
152
  $$typeof: p,
153
- type: f,
153
+ type: h,
154
154
  key: b,
155
155
  props: k,
156
156
  _owner: v
157
- }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(f, "ref", {
157
+ }, (F !== void 0 ? F : null) !== null ? Object.defineProperty(h, "ref", {
158
158
  enumerable: !1,
159
159
  get: l
160
- }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
160
+ }) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
161
161
  configurable: !1,
162
162
  enumerable: !1,
163
163
  writable: !0,
164
164
  value: 0
165
- }), Object.defineProperty(f, "_debugInfo", {
165
+ }), Object.defineProperty(h, "_debugInfo", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: null
170
- }), Object.defineProperty(f, "_debugStack", {
170
+ }), Object.defineProperty(h, "_debugStack", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: z
175
- }), Object.defineProperty(f, "_debugTask", {
175
+ }), Object.defineProperty(h, "_debugTask", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
179
  value: P
180
- }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
180
+ }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
181
181
  }
182
- function u(f, b, k, v, z, P) {
183
- var T = b.children;
184
- if (T !== void 0)
182
+ function u(h, b, k, v, z, P) {
183
+ var F = b.children;
184
+ if (F !== void 0)
185
185
  if (v)
186
- if (B(T)) {
187
- for (v = 0; v < T.length; v++)
188
- c(T[v]);
189
- Object.freeze && Object.freeze(T);
186
+ if (B(F)) {
187
+ for (v = 0; v < F.length; v++)
188
+ c(F[v]);
189
+ Object.freeze && Object.freeze(F);
190
190
  } else
191
191
  console.error(
192
192
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
193
193
  );
194
- else c(T);
194
+ else c(F);
195
195
  if (A.call(b, "key")) {
196
- T = r(f);
196
+ F = r(h);
197
197
  var ee = Object.keys(b).filter(function(Ee) {
198
198
  return Ee !== "key";
199
199
  });
200
- v = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", q[T + v] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
200
+ v = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", q[F + v] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
201
201
  `A props object containing a "key" prop is being spread into JSX:
202
202
  let props = %s;
203
203
  <%s {...props} />
@@ -205,65 +205,65 @@ React keys must be passed directly to JSX without using spread:
205
205
  let props = %s;
206
206
  <%s key={someKey} {...props} />`,
207
207
  v,
208
- T,
208
+ F,
209
209
  ee,
210
- T
211
- ), q[T + v] = !0);
210
+ F
211
+ ), q[F + v] = !0);
212
212
  }
213
- if (T = null, k !== void 0 && (e(k), T = "" + k), i(b) && (e(b.key), T = "" + b.key), "key" in b) {
213
+ if (F = null, k !== void 0 && (e(k), F = "" + k), i(b) && (e(b.key), F = "" + b.key), "key" in b) {
214
214
  k = {};
215
- for (var se in b)
216
- se !== "key" && (k[se] = b[se]);
215
+ for (var ie in b)
216
+ ie !== "key" && (k[ie] = b[ie]);
217
217
  } else k = b;
218
- return T && a(
218
+ return F && a(
219
219
  k,
220
- typeof f == "function" ? f.displayName || f.name || "Unknown" : f
221
- ), h(
222
- f,
223
- T,
220
+ typeof h == "function" ? h.displayName || h.name || "Unknown" : h
221
+ ), f(
222
+ h,
223
+ F,
224
224
  k,
225
225
  n(),
226
226
  z,
227
227
  P
228
228
  );
229
229
  }
230
- function c(f) {
231
- m(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? m(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
230
+ function c(h) {
231
+ m(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === D && (h._payload.status === "fulfilled" ? m(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
232
232
  }
233
- function m(f) {
234
- return typeof f == "object" && f !== null && f.$$typeof === p;
233
+ function m(h) {
234
+ return typeof h == "object" && h !== null && h.$$typeof === p;
235
235
  }
236
- var g = $, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), C = /* @__PURE__ */ Symbol.for("react.strict_mode"), x = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.consumer"), O = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), S = /* @__PURE__ */ Symbol.for("react.suspense_list"), E = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), L = /* @__PURE__ */ Symbol.for("react.activity"), F = /* @__PURE__ */ Symbol.for("react.client.reference"), M = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, B = Array.isArray, G = console.createTask ? console.createTask : function() {
236
+ var g = $, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), C = /* @__PURE__ */ Symbol.for("react.strict_mode"), x = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.consumer"), O = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), S = /* @__PURE__ */ Symbol.for("react.suspense_list"), E = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), L = /* @__PURE__ */ Symbol.for("react.activity"), T = /* @__PURE__ */ Symbol.for("react.client.reference"), M = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, B = Array.isArray, G = console.createTask ? console.createTask : function() {
237
237
  return null;
238
238
  };
239
239
  g = {
240
- react_stack_bottom_frame: function(f) {
241
- return f();
240
+ react_stack_bottom_frame: function(h) {
241
+ return h();
242
242
  }
243
243
  };
244
244
  var j, J = {}, Y = g.react_stack_bottom_frame.bind(
245
245
  g,
246
246
  s
247
247
  )(), Z = G(t(s)), q = {};
248
- de.Fragment = _, de.jsx = function(f, b, k) {
248
+ de.Fragment = _, de.jsx = function(h, b, k) {
249
249
  var v = 1e4 > M.recentlyCreatedOwnerStacks++;
250
250
  return u(
251
- f,
251
+ h,
252
252
  b,
253
253
  k,
254
254
  !1,
255
255
  v ? Error("react-stack-top-frame") : Y,
256
- v ? G(t(f)) : Z
256
+ v ? G(t(h)) : Z
257
257
  );
258
- }, de.jsxs = function(f, b, k) {
258
+ }, de.jsxs = function(h, b, k) {
259
259
  var v = 1e4 > M.recentlyCreatedOwnerStacks++;
260
260
  return u(
261
- f,
261
+ h,
262
262
  b,
263
263
  k,
264
264
  !0,
265
265
  v ? Error("react-stack-top-frame") : Y,
266
- v ? G(t(f)) : Z
266
+ v ? G(t(h)) : Z
267
267
  );
268
268
  };
269
269
  })()), de;
@@ -273,10 +273,10 @@ function En() {
273
273
  return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? ge.exports = _n() : ge.exports = Cn()), ge.exports;
274
274
  }
275
275
  var d = En();
276
- function ae(r, o, e) {
276
+ function le(r, o, e) {
277
277
  let t = e.initialDeps ?? [], n, s = !0;
278
278
  function i() {
279
- var a, l, h;
279
+ var a, l, f;
280
280
  let u;
281
281
  e.key && ((a = e.debug) != null && a.call(e)) && (u = Date.now());
282
282
  const c = r();
@@ -284,7 +284,7 @@ function ae(r, o, e) {
284
284
  return n;
285
285
  t = c;
286
286
  let g;
287
- if (e.key && ((l = e.debug) != null && l.call(e)) && (g = Date.now()), n = o(...c), e.key && ((h = e.debug) != null && h.call(e))) {
287
+ if (e.key && ((l = e.debug) != null && l.call(e)) && (g = Date.now()), n = o(...c), e.key && ((f = e.debug) != null && f.call(e))) {
288
288
  const p = Math.round((Date.now() - u) * 100) / 100, y = Math.round((Date.now() - g) * 100) / 100, _ = y / 16, C = (x, R) => {
289
289
  for (x = String(x); x.length < R; )
290
290
  x = " " + x;
@@ -344,9 +344,9 @@ const On = (r, o) => Math.abs(r - o) < 1.01, Rn = (r, o, e) => {
344
344
  const a = () => {
345
345
  const l = i[0];
346
346
  if (l?.borderBoxSize) {
347
- const h = l.borderBoxSize[0];
348
- if (h) {
349
- n({ width: h.inlineSize, height: h.blockSize });
347
+ const f = l.borderBoxSize[0];
348
+ if (f) {
349
+ n({ width: f.inlineSize, height: f.blockSize });
350
350
  return;
351
351
  }
352
352
  }
@@ -379,11 +379,11 @@ const On = (r, o) => Math.abs(r - o) < 1.01, Rn = (r, o, e) => {
379
379
  n = c ? e.scrollLeft * (m && -1 || 1) : e.scrollTop, s(), o(n, u);
380
380
  }, a = i(!0), l = i(!1);
381
381
  e.addEventListener("scroll", a, nt);
382
- const h = r.options.useScrollendEvent && rt;
383
- return h && e.addEventListener("scrollend", l, nt), () => {
384
- e.removeEventListener("scroll", a), h && e.removeEventListener("scrollend", l);
382
+ const f = r.options.useScrollendEvent && rt;
383
+ return f && e.addEventListener("scrollend", l, nt), () => {
384
+ e.removeEventListener("scroll", a), f && e.removeEventListener("scrollend", l);
385
385
  };
386
- }, Tn = (r, o, e) => {
386
+ }, Fn = (r, o, e) => {
387
387
  if (o?.borderBoxSize) {
388
388
  const t = o.borderBoxSize[0];
389
389
  if (t)
@@ -392,7 +392,7 @@ const On = (r, o) => Math.abs(r - o) < 1.01, Rn = (r, o, e) => {
392
392
  );
393
393
  }
394
394
  return r[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
395
- }, Fn = (r, {
395
+ }, Tn = (r, {
396
396
  adjustments: o = 0,
397
397
  behavior: e
398
398
  }, t) => {
@@ -445,7 +445,7 @@ class Mn {
445
445
  rangeExtractor: kn,
446
446
  onChange: () => {
447
447
  },
448
- measureElement: Tn,
448
+ measureElement: Fn,
449
449
  initialRect: { width: 0, height: 0 },
450
450
  scrollMargin: 0,
451
451
  gap: 0,
@@ -462,7 +462,7 @@ class Mn {
462
462
  }, this.notify = (e) => {
463
463
  var t, n;
464
464
  (n = (t = this.options).onChange) == null || n.call(t, this, e);
465
- }, this.maybeNotify = ae(
465
+ }, this.maybeNotify = le(
466
466
  () => (this.calculateRange(), [
467
467
  this.isScrolling,
468
468
  this.range ? this.range.startIndex : null,
@@ -520,7 +520,7 @@ class Mn {
520
520
  break;
521
521
  }
522
522
  return s.size === this.options.lanes ? Array.from(s.values()).sort((i, a) => i.end === a.end ? i.index - a.index : i.end - a.end)[0] : void 0;
523
- }, this.getMeasurementOptions = ae(
523
+ }, this.getMeasurementOptions = le(
524
524
  () => [
525
525
  this.options.count,
526
526
  this.options.paddingStart,
@@ -540,7 +540,7 @@ class Mn {
540
540
  {
541
541
  key: !1
542
542
  }
543
- ), this.getMeasurements = ae(
543
+ ), this.getMeasurements = le(
544
544
  () => [this.getMeasurementOptions(), this.itemSizeCache],
545
545
  ({ count: e, paddingStart: t, scrollMargin: n, getItemKey: s, enabled: i, lanes: a }, l) => {
546
546
  if (!i)
@@ -551,16 +551,16 @@ class Mn {
551
551
  this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((m) => {
552
552
  this.itemSizeCache.set(m.key, m.size);
553
553
  }));
554
- const h = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
554
+ const f = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
555
555
  this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1);
556
- const u = this.measurementsCache.slice(0, h), c = new Array(a).fill(
556
+ const u = this.measurementsCache.slice(0, f), c = new Array(a).fill(
557
557
  void 0
558
558
  );
559
- for (let m = 0; m < h; m++) {
559
+ for (let m = 0; m < f; m++) {
560
560
  const g = u[m];
561
561
  g && (c[g.lane] = m);
562
562
  }
563
- for (let m = h; m < e; m++) {
563
+ for (let m = f; m < e; m++) {
564
564
  const g = s(m), p = this.laneAssignments.get(m);
565
565
  let y, _;
566
566
  if (p !== void 0 && this.options.lanes > 1) {
@@ -587,7 +587,7 @@ class Mn {
587
587
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
588
588
  debug: () => this.options.debug
589
589
  }
590
- ), this.calculateRange = ae(
590
+ ), this.calculateRange = le(
591
591
  () => [
592
592
  this.getMeasurements(),
593
593
  this.getSize(),
@@ -604,7 +604,7 @@ class Mn {
604
604
  key: process.env.NODE_ENV !== "production" && "calculateRange",
605
605
  debug: () => this.options.debug
606
606
  }
607
- ), this.getVirtualIndexes = ae(
607
+ ), this.getVirtualIndexes = le(
608
608
  () => {
609
609
  let e = null, t = null;
610
610
  const n = this.calculateRange();
@@ -654,7 +654,7 @@ class Mn {
654
654
  return;
655
655
  }
656
656
  this._measureElement(e, void 0);
657
- }, this.getVirtualItems = ae(
657
+ }, this.getVirtualItems = le(
658
658
  () => [this.getVirtualIndexes(), this.getMeasurements()],
659
659
  (e, t) => {
660
660
  const n = [];
@@ -725,9 +725,9 @@ class Mn {
725
725
  "The `smooth` scroll behavior is not fully supported with dynamic size."
726
726
  ), e = Math.max(0, Math.min(e, this.options.count - 1)), this.currentScrollToIndex = e;
727
727
  let s = 0;
728
- const i = 10, a = (h) => {
728
+ const i = 10, a = (f) => {
729
729
  if (!this.targetWindow) return;
730
- const u = this.getOffsetForIndex(e, h);
730
+ const u = this.getOffsetForIndex(e, f);
731
731
  if (!u) {
732
732
  console.warn("Failed to get offset for index:", e);
733
733
  return;
@@ -745,8 +745,8 @@ class Mn {
745
745
  };
746
746
  this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(g) : g();
747
747
  });
748
- }, l = (h) => {
749
- this.targetWindow && this.currentScrollToIndex === e && (s++, s < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", s, i), this.targetWindow.requestAnimationFrame(() => a(h))) : console.warn(
748
+ }, l = (f) => {
749
+ this.targetWindow && this.currentScrollToIndex === e && (s++, s < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", s, i), this.targetWindow.requestAnimationFrame(() => a(f))) : console.warn(
750
750
  `Failed to scroll to index ${e} after ${i} attempts.`
751
751
  ));
752
752
  };
@@ -828,10 +828,10 @@ function Pn({
828
828
  const u = r[a];
829
829
  l[u.lane] = u.end, a++;
830
830
  }
831
- const h = Array(t).fill(e + o);
832
- for (; i >= 0 && h.some((u) => u >= e); ) {
831
+ const f = Array(t).fill(e + o);
832
+ for (; i >= 0 && f.some((u) => u >= e); ) {
833
833
  const u = r[i];
834
- h[u.lane] = u.start, i--;
834
+ f[u.lane] = u.start, i--;
835
835
  }
836
836
  i = Math.max(0, i - i % t), a = Math.min(n, a + (t - 1 - a % t));
837
837
  }
@@ -857,7 +857,7 @@ function zn(r) {
857
857
  return Dn({
858
858
  observeElementRect: jn,
859
859
  observeElementOffset: An,
860
- scrollToFn: Fn,
860
+ scrollToFn: Tn,
861
861
  ...r
862
862
  });
863
863
  }
@@ -967,7 +967,7 @@ const { Provider: $n, useStore: Nn } = Ce(
967
967
  isFetching: i,
968
968
  label: a,
969
969
  leftSection: l,
970
- onBlur: h,
970
+ onBlur: f,
971
971
  onClear: u,
972
972
  onSearch: c,
973
973
  placeholder: m,
@@ -990,7 +990,7 @@ const { Provider: $n, useStore: Nn } = Ce(
990
990
  error: s,
991
991
  label: a,
992
992
  leftSection: l,
993
- onBlur: h,
993
+ onBlur: f,
994
994
  onChange: c,
995
995
  onClick: () => t.openDropdown(),
996
996
  onFocus: () => t.openDropdown(),
@@ -1028,7 +1028,7 @@ const Ln = (r) => {
1028
1028
  boxerData: i,
1029
1029
  clearable: a,
1030
1030
  comboBoxProps: l,
1031
- dropDownProps: h,
1031
+ dropDownProps: f,
1032
1032
  error: u,
1033
1033
  fetchData: c,
1034
1034
  fetchMoreOnBottomReached: m,
@@ -1046,7 +1046,7 @@ const Ln = (r) => {
1046
1046
  search: E,
1047
1047
  selectedOptionIndex: D,
1048
1048
  selectFirst: L,
1049
- setInput: F,
1049
+ setInput: T,
1050
1050
  setOpened: M,
1051
1051
  setSearch: A,
1052
1052
  setSelectedOptionIndex: B,
@@ -1089,23 +1089,23 @@ const Ln = (r) => {
1089
1089
  const z = typeof v == "string" ? parseInt(v, 10) : v, P = i[z];
1090
1090
  if (P)
1091
1091
  if (C) {
1092
- const T = Array.isArray(j) ? j : [], se = T.includes(P.value) ? T.filter((Oe) => Oe !== P.value) : [...T, P.value];
1093
- R?.(se);
1094
- const Ee = i.filter((Oe) => se.includes(Oe.value));
1092
+ const F = Array.isArray(j) ? j : [], ie = F.includes(P.value) ? F.filter((Oe) => Oe !== P.value) : [...F, P.value];
1093
+ R?.(ie);
1094
+ const Ee = i.filter((Oe) => ie.includes(Oe.value));
1095
1095
  x?.(Ee);
1096
1096
  } else
1097
- R?.(P.value), A(""), F(P.label), n.current = P.value, M(!1);
1097
+ R?.(P.value), A(""), T(P.label), n.current = P.value, M(!1);
1098
1098
  },
1099
- [i, C, j, R, x, A, F, M]
1100
- ), f = oe(() => {
1101
- G && L ? q(0) : (R?.(C ? [] : null), A(""), F(""), t.current?.focus()), N && M(!0);
1102
- }, [G, L, C, R, A, F, N, M, q]), b = Bt({
1099
+ [i, C, j, R, x, A, T, M]
1100
+ ), h = oe(() => {
1101
+ G && L ? q(0) : (R?.(C ? [] : null), A(""), T(""), t.current?.focus()), N && M(!0);
1102
+ }, [G, L, C, R, A, T, N, M, q]), b = Bt({
1103
1103
  getOptionId: (v) => String(v),
1104
1104
  onDropdownClose: () => {
1105
1105
  M(!1);
1106
1106
  },
1107
1107
  onDropdownOpen: () => {
1108
- (!j || C && (!Array.isArray(j) || j.length === 0)) && (A(""), F("")), b.selectFirstOption();
1108
+ (!j || C && (!Array.isArray(j) || j.length === 0)) && (A(""), T("")), b.selectFirstOption();
1109
1109
  },
1110
1110
  onSelectedOptionSubmit: q,
1111
1111
  opened: O,
@@ -1130,10 +1130,10 @@ const Ln = (r) => {
1130
1130
  }, [E, O]), I(() => {
1131
1131
  if (C) {
1132
1132
  const v = i.filter((z) => Array.isArray(j) && j.includes(z.value)).map((z) => z.label).join(", ");
1133
- !O && g !== v && (F(v), A(""));
1133
+ !O && g !== v && (T(v), A(""));
1134
1134
  } else {
1135
1135
  const v = i.find((z) => z.value === j)?.label;
1136
- g !== v && (E ?? "") === "" && n.current !== j && j ? F(v ?? "") : !j && !n.current && (E ?? "") === "" && (A(""), F(""));
1136
+ g !== v && (E ?? "") === "" && n.current !== j && j ? T(v ?? "") : !j && !n.current && (E ?? "") === "" && (A(""), T(""));
1137
1137
  }
1138
1138
  if (C) {
1139
1139
  const v = i.filter((z) => Array.isArray(j) && j.includes(z.value)) ?? [];
@@ -1142,11 +1142,11 @@ const Ln = (r) => {
1142
1142
  const v = i?.find((z) => z.value === j) ?? null;
1143
1143
  s.current?.value !== v?.value && (x?.(v), s.current = v);
1144
1144
  }
1145
- }, [j, i, g, E, C, O, x, F, A]), I(() => {
1145
+ }, [j, i, g, E, C, O, x, T, A]), I(() => {
1146
1146
  L && (i?.length ?? 0) > 0 && !C && (j || q?.(0));
1147
1147
  }, [L, i, C]), Ge(o, () => ({
1148
1148
  clear: () => {
1149
- f();
1149
+ h();
1150
1150
  },
1151
1151
  close: () => {
1152
1152
  M(!1), b.closeDropdown();
@@ -1178,11 +1178,11 @@ const Ln = (r) => {
1178
1178
  isFetching: p,
1179
1179
  label: y,
1180
1180
  onBlur: () => {
1181
- !j && !C && (A(""), F(""), b.closeDropdown(), M(!1));
1181
+ !j && !C && (A(""), T(""), b.closeDropdown(), M(!1));
1182
1182
  },
1183
- onClear: f,
1183
+ onClear: h,
1184
1184
  onSearch: (v) => {
1185
- A(v.currentTarget.value), F(v.currentTarget.value), M(!0);
1185
+ A(v.currentTarget.value), T(v.currentTarget.value), M(!0);
1186
1186
  },
1187
1187
  placeholder: w,
1188
1188
  ref: t,
@@ -1196,7 +1196,7 @@ const Ln = (r) => {
1196
1196
  t.current && (t.current.value = "", t.current?.focus());
1197
1197
  },
1198
1198
  p: 2,
1199
- ...h,
1199
+ ...f,
1200
1200
  children: O && k.length > 0 ? /* @__PURE__ */ d.jsx(te.Options, { children: /* @__PURE__ */ d.jsx(
1201
1201
  Gt.Autosize,
1202
1202
  {
@@ -1640,8 +1640,8 @@ const { Provider: qn, useStore: me } = Ce(
1640
1640
  s = l;
1641
1641
  },
1642
1642
  (l) => {
1643
- const h = l.root?.message || "Validation errors";
1644
- r({ error: h, loading: !1 }), o().onError?.(h, o()), i = !0;
1643
+ const f = l.root?.message || "Validation errors";
1644
+ r({ error: f, loading: !1 }), o().onError?.(f, o()), i = !0;
1645
1645
  }
1646
1646
  )(e), i) {
1647
1647
  r({ loading: !1 });
@@ -1652,11 +1652,11 @@ const { Provider: qn, useStore: me } = Ce(
1652
1652
  return;
1653
1653
  }
1654
1654
  if (o().onAPICall) {
1655
- const l = o()?.uniqueKeyField || "id", h = o().values?.[l] ?? o().primeData?.[l], u = await o().onAPICall(
1655
+ const l = o()?.uniqueKeyField || "id", f = o().values?.[l] ?? o().primeData?.[l], u = await o().onAPICall(
1656
1656
  "mutate",
1657
1657
  o().request || "insert",
1658
1658
  s,
1659
- h
1659
+ f
1660
1660
  ), c = { ...s, ...u };
1661
1661
  if (o().afterSave && await o().afterSave(c, o()), t) {
1662
1662
  const m = o()?.uniqueKeyField || "id", g = { ...c };
@@ -1665,8 +1665,8 @@ const { Provider: qn, useStore: me } = Ce(
1665
1665
  return r({ loading: !1, values: c }), o().onChange?.(c, o()), n.reset(c), o().onClose?.(c), c;
1666
1666
  }
1667
1667
  if (t) {
1668
- const l = o()?.uniqueKeyField || "id", h = { ...s };
1669
- return delete h[l], r({ loading: !1, values: h }), n.reset(h), o().onChange?.(h, o()), s;
1668
+ const l = o()?.uniqueKeyField || "id", f = { ...s };
1669
+ return delete f[l], r({ loading: !1, values: f }), n.reset(f), o().onChange?.(f, o()), s;
1670
1670
  }
1671
1671
  return r({ loading: !1, values: s }), n.reset(s), o().onChange?.(s, o()), o().onClose?.(s), s;
1672
1672
  }
@@ -1703,8 +1703,8 @@ const { Provider: qn, useStore: me } = Ce(
1703
1703
  return e || (a = async () => confirm("Are you sure you want to delete this item?")), {
1704
1704
  id: r || gn(),
1705
1705
  onClose: (l) => {
1706
- const h = s.getState().dirty, u = s.getState().setState;
1707
- h ? confirm("You have unsaved changes. Are you sure you want to close?") && (o ? o(l) : u("opened", !1)) : o ? o(l) : u("opened", !1);
1706
+ const f = s.getState().dirty, u = s.getState().setState;
1707
+ f ? confirm("You have unsaved changes. Are you sure you want to close?") && (o ? o(l) : u("opened", !1)) : o ? o(l) : u("opened", !1);
1708
1708
  },
1709
1709
  onConfirmDelete: a,
1710
1710
  primeData: t,
@@ -1723,7 +1723,7 @@ const { Provider: qn, useStore: me } = Ce(
1723
1723
  onClose: i,
1724
1724
  request: a,
1725
1725
  save: l,
1726
- saveButtonProps: h,
1726
+ saveButtonProps: f,
1727
1727
  saveButtonTitle: u,
1728
1728
  setState: c,
1729
1729
  showKeepOpenSwitch: m
@@ -1791,7 +1791,7 @@ const { Provider: qn, useStore: me } = Ce(
1791
1791
  miw: "8rem",
1792
1792
  px: "md",
1793
1793
  size: "sm",
1794
- ...h,
1794
+ ...f,
1795
1795
  disabled: g,
1796
1796
  onClick: () => l(),
1797
1797
  children: u || "Save"
@@ -1850,7 +1850,7 @@ const { Provider: qn, useStore: me } = Ce(
1850
1850
  loadingOverlayProps: i,
1851
1851
  opened: a,
1852
1852
  request: l,
1853
- reset: h,
1853
+ reset: f,
1854
1854
  save: u,
1855
1855
  scrollAreaProps: c
1856
1856
  } = me((m) => ({
@@ -1891,7 +1891,7 @@ const { Provider: qn, useStore: me } = Ce(
1891
1891
  "form",
1892
1892
  {
1893
1893
  id: `former_f${t}`,
1894
- onReset: (m) => h(m),
1894
+ onReset: (m) => f(m),
1895
1895
  onSubmit: (m) => u(m),
1896
1896
  "x-data-request": l,
1897
1897
  children: r.children
@@ -1923,7 +1923,7 @@ const { Provider: qn, useStore: me } = Ce(
1923
1923
  onClose: i,
1924
1924
  onOpen: a,
1925
1925
  opened: l,
1926
- primeData: h,
1926
+ primeData: f,
1927
1927
  reset: u,
1928
1928
  save: c,
1929
1929
  setState: m,
@@ -1947,7 +1947,7 @@ const { Provider: qn, useStore: me } = Ce(
1947
1947
  values: x.values,
1948
1948
  wrapper: x.wrapper
1949
1949
  })), C = hn({
1950
- defaultValues: h,
1950
+ defaultValues: f,
1951
1951
  mode: "all",
1952
1952
  shouldUseNativeValidation: !0,
1953
1953
  values: y,
@@ -2016,10 +2016,12 @@ function io(r) {
2016
2016
  ...r.fetchOptions?.headers
2017
2017
  },
2018
2018
  method: "POST"
2019
- }, h = await fetch(i, l);
2020
- if (!h.ok)
2021
- throw new Error(`API request failed with status ${h.status}`);
2022
- return await h.json();
2019
+ }, f = await fetch(i, l);
2020
+ if (!f.ok) {
2021
+ const c = await f.text();
2022
+ throw c && c.length > 4 ? new Error(`${c}`) : new Error(`API request failed with status ${f.status}`);
2023
+ }
2024
+ return await f.json();
2023
2025
  };
2024
2026
  }
2025
2027
  function ao(r) {
@@ -2040,8 +2042,10 @@ function ao(r) {
2040
2042
  };
2041
2043
  e !== "insert" && (i = `${s}/${n}`);
2042
2044
  const l = await fetch(i, a);
2043
- if (!l.ok)
2044
- throw new Error(`API request failed with status ${l.status}`);
2045
+ if (!l.ok) {
2046
+ const u = await l.text();
2047
+ throw u && u.length > 4 ? new Error(`${u}`) : new Error(`API request failed with status ${l.status}`);
2048
+ }
2045
2049
  return await l.json();
2046
2050
  };
2047
2051
  }
@@ -2053,7 +2057,7 @@ const lo = (r) => {
2053
2057
  ...e,
2054
2058
  onClose: t,
2055
2059
  opened: n,
2056
- wrapper: (i, a, l, h, u) => {
2060
+ wrapper: (i, a, l, f, u) => {
2057
2061
  const c = u("values"), m = u("request"), g = u("uniqueKeyField") ?? "id";
2058
2062
  return /* @__PURE__ */ d.jsx(
2059
2063
  Ut,
@@ -2079,7 +2083,7 @@ const lo = (r) => {
2079
2083
  ...e,
2080
2084
  onClose: t,
2081
2085
  opened: n,
2082
- wrapper: (i, a, l, h, u) => {
2086
+ wrapper: (i, a, l, f, u) => {
2083
2087
  const c = u("values"), m = u("request"), g = u("uniqueKeyField") ?? "id";
2084
2088
  return /* @__PURE__ */ d.jsx(
2085
2089
  Jt,
@@ -2105,7 +2109,7 @@ const lo = (r) => {
2105
2109
  ...e,
2106
2110
  onClose: t,
2107
2111
  opened: n,
2108
- wrapper: (a, l, h) => /* @__PURE__ */ d.jsxs(
2112
+ wrapper: (a, l, f) => /* @__PURE__ */ d.jsxs(
2109
2113
  Re,
2110
2114
  {
2111
2115
  closeOnClickOutside: !1,
@@ -2114,7 +2118,7 @@ const lo = (r) => {
2114
2118
  width: 250,
2115
2119
  withArrow: !0,
2116
2120
  ...i,
2117
- onClose: () => h?.(),
2121
+ onClose: () => f?.(),
2118
2122
  opened: l ?? !1,
2119
2123
  children: [
2120
2124
  /* @__PURE__ */ d.jsx(Re.Target, { children: s }),
@@ -2126,7 +2130,26 @@ const lo = (r) => {
2126
2130
  }
2127
2131
  );
2128
2132
  }, fo = (r) => {
2129
- const [o, e] = le(!1);
2133
+ const [o, e] = se({
2134
+ onChange: r?.onChange,
2135
+ onClose: r?.onClose ?? (() => e((l) => ({ ...l, opened: !1 }))),
2136
+ opened: r?.opened ?? !1,
2137
+ primeData: r?.primeData ?? r?.values,
2138
+ request: r?.request ?? "insert",
2139
+ values: r?.values
2140
+ }), t = (l) => {
2141
+ e((f) => ({ ...f, ...l }));
2142
+ }, { onChange: n, onClose: s, opened: i, ...a } = o;
2143
+ return {
2144
+ former: { ...a, onChange: n },
2145
+ formerWrapper: { onClose: s, opened: i },
2146
+ open: (l, f) => {
2147
+ e((u) => ({ ...u, opened: !0, primeData: f, request: l, values: f }));
2148
+ },
2149
+ updateState: t
2150
+ };
2151
+ }, ho = (r) => {
2152
+ const [o, e] = se(!1);
2130
2153
  return /* @__PURE__ */ d.jsx(Q, { label: r.tooltip ?? "", withArrow: !0, children: /* @__PURE__ */ d.jsx(
2131
2154
  re,
2132
2155
  {
@@ -2141,8 +2164,8 @@ const lo = (r) => {
2141
2164
  children: r.children
2142
2165
  }
2143
2166
  ) });
2144
- }, ho = (r) => {
2145
- const [o, e] = le(!1);
2167
+ }, mo = (r) => {
2168
+ const [o, e] = se(!1);
2146
2169
  return /* @__PURE__ */ d.jsx(Q, { label: r.tooltip ?? "", withArrow: !0, children: /* @__PURE__ */ d.jsxs(
2147
2170
  _e,
2148
2171
  {
@@ -2163,7 +2186,7 @@ const lo = (r) => {
2163
2186
  ]
2164
2187
  }
2165
2188
  ) });
2166
- }, mo = (r) => {
2189
+ }, go = (r) => {
2167
2190
  const { control: o, name: e, sid: t, tooltip: n, ...s } = r;
2168
2191
  return /* @__PURE__ */ d.jsx(
2169
2192
  he,
@@ -2183,7 +2206,7 @@ const lo = (r) => {
2183
2206
  ) })
2184
2207
  }
2185
2208
  );
2186
- }, go = (r) => {
2209
+ }, po = (r) => {
2187
2210
  const { control: o, name: e, sid: t, tooltip: n, ...s } = r;
2188
2211
  return /* @__PURE__ */ d.jsx(
2189
2212
  he,
@@ -2203,7 +2226,7 @@ const lo = (r) => {
2203
2226
  ) })
2204
2227
  }
2205
2228
  );
2206
- }, po = (r) => {
2229
+ }, So = (r) => {
2207
2230
  const { control: o, name: e, sid: t, tooltip: n, ...s } = r;
2208
2231
  return /* @__PURE__ */ d.jsx(
2209
2232
  he,
@@ -2226,7 +2249,7 @@ const lo = (r) => {
2226
2249
  ) })
2227
2250
  }
2228
2251
  );
2229
- }, So = (r) => {
2252
+ }, vo = (r) => {
2230
2253
  const { control: o, name: e, sid: t, tooltip: n, ...s } = r;
2231
2254
  return /* @__PURE__ */ d.jsx(
2232
2255
  he,
@@ -2247,7 +2270,7 @@ const lo = (r) => {
2247
2270
  ) })
2248
2271
  }
2249
2272
  );
2250
- }, vo = (r) => {
2273
+ }, yo = (r) => {
2251
2274
  const { control: o, name: e, sid: t, tooltip: n, ...s } = r;
2252
2275
  return /* @__PURE__ */ d.jsx(
2253
2276
  he,
@@ -2330,13 +2353,13 @@ function Yn() {
2330
2353
  return !0;
2331
2354
  }
2332
2355
  }
2333
- function h(c, m) {
2356
+ function f(c, m) {
2334
2357
  return m();
2335
2358
  }
2336
- var u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : a;
2359
+ var u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : a;
2337
2360
  return Ae.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : u, Ae;
2338
2361
  }
2339
- var Te = {};
2362
+ var Fe = {};
2340
2363
  var ut;
2341
2364
  function Xn() {
2342
2365
  return ut || (ut = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -2370,7 +2393,7 @@ function Xn() {
2370
2393
  });
2371
2394
  },
2372
2395
  [g]
2373
- ), h(y), y;
2396
+ ), f(y), y;
2374
2397
  }
2375
2398
  function e(g) {
2376
2399
  var p = g.getSnapshot;
@@ -2386,9 +2409,9 @@ function Xn() {
2386
2409
  return p();
2387
2410
  }
2388
2411
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2389
- var n = $, s = typeof Object.is == "function" ? Object.is : r, i = n.useState, a = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, u = !1, c = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : o;
2390
- Te.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2391
- })()), Te;
2412
+ var n = $, s = typeof Object.is == "function" ? Object.is : r, i = n.useState, a = n.useEffect, l = n.useLayoutEffect, f = n.useDebugValue, u = !1, c = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : o;
2413
+ Fe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2414
+ })()), Fe;
2392
2415
  }
2393
2416
  var dt;
2394
2417
  function Rt() {
@@ -2399,11 +2422,11 @@ function Qn() {
2399
2422
  if (ft) return je;
2400
2423
  ft = 1;
2401
2424
  var r = $, o = Rt();
2402
- function e(h, u) {
2403
- return h === u && (h !== 0 || 1 / h === 1 / u) || h !== h && u !== u;
2425
+ function e(f, u) {
2426
+ return f === u && (f !== 0 || 1 / f === 1 / u) || f !== f && u !== u;
2404
2427
  }
2405
2428
  var t = typeof Object.is == "function" ? Object.is : e, n = o.useSyncExternalStore, s = r.useRef, i = r.useEffect, a = r.useMemo, l = r.useDebugValue;
2406
- return je.useSyncExternalStoreWithSelector = function(h, u, c, m, g) {
2429
+ return je.useSyncExternalStoreWithSelector = function(f, u, c, m, g) {
2407
2430
  var p = s(null);
2408
2431
  if (p.current === null) {
2409
2432
  var y = { hasValue: !1, value: null };
@@ -2436,7 +2459,7 @@ function Qn() {
2436
2459
  },
2437
2460
  [u, c, m, g]
2438
2461
  );
2439
- var _ = n(h, p[0], p[1]);
2462
+ var _ = n(f, p[0], p[1]);
2440
2463
  return i(
2441
2464
  function() {
2442
2465
  y.hasValue = !0, y.value = _;
@@ -2445,16 +2468,16 @@ function Qn() {
2445
2468
  ), l(_), _;
2446
2469
  }, je;
2447
2470
  }
2448
- var Fe = {};
2471
+ var Te = {};
2449
2472
  var ht;
2450
2473
  function Zn() {
2451
2474
  return ht || (ht = 1, process.env.NODE_ENV !== "production" && (function() {
2452
- function r(h, u) {
2453
- return h === u && (h !== 0 || 1 / h === 1 / u) || h !== h && u !== u;
2475
+ function r(f, u) {
2476
+ return f === u && (f !== 0 || 1 / f === 1 / u) || f !== f && u !== u;
2454
2477
  }
2455
2478
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2456
2479
  var o = $, e = Rt(), t = typeof Object.is == "function" ? Object.is : r, n = e.useSyncExternalStore, s = o.useRef, i = o.useEffect, a = o.useMemo, l = o.useDebugValue;
2457
- Fe.useSyncExternalStoreWithSelector = function(h, u, c, m, g) {
2480
+ Te.useSyncExternalStoreWithSelector = function(f, u, c, m, g) {
2458
2481
  var p = s(null);
2459
2482
  if (p.current === null) {
2460
2483
  var y = { hasValue: !1, value: null };
@@ -2488,7 +2511,7 @@ function Zn() {
2488
2511
  },
2489
2512
  [u, c, m, g]
2490
2513
  );
2491
- var _ = n(h, p[0], p[1]);
2514
+ var _ = n(f, p[0], p[1]);
2492
2515
  return i(
2493
2516
  function() {
2494
2517
  y.hasValue = !0, y.value = _;
@@ -2496,7 +2519,7 @@ function Zn() {
2496
2519
  [_]
2497
2520
  ), l(_), _;
2498
2521
  }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2499
- })()), Fe;
2522
+ })()), Te;
2500
2523
  }
2501
2524
  var mt;
2502
2525
  function er() {
@@ -2505,13 +2528,13 @@ function er() {
2505
2528
  var tr = er();
2506
2529
  const nr = /* @__PURE__ */ xn(tr), gt = (r) => {
2507
2530
  let o;
2508
- const e = /* @__PURE__ */ new Set(), t = (h, u) => {
2509
- const c = typeof h == "function" ? h(o) : h;
2531
+ const e = /* @__PURE__ */ new Set(), t = (f, u) => {
2532
+ const c = typeof f == "function" ? f(o) : f;
2510
2533
  if (!Object.is(c, o)) {
2511
2534
  const m = o;
2512
2535
  o = u ?? (typeof c != "object" || c === null) ? c : Object.assign({}, o, c), e.forEach((g) => g(o, m));
2513
2536
  }
2514
- }, n = () => o, a = { setState: t, getState: n, getInitialState: () => l, subscribe: (h) => (e.add(h), () => e.delete(h)) }, l = o = r(t, n, a);
2537
+ }, n = () => o, a = { setState: t, getState: n, getInitialState: () => l, subscribe: (f) => (e.add(f), () => e.delete(f)) }, l = o = r(t, n, a);
2515
2538
  return a;
2516
2539
  }, rr = ((r) => r ? gt(r) : gt), { useSyncExternalStoreWithSelector: or } = nr, sr = (r) => r;
2517
2540
  function ir(r, o = sr, e) {
@@ -2875,12 +2898,12 @@ V.subscribe((r) => {
2875
2898
  console.error("Error saving storage:", o);
2876
2899
  });
2877
2900
  });
2878
- const vr = ((r) => (o) => ir(r, o, Jn)), yo = vr(V), wo = (r) => {
2901
+ const vr = ((r) => (o) => ir(r, o, Jn)), wo = vr(V), bo = (r) => {
2879
2902
  V.getState().setApiURL(r);
2880
- }, bo = () => V.getState().session.apiURL ?? "", xo = () => V.getState().session.authToken ?? "", _o = () => V.getState().isLoggedIn(), Co = (r) => {
2903
+ }, xo = () => V.getState().session.apiURL ?? "", _o = () => V.getState().session.authToken ?? "", Co = () => V.getState().isLoggedIn(), Eo = (r) => {
2881
2904
  V.getState().setAuthToken(r);
2882
2905
  }, yr = () => V.getState(), jt = zt(null);
2883
- function Eo({
2906
+ function Oo({
2884
2907
  apiURL: r,
2885
2908
  autoFetch: o = !0,
2886
2909
  children: e,
@@ -2891,12 +2914,12 @@ function Eo({
2891
2914
  program: a,
2892
2915
  throttleMs: l = 0
2893
2916
  }) {
2894
- const h = U(0), u = U(!1), c = U(!1), m = oe(
2917
+ const f = U(0), u = U(!1), c = U(!1), m = oe(
2895
2918
  async (y) => {
2896
- const _ = Date.now(), C = _ - h.current;
2919
+ const _ = Date.now(), C = _ - f.current;
2897
2920
  if (!u.current && !(l > 0 && C < l))
2898
2921
  try {
2899
- u.current = !0, h.current = _, await V.getState().fetchData(y);
2922
+ u.current = !0, f.current = _, await V.getState().fetchData(y);
2900
2923
  } finally {
2901
2924
  u.current = !1;
2902
2925
  }
@@ -2927,7 +2950,7 @@ function Eo({
2927
2950
  }), [m, g]);
2928
2951
  return /* @__PURE__ */ d.jsx(jt.Provider, { value: p, children: e });
2929
2952
  }
2930
- function Oo() {
2953
+ function Ro() {
2931
2954
  const r = $t(jt);
2932
2955
  if (!r)
2933
2956
  throw new Error("useGlobalStateStoreContext must be used within GlobalStateStoreProvider");
@@ -3061,7 +3084,7 @@ function Er() {
3061
3084
  ) }),
3062
3085
  /* @__PURE__ */ d.jsx(K.Dropdown, { children: n.renderer ? n.renderer : $.Children.toArray(
3063
3086
  n.items?.map((i, a) => /* @__PURE__ */ d.jsx(
3064
- Tt,
3087
+ Ft,
3065
3088
  {
3066
3089
  ...i
3067
3090
  },
@@ -3071,8 +3094,8 @@ function Er() {
3071
3094
  ))
3072
3095
  ) }, `bmm_portal_${o}`);
3073
3096
  }
3074
- const Tt = ({ children: r, label: o, ...e }) => {
3075
- const [t, n] = le(!1);
3097
+ const Ft = ({ children: r, label: o, ...e }) => {
3098
+ const [t, n] = se(!1);
3076
3099
  return typeof e.renderer == "function" ? e.renderer({ ...e, loading: t, renderer: void 0, setLoading: n }) : typeof e.renderer == "object" ? e.renderer : e.isDivider ? /* @__PURE__ */ d.jsx(K.Divider, {}) : e.items && e.items.length > 0 ? /* @__PURE__ */ d.jsxs(K.Sub, { children: [
3077
3100
  /* @__PURE__ */ d.jsx(K.Sub.Target, { children: /* @__PURE__ */ d.jsx(
3078
3101
  K.Sub.Item,
@@ -3094,7 +3117,7 @@ const Tt = ({ children: r, label: o, ...e }) => {
3094
3117
  ) }),
3095
3118
  /* @__PURE__ */ d.jsx(K.Sub.Dropdown, { children: $.Children.toArray(
3096
3119
  e.items.map((s, i) => /* @__PURE__ */ d.jsx(
3097
- Tt,
3120
+ Ft,
3098
3121
  {
3099
3122
  ...s
3100
3123
  },
@@ -3138,10 +3161,10 @@ const Rr = [
3138
3161
  { label: "Less Than", value: "lt" },
3139
3162
  { label: "Less Than or Equal", value: "lte" }
3140
3163
  ], Ir = (r) => {
3141
- const o = r.storeState?.colFilters?.findIndex((i) => i.id === r.column.id) ?? -1, e = r.storeState?.colFilters?.[o] ?? { id: r.column.id, value: "" }, [t, n] = le(e?.value ?? ""), [s] = _t(t, 900);
3164
+ const o = r.storeState?.colFilters?.findIndex((i) => i.id === r.column.id) ?? -1, e = r.storeState?.colFilters?.[o] ?? { id: r.column.id, value: "" }, [t, n] = se(e?.value ?? ""), [s] = _t(t, 900);
3142
3165
  return I(() => {
3143
3166
  r.storeState.setStateFN("colFilters", (i) => {
3144
- const a = i?.findIndex((h) => h.id === r.column.id) ?? -1, l = i ?? [];
3167
+ const a = i?.findIndex((f) => f.id === r.column.id) ?? -1, l = i ?? [];
3145
3168
  return a >= 0 ? l[a] = {
3146
3169
  ...l[a],
3147
3170
  ...r.options,
@@ -3166,12 +3189,12 @@ const Rr = [
3166
3189
  const o = r.storeState?.colFilters?.findIndex((i) => i.id === r.column.id) ?? -1, e = r.storeState?.colFilters?.[o] ?? {
3167
3190
  id: r.column.id,
3168
3191
  operator: "contains"
3169
- }, [t, n] = le(
3192
+ }, [t, n] = se(
3170
3193
  e?.operator ?? "contains"
3171
3194
  ), [s] = _t(t, 900);
3172
3195
  return I(() => {
3173
3196
  r.storeState.setStateFN("colFilters", (i) => {
3174
- const a = i?.findIndex((h) => h.id === r.column.id) ?? -1, l = i ?? [];
3197
+ const a = i?.findIndex((f) => f.id === r.column.id) ?? -1, l = i ?? [];
3175
3198
  return a >= 0 ? l[a] = {
3176
3199
  ...l[a],
3177
3200
  ...r.options,
@@ -3237,7 +3260,7 @@ const Rr = [
3237
3260
  const t = o(), [n, s] = e, i = t.getRowBuffer(s);
3238
3261
  return i !== void 0 ? t.toCell(i, n) : {
3239
3262
  allowOverlay: !1,
3240
- kind: ie.Loading
3263
+ kind: ae.Loading
3241
3264
  };
3242
3265
  },
3243
3266
  getCellsForSelection: (e, t) => async () => {
@@ -3258,14 +3281,14 @@ const Rr = [
3258
3281
  for (const i of e._gridSelectionRows) {
3259
3282
  let a;
3260
3283
  for (const l in n)
3261
- for (const h in n[l]) {
3262
- const u = Number(l) * s + Number(h);
3284
+ for (const f in n[l]) {
3285
+ const u = Number(l) * s + Number(f);
3263
3286
  if (!isNaN(u)) {
3264
- if (Number(n[l][h]?._rownumber) === i + 1) {
3265
- a = n[l][h];
3287
+ if (Number(n[l][f]?._rownumber) === i + 1) {
3288
+ a = n[l][f];
3266
3289
  break;
3267
3290
  } else if (u === i + 1) {
3268
- a = n[l][h];
3291
+ a = n[l][f];
3269
3292
  break;
3270
3293
  }
3271
3294
  }
@@ -3279,7 +3302,7 @@ const Rr = [
3279
3302
  if (t.data && t.data.length > 0)
3280
3303
  return t.data[e] === void 0 ? {
3281
3304
  allowOverlay: !1,
3282
- kind: ie.Loading
3305
+ kind: ae.Loading
3283
3306
  } : t.data[e];
3284
3307
  const n = Math.max(0, Math.floor(e / t.pageSize)), s = t.pageSize * n, i = e - s;
3285
3308
  return t._page_data?.[n]?.[i];
@@ -3290,10 +3313,10 @@ const Rr = [
3290
3313
  if (t.ready) {
3291
3314
  const s = t._page_data, i = t.pageSize, a = t.keyField ?? "id";
3292
3315
  for (const l in s) {
3293
- for (const h in s[l]) {
3294
- const u = Number(l) * i + Number(h);
3295
- if (String(s[l][h]?.[a]) === String(e)) {
3296
- n = s[l][h]?._rownumber > 0 ? s[l][h]?._rownumber : u > 0 ? u : -1;
3316
+ for (const f in s[l]) {
3317
+ const u = Number(l) * i + Number(f);
3318
+ if (String(s[l][f]?.[a]) === String(e)) {
3319
+ n = s[l][f]?._rownumber > 0 ? s[l][f]?._rownumber : u > 0 ? u : -1;
3297
3320
  break;
3298
3321
  }
3299
3322
  }
@@ -3340,7 +3363,7 @@ const Rr = [
3340
3363
  })
3341
3364
  ))
3342
3365
  return;
3343
- const a = [], l = Object.keys(n.renderColumns ?? [1, 2, 3]).length, h = n.pageSize * s, u = n._page_data?.[s]?.length > 0;
3366
+ const a = [], l = Object.keys(n.renderColumns ?? [1, 2, 3]).length, f = n.pageSize * s, u = n._page_data?.[s]?.length > 0;
3344
3367
  if (t === "all") {
3345
3368
  n._active_requests?.forEach((c) => {
3346
3369
  c.controller?.abort?.();
@@ -3353,7 +3376,7 @@ const Rr = [
3353
3376
  }
3354
3377
  !u && t !== "page" && n.useAPIQuery?.(s).then((c) => {
3355
3378
  n.setStateFN("_page_data", (m) => ({ ...m, [s]: c }));
3356
- for (let m = s; m <= h + n.pageSize; m++)
3379
+ for (let m = s; m <= f + n.pageSize; m++)
3357
3380
  for (let g = 0; g <= l; g++)
3358
3381
  a.push({
3359
3382
  cell: [g, m]
@@ -3400,7 +3423,7 @@ const Rr = [
3400
3423
  onColumnMoved: (e, t) => {
3401
3424
  const n = o(), s = n.renderColumns?.[e], i = n.renderColumns?.[t];
3402
3425
  s?.disableMove || i?.disableMove || n.setStateFN("colOrder", (a) => {
3403
- const l = a ?? n.renderColumns?.map((h, u) => [h.id, u]).reduce((h, [u, c]) => ({ ...h, [u]: c }), {});
3426
+ const l = a ?? n.renderColumns?.map((f, u) => [f.id, u]).reduce((f, [u, c]) => ({ ...f, [u]: c }), {});
3404
3427
  return !s?.id || !i?.id ? l : { ...l, [s?.id]: t, [i?.id]: e };
3405
3428
  });
3406
3429
  },
@@ -3421,8 +3444,8 @@ const Rr = [
3421
3444
  label: "Sort Ascending",
3422
3445
  leftSection: /* @__PURE__ */ d.jsx(ve, { sprite: Le }),
3423
3446
  onClick: () => {
3424
- i.setStateFN("colSort", (h) => {
3425
- const u = [...h ?? []], c = u.findIndex((g) => g.id === a.id), m = "asc";
3447
+ i.setStateFN("colSort", (f) => {
3448
+ const u = [...f ?? []], c = u.findIndex((g) => g.id === a.id), m = "asc";
3426
3449
  if (c < 0) {
3427
3450
  const g = {
3428
3451
  direction: m,
@@ -3439,8 +3462,8 @@ const Rr = [
3439
3462
  label: "Sort Descending",
3440
3463
  leftSection: /* @__PURE__ */ d.jsx(ve, { sprite: Ne }),
3441
3464
  onClick: () => {
3442
- i.setStateFN("colSort", (h) => {
3443
- const u = [...h ?? []], c = u.findIndex((g) => g.id === a.id), m = "desc";
3465
+ i.setStateFN("colSort", (f) => {
3466
+ const u = [...f ?? []], c = u.findIndex((g) => g.id === a.id), m = "desc";
3444
3467
  if (c < 0) {
3445
3468
  const g = {
3446
3469
  direction: m,
@@ -3483,10 +3506,10 @@ const Rr = [
3483
3506
  t.preventDefault();
3484
3507
  const s = n.renderColumns?.[e];
3485
3508
  s && (s.disableSort || n.setStateFN("colSort", (i) => {
3486
- const a = [...i ?? []], l = a.findIndex((h) => h.id === s.id);
3509
+ const a = [...i ?? []], l = a.findIndex((f) => f.id === s.id);
3487
3510
  if (l < 0) {
3488
- const h = { direction: "asc", id: s.id, order: a?.length };
3489
- a.push(h);
3511
+ const f = { direction: "asc", id: s.id, order: a?.length };
3512
+ a.push(f);
3490
3513
  } else l >= 0 && a[l].direction === "asc" ? a[l].direction = "desc" : l >= 0 && a[l].direction === "desc" && a.splice(l, 1);
3491
3514
  return a;
3492
3515
  }));
@@ -3504,12 +3527,12 @@ const Rr = [
3504
3527
  leftSection: /* @__PURE__ */ d.jsx(ve, { sprite: Le }),
3505
3528
  onClick: () => {
3506
3529
  n.setStateFN("colSort", (l) => {
3507
- const h = [...l ?? []], u = h.findIndex((m) => m.id === s.id), c = "asc";
3530
+ const f = [...l ?? []], u = f.findIndex((m) => m.id === s.id), c = "asc";
3508
3531
  if (u < 0) {
3509
- const m = { direction: c, id: s.id, order: h?.length };
3510
- h.push(m);
3511
- } else u >= 0 && (h[u].direction = c);
3512
- return h;
3532
+ const m = { direction: c, id: s.id, order: f?.length };
3533
+ f.push(m);
3534
+ } else u >= 0 && (f[u].direction = c);
3535
+ return f;
3513
3536
  });
3514
3537
  }
3515
3538
  },
@@ -3518,12 +3541,12 @@ const Rr = [
3518
3541
  leftSection: /* @__PURE__ */ d.jsx(ve, { sprite: Ne }),
3519
3542
  onClick: () => {
3520
3543
  n.setStateFN("colSort", (l) => {
3521
- const h = [...l ?? []], u = h.findIndex((m) => m.id === s.id), c = "desc";
3544
+ const f = [...l ?? []], u = f.findIndex((m) => m.id === s.id), c = "desc";
3522
3545
  if (u < 0) {
3523
- const m = { direction: c, id: s.id, order: h?.length };
3524
- h.push(m);
3525
- } else u >= 0 && (h[u].direction = c);
3526
- return h;
3546
+ const m = { direction: c, id: s.id, order: f?.length };
3547
+ f.push(m);
3548
+ } else u >= 0 && (f[u].direction = c);
3549
+ return f;
3527
3550
  });
3528
3551
  }
3529
3552
  },
@@ -3571,7 +3594,7 @@ const Rr = [
3571
3594
  const i = o();
3572
3595
  i._scrollTimeout && clearTimeout(i._scrollTimeout);
3573
3596
  const a = () => {
3574
- const l = o(), h = Math.max(0, Math.floor(e.y / l.pageSize)), u = Math.max(0, Math.floor(l._visiblePages.y / l.pageSize)), c = h - u;
3597
+ const l = o(), f = Math.max(0, Math.floor(e.y / l.pageSize)), u = Math.max(0, Math.floor(l._visiblePages.y / l.pageSize)), c = f - u;
3575
3598
  if (l.progressiveScroll && c > 1) {
3576
3599
  const m = o(), g = (u + 2) * m.pageSize * (m.rowHeight ?? 22);
3577
3600
  m._glideref?.scrollTo(
@@ -3596,8 +3619,8 @@ const Rr = [
3596
3619
  pageSize: 50,
3597
3620
  ready: !1,
3598
3621
  refreshCells: (e, t, n) => {
3599
- const s = o(), i = [], a = Object.keys(s.renderColumns ?? [1, 2, 3]).length, l = e && e > 0 ? e : 0, h = t && t >= l ? t : l + s.pageSize;
3600
- for (let u = l; u <= h; u++)
3622
+ const s = o(), i = [], a = Object.keys(s.renderColumns ?? [1, 2, 3]).length, l = e && e > 0 ? e : 0, f = t && t >= l ? t : l + s.pageSize;
3623
+ for (let u = l; u <= f; u++)
3601
3624
  if (n && n > 0)
3602
3625
  i.push({
3603
3626
  cell: [n, u]
@@ -3631,20 +3654,20 @@ const Rr = [
3631
3654
  if (a == null || e === void 0 || e === null)
3632
3655
  return i?.Cell ? i?.Cell(e, t, a, void 0, n) : n.RenderCell ? n.RenderCell(e, t, a, void 0, n) : {
3633
3656
  allowOverlay: !1,
3634
- kind: ie.Loading
3657
+ kind: ae.Loading
3635
3658
  };
3636
3659
  try {
3637
3660
  const l = String(a).includes(".") ? _r(a, e) ?? "" : e?.[a];
3638
- return i?.Cell ? { kind: ie.Text, ...i?.Cell(e, t, a, l, n) } : n.RenderCell ? n.RenderCell(e, t, a, l, n) : {
3661
+ return i?.Cell ? { kind: ae.Text, ...i?.Cell(e, t, a, l, n) } : n.RenderCell ? n.RenderCell(e, t, a, l, n) : {
3639
3662
  allowOverlay: !0,
3640
3663
  data: l ?? "",
3641
3664
  displayData: String(l ?? ""),
3642
- kind: ie.Text
3665
+ kind: ae.Text
3643
3666
  };
3644
3667
  } catch {
3645
3668
  return n.RenderCell ? n.RenderCell(e, t, a, e?.[a ?? ""], n) : {
3646
3669
  allowOverlay: !1,
3647
- kind: ie.Loading,
3670
+ kind: ae.Loading,
3648
3671
  skeletonWidthVariability: 50
3649
3672
  };
3650
3673
  }
@@ -3693,7 +3716,7 @@ function Ar(r) {
3693
3716
  l.mounted
3694
3717
  ]), i = oe(
3695
3718
  async (l) => {
3696
- const h = t("columns"), u = t("colSort"), c = t("pageSize"), m = t("colFilters"), g = t("searchStr"), p = t("searchFields"), y = t("_active_requests"), _ = t("keyField");
3719
+ const f = t("columns"), u = t("colSort"), c = t("pageSize"), m = t("colFilters"), g = t("searchStr"), p = t("searchFields"), y = t("_active_requests"), _ = t("keyField");
3697
3720
  e("loadingData", !0);
3698
3721
  try {
3699
3722
  if (r && r.url) {
@@ -3713,7 +3736,7 @@ function Ar(r) {
3713
3736
  type: "searchop",
3714
3737
  value: S.value
3715
3738
  });
3716
- }), g && g !== "" && h?.filter(
3739
+ }), g && g !== "" && f?.filter(
3717
3740
  (S) => !S.disableFilter && !S.disableSearch && !S.virtual && S.id && ((p ?? []).length == 0 || p?.includes(S.id))
3718
3741
  )?.forEach((S) => {
3719
3742
  x.push({
@@ -3727,7 +3750,7 @@ function Ar(r) {
3727
3750
  type: "custom-sql-w",
3728
3751
  value: r.filter
3729
3752
  }), (r.options ?? []).length > 0 && x.push(...r.options ?? []);
3730
- const R = h?.filter((S) => !S.virtual)?.map((S) => S.id) ?? [];
3753
+ const R = f?.filter((S) => !S.virtual)?.map((S) => S.id) ?? [];
3731
3754
  if (r.hotfields && r.hotfields.length > 0 && R?.push(r.hotfields.join(",")), _ && (R.includes(_) || R.push(_)), R && R.length > 0 && x.push({
3732
3755
  type: "select-fields",
3733
3756
  value: R.join(",")
@@ -3782,13 +3805,13 @@ function Ar(r) {
3782
3805
  ]
3783
3806
  ), a = oe(
3784
3807
  async (l) => {
3785
- const h = t("colFilters");
3808
+ const f = t("colFilters");
3786
3809
  if (r && r.url) {
3787
3810
  const u = new Headers(), c = [
3788
3811
  { type: "limit", value: String(10) },
3789
3812
  { type: "fetch-rownumber", value: l }
3790
3813
  ];
3791
- if (u.set("Authorization", `Token ${r.authtoken}`), h?.length && h.length > 0 && h?.filter((p) => p.value?.length > 0)?.forEach((p) => {
3814
+ if (u.set("Authorization", `Token ${r.authtoken}`), f?.length && f.length > 0 && f?.filter((p) => p.value?.length > 0)?.forEach((p) => {
3792
3815
  p.value && p.value !== "" && u.set(`x-searchop-${p.operator}-${p.id}`, `${p.value}`);
3793
3816
  }), r.filter && r.filter !== "" && c.push({
3794
3817
  name: "sql_filter",
@@ -3821,8 +3844,8 @@ function Ar(r) {
3821
3844
  );
3822
3845
  return I(() => {
3823
3846
  e("useAPIQuery", i), e("askAPIRowNumber", a);
3824
- const l = t("isValuesInPages"), h = t("_refresh");
3825
- l || e("values", []), h?.().then(() => {
3847
+ const l = t("isValuesInPages"), f = t("_refresh");
3848
+ l || e("values", []), f?.().then(() => {
3826
3849
  const u = t("onChange"), c = t("getGridSelectedRows");
3827
3850
  if (u && typeof u == "function") {
3828
3851
  const m = c?.();
@@ -3831,9 +3854,9 @@ function Ar(r) {
3831
3854
  });
3832
3855
  }, [r.url, r.authtoken, r.filter, JSON.stringify(r.options), s, e]), /* @__PURE__ */ d.jsx(d.Fragment, {});
3833
3856
  }
3834
- const Tr = $.memo(Ar);
3835
- Tr.displayName = "Gridler-GlidlerAPIAdaptorForGoLangv2";
3836
- function Fr(r) {
3857
+ const Fr = $.memo(Ar);
3858
+ Fr.displayName = "Gridler-GlidlerAPIAdaptorForGoLangv2";
3859
+ function Tr(r) {
3837
3860
  const [o, e, t, n] = W((i) => [
3838
3861
  i.getState,
3839
3862
  i.mounted,
@@ -3843,7 +3866,7 @@ function Fr(r) {
3843
3866
  I(() => {
3844
3867
  if (e && r.changeOnActiveClick) {
3845
3868
  const i = (a) => {
3846
- const { row: l, state: h } = a.detail, u = h.getRowBuffer;
3869
+ const { row: l, state: f } = a.detail, u = f.getRowBuffer;
3847
3870
  if (u) {
3848
3871
  const c = u(l);
3849
3872
  if (!c)
@@ -3857,7 +3880,7 @@ function Fr(r) {
3857
3880
  }
3858
3881
  }, [r.changeOnActiveClick, e, n]);
3859
3882
  const s = oe(
3860
- (i, a, l, h, u) => {
3883
+ (i, a, l, f, u) => {
3861
3884
  if (i === "header-menu")
3862
3885
  return u || [];
3863
3886
  const c = [];
@@ -3929,7 +3952,7 @@ function Fr(r) {
3929
3952
  await o("_refresh")?.();
3930
3953
  }
3931
3954
  });
3932
- const y = r.getMenuItems ? r.getMenuItems(i, a, l, h, c) : c;
3955
+ const y = r.getMenuItems ? r.getMenuItems(i, a, l, f, c) : c;
3933
3956
  return !c || c.length === 0 ? u || [] : y;
3934
3957
  },
3935
3958
  [r.onRequestForm, o]
@@ -3949,12 +3972,12 @@ function Mr(r) {
3949
3972
  colFilters: n,
3950
3973
  colSort: s,
3951
3974
  searchStr: a
3952
- }), h = async (u) => {
3975
+ }), f = async (u) => {
3953
3976
  const c = e("pageSize");
3954
3977
  return r.data && Array.isArray(r.data) ? (o("total_rows", r.data.length), r.data.slice(u * (c ?? 50), (u + 1) * (c ?? 50))) : [];
3955
3978
  };
3956
3979
  return I(() => {
3957
- o("useAPIQuery", h);
3980
+ o("useAPIQuery", f);
3958
3981
  }, [t, o]), I(() => {
3959
3982
  if (r.onColumnSort && s !== l?.current?.colSort) {
3960
3983
  const u = r.onColumnSort(s, i, r.data);
@@ -3972,8 +3995,8 @@ function Mr(r) {
3972
3995
  }
3973
3996
  }, [a, r.onSearch]), /* @__PURE__ */ d.jsx(d.Fragment, {});
3974
3997
  }
3975
- const Ft = $.memo(Mr);
3976
- Ft.displayName = "Gridler-GlidlerLocalDataAdaptor";
3998
+ const Tt = $.memo(Mr);
3999
+ Tt.displayName = "Gridler-GlidlerLocalDataAdaptor";
3977
4000
  function Pr() {
3978
4001
  const { loadingData: r, onContextClick: o } = W((e) => ({
3979
4002
  loadingData: e.loadingData,
@@ -4038,7 +4061,7 @@ const Mt = $.memo(() => {
4038
4061
  colOrder: i,
4039
4062
  colSize: a,
4040
4063
  colSort: l,
4041
- columns: h,
4064
+ columns: f,
4042
4065
  getRowIndexByKey: u,
4043
4066
  getState: c,
4044
4067
  loadPage: m,
@@ -4088,10 +4111,10 @@ const Mt = $.memo(() => {
4088
4111
  return I(() => {
4089
4112
  O && (async () => {
4090
4113
  const S = c("_page_data"), E = c("pageSize"), D = c("keyField") ?? "id", L = [];
4091
- for (const F in O) {
4114
+ for (const T in O) {
4092
4115
  let M = -1;
4093
4116
  const A = String(
4094
- typeof O?.[F] == "object" ? O?.[F]?.[D] : typeof O?.[F] == "string" ? O?.[F] : void 0
4117
+ typeof O?.[T] == "object" ? O?.[T]?.[D] : typeof O?.[T] == "string" ? O?.[T] : void 0
4095
4118
  );
4096
4119
  for (const B in S) {
4097
4120
  for (const G in S[B]) {
@@ -4131,13 +4154,13 @@ const Mt = $.memo(() => {
4131
4154
  }, [n, n?.length, c]), I(() => {
4132
4155
  x(
4133
4156
  "renderColumns",
4134
- h?.map((w) => ({
4157
+ f?.map((w) => ({
4135
4158
  ...w,
4136
4159
  hasMenu: w?.hasMenu ?? !0,
4137
4160
  icon: "sort"
4138
4161
  }))
4139
4162
  );
4140
- }, [h]), I(() => {
4163
+ }, [f]), I(() => {
4141
4164
  if (y == null) {
4142
4165
  o.current = "";
4143
4166
  return;
@@ -4190,7 +4213,7 @@ const Mt = $.memo(() => {
4190
4213
  const L = c("scrollToRowKey");
4191
4214
  if (L && L >= 0)
4192
4215
  return;
4193
- const F = c("keyField") ?? "id", A = c("_page_data")?.[0]?.[0], B = A?.[F] ?? -1, G = c("values") ?? [];
4216
+ const T = c("keyField") ?? "id", A = c("_page_data")?.[0]?.[0], B = A?.[T] ?? -1, G = c("values") ?? [];
4194
4217
  if (!(O && O.length > 0) && B && B > 0 && (G.length ?? 0) === 0) {
4195
4218
  const j = [A, ...G], J = c("onChange");
4196
4219
  J ? J(j) : x("values", j), x("scrollToRowKey", B);
@@ -4205,8 +4228,8 @@ const Mt = $.memo(() => {
4205
4228
  D && S && w && E?.(D).then((L) => {
4206
4229
  if (L !== void 0) {
4207
4230
  if (_) {
4208
- const F = c("onChange"), M = [{ [c("keyField") ?? "id"]: _ }];
4209
- JSON.stringify(c("values")) !== JSON.stringify(M) && (F ? F(M) : x("values", M));
4231
+ const T = c("onChange"), M = [{ [c("keyField") ?? "id"]: _ }];
4232
+ JSON.stringify(c("values")) !== JSON.stringify(M) && (T ? T(M) : x("values", M));
4210
4233
  }
4211
4234
  S.scrollTo(0, L), c("_events").dispatchEvent(
4212
4235
  new CustomEvent("scrollToRowKeyFound", {
@@ -4262,8 +4285,8 @@ const Pt = $.memo(() => {
4262
4285
  }, [r]), I(() => {
4263
4286
  if (!e)
4264
4287
  return;
4265
- const l = Math.max(0, Math.floor(t.y / n)), h = Math.floor((t.y + t.height) / n);
4266
- for (const u of Nr(l, h + 1, 1))
4288
+ const l = Math.max(0, Math.floor(t.y / n)), f = Math.floor((t.y + t.height) / n);
4289
+ for (const u of Nr(l, f + 1, 1))
4267
4290
  s(u).then(() => {
4268
4291
  const c = o("_page_data")?.[0] ?? {};
4269
4292
  r("isEmpty", c && c.length > 0);
@@ -4317,9 +4340,9 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4317
4340
  }, a = o === "dark" ? s : {
4318
4341
  bgCell: n,
4319
4342
  textGroupHeader: "#2c5491"
4320
- }, [l, h] = le(a);
4343
+ }, [l, f] = se(a);
4321
4344
  return I(() => {
4322
- h(a);
4345
+ f(a);
4323
4346
  }, [o, t]), { getRowThemeOverride: (c) => e ? Vr(o)(c) : void 0, gridTheme: l };
4324
4347
  }, Hr = () => {
4325
4348
  const r = $.useRef(null), o = $.useRef(!1), { height: e, ref: t, width: n } = wn({ box: "content-box" }), {
@@ -4327,7 +4350,7 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4327
4350
  allowMultiSelect: i,
4328
4351
  focused: a,
4329
4352
  getCellContent: l,
4330
- getCellsForSelection: h,
4353
+ getCellsForSelection: f,
4331
4354
  getState: u,
4332
4355
  glideProps: c,
4333
4356
  hasLocalData: m,
@@ -4345,7 +4368,7 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4345
4368
  onHeaderMenuClick: E,
4346
4369
  onItemHovered: D,
4347
4370
  onVisibleRegionChanged: L,
4348
- renderColumns: F,
4371
+ renderColumns: T,
4349
4372
  rowHeight: M,
4350
4373
  sections: A,
4351
4374
  selectMode: B,
@@ -4353,40 +4376,40 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4353
4376
  setStateFN: j,
4354
4377
  total_rows: J,
4355
4378
  widthProp: Y
4356
- } = W((f) => ({
4357
- _gridSelection: f._gridSelection,
4358
- allowMultiSelect: f.allowMultiSelect,
4359
- focused: f.focused,
4360
- getCellContent: f.getCellContent,
4361
- getCellsForSelection: f.getCellsForSelection,
4362
- getState: f.getState,
4363
- glideProps: f.glideProps,
4364
- hasLocalData: f.hasLocalData,
4365
- headerHeight: f.headerHeight,
4366
- heightProp: f.height,
4367
- mounted: f.mounted,
4368
- onCellActivated: f.onCellActivated,
4369
- onCellClicked: f.onCellClicked,
4370
- onCellEdited: f.onCellEdited,
4371
- onColumnMoved: f.onColumnMoved,
4372
- onColumnProposeMove: f.onColumnProposeMove,
4373
- onColumnResize: f.onColumnResize,
4374
- onContextClick: f.onContextClick,
4375
- onHeaderClicked: f.onHeaderClicked,
4376
- onHeaderMenuClick: f.onHeaderMenuClick,
4377
- onItemHovered: f.onItemHovered,
4378
- onVisibleRegionChanged: f.onVisibleRegionChanged,
4379
- renderColumns: f.renderColumns,
4380
- rowHeight: f.rowHeight,
4381
- sections: f.sections,
4382
- selectMode: f.selectMode,
4383
- setState: f.setState,
4384
- setStateFN: f.setStateFN,
4385
- total_rows: f.total_rows,
4386
- widthProp: f.width
4387
- })), Z = bn(r, (f) => {
4388
- j("_glideref", () => f ?? void 0);
4389
- const b = u("ready"), k = !!(f && y);
4379
+ } = W((h) => ({
4380
+ _gridSelection: h._gridSelection,
4381
+ allowMultiSelect: h.allowMultiSelect,
4382
+ focused: h.focused,
4383
+ getCellContent: h.getCellContent,
4384
+ getCellsForSelection: h.getCellsForSelection,
4385
+ getState: h.getState,
4386
+ glideProps: h.glideProps,
4387
+ hasLocalData: h.hasLocalData,
4388
+ headerHeight: h.headerHeight,
4389
+ heightProp: h.height,
4390
+ mounted: h.mounted,
4391
+ onCellActivated: h.onCellActivated,
4392
+ onCellClicked: h.onCellClicked,
4393
+ onCellEdited: h.onCellEdited,
4394
+ onColumnMoved: h.onColumnMoved,
4395
+ onColumnProposeMove: h.onColumnProposeMove,
4396
+ onColumnResize: h.onColumnResize,
4397
+ onContextClick: h.onContextClick,
4398
+ onHeaderClicked: h.onHeaderClicked,
4399
+ onHeaderMenuClick: h.onHeaderMenuClick,
4400
+ onItemHovered: h.onItemHovered,
4401
+ onVisibleRegionChanged: h.onVisibleRegionChanged,
4402
+ renderColumns: h.renderColumns,
4403
+ rowHeight: h.rowHeight,
4404
+ sections: h.sections,
4405
+ selectMode: h.selectMode,
4406
+ setState: h.setState,
4407
+ setStateFN: h.setStateFN,
4408
+ total_rows: h.total_rows,
4409
+ widthProp: h.width
4410
+ })), Z = bn(r, (h) => {
4411
+ j("_glideref", () => h ?? void 0);
4412
+ const b = u("ready"), k = !!(h && y);
4390
4413
  b !== k && G("ready", k);
4391
4414
  }), q = qr();
4392
4415
  return /* @__PURE__ */ d.jsxs(
@@ -4404,8 +4427,8 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4404
4427
  {
4405
4428
  className: Gr.container,
4406
4429
  "data-focused": a,
4407
- onContextMenu: (f) => {
4408
- f.preventDefault(), o.current || (o.current = !0, w("other", f), setTimeout(() => {
4430
+ onContextMenu: (h) => {
4431
+ h.preventDefault(), o.current || (o.current = !0, w("other", h), setTimeout(() => {
4409
4432
  o.current = !1;
4410
4433
  }, 100));
4411
4434
  },
@@ -4423,7 +4446,7 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4423
4446
  vn,
4424
4447
  {
4425
4448
  cellActivationBehavior: "double-click",
4426
- columns: F ?? [],
4449
+ columns: T ?? [],
4427
4450
  columnSelect: "none",
4428
4451
  drawFocusRing: !0,
4429
4452
  height: e ?? 400,
@@ -4443,15 +4466,15 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4443
4466
  spanRangeBehavior: "default",
4444
4467
  ...c,
4445
4468
  getCellContent: l,
4446
- getCellsForSelection: h,
4469
+ getCellsForSelection: f,
4447
4470
  getRowThemeOverride: q.getRowThemeOverride,
4448
4471
  gridSelection: s,
4449
4472
  headerHeight: g ?? 32,
4450
4473
  headerIcons: { sort: Lr, sortdown: Ne, sortup: Le },
4451
4474
  onCellActivated: _,
4452
4475
  onCellClicked: C,
4453
- onCellContextMenu: (f, b) => {
4454
- b.preventDefault(), c?.onCellContextMenu?.(f, b), o.current || (o.current = !0, w("cell", b, f[0], f[1]), setTimeout(() => {
4476
+ onCellContextMenu: (h, b) => {
4477
+ b.preventDefault(), c?.onCellContextMenu?.(h, b), o.current || (o.current = !0, w("cell", b, h[0], h[1]), setTimeout(() => {
4455
4478
  o.current = !1;
4456
4479
  }, 100));
4457
4480
  },
@@ -4459,22 +4482,22 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4459
4482
  onColumnMoved: R,
4460
4483
  onColumnProposeMove: O,
4461
4484
  onColumnResize: N,
4462
- onGridSelectionChange: (f) => {
4485
+ onGridSelectionChange: (h) => {
4463
4486
  let b = ne.empty();
4464
4487
  const k = u("_gridSelection"), v = u("keyField") ?? "id", z = u("getRowBuffer");
4465
- for (const P of f.rows)
4488
+ for (const P of h.rows)
4466
4489
  z && z(P)?.[v] && (b = b.hasIndex(P) ? b : b.add(P));
4467
- if (B === "row" && f.current?.range)
4468
- for (let P = f.current.range.y; P < f.current.range.y + f.current.range.height; P++)
4490
+ if (B === "row" && h.current?.range)
4491
+ for (let P = h.current.range.y; P < h.current.range.y + h.current.range.height; P++)
4469
4492
  z && z(P)?.[v] && (b = b.hasIndex(P) ? b : b.add(P));
4470
4493
  if (b.length === 0)
4471
4494
  for (const P of k?.rows ?? [])
4472
4495
  z && z(P)?.[v] && (b = b.hasIndex(P) ? b : b.add(P));
4473
- console.log("Debug:onGridSelectionChange", k, f), (JSON.stringify(k?.columns) !== JSON.stringify(f.columns) || JSON.stringify(k?.rows) !== JSON.stringify(b) || JSON.stringify(k?.current) !== JSON.stringify(f.current)) && (G("_gridSelection", { ...f, rows: b }), G("_gridSelectionRows", b));
4496
+ console.log("Debug:onGridSelectionChange", k, h), (JSON.stringify(k?.columns) !== JSON.stringify(h.columns) || JSON.stringify(k?.rows) !== JSON.stringify(b) || JSON.stringify(k?.current) !== JSON.stringify(h.current)) && (G("_gridSelection", { ...h, rows: b }), G("_gridSelectionRows", b));
4474
4497
  },
4475
4498
  onHeaderClicked: S,
4476
- onHeaderContextMenu: (f, b) => {
4477
- b.preventDefault(), o.current || (o.current = !0, w("header", b, f), setTimeout(() => {
4499
+ onHeaderContextMenu: (h, b) => {
4500
+ b.preventDefault(), o.current || (o.current = !0, w("header", b, h), setTimeout(() => {
4478
4501
  o.current = !1;
4479
4502
  }, 100));
4480
4503
  },
@@ -4522,12 +4545,12 @@ const Lr = (r) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
4522
4545
  ]
4523
4546
  }
4524
4547
  ) }), Dt = $.forwardRef(Wr);
4525
- Dt.FormAdaptor = Fr;
4526
- Dt.LocalDataAdaptor = Ft;
4548
+ Dt.FormAdaptor = Tr;
4549
+ Dt.LocalDataAdaptor = Tt;
4527
4550
  export {
4528
4551
  Bn as Boxer,
4529
4552
  $n as BoxerProvider,
4530
- fo as ButtonCtrl,
4553
+ ho as ButtonCtrl,
4531
4554
  Ir as ColumnFilterInput,
4532
4555
  kr as ColumnFilterInputOperator,
4533
4556
  vt as ColumnFilterSet,
@@ -4540,32 +4563,33 @@ export {
4540
4563
  io as FormerResolveSpecAPI,
4541
4564
  ao as FormerRestHeadSpecAPI,
4542
4565
  yr as GetGlobalState,
4543
- Tr as GlidlerAPIAdaptorForGoLangv2,
4544
- Fr as GlidlerFormAdaptor,
4545
- Ft as GlidlerLocalDataAdaptor,
4566
+ Fr as GlidlerAPIAdaptorForGoLangv2,
4567
+ Tr as GlidlerFormAdaptor,
4568
+ Tt as GlidlerLocalDataAdaptor,
4546
4569
  V as GlobalStateStore,
4547
- Eo as GlobalStateStoreProvider,
4570
+ Oo as GlobalStateStoreProvider,
4548
4571
  fe as GoAPIHeaders,
4549
4572
  Dt as Gridler,
4550
4573
  Pr as GridlerRightMenuIcon,
4551
- ho as IconButtonCtrl,
4574
+ mo as IconButtonCtrl,
4552
4575
  Or as MantineBetterMenusProvider,
4553
- mo as NativeSelectCtrl,
4554
- go as PasswordInputCtrl,
4576
+ go as NativeSelectCtrl,
4577
+ po as PasswordInputCtrl,
4555
4578
  oo as ReactBasicErrorBoundary,
4556
4579
  so as ReactErrorBoundary,
4557
- po as SwitchCtrl,
4558
- So as TextAreaCtrl,
4559
- vo as TextInputCtrl,
4580
+ So as SwitchCtrl,
4581
+ vo as TextAreaCtrl,
4582
+ yo as TextInputCtrl,
4560
4583
  De as errorManager,
4561
- bo as getApiURL,
4562
- xo as getAuthToken,
4563
- _o as isLoggedIn,
4564
- wo as setApiURL,
4565
- Co as setAuthToken,
4584
+ xo as getApiURL,
4585
+ _o as getAuthToken,
4586
+ Co as isLoggedIn,
4587
+ bo as setApiURL,
4588
+ Eo as setAuthToken,
4566
4589
  Nn as useBoxerStore,
4567
- yo as useGlobalStateStore,
4568
- Oo as useGlobalStateStoreContext,
4590
+ fo as useFormerState,
4591
+ wo as useGlobalStateStore,
4592
+ Ro as useGlobalStateStoreContext,
4569
4593
  W as useGridlerStore,
4570
4594
  At as useMantineBetterMenus
4571
4595
  };