react-admin-crud-manager 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,626 +1,290 @@
1
- import Oe, { useState as P, useRef as ke, useEffect as ae, useMemo as Ke } from "react";
2
- import { ChevronDown as dr, Search as ze, Check as Fr, X as Ae, Filter as Dr, ChevronLeft as Ar, ChevronRight as Ir, EllipsisVertical as Lr, User as cr, Plus as Br } from "lucide-react";
3
- import { createPortal as $r } from "react-dom";
4
- import { Icon as He } from "@iconify/react";
5
- import { Editor as Gr } from "@tinymce/tinymce-react";
6
- import { SnackbarProvider as Yr, enqueueSnackbar as $e } from "notistack";
1
+ import ve, { useState as T, useRef as ce, useEffect as W, useMemo as Se } from "react";
2
+ import { ChevronDown as Fe, Search as Ce, Check as ze, X as je, Filter as He, ChevronLeft as Ue, ChevronRight as Ve, EllipsisVertical as We, User as De, Plus as qe } from "lucide-react";
3
+ import { createPortal as Je } from "react-dom";
4
+ import { Icon as Re } from "@iconify/react";
5
+ import { Editor as Ze } from "@tinymce/tinymce-react";
6
+ import { SnackbarProvider as Xe, enqueueSnackbar as ke } from "notistack";
7
7
  import a from "prop-types";
8
- var Ue = { exports: {} }, _e = {};
8
+ var Me = { exports: {} }, ge = {};
9
9
  /**
10
10
  * @license React
11
- * react-jsx-runtime.production.min.js
11
+ * react-jsx-runtime.production.js
12
12
  *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
17
  */
18
- var nr;
19
- function Kr() {
20
- if (nr) return _e;
21
- nr = 1;
22
- var h = Oe, c = Symbol.for("react.element"), s = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, d = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, t = { key: !0, ref: !0, __self: !0, __source: !0 };
23
- function n(N, y, v) {
24
- var f, u = {}, g = null, C = null;
25
- v !== void 0 && (g = "" + v), y.key !== void 0 && (g = "" + y.key), y.ref !== void 0 && (C = y.ref);
26
- for (f in y) i.call(y, f) && !t.hasOwnProperty(f) && (u[f] = y[f]);
27
- if (N && N.defaultProps) for (f in y = N.defaultProps, y) u[f] === void 0 && (u[f] = y[f]);
28
- return { $$typeof: c, type: N, key: g, ref: C, props: u, _owner: d.current };
18
+ var Ee;
19
+ function Qe() {
20
+ if (Ee) return ge;
21
+ Ee = 1;
22
+ var c = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
23
+ function s(i, l, r) {
24
+ var n = null;
25
+ if (r !== void 0 && (n = "" + r), l.key !== void 0 && (n = "" + l.key), "key" in l) {
26
+ r = {};
27
+ for (var k in l)
28
+ k !== "key" && (r[k] = l[k]);
29
+ } else r = l;
30
+ return l = r.ref, {
31
+ $$typeof: c,
32
+ type: i,
33
+ key: n,
34
+ ref: l !== void 0 ? l : null,
35
+ props: r
36
+ };
29
37
  }
30
- return _e.Fragment = s, _e.jsx = n, _e.jsxs = n, _e;
38
+ return ge.Fragment = d, ge.jsx = s, ge.jsxs = s, ge;
31
39
  }
32
- var Pe = {};
40
+ var pe = {};
33
41
  /**
34
42
  * @license React
35
43
  * react-jsx-runtime.development.js
36
44
  *
37
- * Copyright (c) Facebook, Inc. and its affiliates.
45
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
46
  *
39
47
  * This source code is licensed under the MIT license found in the
40
48
  * LICENSE file in the root directory of this source tree.
41
49
  */
42
- var lr;
43
- function Ur() {
44
- return lr || (lr = 1, process.env.NODE_ENV !== "production" && function() {
45
- var h = Oe, c = Symbol.for("react.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), t = Symbol.for("react.profiler"), n = Symbol.for("react.provider"), N = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), p = Symbol.iterator, E = "@@iterator";
46
- function M(r) {
47
- if (r === null || typeof r != "object")
48
- return null;
49
- var o = p && r[p] || r[E];
50
- return typeof o == "function" ? o : null;
51
- }
52
- var R = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
53
- function w(r) {
54
- {
55
- for (var o = arguments.length, b = new Array(o > 1 ? o - 1 : 0), k = 1; k < o; k++)
56
- b[k - 1] = arguments[k];
57
- L("error", r, b);
58
- }
59
- }
60
- function L(r, o, b) {
61
- {
62
- var k = R.ReactDebugCurrentFrame, I = k.getStackAddendum();
63
- I !== "" && (o += "%s", b = b.concat([I]));
64
- var Y = b.map(function(D) {
65
- return String(D);
66
- });
67
- Y.unshift("Warning: " + o), Function.prototype.apply.call(console[r], console, Y);
68
- }
69
- }
70
- var U = !1, V = !1, Z = !1, $ = !1, x = !1, B;
71
- B = Symbol.for("react.module.reference");
72
- function G(r) {
73
- return !!(typeof r == "string" || typeof r == "function" || r === i || r === t || x || r === d || r === v || r === f || $ || r === C || U || V || Z || typeof r == "object" && r !== null && (r.$$typeof === g || r.$$typeof === u || r.$$typeof === n || r.$$typeof === N || r.$$typeof === y || // This needs to include all possible module reference object
74
- // types supported by any Flight configuration anywhere since
75
- // we don't know which Flight build this will end up being used
76
- // with.
77
- r.$$typeof === B || r.getModuleId !== void 0));
78
- }
79
- function T(r, o, b) {
80
- var k = r.displayName;
81
- if (k)
82
- return k;
83
- var I = o.displayName || o.name || "";
84
- return I !== "" ? b + "(" + I + ")" : b;
85
- }
86
- function S(r) {
87
- return r.displayName || "Context";
88
- }
89
- function O(r) {
90
- if (r == null)
91
- return null;
92
- if (typeof r.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
93
- return r.displayName || r.name || null;
94
- if (typeof r == "string")
95
- return r;
96
- switch (r) {
97
- case i:
50
+ var _e;
51
+ function ea() {
52
+ return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
53
+ function c(t) {
54
+ if (t == null) return null;
55
+ if (typeof t == "function")
56
+ return t.$$typeof === C ? null : t.displayName || t.name || null;
57
+ if (typeof t == "string") return t;
58
+ switch (t) {
59
+ case j:
98
60
  return "Fragment";
99
- case s:
100
- return "Portal";
101
- case t:
61
+ case R:
102
62
  return "Profiler";
103
- case d:
63
+ case S:
104
64
  return "StrictMode";
105
- case v:
65
+ case z:
106
66
  return "Suspense";
107
- case f:
67
+ case O:
108
68
  return "SuspenseList";
69
+ case F:
70
+ return "Activity";
109
71
  }
110
- if (typeof r == "object")
111
- switch (r.$$typeof) {
72
+ if (typeof t == "object")
73
+ switch (typeof t.tag == "number" && console.error(
74
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
75
+ ), t.$$typeof) {
112
76
  case N:
113
- var o = r;
114
- return S(o) + ".Consumer";
115
- case n:
116
- var b = r;
117
- return S(b._context) + ".Provider";
118
- case y:
119
- return T(r, r.render, "ForwardRef");
120
- case u:
121
- var k = r.displayName || null;
122
- return k !== null ? k : O(r.type) || "Memo";
123
- case g: {
124
- var I = r, Y = I._payload, D = I._init;
77
+ return "Portal";
78
+ case B:
79
+ return t.displayName || "Context";
80
+ case P:
81
+ return (t._context.displayName || "Context") + ".Consumer";
82
+ case Y:
83
+ var y = t.render;
84
+ return t = t.displayName, t || (t = y.displayName || y.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
85
+ case p:
86
+ return y = t.displayName || null, y !== null ? y : c(t.type) || "Memo";
87
+ case _:
88
+ y = t._payload, t = t._init;
125
89
  try {
126
- return O(D(Y));
90
+ return c(t(y));
127
91
  } catch {
128
- return null;
129
92
  }
130
- }
131
93
  }
132
94
  return null;
133
95
  }
134
- var W = Object.assign, Q = 0, oe, pe, ye, ge, ve, fe, se;
135
- function Se() {
136
- }
137
- Se.__reactDisabledLog = !0;
138
- function Ee() {
139
- {
140
- if (Q === 0) {
141
- oe = console.log, pe = console.info, ye = console.warn, ge = console.error, ve = console.group, fe = console.groupCollapsed, se = console.groupEnd;
142
- var r = {
143
- configurable: !0,
144
- enumerable: !0,
145
- value: Se,
146
- writable: !0
147
- };
148
- Object.defineProperties(console, {
149
- info: r,
150
- log: r,
151
- warn: r,
152
- error: r,
153
- group: r,
154
- groupCollapsed: r,
155
- groupEnd: r
156
- });
157
- }
158
- Q++;
159
- }
96
+ function d(t) {
97
+ return "" + t;
160
98
  }
161
- function Te() {
162
- {
163
- if (Q--, Q === 0) {
164
- var r = {
165
- configurable: !0,
166
- enumerable: !0,
167
- writable: !0
168
- };
169
- Object.defineProperties(console, {
170
- log: W({}, r, {
171
- value: oe
172
- }),
173
- info: W({}, r, {
174
- value: pe
175
- }),
176
- warn: W({}, r, {
177
- value: ye
178
- }),
179
- error: W({}, r, {
180
- value: ge
181
- }),
182
- group: W({}, r, {
183
- value: ve
184
- }),
185
- groupCollapsed: W({}, r, {
186
- value: fe
187
- }),
188
- groupEnd: W({}, r, {
189
- value: se
190
- })
191
- });
192
- }
193
- Q < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
194
- }
195
- }
196
- var me = R.ReactCurrentDispatcher, ie;
197
- function de(r, o, b) {
198
- {
199
- if (ie === void 0)
200
- try {
201
- throw Error();
202
- } catch (I) {
203
- var k = I.stack.trim().match(/\n( *(at )?)/);
204
- ie = k && k[1] || "";
205
- }
206
- return `
207
- ` + ie + r;
208
- }
209
- }
210
- var xe = !1, ce;
211
- {
212
- var Ne = typeof WeakMap == "function" ? WeakMap : Map;
213
- ce = new Ne();
214
- }
215
- function we(r, o) {
216
- if (!r || xe)
217
- return "";
218
- {
219
- var b = ce.get(r);
220
- if (b !== void 0)
221
- return b;
222
- }
223
- var k;
224
- xe = !0;
225
- var I = Error.prepareStackTrace;
226
- Error.prepareStackTrace = void 0;
227
- var Y;
228
- Y = me.current, me.current = null, Ee();
99
+ function s(t) {
229
100
  try {
230
- if (o) {
231
- var D = function() {
232
- throw Error();
233
- };
234
- if (Object.defineProperty(D.prototype, "props", {
235
- set: function() {
236
- throw Error();
237
- }
238
- }), typeof Reflect == "object" && Reflect.construct) {
239
- try {
240
- Reflect.construct(D, []);
241
- } catch (he) {
242
- k = he;
243
- }
244
- Reflect.construct(r, [], D);
245
- } else {
246
- try {
247
- D.call();
248
- } catch (he) {
249
- k = he;
250
- }
251
- r.call(D.prototype);
252
- }
253
- } else {
254
- try {
255
- throw Error();
256
- } catch (he) {
257
- k = he;
258
- }
259
- r();
260
- }
261
- } catch (he) {
262
- if (he && k && typeof he.stack == "string") {
263
- for (var _ = he.stack.split(`
264
- `), re = k.stack.split(`
265
- `), q = _.length - 1, J = re.length - 1; q >= 1 && J >= 0 && _[q] !== re[J]; )
266
- J--;
267
- for (; q >= 1 && J >= 0; q--, J--)
268
- if (_[q] !== re[J]) {
269
- if (q !== 1 || J !== 1)
270
- do
271
- if (q--, J--, J < 0 || _[q] !== re[J]) {
272
- var ne = `
273
- ` + _[q].replace(" at new ", " at ");
274
- return r.displayName && ne.includes("<anonymous>") && (ne = ne.replace("<anonymous>", r.displayName)), typeof r == "function" && ce.set(r, ne), ne;
275
- }
276
- while (q >= 1 && J >= 0);
277
- break;
278
- }
279
- }
280
- } finally {
281
- xe = !1, me.current = Y, Te(), Error.prepareStackTrace = I;
282
- }
283
- var Re = r ? r.displayName || r.name : "", tr = Re ? de(Re) : "";
284
- return typeof r == "function" && ce.set(r, tr), tr;
285
- }
286
- function l(r, o, b) {
287
- return we(r, !1);
288
- }
289
- function m(r) {
290
- var o = r.prototype;
291
- return !!(o && o.isReactComponent);
292
- }
293
- function A(r, o, b) {
294
- if (r == null)
295
- return "";
296
- if (typeof r == "function")
297
- return we(r, m(r));
298
- if (typeof r == "string")
299
- return de(r);
300
- switch (r) {
301
- case v:
302
- return de("Suspense");
303
- case f:
304
- return de("SuspenseList");
305
- }
306
- if (typeof r == "object")
307
- switch (r.$$typeof) {
308
- case y:
309
- return l(r.render);
310
- case u:
311
- return A(r.type, o, b);
312
- case g: {
313
- var k = r, I = k._payload, Y = k._init;
314
- try {
315
- return A(Y(I), o, b);
316
- } catch {
317
- }
318
- }
319
- }
320
- return "";
321
- }
322
- var H = Object.prototype.hasOwnProperty, z = {}, te = R.ReactDebugCurrentFrame;
323
- function X(r) {
324
- if (r) {
325
- var o = r._owner, b = A(r.type, r._source, o ? o.type : null);
326
- te.setExtraStackFrame(b);
327
- } else
328
- te.setExtraStackFrame(null);
329
- }
330
- function ue(r, o, b, k, I) {
331
- {
332
- var Y = Function.call.bind(H);
333
- for (var D in r)
334
- if (Y(r, D)) {
335
- var _ = void 0;
336
- try {
337
- if (typeof r[D] != "function") {
338
- var re = Error((k || "React class") + ": " + b + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
339
- throw re.name = "Invariant Violation", re;
340
- }
341
- _ = r[D](o, D, k, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
342
- } catch (q) {
343
- _ = q;
344
- }
345
- _ && !(_ instanceof Error) && (X(I), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", b, D, typeof _), X(null)), _ instanceof Error && !(_.message in z) && (z[_.message] = !0, X(I), w("Failed %s type: %s", b, _.message), X(null));
346
- }
101
+ d(t);
102
+ var y = !1;
103
+ } catch {
104
+ y = !0;
347
105
  }
348
- }
349
- var je = Array.isArray;
350
- function j(r) {
351
- return je(r);
352
- }
353
- function F(r) {
354
- {
355
- var o = typeof Symbol == "function" && Symbol.toStringTag, b = o && r[Symbol.toStringTag] || r.constructor.name || "Object";
356
- return b;
106
+ if (y) {
107
+ y = console;
108
+ var L = y.error, G = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
109
+ return L.call(
110
+ y,
111
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
112
+ G
113
+ ), d(t);
357
114
  }
358
115
  }
359
- function K(r) {
116
+ function i(t) {
117
+ if (t === j) return "<>";
118
+ if (typeof t == "object" && t !== null && t.$$typeof === _)
119
+ return "<...>";
360
120
  try {
361
- return le(r), !1;
121
+ var y = c(t);
122
+ return y ? "<" + y + ">" : "<...>";
362
123
  } catch {
363
- return !0;
124
+ return "<...>";
364
125
  }
365
126
  }
366
- function le(r) {
367
- return "" + r;
127
+ function l() {
128
+ var t = f.A;
129
+ return t === null ? null : t.getOwner();
368
130
  }
369
- function ee(r) {
370
- if (K(r))
371
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", F(r)), le(r);
131
+ function r() {
132
+ return Error("react-stack-top-frame");
372
133
  }
373
- var We = R.ReactCurrentOwner, xr = {
374
- key: !0,
375
- ref: !0,
376
- __self: !0,
377
- __source: !0
378
- }, qe, Je;
379
- function yr(r) {
380
- if (H.call(r, "ref")) {
381
- var o = Object.getOwnPropertyDescriptor(r, "ref").get;
382
- if (o && o.isReactWarning)
383
- return !1;
134
+ function n(t) {
135
+ if (A.call(t, "key")) {
136
+ var y = Object.getOwnPropertyDescriptor(t, "key").get;
137
+ if (y && y.isReactWarning) return !1;
384
138
  }
385
- return r.ref !== void 0;
139
+ return t.key !== void 0;
386
140
  }
387
- function vr(r) {
388
- if (H.call(r, "key")) {
389
- var o = Object.getOwnPropertyDescriptor(r, "key").get;
390
- if (o && o.isReactWarning)
391
- return !1;
141
+ function k(t, y) {
142
+ function L() {
143
+ X || (X = !0, console.error(
144
+ "%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)",
145
+ y
146
+ ));
392
147
  }
393
- return r.key !== void 0;
148
+ L.isReactWarning = !0, Object.defineProperty(t, "key", {
149
+ get: L,
150
+ configurable: !0
151
+ });
394
152
  }
395
- function wr(r, o) {
396
- typeof r.ref == "string" && We.current;
397
- }
398
- function jr(r, o) {
399
- {
400
- var b = function() {
401
- qe || (qe = !0, w("%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://reactjs.org/link/special-props)", o));
402
- };
403
- b.isReactWarning = !0, Object.defineProperty(r, "key", {
404
- get: b,
405
- configurable: !0
406
- });
407
- }
153
+ function M() {
154
+ var t = c(this.type);
155
+ return ae[t] || (ae[t] = !0, console.error(
156
+ "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."
157
+ )), t = this.props.ref, t !== void 0 ? t : null;
408
158
  }
409
- function kr(r, o) {
410
- {
411
- var b = function() {
412
- Je || (Je = !0, w("%s: `ref` 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://reactjs.org/link/special-props)", o));
413
- };
414
- b.isReactWarning = !0, Object.defineProperty(r, "ref", {
415
- get: b,
416
- configurable: !0
417
- });
418
- }
419
- }
420
- var Sr = function(r, o, b, k, I, Y, D) {
421
- var _ = {
422
- // This tag allows us to uniquely identify this as a React Element
423
- $$typeof: c,
424
- // Built-in properties that belong on the element
425
- type: r,
426
- key: o,
427
- ref: b,
428
- props: D,
429
- // Record the component responsible for creating this element.
430
- _owner: Y
431
- };
432
- return _._store = {}, Object.defineProperty(_._store, "validated", {
159
+ function x(t, y, L, G, te, ne) {
160
+ var I = L.ref;
161
+ return t = {
162
+ $$typeof: h,
163
+ type: t,
164
+ key: y,
165
+ props: L,
166
+ _owner: G
167
+ }, (I !== void 0 ? I : null) !== null ? Object.defineProperty(t, "ref", {
168
+ enumerable: !1,
169
+ get: M
170
+ }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
433
171
  configurable: !1,
434
172
  enumerable: !1,
435
173
  writable: !0,
436
- value: !1
437
- }), Object.defineProperty(_, "_self", {
174
+ value: 0
175
+ }), Object.defineProperty(t, "_debugInfo", {
438
176
  configurable: !1,
439
177
  enumerable: !1,
440
- writable: !1,
441
- value: k
442
- }), Object.defineProperty(_, "_source", {
178
+ writable: !0,
179
+ value: null
180
+ }), Object.defineProperty(t, "_debugStack", {
443
181
  configurable: !1,
444
182
  enumerable: !1,
445
- writable: !1,
446
- value: I
447
- }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
448
- };
449
- function Nr(r, o, b, k, I) {
450
- {
451
- var Y, D = {}, _ = null, re = null;
452
- b !== void 0 && (ee(b), _ = "" + b), vr(o) && (ee(o.key), _ = "" + o.key), yr(o) && (re = o.ref, wr(o, I));
453
- for (Y in o)
454
- H.call(o, Y) && !xr.hasOwnProperty(Y) && (D[Y] = o[Y]);
455
- if (r && r.defaultProps) {
456
- var q = r.defaultProps;
457
- for (Y in q)
458
- D[Y] === void 0 && (D[Y] = q[Y]);
459
- }
460
- if (_ || re) {
461
- var J = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
462
- _ && jr(D, J), re && kr(D, J);
463
- }
464
- return Sr(r, _, re, I, k, We.current, D);
465
- }
466
- }
467
- var Ie = R.ReactCurrentOwner, Ze = R.ReactDebugCurrentFrame;
468
- function Ce(r) {
469
- if (r) {
470
- var o = r._owner, b = A(r.type, r._source, o ? o.type : null);
471
- Ze.setExtraStackFrame(b);
472
- } else
473
- Ze.setExtraStackFrame(null);
474
- }
475
- var Le;
476
- Le = !1;
477
- function Be(r) {
478
- return typeof r == "object" && r !== null && r.$$typeof === c;
479
- }
480
- function Xe() {
481
- {
482
- if (Ie.current) {
483
- var r = O(Ie.current.type);
484
- if (r)
485
- return `
486
-
487
- Check the render method of \`` + r + "`.";
488
- }
489
- return "";
490
- }
491
- }
492
- function Cr(r) {
493
- return "";
494
- }
495
- var Qe = {};
496
- function Rr(r) {
497
- {
498
- var o = Xe();
499
- if (!o) {
500
- var b = typeof r == "string" ? r : r.displayName || r.name;
501
- b && (o = `
502
-
503
- Check the top-level render call using <` + b + ">.");
504
- }
505
- return o;
506
- }
507
- }
508
- function er(r, o) {
509
- {
510
- if (!r._store || r._store.validated || r.key != null)
511
- return;
512
- r._store.validated = !0;
513
- var b = Rr(o);
514
- if (Qe[b])
515
- return;
516
- Qe[b] = !0;
517
- var k = "";
518
- r && r._owner && r._owner !== Ie.current && (k = " It was passed a child from " + O(r._owner.type) + "."), Ce(r), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, k), Ce(null);
519
- }
183
+ writable: !0,
184
+ value: te
185
+ }), Object.defineProperty(t, "_debugTask", {
186
+ configurable: !1,
187
+ enumerable: !1,
188
+ writable: !0,
189
+ value: ne
190
+ }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
520
191
  }
521
- function rr(r, o) {
522
- {
523
- if (typeof r != "object")
524
- return;
525
- if (j(r))
526
- for (var b = 0; b < r.length; b++) {
527
- var k = r[b];
528
- Be(k) && er(k, o);
529
- }
530
- else if (Be(r))
531
- r._store && (r._store.validated = !0);
532
- else if (r) {
533
- var I = M(r);
534
- if (typeof I == "function" && I !== r.entries)
535
- for (var Y = I.call(r), D; !(D = Y.next()).done; )
536
- Be(D.value) && er(D.value, o);
537
- }
192
+ function m(t, y, L, G, te, ne) {
193
+ var I = y.children;
194
+ if (I !== void 0)
195
+ if (G)
196
+ if (U(I)) {
197
+ for (G = 0; G < I.length; G++)
198
+ u(I[G]);
199
+ Object.freeze && Object.freeze(I);
200
+ } else
201
+ console.error(
202
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
203
+ );
204
+ else u(I);
205
+ if (A.call(y, "key")) {
206
+ I = c(t);
207
+ var J = Object.keys(y).filter(function(ue) {
208
+ return ue !== "key";
209
+ });
210
+ G = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", ie[I + G] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
211
+ `A props object containing a "key" prop is being spread into JSX:
212
+ let props = %s;
213
+ <%s {...props} />
214
+ React keys must be passed directly to JSX without using spread:
215
+ let props = %s;
216
+ <%s key={someKey} {...props} />`,
217
+ G,
218
+ I,
219
+ J,
220
+ I
221
+ ), ie[I + G] = !0);
538
222
  }
223
+ if (I = null, L !== void 0 && (s(L), I = "" + L), n(y) && (s(y.key), I = "" + y.key), "key" in y) {
224
+ L = {};
225
+ for (var le in y)
226
+ le !== "key" && (L[le] = y[le]);
227
+ } else L = y;
228
+ return I && k(
229
+ L,
230
+ typeof t == "function" ? t.displayName || t.name || "Unknown" : t
231
+ ), x(
232
+ t,
233
+ I,
234
+ L,
235
+ l(),
236
+ te,
237
+ ne
238
+ );
539
239
  }
540
- function Mr(r) {
541
- {
542
- var o = r.type;
543
- if (o == null || typeof o == "string")
544
- return;
545
- var b;
546
- if (typeof o == "function")
547
- b = o.propTypes;
548
- else if (typeof o == "object" && (o.$$typeof === y || // Note: Memo only checks outer props here.
549
- // Inner props are checked in the reconciler.
550
- o.$$typeof === u))
551
- b = o.propTypes;
552
- else
553
- return;
554
- if (b) {
555
- var k = O(o);
556
- ue(b, r.props, "prop", k, r);
557
- } else if (o.PropTypes !== void 0 && !Le) {
558
- Le = !0;
559
- var I = O(o);
560
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
561
- }
562
- typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
563
- }
240
+ function u(t) {
241
+ b(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === _ && (t._payload.status === "fulfilled" ? b(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
564
242
  }
565
- function Er(r) {
566
- {
567
- for (var o = Object.keys(r.props), b = 0; b < o.length; b++) {
568
- var k = o[b];
569
- if (k !== "children" && k !== "key") {
570
- Ce(r), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", k), Ce(null);
571
- break;
572
- }
573
- }
574
- r.ref !== null && (Ce(r), w("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
575
- }
243
+ function b(t) {
244
+ return typeof t == "object" && t !== null && t.$$typeof === h;
576
245
  }
577
- function ar(r, o, b, k, I, Y) {
578
- {
579
- var D = G(r);
580
- if (!D) {
581
- var _ = "";
582
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
583
- var re = Cr();
584
- re ? _ += re : _ += Xe();
585
- var q;
586
- r === null ? q = "null" : j(r) ? q = "array" : r !== void 0 && r.$$typeof === c ? (q = "<" + (O(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : q = typeof r, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, _);
587
- }
588
- var J = Nr(r, o, b, I, Y);
589
- if (J == null)
590
- return J;
591
- if (D) {
592
- var ne = o.children;
593
- if (ne !== void 0)
594
- if (k)
595
- if (j(ne)) {
596
- for (var Re = 0; Re < ne.length; Re++)
597
- rr(ne[Re], r);
598
- Object.freeze && Object.freeze(ne);
599
- } else
600
- w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
601
- else
602
- rr(ne, r);
603
- }
604
- return r === i ? Er(J) : Mr(J), J;
246
+ var v = ve, h = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), B = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), f = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, U = Array.isArray, V = console.createTask ? console.createTask : function() {
247
+ return null;
248
+ };
249
+ v = {
250
+ react_stack_bottom_frame: function(t) {
251
+ return t();
605
252
  }
606
- }
607
- function Tr(r, o, b) {
608
- return ar(r, o, b, !0);
609
- }
610
- function _r(r, o, b) {
611
- return ar(r, o, b, !1);
612
- }
613
- var Pr = _r, Or = Tr;
614
- Pe.Fragment = i, Pe.jsx = Pr, Pe.jsxs = Or;
615
- }()), Pe;
253
+ };
254
+ var X, ae = {}, oe = v.react_stack_bottom_frame.bind(
255
+ v,
256
+ r
257
+ )(), re = V(i(r)), ie = {};
258
+ pe.Fragment = j, pe.jsx = function(t, y, L) {
259
+ var G = 1e4 > f.recentlyCreatedOwnerStacks++;
260
+ return m(
261
+ t,
262
+ y,
263
+ L,
264
+ !1,
265
+ G ? Error("react-stack-top-frame") : oe,
266
+ G ? V(i(t)) : re
267
+ );
268
+ }, pe.jsxs = function(t, y, L) {
269
+ var G = 1e4 > f.recentlyCreatedOwnerStacks++;
270
+ return m(
271
+ t,
272
+ y,
273
+ L,
274
+ !0,
275
+ G ? Error("react-stack-top-frame") : oe,
276
+ G ? V(i(t)) : re
277
+ );
278
+ };
279
+ }()), pe;
616
280
  }
617
- process.env.NODE_ENV === "production" ? Ue.exports = Kr() : Ue.exports = Ur();
618
- var e = Ue.exports;
619
- const ur = (h, c = "DD MMM YYYY") => {
620
- if (!h) return "N/A";
621
- const s = new Date(h);
281
+ process.env.NODE_ENV === "production" ? Me.exports = Qe() : Me.exports = ea();
282
+ var e = Me.exports;
283
+ const Le = (c, d = "DD MMM YYYY") => {
284
+ if (!c) return "N/A";
285
+ const s = new Date(c);
622
286
  if (isNaN(s)) return "Invalid Date";
623
- const i = (t) => String(t).padStart(2, "0"), d = {
287
+ const i = (r) => String(r).padStart(2, "0"), l = {
624
288
  YYYY: s.getFullYear(),
625
289
  YY: String(s.getFullYear()).slice(-2),
626
290
  MMMM: s.toLocaleString("en-US", { month: "long" }),
@@ -637,39 +301,39 @@ const ur = (h, c = "DD MMM YYYY") => {
637
301
  ss: i(s.getSeconds()),
638
302
  A: s.getHours() >= 12 ? "PM" : "AM"
639
303
  };
640
- return c.replace(
304
+ return d.replace(
641
305
  /YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|hh|mm|ss|A/g,
642
- (t) => d[t]
306
+ (r) => l[r]
643
307
  );
644
- }, zr = (h, c, s = []) => {
645
- if (!(c != null && c.trim())) return h;
646
- const i = c.toLowerCase(), d = (t) => t == null ? [] : typeof t == "object" ? Object.values(t).flatMap(d) : [String(t)];
647
- return h.filter((t) => {
308
+ }, aa = (c, d, s = []) => {
309
+ if (!(d != null && d.trim())) return c;
310
+ const i = d.toLowerCase(), l = (r) => r == null ? [] : typeof r == "object" ? Object.values(r).flatMap(l) : [String(r)];
311
+ return c.filter((r) => {
648
312
  let n = [];
649
- return s.length > 0 ? s.forEach((N) => {
650
- t[N] !== void 0 && n.push(...d(t[N]));
651
- }) : n = d(t), n.some(
652
- (N) => N.toLowerCase().includes(i)
313
+ return s.length > 0 ? s.forEach((k) => {
314
+ r[k] !== void 0 && n.push(...l(r[k]));
315
+ }) : n = l(r), n.some(
316
+ (k) => k.toLowerCase().includes(i)
653
317
  );
654
318
  });
655
- }, Me = Oe.forwardRef(
319
+ }, he = ve.forwardRef(
656
320
  ({
657
- className: h = "",
658
- variant: c = "contained",
321
+ className: c = "",
322
+ variant: d = "contained",
659
323
  color: s = "default",
660
324
  size: i = "default",
661
- fullWidth: d = !1,
662
- children: t,
325
+ fullWidth: l = !1,
326
+ children: r,
663
327
  ...n
664
- }, N) => {
665
- var p;
666
- const y = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", v = {
328
+ }, k) => {
329
+ var h;
330
+ const M = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", x = {
667
331
  sm: "h-8 px-3 rounded-md text-sm",
668
332
  md: "h-9 px-4 rounded-md text-sm",
669
333
  lg: "h-11 px-6 rounded-md text-base",
670
334
  xl: "h-12 px-8 rounded-lg text-lg",
671
335
  default: "h-9 px-4 rounded-md text-sm"
672
- }, f = {
336
+ }, m = {
673
337
  primary: {
674
338
  contained: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500 shadow-sm",
675
339
  outlined: "border border-blue-600 bg-transparent text-blue-600 hover:bg-blue-50 focus:ring-blue-500",
@@ -690,118 +354,118 @@ const ur = (h, c = "DD MMM YYYY") => {
690
354
  outlined: "border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500",
691
355
  text: "bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500"
692
356
  }
693
- }, u = ((p = f[s]) == null ? void 0 : p[c]) || f.default.contained, g = v[i], C = `
694
- ${y}
357
+ }, u = ((h = m[s]) == null ? void 0 : h[d]) || m.default.contained, b = x[i], v = `
358
+ ${M}
695
359
  ${u}
696
- ${g}
697
- ${d ? "w-full" : ""}
698
- ${h}
360
+ ${b}
361
+ ${l ? "w-full" : ""}
362
+ ${c}
699
363
  `.trim();
700
364
  return /* @__PURE__ */ e.jsx(
701
365
  "button",
702
366
  {
703
- ref: N,
367
+ ref: k,
704
368
  type: n.type || "button",
705
- className: C,
369
+ className: v,
706
370
  ...n,
707
- children: t
371
+ children: r
708
372
  }
709
373
  );
710
374
  }
711
375
  );
712
- Me.displayName = "Button";
713
- function be({ label: h, required: c = !1 }) {
376
+ he.displayName = "Button";
377
+ function ee({ label: c, required: d = !1 }) {
714
378
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
715
- h,
716
- c && /* @__PURE__ */ e.jsx("span", { className: "ml-1", children: "*" })
379
+ c,
380
+ d && /* @__PURE__ */ e.jsx("span", { className: "ml-1", children: "*" })
717
381
  ] }) });
718
382
  }
719
- const Hr = ({
720
- options: h = [],
721
- value: c,
383
+ const ra = ({
384
+ options: c = [],
385
+ value: d,
722
386
  onChange: s,
723
387
  placeholder: i = "Select option",
724
- className: d = "",
725
- disabled: t = !1,
388
+ className: l = "",
389
+ disabled: r = !1,
726
390
  search: n = !1,
727
- label: N = "",
728
- required: y = !1,
729
- name: v = "",
730
- parentClass: f = "",
391
+ label: k = "",
392
+ required: M = !1,
393
+ name: x = "",
394
+ parentClass: m = "",
731
395
  multiple: u = !1,
732
396
  // ✅ NEW
733
- dropdownMaxHeight: g = ""
397
+ dropdownMaxHeight: b = ""
734
398
  }) => {
735
- var T;
736
- const [C, p] = P(!1), [E, M] = P(""), [R, w] = P(!0), L = ke(null), U = ke(null), V = (S) => String(typeof S == "boolean" ? S : S ?? ""), Z = u ? (c || []).map(V) : V(c), $ = h.filter(
737
- (S) => S.label.toLowerCase().includes(E.toLowerCase())
738
- ), x = (S) => {
739
- const O = V(S);
740
- return u ? Z.includes(O) : O === Z;
399
+ var C;
400
+ const [v, h] = T(!1), [N, j] = T(""), [S, R] = T(!0), P = ce(null), B = ce(null), Y = (f) => String(typeof f == "boolean" ? f : f ?? ""), z = u ? (d || []).map(Y) : Y(d), O = c.filter(
401
+ (f) => f.label.toLowerCase().includes(N.toLowerCase())
402
+ ), p = (f) => {
403
+ const A = Y(f);
404
+ return u ? z.includes(A) : A === z;
741
405
  };
742
- ae(() => {
743
- const S = (O) => {
744
- L.current && !L.current.contains(O.target) && (p(!1), M(""));
406
+ W(() => {
407
+ const f = (A) => {
408
+ P.current && !P.current.contains(A.target) && (h(!1), j(""));
745
409
  };
746
- return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
747
- }, []), ae(() => {
748
- if (C && L.current) {
749
- const S = L.current.getBoundingClientRect(), W = window.innerHeight - S.bottom;
750
- w(W < 200);
410
+ return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
411
+ }, []), W(() => {
412
+ if (v && P.current) {
413
+ const f = P.current.getBoundingClientRect(), U = window.innerHeight - f.bottom;
414
+ R(U < 200);
751
415
  }
752
- }, [C]), ae(() => {
753
- C && U.current && U.current.focus();
754
- }, [C]);
755
- const B = (S) => {
756
- let O = S;
757
- if (S === "true" ? O = !0 : S === "false" && (O = !1), u) {
758
- const W = Z.includes(V(S));
759
- let Q;
760
- W ? Q = c.filter(
761
- (oe) => V(oe) !== V(S)
762
- ) : Q = [...c || [], O], s(Q);
416
+ }, [v]), W(() => {
417
+ v && B.current && B.current.focus();
418
+ }, [v]);
419
+ const _ = (f) => {
420
+ let A = f;
421
+ if (f === "true" ? A = !0 : f === "false" && (A = !1), u) {
422
+ const U = z.includes(Y(f));
423
+ let V;
424
+ U ? V = d.filter(
425
+ (X) => Y(X) !== Y(f)
426
+ ) : V = [...d || [], A], s(V);
763
427
  } else
764
- s(O), p(!1);
765
- M("");
766
- }, G = u ? h.filter((S) => x(S.value)).map((S) => S.label).join(", ") : (T = h.find((S) => x(S.value))) == null ? void 0 : T.label;
767
- return /* @__PURE__ */ e.jsxs("div", { className: f || "col-span-12", children: [
768
- /* @__PURE__ */ e.jsx(be, { label: N, required: y }),
769
- /* @__PURE__ */ e.jsxs("div", { className: `relative ${d}`, ref: L, children: [
428
+ s(A), h(!1);
429
+ j("");
430
+ }, F = u ? c.filter((f) => p(f.value)).map((f) => f.label).join(", ") : (C = c.find((f) => p(f.value))) == null ? void 0 : C.label;
431
+ return /* @__PURE__ */ e.jsxs("div", { className: m || "col-span-12", children: [
432
+ /* @__PURE__ */ e.jsx(ee, { label: k, required: M }),
433
+ /* @__PURE__ */ e.jsxs("div", { className: `relative ${l}`, ref: P, children: [
770
434
  /* @__PURE__ */ e.jsxs(
771
435
  "button",
772
436
  {
773
437
  type: "button",
774
- onClick: () => !t && p(!C),
775
- disabled: t,
438
+ onClick: () => !r && h(!v),
439
+ disabled: r,
776
440
  className: `w-full h-10 px-3 border border-gray-300 dark:border-gray-600 rounded-md text-left text-sm flex items-center justify-between
777
- ${G ? "dark:text-white" : "text-gray-500 dark:text-gray-400"}
778
- ${t ? "opacity-50 cursor-not-allowed" : "dark:bg-gray-700"}`,
441
+ ${F ? "dark:text-white" : "text-gray-500 dark:text-gray-400"}
442
+ ${r ? "opacity-50 cursor-not-allowed" : "dark:bg-gray-700"}`,
779
443
  children: [
780
- /* @__PURE__ */ e.jsx("span", { className: "truncate", children: G || i }),
444
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: F || i }),
781
445
  /* @__PURE__ */ e.jsx(
782
- dr,
446
+ Fe,
783
447
  {
784
- className: `w-4 h-4 transition-transform ${C ? "rotate-180" : ""}`
448
+ className: `w-4 h-4 transition-transform ${v ? "rotate-180" : ""}`
785
449
  }
786
450
  )
787
451
  ]
788
452
  }
789
453
  ),
790
- C && /* @__PURE__ */ e.jsxs(
454
+ v && /* @__PURE__ */ e.jsxs(
791
455
  "div",
792
456
  {
793
457
  className: `absolute z-50 w-full border rounded-md bg-white dark:bg-gray-700 shadow-lg
794
- ${R ? "bottom-full mb-1" : "top-full mt-1"}`,
458
+ ${S ? "bottom-full mb-1" : "top-full mt-1"}`,
795
459
  children: [
796
460
  n && /* @__PURE__ */ e.jsx("div", { className: "p-2 border-b border-gray-200 dark:border-gray-600", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
797
- /* @__PURE__ */ e.jsx(ze, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
461
+ /* @__PURE__ */ e.jsx(Ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
798
462
  /* @__PURE__ */ e.jsx(
799
463
  "input",
800
464
  {
801
- ref: U,
465
+ ref: B,
802
466
  type: "text",
803
- value: E,
804
- onChange: (S) => M(S.target.value),
467
+ value: N,
468
+ onChange: (f) => j(f.target.value),
805
469
  placeholder: "Search...",
806
470
  className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none"
807
471
  }
@@ -812,21 +476,21 @@ const Hr = ({
812
476
  {
813
477
  className: "max-h-40 overflow-y-auto",
814
478
  style: {
815
- maxHeight: g || ""
479
+ maxHeight: b || ""
816
480
  },
817
- children: $.length > 0 ? $.map((S) => /* @__PURE__ */ e.jsxs(
481
+ children: O.length > 0 ? O.map((f) => /* @__PURE__ */ e.jsxs(
818
482
  "button",
819
483
  {
820
484
  type: "button",
821
- onClick: () => B(String(S.value)),
485
+ onClick: () => _(String(f.value)),
822
486
  className: `w-full px-3 py-2 text-left text-sm flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-600
823
- ${x(S.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
487
+ ${p(f.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
824
488
  children: [
825
- /* @__PURE__ */ e.jsx("span", { children: S.label }),
826
- u && x(S.value) && /* @__PURE__ */ e.jsx(Fr, { className: "w-4 h-4" })
489
+ /* @__PURE__ */ e.jsx("span", { children: f.label }),
490
+ u && p(f.value) && /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4" })
827
491
  ]
828
492
  },
829
- String(S.value)
493
+ String(f.value)
830
494
  )) : /* @__PURE__ */ e.jsx("div", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No options found" })
831
495
  }
832
496
  )
@@ -834,27 +498,27 @@ const Hr = ({
834
498
  }
835
499
  )
836
500
  ] })
837
- ] }, v);
838
- }, Vr = ({
839
- value: h = !0,
840
- onChange: c,
501
+ ] }, x);
502
+ }, ta = ({
503
+ value: c = !0,
504
+ onChange: d,
841
505
  text: s,
842
506
  options: i = [],
843
- label: d,
844
- required: t,
507
+ label: l,
508
+ required: r,
845
509
  name: n = "",
846
- disabled: N = !1,
847
- parentClass: y = ""
510
+ disabled: k = !1,
511
+ parentClass: M = ""
848
512
  }) => {
849
- const v = i.length > 0 ? i : [
513
+ const x = i.length > 0 ? i : [
850
514
  { label: "Active", value: !0 },
851
515
  { label: "Inactive", value: !1 }
852
516
  ];
853
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: y || "col-span-12", children: [
854
- /* @__PURE__ */ e.jsx(be, { label: d, required: t }),
517
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: M || "col-span-12", children: [
518
+ /* @__PURE__ */ e.jsx(ee, { label: l, required: r }),
855
519
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between h-10 gap-4 bg-gray-100 dark:bg-gray-700 px-3 rounded-md border border-gray-100 dark:border-gray-600", children: [
856
520
  s && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]", children: s }),
857
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-6", children: v.map((f, u) => /* @__PURE__ */ e.jsxs(
521
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-6", children: x.map((m, u) => /* @__PURE__ */ e.jsxs(
858
522
  "label",
859
523
  {
860
524
  className: "flex items-center gap-2 cursor-pointer select-none",
@@ -864,22 +528,22 @@ const Hr = ({
864
528
  {
865
529
  type: "radio",
866
530
  name: "switch-field",
867
- required: t && u === 0,
868
- value: f.value,
869
- disabled: N,
870
- checked: h === f.value,
871
- onChange: () => c(f.value),
531
+ required: r && u === 0,
532
+ value: m.value,
533
+ disabled: k,
534
+ checked: c === m.value,
535
+ onChange: () => d(m.value),
872
536
  className: "w-4 h-4 border-gray-300 cursor-pointer"
873
537
  }
874
538
  ),
875
- /* @__PURE__ */ e.jsx("span", { className: "text-sm text-gray-700 dark:text-white", children: f.label })
539
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm text-gray-700 dark:text-white", children: m.label })
876
540
  ]
877
541
  },
878
542
  u
879
543
  )) })
880
544
  ] })
881
545
  ] }, n) });
882
- }, Fe = [
546
+ }, fe = [
883
547
  { label: "Afghanistan", code: "AF", phone: "93" },
884
548
  { label: "Aland Islands", code: "AX", phone: "358" },
885
549
  { label: "Albania", code: "AL", phone: "355" },
@@ -1131,62 +795,62 @@ const Hr = ({
1131
795
  { label: "Zambia", code: "ZM", phone: "260" },
1132
796
  { label: "Zimbabwe", code: "ZW", phone: "263" }
1133
797
  ];
1134
- function Wr({
1135
- label: h = "",
1136
- value: c = "",
798
+ function na({
799
+ label: c = "",
800
+ value: d = "",
1137
801
  name: s = "",
1138
802
  parentClass: i = "",
1139
- onChange: d,
1140
- disabled: t = !1,
803
+ onChange: l,
804
+ disabled: r = !1,
1141
805
  required: n = !1,
1142
- placeholder: N = "Phone number",
1143
- search: y = !1,
1144
- countriesList: v = !1,
1145
- defaultCountry: f = ""
806
+ placeholder: k = "Phone number",
807
+ search: M = !1,
808
+ countriesList: x = !1,
809
+ defaultCountry: m = ""
1146
810
  }) {
1147
- const u = (x) => Fe.find((B) => B.code == x), [g, C] = P(
1148
- u(f) || Fe[0]
1149
- ), [p, E] = P(""), [M, R] = P(!1), [w, L] = P(""), U = ke();
1150
- ae(() => {
1151
- if (typeof c == "string" && c.startsWith("+")) {
1152
- const x = Fe.filter((B) => c.startsWith("+" + B.phone)).sort((B, G) => G.phone.length - B.phone.length)[0];
1153
- if (x) {
1154
- C(x), E(c.replace("+" + x.phone, ""));
811
+ const u = (p) => fe.find((_) => _.code == p), [b, v] = T(
812
+ u(m) || fe[0]
813
+ ), [h, N] = T(""), [j, S] = T(!1), [R, P] = T(""), B = ce();
814
+ W(() => {
815
+ if (typeof d == "string" && d.startsWith("+")) {
816
+ const p = fe.filter((_) => d.startsWith("+" + _.phone)).sort((_, F) => F.phone.length - _.phone.length)[0];
817
+ if (p) {
818
+ v(p), N(d.replace("+" + p.phone, ""));
1155
819
  return;
1156
820
  }
1157
821
  }
1158
- E(c);
1159
- }, [c]);
1160
- const V = (x) => {
1161
- const B = x.target.value.replace(/\D/g, "");
1162
- E(B), g && d && d("+" + g.phone + B);
1163
- }, Z = (x) => {
1164
- C(x), d && d("+" + x.phone + p), R(!1), L("");
822
+ N(d);
823
+ }, [d]);
824
+ const Y = (p) => {
825
+ const _ = p.target.value.replace(/\D/g, "");
826
+ N(_), b && l && l("+" + b.phone + _);
827
+ }, z = (p) => {
828
+ v(p), l && l("+" + p.phone + h), S(!1), P("");
1165
829
  };
1166
- ae(() => {
1167
- const x = (B) => {
1168
- U.current && !U.current.contains(B.target) && R(!1);
830
+ W(() => {
831
+ const p = (_) => {
832
+ B.current && !B.current.contains(_.target) && S(!1);
1169
833
  };
1170
- return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
834
+ return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
1171
835
  }, []);
1172
- const $ = Fe.filter(
1173
- (x) => x.label.toLowerCase().includes(w.toLowerCase()) || x.phone.includes(w)
836
+ const O = fe.filter(
837
+ (p) => p.label.toLowerCase().includes(R.toLowerCase()) || p.phone.includes(R)
1174
838
  );
1175
- if (!v) {
1176
- const x = (B) => {
1177
- const G = B.target.value.replace(/[^+\d]/g, ""), T = G.startsWith("+") ? "+" + G.replace(/[+]/g, "").slice(0) : G;
1178
- d(T);
839
+ if (!x) {
840
+ const p = (_) => {
841
+ const F = _.target.value.replace(/[^+\d]/g, ""), C = F.startsWith("+") ? "+" + F.replace(/[+]/g, "").slice(0) : F;
842
+ l(C);
1179
843
  };
1180
844
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: i || "col-span-12", children: [
1181
- /* @__PURE__ */ e.jsx(be, { label: h, required: n }),
845
+ /* @__PURE__ */ e.jsx(ee, { label: c, required: n }),
1182
846
  /* @__PURE__ */ e.jsx(
1183
847
  "input",
1184
848
  {
1185
849
  type: "text",
1186
- value: c,
1187
- onChange: x,
1188
- placeholder: N,
1189
- disabled: t,
850
+ value: d,
851
+ onChange: p,
852
+ placeholder: k,
853
+ disabled: r,
1190
854
  required: n,
1191
855
  className: `w-full h-10 px-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md \r
1192
856
  bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none \r
@@ -1198,48 +862,48 @@ function Wr({
1198
862
  ] }, s) });
1199
863
  }
1200
864
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: i || "col-span-12", children: [
1201
- /* @__PURE__ */ e.jsx(be, { label: h, required: n }),
1202
- /* @__PURE__ */ e.jsxs("div", { className: "relative ", ref: U, children: [
865
+ /* @__PURE__ */ e.jsx(ee, { label: c, required: n }),
866
+ /* @__PURE__ */ e.jsxs("div", { className: "relative ", ref: B, children: [
1203
867
  /* @__PURE__ */ e.jsxs(
1204
868
  "div",
1205
869
  {
1206
870
  className: `h-[40px] flex items-center border rounded-md px-2 bg-white dark:bg-gray-700 transition-all
1207
- ${M ? "ring-0.5 ring-blue-100 border-blue-300" : "border-gray-300 dark:border-gray-600"}
1208
- ${t ? "opacity-60 cursor-not-allowed" : ""}`,
871
+ ${j ? "ring-0.5 ring-blue-100 border-blue-300" : "border-gray-300 dark:border-gray-600"}
872
+ ${r ? "opacity-60 cursor-not-allowed" : ""}`,
1209
873
  children: [
1210
874
  /* @__PURE__ */ e.jsxs(
1211
875
  "button",
1212
876
  {
1213
877
  type: "button",
1214
- disabled: t,
1215
- onClick: () => R(!M),
878
+ disabled: r,
879
+ onClick: () => S(!j),
1216
880
  className: "flex items-center gap-1 pr-2 border-r border-gray-300 dark:border-gray-700 focus:outline-none",
1217
881
  children: [
1218
- g ? /* @__PURE__ */ e.jsx(
882
+ b ? /* @__PURE__ */ e.jsx(
1219
883
  "img",
1220
884
  {
1221
- src: `https://flagcdn.com/w20/${g.code.toLowerCase()}.png`,
1222
- alt: g.code,
885
+ src: `https://flagcdn.com/w20/${b.code.toLowerCase()}.png`,
886
+ alt: b.code,
1223
887
  className: "w-5 h-3 object-cover"
1224
888
  }
1225
889
  ) : /* @__PURE__ */ e.jsx("span", { className: "text-gray-400 text-xs", children: "🌐" }),
1226
- /* @__PURE__ */ e.jsx(dr, { className: "w-3 h-3 text-gray-500" })
890
+ /* @__PURE__ */ e.jsx(Fe, { className: "w-3 h-3 text-gray-500" })
1227
891
  ]
1228
892
  }
1229
893
  ),
1230
- g && /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
894
+ b && /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
1231
895
  "+",
1232
- g.phone
896
+ b.phone
1233
897
  ] }),
1234
898
  /* @__PURE__ */ e.jsx(
1235
899
  "input",
1236
900
  {
1237
901
  type: "tel",
1238
- value: p,
1239
- onChange: V,
902
+ value: h,
903
+ onChange: Y,
1240
904
  required: n,
1241
- disabled: t || !g,
1242
- placeholder: g ? N : "Select a country",
905
+ disabled: r || !b,
906
+ placeholder: b ? k : "Select a country",
1243
907
  className: "flex-1 ml-2 bg-transparent outline-none text-sm text-gray-800 dark:text-gray-100 placeholder-gray-400"
1244
908
  }
1245
909
  ),
@@ -1250,7 +914,7 @@ function Wr({
1250
914
  required: n,
1251
915
  tabIndex: -1,
1252
916
  readOnly: !0,
1253
- value: g && p ? "+" + g.phone + p : "",
917
+ value: b && h ? "+" + b.phone + h : "",
1254
918
  style: {
1255
919
  position: "absolute",
1256
920
  opacity: 0,
@@ -1262,62 +926,62 @@ function Wr({
1262
926
  ]
1263
927
  }
1264
928
  ),
1265
- M && /* @__PURE__ */ e.jsxs("div", { className: "absolute top-full left-0 w-full mt-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-700 shadow-lg z-50 max-h-60 overflow-y-auto", children: [
1266
- y && /* @__PURE__ */ e.jsx("div", { className: "p-2 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1267
- /* @__PURE__ */ e.jsx(ze, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400" }),
929
+ j && /* @__PURE__ */ e.jsxs("div", { className: "absolute top-full left-0 w-full mt-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-700 shadow-lg z-50 max-h-60 overflow-y-auto", children: [
930
+ M && /* @__PURE__ */ e.jsx("div", { className: "p-2 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
931
+ /* @__PURE__ */ e.jsx(Ce, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400" }),
1268
932
  /* @__PURE__ */ e.jsx(
1269
933
  "input",
1270
934
  {
1271
935
  type: "text",
1272
- value: w,
1273
- onChange: (x) => L(x.target.value),
936
+ value: R,
937
+ onChange: (p) => P(p.target.value),
1274
938
  placeholder: "Search country...",
1275
939
  className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none "
1276
940
  }
1277
941
  )
1278
942
  ] }) }),
1279
- $.map((x) => /* @__PURE__ */ e.jsxs(
943
+ O.map((p) => /* @__PURE__ */ e.jsxs(
1280
944
  "button",
1281
945
  {
1282
946
  type: "button",
1283
- onClick: () => Z(x),
947
+ onClick: () => z(p),
1284
948
  className: "w-full flex items-center gap-2 px-2 py-1 text-sm hover:bg-blue-50 dark:hover:bg-gray-700 text-gray-800 dark:text-gray-100",
1285
949
  children: [
1286
950
  /* @__PURE__ */ e.jsx(
1287
951
  "img",
1288
952
  {
1289
- src: `https://flagcdn.com/w20/${x.code.toLowerCase()}.png`,
1290
- alt: x.code,
953
+ src: `https://flagcdn.com/w20/${p.code.toLowerCase()}.png`,
954
+ alt: p.code,
1291
955
  className: "w-5 h-3 object-cover"
1292
956
  }
1293
957
  ),
1294
958
  /* @__PURE__ */ e.jsxs("span", { children: [
1295
- x.label,
959
+ p.label,
1296
960
  " (+",
1297
- x.phone,
961
+ p.phone,
1298
962
  ")"
1299
963
  ] })
1300
964
  ]
1301
965
  },
1302
- x.code
966
+ p.code
1303
967
  ))
1304
968
  ] })
1305
969
  ] })
1306
970
  ] }, s) });
1307
971
  }
1308
- const hr = Oe.forwardRef(
1309
- ({ className: h = "", label: c, required: s, ...i }, d) => {
1310
- const t = `
972
+ const Ie = ve.forwardRef(
973
+ ({ className: c = "", label: d, required: s, ...i }, l) => {
974
+ const r = `
1311
975
  placeholder-gray-400 dark:placeholder-gray-400
1312
- ${h}
976
+ ${c}
1313
977
  `.trim();
1314
978
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: i.parentClass || "col-span-12", children: [
1315
- /* @__PURE__ */ e.jsx(be, { label: c, required: s }),
979
+ /* @__PURE__ */ e.jsx(ee, { label: d, required: s }),
1316
980
  /* @__PURE__ */ e.jsx("div", { className: "relative", children: /* @__PURE__ */ e.jsx(
1317
981
  "textarea",
1318
982
  {
1319
- className: t,
1320
- ref: d,
983
+ className: r,
984
+ ref: l,
1321
985
  required: s,
1322
986
  ...i
1323
987
  }
@@ -1325,45 +989,45 @@ const hr = Oe.forwardRef(
1325
989
  ] }, i.name) });
1326
990
  }
1327
991
  );
1328
- hr.displayName = "TextArea";
1329
- const qr = ({
1330
- label: h = "",
1331
- value: c = null,
992
+ Ie.displayName = "TextArea";
993
+ const la = ({
994
+ label: c = "",
995
+ value: d = null,
1332
996
  onChange: s,
1333
997
  required: i = !1,
1334
- accept: d = "image/*",
1335
- id: t,
998
+ accept: l = "image/*",
999
+ id: r,
1336
1000
  dragDrop: n = !1,
1337
- name: N = "",
1338
- parentClass: y = ""
1001
+ name: k = "",
1002
+ parentClass: M = ""
1339
1003
  }) => {
1340
- const [v, f] = P(c), [u, g] = P(!1), C = ke(null);
1341
- ae(() => {
1342
- f(c);
1343
- }, [c]);
1344
- const p = (w) => {
1345
- if (!w || w.length === 0) {
1346
- f(null), s == null || s(null);
1004
+ const [x, m] = T(d), [u, b] = T(!1), v = ce(null);
1005
+ W(() => {
1006
+ m(d);
1007
+ }, [d]);
1008
+ const h = (R) => {
1009
+ if (!R || R.length === 0) {
1010
+ m(null), s == null || s(null);
1347
1011
  return;
1348
1012
  }
1349
- const L = w[0], U = URL.createObjectURL(L);
1350
- f({ file: L, preview: U }), s == null || s(U);
1351
- }, E = (w) => {
1352
- n && (w.preventDefault(), g(!0));
1353
- }, M = (w) => {
1354
- n && (w.preventDefault(), g(!1));
1355
- }, R = (w) => {
1356
- n && (w.preventDefault(), g(!1), p(w.dataTransfer.files));
1013
+ const P = R[0], B = URL.createObjectURL(P);
1014
+ m({ file: P, preview: B }), s == null || s(B);
1015
+ }, N = (R) => {
1016
+ n && (R.preventDefault(), b(!0));
1017
+ }, j = (R) => {
1018
+ n && (R.preventDefault(), b(!1));
1019
+ }, S = (R) => {
1020
+ n && (R.preventDefault(), b(!1), h(R.dataTransfer.files));
1357
1021
  };
1358
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: y || "col-span-12", children: [
1359
- /* @__PURE__ */ e.jsx(be, { label: h, required: i }),
1022
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: M || "col-span-12", children: [
1023
+ /* @__PURE__ */ e.jsx(ee, { label: c, required: i }),
1360
1024
  /* @__PURE__ */ e.jsxs(
1361
1025
  "div",
1362
1026
  {
1363
1027
  className: `relative rounded-md p-2 transition-all ${u ? "border border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900" : "border bg-gray-50 dark:bg-gray-700"}`,
1364
- onDragOver: E,
1365
- onDragLeave: M,
1366
- onDrop: R,
1028
+ onDragOver: N,
1029
+ onDragLeave: j,
1030
+ onDrop: S,
1367
1031
  children: [
1368
1032
  /* @__PURE__ */ e.jsxs(
1369
1033
  "div",
@@ -1374,16 +1038,16 @@ const qr = ({
1374
1038
  "div",
1375
1039
  {
1376
1040
  className: "cursor-pointer",
1377
- onClick: () => C.current.click(),
1378
- children: v ? /* @__PURE__ */ e.jsx(
1041
+ onClick: () => v.current.click(),
1042
+ children: x ? /* @__PURE__ */ e.jsx(
1379
1043
  "img",
1380
1044
  {
1381
- src: v.preview || v,
1045
+ src: x.preview || x,
1382
1046
  alt: "preview",
1383
1047
  className: "object-cover w-20 h-20 rounded-full"
1384
1048
  }
1385
1049
  ) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-gray-200 dark:bg-gray-800 h-20 w-20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(
1386
- He,
1050
+ Re,
1387
1051
  {
1388
1052
  icon: "ri:image-add-fill",
1389
1053
  className: "text-gray-400 w-10 h-10"
@@ -1394,12 +1058,12 @@ const qr = ({
1394
1058
  /* @__PURE__ */ e.jsx(
1395
1059
  "input",
1396
1060
  {
1397
- ref: C,
1398
- id: t,
1061
+ ref: v,
1062
+ id: r,
1399
1063
  type: "file",
1400
- accept: d,
1401
- onChange: (w) => p(w.target.files),
1402
- required: i && !v,
1064
+ accept: l,
1065
+ onChange: (R) => h(R.target.files),
1066
+ required: i && !x,
1403
1067
  className: "inline-flex items-center justify-center p-2 text-gray-400 text-sm file:cursor-pointer"
1404
1068
  }
1405
1069
  )
@@ -1410,49 +1074,49 @@ const qr = ({
1410
1074
  ]
1411
1075
  }
1412
1076
  )
1413
- ] }, N) });
1414
- }, br = Oe.forwardRef(
1077
+ ] }, k) });
1078
+ }, Be = ve.forwardRef(
1415
1079
  ({
1416
- label: h,
1417
- required: c,
1080
+ label: c,
1081
+ required: d,
1418
1082
  parentClass: s = "",
1419
1083
  className: i = "",
1420
- type: d = "text",
1421
- onKeyDown: t,
1084
+ type: l = "text",
1085
+ onKeyDown: r,
1422
1086
  ...n
1423
- }, N) => {
1424
- const [y, v] = P(!1), f = (g) => {
1425
- d === "number" && ["e", "E"].includes(g.key) && g.preventDefault(), t == null || t(g);
1087
+ }, k) => {
1088
+ const [M, x] = T(!1), m = (b) => {
1089
+ l === "number" && ["e", "E"].includes(b.key) && b.preventDefault(), r == null || r(b);
1426
1090
  }, u = `
1427
1091
  h-10 placeholder-gray-400 dark:placeholder-gray-400
1428
- ${d === "password" ? "pr-10" : ""}
1092
+ ${l === "password" ? "pr-10" : ""}
1429
1093
  ${i}
1430
1094
  `.trim();
1431
1095
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: s || "col-span-12", children: [
1432
- /* @__PURE__ */ e.jsx(be, { label: h, required: c }),
1096
+ /* @__PURE__ */ e.jsx(ee, { label: c, required: d }),
1433
1097
  /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1434
1098
  /* @__PURE__ */ e.jsx(
1435
1099
  "input",
1436
1100
  {
1437
- type: d === "password" && y ? "text" : d,
1438
- ref: N,
1439
- required: c,
1440
- onKeyDown: f,
1101
+ type: l === "password" && M ? "text" : l,
1102
+ ref: k,
1103
+ required: d,
1104
+ onKeyDown: m,
1441
1105
  className: u,
1442
1106
  ...n
1443
1107
  }
1444
1108
  ),
1445
- d === "password" && /* @__PURE__ */ e.jsx(
1109
+ l === "password" && /* @__PURE__ */ e.jsx(
1446
1110
  "button",
1447
1111
  {
1448
1112
  type: "button",
1449
1113
  tabIndex: -1,
1450
- onClick: () => v((g) => !g),
1114
+ onClick: () => x((b) => !b),
1451
1115
  className: "absolute inset-y-0 right-3 flex items-center text-gray-400 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-200",
1452
1116
  children: /* @__PURE__ */ e.jsx(
1453
- He,
1117
+ Re,
1454
1118
  {
1455
- icon: y ? "mdi:eye-off-outline" : "mdi:eye-outline",
1119
+ icon: M ? "mdi:eye-off-outline" : "mdi:eye-outline",
1456
1120
  className: "w-5 h-5"
1457
1121
  }
1458
1122
  )
@@ -1462,28 +1126,28 @@ const qr = ({
1462
1126
  ] }, n.name) });
1463
1127
  }
1464
1128
  );
1465
- br.displayName = "Input";
1466
- const Jr = ({
1467
- key: h,
1468
- editorKey: c = "",
1129
+ Be.displayName = "Input";
1130
+ const sa = ({
1131
+ key: c,
1132
+ editorKey: d = "",
1469
1133
  value: s = "",
1470
1134
  onChange: i,
1471
- label: d = "",
1472
- required: t = !1,
1135
+ label: l = "",
1136
+ required: r = !1,
1473
1137
  placeholder: n = "",
1474
- parentClass: N = "col-span-12",
1475
- height: y = 400,
1476
- inline: v = !1,
1477
- disabled: f = !1,
1138
+ parentClass: k = "col-span-12",
1139
+ height: M = 400,
1140
+ inline: x = !1,
1141
+ disabled: m = !1,
1478
1142
  plugins: u,
1479
- toolbar: g,
1480
- menubar: C = !1,
1481
- fontFamily: p = "Inter, sans-serif",
1482
- initConfig: E = {},
1483
- imageUploadHandler: M
1143
+ toolbar: b,
1144
+ menubar: v = !1,
1145
+ fontFamily: h = "Inter, sans-serif",
1146
+ initConfig: N = {},
1147
+ imageUploadHandler: j
1484
1148
  // ✅ Promise function passed from parent
1485
1149
  }) => {
1486
- const R = [
1150
+ const S = [
1487
1151
  "advlist",
1488
1152
  "autolink",
1489
1153
  "lists",
@@ -1501,307 +1165,307 @@ const Jr = ({
1501
1165
  "table",
1502
1166
  "help",
1503
1167
  "wordcount"
1504
- ], w = "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview", L = (U) => new Promise((V, Z) => {
1505
- if (!M) {
1506
- V(`data:${U.blob().type};base64,${U.base64()}`);
1168
+ ], R = "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview", P = (B) => new Promise((Y, z) => {
1169
+ if (!j) {
1170
+ Y(`data:${B.blob().type};base64,${B.base64()}`);
1507
1171
  return;
1508
1172
  }
1509
- M(U).then(($) => {
1510
- $ ? V($) : Z("Upload failed: No URL returned");
1511
- }).catch(($) => {
1512
- Z(
1513
- typeof $ == "string" ? $ : ($ == null ? void 0 : $.message) || "Image upload failed"
1173
+ j(B).then((O) => {
1174
+ O ? Y(O) : z("Upload failed: No URL returned");
1175
+ }).catch((O) => {
1176
+ z(
1177
+ typeof O == "string" ? O : (O == null ? void 0 : O.message) || "Image upload failed"
1514
1178
  );
1515
1179
  });
1516
1180
  });
1517
- return /* @__PURE__ */ e.jsxs("div", { className: N, children: [
1518
- d && /* @__PURE__ */ e.jsx(be, { label: d, required: t }),
1181
+ return /* @__PURE__ */ e.jsxs("div", { className: k, children: [
1182
+ l && /* @__PURE__ */ e.jsx(ee, { label: l, required: r }),
1519
1183
  /* @__PURE__ */ e.jsx(
1520
- Gr,
1184
+ Ze,
1521
1185
  {
1522
- apiKey: c,
1186
+ apiKey: d,
1523
1187
  value: s,
1524
- disabled: f,
1188
+ disabled: m,
1525
1189
  init: {
1526
- height: y,
1527
- inline: v,
1528
- menubar: C,
1190
+ height: M,
1191
+ inline: x,
1192
+ menubar: v,
1529
1193
  branding: !1,
1530
1194
  statusbar: !0,
1531
1195
  automatic_uploads: !0,
1532
- images_upload_handler: L,
1533
- plugins: u ?? R,
1534
- toolbar: g ?? w,
1196
+ images_upload_handler: P,
1197
+ plugins: u ?? S,
1198
+ toolbar: b ?? R,
1535
1199
  placeholder: n,
1536
1200
  content_style: `
1537
1201
  body {
1538
- font-family: ${p};
1202
+ font-family: ${h};
1539
1203
  }
1540
1204
  `,
1541
- ...E
1205
+ ...N
1542
1206
  },
1543
- onEditorChange: (U) => {
1544
- i && i(U);
1207
+ onEditorChange: (B) => {
1208
+ i && i(B);
1545
1209
  }
1546
1210
  }
1547
1211
  )
1548
- ] }, h);
1549
- }, Zr = ({
1550
- name: h = "",
1551
- label: c = "",
1212
+ ] }, c);
1213
+ }, oa = ({
1214
+ name: c = "",
1215
+ label: d = "",
1552
1216
  // label for single checkbox
1553
1217
  options: s = [],
1554
1218
  // array of { label, value } for multiple
1555
1219
  value: i = null,
1556
1220
  // boolean for single, array for multiple, or string for single select
1557
- onChange: d,
1558
- disabled: t = !1,
1221
+ onChange: l,
1222
+ disabled: r = !1,
1559
1223
  required: n = !1,
1560
- parentClass: N = "col-span-12",
1561
- className: y = "",
1562
- multiSelect: v = !1
1224
+ parentClass: k = "col-span-12",
1225
+ className: M = "",
1226
+ multiSelect: x = !1
1563
1227
  // ✅ if true, only one option can be selected (like radio)
1564
1228
  }) => {
1565
- const f = Array.isArray(s) && s.length > 0, u = (p) => f ? v ? Array.isArray(i) && i.includes(p) : i === p : !!i, g = (p) => {
1566
- d == null || d(p.target.checked, h);
1567
- }, C = (p, E) => {
1568
- if (d)
1569
- if (!v)
1570
- d(E ? p : "", h);
1229
+ const m = Array.isArray(s) && s.length > 0, u = (h) => m ? x ? Array.isArray(i) && i.includes(h) : i === h : !!i, b = (h) => {
1230
+ l == null || l(h.target.checked, c);
1231
+ }, v = (h, N) => {
1232
+ if (l)
1233
+ if (!x)
1234
+ l(N ? h : "", c);
1571
1235
  else {
1572
- const M = Array.isArray(i) ? [...i] : [];
1573
- if (E)
1574
- M.includes(p) || M.push(p);
1236
+ const j = Array.isArray(i) ? [...i] : [];
1237
+ if (N)
1238
+ j.includes(h) || j.push(h);
1575
1239
  else {
1576
- const R = M.indexOf(p);
1577
- R > -1 && M.splice(R, 1);
1240
+ const S = j.indexOf(h);
1241
+ S > -1 && j.splice(S, 1);
1578
1242
  }
1579
- d(M, h);
1243
+ l(j, c);
1580
1244
  }
1581
1245
  };
1582
- return f ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: `${N}`, children: [
1583
- /* @__PURE__ */ e.jsx(be, { label: c, required: n }),
1584
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-y-2", children: s.map((p, E) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1246
+ return m ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: `${k}`, children: [
1247
+ /* @__PURE__ */ e.jsx(ee, { label: d, required: n }),
1248
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-y-2", children: s.map((h, N) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1585
1249
  /* @__PURE__ */ e.jsx(
1586
1250
  "input",
1587
1251
  {
1588
1252
  type: "checkbox",
1589
- name: h,
1590
- value: p.value,
1591
- checked: u(p.value),
1592
- disabled: t || p.disabled,
1593
- required: n && E === 0,
1594
- onChange: (M) => C(p.value, M.target.checked),
1595
- className: `h-4 w-4 cursor-pointer text-blue-600 border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${y}`
1253
+ name: c,
1254
+ value: h.value,
1255
+ checked: u(h.value),
1256
+ disabled: r || h.disabled,
1257
+ required: n && N === 0,
1258
+ onChange: (j) => v(h.value, j.target.checked),
1259
+ className: `h-4 w-4 cursor-pointer text-blue-600 border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${M}`
1596
1260
  },
1597
- h
1261
+ c
1598
1262
  ),
1599
- p.label && /* @__PURE__ */ e.jsx(
1263
+ h.label && /* @__PURE__ */ e.jsx(
1600
1264
  "label",
1601
1265
  {
1602
- htmlFor: h,
1266
+ htmlFor: c,
1603
1267
  className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
1604
- children: p.label
1268
+ children: h.label
1605
1269
  }
1606
1270
  )
1607
- ] }, p.value || p.label)) })
1608
- ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: `flex items-center ${N}`, children: [
1271
+ ] }, h.value || h.label)) })
1272
+ ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: `flex items-center ${k}`, children: [
1609
1273
  /* @__PURE__ */ e.jsx(
1610
1274
  "input",
1611
1275
  {
1612
1276
  type: "checkbox",
1613
- name: h,
1277
+ name: c,
1614
1278
  checked: u(),
1615
- disabled: t,
1279
+ disabled: r,
1616
1280
  required: n,
1617
- onChange: g,
1618
- className: `h-4 w-4 text-blue-600 cursor-pointer border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${y}`
1281
+ onChange: b,
1282
+ className: `h-4 w-4 text-blue-600 cursor-pointer border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${M}`
1619
1283
  }
1620
1284
  ),
1621
- c && /* @__PURE__ */ e.jsx(
1285
+ d && /* @__PURE__ */ e.jsx(
1622
1286
  "label",
1623
1287
  {
1624
- htmlFor: h,
1288
+ htmlFor: c,
1625
1289
  className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
1626
- children: c
1290
+ children: d
1627
1291
  }
1628
1292
  )
1629
1293
  ] });
1630
- }, pr = ({ field: h, formData: c, handleChange: s }) => {
1294
+ }, $e = ({ field: c, formData: d, handleChange: s }) => {
1631
1295
  const {
1632
1296
  key: i,
1633
- label: d,
1634
- type: t,
1297
+ label: l,
1298
+ type: r,
1635
1299
  options: n,
1636
- placeholder: N,
1637
- rows: y,
1638
- inputClass: v,
1639
- search: f,
1300
+ placeholder: k,
1301
+ rows: M,
1302
+ inputClass: x,
1303
+ search: m,
1640
1304
  accept: u,
1641
- text: g,
1642
- required: C = !1,
1643
- minLength: p,
1644
- dragDrop: E,
1645
- parentClass: M,
1646
- countriesList: R,
1647
- defaultCountry: w,
1648
- multiple: L,
1649
- dropdownMaxHeight: U,
1650
- editorKey: V,
1651
- fontFamily: Z,
1652
- disabled: $
1653
- } = h;
1654
- let x = c == null ? void 0 : c[i];
1655
- x == null && (x = "");
1656
- const B = N || (t === "select" ? `Select ${d}` : `Enter ${d}`), G = "w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-sm focus:outline-none focus:ring-1 focus:ring-blue-200 bg-white text-black dark:bg-gray-700 dark:text-white";
1657
- switch (t) {
1305
+ text: b,
1306
+ required: v = !1,
1307
+ minLength: h,
1308
+ dragDrop: N,
1309
+ parentClass: j,
1310
+ countriesList: S,
1311
+ defaultCountry: R,
1312
+ multiple: P,
1313
+ dropdownMaxHeight: B,
1314
+ editorKey: Y,
1315
+ fontFamily: z,
1316
+ disabled: O
1317
+ } = c;
1318
+ let p = d == null ? void 0 : d[i];
1319
+ p == null && (p = "");
1320
+ const _ = k || (r === "select" ? `Select ${l}` : `Enter ${l}`), F = "w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-sm focus:outline-none focus:ring-1 focus:ring-blue-200 bg-white text-black dark:bg-gray-700 dark:text-white";
1321
+ switch (r) {
1658
1322
  case "select":
1659
1323
  return /* @__PURE__ */ e.jsx(
1660
- Hr,
1324
+ ra,
1661
1325
  {
1662
1326
  options: n || [],
1663
- value: x,
1664
- onChange: (T) => s(i, T),
1665
- placeholder: B,
1666
- className: v || "",
1667
- search: f,
1668
- required: C,
1669
- label: d,
1327
+ value: p,
1328
+ onChange: (C) => s(i, C),
1329
+ placeholder: _,
1330
+ className: x || "",
1331
+ search: m,
1332
+ required: v,
1333
+ label: l,
1670
1334
  name: i,
1671
- disabled: $,
1672
- parentClass: M,
1673
- multiple: L,
1674
- dropdownMaxHeight: U
1335
+ disabled: O,
1336
+ parentClass: j,
1337
+ multiple: P,
1338
+ dropdownMaxHeight: B
1675
1339
  }
1676
1340
  );
1677
1341
  case "checkbox":
1678
1342
  return /* @__PURE__ */ e.jsx(
1679
- Zr,
1343
+ oa,
1680
1344
  {
1681
1345
  name: i,
1682
- label: d,
1346
+ label: l,
1683
1347
  options: n || [],
1684
- value: x,
1685
- onChange: (T) => s(i, T),
1686
- required: C,
1687
- parentClass: M,
1688
- className: v || "",
1689
- multiSelect: L,
1690
- disabled: $
1348
+ value: p,
1349
+ onChange: (C) => s(i, C),
1350
+ required: v,
1351
+ parentClass: j,
1352
+ className: x || "",
1353
+ multiSelect: P,
1354
+ disabled: O
1691
1355
  }
1692
1356
  );
1693
1357
  case "switch":
1694
1358
  return /* @__PURE__ */ e.jsx(
1695
- Vr,
1359
+ ta,
1696
1360
  {
1697
- value: x,
1698
- onChange: (T) => s(i, T),
1699
- text: g,
1361
+ value: p,
1362
+ onChange: (C) => s(i, C),
1363
+ text: b,
1700
1364
  options: n || [],
1701
- label: d,
1702
- required: C,
1365
+ label: l,
1366
+ required: v,
1703
1367
  name: i,
1704
- disabled: $,
1705
- parentClass: M
1368
+ disabled: O,
1369
+ parentClass: j
1706
1370
  }
1707
1371
  );
1708
1372
  case "phone":
1709
1373
  return /* @__PURE__ */ e.jsx(
1710
- Wr,
1374
+ na,
1711
1375
  {
1712
- value: x,
1713
- onChange: (T) => s(i, T),
1714
- countriesList: R,
1715
- defaultCountry: w,
1716
- required: C,
1717
- placeholder: B,
1718
- search: f,
1719
- label: d,
1376
+ value: p,
1377
+ onChange: (C) => s(i, C),
1378
+ countriesList: S,
1379
+ defaultCountry: R,
1380
+ required: v,
1381
+ placeholder: _,
1382
+ search: m,
1383
+ label: l,
1720
1384
  name: i,
1721
- disabled: $,
1722
- parentClass: M
1385
+ disabled: O,
1386
+ parentClass: j
1723
1387
  }
1724
1388
  );
1725
1389
  case "textarea":
1726
1390
  return /* @__PURE__ */ e.jsx(
1727
- hr,
1391
+ Ie,
1728
1392
  {
1729
- value: x,
1730
- onChange: (T) => s(i, T.target.value),
1731
- placeholder: B,
1732
- rows: y || 3,
1733
- className: `${G} ${v || ""}`,
1734
- required: C,
1393
+ value: p,
1394
+ onChange: (C) => s(i, C.target.value),
1395
+ placeholder: _,
1396
+ rows: M || 3,
1397
+ className: `${F} ${x || ""}`,
1398
+ required: v,
1735
1399
  name: i,
1736
- label: d,
1737
- disabled: $,
1738
- parentClass: M
1400
+ label: l,
1401
+ disabled: O,
1402
+ parentClass: j
1739
1403
  }
1740
1404
  );
1741
1405
  case "image":
1742
1406
  return /* @__PURE__ */ e.jsx(
1743
- qr,
1407
+ la,
1744
1408
  {
1745
- value: x,
1746
- onChange: (T) => s(i, T),
1747
- required: C,
1409
+ value: p,
1410
+ onChange: (C) => s(i, C),
1411
+ required: v,
1748
1412
  accept: u || "image/*",
1749
1413
  id: `file-${i}`,
1750
- dragDrop: E,
1751
- label: d,
1414
+ dragDrop: N,
1415
+ label: l,
1752
1416
  name: i,
1753
- parentClass: M
1417
+ parentClass: j
1754
1418
  }
1755
1419
  );
1756
1420
  case "tinyEditor":
1757
1421
  return /* @__PURE__ */ e.jsx(
1758
- Jr,
1422
+ sa,
1759
1423
  {
1760
- value: x,
1761
- onChange: (T) => s(i, T),
1762
- required: C,
1763
- placeholder: B,
1764
- label: d,
1765
- parentClass: M,
1766
- fontFamily: Z,
1767
- editorKey: V,
1768
- disabled: $
1424
+ value: p,
1425
+ onChange: (C) => s(i, C),
1426
+ required: v,
1427
+ placeholder: _,
1428
+ label: l,
1429
+ parentClass: j,
1430
+ fontFamily: z,
1431
+ editorKey: Y,
1432
+ disabled: O
1769
1433
  },
1770
1434
  `editor-${i}`
1771
1435
  );
1772
1436
  default:
1773
1437
  return /* @__PURE__ */ e.jsx(
1774
- br,
1438
+ Be,
1775
1439
  {
1776
- type: t || "text",
1777
- value: x,
1778
- onChange: (T) => s(i, T.target.value),
1779
- placeholder: B,
1780
- className: `${G} ${v || ""}`,
1781
- required: C,
1440
+ type: r || "text",
1441
+ value: p,
1442
+ onChange: (C) => s(i, C.target.value),
1443
+ placeholder: _,
1444
+ className: `${F} ${x || ""}`,
1445
+ required: v,
1782
1446
  name: i,
1783
- minLength: p,
1784
- label: d,
1785
- parentClass: M,
1786
- disabled: $
1447
+ minLength: h,
1448
+ label: l,
1449
+ parentClass: j,
1450
+ disabled: O
1787
1451
  }
1788
1452
  );
1789
1453
  }
1790
- }, Xr = ({ isOpen: h, onClose: c, config: s, onApply: i }) => {
1791
- var v;
1792
- const [d, t] = P({}), n = (f, u) => {
1793
- t((g) => ({ ...g, [f]: u }));
1794
- }, N = () => {
1795
- i == null || i(d), c();
1796
- }, y = () => {
1797
- t({}), i == null || i({}), c();
1454
+ }, ia = ({ isOpen: c, onClose: d, config: s, onApply: i }) => {
1455
+ var x;
1456
+ const [l, r] = T({}), n = (m, u) => {
1457
+ r((b) => ({ ...b, [m]: u }));
1458
+ }, k = () => {
1459
+ i == null || i(l), d();
1460
+ }, M = () => {
1461
+ r({}), i == null || i({}), d();
1798
1462
  };
1799
1463
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1800
1464
  /* @__PURE__ */ e.jsx(
1801
1465
  "div",
1802
1466
  {
1803
- className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${h ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
1804
- onClick: c
1467
+ className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${c ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
1468
+ onClick: d
1805
1469
  }
1806
1470
  ),
1807
1471
  /* @__PURE__ */ e.jsxs(
@@ -1809,7 +1473,7 @@ const Jr = ({
1809
1473
  {
1810
1474
  className: `fixed top-0 right-0 h-full w-[28rem] bg-white dark:bg-gray-900 shadow-2xl z-50 flex flex-col border-l border-gray-200 dark:border-gray-700
1811
1475
  transform transition-transform duration-300 ease-in-out
1812
- ${h ? "translate-x-0" : "translate-x-full"}
1476
+ ${c ? "translate-x-0" : "translate-x-full"}
1813
1477
  `,
1814
1478
  children: [
1815
1479
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
@@ -1817,26 +1481,26 @@ const Jr = ({
1817
1481
  /* @__PURE__ */ e.jsx(
1818
1482
  "button",
1819
1483
  {
1820
- onClick: c,
1484
+ onClick: d,
1821
1485
  className: "p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition",
1822
- children: /* @__PURE__ */ e.jsx(Ae, { className: "w-5 h-5 text-gray-500 dark:text-gray-400" })
1486
+ children: /* @__PURE__ */ e.jsx(je, { className: "w-5 h-5 text-gray-500 dark:text-gray-400" })
1823
1487
  }
1824
1488
  )
1825
1489
  ] }),
1826
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: s != null && s.component ? /* @__PURE__ */ e.jsx(s.component, { filters: d, onFilterChange: n }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: (v = s == null ? void 0 : s.fields) == null ? void 0 : v.map((f) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
1827
- pr,
1490
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: s != null && s.component ? /* @__PURE__ */ e.jsx(s.component, { filters: l, onFilterChange: n }) : /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: (x = s == null ? void 0 : s.fields) == null ? void 0 : x.map((m) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
1491
+ $e,
1828
1492
  {
1829
- field: f,
1830
- formData: d,
1493
+ field: m,
1494
+ formData: l,
1831
1495
  handleChange: n
1832
1496
  },
1833
- f.key
1497
+ m.key
1834
1498
  ) })) }) }),
1835
1499
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 px-4 py-3 border-t border-gray-200 dark:border-gray-700", children: [
1836
1500
  /* @__PURE__ */ e.jsx(
1837
- Me,
1501
+ he,
1838
1502
  {
1839
- onClick: N,
1503
+ onClick: k,
1840
1504
  variant: "contained",
1841
1505
  color: "primary",
1842
1506
  fullWidth: !0,
@@ -1844,9 +1508,9 @@ const Jr = ({
1844
1508
  }
1845
1509
  ),
1846
1510
  /* @__PURE__ */ e.jsx(
1847
- Me,
1511
+ he,
1848
1512
  {
1849
- onClick: y,
1513
+ onClick: M,
1850
1514
  variant: "contained",
1851
1515
  className: "min-w-[150px]",
1852
1516
  children: "Reset"
@@ -1857,7 +1521,7 @@ const Jr = ({
1857
1521
  }
1858
1522
  )
1859
1523
  ] });
1860
- }, or = {
1524
+ }, Ae = {
1861
1525
  blue: {
1862
1526
  bg: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",
1863
1527
  border: "border border-blue-300 text-blue-700 dark:border-blue-700 dark:text-blue-300"
@@ -1886,76 +1550,76 @@ const Jr = ({
1886
1550
  bg: "bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300",
1887
1551
  border: "border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-300"
1888
1552
  }
1889
- }, sr = {
1553
+ }, Pe = {
1890
1554
  contained: "bg",
1891
1555
  outline: "border !bg-transparent",
1892
1556
  soft: "bg opacity-90"
1893
- }, gr = ({
1894
- label: h,
1895
- variant: c = "contained",
1557
+ }, Ge = ({
1558
+ label: c,
1559
+ variant: d = "contained",
1896
1560
  // contained | outline | soft
1897
1561
  color: s = "green",
1898
1562
  className: i = ""
1899
1563
  }) => {
1900
- const d = or[s] || or.green, t = sr[c] || sr.contained, n = c === "outline" ? d.border : d.bg;
1564
+ const l = Ae[s] || Ae.green, r = Pe[d] || Pe.contained, n = d === "outline" ? l.border : l.bg;
1901
1565
  return /* @__PURE__ */ e.jsx(
1902
1566
  "span",
1903
1567
  {
1904
1568
  className: `inline-flex justify-center items-center rounded-sm text-xs font-semibold px-3 py-1 min-w-[78px]
1905
1569
  ${n}
1906
- ${t}
1570
+ ${r}
1907
1571
  ${i}`,
1908
- children: h
1572
+ children: c
1909
1573
  }
1910
1574
  );
1911
- }, Qr = ({ rows: h = 5, columns: c = 5 }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1575
+ }, da = ({ rows: c = 5, columns: d = 5 }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1912
1576
  /* @__PURE__ */ e.jsx("div", { className: "w-full mb-6 inline-flex justify-end items-center", children: /* @__PURE__ */ e.jsx("div", { className: "h-8 w-80 bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }),
1913
1577
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden rounded-md border border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full border-collapse", children: [
1914
- /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsx("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length: c }).map((s, i) => /* @__PURE__ */ e.jsx("th", { className: "px-4 py-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-6 w-24 bg-gray-300 dark:bg-gray-700 rounded animate-pulse inline-flex justify-center items-center" }) }, i)) }) }),
1915
- /* @__PURE__ */ e.jsx("tbody", { children: Array.from({ length: h }).map((s, i) => /* @__PURE__ */ e.jsx(
1578
+ /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsx("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length: d }).map((s, i) => /* @__PURE__ */ e.jsx("th", { className: "px-4 py-3", children: /* @__PURE__ */ e.jsx("div", { className: "h-6 w-24 bg-gray-300 dark:bg-gray-700 rounded animate-pulse inline-flex justify-center items-center" }) }, i)) }) }),
1579
+ /* @__PURE__ */ e.jsx("tbody", { children: Array.from({ length: c }).map((s, i) => /* @__PURE__ */ e.jsx(
1916
1580
  "tr",
1917
1581
  {
1918
1582
  className: "border-t border-gray-200 dark:border-gray-800",
1919
- children: Array.from({ length: c }).map((d, t) => /* @__PURE__ */ e.jsx("td", { className: "px-4 py-6", children: /* @__PURE__ */ e.jsx("div", { className: "h-6 w-full bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }, t))
1583
+ children: Array.from({ length: d }).map((l, r) => /* @__PURE__ */ e.jsx("td", { className: "px-4 py-6", children: /* @__PURE__ */ e.jsx("div", { className: "h-6 w-full bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }, r))
1920
1584
  },
1921
1585
  i
1922
1586
  )) })
1923
1587
  ] }) })
1924
- ] }), fr = ({ src: h, alt: c = "preview", isOpen: s, setIsOpen: i }) => {
1925
- const d = () => i(!1);
1926
- return ae(() => {
1927
- const t = (n) => {
1928
- n.key === "Escape" && d();
1588
+ ] }), Ye = ({ src: c, alt: d = "preview", isOpen: s, setIsOpen: i }) => {
1589
+ const l = () => i(!1);
1590
+ return W(() => {
1591
+ const r = (n) => {
1592
+ n.key === "Escape" && l();
1929
1593
  };
1930
- return s && (document.body.style.overflow = "hidden", document.addEventListener("keydown", t)), () => {
1931
- document.body.style.overflow = "", document.removeEventListener("keydown", t);
1594
+ return s && (document.body.style.overflow = "hidden", document.addEventListener("keydown", r)), () => {
1595
+ document.body.style.overflow = "", document.removeEventListener("keydown", r);
1932
1596
  };
1933
1597
  }, [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
1934
1598
  "div",
1935
1599
  {
1936
1600
  className: `fixed inset-0 z-50 flex items-center justify-center bg-black/70 dark:bg-black/80 \r
1937
1601
  backdrop-blur-sm animate-in fade-in duration-200`,
1938
- onClick: d,
1602
+ onClick: l,
1939
1603
  children: [
1940
1604
  /* @__PURE__ */ e.jsx(
1941
1605
  "button",
1942
1606
  {
1943
- onClick: d,
1607
+ onClick: l,
1944
1608
  className: `absolute top-4 right-4 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200\r
1945
1609
  hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full p-2 shadow-lg transition`,
1946
- children: /* @__PURE__ */ e.jsx(Ae, { size: 20 })
1610
+ children: /* @__PURE__ */ e.jsx(je, { size: 20 })
1947
1611
  }
1948
1612
  ),
1949
1613
  /* @__PURE__ */ e.jsx(
1950
1614
  "div",
1951
1615
  {
1952
1616
  className: "max-w-5xl w-full px-4 transform transition-all duration-200 scale-95 animate-in zoom-in-95",
1953
- onClick: (t) => t.stopPropagation(),
1617
+ onClick: (r) => r.stopPropagation(),
1954
1618
  children: /* @__PURE__ */ e.jsx(
1955
1619
  "img",
1956
1620
  {
1957
- src: h,
1958
- alt: c,
1621
+ src: c,
1622
+ alt: d,
1959
1623
  className: "w-full max-h-[90vh] object-contain rounded-xl"
1960
1624
  }
1961
1625
  )
@@ -1964,17 +1628,17 @@ const Jr = ({
1964
1628
  ]
1965
1629
  }
1966
1630
  ) });
1967
- }, ea = ({ config: h }) => {
1631
+ }, ca = ({ config: c }) => {
1968
1632
  const {
1969
- data: c = [],
1633
+ data: d = [],
1970
1634
  table_head: s = [],
1971
1635
  loading: i = !1,
1972
- search: d = {
1636
+ search: l = {
1973
1637
  enabled: !1,
1974
1638
  placeholder: "Search...",
1975
1639
  useServerSideSearch: !1
1976
1640
  },
1977
- filter: t = {
1641
+ filter: r = {
1978
1642
  enabled: !1,
1979
1643
  useServerSideFilters: !1
1980
1644
  },
@@ -1983,188 +1647,188 @@ const Jr = ({
1983
1647
  rows_per_page: 10,
1984
1648
  useServerSidePagination: !1
1985
1649
  },
1986
- emptyMessage: N = "No data available",
1987
- onMenuAction: y,
1988
- setServerSidePaginationData: v = () => {
1650
+ emptyMessage: k = "No data available",
1651
+ onMenuAction: M,
1652
+ setServerSidePaginationData: x = () => {
1989
1653
  },
1990
- onFilterApply: f,
1654
+ onFilterApply: m,
1991
1655
  filterConfig: u = null
1992
- } = h, [g, C] = P(""), [p, E] = P(null), [M, R] = P([]), [w, L] = P({}), [U, V] = P(!1), [Z, $] = P(null), [x, B] = P(!1), G = Ke(() => !d.enabled || !g.trim() || d.useServerSideSearch ? c : zr(c, g, d.searchKeys || []), [c, g, d]), [T, S] = P(1), [O, W] = P((n == null ? void 0 : n.rows_per_page) || 50), [Q, oe] = P(G.length || 0), pe = n != null && n.useServerSidePagination ? n.total_pages : Math.ceil(G.length / O), ye = Ke(() => {
1993
- if (n.useServerSidePagination) return G;
1994
- const l = (T - 1) * O;
1995
- return G.slice(l, l + O);
1996
- }, [G, T, O]), ge = ke(null), ve = ke({}), fe = ke(null), se = (l) => {
1997
- C(l), S(1), d.useServerSideSearch && (fe.current && clearTimeout(fe.current), fe.current = setTimeout(async () => {
1656
+ } = c, [b, v] = T(""), [h, N] = T(null), [j, S] = T([]), [R, P] = T({}), [B, Y] = T(!1), [z, O] = T(null), [p, _] = T(!1), F = Se(() => !l.enabled || !b.trim() || l.useServerSideSearch ? d : aa(d, b, l.searchKeys || []), [d, b, l]), [C, f] = T(1), [A, U] = T((n == null ? void 0 : n.rows_per_page) || 50), [V, X] = T(F.length || 0), ae = n != null && n.useServerSidePagination ? n.total_pages : Math.ceil(F.length / A), oe = Se(() => {
1657
+ if (n.useServerSidePagination) return F;
1658
+ const o = (C - 1) * A;
1659
+ return F.slice(o, o + A);
1660
+ }, [F, C, A]), re = ce(null), ie = ce({}), t = ce(null), y = (o) => {
1661
+ v(o), f(1), l.useServerSideSearch && (t.current && clearTimeout(t.current), t.current = setTimeout(async () => {
1998
1662
  try {
1999
- await v((m) => ({
2000
- ...m,
2001
- search: l,
1663
+ await x((g) => ({
1664
+ ...g,
1665
+ search: o,
2002
1666
  current_page: 1
2003
1667
  }));
2004
- } catch (m) {
2005
- console.error("Search error:", m);
1668
+ } catch (g) {
1669
+ console.error("Search error:", g);
2006
1670
  }
2007
1671
  }, 800));
2008
- }, Se = (l, m, A) => {
2009
- A.stopPropagation(), E(null), y == null || y(l.type, m);
2010
- }, Ee = (l, m, A) => {
2011
- m.stopPropagation(), R(A);
2012
- const H = m.currentTarget;
2013
- ve.current[l] = H;
2014
- const z = H.getBoundingClientRect(), te = 192, X = A.length * 40, ue = window.innerWidth, je = window.innerHeight, F = ue - z.right < te ? z.left - te + z.width : z.left, le = je - z.bottom < X && z.top > X ? z.top - X - 2 : z.bottom + 2;
2015
- L({
2016
- top: Math.max(8, Math.min(le, je - X - 8)),
2017
- left: Math.max(8, Math.min(F, ue - te - 8))
2018
- }), E(p === l ? null : l);
2019
- }, Te = (l) => (T - 1) * O + l + 1, me = (l) => {
2020
- $(l), B(!0);
2021
- }, ie = (l, m, A, H = null) => /* @__PURE__ */ e.jsx(e.Fragment, { children: l ? /* @__PURE__ */ e.jsx(
1672
+ }, L = (o, g, D) => {
1673
+ D.stopPropagation(), N(null), M == null || M(o.type, g);
1674
+ }, G = (o, g, D) => {
1675
+ g.stopPropagation(), S(D);
1676
+ const H = g.currentTarget;
1677
+ ie.current[o] = H;
1678
+ const K = H.getBoundingClientRect(), Q = 192, Z = D.length * 40, de = window.innerWidth, be = window.innerHeight, E = de - K.right < Q ? K.left - Q + K.width : K.left, se = be - K.bottom < Z && K.top > Z ? K.top - Z - 2 : K.bottom + 2;
1679
+ P({
1680
+ top: Math.max(8, Math.min(se, be - Z - 8)),
1681
+ left: Math.max(8, Math.min(E, de - Q - 8))
1682
+ }), N(h === o ? null : o);
1683
+ }, te = (o) => (C - 1) * A + o + 1, ne = (o) => {
1684
+ O(o), _(!0);
1685
+ }, I = (o, g, D, H = null) => /* @__PURE__ */ e.jsx(e.Fragment, { children: o ? /* @__PURE__ */ e.jsx(
2022
1686
  "img",
2023
1687
  {
2024
- src: l,
2025
- alt: m || "Avatar",
2026
- onClick: (z) => {
2027
- z.stopPropagation(), z.preventDefault(), me({ src: l, alt: m });
1688
+ src: o,
1689
+ alt: g || "Avatar",
1690
+ onClick: (K) => {
1691
+ K.stopPropagation(), K.preventDefault(), ne({ src: o, alt: g });
2028
1692
  },
2029
- className: `w-10 h-10 cursor-pointer rounded-full object-cover border border-gray-200 dark:border-gray-700 ${A || ""}`
1693
+ className: `w-10 h-10 cursor-pointer rounded-full object-cover border border-gray-200 dark:border-gray-700 ${D || ""}`
2030
1694
  }
2031
1695
  ) : /* @__PURE__ */ e.jsx(e.Fragment, { children: H || /* @__PURE__ */ e.jsx(
2032
1696
  "div",
2033
1697
  {
2034
- className: `w-10 h-10 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${A || ""}`,
2035
- children: /* @__PURE__ */ e.jsx(cr, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
1698
+ className: `w-10 h-10 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${D || ""}`,
1699
+ children: /* @__PURE__ */ e.jsx(De, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
2036
1700
  }
2037
- ) }) }), de = (l, m) => /* @__PURE__ */ e.jsxs("div", { className: `flex items-center space-x-4 ${m.className || ""}`, children: [
2038
- m.imageKey ? ie(l[m.imageKey], l[m.titleKey], "group-avatar") : "",
1701
+ ) }) }), J = (o, g) => /* @__PURE__ */ e.jsxs("div", { className: `flex items-center space-x-4 ${g.className || ""}`, children: [
1702
+ g.imageKey ? I(o[g.imageKey], o[g.titleKey], "group-avatar") : "",
2039
1703
  /* @__PURE__ */ e.jsxs("div", { children: [
2040
- /* @__PURE__ */ e.jsx("p", { className: "font-medium text-gray-900 dark:text-white group-title", children: l[m.titleKey] || "" }),
2041
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 group-sub-title", children: l[m.subtitleKey] || "" })
1704
+ /* @__PURE__ */ e.jsx("p", { className: "font-medium text-gray-900 dark:text-white group-title", children: o[g.titleKey] || "" }),
1705
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 group-sub-title", children: o[g.subtitleKey] || "" })
2042
1706
  ] })
2043
- ] }), xe = (l, m) => {
2044
- var te;
2045
- let A = String(l);
2046
- const H = m.variant || "contained";
2047
- let z = m.defaultColor;
2048
- if (((te = m == null ? void 0 : m.chipOptions) == null ? void 0 : te.length) > 0) {
2049
- let X = m == null ? void 0 : m.chipOptions.find((ue) => ue.value == l);
2050
- X && (A = X.label, z = X.color);
1707
+ ] }), le = (o, g) => {
1708
+ var Q;
1709
+ let D = String(o);
1710
+ const H = g.variant || "contained";
1711
+ let K = g.defaultColor;
1712
+ if (((Q = g == null ? void 0 : g.chipOptions) == null ? void 0 : Q.length) > 0) {
1713
+ let Z = g == null ? void 0 : g.chipOptions.find((de) => de.value == o);
1714
+ Z && (D = Z.label, K = Z.color);
2051
1715
  }
2052
1716
  return /* @__PURE__ */ e.jsx(
2053
- gr,
1717
+ Ge,
2054
1718
  {
2055
- label: A,
1719
+ label: D,
2056
1720
  variant: H,
2057
- color: z,
2058
- className: m.className || ""
1721
+ color: K,
1722
+ className: g.className || ""
2059
1723
  }
2060
1724
  );
2061
- }, ce = (l, m, A) => {
2062
- const H = m[l.key];
2063
- return l.type === "menu_actions" ? /* @__PURE__ */ e.jsx("div", { className: `text-center ${l.className || ""}`, children: /* @__PURE__ */ e.jsx(
1725
+ }, ue = (o, g, D) => {
1726
+ const H = g[o.key];
1727
+ return o.type === "menu_actions" ? /* @__PURE__ */ e.jsx("div", { className: `text-center ${o.className || ""}`, children: /* @__PURE__ */ e.jsx(
2064
1728
  "button",
2065
1729
  {
2066
- ref: (z) => ve.current[m.id] = z,
2067
- onClick: (z) => Ee(m.id, z, l.menuList),
1730
+ ref: (K) => ie.current[g.id] = K,
1731
+ onClick: (K) => G(g.id, K, o.menuList),
2068
1732
  className: "p-2 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full transition text-gray-700 dark:text-gray-300",
2069
- children: /* @__PURE__ */ e.jsx(Lr, { className: "h-4 w-4" })
1733
+ children: /* @__PURE__ */ e.jsx(We, { className: "h-4 w-4" })
2070
1734
  }
2071
- ) }) : l.type === "index" ? /* @__PURE__ */ e.jsx("span", { className: l.className || "", children: Te(A) }) : l.type === "group" ? de(m, l) : l.type === "chip" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: xe(H, l) }) : l.type === "date" ? /* @__PURE__ */ e.jsx("span", { className: l.className || "", children: ur(H, l.format || "DD MMM YYYY") }) : l.type === "avatar" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ie(H, l.alt, l.className, l.fallback_icon) }) : /* @__PURE__ */ e.jsx("span", { className: l.className || "", children: H || "N/A" });
2072
- }, Ne = (l, m) => {
2073
- if (l.onClickDetails)
2074
- return y == null ? void 0 : y("view", m);
2075
- if (typeof l.handleClick == "function")
2076
- return l.handleClick(m);
2077
- }, we = (l) => l.onClickDetails || typeof l.handleClick == "function";
2078
- return ae(() => {
2079
- const l = () => {
2080
- p && E(null);
1735
+ ) }) : o.type === "index" ? /* @__PURE__ */ e.jsx("span", { className: o.className || "", children: te(D) }) : o.type === "group" ? J(g, o) : o.type === "chip" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: le(H, o) }) : o.type === "date" ? /* @__PURE__ */ e.jsx("span", { className: o.className || "", children: Le(H, o.format || "DD MMM YYYY") }) : o.type === "avatar" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: I(H, o.alt, o.className, o.fallback_icon) }) : /* @__PURE__ */ e.jsx("span", { className: o.className || "", children: H || "N/A" });
1736
+ }, me = (o, g) => {
1737
+ if (o.onClickDetails)
1738
+ return M == null ? void 0 : M("view", g);
1739
+ if (typeof o.handleClick == "function")
1740
+ return o.handleClick(g);
1741
+ }, xe = (o) => o.onClickDetails || typeof o.handleClick == "function";
1742
+ return W(() => {
1743
+ const o = () => {
1744
+ h && N(null);
2081
1745
  };
2082
- return window.addEventListener("scroll", l, !0), () => {
2083
- window.removeEventListener("scroll", l, !0);
1746
+ return window.addEventListener("scroll", o, !0), () => {
1747
+ window.removeEventListener("scroll", o, !0);
2084
1748
  };
2085
- }, [p]), ae(() => {
2086
- const l = (m) => {
2087
- ge.current && !ge.current.contains(m.target) && E(null);
1749
+ }, [h]), W(() => {
1750
+ const o = (g) => {
1751
+ re.current && !re.current.contains(g.target) && N(null);
2088
1752
  };
2089
- return document.addEventListener("click", l), () => document.removeEventListener("click", l);
2090
- }, []), ae(() => {
2091
- n != null && n.rows_per_page && (n != null && n.useServerSidePagination) && W((n == null ? void 0 : n.rows_per_page) || 50), n.current_page && S(n.current_page);
1753
+ return document.addEventListener("click", o), () => document.removeEventListener("click", o);
1754
+ }, []), W(() => {
1755
+ n != null && n.rows_per_page && (n != null && n.useServerSidePagination) && U((n == null ? void 0 : n.rows_per_page) || 50), n.current_page && f(n.current_page);
2092
1756
  }, [
2093
1757
  n.rows_per_page,
2094
1758
  n == null ? void 0 : n.useServerSidePagination,
2095
1759
  n.current_page
2096
- ]), ae(() => {
2097
- oe(
2098
- n != null && n.useServerSidePagination ? n.total_records : G.length
2099
- ), G.length <= O * (T - 1) && !(n != null && n.useServerSidePagination) && S((l) => l - 1 || 1);
1760
+ ]), W(() => {
1761
+ X(
1762
+ n != null && n.useServerSidePagination ? n.total_records : F.length
1763
+ ), F.length <= A * (C - 1) && !(n != null && n.useServerSidePagination) && f((o) => o - 1 || 1);
2100
1764
  }, [
2101
- G.length,
1765
+ F.length,
2102
1766
  n.total_records,
2103
1767
  n == null ? void 0 : n.useServerSidePagination
2104
- ]), i ? /* @__PURE__ */ e.jsx(Qr, { rows: 6, columns: 6 }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1768
+ ]), i ? /* @__PURE__ */ e.jsx(da, { rows: 6, columns: 6 }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2105
1769
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end items-center mb-6 gap-2", children: [
2106
- d.enabled && /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsxs("div", { className: "relative min-w-[300px]", children: [
2107
- /* @__PURE__ */ e.jsx(ze, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-300" }),
1770
+ l.enabled && /* @__PURE__ */ e.jsx("div", { className: "", children: /* @__PURE__ */ e.jsxs("div", { className: "relative min-w-[300px]", children: [
1771
+ /* @__PURE__ */ e.jsx(Ce, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-300" }),
2108
1772
  /* @__PURE__ */ e.jsx(
2109
1773
  "input",
2110
1774
  {
2111
1775
  type: "text",
2112
- placeholder: d.placeholder || "Search...",
2113
- value: g,
2114
- onChange: (l) => se(l.target.value),
1776
+ placeholder: l.placeholder || "Search...",
1777
+ value: b,
1778
+ onChange: (o) => y(o.target.value),
2115
1779
  className: "w-full h-[36px] pl-9 pr-4 py-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-300 dark:ring-blue-200 disabled:opacity-50"
2116
1780
  }
2117
1781
  )
2118
1782
  ] }) }),
2119
- u && t.enabled && /* @__PURE__ */ e.jsxs(Me, { onClick: () => V(!0), variant: "contained", children: [
2120
- /* @__PURE__ */ e.jsx(Dr, { className: "w-4 h-4 mr-2" }),
1783
+ u && r.enabled && /* @__PURE__ */ e.jsxs(he, { onClick: () => Y(!0), variant: "contained", children: [
1784
+ /* @__PURE__ */ e.jsx(He, { className: "w-4 h-4 mr-2" }),
2121
1785
  "Filters"
2122
1786
  ] })
2123
1787
  ] }),
2124
1788
  /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-700", children: [
2125
1789
  /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
2126
- /* @__PURE__ */ e.jsx("thead", { className: "bg-gray-50 dark:bg-gray-700/60", children: /* @__PURE__ */ e.jsx("tr", { children: s.map((l) => /* @__PURE__ */ e.jsx(
1790
+ /* @__PURE__ */ e.jsx("thead", { className: "bg-gray-50 dark:bg-gray-700/60", children: /* @__PURE__ */ e.jsx("tr", { children: s.map((o) => /* @__PURE__ */ e.jsx(
2127
1791
  "th",
2128
1792
  {
2129
1793
  className: "px-6 py-4 text-left text-xs font-medium text-black dark:text-white uppercase tracking-wider min-w-max max-w-[180px] truncate",
2130
- children: l.title
1794
+ children: o.title
2131
1795
  },
2132
- l.key
1796
+ o.key
2133
1797
  )) }) }),
2134
- /* @__PURE__ */ e.jsx("tbody", { className: "bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700", children: ye.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx(
1798
+ /* @__PURE__ */ e.jsx("tbody", { className: "bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700", children: oe.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx(
2135
1799
  "td",
2136
1800
  {
2137
1801
  colSpan: s.length,
2138
1802
  className: "text-center py-10 text-gray-500 dark:text-gray-400",
2139
- children: N
1803
+ children: k
2140
1804
  }
2141
- ) }) : ye.map((l, m) => /* @__PURE__ */ e.jsx(
1805
+ ) }) : oe.map((o, g) => /* @__PURE__ */ e.jsx(
2142
1806
  "tr",
2143
1807
  {
2144
1808
  className: "hover:bg-gray-50 dark:hover:bg-blue-800/10 transition",
2145
- children: s.map((A) => /* @__PURE__ */ e.jsx(
1809
+ children: s.map((D) => /* @__PURE__ */ e.jsx(
2146
1810
  "td",
2147
1811
  {
2148
- className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max max-w-[300px] truncate ${we(A) ? "cursor-pointer" : ""}`,
2149
- title: String(l[A.key] ?? ""),
2150
- onClick: () => Ne(A, l),
2151
- children: A.render ? A.render(l, m) : ce(A, l, m)
1812
+ className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max max-w-[300px] truncate ${xe(D) ? "cursor-pointer" : ""}`,
1813
+ title: String(o[D.key] ?? ""),
1814
+ onClick: () => me(D, o),
1815
+ children: D.render ? D.render(o, g) : ue(D, o, g)
2152
1816
  },
2153
- A.key
1817
+ D.key
2154
1818
  ))
2155
1819
  },
2156
- l.id || m
1820
+ o.id || g
2157
1821
  )) })
2158
1822
  ] }) }),
2159
- (n == null ? void 0 : n.enabled) && G.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: " bg-gray-50 dark:bg-gray-700/60 px-6 py-3 flex flex-wrap items-center justify-between border-t border-gray-200 dark:border-gray-600 gap-3", children: [
1823
+ (n == null ? void 0 : n.enabled) && F.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: " bg-gray-50 dark:bg-gray-700/60 px-6 py-3 flex flex-wrap items-center justify-between border-t border-gray-200 dark:border-gray-600 gap-3", children: [
2160
1824
  /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
2161
1825
  "Showing ",
2162
- (T - 1) * O + 1,
1826
+ (C - 1) * A + 1,
2163
1827
  " to",
2164
1828
  " ",
2165
- Math.min(T * O, Q),
1829
+ Math.min(C * A, V),
2166
1830
  " of ",
2167
- Q,
1831
+ V,
2168
1832
  " ",
2169
1833
  "results"
2170
1834
  ] }),
@@ -2174,17 +1838,17 @@ const Jr = ({
2174
1838
  /* @__PURE__ */ e.jsx(
2175
1839
  "select",
2176
1840
  {
2177
- value: O,
2178
- onChange: (l) => {
2179
- const m = Number(l.target.value);
2180
- W(m), S(1), n.useServerSidePagination && v((A) => ({
2181
- ...A,
1841
+ value: A,
1842
+ onChange: (o) => {
1843
+ const g = Number(o.target.value);
1844
+ U(g), f(1), n.useServerSidePagination && x((D) => ({
1845
+ ...D,
2182
1846
  current_page: 1,
2183
- rows_per_page: m
1847
+ rows_per_page: g
2184
1848
  }));
2185
1849
  },
2186
1850
  className: "border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm rounded-md px-2 py-1 focus:outline-none focus:ring-1 focus:ring-blue-500",
2187
- children: [2, 10, 25, 50, 100].map((l) => /* @__PURE__ */ e.jsx("option", { value: l, children: l }, l))
1851
+ children: [2, 10, 25, 50, 100].map((o) => /* @__PURE__ */ e.jsx("option", { value: o, children: o }, o))
2188
1852
  }
2189
1853
  )
2190
1854
  ] }),
@@ -2193,119 +1857,119 @@ const Jr = ({
2193
1857
  "button",
2194
1858
  {
2195
1859
  onClick: () => {
2196
- if (T > 1) {
2197
- const l = T - 1;
2198
- S(l), n.useServerSidePagination && v((m) => ({
2199
- ...m,
2200
- current_page: l
1860
+ if (C > 1) {
1861
+ const o = C - 1;
1862
+ f(o), n.useServerSidePagination && x((g) => ({
1863
+ ...g,
1864
+ current_page: o
2201
1865
  }));
2202
1866
  }
2203
1867
  },
2204
- disabled: T === 1,
1868
+ disabled: C === 1,
2205
1869
  className: "p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition text-gray-500 dark:text-gray-300 disabled:opacity-50",
2206
- children: /* @__PURE__ */ e.jsx(Ar, { className: "h-4 w-4" })
1870
+ children: /* @__PURE__ */ e.jsx(Ue, { className: "h-4 w-4" })
2207
1871
  }
2208
1872
  ),
2209
1873
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-gray-800 dark:text-gray-200", children: [
2210
1874
  "Page ",
2211
- T,
1875
+ C,
2212
1876
  " of ",
2213
- pe
1877
+ ae
2214
1878
  ] }),
2215
1879
  /* @__PURE__ */ e.jsx(
2216
1880
  "button",
2217
1881
  {
2218
1882
  onClick: () => {
2219
- if (T < pe) {
2220
- const l = T + 1;
2221
- S(l), n.useServerSidePagination && v((m) => ({
2222
- ...m,
2223
- current_page: l
1883
+ if (C < ae) {
1884
+ const o = C + 1;
1885
+ f(o), n.useServerSidePagination && x((g) => ({
1886
+ ...g,
1887
+ current_page: o
2224
1888
  }));
2225
1889
  }
2226
1890
  },
2227
- disabled: T === pe,
1891
+ disabled: C === ae,
2228
1892
  className: "p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition text-gray-500 dark:text-gray-300 disabled:opacity-50",
2229
- children: /* @__PURE__ */ e.jsx(Ir, { className: "h-4 w-4" })
1893
+ children: /* @__PURE__ */ e.jsx(Ve, { className: "h-4 w-4" })
2230
1894
  }
2231
1895
  )
2232
1896
  ] })
2233
1897
  ] })
2234
1898
  ] })
2235
1899
  ] }),
2236
- p && $r(
1900
+ h && Je(
2237
1901
  /* @__PURE__ */ e.jsx(
2238
1902
  "div",
2239
1903
  {
2240
- ref: ge,
1904
+ ref: re,
2241
1905
  style: {
2242
1906
  position: "fixed",
2243
- top: `${w.top}px`,
2244
- left: `${w.left}px`,
1907
+ top: `${R.top}px`,
1908
+ left: `${R.left}px`,
2245
1909
  zIndex: 9999
2246
1910
  },
2247
1911
  className: "w-48 bg-white dark:bg-gray-700 rounded-md shadow-lg border border-gray-200 dark:border-gray-600",
2248
- children: M.map((l, m) => /* @__PURE__ */ e.jsxs(
1912
+ children: j.map((o, g) => /* @__PURE__ */ e.jsxs(
2249
1913
  "button",
2250
1914
  {
2251
- onClick: (A) => Se(
2252
- l,
2253
- c.find((H) => H.id === p),
2254
- A
1915
+ onClick: (D) => L(
1916
+ o,
1917
+ d.find((H) => H.id === h),
1918
+ D
2255
1919
  ),
2256
- className: `w-full flex items-center gap-2 px-4 py-2 text-sm text-left hover:bg-gray-100 dark:hover:bg-gray-600 ${l.variant === "danger" ? "text-red-600 dark:text-red-500" : "text-gray-700 dark:text-gray-200"}`,
1920
+ className: `w-full flex items-center gap-2 px-4 py-2 text-sm text-left hover:bg-gray-100 dark:hover:bg-gray-600 ${o.variant === "danger" ? "text-red-600 dark:text-red-500" : "text-gray-700 dark:text-gray-200"}`,
2257
1921
  children: [
2258
- l.icon && /* @__PURE__ */ e.jsx("span", { className: "shrink-0", children: l.icon }),
2259
- l.title
1922
+ o.icon && /* @__PURE__ */ e.jsx("span", { className: "shrink-0", children: o.icon }),
1923
+ o.title
2260
1924
  ]
2261
1925
  },
2262
- m
1926
+ g
2263
1927
  ))
2264
1928
  }
2265
1929
  ),
2266
1930
  document.body
2267
1931
  ),
2268
1932
  u && /* @__PURE__ */ e.jsx(
2269
- Xr,
1933
+ ia,
2270
1934
  {
2271
- isOpen: U,
2272
- onClose: () => V(!1),
1935
+ isOpen: B,
1936
+ onClose: () => Y(!1),
2273
1937
  config: u,
2274
- onApply: f
1938
+ onApply: m
2275
1939
  }
2276
1940
  ),
2277
- x && /* @__PURE__ */ e.jsx(
2278
- fr,
1941
+ p && /* @__PURE__ */ e.jsx(
1942
+ Ye,
2279
1943
  {
2280
- src: Z.src,
2281
- alt: Z.alt,
2282
- isOpen: x,
2283
- setIsOpen: B
1944
+ src: z.src,
1945
+ alt: z.alt,
1946
+ isOpen: p,
1947
+ setIsOpen: _
2284
1948
  }
2285
1949
  )
2286
1950
  ] });
2287
- }, De = ({
2288
- isOpen: h,
2289
- onClose: c,
1951
+ }, ye = ({
1952
+ isOpen: c,
1953
+ onClose: d,
2290
1954
  icon: s,
2291
1955
  title: i,
2292
- children: d,
2293
- size: t = "md",
1956
+ children: l,
1957
+ size: r = "md",
2294
1958
  actionButtons: n = [],
2295
- actions: N,
2296
- showDefaultClose: y = !0,
2297
- footerConfig: v = null,
2298
- hideFooter: f = !1,
1959
+ actions: k,
1960
+ showDefaultClose: M = !0,
1961
+ footerConfig: x = null,
1962
+ hideFooter: m = !1,
2299
1963
  onFormSubmit: u = () => {
2300
1964
  },
2301
- onCancel: g,
2302
- loadingBtn: C = !1,
2303
- executeFunction: p = () => {
1965
+ onCancel: b,
1966
+ loadingBtn: v = !1,
1967
+ executeFunction: h = () => {
2304
1968
  },
2305
- selectedItem: E = null
1969
+ selectedItem: N = null
2306
1970
  }) => {
2307
- if (!h) return null;
2308
- const M = {
1971
+ if (!c) return null;
1972
+ const j = {
2309
1973
  sm: "max-w-md",
2310
1974
  md: "max-w-lg",
2311
1975
  lg: "max-w-2xl",
@@ -2317,13 +1981,13 @@ const Jr = ({
2317
1981
  "div",
2318
1982
  {
2319
1983
  className: "fixed inset-0 bg-gray-500 opacity-75",
2320
- onClick: () => c()
1984
+ onClick: () => d()
2321
1985
  }
2322
1986
  ),
2323
1987
  /* @__PURE__ */ e.jsxs(
2324
1988
  "div",
2325
1989
  {
2326
- className: `relative bg-white rounded-lg shadow-xl w-full ${M[t] || M.md} max-h-[90vh] flex flex-col dark:bg-gray-800`,
1990
+ className: `relative bg-white rounded-lg shadow-xl w-full ${j[r] || j.md} max-h-[90vh] flex flex-col dark:bg-gray-800`,
2327
1991
  children: [
2328
1992
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [
2329
1993
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
@@ -2333,85 +1997,85 @@ const Jr = ({
2333
1997
  /* @__PURE__ */ e.jsx(
2334
1998
  "button",
2335
1999
  {
2336
- onClick: () => c(),
2000
+ onClick: () => d(),
2337
2001
  className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
2338
- children: /* @__PURE__ */ e.jsx(Ae, { className: "w-6 h-6" })
2002
+ children: /* @__PURE__ */ e.jsx(je, { className: "w-6 h-6" })
2339
2003
  }
2340
2004
  )
2341
2005
  ] }),
2342
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-4", children: d }),
2343
- n.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "px-4 py-3 flex justify-end gap-3 border-t border-gray-200 dark:border-gray-700 sm:px-6", children: n.map((R) => /* @__PURE__ */ e.jsx(
2344
- Me,
2006
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-4", children: l }),
2007
+ n.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "px-4 py-3 flex justify-end gap-3 border-t border-gray-200 dark:border-gray-700 sm:px-6", children: n.map((S) => /* @__PURE__ */ e.jsx(
2008
+ he,
2345
2009
  {
2346
- onClick: (w) => {
2347
- R.type == "submit" ? u(w) : p(
2010
+ onClick: (R) => {
2011
+ S.type == "submit" ? u(R) : h(
2348
2012
  () => {
2349
- var L;
2350
- return (L = R == null ? void 0 : R.onClick) == null ? void 0 : L.call(R, w, E);
2013
+ var P;
2014
+ return (P = S == null ? void 0 : S.onClick) == null ? void 0 : P.call(S, R, N);
2351
2015
  },
2352
- (L) => c == null ? void 0 : c(L)
2016
+ (P) => d == null ? void 0 : d(P)
2353
2017
  );
2354
2018
  },
2355
- disabled: C || R.disabled,
2356
- variant: R.variant || "contained",
2357
- color: R.color || "primary",
2358
- className: `min-w-[100px] ${R.className}`,
2359
- type: R.type || "button",
2360
- children: C ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
2019
+ disabled: v || S.disabled,
2020
+ variant: S.variant || "contained",
2021
+ color: S.color || "primary",
2022
+ className: `min-w-[100px] ${S.className}`,
2023
+ type: S.type || "button",
2024
+ children: v ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
2361
2025
  /* @__PURE__ */ e.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-white/30 border-t-2 border-t-white mr-2" }),
2362
- R.label || "Submit",
2026
+ S.label || "Submit",
2363
2027
  "..."
2364
- ] }) : R.label || "Submit"
2028
+ ] }) : S.label || "Submit"
2365
2029
  }
2366
2030
  )) })
2367
2031
  ]
2368
2032
  }
2369
2033
  )
2370
2034
  ] });
2371
- }, ir = ({ config: h, onSubmit: c, initialData: s = {} }) => {
2372
- var v;
2373
- const { formClass: i = "grid grid-cols-12 gap-4", formFields: d = [] } = h || {}, [t, n] = P(s);
2374
- ae(() => {
2035
+ }, Oe = ({ config: c, onSubmit: d, initialData: s = {} }) => {
2036
+ var x;
2037
+ const { formClass: i = "grid grid-cols-12 gap-4", formFields: l = [] } = c || {}, [r, n] = T(s);
2038
+ W(() => {
2375
2039
  n(s);
2376
2040
  }, []);
2377
- const N = (f, u) => {
2378
- n((g) => ({ ...g, [f]: u }));
2379
- }, y = (f) => {
2380
- f.preventDefault();
2381
- const u = f.target;
2041
+ const k = (m, u) => {
2042
+ n((b) => ({ ...b, [m]: u }));
2043
+ }, M = (m) => {
2044
+ m.preventDefault();
2045
+ const u = m.target;
2382
2046
  if (!u.checkValidity()) {
2383
2047
  u.reportValidity();
2384
2048
  return;
2385
2049
  }
2386
- c(t);
2050
+ d(r);
2387
2051
  };
2388
2052
  return /* @__PURE__ */ e.jsx(
2389
2053
  "form",
2390
2054
  {
2391
- id: (v = h.title) != null && v.toLowerCase().includes("edit") ? "editForm" : "addForm",
2392
- onSubmit: y,
2055
+ id: (x = c.title) != null && x.toLowerCase().includes("edit") ? "editForm" : "addForm",
2056
+ onSubmit: M,
2393
2057
  className: i,
2394
2058
  noValidate: !1,
2395
- children: d.map((f) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
2396
- pr,
2059
+ children: l.map((m) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
2060
+ $e,
2397
2061
  {
2398
- field: f,
2399
- formData: t,
2400
- handleChange: N
2062
+ field: m,
2063
+ formData: r,
2064
+ handleChange: k
2401
2065
  },
2402
- f.key
2066
+ m.key
2403
2067
  ) }))
2404
2068
  }
2405
2069
  );
2406
2070
  };
2407
- function ra({ data: h, config: c }) {
2408
- const { fields: s, containerClass: i } = c, [d, t] = P(null), [n, N] = P(!1), y = (u) => {
2409
- t(u), N(!0);
2410
- }, v = ({ col: u }) => {
2411
- let g = u == null ? void 0 : u.icon, C = u.label, p = h[u.key], E = u.type, M = u.variant || "outline", R = u.defaultColor;
2412
- if (E == "chip" && u.chipOptions.length > 0) {
2413
- let w = u == null ? void 0 : u.chipOptions.find((L) => L.value == p);
2414
- w && (p = w.label, R = w.color);
2071
+ function ua({ data: c, config: d }) {
2072
+ const { fields: s, containerClass: i } = d, [l, r] = T(null), [n, k] = T(!1), M = (u) => {
2073
+ r(u), k(!0);
2074
+ }, x = ({ col: u }) => {
2075
+ let b = u == null ? void 0 : u.icon, v = u.label, h = c[u.key], N = u.type, j = u.variant || "outline", S = u.defaultColor;
2076
+ if (N == "chip" && u.chipOptions.length > 0) {
2077
+ let R = u == null ? void 0 : u.chipOptions.find((P) => P.value == h);
2078
+ R && (h = R.label, S = R.color);
2415
2079
  }
2416
2080
  return /* @__PURE__ */ e.jsxs(
2417
2081
  "div",
@@ -2419,32 +2083,32 @@ function ra({ data: h, config: c }) {
2419
2083
  className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
2420
2084
  bg-gray-100 dark:bg-gray-900 ${u.blockClass}`,
2421
2085
  children: [
2422
- g && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: g }),
2086
+ b && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: b }),
2423
2087
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2424
- /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: C }),
2425
- E == "chip" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
2426
- gr,
2088
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: v }),
2089
+ N == "chip" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
2090
+ Ge,
2427
2091
  {
2428
- label: p,
2429
- variant: M,
2430
- color: R,
2092
+ label: h,
2093
+ variant: j,
2094
+ color: S,
2431
2095
  className: "mt-1"
2432
2096
  }
2433
- ) }) : E == "tinyEditor" ? /* @__PURE__ */ e.jsx(
2097
+ ) }) : N == "tinyEditor" ? /* @__PURE__ */ e.jsx(
2434
2098
  "p",
2435
2099
  {
2436
2100
  className: "mt-1 text-sm text-gray-900 dark:text-white break-words",
2437
2101
  dangerouslySetInnerHTML: {
2438
- __html: p
2102
+ __html: h
2439
2103
  }
2440
2104
  }
2441
- ) : /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: E == "date" ? /* @__PURE__ */ e.jsx("span", { children: ur(p, u.format || "DD MMM YYYY") }) : p || "N/A" })
2105
+ ) : /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: N == "date" ? /* @__PURE__ */ e.jsx("span", { children: Le(h, u.format || "DD MMM YYYY") }) : h || "N/A" })
2442
2106
  ] })
2443
2107
  ]
2444
2108
  }
2445
2109
  );
2446
- }, f = ({ col: u }) => {
2447
- let g = h[u.titleKey], C = h[u.subtitleKey], p = h[u.imageKey], E = h[u.fallback_icon];
2110
+ }, m = ({ col: u }) => {
2111
+ let b = c[u.titleKey], v = c[u.subtitleKey], h = c[u.imageKey], N = c[u.fallback_icon];
2448
2112
  return /* @__PURE__ */ e.jsxs(
2449
2113
  "div",
2450
2114
  {
@@ -2452,18 +2116,18 @@ function ra({ data: h, config: c }) {
2452
2116
  bg-gray-100 dark:bg-gray-900
2453
2117
  ${u.blockClass}`,
2454
2118
  children: [
2455
- p ? /* @__PURE__ */ e.jsx(
2119
+ h ? /* @__PURE__ */ e.jsx(
2456
2120
  "img",
2457
2121
  {
2458
- src: p,
2459
- alt: g,
2460
- onClick: () => y({ src: p, alt: g }),
2122
+ src: h,
2123
+ alt: b,
2124
+ onClick: () => M({ src: h, alt: b }),
2461
2125
  className: "w-16 h-16 cursor-pointer rounded-full object-cover border-2 border-gray-200 dark:border-gray-700"
2462
2126
  }
2463
- ) : E || /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 flex items-center justify-center rounded-full border-2 border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600", children: /* @__PURE__ */ e.jsx(cr, { className: "w-8 h-8 text-gray-400" }) }),
2127
+ ) : N || /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 flex items-center justify-center rounded-full border-2 border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600", children: /* @__PURE__ */ e.jsx(De, { className: "w-8 h-8 text-gray-400" }) }),
2464
2128
  /* @__PURE__ */ e.jsxs("div", { children: [
2465
- /* @__PURE__ */ e.jsx("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: g }),
2466
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: C })
2129
+ /* @__PURE__ */ e.jsx("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: b }),
2130
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: v })
2467
2131
  ] })
2468
2132
  ]
2469
2133
  }
@@ -2471,114 +2135,114 @@ function ra({ data: h, config: c }) {
2471
2135
  };
2472
2136
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2473
2137
  n && /* @__PURE__ */ e.jsx(
2474
- fr,
2138
+ Ye,
2475
2139
  {
2476
- src: d.src,
2477
- alt: d.alt,
2140
+ src: l.src,
2141
+ alt: l.alt,
2478
2142
  isOpen: n,
2479
- setIsOpen: N
2143
+ setIsOpen: k
2480
2144
  }
2481
2145
  ),
2482
2146
  /* @__PURE__ */ e.jsx("div", { className: `grid grid-cols-12 gap-4 ${i || ""}`, children: s.map(
2483
- (u) => u.type == "group" ? /* @__PURE__ */ e.jsx(f, { col: u }) : /* @__PURE__ */ e.jsx(v, { col: u })
2147
+ (u) => u.type == "group" ? /* @__PURE__ */ e.jsx(m, { col: u }) : /* @__PURE__ */ e.jsx(x, { col: u })
2484
2148
  ) })
2485
2149
  ] });
2486
2150
  }
2487
- const mr = ({ config: h }) => {
2488
- var me, ie, de, xe, ce, Ne, we, l, m, A, H, z, te, X, ue, je;
2151
+ const Ke = ({ config: c }) => {
2152
+ var ne, I, J, le, ue, me, xe, o, g, D, H, K, Q, Z, de, be;
2489
2153
  const {
2490
- title: c,
2154
+ title: d,
2491
2155
  fetchData: s = async () => {
2492
2156
  },
2493
2157
  isStaticData: i = !1,
2494
- tableConfig: d = {},
2495
- modalConfig: t = {},
2158
+ tableConfig: l = {},
2159
+ modalConfig: r = {},
2496
2160
  filterConfig: n
2497
- } = h, [N, y] = P(!0), [v, f] = P(!1), [u, g] = P([]), [C, p] = P(null), [E, M] = P({
2161
+ } = c, [k, M] = T(!0), [x, m] = T(!1), [u, b] = T([]), [v, h] = T(null), [N, j] = T({
2498
2162
  search: "",
2499
2163
  rows_per_page: 50,
2500
2164
  current_page: 1
2501
- }), [R, w] = P({}), [L, U] = P(!1), [V, Z] = P(!1), [$, x] = P(!1), [B, G] = P(!1), [T, S] = P(!1), [O, W] = P(null), Q = (j, F) => {
2502
- j === "edit" ? (W(F), x(!0)) : j === "view" ? (W(F), S(!0)) : j === "delete" && (W(F), G(!0));
2503
- }, oe = async (j, F, K = "", le = "") => {
2504
- f(!0);
2165
+ }), [S, R] = T({}), [P, B] = T(!1), [Y, z] = T(!1), [O, p] = T(!1), [_, F] = T(!1), [C, f] = T(!1), [A, U] = T(null), V = (w, E) => {
2166
+ w === "edit" ? (U(E), p(!0)) : w === "view" ? (U(E), f(!0)) : w === "delete" && (U(E), F(!0));
2167
+ }, X = async (w, E, $ = "", se = "") => {
2168
+ m(!0);
2505
2169
  try {
2506
- const ee = await (j == null ? void 0 : j());
2507
- (K || ee.message) && $e(K || ee.message, {
2170
+ const q = await (w == null ? void 0 : w());
2171
+ ($ || q.message) && ke($ || q.message, {
2508
2172
  variant: "success"
2509
- }), F == null || F(ee);
2510
- } catch (ee) {
2511
- (le || ee.message) && $e(le || ee.message, { variant: "error" });
2173
+ }), E == null || E(q);
2174
+ } catch (q) {
2175
+ (se || q.message) && ke(se || q.message, { variant: "error" });
2512
2176
  } finally {
2513
- f(!1);
2177
+ m(!1);
2514
2178
  }
2515
- }, pe = (j) => {
2516
- let F = j.newObject;
2517
- i ? (g((K) => [F, ...K]), p((K) => ({
2518
- ...K,
2179
+ }, ae = (w) => {
2180
+ let E = w.newObject;
2181
+ i ? (b(($) => [E, ...$]), h(($) => ({
2182
+ ...$,
2519
2183
  current_page: 1
2520
- }))) : (M((K) => ({
2521
- ...K,
2184
+ }))) : (j(($) => ({
2185
+ ...$,
2522
2186
  current_page: 1
2523
- })), E.current_page == 1 && se()), Z(!1);
2524
- }, ye = (j) => {
2525
- let F = j.newObject, K = j.targetObject;
2526
- i ? g(
2527
- (le) => le.map(
2528
- (ee) => ee.id === K.id ? { ...ee, ...F } : ee
2187
+ })), N.current_page == 1 && y()), z(!1);
2188
+ }, oe = (w) => {
2189
+ let E = w.newObject, $ = w.targetObject;
2190
+ i ? b(
2191
+ (se) => se.map(
2192
+ (q) => q.id === $.id ? { ...q, ...E } : q
2529
2193
  )
2530
- ) : se(), x(!1);
2531
- }, ge = (j) => {
2532
- if (!j) {
2533
- G(!1), W(null);
2194
+ ) : y(), p(!1);
2195
+ }, re = (w) => {
2196
+ if (!w) {
2197
+ F(!1), U(null);
2534
2198
  return;
2535
2199
  }
2536
- i ? g(
2537
- (F) => F.filter((K) => K.id !== j.targetObject.id)
2538
- ) : u.length == 1 && E.current_page > 1 ? M((F) => ({
2539
- ...F,
2540
- current_page: F.current_page - 1
2541
- })) : se(), G(!1), W(null);
2542
- }, ve = (j) => oe(
2200
+ i ? b(
2201
+ (E) => E.filter(($) => $.id !== w.targetObject.id)
2202
+ ) : u.length == 1 && N.current_page > 1 ? j((E) => ({
2203
+ ...E,
2204
+ current_page: E.current_page - 1
2205
+ })) : y(), F(!1), U(null);
2206
+ }, ie = (w) => X(
2543
2207
  () => {
2544
- var F, K;
2545
- return (K = (F = t == null ? void 0 : t.addModal) == null ? void 0 : F.handleSubmit) == null ? void 0 : K.call(F, j);
2208
+ var E, $;
2209
+ return ($ = (E = r == null ? void 0 : r.addModal) == null ? void 0 : E.handleSubmit) == null ? void 0 : $.call(E, w);
2546
2210
  },
2547
- pe
2548
- ), fe = (j) => oe(
2211
+ ae
2212
+ ), t = (w) => X(
2549
2213
  () => {
2550
- var F, K;
2551
- return (K = (F = t == null ? void 0 : t.editModal) == null ? void 0 : F.handleSubmit) == null ? void 0 : K.call(F, j, O);
2214
+ var E, $;
2215
+ return ($ = (E = r == null ? void 0 : r.editModal) == null ? void 0 : E.handleSubmit) == null ? void 0 : $.call(E, w, A);
2552
2216
  },
2553
- ye
2554
- ), se = async () => {
2555
- y(!0), s == null || s({ ...E, ...R }).then((j) => {
2556
- g(j.data), p(j.pagination);
2557
- }).catch((j) => {
2558
- $e(j.message, { variant: "error" });
2217
+ oe
2218
+ ), y = async () => {
2219
+ M(!0), s == null || s({ ...N, ...S }).then((w) => {
2220
+ b(w.data), h(w.pagination);
2221
+ }).catch((w) => {
2222
+ ke(w.message, { variant: "error" });
2559
2223
  }).finally(() => {
2560
- y(!1);
2224
+ M(!1);
2561
2225
  });
2562
- }, Se = (j) => {
2563
- var F;
2564
- w((K) => ({
2565
- ...j
2566
- })), (F = d == null ? void 0 : d.filter) != null && F.useServerSideFilters && U((K) => !K);
2567
- }, Ee = (j, F) => j.filter(
2568
- (K) => Object.entries(F).every(([le, ee]) => K[le] === ee)
2569
- ), Te = Ke(() => {
2570
- var j;
2571
- return (j = d == null ? void 0 : d.filter) != null && j.useServerSideFilters ? data : Ee(u, R);
2572
- }, [u, R]);
2573
- return ae(() => {
2574
- se();
2226
+ }, L = (w) => {
2227
+ var E;
2228
+ R(($) => ({
2229
+ ...w
2230
+ })), (E = l == null ? void 0 : l.filter) != null && E.useServerSideFilters && B(($) => !$);
2231
+ }, G = (w, E) => w.filter(
2232
+ ($) => Object.entries(E).every(([se, q]) => $[se] === q)
2233
+ ), te = Se(() => {
2234
+ var w;
2235
+ return (w = l == null ? void 0 : l.filter) != null && w.useServerSideFilters ? data : G(u, S);
2236
+ }, [u, S]);
2237
+ return W(() => {
2238
+ y();
2575
2239
  }, [
2576
- E.search,
2577
- E.rows_per_page,
2578
- E.current_page,
2579
- L
2240
+ N.search,
2241
+ N.rows_per_page,
2242
+ N.current_page,
2243
+ P
2580
2244
  ]), /* @__PURE__ */ e.jsx(
2581
- Yr,
2245
+ Xe,
2582
2246
  {
2583
2247
  maxSnack: 3,
2584
2248
  anchorOrigin: {
@@ -2586,141 +2250,141 @@ const mr = ({ config: h }) => {
2586
2250
  horizontal: "right"
2587
2251
  },
2588
2252
  autoHideDuration: 3e3,
2589
- action: (j) => /* @__PURE__ */ e.jsx(
2253
+ action: (w) => /* @__PURE__ */ e.jsx(
2590
2254
  "button",
2591
2255
  {
2592
2256
  onClick: () => {
2593
2257
  window.dispatchEvent(
2594
- new CustomEvent("closeSnackbar", { detail: j })
2258
+ new CustomEvent("closeSnackbar", { detail: w })
2595
2259
  );
2596
2260
  },
2597
2261
  className: "p-1 hover:bg-white/20 rounded-full transition-colors duration-200 text-white flex items-center justify-center",
2598
- children: /* @__PURE__ */ e.jsx(Ae, { className: "h-4 w-4" })
2262
+ children: /* @__PURE__ */ e.jsx(je, { className: "h-4 w-4" })
2599
2263
  }
2600
2264
  ),
2601
2265
  children: /* @__PURE__ */ e.jsxs("div", { children: [
2602
2266
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6", children: [
2603
2267
  /* @__PURE__ */ e.jsxs("div", { children: [
2604
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: c }),
2605
- /* @__PURE__ */ e.jsx("p", { className: "text-md text-gray-600 dark:text-gray-400 mt-2", children: h == null ? void 0 : h.description })
2268
+ /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: d }),
2269
+ /* @__PURE__ */ e.jsx("p", { className: "text-md text-gray-600 dark:text-gray-400 mt-2", children: c == null ? void 0 : c.description })
2606
2270
  ] }),
2607
2271
  /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ e.jsxs(
2608
- Me,
2272
+ he,
2609
2273
  {
2610
- onClick: () => Z(!0),
2274
+ onClick: () => z(!0),
2611
2275
  variant: "contained",
2612
2276
  color: "primary",
2613
2277
  children: [
2614
- /* @__PURE__ */ e.jsx(Br, { className: "w-4 h-4 mr-2" }),
2615
- h.buttonText || "Add New"
2278
+ /* @__PURE__ */ e.jsx(qe, { className: "w-4 h-4 mr-2" }),
2279
+ c.buttonText || "Add New"
2616
2280
  ]
2617
2281
  }
2618
2282
  ) })
2619
2283
  ] }),
2620
2284
  /* @__PURE__ */ e.jsx(
2621
- ea,
2285
+ ca,
2622
2286
  {
2623
2287
  config: {
2624
- ...d,
2288
+ ...l,
2625
2289
  pagination: {
2626
- ...d.pagination,
2627
- ...C
2290
+ ...l.pagination,
2291
+ ...v
2628
2292
  },
2629
- data: Te,
2630
- setServerSidePaginationData: M,
2631
- onMenuAction: Q,
2293
+ data: te,
2294
+ setServerSidePaginationData: j,
2295
+ onMenuAction: V,
2632
2296
  filterConfig: n,
2633
- onFilterApply: Se,
2634
- loading: N
2297
+ onFilterApply: L,
2298
+ loading: k
2635
2299
  }
2636
2300
  }
2637
2301
  ),
2638
2302
  /* @__PURE__ */ e.jsx(
2639
- De,
2303
+ ye,
2640
2304
  {
2641
- isOpen: V,
2642
- onClose: () => Z(!1),
2643
- icon: (me = t.addModal) == null ? void 0 : me.icon,
2644
- title: ((ie = t.addModal) == null ? void 0 : ie.title) || "Add New",
2645
- size: ((de = t.addModal) == null ? void 0 : de.size) || "md",
2305
+ isOpen: Y,
2306
+ onClose: () => z(!1),
2307
+ icon: (ne = r.addModal) == null ? void 0 : ne.icon,
2308
+ title: ((I = r.addModal) == null ? void 0 : I.title) || "Add New",
2309
+ size: ((J = r.addModal) == null ? void 0 : J.size) || "md",
2646
2310
  onFormSubmit: () => {
2647
- var j;
2648
- return (j = document.querySelector("#addForm")) == null ? void 0 : j.requestSubmit();
2311
+ var w;
2312
+ return (w = document.querySelector("#addForm")) == null ? void 0 : w.requestSubmit();
2649
2313
  },
2650
- loadingBtn: v,
2651
- actionButtons: t.addModal.actionButtons,
2314
+ loadingBtn: x,
2315
+ actionButtons: r.addModal.actionButtons,
2652
2316
  children: /* @__PURE__ */ e.jsx(
2653
- ir,
2317
+ Oe,
2654
2318
  {
2655
- config: (t == null ? void 0 : t.addModal) || [],
2656
- onSubmit: ve,
2319
+ config: (r == null ? void 0 : r.addModal) || [],
2320
+ onSubmit: ie,
2657
2321
  initialData: {},
2658
- loading: v
2322
+ loading: x
2659
2323
  }
2660
2324
  )
2661
2325
  }
2662
2326
  ),
2663
2327
  /* @__PURE__ */ e.jsx(
2664
- De,
2328
+ ye,
2665
2329
  {
2666
- isOpen: $,
2667
- onClose: () => x(!1),
2668
- icon: (xe = t.editModal) == null ? void 0 : xe.icon,
2669
- title: ((ce = t.editModal) == null ? void 0 : ce.title) || "Edit",
2670
- size: ((Ne = t.editModal) == null ? void 0 : Ne.size) || "md",
2330
+ isOpen: O,
2331
+ onClose: () => p(!1),
2332
+ icon: (le = r.editModal) == null ? void 0 : le.icon,
2333
+ title: ((ue = r.editModal) == null ? void 0 : ue.title) || "Edit",
2334
+ size: ((me = r.editModal) == null ? void 0 : me.size) || "md",
2671
2335
  onFormSubmit: () => {
2672
- var j;
2673
- return (j = document.querySelector("#editForm")) == null ? void 0 : j.requestSubmit();
2336
+ var w;
2337
+ return (w = document.querySelector("#editForm")) == null ? void 0 : w.requestSubmit();
2674
2338
  },
2675
- actionButtons: t.editModal.actionButtons,
2676
- loadingBtn: v,
2339
+ actionButtons: r.editModal.actionButtons,
2340
+ loadingBtn: x,
2677
2341
  children: /* @__PURE__ */ e.jsx(
2678
- ir,
2342
+ Oe,
2679
2343
  {
2680
- config: t.editModal || [],
2681
- onSubmit: fe,
2682
- initialData: O,
2683
- loading: v
2344
+ config: r.editModal || [],
2345
+ onSubmit: t,
2346
+ initialData: A,
2347
+ loading: x
2684
2348
  }
2685
2349
  )
2686
2350
  }
2687
2351
  ),
2688
- B && /* @__PURE__ */ e.jsx(
2689
- De,
2352
+ _ && /* @__PURE__ */ e.jsx(
2353
+ ye,
2690
2354
  {
2691
- isOpen: B,
2692
- onClose: (j) => {
2693
- ge(j);
2355
+ isOpen: _,
2356
+ onClose: (w) => {
2357
+ re(w);
2694
2358
  },
2695
- icon: ((we = t.deleteModal) == null ? void 0 : we.icon) || /* @__PURE__ */ e.jsx(He, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
2696
- title: ((l = t.deleteModal) == null ? void 0 : l.title) || "Confirm Delete",
2697
- size: ((m = t.deleteModal) == null ? void 0 : m.size) || "md",
2698
- loading: v,
2699
- actionButtons: t.deleteModal.actionButtons,
2700
- executeFunction: oe,
2701
- selectedItem: O,
2359
+ icon: ((xe = r.deleteModal) == null ? void 0 : xe.icon) || /* @__PURE__ */ e.jsx(Re, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
2360
+ title: ((o = r.deleteModal) == null ? void 0 : o.title) || "Confirm Delete",
2361
+ size: ((g = r.deleteModal) == null ? void 0 : g.size) || "md",
2362
+ loading: x,
2363
+ actionButtons: r.deleteModal.actionButtons,
2364
+ executeFunction: X,
2365
+ selectedItem: A,
2702
2366
  children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ e.jsxs("div", { children: [
2703
- /* @__PURE__ */ e.jsx("p", { className: "text-md text-gray-700 dark:text-white", children: ((A = t.deleteModal) == null ? void 0 : A.confirmText) || "Are you sure you want to delete this item?" }),
2704
- ((H = t.deleteModal) == null ? void 0 : H.referenceKey) && /* @__PURE__ */ e.jsx("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: O[(z = t.deleteModal) == null ? void 0 : z.referenceKey] })
2367
+ /* @__PURE__ */ e.jsx("p", { className: "text-md text-gray-700 dark:text-white", children: ((D = r.deleteModal) == null ? void 0 : D.confirmText) || "Are you sure you want to delete this item?" }),
2368
+ ((H = r.deleteModal) == null ? void 0 : H.referenceKey) && /* @__PURE__ */ e.jsx("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: A[(K = r.deleteModal) == null ? void 0 : K.referenceKey] })
2705
2369
  ] }) })
2706
2370
  }
2707
2371
  ),
2708
- t.viewModal && /* @__PURE__ */ e.jsx(
2709
- De,
2372
+ r.viewModal && /* @__PURE__ */ e.jsx(
2373
+ ye,
2710
2374
  {
2711
- isOpen: T,
2375
+ isOpen: C,
2712
2376
  onClose: () => {
2713
- S(!1), W(null);
2377
+ f(!1), U(null);
2714
2378
  },
2715
- icon: (te = t.viewModal) == null ? void 0 : te.icon,
2716
- title: ((X = t.viewModal) == null ? void 0 : X.title) || "View Details",
2717
- size: ((ue = t.viewModal) == null ? void 0 : ue.size) || "lg",
2718
- footerConfig: t == null ? void 0 : t.viewModal.footer,
2719
- children: (je = t.viewModal) != null && je.component ? /* @__PURE__ */ e.jsx(t.viewModal.component, { data: O }) : /* @__PURE__ */ e.jsx(
2720
- ra,
2379
+ icon: (Q = r.viewModal) == null ? void 0 : Q.icon,
2380
+ title: ((Z = r.viewModal) == null ? void 0 : Z.title) || "View Details",
2381
+ size: ((de = r.viewModal) == null ? void 0 : de.size) || "lg",
2382
+ footerConfig: r == null ? void 0 : r.viewModal.footer,
2383
+ children: (be = r.viewModal) != null && be.component ? /* @__PURE__ */ e.jsx(r.viewModal.component, { data: A }) : /* @__PURE__ */ e.jsx(
2384
+ ua,
2721
2385
  {
2722
- data: O,
2723
- config: t.viewModal || {}
2386
+ data: A,
2387
+ config: r.viewModal || {}
2724
2388
  }
2725
2389
  )
2726
2390
  }
@@ -2728,7 +2392,7 @@ const mr = ({ config: h }) => {
2728
2392
  ] })
2729
2393
  }
2730
2394
  );
2731
- }, Ve = a.shape({
2395
+ }, Te = a.shape({
2732
2396
  value: a.oneOfType([
2733
2397
  a.string,
2734
2398
  a.number,
@@ -2736,18 +2400,18 @@ const mr = ({ config: h }) => {
2736
2400
  ]).isRequired,
2737
2401
  label: a.string.isRequired,
2738
2402
  color: a.string
2739
- }), Ge = a.shape({
2403
+ }), we = a.shape({
2740
2404
  type: a.string.isRequired,
2741
2405
  label: a.string.isRequired,
2742
2406
  color: a.string,
2743
2407
  variant: a.string,
2744
2408
  onClick: a.func
2745
- }), aa = a.shape({
2409
+ }), ha = a.shape({
2746
2410
  title: a.string.isRequired,
2747
2411
  type: a.string.isRequired,
2748
2412
  variant: a.string,
2749
2413
  icon: a.node
2750
- }), ta = a.shape({
2414
+ }), ba = a.shape({
2751
2415
  key: a.string.isRequired,
2752
2416
  title: a.string,
2753
2417
  type: a.string,
@@ -2756,12 +2420,12 @@ const mr = ({ config: h }) => {
2756
2420
  subtitleKey: a.string,
2757
2421
  onClickDetails: a.bool,
2758
2422
  variant: a.string,
2759
- chipOptions: a.arrayOf(Ve),
2423
+ chipOptions: a.arrayOf(Te),
2760
2424
  defaultColor: a.string,
2761
2425
  className: a.string,
2762
2426
  format: a.string,
2763
- menuList: a.arrayOf(aa)
2764
- }), Ye = a.shape({
2427
+ menuList: a.arrayOf(ha)
2428
+ }), Ne = a.shape({
2765
2429
  key: a.string.isRequired,
2766
2430
  label: a.string,
2767
2431
  type: a.string.isRequired,
@@ -2778,8 +2442,8 @@ const mr = ({ config: h }) => {
2778
2442
  rows: a.number,
2779
2443
  text: a.string,
2780
2444
  editorKey: a.string,
2781
- options: a.arrayOf(Ve)
2782
- }), na = a.shape({
2445
+ options: a.arrayOf(Te)
2446
+ }), ga = a.shape({
2783
2447
  key: a.string,
2784
2448
  label: a.string,
2785
2449
  type: a.string,
@@ -2789,12 +2453,12 @@ const mr = ({ config: h }) => {
2789
2453
  blockClass: a.string,
2790
2454
  icon: a.node,
2791
2455
  variant: a.string,
2792
- chipOptions: a.arrayOf(Ve),
2456
+ chipOptions: a.arrayOf(Te),
2793
2457
  defaultColor: a.string,
2794
2458
  className: a.string,
2795
2459
  format: a.string
2796
2460
  });
2797
- mr.propTypes = {
2461
+ Ke.propTypes = {
2798
2462
  config: a.shape({
2799
2463
  title: a.string.isRequired,
2800
2464
  description: a.string,
@@ -2803,7 +2467,7 @@ mr.propTypes = {
2803
2467
  isStaticData: a.bool,
2804
2468
  /* ================= TABLE CONFIG ================= */
2805
2469
  tableConfig: a.shape({
2806
- table_head: a.arrayOf(ta).isRequired,
2470
+ table_head: a.arrayOf(ba).isRequired,
2807
2471
  search: a.shape({
2808
2472
  enabled: a.bool,
2809
2473
  useServerSideSearch: a.bool,
@@ -2824,24 +2488,24 @@ mr.propTypes = {
2824
2488
  title: a.string.isRequired,
2825
2489
  size: a.string,
2826
2490
  formClass: a.string,
2827
- formFields: a.arrayOf(Ye),
2491
+ formFields: a.arrayOf(Ne),
2828
2492
  handleSubmit: a.func.isRequired,
2829
- actionButtons: a.arrayOf(Ge)
2493
+ actionButtons: a.arrayOf(we)
2830
2494
  }),
2831
2495
  editModal: a.shape({
2832
2496
  title: a.string.isRequired,
2833
2497
  size: a.string,
2834
2498
  formClass: a.string,
2835
- formFields: a.arrayOf(Ye),
2499
+ formFields: a.arrayOf(Ne),
2836
2500
  handleSubmit: a.func.isRequired,
2837
- actionButtons: a.arrayOf(Ge)
2501
+ actionButtons: a.arrayOf(we)
2838
2502
  }),
2839
2503
  deleteModal: a.shape({
2840
2504
  title: a.string.isRequired,
2841
2505
  size: a.string,
2842
2506
  confirmText: a.string,
2843
2507
  referenceKey: a.string,
2844
- actionButtons: a.arrayOf(Ge)
2508
+ actionButtons: a.arrayOf(we)
2845
2509
  }),
2846
2510
  viewModal: a.shape({
2847
2511
  title: a.string.isRequired,
@@ -2849,7 +2513,7 @@ mr.propTypes = {
2849
2513
  // 👇 This covers your commented code:
2850
2514
  component: a.elementType,
2851
2515
  // for custom component like TeamMemberDetail
2852
- fields: a.arrayOf(na),
2516
+ fields: a.arrayOf(ga),
2853
2517
  footer: a.shape({
2854
2518
  cancelButton: a.bool,
2855
2519
  cancelText: a.string
@@ -2858,14 +2522,14 @@ mr.propTypes = {
2858
2522
  }),
2859
2523
  /* ================= FILTER CONFIG ================= */
2860
2524
  filterConfig: a.shape({
2861
- fields: a.arrayOf(Ye)
2525
+ fields: a.arrayOf(Ne)
2862
2526
  })
2863
2527
  }).isRequired
2864
2528
  };
2865
- function ha(h) {
2866
- return console.info(h, "props passed"), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(mr, { config: h.config }) });
2529
+ function ka(c) {
2530
+ return console.info(c, "props passed"), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(Ke, { config: c.config }) });
2867
2531
  }
2868
2532
  export {
2869
- ha as default
2533
+ ka as default
2870
2534
  };
2871
2535
  //# sourceMappingURL=index.es.js.map