@arudovwen/form-builder-react 1.4.34 → 1.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import ri, { createContext as ro, useState as R, useMemo as ii, useEffect as K, forwardRef as ye, createElement as Sn, Fragment as qi, useContext as Ni, useRef as Ii, useCallback as Y, memo as an } from "react";
2
- import { toast as Si, ToastContainer as Ae } from "react-toastify";
1
+ import ri, { createContext as ro, useState as R, useMemo as ii, useEffect as O, forwardRef as ye, createElement as Sn, Fragment as qi, useContext as Ni, useRef as Ii, useCallback as Y, memo as an } from "react";
3
2
  import { v4 as xi } from "uuid";
4
3
  import mo from "react-datepicker";
5
- import { Listbox as ei, Transition as Ri, Combobox as Pi, ComboboxInput as bo, ComboboxButton as vo, ComboboxOptions as ho, ComboboxOption as po } from "@headlessui/react";
4
+ import { Listbox as oi, Transition as Ri, Combobox as Pi, ComboboxInput as bo, ComboboxButton as vo, ComboboxOptions as ho, ComboboxOption as po } from "@headlessui/react";
5
+ import { toast as Si, Toaster as Ae } from "sonner";
6
6
  import Di from "axios";
7
7
  import sn from "react-currency-input-field";
8
8
  import { appendErrors as go, useForm as En, useFieldArray as mn, useWatch as fo, FormProvider as xo } from "react-hook-form";
@@ -27,11 +27,11 @@ function jo() {
27
27
  ie = 1;
28
28
  var i = ri, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
29
29
  function d(t, u, r) {
30
- var c, h = {}, v = null, g = null;
31
- r !== void 0 && (v = "" + r), u.key !== void 0 && (v = "" + u.key), u.ref !== void 0 && (g = u.ref);
32
- for (c in u) s.call(u, c) && !l.hasOwnProperty(c) && (h[c] = u[c]);
33
- if (t && t.defaultProps) for (c in u = t.defaultProps, u) h[c] === void 0 && (h[c] = u[c]);
34
- return { $$typeof: e, type: t, key: v, ref: g, props: h, _owner: a.current };
30
+ var c, v = {}, h = null, g = null;
31
+ r !== void 0 && (h = "" + r), u.key !== void 0 && (h = "" + u.key), u.ref !== void 0 && (g = u.ref);
32
+ for (c in u) s.call(u, c) && !l.hasOwnProperty(c) && (v[c] = u[c]);
33
+ if (t && t.defaultProps) for (c in u = t.defaultProps, u) v[c] === void 0 && (v[c] = u[c]);
34
+ return { $$typeof: e, type: t, key: h, ref: g, props: v, _owner: a.current };
35
35
  }
36
36
  return Gi.Fragment = o, Gi.jsx = d, Gi.jsxs = d, Gi;
37
37
  }
@@ -48,7 +48,7 @@ var Hi = {};
48
48
  var ne;
49
49
  function ko() {
50
50
  return ne || (ne = 1, process.env.NODE_ENV !== "production" && function() {
51
- var i = ri, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), t = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), y = Symbol.iterator, f = "@@iterator";
51
+ var i = ri, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), t = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), y = Symbol.iterator, f = "@@iterator";
52
52
  function m(b) {
53
53
  if (b === null || typeof b != "object")
54
54
  return null;
@@ -67,16 +67,16 @@ function ko() {
67
67
  {
68
68
  var V = p.ReactDebugCurrentFrame, X = V.getStackAddendum();
69
69
  X !== "" && (k += "%s", T = T.concat([X]));
70
- var ni = T.map(function(q) {
71
- return String(q);
70
+ var ei = T.map(function($) {
71
+ return String($);
72
72
  });
73
- ni.unshift("Warning: " + k), Function.prototype.apply.call(console[b], console, ni);
73
+ ei.unshift("Warning: " + k), Function.prototype.apply.call(console[b], console, ei);
74
74
  }
75
75
  }
76
- var N = !1, S = !1, A = !1, C = !1, I = !1, Q;
76
+ var N = !1, S = !1, A = !1, C = !1, K = !1, Q;
77
77
  Q = Symbol.for("react.module.reference");
78
78
  function W(b) {
79
- return !!(typeof b == "string" || typeof b == "function" || b === s || b === l || I || b === a || b === r || b === c || C || b === g || N || S || A || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === h || b.$$typeof === d || b.$$typeof === t || b.$$typeof === u || // This needs to include all possible module reference object
79
+ return !!(typeof b == "string" || typeof b == "function" || b === s || b === l || K || b === a || b === r || b === c || C || b === g || N || S || A || typeof b == "object" && b !== null && (b.$$typeof === h || b.$$typeof === v || b.$$typeof === d || b.$$typeof === t || b.$$typeof === u || // This needs to include all possible module reference object
80
80
  // types supported by any Flight configuration anywhere since
81
81
  // we don't know which Flight build this will end up being used
82
82
  // with.
@@ -123,13 +123,13 @@ function ko() {
123
123
  return M(T._context) + ".Provider";
124
124
  case u:
125
125
  return Z(b, b.render, "ForwardRef");
126
- case h:
126
+ case v:
127
127
  var V = b.displayName || null;
128
128
  return V !== null ? V : E(b.type) || "Memo";
129
- case v: {
130
- var X = b, ni = X._payload, q = X._init;
129
+ case h: {
130
+ var X = b, ei = X._payload, $ = X._init;
131
131
  try {
132
- return E(q(ni));
132
+ return E($(ei));
133
133
  } catch (_) {
134
134
  return null;
135
135
  }
@@ -137,14 +137,14 @@ function ko() {
137
137
  }
138
138
  return null;
139
139
  }
140
- var P = Object.assign, L = 0, G, $, w, D, z, ai, vi;
140
+ var P = Object.assign, L = 0, G, q, w, I, U, ni, vi;
141
141
  function bi() {
142
142
  }
143
143
  bi.__reactDisabledLog = !0;
144
- function di() {
144
+ function ai() {
145
145
  {
146
146
  if (L === 0) {
147
- G = console.log, $ = console.info, w = console.warn, D = console.error, z = console.group, ai = console.groupCollapsed, vi = console.groupEnd;
147
+ G = console.log, q = console.info, w = console.warn, I = console.error, U = console.group, ni = console.groupCollapsed, vi = console.groupEnd;
148
148
  var b = {
149
149
  configurable: !0,
150
150
  enumerable: !0,
@@ -177,19 +177,19 @@ function ko() {
177
177
  value: G
178
178
  }),
179
179
  info: P({}, b, {
180
- value: $
180
+ value: q
181
181
  }),
182
182
  warn: P({}, b, {
183
183
  value: w
184
184
  }),
185
185
  error: P({}, b, {
186
- value: D
186
+ value: I
187
187
  }),
188
188
  group: P({}, b, {
189
- value: z
189
+ value: U
190
190
  }),
191
191
  groupCollapsed: P({}, b, {
192
- value: ai
192
+ value: ni
193
193
  }),
194
194
  groupEnd: P({}, b, {
195
195
  value: vi
@@ -199,62 +199,62 @@ function ko() {
199
199
  L < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
200
200
  }
201
201
  }
202
- var O = p.ReactCurrentDispatcher, si;
202
+ var D = p.ReactCurrentDispatcher, li;
203
203
  function ui(b, k, T) {
204
204
  {
205
- if (si === void 0)
205
+ if (li === void 0)
206
206
  try {
207
207
  throw Error();
208
208
  } catch (X) {
209
209
  var V = X.stack.trim().match(/\n( *(at )?)/);
210
- si = V && V[1] || "";
210
+ li = V && V[1] || "";
211
211
  }
212
212
  return `
213
- ` + si + b;
213
+ ` + li + b;
214
214
  }
215
215
  }
216
- var oi = !1, li;
216
+ var si = !1, di;
217
217
  {
218
218
  var ji = typeof WeakMap == "function" ? WeakMap : Map;
219
- li = new ji();
219
+ di = new ji();
220
220
  }
221
221
  function yi(b, k) {
222
- if (!b || oi)
222
+ if (!b || si)
223
223
  return "";
224
224
  {
225
- var T = li.get(b);
225
+ var T = di.get(b);
226
226
  if (T !== void 0)
227
227
  return T;
228
228
  }
229
229
  var V;
230
- oi = !0;
230
+ si = !0;
231
231
  var X = Error.prepareStackTrace;
232
232
  Error.prepareStackTrace = void 0;
233
- var ni;
234
- ni = O.current, O.current = null, di();
233
+ var ei;
234
+ ei = D.current, D.current = null, ai();
235
235
  try {
236
236
  if (k) {
237
- var q = function() {
237
+ var $ = function() {
238
238
  throw Error();
239
239
  };
240
- if (Object.defineProperty(q.prototype, "props", {
240
+ if (Object.defineProperty($.prototype, "props", {
241
241
  set: function() {
242
242
  throw Error();
243
243
  }
244
244
  }), typeof Reflect == "object" && Reflect.construct) {
245
245
  try {
246
- Reflect.construct(q, []);
246
+ Reflect.construct($, []);
247
247
  } catch (gi) {
248
248
  V = gi;
249
249
  }
250
- Reflect.construct(b, [], q);
250
+ Reflect.construct(b, [], $);
251
251
  } else {
252
252
  try {
253
- q.call();
253
+ $.call();
254
254
  } catch (gi) {
255
255
  V = gi;
256
256
  }
257
- b.call(q.prototype);
257
+ b.call($.prototype);
258
258
  }
259
259
  } else {
260
260
  try {
@@ -277,17 +277,17 @@ function ko() {
277
277
  if (ci--, mi--, mi < 0 || _[ci] !== hi[mi]) {
278
278
  var Ai = `
279
279
  ` + _[ci].replace(" at new ", " at ");
280
- return b.displayName && Ai.includes("<anonymous>") && (Ai = Ai.replace("<anonymous>", b.displayName)), typeof b == "function" && li.set(b, Ai), Ai;
280
+ return b.displayName && Ai.includes("<anonymous>") && (Ai = Ai.replace("<anonymous>", b.displayName)), typeof b == "function" && di.set(b, Ai), Ai;
281
281
  }
282
282
  while (ci >= 1 && mi >= 0);
283
283
  break;
284
284
  }
285
285
  }
286
286
  } finally {
287
- oi = !1, O.current = ni, H(), Error.prepareStackTrace = X;
287
+ si = !1, D.current = ei, H(), Error.prepareStackTrace = X;
288
288
  }
289
289
  var Li = b ? b.displayName || b.name : "", Ti = Li ? ui(Li) : "";
290
- return typeof b == "function" && li.set(b, Ti), Ti;
290
+ return typeof b == "function" && di.set(b, Ti), Ti;
291
291
  }
292
292
  function ki(b, k, T) {
293
293
  return yi(b, !1);
@@ -313,13 +313,13 @@ function ko() {
313
313
  switch (b.$$typeof) {
314
314
  case u:
315
315
  return ki(b.render);
316
- case h:
316
+ case v:
317
317
  return zi(b.type, k, T);
318
- case v: {
319
- var V = b, X = V._payload, ni = V._init;
318
+ case h: {
319
+ var V = b, X = V._payload, ei = V._init;
320
320
  try {
321
- return zi(ni(X), k, T);
322
- } catch (q) {
321
+ return zi(ei(X), k, T);
322
+ } catch ($) {
323
323
  }
324
324
  }
325
325
  }
@@ -335,20 +335,20 @@ function ko() {
335
335
  }
336
336
  function Fe(b, k, T, V, X) {
337
337
  {
338
- var ni = Function.call.bind(Ki);
339
- for (var q in b)
340
- if (ni(b, q)) {
338
+ var ei = Function.call.bind(Ki);
339
+ for (var $ in b)
340
+ if (ei(b, $)) {
341
341
  var _ = void 0;
342
342
  try {
343
- if (typeof b[q] != "function") {
344
- var hi = Error((V || "React class") + ": " + T + " type `" + q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof b[q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
343
+ if (typeof b[$] != "function") {
344
+ var hi = Error((V || "React class") + ": " + T + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof b[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
345
345
  throw hi.name = "Invariant Violation", hi;
346
346
  }
347
- _ = b[q](k, q, V, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
+ _ = b[$](k, $, V, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
348
348
  } catch (ci) {
349
349
  _ = ci;
350
350
  }
351
- _ && !(_ instanceof Error) && (_i(X), x("%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).", V || "React class", T, q, typeof _), _i(null)), _ instanceof Error && !(_.message in Gn) && (Gn[_.message] = !0, _i(X), x("Failed %s type: %s", T, _.message), _i(null));
351
+ _ && !(_ instanceof Error) && (_i(X), x("%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).", V || "React class", T, $, typeof _), _i(null)), _ instanceof Error && !(_.message in Gn) && (Gn[_.message] = !0, _i(X), x("Failed %s type: %s", T, _.message), _i(null));
352
352
  }
353
353
  }
354
354
  }
@@ -423,7 +423,7 @@ function ko() {
423
423
  });
424
424
  }
425
425
  }
426
- var Qe = function(b, k, T, V, X, ni, q) {
426
+ var Qe = function(b, k, T, V, X, ei, $) {
427
427
  var _ = {
428
428
  // This tag allows us to uniquely identify this as a React Element
429
429
  $$typeof: e,
@@ -431,9 +431,9 @@ function ko() {
431
431
  type: b,
432
432
  key: k,
433
433
  ref: T,
434
- props: q,
434
+ props: $,
435
435
  // Record the component responsible for creating this element.
436
- _owner: ni
436
+ _owner: ei
437
437
  };
438
438
  return _._store = {}, Object.defineProperty(_._store, "validated", {
439
439
  configurable: !1,
@@ -454,20 +454,20 @@ function ko() {
454
454
  };
455
455
  function Xe(b, k, T, V, X) {
456
456
  {
457
- var ni, q = {}, _ = null, hi = null;
457
+ var ei, $ = {}, _ = null, hi = null;
458
458
  T !== void 0 && (Fn(T), _ = "" + T), Ye(k) && (Fn(k.key), _ = "" + k.key), Je(k) && (hi = k.ref, Ze(k, X));
459
- for (ni in k)
460
- Ki.call(k, ni) && !_e.hasOwnProperty(ni) && (q[ni] = k[ni]);
459
+ for (ei in k)
460
+ Ki.call(k, ei) && !_e.hasOwnProperty(ei) && ($[ei] = k[ei]);
461
461
  if (b && b.defaultProps) {
462
462
  var ci = b.defaultProps;
463
- for (ni in ci)
464
- q[ni] === void 0 && (q[ni] = ci[ni]);
463
+ for (ei in ci)
464
+ $[ei] === void 0 && ($[ei] = ci[ei]);
465
465
  }
466
466
  if (_ || hi) {
467
467
  var mi = typeof b == "function" ? b.displayName || b.name || "Unknown" : b;
468
- _ && qe(q, mi), hi && $e(q, mi);
468
+ _ && qe($, mi), hi && $e($, mi);
469
469
  }
470
- return Qe(b, _, hi, X, V, Wn.current, q);
470
+ return Qe(b, _, hi, X, V, Wn.current, $);
471
471
  }
472
472
  }
473
473
  var un = p.ReactCurrentOwner, _n = p.ReactDebugCurrentFrame;
@@ -538,8 +538,8 @@ Check the top-level render call using <` + T + ">.");
538
538
  else if (b) {
539
539
  var X = m(b);
540
540
  if (typeof X == "function" && X !== b.entries)
541
- for (var ni = X.call(b), q; !(q = ni.next()).done; )
542
- cn(q.value) && Zn(q.value, k);
541
+ for (var ei = X.call(b), $; !($ = ei.next()).done; )
542
+ cn($.value) && Zn($.value, k);
543
543
  }
544
544
  }
545
545
  }
@@ -553,7 +553,7 @@ Check the top-level render call using <` + T + ">.");
553
553
  T = k.propTypes;
554
554
  else if (typeof k == "object" && (k.$$typeof === u || // Note: Memo only checks outer props here.
555
555
  // Inner props are checked in the reconciler.
556
- k.$$typeof === h))
556
+ k.$$typeof === v))
557
557
  T = k.propTypes;
558
558
  else
559
559
  return;
@@ -581,10 +581,10 @@ Check the top-level render call using <` + T + ">.");
581
581
  }
582
582
  }
583
583
  var $n = {};
584
- function Qn(b, k, T, V, X, ni) {
584
+ function Qn(b, k, T, V, X, ei) {
585
585
  {
586
- var q = W(b);
587
- if (!q) {
586
+ var $ = W(b);
587
+ if (!$) {
588
588
  var _ = "";
589
589
  (b === void 0 || typeof b == "object" && b !== null && Object.keys(b).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.");
590
590
  var hi = io();
@@ -592,10 +592,10 @@ Check the top-level render call using <` + T + ">.");
592
592
  var ci;
593
593
  b === null ? ci = "null" : dn(b) ? ci = "array" : b !== void 0 && b.$$typeof === e ? (ci = "<" + (E(b.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : ci = typeof b, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ci, _);
594
594
  }
595
- var mi = Xe(b, k, T, X, ni);
595
+ var mi = Xe(b, k, T, X, ei);
596
596
  if (mi == null)
597
597
  return mi;
598
- if (q) {
598
+ if ($) {
599
599
  var Ai = k.children;
600
600
  if (Ai !== void 0)
601
601
  if (V)
@@ -647,12 +647,12 @@ const pi = ro(void 0), oe = {
647
647
  questionData: [],
648
648
  disabled: !1
649
649
  }, Se = ({ children: i }) => {
650
- const [e, o] = R({}), [s, a] = R({}), [l, d] = R([oe]), [t, u] = R(!1), [r, c] = R(null), [h, v] = R([
650
+ const [e, o] = R({}), [s, a] = R({}), [l, d] = R([oe]), [t, u] = R(!1), [r, c] = R(null), [v, h] = R([
651
651
  0
652
652
  ]), [g, y] = R(""), f = ri.useCallback(() => {
653
653
  }, []), m = ri.useCallback(() => {
654
654
  const M = xi();
655
- d((E) => [...E, { ...oe, id: M }]), c(M), v([l.length]);
655
+ d((E) => [...E, { ...oe, id: M }]), c(M), h([l.length]);
656
656
  }, [l]), p = ri.useCallback((M) => {
657
657
  d(
658
658
  (E) => E.filter((P) => P.id !== M)
@@ -664,10 +664,10 @@ const pi = ro(void 0), oe = {
664
664
  );
665
665
  L && d(
666
666
  (G) => G == null ? void 0 : G.map(
667
- ($) => $.id === E ? {
668
- ...$,
669
- questionData: $.questionData.filter((w) => L.type === "grid" ? w.gridId !== L.id && w.id !== L.id : w.id !== M)
670
- } : $
667
+ (q) => q.id === E ? {
668
+ ...q,
669
+ questionData: q.questionData.filter((w) => L.type === "grid" ? w.gridId !== L.id && w.id !== L.id : w.id !== M)
670
+ } : q
671
671
  )
672
672
  );
673
673
  },
@@ -680,40 +680,40 @@ const pi = ro(void 0), oe = {
680
680
  (w) => w.id === M
681
681
  );
682
682
  if (L === -1) return;
683
- const G = P.questionData[L], $ = (w, D = {}) => ({
683
+ const G = P.questionData[L], q = (w, I = {}) => ({
684
684
  ...JSON.parse(JSON.stringify(w)),
685
685
  id: xi(),
686
- ...D
686
+ ...I
687
687
  });
688
688
  d(
689
- (w) => w == null ? void 0 : w.map((D) => {
690
- var ai;
691
- if (D.id !== E) return D;
692
- const z = [...D.questionData];
689
+ (w) => w == null ? void 0 : w.map((I) => {
690
+ var ni;
691
+ if (I.id !== E) return I;
692
+ const U = [...I.questionData];
693
693
  if (G.type === "grid") {
694
- const vi = (ai = z == null ? void 0 : z.map((oi, li) => ({ e: oi, i: li })).filter(
695
- ({ e: oi }) => oi.id === G.id || oi.gridId === G.id
696
- )) == null ? void 0 : ai.map(({ i: oi }) => oi), bi = vi.length ? Math.max(...vi) + 1 : L + 1, di = xi(), H = $(G, {});
697
- H.id = di;
698
- const O = z.filter((oi) => oi.gridId === G.id), si = O == null ? void 0 : O.map(
699
- (oi) => $(oi, { gridId: di })
694
+ const vi = (ni = U == null ? void 0 : U.map((si, di) => ({ e: si, i: di })).filter(
695
+ ({ e: si }) => si.id === G.id || si.gridId === G.id
696
+ )) == null ? void 0 : ni.map(({ i: si }) => si), bi = vi.length ? Math.max(...vi) + 1 : L + 1, ai = xi(), H = q(G, {});
697
+ H.id = ai;
698
+ const D = U.filter((si) => si.gridId === G.id), li = D == null ? void 0 : D.map(
699
+ (si) => q(si, { gridId: ai })
700
700
  ), ui = [
701
- ...z.slice(0, bi),
701
+ ...U.slice(0, bi),
702
702
  H,
703
- ...si,
704
- ...z.slice(bi)
703
+ ...li,
704
+ ...U.slice(bi)
705
705
  ];
706
- return { ...D, questionData: ui };
706
+ return { ...I, questionData: ui };
707
707
  } else {
708
- const vi = $(
708
+ const vi = q(
709
709
  G,
710
710
  G.gridId ? { gridId: G.gridId } : {}
711
711
  ), bi = [
712
- ...z.slice(0, L + 1),
712
+ ...U.slice(0, L + 1),
713
713
  vi,
714
- ...z.slice(L + 1)
714
+ ...U.slice(L + 1)
715
715
  ];
716
- return { ...D, questionData: bi };
716
+ return { ...I, questionData: bi };
717
717
  }
718
718
  })
719
719
  );
@@ -758,19 +758,19 @@ const pi = ro(void 0), oe = {
758
758
  d(
759
759
  (L) => L == null ? void 0 : L.map(
760
760
  (G) => {
761
- var $;
761
+ var q;
762
762
  return G.id === P ? {
763
763
  ...G,
764
- questionData: ($ = G.questionData) == null ? void 0 : $.map(
764
+ questionData: (q = G.questionData) == null ? void 0 : q.map(
765
765
  (w) => {
766
- var D;
766
+ var I;
767
767
  return w.type === "grid" && w.gridData ? {
768
768
  ...w,
769
- gridData: (D = w.gridData) == null ? void 0 : D.map(
770
- (z, ai) => ai === M ? {
771
- ...z,
769
+ gridData: (I = w.gridData) == null ? void 0 : I.map(
770
+ (U, ni) => ni === M ? {
771
+ ...U,
772
772
  ...E
773
- } : z
773
+ } : U
774
774
  ).concat(
775
775
  M >= w.gridData.length ? { ...E } : []
776
776
  )
@@ -783,7 +783,7 @@ const pi = ro(void 0), oe = {
783
783
  );
784
784
  },
785
785
  []
786
- ), I = ri.useCallback((M, E) => {
786
+ ), K = ri.useCallback((M, E) => {
787
787
  d(
788
788
  (P) => P == null ? void 0 : P.map(
789
789
  (L) => {
@@ -791,7 +791,7 @@ const pi = ro(void 0), oe = {
791
791
  return L.id === E ? {
792
792
  ...L,
793
793
  questionData: (G = L.questionData) == null ? void 0 : G.map(
794
- ($) => $.id === M.id ? { ...$, ...M } : $
794
+ (q) => q.id === M.id ? { ...q, ...M } : q
795
795
  )
796
796
  } : L;
797
797
  }
@@ -804,47 +804,52 @@ const pi = ro(void 0), oe = {
804
804
  sectionId: P,
805
805
  targetIndex: L,
806
806
  targetId: G,
807
- targetGridId: $,
807
+ targetGridId: q,
808
808
  targetCol: w
809
809
  } = M;
810
810
  d(
811
- (D) => D.map((z) => {
812
- if (z.id !== P) return z;
813
- const ai = [...z.questionData], vi = ai.findIndex((di) => di.id === E);
814
- if (vi === -1) return z;
815
- const bi = { ...ai[vi] };
816
- if ($ !== void 0 && w !== void 0) {
817
- if (bi.type === "grid") return z;
818
- const di = ai.findIndex(
819
- (O) => {
820
- var si;
821
- return O.id !== E && O.gridId === $ && ((si = O.gridPosition) == null ? void 0 : si.col) === w;
811
+ (I) => I.map((U) => {
812
+ if (U.id !== P) return U;
813
+ const ni = [...U.questionData], vi = ni.findIndex((ai) => ai.id === E);
814
+ if (vi === -1) return U;
815
+ const bi = { ...ni[vi] };
816
+ if (q !== void 0 && w !== void 0) {
817
+ if (bi.type === "grid") return U;
818
+ const ai = ni.findIndex(
819
+ (D) => {
820
+ var li;
821
+ return D.id !== E && D.gridId === q && ((li = D.gridPosition) == null ? void 0 : li.col) === w;
822
822
  }
823
823
  );
824
- let H = ai.map(
825
- (O) => O.id === E ? {
826
- ...O,
827
- gridId: $,
824
+ let H = ni.map(
825
+ (D) => D.id === E ? {
826
+ ...D,
827
+ gridId: q,
828
828
  gridPosition: { col: w }
829
- } : O
829
+ } : D
830
830
  );
831
- return di !== -1 && (H = H.map((O, si) => {
832
- if (si !== di) return O;
833
- const ui = { ...O };
831
+ return ai !== -1 && (H = H.map((D, li) => {
832
+ if (li !== ai) return D;
833
+ const ui = { ...D };
834
834
  return delete ui.gridId, delete ui.gridPosition, ui;
835
- })), { ...z, questionData: H };
835
+ })), { ...U, questionData: H };
836
836
  }
837
- if (bi.gridId && L !== void 0 && $ === void 0) {
838
- const di = { ...bi };
839
- delete di.gridId, delete di.gridPosition;
840
- const H = ai.filter((si) => si.id !== E), O = Math.min(L, H.length);
841
- return H.splice(O, 0, di), { ...z, questionData: H };
837
+ if (bi.gridId && L !== void 0 && q === void 0) {
838
+ const ai = { ...bi };
839
+ delete ai.gridId, delete ai.gridPosition;
840
+ const H = ni.filter((li) => li.id !== E), D = Math.min(L, H.length);
841
+ return H.splice(D, 0, ai), { ...U, questionData: H };
842
+ }
843
+ if (!bi.gridId && L !== void 0 && q === void 0 && !G) {
844
+ ni.splice(vi, 1);
845
+ const ai = Math.min(L, ni.length);
846
+ return ni.splice(ai, 0, bi), { ...U, questionData: ni };
842
847
  }
843
848
  if (G) {
844
- const di = ai.findIndex((H) => H.id === G);
845
- return di === -1 ? z : (ai.splice(vi, 1), ai.splice(di, 0, bi), { ...z, questionData: ai });
849
+ const ai = ni.findIndex((H) => H.id === G);
850
+ return ai === -1 ? U : (ni.splice(vi, 1), ni.splice(ai, 0, bi), { ...U, questionData: ni });
846
851
  }
847
- return z;
852
+ return U;
848
853
  })
849
854
  );
850
855
  },
@@ -869,7 +874,7 @@ const pi = ro(void 0), oe = {
869
874
  updateElementPosition: N,
870
875
  addElement: S,
871
876
  addElementInPosition: A,
872
- updateElement: I,
877
+ updateElement: K,
873
878
  addSection: m,
874
879
  removeSection: p,
875
880
  updateSection: W,
@@ -877,8 +882,8 @@ const pi = ro(void 0), oe = {
877
882
  setIsDragging: u,
878
883
  selectedSection: r,
879
884
  setSelectedSection: c,
880
- activeSections: h,
881
- setActiveSections: v,
885
+ activeSections: v,
886
+ setActiveSections: h,
882
887
  updateGridElement: C,
883
888
  answerData: e,
884
889
  setAnswerData: o,
@@ -895,13 +900,13 @@ const pi = ro(void 0), oe = {
895
900
  N,
896
901
  S,
897
902
  A,
898
- I,
903
+ K,
899
904
  m,
900
905
  p,
901
906
  W,
902
907
  t,
903
908
  r,
904
- h,
909
+ v,
905
910
  C,
906
911
  e,
907
912
  g,
@@ -1108,15 +1113,15 @@ const Nn = ({
1108
1113
  maxDate: t,
1109
1114
  showYearDropdown: u
1110
1115
  }) => {
1111
- const r = i ? new Date(i) : null, [c, h] = R(r);
1112
- K(() => {
1116
+ const r = i ? new Date(i) : null, [c, v] = R(r);
1117
+ O(() => {
1113
1118
  const g = i ? new Date(i) : null;
1114
- (g && c && g.getTime() !== c.getTime() || !g && c || g && !c) && h(g);
1115
- }, [i]), K(() => {
1119
+ (g && c && g.getTime() !== c.getTime() || !g && c || g && !c) && v(g);
1120
+ }, [i]), O(() => {
1116
1121
  e && e(a, c);
1117
1122
  }, [c, e, a]);
1118
- const v = (g) => {
1119
- h(g);
1123
+ const h = (g) => {
1124
+ v(g);
1120
1125
  };
1121
1126
  return /* @__PURE__ */ n.jsx("div", { className: "builder_date__picker", children: /* @__PURE__ */ n.jsx(
1122
1127
  mo,
@@ -1127,7 +1132,7 @@ const Nn = ({
1127
1132
  dateFormat: s,
1128
1133
  disabled: o,
1129
1134
  selected: c,
1130
- onChange: v,
1135
+ onChange: h,
1131
1136
  className: "field-control",
1132
1137
  portalId: "root-portal",
1133
1138
  placeholderText: l,
@@ -1149,7 +1154,7 @@ function To({
1149
1154
  watch: a
1150
1155
  } = e || {};
1151
1156
  let l;
1152
- return a && (l = a()[i.id]), K(() => {
1157
+ return a && (l = a()[i.id]), O(() => {
1153
1158
  o(i.id);
1154
1159
  }, [i.id]), /* @__PURE__ */ n.jsx(
1155
1160
  Nn,
@@ -1446,20 +1451,20 @@ function Wo(i, e) {
1446
1451
  j % 2 === 1 && (a.left !== a.top && (N = a.left, a.left = a.top, a.top = N), a.width !== a.height && (N = a.width, a.width = a.height, a.height = N)), m.length && (l = Vo(l, '<g transform="' + m.join(" ") + '">', "</g>"));
1447
1452
  });
1448
1453
  const d = s.width, t = s.height, u = a.width, r = a.height;
1449
- let c, h;
1450
- d === null ? (h = t === null ? "1em" : t === "auto" ? r : t, c = de(h, u / r)) : (c = d === "auto" ? u : d, h = t === null ? de(c, r / u) : t === "auto" ? r : t);
1451
- const v = {}, g = (f, m) => {
1452
- Fo(m) || (v[f] = m.toString());
1454
+ let c, v;
1455
+ d === null ? (v = t === null ? "1em" : t === "auto" ? r : t, c = de(v, u / r)) : (c = d === "auto" ? u : d, v = t === null ? de(c, r / u) : t === "auto" ? r : t);
1456
+ const h = {}, g = (f, m) => {
1457
+ Fo(m) || (h[f] = m.toString());
1453
1458
  };
1454
- g("width", c), g("height", h);
1459
+ g("width", c), g("height", v);
1455
1460
  const y = [
1456
1461
  a.left,
1457
1462
  a.top,
1458
1463
  u,
1459
1464
  r
1460
1465
  ];
1461
- return v.viewBox = y.join(" "), {
1462
- attributes: v,
1466
+ return h.viewBox = y.join(" "), {
1467
+ attributes: h,
1463
1468
  viewBox: y,
1464
1469
  body: l
1465
1470
  };
@@ -1674,12 +1679,12 @@ function la(i) {
1674
1679
  const l = a.provider, d = a.prefix, t = a.name, u = o[l] || (o[l] = /* @__PURE__ */ Object.create(null)), r = u[d] || (u[d] = Oi(l, d));
1675
1680
  let c;
1676
1681
  t in r.icons ? c = e.loaded : d === "" || r.missing.has(t) ? c = e.missing : c = e.pending;
1677
- const h = {
1682
+ const v = {
1678
1683
  provider: l,
1679
1684
  prefix: d,
1680
1685
  name: t
1681
1686
  };
1682
- c.push(h);
1687
+ c.push(v);
1683
1688
  }), e;
1684
1689
  }
1685
1690
  function da(i, e = !0, o = !1) {
@@ -1709,15 +1714,15 @@ function ta(i, e, o, s) {
1709
1714
  d = d.concat(A);
1710
1715
  } else d = i.resources.slice(l).concat(i.resources.slice(0, l));
1711
1716
  const t = Date.now();
1712
- let u = "pending", r = 0, c, h = null, v = [], g = [];
1717
+ let u = "pending", r = 0, c, v = null, h = [], g = [];
1713
1718
  typeof s == "function" && g.push(s);
1714
1719
  function y() {
1715
- h && (clearTimeout(h), h = null);
1720
+ v && (clearTimeout(v), v = null);
1716
1721
  }
1717
1722
  function f() {
1718
- u === "pending" && (u = "aborted"), y(), v.forEach((A) => {
1723
+ u === "pending" && (u = "aborted"), y(), h.forEach((A) => {
1719
1724
  A.status === "pending" && (A.status = "aborted");
1720
- }), v = [];
1725
+ }), h = [];
1721
1726
  }
1722
1727
  function m(A, C) {
1723
1728
  C && (g = []), typeof A == "function" && g.push(A);
@@ -1728,7 +1733,7 @@ function ta(i, e, o, s) {
1728
1733
  payload: e,
1729
1734
  status: u,
1730
1735
  queriesSent: r,
1731
- queriesPending: v.length,
1736
+ queriesPending: h.length,
1732
1737
  subscribe: m,
1733
1738
  abort: f
1734
1739
  };
@@ -1739,13 +1744,13 @@ function ta(i, e, o, s) {
1739
1744
  });
1740
1745
  }
1741
1746
  function j() {
1742
- v.forEach((A) => {
1747
+ h.forEach((A) => {
1743
1748
  A.status === "pending" && (A.status = "aborted");
1744
- }), v = [];
1749
+ }), h = [];
1745
1750
  }
1746
- function N(A, C, I) {
1751
+ function N(A, C, K) {
1747
1752
  const Q = C !== "success";
1748
- switch (v = v.filter((W) => W !== A), u) {
1753
+ switch (h = h.filter((W) => W !== A), u) {
1749
1754
  case "pending":
1750
1755
  break;
1751
1756
  case "failed":
@@ -1755,11 +1760,11 @@ function ta(i, e, o, s) {
1755
1760
  return;
1756
1761
  }
1757
1762
  if (C === "abort") {
1758
- c = I, x();
1763
+ c = K, x();
1759
1764
  return;
1760
1765
  }
1761
1766
  if (Q) {
1762
- c = I, v.length || (d.length ? S() : x());
1767
+ c = K, h.length || (d.length ? S() : x());
1763
1768
  return;
1764
1769
  }
1765
1770
  if (y(), j(), !i.random) {
@@ -1767,7 +1772,7 @@ function ta(i, e, o, s) {
1767
1772
  W !== -1 && W !== i.index && (i.index = W);
1768
1773
  }
1769
1774
  u = "completed", g.forEach((W) => {
1770
- W(I);
1775
+ W(K);
1771
1776
  });
1772
1777
  }
1773
1778
  function S() {
@@ -1775,8 +1780,8 @@ function ta(i, e, o, s) {
1775
1780
  y();
1776
1781
  const A = d.shift();
1777
1782
  if (A === void 0) {
1778
- if (v.length) {
1779
- h = setTimeout(() => {
1783
+ if (h.length) {
1784
+ v = setTimeout(() => {
1780
1785
  y(), u === "pending" && (j(), x());
1781
1786
  }, i.timeout);
1782
1787
  return;
@@ -1787,11 +1792,11 @@ function ta(i, e, o, s) {
1787
1792
  const C = {
1788
1793
  status: "pending",
1789
1794
  resource: A,
1790
- callback: (I, Q) => {
1791
- N(C, I, Q);
1795
+ callback: (K, Q) => {
1796
+ N(C, K, Q);
1792
1797
  }
1793
1798
  };
1794
- v.push(C), r++, h = setTimeout(S, i.rotate), o(A, e, C.callback);
1799
+ h.push(C), r++, v = setTimeout(S, i.rotate), o(A, e, C.callback);
1795
1800
  }
1796
1801
  return setTimeout(S), p;
1797
1802
  }
@@ -1805,8 +1810,8 @@ function we(i) {
1805
1810
  o = o.filter((t) => t().status === "pending");
1806
1811
  }
1807
1812
  function a(t, u, r) {
1808
- const c = ta(e, t, u, (h, v) => {
1809
- s(), r && r(h, v);
1813
+ const c = ta(e, t, u, (v, h) => {
1814
+ s(), r && r(v, h);
1810
1815
  });
1811
1816
  return o.push(c), c;
1812
1817
  }
@@ -1911,11 +1916,11 @@ function va(i, e) {
1911
1916
  }
1912
1917
  if (l) {
1913
1918
  a.forEach((c) => {
1914
- const h = l(c, s, o);
1915
- re(h, (v) => {
1916
- const g = v ? {
1919
+ const v = l(c, s, o);
1920
+ re(v, (h) => {
1921
+ const g = h ? {
1917
1922
  prefix: s,
1918
- icons: { [c]: v }
1923
+ icons: { [c]: h }
1919
1924
  } : null;
1920
1925
  Fi(i, [c], g);
1921
1926
  });
@@ -1930,8 +1935,8 @@ function va(i, e) {
1930
1935
  return;
1931
1936
  }
1932
1937
  u.prepare(o, s, d).forEach((c) => {
1933
- ra(o, c, (h) => {
1934
- Fi(i, c.icons, h);
1938
+ ra(o, c, (v) => {
1939
+ Fi(i, c.icons, v);
1935
1940
  });
1936
1941
  });
1937
1942
  }));
@@ -1952,11 +1957,11 @@ const ha = (i, e) => {
1952
1957
  const { provider: r, prefix: c } = u;
1953
1958
  if (c === t && r === d) return;
1954
1959
  d = r, t = c, l.push(Oi(r, c));
1955
- const h = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
1956
- h[c] || (h[c] = []);
1960
+ const v = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
1961
+ v[c] || (v[c] = []);
1957
1962
  }), s.pending.forEach((u) => {
1958
- const { provider: r, prefix: c, name: h } = u, v = Oi(r, c), g = v.pendingIcons || (v.pendingIcons = /* @__PURE__ */ new Set());
1959
- g.has(h) || (g.add(h), a[r][c].push(h));
1963
+ const { provider: r, prefix: c, name: v } = u, h = Oi(r, c), g = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
1964
+ g.has(v) || (g.add(v), a[r][c].push(v));
1960
1965
  }), l.forEach((u) => {
1961
1966
  const r = a[u.provider][u.prefix];
1962
1967
  r.length && va(u, r);
@@ -2144,9 +2149,9 @@ const Ea = (i, e, o) => {
2144
2149
  __html: ka(Jo(r.body, p ? () => p + "ID" + m++ : "iconifyReact"))
2145
2150
  }, Sn("svg", u);
2146
2151
  }
2147
- const { body: h, width: v, height: g } = i, y = l === "mask" || (l === "bg" ? !1 : h.indexOf("currentColor") !== -1), f = ya(h, {
2152
+ const { body: v, width: h, height: g } = i, y = l === "mask" || (l === "bg" ? !1 : v.indexOf("currentColor") !== -1), f = ya(v, {
2148
2153
  ...c,
2149
- width: v + "",
2154
+ width: h + "",
2150
2155
  height: g + ""
2151
2156
  });
2152
2157
  return u.style = {
@@ -2244,14 +2249,14 @@ function De(i) {
2244
2249
  });
2245
2250
  } else f && ((g = i.onLoad) === null || g === void 0 || g.call(i, y));
2246
2251
  }
2247
- K(() => (o(!0), u), []), K(() => {
2252
+ O(() => (o(!0), u), []), O(() => {
2248
2253
  e && c();
2249
2254
  }, [i.icon, e]);
2250
- const { name: h, data: v } = d;
2251
- return v ? Ea({
2255
+ const { name: v, data: h } = d;
2256
+ return h ? Ea({
2252
2257
  ...Bn,
2253
- ...v
2254
- }, i, h) : i.children ? i.children : i.fallback ? i.fallback : Sn("span", {});
2258
+ ...h
2259
+ }, i, v) : i.children ? i.children : i.fallback ? i.fallback : Sn("span", {});
2255
2260
  }
2256
2261
  const Oe = ye((i, e) => De({
2257
2262
  ...i,
@@ -2262,7 +2267,7 @@ ye((i, e) => De({
2262
2267
  ...i,
2263
2268
  _ref: e
2264
2269
  }));
2265
- function U({
2270
+ function z({
2266
2271
  icon: i,
2267
2272
  iconClass: e
2268
2273
  }) {
@@ -2280,66 +2285,66 @@ function Rn({
2280
2285
  isReadOnly: t,
2281
2286
  watch: u
2282
2287
  } = e || {}, r = ii(
2283
- () => s == null ? void 0 : s.map((h) => h.label).join(", "),
2288
+ () => s == null ? void 0 : s.map((v) => v.label).join(", "),
2284
2289
  [s]
2285
2290
  );
2286
- return K(() => {
2291
+ return O(() => {
2287
2292
  l(i.id);
2288
- }, [i.id, l]), K(() => {
2293
+ }, [i.id, l]), O(() => {
2289
2294
  if (u) {
2290
- const h = u((v) => {
2291
- a(v[i.id]);
2295
+ const v = u((h) => {
2296
+ a(h[i.id]);
2292
2297
  });
2293
2298
  return () => {
2294
- var v;
2295
- return (v = h.unsubscribe) == null ? void 0 : v.call(h);
2299
+ var h;
2300
+ return (h = v.unsubscribe) == null ? void 0 : h.call(v);
2296
2301
  };
2297
2302
  }
2298
2303
  }, [u, i.id]), /* @__PURE__ */ n.jsx("div", { className: "custom-select", children: /* @__PURE__ */ n.jsx(
2299
- ei,
2304
+ oi,
2300
2305
  {
2301
2306
  value: s || [],
2302
- onChange: (h) => {
2303
- a(h), d == null || d(i.id, h);
2307
+ onChange: (v) => {
2308
+ a(v), d == null || d(i.id, v);
2304
2309
  },
2305
2310
  multiple: !0,
2306
2311
  disabled: t,
2307
2312
  by: "value",
2308
2313
  children: /* @__PURE__ */ n.jsxs("div", { className: "custom-select__wrapper", children: [
2309
2314
  /* @__PURE__ */ n.jsxs(
2310
- ei.Button,
2315
+ oi.Button,
2311
2316
  {
2312
2317
  className: "custom-select__control field-control",
2313
2318
  disabled: t,
2314
2319
  children: [
2315
2320
  /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (s == null ? void 0 : s.length) > 0 ? r : /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o != null ? o : " Select options" }) }),
2316
- /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
2321
+ /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(z, { icon: "lucide:chevron-down" }) })
2317
2322
  ]
2318
2323
  }
2319
2324
  ),
2320
2325
  /* @__PURE__ */ n.jsx(Ri, { as: qi, leave: "custom-select__transition", children: /* @__PURE__ */ n.jsx(
2321
- ei.Options,
2326
+ oi.Options,
2322
2327
  {
2323
2328
  anchor: "bottom start",
2324
2329
  className: "custom-select__options",
2325
2330
  children: (c = i == null ? void 0 : i.options) == null ? void 0 : c.map(
2326
- (h, v) => /* @__PURE__ */ n.jsx(
2327
- ei.Option,
2331
+ (v, h) => /* @__PURE__ */ n.jsx(
2332
+ oi.Option,
2328
2333
  {
2329
- value: h,
2334
+ value: v,
2330
2335
  className: ({ active: g }) => `custom-select__option ${g ? "custom-select__option--active" : ""}`,
2331
2336
  children: ({ selected: g }) => /* @__PURE__ */ n.jsxs("div", { className: "custom-select__option-row", children: [
2332
2337
  /* @__PURE__ */ n.jsx(
2333
2338
  "span",
2334
2339
  {
2335
2340
  className: `custom-select__option-label ${g ? "custom-select__option--selected" : ""}`,
2336
- children: h.label
2341
+ children: v.label
2337
2342
  }
2338
2343
  ),
2339
2344
  g && /* @__PURE__ */ n.jsx("span", { className: "custom-select__check", children: "✓" })
2340
2345
  ] })
2341
2346
  },
2342
- v
2347
+ h
2343
2348
  )
2344
2349
  )
2345
2350
  }
@@ -2373,9 +2378,9 @@ function Ke({
2373
2378
  removeFile: o
2374
2379
  }) {
2375
2380
  const [s, a] = R(!1), [l, d] = R("unknown"), [t, u] = R(null);
2376
- K(() => {
2381
+ O(() => {
2377
2382
  i && d(La(i));
2378
- }, [i]), K(() => {
2383
+ }, [i]), O(() => {
2379
2384
  if (l === "pdf" && (i != null && i.startsWith("data:")))
2380
2385
  try {
2381
2386
  const g = atob(i.split(",")[1]), y = new ArrayBuffer(g.length), f = new Uint8Array(y);
@@ -2391,8 +2396,8 @@ function Ke({
2391
2396
  }, [i, l]);
2392
2397
  const r = () => {
2393
2398
  l === "image" || l === "pdf" ? a(!0) : window.open(t || i, "_blank");
2394
- }, c = () => a(!1), h = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
2395
- function v(g, y = "download") {
2399
+ }, c = () => a(!1), v = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
2400
+ function h(g, y = "download") {
2396
2401
  if (!g) return;
2397
2402
  if (g.startsWith("data:")) {
2398
2403
  const m = document.createElement("a");
@@ -2408,11 +2413,11 @@ function Ke({
2408
2413
  {
2409
2414
  onClick: r,
2410
2415
  className: "!flex items-center rounded cursor-pointer gap-x-3",
2411
- title: `Click to preview ${h}`,
2416
+ title: `Click to preview ${v}`,
2412
2417
  children: [
2413
- l === "image" && /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n.jsx(U, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
2414
- l !== "image" && /* @__PURE__ */ n.jsx(U, { icon: Pa[l], iconClass: "text-4xl" }),
2415
- /* @__PURE__ */ n.jsx("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: h })
2418
+ l === "image" && /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n.jsx(z, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
2419
+ l !== "image" && /* @__PURE__ */ n.jsx(z, { icon: Pa[l], iconClass: "text-4xl" }),
2420
+ /* @__PURE__ */ n.jsx("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: v })
2416
2421
  ]
2417
2422
  }
2418
2423
  ),
@@ -2422,9 +2427,9 @@ function Ke({
2422
2427
  {
2423
2428
  type: "button",
2424
2429
  className: "p-2",
2425
- onClick: () => v(t || i, e),
2426
- title: `Download ${h}`,
2427
- children: /* @__PURE__ */ n.jsx(U, { icon: "streamline-flex:download-tray-solid" })
2430
+ onClick: () => h(t || i, e),
2431
+ title: `Download ${v}`,
2432
+ children: /* @__PURE__ */ n.jsx(z, { icon: "streamline-flex:download-tray-solid" })
2428
2433
  }
2429
2434
  ),
2430
2435
  o && /* @__PURE__ */ n.jsx(
@@ -2433,7 +2438,7 @@ function Ke({
2433
2438
  type: "button",
2434
2439
  className: "p-2 text-lg text-red-500",
2435
2440
  onClick: o,
2436
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone" })
2441
+ children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone" })
2437
2442
  }
2438
2443
  )
2439
2444
  ] }),
@@ -2461,14 +2466,15 @@ function Ke({
2461
2466
  "img",
2462
2467
  {
2463
2468
  src: i,
2464
- alt: h,
2465
- className: "max-w-full max-h-[80vh] mx-auto object-contain"
2469
+ alt: v,
2470
+ className: "max-w-full max-h-[80vh] mx-auto object-contain",
2471
+ crossOrigin: "anonymous"
2466
2472
  }
2467
2473
  ) : l === "pdf" ? /* @__PURE__ */ n.jsx(
2468
2474
  "iframe",
2469
2475
  {
2470
2476
  src: t || i,
2471
- title: h,
2477
+ title: v,
2472
2478
  className: "w-full h-[80vh] rounded border"
2473
2479
  }
2474
2480
  ) : null
@@ -2498,11 +2504,11 @@ function Ra({
2498
2504
  list: a = null,
2499
2505
  accept: l = []
2500
2506
  }) {
2501
- const { uploadUrl: d } = Ni(pi), t = Ii(null), [u, r] = R(a), [c, h] = R(!1);
2502
- K(() => {
2507
+ const { uploadUrl: d } = Ni(pi), t = Ii(null), [u, r] = R(a), [c, v] = R(!1);
2508
+ O(() => {
2503
2509
  r(a);
2504
2510
  }, [a]);
2505
- const v = ii(
2511
+ const h = ii(
2506
2512
  () => l == null ? void 0 : l.map((N) => N.value).join(", "),
2507
2513
  [l]
2508
2514
  ), g = ii(
@@ -2529,11 +2535,11 @@ function Ra({
2529
2535
  const C = new FileReader();
2530
2536
  C.onloadend = async () => {
2531
2537
  try {
2532
- const I = C.result.replace(
2538
+ const K = C.result.replace(
2533
2539
  /^data:.*;base64,/,
2534
2540
  ""
2535
2541
  ), Q = d ? await y({
2536
- base64: I,
2542
+ base64: K,
2537
2543
  ext: `.${N.name.split(".").pop()}`,
2538
2544
  fileName: N.name
2539
2545
  }) : C.result;
@@ -2542,8 +2548,8 @@ function Ra({
2542
2548
  type: N.type,
2543
2549
  name: N.name
2544
2550
  });
2545
- } catch (I) {
2546
- A(I);
2551
+ } catch (K) {
2552
+ A(K);
2547
2553
  }
2548
2554
  }, C.onerror = () => A(new Error("File read failed")), C.readAsDataURL(N);
2549
2555
  }),
@@ -2551,14 +2557,14 @@ function Ra({
2551
2557
  ), m = Y(
2552
2558
  (N) => {
2553
2559
  var A;
2554
- const S = v ? (A = v.split(",")) == null ? void 0 : A.map((C) => C.trim()) : [];
2560
+ const S = h ? (A = h.split(",")) == null ? void 0 : A.map((C) => C.trim()) : [];
2555
2561
  for (const C of N) {
2556
2562
  if (C.size > wa)
2557
2563
  return Si.error(
2558
2564
  `File "${C.name}" exceeds 5MB limit (${(C.size / 1024 / 1024).toFixed(2)}MB)`
2559
2565
  ), !1;
2560
2566
  if (S.length && !S.some(
2561
- (I) => C.type === I || C.name.toLowerCase().endsWith(I.replace("*", ""))
2567
+ (K) => C.type === K || C.name.toLowerCase().endsWith(K.replace("*", ""))
2562
2568
  ))
2563
2569
  return Si.error(
2564
2570
  `File "${C.name}" is not an allowed type. Allowed: ${g || "any"}`
@@ -2566,7 +2572,7 @@ function Ra({
2566
2572
  }
2567
2573
  return !0;
2568
2574
  },
2569
- [v, g]
2575
+ [h, g]
2570
2576
  ), p = Y(
2571
2577
  async (N) => {
2572
2578
  const S = Array.from(N.target.files || []);
@@ -2576,24 +2582,21 @@ function Ra({
2576
2582
  return;
2577
2583
  }
2578
2584
  try {
2579
- h(!0);
2580
- const A = await Promise.all(S == null ? void 0 : S.map(f));
2581
- r((C) => {
2582
- const I = s && C ? [...C, ...A] : A;
2583
- return i(I), I;
2584
- }), Si.success(`Successfully uploaded ${S.length} file(s)`);
2585
+ v(!0);
2586
+ const A = await Promise.all(S == null ? void 0 : S.map(f)), C = s && u ? [...u, ...A] : A;
2587
+ r(C), i(C), Si.success(`Successfully uploaded ${S.length} file(s)`);
2585
2588
  } catch (A) {
2586
2589
  console.error("Upload error:", A), Si.error("Failed to upload file(s). Please try again.");
2587
2590
  } finally {
2588
- h(!1), t.current && (t.current.value = "");
2591
+ v(!1), t.current && (t.current.value = "");
2589
2592
  }
2590
2593
  }
2591
2594
  },
2592
- [c, m, f, i, s]
2595
+ [c, m, f, i, s, u]
2593
2596
  ), x = Y(
2594
2597
  (N) => {
2595
2598
  c || (t.current && (t.current.value = ""), r((S) => {
2596
- const A = N === void 0 ? null : (S == null ? void 0 : S.filter((C, I) => I !== N)) || null;
2599
+ const A = N === void 0 ? null : (S == null ? void 0 : S.filter((C, K) => K !== N)) || null;
2597
2600
  return i(A), A;
2598
2601
  }), o == null || o());
2599
2602
  },
@@ -2609,7 +2612,7 @@ function Ra({
2609
2612
  onChange: p,
2610
2613
  disabled: e || c,
2611
2614
  multiple: s,
2612
- accept: v || "",
2615
+ accept: h || "",
2613
2616
  className: `w-full text-sm text-gray-500 file:mr-4 flex-1 file:px-4 !py-1 !pl-1\r
2614
2617
  file:rounded-[6px] file:py-[6px] file:border-0\r
2615
2618
  file:text-sm file:font-semibold\r
@@ -2625,7 +2628,7 @@ function Ra({
2625
2628
  onClick: () => x(),
2626
2629
  disabled: c,
2627
2630
  "aria-label": "Remove all files",
2628
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone" })
2631
+ children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone" })
2629
2632
  }
2630
2633
  )
2631
2634
  ] }),
@@ -2654,22 +2657,22 @@ function Ia({ element: i, validationData: e }) {
2654
2657
  isReadOnly: d,
2655
2658
  watch: t
2656
2659
  } = e || {};
2657
- K(() => {
2660
+ O(() => {
2658
2661
  a(i.id);
2659
- }, [i.id, a]), K(() => {
2662
+ }, [i.id, a]), O(() => {
2660
2663
  if (t) {
2661
- const h = t((v) => {
2662
- s(v[i.id]);
2664
+ const v = t((h) => {
2665
+ s(h[i.id]);
2663
2666
  });
2664
2667
  return () => {
2665
- var v;
2666
- return (v = h.unsubscribe) == null ? void 0 : v.call(h);
2668
+ var h;
2669
+ return (h = v.unsubscribe) == null ? void 0 : h.call(v);
2667
2670
  };
2668
2671
  }
2669
2672
  }, [t, i.id]);
2670
2673
  const u = Y(
2671
- (h) => {
2672
- l == null || l(i.id, h), s(h);
2674
+ (v) => {
2675
+ l == null || l(i.id, v), s(v);
2673
2676
  },
2674
2677
  [i.id, l]
2675
2678
  ), r = () => {
@@ -2687,7 +2690,7 @@ function Ia({ element: i, validationData: e }) {
2687
2690
  accept: i == null ? void 0 : i.acceptedFiles
2688
2691
  }
2689
2692
  ),
2690
- o && d && /* @__PURE__ */ n.jsx("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && (o == null ? void 0 : o.map((h, v) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ke, { fileUrl: h.base64, fileName: h.name }) }, v))) })
2693
+ o && d && /* @__PURE__ */ n.jsx("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && (o == null ? void 0 : o.map((v, h) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ke, { fileUrl: v.base64, fileName: v.name }) }, h))) })
2691
2694
  ] });
2692
2695
  }
2693
2696
  function Da({
@@ -2718,8 +2721,8 @@ const F = ({
2718
2721
  setValue: u,
2719
2722
  value: r,
2720
2723
  trigger: c,
2721
- prefix: h,
2722
- disabled: v,
2724
+ prefix: v,
2725
+ disabled: h,
2723
2726
  watch: g,
2724
2727
  min: y,
2725
2728
  max: f
@@ -2745,8 +2748,8 @@ const F = ({
2745
2748
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"}`,
2746
2749
  decimalsLimit: 2,
2747
2750
  value: r,
2748
- prefix: h,
2749
- disabled: v
2751
+ prefix: v,
2752
+ disabled: h
2750
2753
  }
2751
2754
  ),
2752
2755
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (p = s[e]) == null ? void 0 : p.message })
@@ -2762,7 +2765,7 @@ const F = ({
2762
2765
  ...m,
2763
2766
  type: l,
2764
2767
  value: r || "",
2765
- disabled: v,
2768
+ disabled: h,
2766
2769
  className: "peer sr-only"
2767
2770
  }
2768
2771
  ),
@@ -2779,7 +2782,7 @@ const F = ({
2779
2782
  peer-disabled:cursor-not-allowed
2780
2783
  `,
2781
2784
  children: A && /* @__PURE__ */ n.jsx(
2782
- U,
2785
+ z,
2783
2786
  {
2784
2787
  icon: "meteor-icons:check",
2785
2788
  iconClass: "w-3.5 h-3.5 text-white"
@@ -2806,7 +2809,7 @@ const F = ({
2806
2809
  ...m,
2807
2810
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2808
2811
  placeholder: d,
2809
- disabled: v
2812
+ disabled: h
2810
2813
  }
2811
2814
  ),
2812
2815
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n.jsx("p", { className: "mt-1 text-sm text-red-600", children: (j = s[e]) == null ? void 0 : j.message })
@@ -2825,7 +2828,7 @@ const F = ({
2825
2828
  type: l,
2826
2829
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2827
2830
  placeholder: t ? "" : d,
2828
- disabled: v,
2831
+ disabled: h,
2829
2832
  min: y,
2830
2833
  max: f
2831
2834
  }
@@ -2895,8 +2898,8 @@ const wi = ({
2895
2898
  trigger: u,
2896
2899
  isMultiple: r,
2897
2900
  isFloatingLabel: c,
2898
- subText: h,
2899
- labelClass: v = "text-[10px]",
2901
+ subText: v,
2902
+ labelClass: h = "text-[10px]",
2900
2903
  loading: g,
2901
2904
  disabled: y
2902
2905
  }) => {
@@ -2909,7 +2912,7 @@ const wi = ({
2909
2912
  var A;
2910
2913
  return typeof S.value == "string" && typeof t == "string" ? S.value.toLowerCase() === t.toLowerCase() : typeof S.value == "object" && typeof t == "object" ? ((A = S.value) == null ? void 0 : A.id) === (t == null ? void 0 : t.id) : S.value === t;
2911
2914
  }) || null, [t, i, r]);
2912
- K(() => {
2915
+ O(() => {
2913
2916
  if (p.current) {
2914
2917
  p.current = !1;
2915
2918
  return;
@@ -2922,7 +2925,7 @@ const wi = ({
2922
2925
  const j = Y((S) => {
2923
2926
  var A;
2924
2927
  if (p.current = !0, m(S), a) {
2925
- const C = r ? Array.isArray(S) ? S == null ? void 0 : S.map((I) => I.value) : [] : (A = S == null ? void 0 : S.value) != null ? A : null;
2928
+ const C = r ? Array.isArray(S) ? S == null ? void 0 : S.map((K) => K.value) : [] : (A = S == null ? void 0 : S.value) != null ? A : null;
2926
2929
  a(l, C), u == null || u(l);
2927
2930
  }
2928
2931
  s && !p.current && s(l);
@@ -2934,20 +2937,20 @@ const wi = ({
2934
2937
  {
2935
2938
  className: J(
2936
2939
  "z-[40] absolute bg-white py-[2px] px-1 -top-[10px] left-3",
2937
- v
2940
+ h
2938
2941
  ),
2939
2942
  children: d
2940
2943
  }
2941
2944
  ),
2942
2945
  /* @__PURE__ */ n.jsx(
2943
- ei,
2946
+ oi,
2944
2947
  {
2945
2948
  value: f,
2946
2949
  onChange: j,
2947
2950
  multiple: r,
2948
2951
  disabled: y || g,
2949
2952
  children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
2950
- /* @__PURE__ */ n.jsxs(ei.Button, { className: "field-control", disabled: y || g, children: [
2953
+ /* @__PURE__ */ n.jsxs(oi.Button, { className: "field-control", disabled: y || g, children: [
2951
2954
  /* @__PURE__ */ n.jsx(
2952
2955
  "span",
2953
2956
  {
@@ -2957,7 +2960,7 @@ const wi = ({
2957
2960
  children: N
2958
2961
  }
2959
2962
  ),
2960
- /* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
2963
+ /* @__PURE__ */ n.jsx("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n.jsx(z, { icon: "lucide:chevron-down" }) })
2961
2964
  ] }),
2962
2965
  /* @__PURE__ */ n.jsx(
2963
2966
  Ri,
@@ -2965,14 +2968,14 @@ const wi = ({
2965
2968
  leave: "transition ease-in duration-100",
2966
2969
  leaveFrom: "opacity-100",
2967
2970
  leaveTo: "opacity-0",
2968
- children: /* @__PURE__ */ n.jsx(ei.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((S, A) => {
2971
+ children: /* @__PURE__ */ n.jsx(oi.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((S, A) => {
2969
2972
  var C;
2970
2973
  return /* @__PURE__ */ n.jsx(
2971
- ei.Option,
2974
+ oi.Option,
2972
2975
  {
2973
2976
  value: S,
2974
- className: ({ active: I }) => J("select-option", { active: I }),
2975
- children: ({ selected: I }) => /* @__PURE__ */ n.jsx("div", { className: J("option-text", { selected: I }), children: S.label })
2977
+ className: ({ active: K }) => J("select-option", { active: K }),
2978
+ children: ({ selected: K }) => /* @__PURE__ */ n.jsx("div", { className: J("option-text", { selected: K }), children: S.label })
2976
2979
  },
2977
2980
  ((C = S.value) == null ? void 0 : C.id) || S.value || A
2978
2981
  );
@@ -2982,7 +2985,7 @@ const wi = ({
2982
2985
  ] })
2983
2986
  }
2984
2987
  ),
2985
- !o && h && /* @__PURE__ */ n.jsx("p", { className: "text-[10px] text-[#98A2B3] mt-[6px]", children: h }),
2988
+ !o && v && /* @__PURE__ */ n.jsx("p", { className: "text-[10px] text-[#98A2B3] mt-[6px]", children: v }),
2986
2989
  (o == null ? void 0 : o.message) && /* @__PURE__ */ n.jsx("span", { className: "text-sm text-red-500", children: o.message })
2987
2990
  ] });
2988
2991
  };
@@ -2998,26 +3001,26 @@ function Tn({
2998
3001
  const g = e != null ? e : o;
2999
3002
  return i.find((y) => y.value === g || y.label === g) || null;
3000
3003
  }, [e, o, i]), [r, c] = R(u);
3001
- K(() => {
3004
+ O(() => {
3002
3005
  if (e !== void 0) {
3003
3006
  const g = i.find((y) => y.value === e || y.label === e) || null;
3004
3007
  c(g);
3005
3008
  }
3006
3009
  }, [e, i]);
3007
- const h = ii(() => {
3010
+ const v = ii(() => {
3008
3011
  if (d === "") return i;
3009
3012
  const g = d.toLowerCase();
3010
3013
  return i.filter(
3011
3014
  (y) => y.label.toLowerCase().includes(g)
3012
3015
  );
3013
- }, [d, i]), v = Y((g) => {
3016
+ }, [d, i]), h = Y((g) => {
3014
3017
  c(g), s(l, g);
3015
3018
  }, [l, s]);
3016
3019
  return /* @__PURE__ */ n.jsx("div", { className: "relative w-full", children: /* @__PURE__ */ n.jsxs(
3017
3020
  Pi,
3018
3021
  {
3019
3022
  value: r,
3020
- onChange: v,
3023
+ onChange: h,
3021
3024
  disabled: a,
3022
3025
  children: [
3023
3026
  /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
@@ -3030,9 +3033,9 @@ function Tn({
3030
3033
  placeholder: "Select an option..."
3031
3034
  }
3032
3035
  ),
3033
- /* @__PURE__ */ n.jsx(vo, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(U, { icon: "octicon:chevron-down-12" }) })
3036
+ /* @__PURE__ */ n.jsx(vo, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n.jsx(z, { icon: "octicon:chevron-down-12" }) })
3034
3037
  ] }),
3035
- /* @__PURE__ */ n.jsx(ho, { anchor: "bottom start", className: "select-options__combo", children: h.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : h == null ? void 0 : h.map((g) => /* @__PURE__ */ n.jsx(
3038
+ /* @__PURE__ */ n.jsx(ho, { anchor: "bottom start", className: "select-options__combo", children: v.length === 0 ? /* @__PURE__ */ n.jsx("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : v == null ? void 0 : v.map((g) => /* @__PURE__ */ n.jsx(
3036
3039
  po,
3037
3040
  {
3038
3041
  value: g,
@@ -3057,7 +3060,7 @@ function Ha({
3057
3060
  watch: l
3058
3061
  } = e || {};
3059
3062
  let d;
3060
- return l && (d = l()[i.id]), K(() => {
3063
+ return l && (d = l()[i.id]), O(() => {
3061
3064
  o(i.id);
3062
3065
  }, [i.id, o]), /* @__PURE__ */ n.jsx(n.Fragment, { children: i.selectType === "list" ? /* @__PURE__ */ n.jsx(
3063
3066
  wi,
@@ -3114,8 +3117,8 @@ function In(i, e, o) {
3114
3117
  if (!d.inner) throw d;
3115
3118
  return { values: {}, errors: Ao((t = d, u = !l.shouldUseNativeValidation && l.criteriaMode === "all", (t.inner || []).reduce(function(r, c) {
3116
3119
  if (r[c.path] || (r[c.path] = { message: c.message, type: c.type }), u) {
3117
- var h = r[c.path].types, v = h && h[c.type];
3118
- r[c.path] = go(c.path, u, r, c.type, v ? [].concat(v, c.message) : c.message);
3120
+ var v = r[c.path].types, h = v && v[c.type];
3121
+ r[c.path] = go(c.path, u, r, c.type, h ? [].concat(h, c.message) : c.message);
3119
3122
  }
3120
3123
  return r;
3121
3124
  }, {})), l) };
@@ -3143,21 +3146,21 @@ const Fa = ({
3143
3146
  "capitalize text-sm whitespace-nowrap no-scrollbar font-semibold pb-[14px] border-b-2 border-[#EAECF0] px-6 flex items-center gap-x-1 flex-1 text-center",
3144
3147
  `${i.length === 1 ? "justify-start" : "justify-center"}`,
3145
3148
  l
3146
- ), h = J({
3149
+ ), v = J({
3147
3150
  "border-gray-500 border-primary border-primary-500 text-primary text-primary-500": u,
3148
3151
  "border-transparent text-gray-400 ": !u
3149
- }), v = r > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80", children: r });
3152
+ }), h = r > 0 && /* @__PURE__ */ n.jsx("span", { className: "text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80", children: r });
3150
3153
  return /* @__PURE__ */ n.jsxs(
3151
3154
  "button",
3152
3155
  {
3153
3156
  onClick: () => s(t.key),
3154
- className: J(c, h),
3157
+ className: J(c, v),
3155
3158
  "aria-selected": u,
3156
3159
  role: "tab",
3157
3160
  type: "button",
3158
3161
  children: [
3159
3162
  t.title,
3160
- v
3163
+ h
3161
3164
  ]
3162
3165
  },
3163
3166
  t.key
@@ -3531,7 +3534,7 @@ function os({
3531
3534
  const [s, a] = R(
3532
3535
  (i == null ? void 0 : i.length) > 0 ? i : [{ value: "" }]
3533
3536
  );
3534
- K(() => {
3537
+ O(() => {
3535
3538
  (i == null ? void 0 : i.length) > 0 && JSON.stringify(i) !== JSON.stringify(s) && a(i);
3536
3539
  }, [i]);
3537
3540
  function l(u, r) {
@@ -3551,10 +3554,10 @@ function os({
3551
3554
  a(u), e && e(u);
3552
3555
  }
3553
3556
  function t(u) {
3554
- const r = s.filter((c, h) => h !== u);
3557
+ const r = s.filter((c, v) => v !== u);
3555
3558
  a(r), e && e(r);
3556
3559
  }
3557
- return K(() => {
3560
+ return O(() => {
3558
3561
  o && o(JSON.stringify({ values: s }));
3559
3562
  }, [o, s]), /* @__PURE__ */ n.jsxs("div", { className: "]", children: [
3560
3563
  /* @__PURE__ */ n.jsxs("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
@@ -3649,10 +3652,10 @@ const as = () => /* @__PURE__ */ n.jsx("blockquote", { className: "bg-gray-100 p
3649
3652
  l(u.name);
3650
3653
  const r = new FileReader();
3651
3654
  u.name.endsWith(".csv") ? (r.onload = (c) => {
3652
- const h = c.target.result, v = So.parse(h, { header: !0 });
3653
- i(e, v.data);
3655
+ const v = c.target.result, h = So.parse(v, { header: !0 });
3656
+ i(e, h.data);
3654
3657
  }, r.readAsText(u)) : u.name.endsWith(".xlsx") || u.name.endsWith(".xls") ? (r.onload = (c) => {
3655
- const h = new Uint8Array(c.target.result), v = Xn.read(h, { type: "array" }), g = v.SheetNames[0], y = v.Sheets[g], f = Xn.utils.sheet_to_json(y);
3658
+ const v = new Uint8Array(c.target.result), h = Xn.read(v, { type: "array" }), g = h.SheetNames[0], y = h.Sheets[g], f = Xn.utils.sheet_to_json(y);
3656
3659
  i(e, f);
3657
3660
  }, r.readAsArrayBuffer(u)) : Si.error("Unsupported file type. Please upload a CSV or Excel file.");
3658
3661
  };
@@ -3745,24 +3748,24 @@ function rs({
3745
3748
  const { formData: l } = Ni(pi), d = s("visibilityDependentFields") || [], t = ii(() => {
3746
3749
  var r;
3747
3750
  return (r = ts(l).filter((c) => c.id !== a)) == null ? void 0 : r.map((c) => {
3748
- const h = d.find(
3749
- (v) => v.id === c.id
3751
+ const v = d.find(
3752
+ (h) => h.id === c.id
3750
3753
  );
3751
3754
  return {
3752
3755
  id: c.id,
3753
3756
  value: c.id,
3754
3757
  label: c.inputLabel,
3755
3758
  sectionId: c.sectionId,
3756
- fieldType: (h == null ? void 0 : h.fieldType) || "text",
3757
- operator: (h == null ? void 0 : h.operator) || "equals",
3758
- fieldValue: (h == null ? void 0 : h.fieldValue) !== void 0 ? h.fieldValue : ""
3759
+ fieldType: (v == null ? void 0 : v.fieldType) || "text",
3760
+ operator: (v == null ? void 0 : v.operator) || "equals",
3761
+ fieldValue: (v == null ? void 0 : v.fieldValue) !== void 0 ? v.fieldValue : ""
3759
3762
  };
3760
3763
  });
3761
- }, [l, d, a]), u = (r, c, h) => {
3762
- const v = d == null ? void 0 : d.map(
3763
- (g, y) => y === r ? { ...g, [c]: h } : g
3764
+ }, [l, d, a]), u = (r, c, v) => {
3765
+ const h = d == null ? void 0 : d.map(
3766
+ (g, y) => y === r ? { ...g, [c]: v } : g
3764
3767
  );
3765
- e("visibilityDependentFields", v);
3768
+ e("visibilityDependentFields", h);
3766
3769
  };
3767
3770
  return /* @__PURE__ */ n.jsxs("div", { className: "visibility-editor", children: [
3768
3771
  /* @__PURE__ */ n.jsx("label", { className: "label", children: "Select Dependent Fields" }),
@@ -3778,7 +3781,7 @@ function rs({
3778
3781
  }
3779
3782
  ),
3780
3783
  d.length > 0 && /* @__PURE__ */ n.jsx("div", { className: "py-1 bg-gray-100 rounded dependent-fields", children: d == null ? void 0 : d.map((r, c) => {
3781
- var h, v;
3784
+ var v, h;
3782
3785
  return /* @__PURE__ */ n.jsxs("div", { className: "dependent-field", children: [
3783
3786
  /* @__PURE__ */ n.jsx(
3784
3787
  "input",
@@ -3791,12 +3794,12 @@ function rs({
3791
3794
  }
3792
3795
  ),
3793
3796
  /* @__PURE__ */ n.jsx("div", { className: "field-listbox min-w-[100px]", children: /* @__PURE__ */ n.jsx(
3794
- ei,
3797
+ oi,
3795
3798
  {
3796
3799
  value: r.fieldType,
3797
3800
  onChange: (g) => u(c, "fieldType", g),
3798
3801
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3799
- /* @__PURE__ */ n.jsx(ei.Button, { className: "listbox-button", children: r.fieldType }),
3802
+ /* @__PURE__ */ n.jsx(oi.Button, { className: "listbox-button", children: r.fieldType }),
3800
3803
  /* @__PURE__ */ n.jsx(
3801
3804
  Ri,
3802
3805
  {
@@ -3805,12 +3808,12 @@ function rs({
3805
3808
  leaveFrom: "opacity-100",
3806
3809
  leaveTo: "opacity-0",
3807
3810
  children: /* @__PURE__ */ n.jsx(
3808
- ei.Options,
3811
+ oi.Options,
3809
3812
  {
3810
3813
  className: "listbox-options ",
3811
3814
  anchor: "bottom",
3812
3815
  children: gn == null ? void 0 : gn.map((g) => /* @__PURE__ */ n.jsx(
3813
- ei.Option,
3816
+ oi.Option,
3814
3817
  {
3815
3818
  value: g,
3816
3819
  className: "listbox-option",
@@ -3826,12 +3829,12 @@ function rs({
3826
3829
  }
3827
3830
  ) }),
3828
3831
  /* @__PURE__ */ n.jsx("div", { className: "field-listbox min-w-[100px]", children: /* @__PURE__ */ n.jsx(
3829
- ei,
3832
+ oi,
3830
3833
  {
3831
3834
  value: r.operator,
3832
3835
  onChange: (g) => u(c, "operator", g),
3833
3836
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3834
- /* @__PURE__ */ n.jsx(ei.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
3837
+ /* @__PURE__ */ n.jsx(oi.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
3835
3838
  /* @__PURE__ */ n.jsx(
3836
3839
  Ri,
3837
3840
  {
@@ -3840,12 +3843,12 @@ function rs({
3840
3843
  leaveFrom: "opacity-100",
3841
3844
  leaveTo: "opacity-0",
3842
3845
  children: /* @__PURE__ */ n.jsx(
3843
- ei.Options,
3846
+ oi.Options,
3844
3847
  {
3845
3848
  className: "listbox-options ",
3846
3849
  anchor: "bottom",
3847
- children: (h = r.fieldType === "number" ? [...pe, ...cs] : pe) == null ? void 0 : h.map((g) => /* @__PURE__ */ n.jsx(
3848
- ei.Option,
3850
+ children: (v = r.fieldType === "number" ? [...pe, ...cs] : pe) == null ? void 0 : v.map((g) => /* @__PURE__ */ n.jsx(
3851
+ oi.Option,
3849
3852
  {
3850
3853
  value: g,
3851
3854
  className: "listbox-option",
@@ -3870,12 +3873,12 @@ function rs({
3870
3873
  className: "field-value"
3871
3874
  }
3872
3875
  ) : /* @__PURE__ */ n.jsx("div", { className: "field-listbox", children: /* @__PURE__ */ n.jsx(
3873
- ei,
3876
+ oi,
3874
3877
  {
3875
- value: (v = r.fieldValue) != null ? v : "",
3878
+ value: (h = r.fieldValue) != null ? h : "",
3876
3879
  onChange: (g) => u(c, "fieldValue", g),
3877
3880
  children: /* @__PURE__ */ n.jsxs("div", { className: "listbox-wrapper", children: [
3878
- /* @__PURE__ */ n.jsx(ei.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
3881
+ /* @__PURE__ */ n.jsx(oi.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
3879
3882
  /* @__PURE__ */ n.jsx(
3880
3883
  Ri,
3881
3884
  {
@@ -3884,13 +3887,13 @@ function rs({
3884
3887
  leaveFrom: "opacity-100",
3885
3888
  leaveTo: "opacity-0",
3886
3889
  children: /* @__PURE__ */ n.jsxs(
3887
- ei.Options,
3890
+ oi.Options,
3888
3891
  {
3889
3892
  className: "listbox-options ",
3890
3893
  anchor: "bottom",
3891
3894
  children: [
3892
3895
  /* @__PURE__ */ n.jsx(
3893
- ei.Option,
3896
+ oi.Option,
3894
3897
  {
3895
3898
  value: !0,
3896
3899
  className: "listbox-option",
@@ -3898,7 +3901,7 @@ function rs({
3898
3901
  }
3899
3902
  ),
3900
3903
  /* @__PURE__ */ n.jsx(
3901
- ei.Option,
3904
+ oi.Option,
3902
3905
  {
3903
3906
  value: !1,
3904
3907
  className: "listbox-option",
@@ -3996,8 +3999,8 @@ const ms = B.object().shape({
3996
3999
  }) => {
3997
4000
  const s = bs.filter(
3998
4001
  (H) => !Zi.includes(o.inputType) || H.key !== "validation"
3999
- ), { updateElement: a } = ri.useContext(pi), [l, d] = R("basic"), [t, u] = R(!1), [r, c] = R("manual"), h = fi("config"), {
4000
- register: v,
4002
+ ), { updateElement: a } = ri.useContext(pi), [l, d] = R("basic"), [t, u] = R(!1), [r, c] = R("manual"), v = fi("config"), {
4003
+ register: h,
4001
4004
  handleSubmit: g,
4002
4005
  control: y,
4003
4006
  setValue: f,
@@ -4011,7 +4014,7 @@ const ms = B.object().shape({
4011
4014
  ...o,
4012
4015
  options: o.options || []
4013
4016
  }
4014
- }), A = m(), { fields: C, append: I, remove: Q } = mn({
4017
+ }), A = m(), { fields: C, append: K, remove: Q } = mn({
4015
4018
  control: y,
4016
4019
  name: "options"
4017
4020
  }), {
@@ -4029,7 +4032,7 @@ const ms = B.object().shape({
4029
4032
  control: y,
4030
4033
  name: "dataColumns"
4031
4034
  });
4032
- K(() => {
4035
+ O(() => {
4033
4036
  i || S();
4034
4037
  }, [i, S]);
4035
4038
  const G = (H) => {
@@ -4038,43 +4041,43 @@ const ms = B.object().shape({
4038
4041
  headers: {
4039
4042
  Authorization: `Bearer ${fi("token")}`
4040
4043
  }
4041
- }, D = Y(async () => {
4042
- var H, O, si;
4044
+ }, I = Y(async () => {
4045
+ var H, D, li;
4043
4046
  if (!A.apiUrl || !/^https?:\/\//.test(A.apiUrl)) {
4044
4047
  Si.info("Please provide a valid API URL");
4045
4048
  return;
4046
4049
  }
4047
4050
  try {
4048
4051
  u(!0);
4049
- const { status: ui, data: oi } = await Di.get(A.apiUrl, w);
4050
- if (ui !== 200 || !oi) {
4052
+ const { status: ui, data: si } = await Di.get(A.apiUrl, w);
4053
+ if (ui !== 200 || !si) {
4051
4054
  Si.error("Unexpected response from server.");
4052
4055
  return;
4053
4056
  }
4054
- const li = oi.data || oi.record || oi.result;
4055
- if (!Array.isArray(li)) {
4057
+ const di = si.data || si.record || si.result;
4058
+ if (!Array.isArray(di)) {
4056
4059
  Si.error("Expected an array in response (data, record, or result).");
4057
4060
  return;
4058
4061
  }
4059
- ((H = o.type) == null ? void 0 : H.toLowerCase()) === "datagrid" ? f("dataColumns", li) : f("options", li);
4062
+ ((H = o.type) == null ? void 0 : H.toLowerCase()) === "datagrid" ? f("dataColumns", di) : f("options", di);
4060
4063
  } catch (ui) {
4061
- const oi = ((si = (O = ui == null ? void 0 : ui.response) == null ? void 0 : O.data) == null ? void 0 : si.message) || (ui == null ? void 0 : ui.message) || "Unable to load options";
4062
- Si.error(oi);
4064
+ const si = ((li = (D = ui == null ? void 0 : ui.response) == null ? void 0 : D.data) == null ? void 0 : li.message) || (ui == null ? void 0 : ui.message) || "Unable to load options";
4065
+ Si.error(si);
4063
4066
  } finally {
4064
4067
  u(!1);
4065
4068
  }
4066
- }, [o.type, f, A.apiUrl]), z = ["manual", "api", "sheet"];
4067
- function ai() {
4068
- r === "api" && D();
4069
+ }, [o.type, f, A.apiUrl]), U = ["manual", "api", "sheet"];
4070
+ function ni() {
4071
+ r === "api" && I();
4069
4072
  }
4070
4073
  const vi = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
4071
- /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((H) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
4074
+ /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((H) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
4072
4075
  /* @__PURE__ */ n.jsx(
4073
4076
  "input",
4074
4077
  {
4075
4078
  type: "radio",
4076
4079
  name: "optionType",
4077
- onChange: (O) => c(O.target.value),
4080
+ onChange: (D) => c(D.target.value),
4078
4081
  value: H
4079
4082
  }
4080
4083
  ),
@@ -4094,7 +4097,7 @@ const ms = B.object().shape({
4094
4097
  label: "Load Options from Api",
4095
4098
  name: "apiUrl",
4096
4099
  errors: x,
4097
- register: v,
4100
+ register: h,
4098
4101
  className: "!w-full",
4099
4102
  placeholder: "https://example.com/options",
4100
4103
  isFloating: !0
@@ -4105,7 +4108,7 @@ const ms = B.object().shape({
4105
4108
  /* @__PURE__ */ n.jsx(
4106
4109
  "button",
4107
4110
  {
4108
- onClick: ai,
4111
+ onClick: ni,
4109
4112
  className: "px-3 py-1 text-xs text-white bg-gray-600 rounded",
4110
4113
  type: "button",
4111
4114
  children: "Load"
@@ -4125,7 +4128,7 @@ const ms = B.object().shape({
4125
4128
  ) }),
4126
4129
  /* @__PURE__ */ n.jsxs("div", { children: [
4127
4130
  /* @__PURE__ */ n.jsx("h3", { className: "mb-4 text-sm text-gray-500", children: "Parent Options " }),
4128
- C == null ? void 0 : C.map((H, O) => /* @__PURE__ */ n.jsxs(
4131
+ C == null ? void 0 : C.map((H, D) => /* @__PURE__ */ n.jsxs(
4129
4132
  "div",
4130
4133
  {
4131
4134
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
@@ -4134,9 +4137,9 @@ const ms = B.object().shape({
4134
4137
  F,
4135
4138
  {
4136
4139
  watch: m,
4137
- label: O === 0 ? "Label" : "",
4138
- name: `options.${O}.label`,
4139
- register: v,
4140
+ label: D === 0 ? "Label" : "",
4141
+ name: `options.${D}.label`,
4142
+ register: h,
4140
4143
  errors: x,
4141
4144
  element: o,
4142
4145
  placeholder: "Label"
@@ -4146,9 +4149,9 @@ const ms = B.object().shape({
4146
4149
  F,
4147
4150
  {
4148
4151
  watch: m,
4149
- label: O === 0 ? "Value" : "",
4150
- name: `options.${O}.value`,
4151
- register: v,
4152
+ label: D === 0 ? "Value" : "",
4153
+ name: `options.${D}.value`,
4154
+ register: h,
4152
4155
  errors: x,
4153
4156
  element: o,
4154
4157
  placeholder: "Value"
@@ -4160,8 +4163,8 @@ const ms = B.object().shape({
4160
4163
  disabled: C.length === 1,
4161
4164
  type: "button",
4162
4165
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4163
- onClick: () => Q(O),
4164
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
4166
+ onClick: () => Q(D),
4167
+ children: /* @__PURE__ */ n.jsx(z, { icon: "iconamoon:sign-times-fill" })
4165
4168
  }
4166
4169
  )
4167
4170
  ]
@@ -4176,9 +4179,9 @@ const ms = B.object().shape({
4176
4179
  {
4177
4180
  type: "button",
4178
4181
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
4179
- onClick: () => I({ label: "", value: "", id: xi() }),
4182
+ onClick: () => K({ label: "", value: "", id: xi() }),
4180
4183
  children: [
4181
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4184
+ /* @__PURE__ */ n.jsx(z, { icon: "qlementine-icons:plus-16" }),
4182
4185
  " Add Option"
4183
4186
  ]
4184
4187
  }
@@ -4190,7 +4193,7 @@ const ms = B.object().shape({
4190
4193
  /* @__PURE__ */ n.jsxs("div", { children: [
4191
4194
  " ",
4192
4195
  /* @__PURE__ */ n.jsx("h3", { className: "mb-4 text-sm text-gray-500", children: "Child Options " }),
4193
- W == null ? void 0 : W.map((H, O) => /* @__PURE__ */ n.jsxs(
4196
+ W == null ? void 0 : W.map((H, D) => /* @__PURE__ */ n.jsxs(
4194
4197
  "div",
4195
4198
  {
4196
4199
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
@@ -4200,8 +4203,8 @@ const ms = B.object().shape({
4200
4203
  {
4201
4204
  watch: m,
4202
4205
  label: "Label",
4203
- name: `options1.${O}.label`,
4204
- register: v,
4206
+ name: `options1.${D}.label`,
4207
+ register: h,
4205
4208
  errors: x,
4206
4209
  element: o,
4207
4210
  placeholder: "Label",
@@ -4213,8 +4216,8 @@ const ms = B.object().shape({
4213
4216
  {
4214
4217
  watch: m,
4215
4218
  label: "Value",
4216
- name: `options1.${O}.value`,
4217
- register: v,
4219
+ name: `options1.${D}.value`,
4220
+ register: h,
4218
4221
  errors: x,
4219
4222
  element: o,
4220
4223
  placeholder: "Value",
@@ -4226,8 +4229,8 @@ const ms = B.object().shape({
4226
4229
  {
4227
4230
  watch: m,
4228
4231
  label: "Key",
4229
- name: `options1.${O}.key`,
4230
- register: v,
4232
+ name: `options1.${D}.key`,
4233
+ register: h,
4231
4234
  errors: x,
4232
4235
  element: o,
4233
4236
  placeholder: "Key",
@@ -4240,8 +4243,8 @@ const ms = B.object().shape({
4240
4243
  disabled: W.length === 1,
4241
4244
  type: "button",
4242
4245
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4243
- onClick: () => M(O),
4244
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
4246
+ onClick: () => M(D),
4247
+ children: /* @__PURE__ */ n.jsx(z, { icon: "iconamoon:sign-times-fill" })
4245
4248
  }
4246
4249
  )
4247
4250
  ]
@@ -4257,7 +4260,7 @@ const ms = B.object().shape({
4257
4260
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
4258
4261
  onClick: () => Z({ label: "", value: "", key: "", id: xi() }),
4259
4262
  children: [
4260
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4263
+ /* @__PURE__ */ n.jsx(z, { icon: "qlementine-icons:plus-16" }),
4261
4264
  " Add Option"
4262
4265
  ]
4263
4266
  }
@@ -4266,13 +4269,13 @@ const ms = B.object().shape({
4266
4269
  ] })
4267
4270
  ] })
4268
4271
  ] }), bi = () => /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col justify-start gap-y-1", children: [
4269
- /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((H) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
4272
+ /* @__PURE__ */ n.jsx("div", { className: "flex items-center mb-4 gap-x-5", children: U == null ? void 0 : U.map((H) => /* @__PURE__ */ n.jsxs("label", { className: "items-center text-base capitalize gap-x-3", children: [
4270
4273
  /* @__PURE__ */ n.jsx(
4271
4274
  "input",
4272
4275
  {
4273
4276
  type: "radio",
4274
4277
  name: "optionType",
4275
- onChange: (O) => c(O.target.value),
4278
+ onChange: (D) => c(D.target.value),
4276
4279
  value: H,
4277
4280
  checked: H === r
4278
4281
  }
@@ -4293,7 +4296,7 @@ const ms = B.object().shape({
4293
4296
  label: "Load Columns from Api",
4294
4297
  name: "apiUrl",
4295
4298
  errors: x,
4296
- register: v,
4299
+ register: h,
4297
4300
  className: "!w-full",
4298
4301
  placeholder: "https://example.com/columns",
4299
4302
  isFloating: !0
@@ -4305,7 +4308,7 @@ const ms = B.object().shape({
4305
4308
  /* @__PURE__ */ n.jsx(
4306
4309
  "button",
4307
4310
  {
4308
- onClick: ai,
4311
+ onClick: ni,
4309
4312
  className: "px-3 py-1 text-xs text-white bg-gray-600 rounded",
4310
4313
  type: "button",
4311
4314
  children: "Load"
@@ -4323,11 +4326,11 @@ const ms = B.object().shape({
4323
4326
  name: "dataColumns"
4324
4327
  }
4325
4328
  ) }),
4326
- E == null ? void 0 : E.map((H, O) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-4 ", children: [
4329
+ E == null ? void 0 : E.map((H, D) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-4 ", children: [
4327
4330
  /* @__PURE__ */ n.jsx("div", { className: "min-w-[140px]", children: /* @__PURE__ */ n.jsx(
4328
4331
  wi,
4329
4332
  {
4330
- label: O === 0 ? "Type" : "",
4333
+ label: D === 0 ? "Type" : "",
4331
4334
  options: [
4332
4335
  {
4333
4336
  label: "Text",
@@ -4342,20 +4345,20 @@ const ms = B.object().shape({
4342
4345
  value: "checkbox"
4343
4346
  }
4344
4347
  ],
4345
- register: v,
4346
- name: `dataColumns.${O}.type`,
4348
+ register: h,
4349
+ name: `dataColumns.${D}.type`,
4347
4350
  setValue: f,
4348
4351
  trigger: p,
4349
- value: A.dataColumns[O].type
4352
+ value: A.dataColumns[D].type
4350
4353
  }
4351
4354
  ) }),
4352
4355
  /* @__PURE__ */ n.jsx("div", { className: "flex-1", children: /* @__PURE__ */ n.jsx(
4353
4356
  F,
4354
4357
  {
4355
4358
  watch: m,
4356
- label: O === 0 ? "Field key" : "",
4357
- name: `dataColumns.${O}.field`,
4358
- register: v,
4359
+ label: D === 0 ? "Field key" : "",
4360
+ name: `dataColumns.${D}.field`,
4361
+ register: h,
4359
4362
  errors: x,
4360
4363
  element: o,
4361
4364
  placeholder: "fieldKey"
@@ -4365,9 +4368,9 @@ const ms = B.object().shape({
4365
4368
  F,
4366
4369
  {
4367
4370
  watch: m,
4368
- label: O === 0 ? "Display header" : "",
4369
- name: `dataColumns.${O}.headerName`,
4370
- register: v,
4371
+ label: D === 0 ? "Display header" : "",
4372
+ name: `dataColumns.${D}.headerName`,
4373
+ register: h,
4371
4374
  errors: x,
4372
4375
  element: o,
4373
4376
  placeholder: "header"
@@ -4379,8 +4382,8 @@ const ms = B.object().shape({
4379
4382
  disabled: E.length === 1,
4380
4383
  type: "button",
4381
4384
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
4382
- onClick: () => L(O),
4383
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:sign-times-fill" })
4385
+ onClick: () => L(D),
4386
+ children: /* @__PURE__ */ n.jsx(z, { icon: "iconamoon:sign-times-fill" })
4384
4387
  }
4385
4388
  )
4386
4389
  ] }, H.id)),
@@ -4400,23 +4403,23 @@ const ms = B.object().shape({
4400
4403
  validate: !1
4401
4404
  }),
4402
4405
  children: [
4403
- /* @__PURE__ */ n.jsx(U, { icon: "qlementine-icons:plus-16" }),
4406
+ /* @__PURE__ */ n.jsx(z, { icon: "qlementine-icons:plus-16" }),
4404
4407
  " Add column"
4405
4408
  ]
4406
4409
  }
4407
4410
  )
4408
4411
  ] })
4409
- ] }), di = Y(async () => {
4410
- const H = fi("token"), { status: O, data: si } = await Di.get(A.url, {
4412
+ ] }), ai = Y(async () => {
4413
+ const H = fi("token"), { status: D, data: li } = await Di.get(A.url, {
4411
4414
  headers: {
4412
4415
  Authorization: `Bearer ${H}`
4413
4416
  }
4414
4417
  });
4415
- O === 200 && f("options", (si == null ? void 0 : si.data) || si);
4418
+ D === 200 && f("options", (li == null ? void 0 : li.data) || li);
4416
4419
  }, [f, A.url]);
4417
- return K(() => {
4418
- o.type === "document" && A.url && di();
4419
- }, [A.url, o.type, di]), /* @__PURE__ */ n.jsx(
4420
+ return O(() => {
4421
+ o.type === "document" && A.url && ai();
4422
+ }, [A.url, o.type, ai]), /* @__PURE__ */ n.jsx(
4420
4423
  "div",
4421
4424
  {
4422
4425
  className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default select-none ",
@@ -4434,7 +4437,7 @@ const ms = B.object().shape({
4434
4437
  {
4435
4438
  className: "bg-white h-10 w-10 flex justify-center items-center absolute top-1 -left-12 rounded-lg hover:bg-gray-50",
4436
4439
  onClick: e,
4437
- children: /* @__PURE__ */ n.jsx(U, { icon: "tabler:x", iconClass: "text-xl" })
4440
+ children: /* @__PURE__ */ n.jsx(z, { icon: "tabler:x", iconClass: "text-xl" })
4438
4441
  }
4439
4442
  ),
4440
4443
  /* @__PURE__ */ n.jsx("div", { className: "w-full pt-4", children: /* @__PURE__ */ n.jsx(
@@ -4463,7 +4466,7 @@ const ms = B.object().shape({
4463
4466
  watch: m,
4464
4467
  label: "Value",
4465
4468
  name: "value",
4466
- register: v,
4469
+ register: h,
4467
4470
  errors: x,
4468
4471
  element: o
4469
4472
  }
@@ -4475,7 +4478,7 @@ const ms = B.object().shape({
4475
4478
  watch: m,
4476
4479
  label: "Label",
4477
4480
  name: "inputLabel",
4478
- register: v,
4481
+ register: h,
4479
4482
  errors: x,
4480
4483
  element: o
4481
4484
  }
@@ -4487,7 +4490,7 @@ const ms = B.object().shape({
4487
4490
  watch: m,
4488
4491
  label: "Child Label",
4489
4492
  name: "childLabel",
4490
- register: v,
4493
+ register: h,
4491
4494
  errors: x,
4492
4495
  element: o
4493
4496
  }
@@ -4499,7 +4502,7 @@ const ms = B.object().shape({
4499
4502
  watch: m,
4500
4503
  label: "Placeholder",
4501
4504
  name: "placeholder",
4502
- register: v,
4505
+ register: h,
4503
4506
  errors: x,
4504
4507
  element: o
4505
4508
  }
@@ -4510,7 +4513,7 @@ const ms = B.object().shape({
4510
4513
  watch: m,
4511
4514
  label: "Prefix",
4512
4515
  name: "prefix",
4513
- register: v,
4516
+ register: h,
4514
4517
  errors: x,
4515
4518
  element: o
4516
4519
  }
@@ -4523,7 +4526,7 @@ const ms = B.object().shape({
4523
4526
  watch: m,
4524
4527
  label: "Api Url",
4525
4528
  name: "url",
4526
- register: v,
4529
+ register: h,
4527
4530
  errors: x,
4528
4531
  element: o
4529
4532
  }
@@ -4542,7 +4545,7 @@ const ms = B.object().shape({
4542
4545
  value: "POST"
4543
4546
  }
4544
4547
  ],
4545
- register: v,
4548
+ register: h,
4546
4549
  name: "method",
4547
4550
  setValue: f,
4548
4551
  trigger: p,
@@ -4563,7 +4566,7 @@ const ms = B.object().shape({
4563
4566
  value: "object"
4564
4567
  }
4565
4568
  ],
4566
- register: v,
4569
+ register: h,
4567
4570
  name: "responseType",
4568
4571
  setValue: f,
4569
4572
  trigger: p,
@@ -4586,7 +4589,7 @@ const ms = B.object().shape({
4586
4589
  watch: m,
4587
4590
  label: "Short Description",
4588
4591
  name: "description",
4589
- register: v,
4592
+ register: h,
4590
4593
  errors: x,
4591
4594
  element: o
4592
4595
  }
@@ -4597,7 +4600,7 @@ const ms = B.object().shape({
4597
4600
  {
4598
4601
  label: "Date Format",
4599
4602
  options: Ya,
4600
- register: v,
4603
+ register: h,
4601
4604
  name: "dateFormat",
4602
4605
  setValue: f,
4603
4606
  trigger: p,
@@ -4610,7 +4613,7 @@ const ms = B.object().shape({
4610
4613
  watch: m,
4611
4614
  label: "Allow Range",
4612
4615
  name: "canHaveDateRange",
4613
- register: v,
4616
+ register: h,
4614
4617
  errors: x,
4615
4618
  element: o,
4616
4619
  type: "checkbox"
@@ -4643,7 +4646,7 @@ const ms = B.object().shape({
4643
4646
  watch: m,
4644
4647
  label: "Allow Year Picker",
4645
4648
  name: "allowYearPicker",
4646
- register: v,
4649
+ register: h,
4647
4650
  errors: x,
4648
4651
  element: o,
4649
4652
  type: "checkbox"
@@ -4656,7 +4659,7 @@ const ms = B.object().shape({
4656
4659
  watch: m,
4657
4660
  label: "Allow States",
4658
4661
  name: "showState",
4659
- register: v,
4662
+ register: h,
4660
4663
  errors: x,
4661
4664
  element: o,
4662
4665
  type: "checkbox"
@@ -4676,7 +4679,7 @@ const ms = B.object().shape({
4676
4679
  value: "Combobox"
4677
4680
  }
4678
4681
  ],
4679
- register: v,
4682
+ register: h,
4680
4683
  name: "selectType",
4681
4684
  setValue: f,
4682
4685
  trigger: p,
@@ -4689,7 +4692,7 @@ const ms = B.object().shape({
4689
4692
  watch: m,
4690
4693
  label: "Number of columns (max: 4)",
4691
4694
  name: "columns",
4692
- register: v,
4695
+ register: h,
4693
4696
  errors: x,
4694
4697
  element: o,
4695
4698
  max: 4,
@@ -4704,7 +4707,7 @@ const ms = B.object().shape({
4704
4707
  watch: m,
4705
4708
  label: "Document Options Url",
4706
4709
  name: "url",
4707
- register: v,
4710
+ register: h,
4708
4711
  errors: x,
4709
4712
  element: o
4710
4713
  }
@@ -4719,7 +4722,7 @@ const ms = B.object().shape({
4719
4722
  watch: m,
4720
4723
  label: "Document Validation Url",
4721
4724
  name: "validationUrl",
4722
- register: v,
4725
+ register: h,
4723
4726
  errors: x,
4724
4727
  element: o
4725
4728
  }
@@ -4732,7 +4735,7 @@ const ms = B.object().shape({
4732
4735
  watch: m,
4733
4736
  label: "Signature Page Url",
4734
4737
  name: "signatureLink",
4735
- register: v,
4738
+ register: h,
4736
4739
  errors: x,
4737
4740
  element: o
4738
4741
  }
@@ -4746,7 +4749,7 @@ const ms = B.object().shape({
4746
4749
  watch: m,
4747
4750
  label: "Allow Multiple Uploads",
4748
4751
  name: "isMultiple",
4749
- register: v,
4752
+ register: h,
4750
4753
  errors: x,
4751
4754
  element: o,
4752
4755
  type: "checkbox"
@@ -4760,7 +4763,7 @@ const ms = B.object().shape({
4760
4763
  id: "acceptedFiles",
4761
4764
  value: A == null ? void 0 : A.acceptedFiles
4762
4765
  },
4763
- validationData: { register: v, setValue: f, trigger: p, watch: m },
4766
+ validationData: { register: h, setValue: f, trigger: p, watch: m },
4764
4767
  placeholder: "Choose file types"
4765
4768
  }
4766
4769
  )
@@ -4773,7 +4776,7 @@ const ms = B.object().shape({
4773
4776
  watch: m,
4774
4777
  label: "Toggle Visibility",
4775
4778
  name: "isHidden",
4776
- register: v,
4779
+ register: h,
4777
4780
  errors: x,
4778
4781
  element: o,
4779
4782
  type: "checkbox"
@@ -4783,7 +4786,7 @@ const ms = B.object().shape({
4783
4786
  A.isHidden && /* @__PURE__ */ n.jsx(
4784
4787
  rs,
4785
4788
  {
4786
- register: v,
4789
+ register: h,
4787
4790
  setValue: f,
4788
4791
  trigger: p,
4789
4792
  watch: m,
@@ -4800,7 +4803,7 @@ const ms = B.object().shape({
4800
4803
  watch: m,
4801
4804
  label: "Required",
4802
4805
  name: "isRequired",
4803
- register: v,
4806
+ register: h,
4804
4807
  errors: x,
4805
4808
  element: o,
4806
4809
  type: "checkbox"
@@ -4813,7 +4816,7 @@ const ms = B.object().shape({
4813
4816
  watch: m,
4814
4817
  label: "Error message text",
4815
4818
  name: "requiredMessage",
4816
- register: v,
4819
+ register: h,
4817
4820
  errors: x,
4818
4821
  element: o
4819
4822
  }
@@ -4827,7 +4830,7 @@ const ms = B.object().shape({
4827
4830
  watch: m,
4828
4831
  label: "Min Length",
4829
4832
  name: "minLength",
4830
- register: v,
4833
+ register: h,
4831
4834
  errors: x,
4832
4835
  element: o,
4833
4836
  type: "number"
@@ -4840,7 +4843,7 @@ const ms = B.object().shape({
4840
4843
  watch: m,
4841
4844
  label: "Error message text",
4842
4845
  name: "minLengthMessage",
4843
- register: v,
4846
+ register: h,
4844
4847
  errors: x,
4845
4848
  element: o
4846
4849
  }
@@ -4853,7 +4856,7 @@ const ms = B.object().shape({
4853
4856
  watch: m,
4854
4857
  label: "Max Length",
4855
4858
  name: "maxLength",
4856
- register: v,
4859
+ register: h,
4857
4860
  errors: x,
4858
4861
  element: o,
4859
4862
  type: "number"
@@ -4866,7 +4869,7 @@ const ms = B.object().shape({
4866
4869
  watch: m,
4867
4870
  label: "Error message text",
4868
4871
  name: "maxLengthMessage",
4869
- register: v,
4872
+ register: h,
4870
4873
  errors: x,
4871
4874
  element: o
4872
4875
  }
@@ -4881,7 +4884,7 @@ const ms = B.object().shape({
4881
4884
  watch: m,
4882
4885
  label: "Min Amount",
4883
4886
  name: "minAmount",
4884
- register: v,
4887
+ register: h,
4885
4888
  errors: x,
4886
4889
  element: o,
4887
4890
  type: "amount"
@@ -4894,7 +4897,7 @@ const ms = B.object().shape({
4894
4897
  watch: m,
4895
4898
  label: "Error message text",
4896
4899
  name: "minAmountMessage",
4897
- register: v,
4900
+ register: h,
4898
4901
  errors: x,
4899
4902
  element: o
4900
4903
  }
@@ -4907,7 +4910,7 @@ const ms = B.object().shape({
4907
4910
  watch: m,
4908
4911
  label: "Max Amount",
4909
4912
  name: "maxAmount",
4910
- register: v,
4913
+ register: h,
4911
4914
  errors: x,
4912
4915
  element: o,
4913
4916
  type: "amount"
@@ -4920,7 +4923,7 @@ const ms = B.object().shape({
4920
4923
  watch: m,
4921
4924
  label: "Error message text",
4922
4925
  name: "maxAmountMessage",
4923
- register: v,
4926
+ register: h,
4924
4927
  errors: x,
4925
4928
  element: o
4926
4929
  }
@@ -4945,7 +4948,7 @@ const ms = B.object().shape({
4945
4948
  {
4946
4949
  type: "submit",
4947
4950
  disabled: !N || j,
4948
- style: { background: (h == null ? void 0 : h.buttonColor) || "#333" },
4951
+ style: { background: (v == null ? void 0 : v.buttonColor) || "#333" },
4949
4952
  className: `flex-1 px-4 py-2.5 ${!N || j ? "bg-[#F2F4F7]" : "bg-[#2563EB]"} ${!N || j ? "text-[#98A2B3]" : "text-white"} rounded-lg shadow-xs font-semibold font-onest disabled:opacity-50 editor_option__save`,
4950
4953
  children: j ? "Saving..." : "Save"
4951
4954
  }
@@ -5000,7 +5003,7 @@ const ms = B.object().shape({
5000
5003
  className: "text-sm outline-none hover:opacity-80 py-1",
5001
5004
  onClick: () => d(e == null ? void 0 : e.id, e.sectionId),
5002
5005
  title: "Duplicate",
5003
- children: /* @__PURE__ */ n.jsx(U, { icon: "tabler:copy", iconClass: "text-base" })
5006
+ children: /* @__PURE__ */ n.jsx(z, { icon: "tabler:copy", iconClass: "text-base" })
5004
5007
  }
5005
5008
  ),
5006
5009
  /* @__PURE__ */ n.jsx(
@@ -5010,7 +5013,7 @@ const ms = B.object().shape({
5010
5013
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
5011
5014
  onClick: () => a(!0),
5012
5015
  title: "Edit",
5013
- children: /* @__PURE__ */ n.jsx(U, { icon: "circum:edit", iconClass: "text-base" })
5016
+ children: /* @__PURE__ */ n.jsx(z, { icon: "circum:edit", iconClass: "text-base" })
5014
5017
  }
5015
5018
  ),
5016
5019
  /* @__PURE__ */ n.jsx(
@@ -5020,7 +5023,7 @@ const ms = B.object().shape({
5020
5023
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
5021
5024
  onClick: u,
5022
5025
  title: "Remove",
5023
- children: /* @__PURE__ */ n.jsx(U, { icon: "iconamoon:trash", iconClass: "text-base" })
5026
+ children: /* @__PURE__ */ n.jsx(z, { icon: "iconamoon:trash", iconClass: "text-base" })
5024
5027
  }
5025
5028
  )
5026
5029
  ] })
@@ -5156,12 +5159,12 @@ function fs({
5156
5159
  validationData: e
5157
5160
  }) {
5158
5161
  var A;
5159
- const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = R(), [t, u] = R(!1), [r, c] = R(!1), [h, v] = R(""), g = a && a(i == null ? void 0 : i.id);
5160
- K(() => {
5162
+ const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = R(), [t, u] = R(!1), [r, c] = R(!1), [v, h] = R(""), g = a && a(i == null ? void 0 : i.id);
5163
+ O(() => {
5161
5164
  d(g);
5162
5165
  }, [g]);
5163
5166
  const [y, f] = R("");
5164
- K(() => {
5167
+ O(() => {
5165
5168
  o(i.id);
5166
5169
  }, [i.id, o]);
5167
5170
  const { url: m, method: p, responseType: x } = i || {}, N = {
@@ -5170,26 +5173,26 @@ function fs({
5170
5173
  }
5171
5174
  }, S = Y(
5172
5175
  async (C) => {
5173
- var I, Q, W, Z, M, E, P, L, G, $, w;
5176
+ var K, Q, W, Z, M, E, P, L, G, q, w;
5174
5177
  if (!(!m || !p)) {
5175
5178
  u(!0);
5176
5179
  try {
5177
- let D;
5180
+ let I;
5178
5181
  if (p.toLowerCase() === "get") {
5179
- const z = `${m}?value=${C}`;
5180
- D = await Di.get(z, N);
5182
+ const U = `${m}?value=${C}`;
5183
+ I = await Di.get(U, N);
5181
5184
  } else if (p.toLowerCase() === "post")
5182
- D = await Di.post(m, { value: C }, N);
5185
+ I = await Di.post(m, { value: C }, N);
5183
5186
  else
5184
5187
  throw new Error("Unsupported HTTP method");
5185
- D.status === 200 && ((((Q = (I = D == null ? void 0 : D.data) == null ? void 0 : I.data) == null ? void 0 : Q.status) || ((W = D == null ? void 0 : D.data) == null ? void 0 : W.status)) === !0 ? (c(!0), x === "string" ? v(
5186
- ((M = (Z = D == null ? void 0 : D.data) == null ? void 0 : Z.data) == null ? void 0 : M.description) || ((E = D == null ? void 0 : D.data) == null ? void 0 : E.description) || "Validation successful"
5188
+ I.status === 200 && ((((Q = (K = I == null ? void 0 : I.data) == null ? void 0 : K.data) == null ? void 0 : Q.status) || ((W = I == null ? void 0 : I.data) == null ? void 0 : W.status)) === !0 ? (c(!0), x === "string" ? h(
5189
+ ((M = (Z = I == null ? void 0 : I.data) == null ? void 0 : Z.data) == null ? void 0 : M.description) || ((E = I == null ? void 0 : I.data) == null ? void 0 : E.description) || "Validation successful"
5187
5190
  ) : f(
5188
- ((L = (P = D == null ? void 0 : D.data) == null ? void 0 : P.data) == null ? void 0 : L.description) || ((G = D == null ? void 0 : D.data) == null ? void 0 : G.description) || {}
5189
- )) : (console.error("Invalid input:", C), v("Unable to validate input"), c(!1)));
5190
- } catch (D) {
5191
- console.error("Error validating input:", D), v(
5192
- ((w = ($ = D == null ? void 0 : D.response) == null ? void 0 : $.data) == null ? void 0 : w.message) || "Unable to validate input"
5191
+ ((L = (P = I == null ? void 0 : I.data) == null ? void 0 : P.data) == null ? void 0 : L.description) || ((G = I == null ? void 0 : I.data) == null ? void 0 : G.description) || {}
5192
+ )) : (console.error("Invalid input:", C), h("Unable to validate input"), c(!1)));
5193
+ } catch (I) {
5194
+ console.error("Error validating input:", I), h(
5195
+ ((w = (q = I == null ? void 0 : I.response) == null ? void 0 : q.data) == null ? void 0 : w.message) || "Unable to validate input"
5193
5196
  ), c(!1);
5194
5197
  } finally {
5195
5198
  u(!1);
@@ -5198,7 +5201,7 @@ function fs({
5198
5201
  },
5199
5202
  [p, x, m]
5200
5203
  );
5201
- return K(() => {
5204
+ return O(() => {
5202
5205
  if (l) {
5203
5206
  const C = setTimeout(() => {
5204
5207
  S(l);
@@ -5254,22 +5257,22 @@ function fs({
5254
5257
  }
5255
5258
  )
5256
5259
  ] }),
5257
- r && !t && /* @__PURE__ */ n.jsx("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n.jsx(U, { icon: "gg:check-o" }) })
5260
+ r && !t && /* @__PURE__ */ n.jsx("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n.jsx(z, { icon: "gg:check-o" }) })
5258
5261
  ] })
5259
5262
  ] }),
5260
- h && x === "string" && /* @__PURE__ */ n.jsx(
5263
+ v && x === "string" && /* @__PURE__ */ n.jsx(
5261
5264
  "span",
5262
5265
  {
5263
5266
  className: `${r ? "text-green-600" : "text-red-600"} text-sm`,
5264
- children: h
5267
+ children: v
5265
5268
  }
5266
5269
  ),
5267
- x === "object" && /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (A = Object.entries(y)) == null ? void 0 : A.map(([C, I]) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5270
+ x === "object" && /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (A = Object.entries(y)) == null ? void 0 : A.map(([C, K]) => /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5268
5271
  /* @__PURE__ */ n.jsxs("span", { className: "font-semibold", children: [
5269
5272
  C,
5270
5273
  ":"
5271
5274
  ] }),
5272
- ps(I) ? /* @__PURE__ */ n.jsx(gs, { imageUrl: I }) : /* @__PURE__ */ n.jsx("span", { children: String(I) })
5275
+ ps(K) ? /* @__PURE__ */ n.jsx(gs, { imageUrl: K }) : /* @__PURE__ */ n.jsx("span", { children: String(K) })
5273
5276
  ] }, C)) })
5274
5277
  ] });
5275
5278
  }
@@ -5281,12 +5284,12 @@ function xs({
5281
5284
  }) {
5282
5285
  const [a, l] = R([...o]);
5283
5286
  function d(r, c) {
5284
- l((h) => {
5285
- const v = [...h];
5286
- return v[c] = {
5287
- ...v[c],
5287
+ l((v) => {
5288
+ const h = [...v];
5289
+ return h[c] = {
5290
+ ...h[c],
5288
5291
  value: r
5289
- }, v;
5292
+ }, h;
5290
5293
  });
5291
5294
  }
5292
5295
  function t(r, c) {
@@ -5294,18 +5297,18 @@ function xs({
5294
5297
  }
5295
5298
  const u = ii(
5296
5299
  () => a.reduce((r, c) => {
5297
- const h = t(c.key, c.value);
5298
- return r + h;
5300
+ const v = t(c.key, c.value);
5301
+ return r + v;
5299
5302
  }, 0),
5300
5303
  [a]
5301
5304
  );
5302
- return K(() => {
5305
+ return O(() => {
5303
5306
  i && i(a);
5304
- }, [a]), K(() => {
5307
+ }, [a]), O(() => {
5305
5308
  if (s != null && s.length) {
5306
- const r = s == null ? void 0 : s.map((c, h) => ({
5309
+ const r = s == null ? void 0 : s.map((c, v) => ({
5307
5310
  key: c.value,
5308
- value: Array.isArray(o) && o[h] ? o[h].value : ""
5311
+ value: Array.isArray(o) && o[v] ? o[v].value : ""
5309
5312
  }));
5310
5313
  l(r);
5311
5314
  }
@@ -5316,13 +5319,13 @@ function xs({
5316
5319
  /* @__PURE__ */ n.jsx("div", { className: "px-4 py-2", children: /* @__PURE__ */ n.jsx("span", { children: "Sub total" }) })
5317
5320
  ] }),
5318
5321
  a == null ? void 0 : a.map((r, c) => {
5319
- var h, v;
5322
+ var v, h;
5320
5323
  return /* @__PURE__ */ n.jsxs(
5321
5324
  "div",
5322
5325
  {
5323
5326
  className: "grid grid-cols-3 text-sm border-b border-gray-100",
5324
5327
  children: [
5325
- /* @__PURE__ */ n.jsx("div", { className: "border-r px-4 py-2 flex items-center", children: /* @__PURE__ */ n.jsx("span", { className: "", children: (h = parseFloat(r.key)) == null ? void 0 : h.toLocaleString() }) }),
5328
+ /* @__PURE__ */ n.jsx("div", { className: "border-r px-4 py-2 flex items-center", children: /* @__PURE__ */ n.jsx("span", { className: "", children: (v = parseFloat(r.key)) == null ? void 0 : v.toLocaleString() }) }),
5326
5329
  /* @__PURE__ */ n.jsx("div", { className: "border-r px-4 py-1", children: /* @__PURE__ */ n.jsx("span", { children: /* @__PURE__ */ n.jsx(
5327
5330
  sn,
5328
5331
  {
@@ -5335,7 +5338,7 @@ function xs({
5335
5338
  allowNegativeValue: !1
5336
5339
  }
5337
5340
  ) }) }),
5338
- /* @__PURE__ */ n.jsx("div", { className: "px-4 py-2 flex justify-between items-center", children: /* @__PURE__ */ n.jsx("span", { children: (v = t(r.key, r.value)) == null ? void 0 : v.toLocaleString() }) })
5341
+ /* @__PURE__ */ n.jsx("div", { className: "px-4 py-2 flex justify-between items-center", children: /* @__PURE__ */ n.jsx("span", { children: (h = t(r.key, r.value)) == null ? void 0 : h.toLocaleString() }) })
5339
5342
  ]
5340
5343
  },
5341
5344
  c + "index"
@@ -5352,7 +5355,7 @@ function ys({
5352
5355
  validationData: e
5353
5356
  }) {
5354
5357
  const { register: o = () => ({}), setValue: s, getValues: a } = e || {}, l = a && a(i == null ? void 0 : i.id) || [];
5355
- return K(() => {
5358
+ return O(() => {
5356
5359
  o(i.id);
5357
5360
  }, [i.id, o]), /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
5358
5361
  xs,
@@ -5408,7 +5411,7 @@ function ks({
5408
5411
  return /* @__PURE__ */ n.jsxs("tr", { children: [
5409
5412
  e.map((c) => {
5410
5413
  var x;
5411
- const h = i[c.field], v = c.editable && !o, g = r(c.field), { isValidating: y, result: f } = t(i.id, c.field);
5414
+ const v = i[c.field], h = c.editable && !o, g = r(c.field), { isValidating: y, result: f } = t(i.id, c.field);
5412
5415
  let m = "border-gray-300";
5413
5416
  c.validate && ((f == null ? void 0 : f.isValid) === !1 ? m = "border-red-500 bg-red-50" : (f == null ? void 0 : f.isValid) === !0 && (m = "border-green-500 bg-green-50"));
5414
5417
  const p = `w-full px-2 py-1 border rounded outline-none ${m}`;
@@ -5417,21 +5420,21 @@ function ks({
5417
5420
  {
5418
5421
  title: o ? "" : "Double click to edit",
5419
5422
  className: "px-3 py-1 border",
5420
- onDoubleClick: () => v && a({
5423
+ onDoubleClick: () => h && a({
5421
5424
  rowId: i.id,
5422
5425
  field: c.field
5423
5426
  }),
5424
- children: v && g ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
5427
+ children: h && g ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
5425
5428
  c.type === "number" ? /* @__PURE__ */ n.jsx(
5426
5429
  sn,
5427
5430
  {
5428
- value: h,
5431
+ value: v,
5429
5432
  decimalsLimit: 6,
5430
5433
  allowNegativeValue: !1,
5431
5434
  className: p,
5432
5435
  onValueChange: (j) => l(j, i.id, c.field),
5433
5436
  onBlur: () => {
5434
- a(null), d(h, i.id, c.field, c);
5437
+ a(null), d(v, i.id, c.field, c);
5435
5438
  },
5436
5439
  autoFocus: !0
5437
5440
  }
@@ -5451,7 +5454,7 @@ function ks({
5451
5454
  id: S,
5452
5455
  type: "radio",
5453
5456
  name: `boolean-${i.id}-${String(c.field)}`,
5454
- checked: h === N,
5457
+ checked: v === N,
5455
5458
  onChange: () => l(N, i.id, c.field)
5456
5459
  }
5457
5460
  ),
@@ -5464,10 +5467,10 @@ function ks({
5464
5467
  "input",
5465
5468
  {
5466
5469
  type: "text",
5467
- value: String(h != null ? h : ""),
5470
+ value: String(v != null ? v : ""),
5468
5471
  onChange: (j) => l(j.target.value, i.id, c.field),
5469
5472
  onBlur: () => {
5470
- a(null), d(h, i.id, c.field, c);
5473
+ a(null), d(v, i.id, c.field, c);
5471
5474
  },
5472
5475
  className: p,
5473
5476
  autoFocus: !0
@@ -5476,7 +5479,7 @@ function ks({
5476
5479
  y && /* @__PURE__ */ n.jsx("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ n.jsx("div", { className: "w-4 h-4 border-2 border-blue-500 rounded-full border-t-transparent animate-spin" }) })
5477
5480
  ] }) : c.validate && f ? /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
5478
5481
  /* @__PURE__ */ n.jsxs("span", { children: [
5479
- String(h != null ? h : ""),
5482
+ String(v != null ? v : ""),
5480
5483
  " ",
5481
5484
  f.data && `[${f.data}]`
5482
5485
  ] }),
@@ -5488,7 +5491,7 @@ function ks({
5488
5491
  children: "✗"
5489
5492
  }
5490
5493
  )
5491
- ] }) : c.type === "checkbox" ? /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700", children: h === !0 ? "Yes" : h === !1 ? "No" : "" }) : /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700 cursor-pointer", children: String(h != null ? h : "") })
5494
+ ] }) : c.type === "checkbox" ? /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700", children: v === !0 ? "Yes" : v === !1 ? "No" : "" }) : /* @__PURE__ */ n.jsx("span", { className: "block py-1 text-gray-700 cursor-pointer", children: String(v != null ? v : "") })
5492
5495
  },
5493
5496
  String(c.id)
5494
5497
  );
@@ -5500,7 +5503,7 @@ function ks({
5500
5503
  onClick: () => u(i.id),
5501
5504
  className: "text-red-500 hover:text-red-700",
5502
5505
  "aria-label": "Delete row",
5503
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
5506
+ children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
5504
5507
  }
5505
5508
  ) })
5506
5509
  ] });
@@ -5513,7 +5516,7 @@ function Ms({
5513
5516
  columns: s
5514
5517
  }) {
5515
5518
  const [a, l] = R(i), [d, t] = R(null), u = Ii(null), [r, c] = R(0);
5516
- K(() => {
5519
+ O(() => {
5517
5520
  const f = document.getElementById("form");
5518
5521
  if (!f) return;
5519
5522
  const m = (x) => {
@@ -5526,17 +5529,17 @@ function Ms({
5526
5529
  m(j.target);
5527
5530
  });
5528
5531
  return p.observe(f), () => p.disconnect();
5529
- }, []), K(() => {
5532
+ }, []), O(() => {
5530
5533
  l((f) => JSON.stringify(f) !== JSON.stringify(i) ? i : f);
5531
- }, [i]), K(() => {
5534
+ }, [i]), O(() => {
5532
5535
  e == null || e(a);
5533
- }, [a, e]), K(() => {
5536
+ }, [a, e]), O(() => {
5534
5537
  const f = (m) => {
5535
5538
  u.current && !u.current.contains(m.target) && t(null);
5536
5539
  };
5537
5540
  return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
5538
5541
  }, []);
5539
- const h = Y(
5542
+ const v = Y(
5540
5543
  (f, m, p) => {
5541
5544
  l(
5542
5545
  (x) => x.map(
@@ -5545,7 +5548,7 @@ function Ms({
5545
5548
  );
5546
5549
  },
5547
5550
  []
5548
- ), v = Y(() => {
5551
+ ), h = Y(() => {
5549
5552
  const f = xi(), m = s.reduce((p, x) => (p[x.field] = x.field === "id" ? f : "", p), {});
5550
5553
  l((p) => [...p, { id: f, ...m }]);
5551
5554
  }, [s]), g = Y((f) => {
@@ -5561,7 +5564,7 @@ function Ms({
5561
5564
  /* @__PURE__ */ n.jsx("div", { className: "flex justify-end", children: !o && /* @__PURE__ */ n.jsx(
5562
5565
  "button",
5563
5566
  {
5564
- onClick: v,
5567
+ onClick: h,
5565
5568
  type: "button",
5566
5569
  className: "px-2 py-1 mb-3 text-xs text-white bg-gray-600 rounded hover:bg-gray-700",
5567
5570
  children: "Add Row"
@@ -5598,7 +5601,7 @@ function Ms({
5598
5601
  isReadOnly: o,
5599
5602
  editingCell: d,
5600
5603
  setEditingCell: t,
5601
- handleCellChange: h,
5604
+ handleCellChange: v,
5602
5605
  debouncedValidate: () => {
5603
5606
  },
5604
5607
  getValidationStatus: y,
@@ -5628,7 +5631,7 @@ function Ts({
5628
5631
  watch: a,
5629
5632
  isReadOnly: l
5630
5633
  } = e || {}, d = a && a(i == null ? void 0 : i.id) || [];
5631
- K(() => {
5634
+ O(() => {
5632
5635
  o(i.id);
5633
5636
  }, [i.id, o]);
5634
5637
  const t = Y(
@@ -5659,43 +5662,43 @@ const ge = ({
5659
5662
  value: u,
5660
5663
  trigger: r,
5661
5664
  isMultiple: c = !1,
5662
- isFloatingLabel: h = !1,
5663
- subText: v,
5665
+ isFloatingLabel: v = !1,
5666
+ subText: h,
5664
5667
  labelClass: g = "",
5665
5668
  loading: y,
5666
5669
  disabled: f
5667
5670
  }) => {
5668
5671
  const [m, p] = R(c ? [] : null), x = J("custom-select__control", i), j = ii(() => e, [e]);
5669
- return K(() => {
5672
+ return O(() => {
5670
5673
  const N = e == null ? void 0 : e.find((S) => {
5671
5674
  var A;
5672
5675
  return typeof S.value == "string" && typeof u == "string" ? S.value.toLowerCase() === u.toLowerCase() : typeof S.value == "object" && typeof u == "object" ? ((A = S.value) == null ? void 0 : A.id) === (u == null ? void 0 : u.id) : S.value === u;
5673
5676
  });
5674
5677
  p(N || null);
5675
- }, [u, e]), K(() => {
5678
+ }, [u, e]), O(() => {
5676
5679
  m && l && a && (l(d, m == null ? void 0 : m.value), a(d), r == null || r(d));
5677
5680
  }, [d, m]), /* @__PURE__ */ n.jsxs("div", { className: "custom-select", children: [
5678
- t && !h && /* @__PURE__ */ n.jsx("label", { className: "custom-select__label", children: t }),
5679
- h && t && /* @__PURE__ */ n.jsx("label", { className: J("custom-select__floating-label", g), children: t }),
5681
+ t && !v && /* @__PURE__ */ n.jsx("label", { className: "custom-select__label", children: t }),
5682
+ v && t && /* @__PURE__ */ n.jsx("label", { className: J("custom-select__floating-label", g), children: t }),
5680
5683
  /* @__PURE__ */ n.jsx(
5681
- ei,
5684
+ oi,
5682
5685
  {
5683
5686
  value: m,
5684
5687
  onChange: p,
5685
5688
  multiple: c,
5686
5689
  disabled: f,
5687
5690
  children: /* @__PURE__ */ n.jsxs("div", { className: "custom-select__wrapper", children: [
5688
- /* @__PURE__ */ n.jsxs(ei.Button, { className: x, disabled: f, children: [
5691
+ /* @__PURE__ */ n.jsxs(oi.Button, { className: x, disabled: f, children: [
5689
5692
  y ? /* @__PURE__ */ n.jsx("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n.jsx("span", { className: "custom-select__value", children: (m == null ? void 0 : m.label) || /* @__PURE__ */ n.jsx("span", { className: "custom-select__placeholder", children: o }) }),
5690
- /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) })
5693
+ /* @__PURE__ */ n.jsx("span", { className: "custom-select__icon", children: /* @__PURE__ */ n.jsx(z, { icon: "lucide:chevron-down" }) })
5691
5694
  ] }),
5692
5695
  /* @__PURE__ */ n.jsx(
5693
5696
  Ri,
5694
5697
  {
5695
5698
  as: ri.Fragment,
5696
5699
  leave: "custom-select__transition",
5697
- children: /* @__PURE__ */ n.jsx(ei.Options, { className: "custom-select__options", anchor: "bottom", children: j == null ? void 0 : j.map((N, S) => /* @__PURE__ */ n.jsx(
5698
- ei.Option,
5700
+ children: /* @__PURE__ */ n.jsx(oi.Options, { className: "custom-select__options", anchor: "bottom", children: j == null ? void 0 : j.map((N, S) => /* @__PURE__ */ n.jsx(
5701
+ oi.Option,
5699
5702
  {
5700
5703
  value: N,
5701
5704
  className: ({ active: A }) => J(
@@ -5720,7 +5723,7 @@ const ge = ({
5720
5723
  ] })
5721
5724
  }
5722
5725
  ),
5723
- v && !s && /* @__PURE__ */ n.jsx("p", { className: "custom-select__subtext", children: v }),
5726
+ h && !s && /* @__PURE__ */ n.jsx("p", { className: "custom-select__subtext", children: h }),
5724
5727
  s && /* @__PURE__ */ n.jsx("span", { className: "custom-select__error", children: s.message })
5725
5728
  ] });
5726
5729
  }, Es = ({
@@ -5734,18 +5737,18 @@ const ge = ({
5734
5737
  setValue: a,
5735
5738
  watch: l,
5736
5739
  isReadOnly: d
5737
- } = e || {}, t = (f = i == null ? void 0 : i.id) != null ? f : "cascadeValue", [u, r] = R(""), [c, h] = R(""), v = (m, p) => {
5740
+ } = e || {}, t = (f = i == null ? void 0 : i.id) != null ? f : "cascadeValue", [u, r] = R(""), [c, v] = R(""), h = (m, p) => {
5738
5741
  const x = m && p ? `${m}_${p}` : "";
5739
5742
  a == null || a(t, x), s == null || s(t);
5740
5743
  }, g = (m, p) => {
5741
- m === "first" ? (r(p), h(""), v(p, "")) : (h(p), v(u, p));
5744
+ m === "first" ? (r(p), v(""), h(p, "")) : (v(p), h(u, p));
5742
5745
  };
5743
- K(() => {
5746
+ O(() => {
5744
5747
  if (l) {
5745
5748
  const m = l(t);
5746
5749
  if (m != null && m.includes("_")) {
5747
5750
  const [p, x] = m.split("_");
5748
- r(p), h(x);
5751
+ r(p), v(x);
5749
5752
  }
5750
5753
  }
5751
5754
  }, [l, t]);
@@ -5797,14 +5800,14 @@ const ge = ({
5797
5800
  register: u = () => ({}),
5798
5801
  trigger: r,
5799
5802
  setValue: c,
5800
- watch: h,
5801
- isReadOnly: v
5802
- } = t || {}, g = (p = h == null ? void 0 : h(d.id)) != null ? p : 0, [y, f] = R(null);
5803
- K(() => {
5803
+ watch: v,
5804
+ isReadOnly: h
5805
+ } = t || {}, g = (p = v == null ? void 0 : v(d.id)) != null ? p : 0, [y, f] = R(null);
5806
+ O(() => {
5804
5807
  g == null && (c == null || c(d.id, i));
5805
5808
  }, []);
5806
5809
  const m = (x) => {
5807
- if (!o && !v) {
5810
+ if (!o && !h) {
5808
5811
  const j = x + 1;
5809
5812
  c == null || c(d.id, j), r == null || r(d.id), s == null || s(j);
5810
5813
  }
@@ -5820,8 +5823,8 @@ const ge = ({
5820
5823
  className: `cursor-pointer transition-colors ${N ? "text-yellow-400" : "text-gray-300"}`,
5821
5824
  width: a,
5822
5825
  height: a,
5823
- onMouseEnter: () => !(o || v) && f(j),
5824
- onMouseLeave: () => !(o || v) && f(null),
5826
+ onMouseEnter: () => !(o || h) && f(j),
5827
+ onMouseLeave: () => !(o || h) && f(null),
5825
5828
  onClick: () => m(j)
5826
5829
  },
5827
5830
  j
@@ -5846,20 +5849,20 @@ function fe({
5846
5849
  return { country: m, state: f };
5847
5850
  }
5848
5851
  return { country: t, state: "" };
5849
- }, [t]), c = Ii(t), h = ii(() => {
5852
+ }, [t]), c = Ii(t), v = ii(() => {
5850
5853
  var y, f;
5851
5854
  return u ? ((f = (y = Xi.find((m) => m.name === u)) == null ? void 0 : y.states) == null ? void 0 : f.map((m) => ({
5852
5855
  label: m.name,
5853
5856
  value: m.name
5854
5857
  }))) || [] : [];
5855
- }, [u]), v = (y, f) => {
5858
+ }, [u]), h = (y, f) => {
5856
5859
  const p = (f == null ? void 0 : f.value) || "";
5857
5860
  s && p !== c.current && (s(i.id, p), a == null || a(i.id), c.current = p);
5858
5861
  }, g = (y, f) => {
5859
5862
  const m = (f == null ? void 0 : f.value) || "", p = m ? `${m}, ${u}` : u;
5860
5863
  s && p !== c.current && (s(i.id, p), a == null || a(i.id), c.current = p);
5861
5864
  };
5862
- return K(() => {
5865
+ return O(() => {
5863
5866
  c.current = t;
5864
5867
  }, [t]), /* @__PURE__ */ n.jsxs("div", { className: "grid gap-y-6", children: [
5865
5868
  /* @__PURE__ */ n.jsx("input", { type: "hidden", ...o(i.id) }),
@@ -5867,19 +5870,19 @@ function fe({
5867
5870
  Tn,
5868
5871
  {
5869
5872
  options: i.options,
5870
- onGetValue: v,
5873
+ onGetValue: h,
5871
5874
  name: `${i.id}-country`,
5872
5875
  readOnly: l,
5873
5876
  defaultValue: u
5874
5877
  },
5875
5878
  `country-${u}`
5876
5879
  ),
5877
- h.length > 0 && i.showState && /* @__PURE__ */ n.jsxs("div", { children: [
5880
+ v.length > 0 && i.showState && /* @__PURE__ */ n.jsxs("div", { children: [
5878
5881
  /* @__PURE__ */ n.jsx("label", { className: "block text-sm font-medium mb-1.5 input_label", children: "State" }),
5879
5882
  /* @__PURE__ */ n.jsx(
5880
5883
  Tn,
5881
5884
  {
5882
- options: h,
5885
+ options: v,
5883
5886
  onGetValue: g,
5884
5887
  name: `${i.id}-state`,
5885
5888
  readOnly: l,
@@ -5894,11 +5897,11 @@ function Ls({
5894
5897
  element: i,
5895
5898
  validationData: e
5896
5899
  }) {
5897
- const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: d } = i, t = ii(() => fi("config"), []), [u, r] = R(!1), [c, h] = R(!1), v = Y(async () => {
5900
+ const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: d } = i, t = ii(() => fi("config"), []), [u, r] = R(!1), [c, v] = R(!1), h = Y(async () => {
5898
5901
  var g, y;
5899
5902
  if (!(!a || !l))
5900
5903
  try {
5901
- h(!0);
5904
+ v(!0);
5902
5905
  const m = {
5903
5906
  headers: {
5904
5907
  Authorization: `Bearer ${fi("token")}`
@@ -5911,19 +5914,19 @@ function Ls({
5911
5914
  } catch (f) {
5912
5915
  console.error("Failed to check sign status", f);
5913
5916
  } finally {
5914
- h(!1);
5917
+ v(!1);
5915
5918
  }
5916
5919
  }, [a, l]);
5917
- return K(() => {
5920
+ return O(() => {
5918
5921
  let g = null;
5919
5922
  return !u && l && a && (async () => {
5920
- await v() || (g = setInterval(async () => {
5921
- await v() && g && clearInterval(g);
5923
+ await h() || (g = setInterval(async () => {
5924
+ await h() && g && clearInterval(g);
5922
5925
  }, 2e3));
5923
5926
  })(), () => {
5924
5927
  g && clearInterval(g);
5925
5928
  };
5926
- }, [v, u, l, a]), /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5929
+ }, [h, u, l, a]), /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-x-2", children: [
5927
5930
  /* @__PURE__ */ n.jsx(
5928
5931
  "input",
5929
5932
  {
@@ -5938,7 +5941,7 @@ function Ls({
5938
5941
  "button",
5939
5942
  {
5940
5943
  type: "button",
5941
- onClick: v,
5944
+ onClick: h,
5942
5945
  disabled: c || u,
5943
5946
  style: { background: (t == null ? void 0 : t.buttonColor) || "#333" },
5944
5947
  className: J(
@@ -5947,7 +5950,7 @@ function Ls({
5947
5950
  ),
5948
5951
  children: [
5949
5952
  /* @__PURE__ */ n.jsx(
5950
- U,
5953
+ z,
5951
5954
  {
5952
5955
  icon: c ? "solar:refresh-outline" : u ? "solar:check-circle-bold" : "solar:pen-2-line-duotone",
5953
5956
  iconClass: c ? "animate-spin" : ""
@@ -6217,8 +6220,8 @@ function Ps({
6217
6220
  disabled: u,
6218
6221
  readOnly: r,
6219
6222
  horizontal: c,
6220
- description: h,
6221
- validate: v,
6223
+ description: v,
6224
+ validate: h,
6222
6225
  onChange: g,
6223
6226
  onError: y
6224
6227
  }) {
@@ -6230,12 +6233,12 @@ function Ps({
6230
6233
  []
6231
6234
  ), A = ii(() => f ? S.filter(
6232
6235
  (M) => `${M.label} ${M.phone}`.toLowerCase().includes(f.toLowerCase())
6233
- ) : S, [f, S]), C = (p == null ? void 0 : p.min) || 10, I = (p == null ? void 0 : p.max) || 10, Q = () => j ? `${(p == null ? void 0 : p.phone) || "+234"}-${j}` : "", W = (M) => {
6236
+ ) : S, [f, S]), C = (p == null ? void 0 : p.min) || 10, K = (p == null ? void 0 : p.max) || 10, Q = () => j ? `${(p == null ? void 0 : p.phone) || "+234"}-${j}` : "", W = (M) => {
6234
6237
  if (!M) return { code: "+234", number: "" };
6235
6238
  const E = M.split(/[-\s]/);
6236
6239
  return { code: E[0], number: E.slice(1).join(" ") };
6237
6240
  };
6238
- K(() => {
6241
+ O(() => {
6239
6242
  if (d) {
6240
6243
  const M = W(d);
6241
6244
  x(
@@ -6246,9 +6249,9 @@ function Ps({
6246
6249
  const Z = ii(() => {
6247
6250
  if (t) return t;
6248
6251
  const M = j.length;
6249
- return s && M === 0 ? "Phone number is required" : M > 0 && !/^\d+$/.test(j) ? "Phone number must contain only digits" : M > 0 && M < C ? `Minimum length is ${C}` : M > I ? `Maximum length is ${I}` : "";
6250
- }, [t, j, C, I, s]);
6251
- return K(() => {
6252
+ return s && M === 0 ? "Phone number is required" : M > 0 && !/^\d+$/.test(j) ? "Phone number must contain only digits" : M > 0 && M < C ? `Minimum length is ${C}` : M > K ? `Maximum length is ${K}` : "";
6253
+ }, [t, j, C, K, s]);
6254
+ return O(() => {
6252
6255
  g == null || g(Q()), y == null || y(Z || null);
6253
6256
  }, [j, p, Z]), /* @__PURE__ */ n.jsxs(
6254
6257
  "div",
@@ -6269,7 +6272,7 @@ function Ps({
6269
6272
  }
6270
6273
  ),
6271
6274
  /* @__PURE__ */ n.jsxs("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
6272
- /* @__PURE__ */ n.jsx(U, { icon: "lucide:phone-call" }),
6275
+ /* @__PURE__ */ n.jsx(z, { icon: "lucide:phone-call" }),
6273
6276
  /* @__PURE__ */ n.jsx(Pi, { value: p, onChange: x, children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
6274
6277
  /* @__PURE__ */ n.jsx(
6275
6278
  Pi.Input,
@@ -6280,7 +6283,7 @@ function Ps({
6280
6283
  onChange: (M) => m(M.target.value)
6281
6284
  }
6282
6285
  ),
6283
- /* @__PURE__ */ n.jsx(Pi.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(U, { icon: "lucide:chevron-down" }) }),
6286
+ /* @__PURE__ */ n.jsx(Pi.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n.jsx(z, { icon: "lucide:chevron-down" }) }),
6284
6287
  /* @__PURE__ */ n.jsx(Pi.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: A == null ? void 0 : A.map((M, E) => /* @__PURE__ */ n.jsxs(
6285
6288
  Pi.Option,
6286
6289
  {
@@ -6310,14 +6313,14 @@ function Ps({
6310
6313
  },
6311
6314
  placeholder: e,
6312
6315
  className: "w-full px-3 outline-none",
6313
- maxLength: I,
6316
+ maxLength: K,
6314
6317
  minLength: C
6315
6318
  }
6316
6319
  ),
6317
- /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !Z && j.length > 0 && !r && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(U, { icon: "bi:check-lg" }) }) })
6320
+ /* @__PURE__ */ n.jsx("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !Z && j.length > 0 && !r && /* @__PURE__ */ n.jsx("span", { className: "text-green-500", children: /* @__PURE__ */ n.jsx(z, { icon: "bi:check-lg" }) }) })
6318
6321
  ] })
6319
6322
  ] }),
6320
- h && /* @__PURE__ */ n.jsx("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: h })
6323
+ v && /* @__PURE__ */ n.jsx("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: v })
6321
6324
  ]
6322
6325
  }
6323
6326
  );
@@ -6335,7 +6338,7 @@ function ws({
6335
6338
  clearErrors: t
6336
6339
  } = e || {};
6337
6340
  let u;
6338
- return K(() => {
6341
+ return O(() => {
6339
6342
  o(i.id);
6340
6343
  }, [i.id, o]), a && (u = a()[i.id]), /* @__PURE__ */ n.jsx(
6341
6344
  Ps,
@@ -6467,12 +6470,12 @@ const He = {
6467
6470
  setIsDragging: u,
6468
6471
  moveElement: r,
6469
6472
  isDragging: c,
6470
- removeElement: h
6471
- } = Ni(pi), v = ii(
6473
+ removeElement: v
6474
+ } = Ni(pi), h = ii(
6472
6475
  () => Array.from({ length: i.columns }),
6473
6476
  [i.columns]
6474
6477
  ), [g, y] = R(null);
6475
- K(() => {
6478
+ O(() => {
6476
6479
  const N = () => {
6477
6480
  y(null), u(!1);
6478
6481
  };
@@ -6496,7 +6499,7 @@ const He = {
6496
6499
  []
6497
6500
  ), x = Y(
6498
6501
  (N, S) => {
6499
- var I;
6502
+ var K;
6500
6503
  N.preventDefault(), N.stopPropagation(), u(!1), y(null);
6501
6504
  const A = S + 1, C = N.dataTransfer.getData("elementId");
6502
6505
  if (C) {
@@ -6513,13 +6516,13 @@ const He = {
6513
6516
  if (!Q) return;
6514
6517
  const W = JSON.parse(Q);
6515
6518
  if ((W == null ? void 0 : W.type) === "grid") return;
6516
- const Z = d.find((P) => P.id === e), M = (I = Z == null ? void 0 : Z.questionData) == null ? void 0 : I.find(
6519
+ const Z = d.find((P) => P.id === e), M = (K = Z == null ? void 0 : Z.questionData) == null ? void 0 : K.find(
6517
6520
  (P) => {
6518
6521
  var L;
6519
6522
  return P.gridId === i.id && ((L = P.gridPosition) == null ? void 0 : L.col) === A;
6520
6523
  }
6521
6524
  );
6522
- M && h(M.id, e);
6525
+ M && v(M.id, e);
6523
6526
  const E = {
6524
6527
  ...W,
6525
6528
  id: xi(),
@@ -6534,15 +6537,15 @@ const He = {
6534
6537
  },
6535
6538
  [t, i.id, d, e, u, r]
6536
6539
  ), j = (N, S, A) => {
6537
- var L, G, $;
6538
- const C = N + 1, I = (G = (L = d.find((w) => w.id === e)) == null ? void 0 : L.questionData) == null ? void 0 : G.find(
6540
+ var L, G, q;
6541
+ const C = N + 1, K = (G = (L = d.find((w) => w.id === e)) == null ? void 0 : L.questionData) == null ? void 0 : G.find(
6539
6542
  (w) => {
6540
- var D;
6541
- return w.gridId === i.id && ((D = w.gridPosition) == null ? void 0 : D.col) === C;
6543
+ var I;
6544
+ return w.gridId === i.id && ((I = w.gridPosition) == null ? void 0 : I.col) === C;
6542
6545
  }
6543
- ), Q = ($ = I == null ? void 0 : I.id) != null ? $ : null, W = Array.isArray(o) && o.find((w) => {
6544
- var D;
6545
- return ((D = w == null ? void 0 : w.props) == null ? void 0 : D.col) === C;
6546
+ ), Q = (q = K == null ? void 0 : K.id) != null ? q : null, W = Array.isArray(o) && o.find((w) => {
6547
+ var I;
6548
+ return ((I = w == null ? void 0 : w.props) == null ? void 0 : I.col) === C;
6546
6549
  }), Z = c && g === N, M = !!W, E = c && !!l, P = M && Q && A === "edit" ? {
6547
6550
  draggable: !0,
6548
6551
  onDragStart: (w) => {
@@ -6575,9 +6578,9 @@ const He = {
6575
6578
  Z && M && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
6576
6579
  ),
6577
6580
  children: [
6578
- M && A === "edit" && /* @__PURE__ */ n.jsx("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n.jsx(U, { icon: "ph:dots-six-bold" }) }),
6581
+ M && A === "edit" && /* @__PURE__ */ n.jsx("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n.jsx(z, { icon: "ph:dots-six-bold" }) }),
6579
6582
  Z && !M && /* @__PURE__ */ n.jsxs("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
6580
- /* @__PURE__ */ n.jsx(U, { icon: "ph:plus-bold" }),
6583
+ /* @__PURE__ */ n.jsx(z, { icon: "ph:plus-bold" }),
6581
6584
  "Drop here"
6582
6585
  ] }),
6583
6586
  Z && M && /* @__PURE__ */ n.jsx("span", { className: "absolute top-1 right-1 text-xs text-orange-400 font-medium pointer-events-none px-1 py-0.5 bg-orange-50 rounded", children: "Replace" }),
@@ -6588,7 +6591,7 @@ const He = {
6588
6591
  "w-full select-none",
6589
6592
  Z && "opacity-50 pointer-events-none"
6590
6593
  ),
6591
- children: W || /* @__PURE__ */ n.jsx("span", { className: "flex items-center justify-center text-gray-300", children: A === "edit" && /* @__PURE__ */ n.jsx(U, { icon: "ph:plus-bold" }) })
6594
+ children: W || /* @__PURE__ */ n.jsx("span", { className: "flex items-center justify-center text-gray-300", children: A === "edit" && /* @__PURE__ */ n.jsx(z, { icon: "ph:plus-bold" }) })
6592
6595
  }
6593
6596
  )
6594
6597
  ]
@@ -6602,7 +6605,7 @@ const He = {
6602
6605
  style: {
6603
6606
  gridTemplateColumns: `repeat(${i.columns}, 1fr)`
6604
6607
  },
6605
- children: v == null ? void 0 : v.map(
6608
+ children: h == null ? void 0 : h.map(
6606
6609
  (N, S) => j(S, s, a)
6607
6610
  )
6608
6611
  }
@@ -6638,7 +6641,7 @@ function xn({
6638
6641
  a ? "bg-blue-50 border-2 border-blue-400 border-dashed" : s ? "border-2 border-blue-200 border-dashed" : "border-2 border-transparent"
6639
6642
  ),
6640
6643
  children: a && /* @__PURE__ */ n.jsxs("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
6641
- /* @__PURE__ */ n.jsx(U, { icon: "octicon:plus-16" }),
6644
+ /* @__PURE__ */ n.jsx(z, { icon: "octicon:plus-16" }),
6642
6645
  "Drop here"
6643
6646
  ] })
6644
6647
  }
@@ -6662,18 +6665,18 @@ function Ks({ elementData: i, sectionId: e }) {
6662
6665
  p.dataTransfer.setData("elementId", x), p.dataTransfer.setData("properties", x), p.dataTransfer.effectAllowed = "move", u(x), a(!0);
6663
6666
  },
6664
6667
  [a]
6665
- ), h = Y(() => {
6668
+ ), v = Y(() => {
6666
6669
  u(null), a(!1);
6667
6670
  }, [a]);
6668
- K(() => {
6671
+ O(() => {
6669
6672
  !s && t && u(null);
6670
6673
  }, [s, t]);
6671
- const v = Y(
6674
+ const h = Y(
6672
6675
  (p) => {
6673
6676
  p.preventDefault(), p.stopPropagation();
6674
6677
  const x = p.dataTransfer.getData("elementId"), j = p.currentTarget.id;
6675
6678
  if (!x || !j || x === j) {
6676
- h();
6679
+ v();
6677
6680
  return;
6678
6681
  }
6679
6682
  const N = r.find((A) => A.id === x), S = r.findIndex(
@@ -6681,7 +6684,7 @@ function Ks({ elementData: i, sectionId: e }) {
6681
6684
  );
6682
6685
  N != null && N.gridId && S !== -1 ? d({ draggedId: x, sectionId: e, targetIndex: S }) : d({ draggedId: x, sectionId: e, targetId: j }), u(null), a(!1);
6683
6686
  },
6684
- [e, d, a, h, r]
6687
+ [e, d, a, v, r]
6685
6688
  ), g = Y(
6686
6689
  (p, x) => {
6687
6690
  p.preventDefault(), p.stopPropagation(), a(!1);
@@ -6710,8 +6713,8 @@ function Ks({ elementData: i, sectionId: e }) {
6710
6713
  onDragOver: x ? void 0 : (j) => {
6711
6714
  j.preventDefault(), j.stopPropagation();
6712
6715
  },
6713
- onDrop: x ? void 0 : v,
6714
- onDragEnd: h,
6716
+ onDrop: x ? void 0 : h,
6717
+ onDragEnd: v,
6715
6718
  className: J(
6716
6719
  "cursor-grab active:cursor-grabbing border p-4 w-full rounded-lg",
6717
6720
  "transition-all duration-200 ease-in-out",
@@ -6721,17 +6724,15 @@ function Ks({ elementData: i, sectionId: e }) {
6721
6724
  },
6722
6725
  p.id
6723
6726
  ),
6724
- [t, v, e, c, h]
6727
+ [t, h, e, c, v]
6725
6728
  ), f = ii(() => (i == null ? void 0 : i.reduce((p, x) => (x.gridId && (p[x.gridId] = p[x.gridId] || [], p[x.gridId].push(x)), p), {})) || {}, [i]);
6726
- if (K(() => {
6727
- console.log({ draggedElementId: t });
6728
- }, [t]), !(i != null && i.length))
6729
+ if (!(i != null && i.length))
6729
6730
  return /* @__PURE__ */ n.jsx(
6730
6731
  "div",
6731
6732
  {
6732
6733
  onDragOver: (p) => p.preventDefault(),
6733
6734
  onDrop: (p) => g(p, 0),
6734
- onDragEnd: h,
6735
+ onDragEnd: v,
6735
6736
  className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[200px] p-10 col-span-2 border border-dashed border-gray-300 rounded-lg",
6736
6737
  children: "Drag or click an element to display"
6737
6738
  }
@@ -6744,7 +6745,7 @@ function Ks({ elementData: i, sectionId: e }) {
6744
6745
  index: 0,
6745
6746
  isDragging: s,
6746
6747
  onDrop: g,
6747
- onDragEnd: h
6748
+ onDragEnd: v
6748
6749
  }
6749
6750
  ),
6750
6751
  m.map((p) => {
@@ -6761,8 +6762,8 @@ function Ks({ elementData: i, sectionId: e }) {
6761
6762
  onDragOver: (A) => {
6762
6763
  A.preventDefault(), A.stopPropagation();
6763
6764
  },
6764
- onDrop: v,
6765
- onDragEnd: h,
6765
+ onDrop: h,
6766
+ onDragEnd: v,
6766
6767
  className: J(
6767
6768
  "w-full p-4 border rounded-lg cursor-grab active:cursor-grabbing",
6768
6769
  "transition-all duration-200 ease-in-out",
@@ -6791,7 +6792,7 @@ function Ks({ elementData: i, sectionId: e }) {
6791
6792
  index: x + 1,
6792
6793
  isDragging: s,
6793
6794
  onDrop: g,
6794
- onDragEnd: h
6795
+ onDragEnd: v
6795
6796
  }
6796
6797
  )
6797
6798
  ] }, p.id);
@@ -6804,7 +6805,7 @@ function Ks({ elementData: i, sectionId: e }) {
6804
6805
  index: x + 1,
6805
6806
  isDragging: s,
6806
6807
  onDrop: g,
6807
- onDragEnd: h
6808
+ onDragEnd: v
6808
6809
  }
6809
6810
  )
6810
6811
  ] }, p.id);
@@ -6828,8 +6829,8 @@ const Gs = an(Ks), Hs = B.object({
6828
6829
  if (ri.useEffect(() => {
6829
6830
  i || c();
6830
6831
  }, [i, c]), !i) return null;
6831
- const h = (v) => {
6832
- s(v, o.id), e();
6832
+ const v = (h) => {
6833
+ s(h, o.id), e();
6833
6834
  };
6834
6835
  return /* @__PURE__ */ n.jsx("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ n.jsxs("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6835
6836
  /* @__PURE__ */ n.jsxs("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
@@ -6839,11 +6840,11 @@ const Gs = an(Ks), Hs = B.object({
6839
6840
  {
6840
6841
  onClick: e,
6841
6842
  className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
6842
- children: /* @__PURE__ */ n.jsx(U, { icon: "tabler:x" })
6843
+ children: /* @__PURE__ */ n.jsx(z, { icon: "tabler:x" })
6843
6844
  }
6844
6845
  )
6845
6846
  ] }),
6846
- /* @__PURE__ */ n.jsxs("form", { onSubmit: l(h), className: "w-full", children: [
6847
+ /* @__PURE__ */ n.jsxs("form", { onSubmit: l(v), className: "w-full", children: [
6847
6848
  /* @__PURE__ */ n.jsxs("div", { className: "w-full px-6 flex flex-col gap-5 z-10", children: [
6848
6849
  /* @__PURE__ */ n.jsx(
6849
6850
  F,
@@ -6899,19 +6900,19 @@ const Gs = an(Ks), Hs = B.object({
6899
6900
  setSelectedSection: u,
6900
6901
  selectedSection: r,
6901
6902
  activeSections: c,
6902
- setActiveSections: h
6903
+ setActiveSections: v
6903
6904
  } = Ni(pi);
6904
- K(() => {
6905
+ O(() => {
6905
6906
  var m;
6906
6907
  u(((m = d[0]) == null ? void 0 : m.id) || null);
6907
6908
  }, []);
6908
- const v = Y((m) => {
6909
+ const h = Y((m) => {
6909
6910
  m.preventDefault(), m.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
6910
6911
  }, []);
6911
6912
  function g(m) {
6912
- c.includes(m) ? h(
6913
+ c.includes(m) ? v(
6913
6914
  (p) => p.filter((x) => x !== m)
6914
- ) : h((p) => [...p, m]);
6915
+ ) : v((p) => [...p, m]);
6915
6916
  }
6916
6917
  function y(m) {
6917
6918
  o.current = m, e(!0);
@@ -6959,7 +6960,7 @@ const Gs = an(Ks), Hs = B.object({
6959
6960
  type: "button",
6960
6961
  className: "p-1 text-xs border rounded-lg",
6961
6962
  onClick: () => y(m),
6962
- children: /* @__PURE__ */ n.jsx(U, { icon: "fluent:edit-28-regular" })
6963
+ children: /* @__PURE__ */ n.jsx(z, { icon: "fluent:edit-28-regular" })
6963
6964
  }
6964
6965
  ),
6965
6966
  d.length > 1 && /* @__PURE__ */ n.jsx(
@@ -6968,7 +6969,7 @@ const Gs = an(Ks), Hs = B.object({
6968
6969
  type: "button",
6969
6970
  className: "p-1 text-xs border rounded-lg",
6970
6971
  onClick: () => a(m.id),
6971
- children: /* @__PURE__ */ n.jsx(U, { icon: "lets-icons:trash-duotone-line" })
6972
+ children: /* @__PURE__ */ n.jsx(z, { icon: "lets-icons:trash-duotone-line" })
6972
6973
  }
6973
6974
  ),
6974
6975
  /* @__PURE__ */ n.jsx(
@@ -6978,7 +6979,7 @@ const Gs = an(Ks), Hs = B.object({
6978
6979
  className: "p-1 text-xs rounded-lg",
6979
6980
  onClick: () => g(p),
6980
6981
  children: /* @__PURE__ */ n.jsx(
6981
- U,
6982
+ z,
6982
6983
  {
6983
6984
  icon: c.includes(p) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6984
6985
  iconClass: "text-base"
@@ -6994,7 +6995,7 @@ const Gs = an(Ks), Hs = B.object({
6994
6995
  {
6995
6996
  className: "h-full mt-4 transition-all duration-200",
6996
6997
  id: m.id,
6997
- onDragOver: v,
6998
+ onDragOver: h,
6998
6999
  onDragEnd: () => t(!1),
6999
7000
  onClick: () => u(m.id),
7000
7001
  children: [
@@ -7039,9 +7040,9 @@ function Ws({
7039
7040
  uploadUrl: e
7040
7041
  }) {
7041
7042
  const { setFormData: o, addSection: s, setUploadUrl: a } = Ni(pi);
7042
- K(() => {
7043
+ O(() => {
7043
7044
  i && i.length > 0 && o(i);
7044
- }, [i, o]), K(() => {
7045
+ }, [i, o]), O(() => {
7045
7046
  a(e);
7046
7047
  }, [e, a]);
7047
7048
  const l = Y((d) => {
@@ -7096,19 +7097,18 @@ const An = [
7096
7097
  };
7097
7098
  s(y, a);
7098
7099
  }
7099
- const t = fi("config") || {}, u = t.elementColor, r = t.elementBgColor, c = t.elementBorderColor, h = _a.filter(
7100
+ const t = fi("config") || {}, u = t.elementColor, r = t.elementBgColor, c = t.elementBorderColor, v = _a.filter(
7100
7101
  (g) => g.label.toLowerCase().includes(i.toLowerCase())
7101
- ), v = An == null ? void 0 : An.map((g) => ({
7102
+ ), h = An == null ? void 0 : An.map((g) => ({
7102
7103
  title: g.title,
7103
- elements: h.filter(
7104
+ elements: v.filter(
7104
7105
  (y) => {
7105
7106
  var f;
7106
7107
  return (f = Ja[g.key]) == null ? void 0 : f.includes(y.type);
7107
7108
  }
7108
7109
  )
7109
7110
  })).filter((g) => g.elements.length > 0);
7110
- return console.log({ categorizedElements: v }), /* @__PURE__ */ n.jsxs("div", { className: "pt-4 pb-6", children: [
7111
- /* @__PURE__ */ n.jsx(Ae, {}),
7111
+ return /* @__PURE__ */ n.jsxs("div", { className: "pt-4 pb-6", children: [
7112
7112
  /* @__PURE__ */ n.jsx("div", { className: "px-5 mb-4", children: /* @__PURE__ */ n.jsx(
7113
7113
  "input",
7114
7114
  {
@@ -7121,7 +7121,7 @@ const An = [
7121
7121
  }
7122
7122
  ) }),
7123
7123
  /* @__PURE__ */ n.jsx("hr", {}),
7124
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 max-h-[80vh] overflow-y-auto no-scrollbar", children: v == null ? void 0 : v.map((g, y) => {
7124
+ /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("ul", { className: "grid gap-y-5 mt-3 px-5 max-h-[80vh] overflow-y-auto no-scrollbar", children: h == null ? void 0 : h.map((g, y) => {
7125
7125
  var f;
7126
7126
  return /* @__PURE__ */ n.jsxs("li", { children: [
7127
7127
  /* @__PURE__ */ n.jsx("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: g.title }),
@@ -7141,7 +7141,7 @@ const An = [
7141
7141
  active:opacity-50 element_class`,
7142
7142
  draggable: !0,
7143
7143
  children: /* @__PURE__ */ n.jsxs("span", { className: "flex flex-row-reverse items-center justify-between w-full gap-x-3", children: [
7144
- /* @__PURE__ */ n.jsx("span", { style: { color: u }, children: /* @__PURE__ */ n.jsx(U, { icon: m.icon, iconClass: "w-4 h-4" }) }),
7144
+ /* @__PURE__ */ n.jsx("span", { style: { color: u }, children: /* @__PURE__ */ n.jsx(z, { icon: m.icon, iconClass: "w-4 h-4" }) }),
7145
7145
  /* @__PURE__ */ n.jsx(
7146
7146
  "span",
7147
7147
  {
@@ -7169,8 +7169,8 @@ const An = [
7169
7169
  link: u = "",
7170
7170
  div: r = !1,
7171
7171
  type: c = "button",
7172
- style: h,
7173
- onClick: v
7172
+ style: v,
7173
+ onClick: h
7174
7174
  }) => {
7175
7175
  const g = J(
7176
7176
  "btn inline-flex justify-center",
@@ -7212,9 +7212,9 @@ const An = [
7212
7212
  ),
7213
7213
  "Submitting..."
7214
7214
  ] }) : /* @__PURE__ */ n.jsxs("span", { className: "flex items-center", children: [
7215
- a && l === "left" && /* @__PURE__ */ n.jsx("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(U, { icon: a }) }),
7215
+ a && l === "left" && /* @__PURE__ */ n.jsx("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(z, { icon: a }) }),
7216
7216
  i && /* @__PURE__ */ n.jsx("span", { children: i }),
7217
- a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(U, { icon: a }) })
7217
+ a && l === "right" && /* @__PURE__ */ n.jsx("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n.jsx(z, { icon: a }) })
7218
7218
  ] });
7219
7219
  return r ? /* @__PURE__ */ n.jsx("div", { className: g, children: y() }) : u ? /* @__PURE__ */ n.jsx(No, { to: u, className: g, children: y() }) : /* @__PURE__ */ n.jsx(
7220
7220
  "button",
@@ -7223,8 +7223,8 @@ const An = [
7223
7223
  type: c,
7224
7224
  className: g,
7225
7225
  "data-testid": "btn",
7226
- onClick: v,
7227
- style: h,
7226
+ onClick: h,
7227
+ style: v,
7228
7228
  children: y()
7229
7229
  }
7230
7230
  );
@@ -7332,7 +7332,7 @@ function Zs({
7332
7332
  publishLoading: d,
7333
7333
  onTitleChange: t
7334
7334
  }) {
7335
- const { formData: u } = Ni(pi), [r, c] = R(!1), [h, v] = R(!1), [g, y] = R(i || ""), f = fi("config");
7335
+ const { formData: u } = Ni(pi), [r, c] = R(!1), [v, h] = R(!1), [g, y] = R(i || ""), f = fi("config");
7336
7336
  function m() {
7337
7337
  localStorage.setItem("formData", JSON.stringify(u)), o == null || o(u);
7338
7338
  }
@@ -7340,7 +7340,7 @@ function Zs({
7340
7340
  localStorage.setItem("formData", JSON.stringify(u)), s == null || s(u);
7341
7341
  }
7342
7342
  function x() {
7343
- v(!1), t && g !== i && t(g.trim());
7343
+ h(!1), t && g !== i && t(g.trim());
7344
7344
  }
7345
7345
  return /* @__PURE__ */ n.jsxs("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar", children: [
7346
7346
  /* @__PURE__ */ n.jsxs("span", { className: "flex items-center gap-x-2", children: [
@@ -7355,7 +7355,7 @@ function Zs({
7355
7355
  }
7356
7356
  ),
7357
7357
  " ",
7358
- h ? /* @__PURE__ */ n.jsx(
7358
+ v ? /* @__PURE__ */ n.jsx(
7359
7359
  "input",
7360
7360
  {
7361
7361
  type: "text",
@@ -7370,7 +7370,7 @@ function Zs({
7370
7370
  {
7371
7371
  title: "Click to edit",
7372
7372
  className: "text-base font-semibold cursor-pointer form_title",
7373
- onClick: () => v(!0),
7373
+ onClick: () => h(!0),
7374
7374
  children: g || "Untitled"
7375
7375
  }
7376
7376
  )
@@ -7429,7 +7429,7 @@ const Ve = ({ loadingClass: i }) => {
7429
7429
  "h-full w-full min-h-[300px] flex justify-center items-center",
7430
7430
  i
7431
7431
  );
7432
- return K(() => {
7432
+ return O(() => {
7433
7433
  const o = fi("config"), s = (o == null ? void 0 : o.loaderColor) || "#333";
7434
7434
  document.documentElement.style.setProperty("--loader-color", s);
7435
7435
  }, []), /* @__PURE__ */ n.jsx("div", { className: e, children: /* @__PURE__ */ n.jsx("span", { className: "loader" }) });
@@ -7447,26 +7447,28 @@ function qs({
7447
7447
  onTitleChange: r,
7448
7448
  uploadUrl: c
7449
7449
  }) {
7450
- return /* @__PURE__ */ n.jsx(Se, { children: /* @__PURE__ */ n.jsxs("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: [
7451
- /* @__PURE__ */ n.jsx(Ae, {}),
7452
- /* @__PURE__ */ n.jsx("div", { className: "border-b bg-white border-[#E4E7EC]", children: /* @__PURE__ */ n.jsx(
7453
- Zs,
7454
- {
7455
- title: o,
7456
- goBackUrl: s,
7457
- onSubmit: i,
7458
- onPublish: l,
7459
- previewLoading: d,
7460
- saveLoading: t,
7461
- publishLoading: u,
7462
- onTitleChange: r
7463
- }
7464
- ) }),
7465
- /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 ", children: [
7466
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("div", { className: "w-[260px] h-[calc(100vh-64px)] border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n.jsx(zs, {}) }) }),
7467
- /* @__PURE__ */ n.jsx("div", { className: "flex-1 h-full max-h-full z-[1]", children: a ? /* @__PURE__ */ n.jsx(Ve, { loadingClass: "!w-full !h-[800px]" }) : /* @__PURE__ */ n.jsx(Ws, { questionData: e, uploadUrl: c }) })
7450
+ return /* @__PURE__ */ n.jsxs(Se, { children: [
7451
+ /* @__PURE__ */ n.jsx(Ae, { position: "top-right", richColors: !0, closeButton: !0 }),
7452
+ /* @__PURE__ */ n.jsxs("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: [
7453
+ /* @__PURE__ */ n.jsx("div", { className: "border-b bg-white border-[#E4E7EC]", children: /* @__PURE__ */ n.jsx(
7454
+ Zs,
7455
+ {
7456
+ title: o,
7457
+ goBackUrl: s,
7458
+ onSubmit: i,
7459
+ onPublish: l,
7460
+ previewLoading: d,
7461
+ saveLoading: t,
7462
+ publishLoading: u,
7463
+ onTitleChange: r
7464
+ }
7465
+ ) }),
7466
+ /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 ", children: [
7467
+ /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("div", { className: "w-[260px] h-[calc(100vh-64px)] border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n.jsx(zs, {}) }) }),
7468
+ /* @__PURE__ */ n.jsx("div", { className: "flex-1 h-full max-h-full z-[1]", children: a ? /* @__PURE__ */ n.jsx(Ve, { loadingClass: "!w-full !h-[800px]" }) : /* @__PURE__ */ n.jsx(Ws, { questionData: e, uploadUrl: c }) })
7469
+ ] })
7468
7470
  ] })
7469
- ] }) });
7471
+ ] });
7470
7472
  }
7471
7473
  const xl = ({
7472
7474
  onSubmit: i,
@@ -7482,9 +7484,9 @@ const xl = ({
7482
7484
  previewLoading: u,
7483
7485
  saveLoading: r,
7484
7486
  publishLoading: c,
7485
- onTitleChange: h,
7486
- uploadUrl: v
7487
- }) => (K(() => {
7487
+ onTitleChange: v,
7488
+ uploadUrl: h
7489
+ }) => (O(() => {
7488
7490
  s && Ge("config", s);
7489
7491
  }, [s]), /* @__PURE__ */ n.jsx(
7490
7492
  qs,
@@ -7499,8 +7501,8 @@ const xl = ({
7499
7501
  previewLoading: u,
7500
7502
  saveLoading: r,
7501
7503
  publishLoading: c,
7502
- onTitleChange: h,
7503
- uploadUrl: v
7504
+ onTitleChange: v,
7505
+ uploadUrl: h
7504
7506
  }
7505
7507
  )), Ci = {
7506
7508
  required: "This field is required",
@@ -7700,7 +7702,7 @@ function ol({ form_data: i, options: e, current: o }) {
7700
7702
  element: a,
7701
7703
  customClass: "p-0 min-h-[60px] border-none",
7702
7704
  children: t == null ? void 0 : t.map((u) => {
7703
- var r, c, h;
7705
+ var r, c, v;
7704
7706
  return /* @__PURE__ */ n.jsxs(
7705
7707
  On,
7706
7708
  {
@@ -7708,7 +7710,7 @@ function ol({ form_data: i, options: e, current: o }) {
7708
7710
  customClass: "p-0",
7709
7711
  children: [
7710
7712
  en(u, on(u, e)),
7711
- /* @__PURE__ */ n.jsx("div", { className: "mt-1 text-xs text-red-600", children: (h = (c = e == null ? void 0 : e.errors) == null ? void 0 : c[u.id]) == null ? void 0 : h.message })
7713
+ /* @__PURE__ */ n.jsx("div", { className: "mt-1 text-xs text-red-600", children: (v = (c = e == null ? void 0 : e.errors) == null ? void 0 : c[u.id]) == null ? void 0 : v.message })
7712
7714
  ]
7713
7715
  },
7714
7716
  u.id
@@ -7749,9 +7751,9 @@ const sl = ({
7749
7751
  hideFooter: u = !1,
7750
7752
  uploadUrl: r
7751
7753
  }) => {
7752
- var vi, bi, di, H, O, si, ui, oi;
7753
- const { setAnswerData: c, setUploadUrl: h } = Ni(pi), [v, g] = R(0), y = ii(
7754
- () => i.filter((li) => !li.disabled),
7754
+ var vi, bi, ai, H, D, li, ui, si;
7755
+ const { setAnswerData: c, setUploadUrl: v } = Ni(pi), [h, g] = R(0), y = ii(
7756
+ () => i.filter((di) => !di.disabled),
7755
7757
  [i]
7756
7758
  ), f = (vi = y == null ? void 0 : y.length) != null ? vi : 0, m = fi("config"), p = ii(
7757
7759
  () => nl(y),
@@ -7766,7 +7768,7 @@ const sl = ({
7766
7768
  control: S,
7767
7769
  handleSubmit: A,
7768
7770
  reset: C,
7769
- getValues: I,
7771
+ getValues: K,
7770
7772
  watch: Q,
7771
7773
  formState: { errors: W, isSubmitting: Z },
7772
7774
  trigger: M,
@@ -7775,17 +7777,17 @@ const sl = ({
7775
7777
  } = x, L = fo({ control: S }), G = ii(
7776
7778
  () => L,
7777
7779
  [JSON.stringify(L)]
7778
- ), $ = Y(
7779
- (li) => {
7780
- a && a(li);
7780
+ ), q = Y(
7781
+ (di) => {
7782
+ a && a(di);
7781
7783
  },
7782
7784
  [a]
7783
7785
  );
7784
- K(() => {
7785
- h(r);
7786
- }, [h, r]), K(() => {
7786
+ O(() => {
7787
+ v(r);
7788
+ }, [v, r]), O(() => {
7787
7789
  if (!(y != null && y.length) || !a) return;
7788
- const li = y.flatMap(
7790
+ const di = y.flatMap(
7789
7791
  (ji) => {
7790
7792
  var yi;
7791
7793
  return (yi = ji.questionData) == null ? void 0 : yi.map((ki) => ({
@@ -7796,24 +7798,24 @@ const sl = ({
7796
7798
  }));
7797
7799
  }
7798
7800
  );
7799
- $(li), c(G);
7801
+ q(di), c(G);
7800
7802
  }, [
7801
7803
  G,
7802
7804
  y,
7803
- $,
7805
+ q,
7804
7806
  a,
7805
7807
  c
7806
- ]), K(() => {
7808
+ ]), O(() => {
7807
7809
  e != null && e.length && C(al(e));
7808
7810
  }, [e, C]);
7809
7811
  const w = Y(
7810
- (li) => {
7812
+ (di) => {
7811
7813
  const ji = y.flatMap(
7812
7814
  (yi) => {
7813
7815
  var ki;
7814
7816
  return (ki = yi.questionData) == null ? void 0 : ki.map((Mi) => ({
7815
7817
  id: Mi.id,
7816
- value: li[Mi.id],
7818
+ value: di[Mi.id],
7817
7819
  sectionId: yi.id,
7818
7820
  type: Mi.type
7819
7821
  }));
@@ -7822,18 +7824,18 @@ const sl = ({
7822
7824
  Object.keys(W).length > 0 || s == null || s(ji);
7823
7825
  },
7824
7826
  [W, y, s]
7825
- ), D = Y(async () => {
7826
- var li, ji;
7827
+ ), I = Y(async () => {
7828
+ var di, ji;
7827
7829
  if (!o) {
7828
- const yi = (ji = (li = y == null ? void 0 : y[v]) == null ? void 0 : li.questionData) == null ? void 0 : ji.map(
7830
+ const yi = (ji = (di = y == null ? void 0 : y[h]) == null ? void 0 : di.questionData) == null ? void 0 : ji.map(
7829
7831
  (Mi) => Mi.id
7830
7832
  );
7831
7833
  if (!await M(yi)) return;
7832
7834
  }
7833
7835
  g((yi) => yi + 1);
7834
- }, [v, y, o, M]), z = Y(() => {
7835
- g((li) => li - 1);
7836
- }, []), ai = ii(
7836
+ }, [h, y, o, M]), U = Y(() => {
7837
+ g((di) => di - 1);
7838
+ }, []), ni = ii(
7837
7839
  () => ({
7838
7840
  register: j,
7839
7841
  setValue: N,
@@ -7842,7 +7844,7 @@ const sl = ({
7842
7844
  trigger: M,
7843
7845
  isSubmitting: Z,
7844
7846
  isReadOnly: l,
7845
- getValues: I,
7847
+ getValues: K,
7846
7848
  setError: E,
7847
7849
  clearErrors: P
7848
7850
  }),
@@ -7854,64 +7856,77 @@ const sl = ({
7854
7856
  M,
7855
7857
  Z,
7856
7858
  l,
7857
- I,
7859
+ K,
7858
7860
  E,
7859
7861
  P
7860
7862
  ]
7861
7863
  );
7862
- return /* @__PURE__ */ n.jsx(xo, { ...x, children: /* @__PURE__ */ n.jsxs(
7863
- "form",
7864
- {
7865
- onSubmit: A(w),
7866
- className: "container h-full mx-auto",
7867
- children: [
7868
- /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col w-full py-4 gap-y-12", children: /* @__PURE__ */ n.jsxs(
7869
- "div",
7870
- {
7871
- className: "multi_section__box",
7872
- children: [
7873
- d === "multi" && (((bi = y == null ? void 0 : y[v]) == null ? void 0 : bi.title) || ((di = y == null ? void 0 : y[v]) == null ? void 0 : di.description)) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7874
- ((H = y[v]) == null ? void 0 : H.title) && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[6px]", children: (O = y[v]) == null ? void 0 : O.title }),
7875
- ((si = y[v]) == null ? void 0 : si.description) && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: (ui = y[v]) == null ? void 0 : ui.description })
7876
- ] }),
7877
- d === "multi" ? /* @__PURE__ */ n.jsx(
7878
- ol,
7879
- {
7880
- form_data: y,
7881
- options: ai,
7882
- current: v
7883
- }
7884
- ) : /* @__PURE__ */ n.jsx(
7885
- el,
7886
- {
7887
- form_data: y,
7888
- options: ai
7889
- }
7890
- )
7891
- ]
7892
- },
7893
- (oi = y == null ? void 0 : y[v]) == null ? void 0 : oi.id
7894
- ) }),
7895
- !u && /* @__PURE__ */ n.jsx("footer", { className: "flex items-center justify-end gap-4 footer", children: d === "multi" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
7896
- v > 0 && /* @__PURE__ */ n.jsx(
7897
- Ei,
7898
- {
7899
- type: "button",
7900
- text: "Back",
7901
- onClick: z,
7902
- btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"
7903
- }
7904
- ),
7905
- v < f - 1 ? /* @__PURE__ */ n.jsx(
7906
- Ei,
7864
+ return /* @__PURE__ */ n.jsxs(xo, { ...x, children: [
7865
+ /* @__PURE__ */ n.jsx(Ae, { position: "top-right", richColors: !0, closeButton: !0 }),
7866
+ /* @__PURE__ */ n.jsxs(
7867
+ "form",
7868
+ {
7869
+ onSubmit: A(w),
7870
+ className: "container h-full mx-auto",
7871
+ children: [
7872
+ /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col w-full py-4 gap-y-12", children: /* @__PURE__ */ n.jsxs(
7873
+ "div",
7907
7874
  {
7908
- type: "button",
7909
- text: "Continue",
7910
- onClick: D,
7911
- style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7912
- btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg continue_btn"
7913
- }
7914
- ) : !o && (t != null ? t : /* @__PURE__ */ n.jsx(
7875
+ className: "multi_section__box",
7876
+ children: [
7877
+ d === "multi" && (((bi = y == null ? void 0 : y[h]) == null ? void 0 : bi.title) || ((ai = y == null ? void 0 : y[h]) == null ? void 0 : ai.description)) && /* @__PURE__ */ n.jsxs("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7878
+ ((H = y[h]) == null ? void 0 : H.title) && /* @__PURE__ */ n.jsx("h2", { className: "text-lg font-semibold mb-[6px]", children: (D = y[h]) == null ? void 0 : D.title }),
7879
+ ((li = y[h]) == null ? void 0 : li.description) && /* @__PURE__ */ n.jsx("p", { className: "text-sm", children: (ui = y[h]) == null ? void 0 : ui.description })
7880
+ ] }),
7881
+ d === "multi" ? /* @__PURE__ */ n.jsx(
7882
+ ol,
7883
+ {
7884
+ form_data: y,
7885
+ options: ni,
7886
+ current: h
7887
+ }
7888
+ ) : /* @__PURE__ */ n.jsx(
7889
+ el,
7890
+ {
7891
+ form_data: y,
7892
+ options: ni
7893
+ }
7894
+ )
7895
+ ]
7896
+ },
7897
+ (si = y == null ? void 0 : y[h]) == null ? void 0 : si.id
7898
+ ) }),
7899
+ !u && /* @__PURE__ */ n.jsx("footer", { className: "flex items-center justify-end gap-4 footer", children: d === "multi" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
7900
+ h > 0 && /* @__PURE__ */ n.jsx(
7901
+ Ei,
7902
+ {
7903
+ type: "button",
7904
+ text: "Back",
7905
+ onClick: U,
7906
+ btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"
7907
+ }
7908
+ ),
7909
+ h < f - 1 ? /* @__PURE__ */ n.jsx(
7910
+ Ei,
7911
+ {
7912
+ type: "button",
7913
+ text: "Continue",
7914
+ onClick: I,
7915
+ style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7916
+ btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg continue_btn"
7917
+ }
7918
+ ) : !o && (t != null ? t : /* @__PURE__ */ n.jsx(
7919
+ Ei,
7920
+ {
7921
+ isDisabled: Z || Object.keys(W).length > 0,
7922
+ isLoading: Z,
7923
+ type: "submit",
7924
+ text: "Submit",
7925
+ style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7926
+ btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
7927
+ }
7928
+ ))
7929
+ ] }) : !o && (t != null ? t : /* @__PURE__ */ n.jsx(
7915
7930
  Ei,
7916
7931
  {
7917
7932
  isDisabled: Z || Object.keys(W).length > 0,
@@ -7921,21 +7936,11 @@ const sl = ({
7921
7936
  style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7922
7937
  btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
7923
7938
  }
7924
- ))
7925
- ] }) : !o && (t != null ? t : /* @__PURE__ */ n.jsx(
7926
- Ei,
7927
- {
7928
- isDisabled: Z || Object.keys(W).length > 0,
7929
- isLoading: Z,
7930
- type: "submit",
7931
- text: "Submit",
7932
- style: { background: (m == null ? void 0 : m.buttonColor) || "#333" },
7933
- btnClass: "text-gray-700 border-[#98A2B3] !font-medium !py-[10px] px-10 bg-blue-600 text-white rounded-lg submit_btn"
7934
- }
7935
- )) })
7936
- ]
7937
- }
7938
- ) });
7939
+ )) })
7940
+ ]
7941
+ }
7942
+ )
7943
+ ] });
7939
7944
  }, ll = ri.memo(sl);
7940
7945
  function dl({
7941
7946
  answerData: i,
@@ -7949,12 +7954,12 @@ function dl({
7949
7954
  children: u,
7950
7955
  hideFooter: r,
7951
7956
  onGetValues: c,
7952
- uploadUrl: h
7957
+ uploadUrl: v
7953
7958
  }) {
7954
- K(() => {
7959
+ O(() => {
7955
7960
  d && Ge("config", d);
7956
7961
  }, [d]);
7957
- const v = Y(
7962
+ const h = Y(
7958
7963
  (g) => {
7959
7964
  c && c(g);
7960
7965
  },
@@ -7972,8 +7977,8 @@ function dl({
7972
7977
  isReadOnly: a,
7973
7978
  renderType: t,
7974
7979
  hideFooter: r,
7975
- onGetValues: v,
7976
- uploadUrl: h,
7980
+ onGetValues: h,
7981
+ uploadUrl: v,
7977
7982
  children: u
7978
7983
  }
7979
7984
  ) })