@foris/avocado-not-front 4.7.0 → 5.0.1

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,64 +1,64 @@
1
- import J from "axios";
2
- import { create as at } from "zustand";
3
- import rt, { useMemo as A, useState as L, useCallback as R, Fragment as T, useEffect as V, useRef as ge, cloneElement as ot } from "react";
4
- import { Heading as ze, Text as ct, Accordion as it, ThemeStore as ne, Box as lt, RadioButton as dt, Stepper as _t, ProgressBar as ut, Breadcrumbs as ht, Button as ft, CardAccordion as yt, Card as mt, CardNotification as pe, SkeletonBase as He, Checkbox as xt, PreviewerMarkdown as Xe, DataCard as gt, Divider as pt, Drawer as bt, DropdownButton as jt, Link as wt, Menu as Ct, Modal as Nt, Pill as me, RoundButton as vt, SelectPagination as St, Select as kt, Switch as Et, Table as Tt, Pager as Ot, Tabs as At, Textarea as $t, TextField as qt, toast as ee, Tooltip as Dt, Loading as Rt, Toaster as Lt } from "@foris/avocado-suite";
5
- import { ChatPanel as It, PromptCodeEditor as Bt, SummaryCard as Kt } from "@foris/ai-agent";
6
- import B from "jsonpath";
7
- import { ResponsiveContainer as Je, Legend as Gt, Tooltip as Mt, XAxis as Ut, YAxis as Vt, AreaChart as zt, CartesianGrid as be, Area as Ht, BarChart as Xt, Bar as Jt, LineChart as Wt, Line as Qt, PieChart as Yt, Pie as Zt, Cell as Ft } from "recharts";
8
- import Pt from "@uiw/react-codemirror";
9
- import { json as ke } from "@codemirror/lang-json";
10
- import { markdown as en } from "@codemirror/lang-markdown";
11
- import { sql as tn } from "@codemirror/lang-sql";
12
- import { yaml as nn } from "@codemirror/lang-yaml";
13
- import { Icon as Ee } from "@foris/avocado-icons";
14
- const v = at(() => ({})), de = (e, t, s, r) => {
15
- const l = s == null ? void 0 : s.hash, i = r && Object.keys(r).length > 0 ? { ...r } : {};
16
- v.setState((o) => {
1
+ import X from "axios";
2
+ import { create as ut } from "zustand";
3
+ import ht, { useMemo as E, useState as R, useCallback as L, Fragment as T, useEffect as U, useRef as _e, cloneElement as ft } from "react";
4
+ import { Heading as Ze, Text as yt, Accordion as mt, ThemeStore as re, Box as xt, RadioButton as gt, Stepper as bt, ProgressBar as pt, Breadcrumbs as jt, Button as Ct, CardAccordion as wt, Card as Nt, CardNotification as ie, SkeletonBase as Fe, Checkbox as vt, PreviewerMarkdown as Pe, DataCard as St, Divider as kt, Drawer as Et, DropdownButton as Tt, Link as Ot, Menu as At, Modal as $t, Pill as Ce, RoundButton as qt, SelectPagination as Rt, Select as Dt, Switch as Lt, Table as $e, Pager as qe, Tabs as It, Textarea as Bt, TextField as Gt, toast as se, Tooltip as Kt, Loading as Mt, Toaster as Ut } from "@foris/avocado-suite";
5
+ import { ChatPanel as Vt, PromptCodeEditor as Ht, SummaryCard as zt } from "@foris/ai-agent";
6
+ import G from "jsonpath";
7
+ import { ResponsiveContainer as et, Legend as Xt, Tooltip as Jt, XAxis as Wt, YAxis as Qt, AreaChart as Yt, CartesianGrid as Ne, Area as Zt, BarChart as Ft, Bar as Pt, LineChart as en, Line as tn, PieChart as nn, Pie as sn, Cell as an } from "recharts";
8
+ import rn from "@uiw/react-codemirror";
9
+ import { json as Re } from "@codemirror/lang-json";
10
+ import { markdown as on } from "@codemirror/lang-markdown";
11
+ import { sql as cn } from "@codemirror/lang-sql";
12
+ import { yaml as ln } from "@codemirror/lang-yaml";
13
+ import { Icon as De } from "@foris/avocado-icons";
14
+ const N = ut(() => ({})), ce = (e, t, s, r) => {
15
+ const i = s == null ? void 0 : s.hash, l = r && Object.keys(r).length > 0 ? { ...r } : {};
16
+ N.setState((c) => {
17
17
  var n;
18
18
  return {
19
- ...o,
19
+ ...c,
20
20
  [e]: {
21
- ...o[e],
21
+ ...c[e],
22
22
  apiConfig: t,
23
- currentPageId: l,
23
+ currentPageId: i,
24
24
  isLoading: !1,
25
25
  isModalOpen: !0,
26
26
  isDrawerOpen: !1,
27
- entries: i,
27
+ entries: l,
28
28
  overlay: null,
29
29
  pages: {
30
- ...(n = o[e]) == null ? void 0 : n.pages,
31
- [l]: {
30
+ ...(n = c[e]) == null ? void 0 : n.pages,
31
+ [i]: {
32
32
  page: s
33
33
  }
34
34
  }
35
35
  }
36
36
  };
37
37
  });
38
- }, We = (e, t, s) => {
38
+ }, tt = (e, t, s) => {
39
39
  const r = s && Object.keys(s).length > 0 ? { ...e, ...s } : e;
40
40
  return t.length === 0 ? e : Object.fromEntries(
41
41
  Object.entries(r).filter(
42
- ([l]) => !t.includes(l)
42
+ ([i]) => !t.includes(i)
43
43
  )
44
44
  );
45
- }, sn = (e, t, s, r, l) => {
46
- sessionStorage.setItem("sessionId", s), v.setState((i) => {
47
- const o = i[e] ?? {}, n = o.entries ?? {}, d = We(
45
+ }, dn = (e, t, s, r, i) => {
46
+ sessionStorage.setItem("sessionId", s), N.setState((l) => {
47
+ const c = l[e] ?? {}, n = c.entries ?? {}, d = tt(
48
48
  n,
49
49
  r,
50
- l
50
+ i
51
51
  );
52
52
  return {
53
- ...i,
53
+ ...l,
54
54
  [e]: {
55
- ...o,
55
+ ...c,
56
56
  currentPageId: t.hash,
57
57
  entries: d,
58
58
  isLoading: !1,
59
59
  overlay: null,
60
60
  pages: {
61
- ...o.pages,
61
+ ...c.pages,
62
62
  [t.hash]: {
63
63
  page: { ...t }
64
64
  }
@@ -66,20 +66,20 @@ const v = at(() => ({})), de = (e, t, s, r) => {
66
66
  }
67
67
  };
68
68
  });
69
- }, an = (e, t, s, r) => {
70
- v.setState((l) => {
69
+ }, _n = (e, t, s, r) => {
70
+ N.setState((i) => {
71
71
  var a;
72
- const i = l[e] ?? {}, o = i.entries ?? {}, n = We(
73
- o,
72
+ const l = i[e] ?? {}, c = l.entries ?? {}, n = tt(
73
+ c,
74
74
  s,
75
75
  r
76
76
  ), d = (a = t.components) == null ? void 0 : a.some(
77
- (u) => u.component === "drawer"
77
+ (_) => _.component === "drawer"
78
78
  );
79
79
  return {
80
- ...l,
80
+ ...i,
81
81
  [e]: {
82
- ...i,
82
+ ...l,
83
83
  entries: n,
84
84
  overlay: t,
85
85
  isLoading: !1,
@@ -88,38 +88,38 @@ const v = at(() => ({})), de = (e, t, s, r) => {
88
88
  }
89
89
  };
90
90
  });
91
- }, je = (e) => {
92
- v.setState((t) => ({
91
+ }, ve = (e) => {
92
+ N.setState((t) => ({
93
93
  ...t,
94
94
  [e]: {
95
95
  ...t[e],
96
96
  overlay: null
97
97
  }
98
98
  }));
99
- }, rn = (e) => {
99
+ }, un = (e) => {
100
100
  var s;
101
- return ((s = v.getState()[e]) == null ? void 0 : s.overlay) ?? null;
102
- }, $ = (e, t) => {
101
+ return ((s = N.getState()[e]) == null ? void 0 : s.overlay) ?? null;
102
+ }, D = (e, t) => {
103
103
  const {
104
104
  content: s,
105
105
  sessionId: r,
106
- deprecatedStateKeys: l = [],
107
- sessionState: i
106
+ deprecatedStateKeys: i = [],
107
+ sessionState: l
108
108
  } = t;
109
- s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? sn(
109
+ s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? dn(
110
110
  e,
111
111
  s,
112
112
  r,
113
- l,
114
- i
115
- ) : an(
113
+ i,
114
+ l
115
+ ) : _n(
116
116
  e,
117
117
  s,
118
- l,
119
- i
118
+ i,
119
+ l
120
120
  ));
121
- }, q = (e, t) => {
122
- v.setState((s) => {
121
+ }, $ = (e, t) => {
122
+ N.setState((s) => {
123
123
  var r;
124
124
  return {
125
125
  ...s,
@@ -133,49 +133,49 @@ const v = at(() => ({})), de = (e, t, s, r) => {
133
133
  }
134
134
  };
135
135
  });
136
- }, on = (e, t) => {
137
- v.setState((s) => {
136
+ }, hn = (e, t) => {
137
+ N.setState((s) => {
138
138
  const r = s[e];
139
139
  if (!r)
140
140
  return s;
141
- const l = r.entries ?? {};
142
- if (!(t in l))
141
+ const i = r.entries ?? {};
142
+ if (!(t in i))
143
143
  return s;
144
- const { [t]: i, ...o } = l;
144
+ const { [t]: l, ...c } = i;
145
145
  return {
146
146
  ...s,
147
147
  [e]: {
148
148
  ...r,
149
- entries: o
149
+ entries: c
150
150
  }
151
151
  };
152
152
  });
153
- }, Q = (e, t) => {
154
- v.setState((s) => ({
153
+ }, Y = (e, t) => {
154
+ N.setState((s) => ({
155
155
  ...s,
156
156
  [e]: {
157
157
  ...s[e],
158
158
  isLoading: t
159
159
  }
160
160
  }));
161
- }, ce = (e, t) => {
162
- v.setState((s) => ({
161
+ }, ue = (e, t) => {
162
+ N.setState((s) => ({
163
163
  ...s,
164
164
  [e]: {
165
165
  ...s[e],
166
166
  isModalOpen: t
167
167
  }
168
168
  }));
169
- }, W = (e, t) => {
170
- v.setState((s) => ({
169
+ }, J = (e, t) => {
170
+ N.setState((s) => ({
171
171
  ...s,
172
172
  [e]: {
173
173
  ...s[e],
174
174
  isDrawerOpen: t
175
175
  }
176
176
  }));
177
- }, Te = (e, t) => {
178
- v.setState((s) => {
177
+ }, Le = (e, t) => {
178
+ N.setState((s) => {
179
179
  const r = s[e];
180
180
  return r ? {
181
181
  ...s,
@@ -189,26 +189,26 @@ const v = at(() => ({})), de = (e, t, s, r) => {
189
189
  } : s;
190
190
  });
191
191
  };
192
- let _e = !1, re = [], Oe = !1;
193
- const cn = (e) => e._userFlow || null, Ae = (e) => {
194
- re.forEach(({ resolve: t, reject: s }) => {
192
+ let xe = !1, le = [], Ie = !1;
193
+ const fn = (e) => e._userFlow || null, Be = (e) => {
194
+ le.forEach(({ resolve: t, reject: s }) => {
195
195
  e ? s(e) : t(void 0);
196
- }), re = [];
197
- }, ln = async (e) => {
198
- var r, l;
196
+ }), le = [];
197
+ }, yn = async (e) => {
198
+ var r, i;
199
199
  const t = e == null ? void 0 : e.config;
200
200
  if (((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) === 401 && !t._retry) {
201
- const i = cn(t);
202
- if (i) {
203
- const n = (l = v.getState()[i]) == null ? void 0 : l.apiConfig;
201
+ const l = fn(t);
202
+ if (l) {
203
+ const n = (i = N.getState()[l]) == null ? void 0 : i.apiConfig;
204
204
  if (!n)
205
205
  return Promise.reject(e);
206
206
  if (n.onAuthenticationError || typeof n.headers == "function") {
207
- if (_e)
208
- return new Promise((a, u) => {
209
- re.push({ resolve: a, reject: u });
210
- }).then(() => J(t)).catch((a) => (console.error("[axiosInterceptors] Queued request failed:", a), Promise.reject(a)));
211
- t._retry = !0, _e = !0;
207
+ if (xe)
208
+ return new Promise((a, _) => {
209
+ le.push({ resolve: a, reject: _ });
210
+ }).then(() => X(t)).catch((a) => (console.error("[axiosInterceptors] Queued request failed:", a), Promise.reject(a)));
211
+ t._retry = !0, xe = !0;
212
212
  try {
213
213
  let a;
214
214
  if (n.onAuthenticationError)
@@ -217,17 +217,17 @@ const cn = (e) => e._userFlow || null, Ae = (e) => {
217
217
  a = n.headers();
218
218
  else
219
219
  throw new Error("No refresh handler available");
220
- return n.onAuthenticationError && (typeof n.headers == "string" ? Te(i, JSON.stringify(a)) : Te(i, a)), t.headers || (t.headers = {}), Object.assign(t.headers, a), Ae(null), J(t);
220
+ return n.onAuthenticationError && (typeof n.headers == "string" ? Le(l, JSON.stringify(a)) : Le(l, a)), t.headers || (t.headers = {}), Object.assign(t.headers, a), Be(null), X(t);
221
221
  } catch (a) {
222
222
  return console.error(
223
223
  "[axiosInterceptors] Token refresh failed:",
224
224
  a
225
225
  ), console.error(
226
226
  "[axiosInterceptors] Rejecting queued requests:",
227
- re.length
228
- ), Ae(a), Promise.reject(a);
227
+ le.length
228
+ ), Be(a), Promise.reject(a);
229
229
  } finally {
230
- _e = !1;
230
+ xe = !1;
231
231
  }
232
232
  } else
233
233
  console.warn(
@@ -240,20 +240,20 @@ const cn = (e) => e._userFlow || null, Ae = (e) => {
240
240
  );
241
241
  }
242
242
  return Promise.reject(e);
243
- }, dn = () => {
244
- if (Oe) {
243
+ }, mn = () => {
244
+ if (Ie) {
245
245
  console.debug(
246
246
  "[axiosInterceptors] Interceptors already initialized, skipping"
247
247
  );
248
248
  return;
249
249
  }
250
- console.debug("[axiosInterceptors] Initializing interceptors..."), J.interceptors.response.use(void 0, ln), console.debug("[axiosInterceptors] Response error interceptor registered"), Oe = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
250
+ console.debug("[axiosInterceptors] Initializing interceptors..."), X.interceptors.response.use(void 0, yn), console.debug("[axiosInterceptors] Response error interceptor registered"), Ie = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
251
251
  };
252
- dn();
253
- function _n(e) {
252
+ mn();
253
+ function xn(e) {
254
254
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
255
255
  }
256
- var ue = { exports: {} }, te = {};
256
+ var ge = { exports: {} }, ae = {};
257
257
  /**
258
258
  * @license React
259
259
  * react-jsx-runtime.production.min.js
@@ -263,46 +263,46 @@ var ue = { exports: {} }, te = {};
263
263
  * This source code is licensed under the MIT license found in the
264
264
  * LICENSE file in the root directory of this source tree.
265
265
  */
266
- var $e;
267
- function un() {
268
- if ($e) return te;
269
- $e = 1;
270
- var e = rt, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, l = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
271
- function o(n, d, a) {
272
- var u, h = {}, _ = null, f = null;
273
- a !== void 0 && (_ = "" + a), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (f = d.ref);
274
- for (u in d) r.call(d, u) && !i.hasOwnProperty(u) && (h[u] = d[u]);
275
- if (n && n.defaultProps) for (u in d = n.defaultProps, d) h[u] === void 0 && (h[u] = d[u]);
276
- return { $$typeof: t, type: n, key: _, ref: f, props: h, _owner: l.current };
266
+ var Ge;
267
+ function gn() {
268
+ if (Ge) return ae;
269
+ Ge = 1;
270
+ var e = ht, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
271
+ function c(n, d, a) {
272
+ var _, u = {}, h = null, f = null;
273
+ a !== void 0 && (h = "" + a), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (f = d.ref);
274
+ for (_ in d) r.call(d, _) && !l.hasOwnProperty(_) && (u[_] = d[_]);
275
+ if (n && n.defaultProps) for (_ in d = n.defaultProps, d) u[_] === void 0 && (u[_] = d[_]);
276
+ return { $$typeof: t, type: n, key: h, ref: f, props: u, _owner: i.current };
277
277
  }
278
- return te.Fragment = s, te.jsx = o, te.jsxs = o, te;
278
+ return ae.Fragment = s, ae.jsx = c, ae.jsxs = c, ae;
279
279
  }
280
- var qe;
281
- function hn() {
282
- return qe || (qe = 1, ue.exports = un()), ue.exports;
280
+ var Ke;
281
+ function bn() {
282
+ return Ke || (Ke = 1, ge.exports = gn()), ge.exports;
283
283
  }
284
- var c = hn();
285
- const fn = (e) => {
284
+ var o = bn();
285
+ const pn = (e) => {
286
286
  if (!(e != null && e.content)) return null;
287
287
  const t = {
288
288
  ...e,
289
289
  children: e.content,
290
290
  type: e.variant
291
291
  };
292
- return /* @__PURE__ */ c.jsx(ze, { ...t });
293
- }, yn = (e) => {
292
+ return /* @__PURE__ */ o.jsx(Ze, { ...t });
293
+ }, jn = (e) => {
294
294
  if (!e) return null;
295
295
  const t = {
296
296
  ...e,
297
297
  children: e.content
298
298
  };
299
- return /* @__PURE__ */ c.jsx(ct, { ...t });
300
- }, O = (e, t, s, r) => {
301
- var o;
302
- const l = {
303
- accordion: (n) => /* @__PURE__ */ c.jsx(Cn, { ...n, userFlow: e, pageId: t }),
304
- aiChatPanel: (n) => /* @__PURE__ */ c.jsx(
305
- Nn,
299
+ return /* @__PURE__ */ o.jsx(yt, { ...t });
300
+ }, S = (e, t, s, r) => {
301
+ var c;
302
+ const i = {
303
+ accordion: (n) => /* @__PURE__ */ o.jsx(On, { ...n, userFlow: e, pageId: t }),
304
+ aiChatPanel: (n) => /* @__PURE__ */ o.jsx(
305
+ An,
306
306
  {
307
307
  ...n,
308
308
  userFlow: e,
@@ -310,8 +310,8 @@ const fn = (e) => {
310
310
  onResolveProps: r == null ? void 0 : r.aiChatPanel
311
311
  }
312
312
  ),
313
- aiSummaryCard: (n) => /* @__PURE__ */ c.jsx(
314
- On,
313
+ aiSummaryCard: (n) => /* @__PURE__ */ o.jsx(
314
+ In,
315
315
  {
316
316
  ...n,
317
317
  userFlow: e,
@@ -319,74 +319,74 @@ const fn = (e) => {
319
319
  onResolveProps: r == null ? void 0 : r.aiSummaryCard
320
320
  }
321
321
  ),
322
- aiPromptCodeEditor: (n) => /* @__PURE__ */ c.jsx(kn, { ...n, userFlow: e, pageId: t }),
323
- box: (n) => /* @__PURE__ */ c.jsx(Ln, { ...n, userFlow: e, pageId: t }),
324
- breadcrumbs: (n) => /* @__PURE__ */ c.jsx(Wn, { ...n, userFlow: e, pageId: t }),
325
- tooltip: (n) => /* @__PURE__ */ c.jsx(qa, { ...n, userFlow: e, pageId: t }),
326
- textarea: (n) => /* @__PURE__ */ c.jsx(Sa, { ...n, userFlow: e, pageId: t }),
327
- card: (n) => /* @__PURE__ */ c.jsx(es, { ...n, userFlow: e, pageId: t }),
328
- dropdownButton: (n) => /* @__PURE__ */ c.jsx(Ds, { ...n, userFlow: e, pageId: t }),
329
- menu: (n) => /* @__PURE__ */ c.jsx(Ks, { ...n, userFlow: e, pageId: t }),
330
- radioGroup: (n) => /* @__PURE__ */ c.jsx(Hn, { ...n, userFlow: e, pageId: t }),
331
- stepper: (n) => /* @__PURE__ */ c.jsx(Xn, { ...n, userFlow: e, pageId: t }),
332
- progressBar: (n) => /* @__PURE__ */ c.jsx(Jn, { ...n, userFlow: e, pageId: t }),
333
- button: (n) => /* @__PURE__ */ c.jsx(Qn, { ...n, userFlow: e, pageId: t }),
334
- cardAccordion: (n) => /* @__PURE__ */ c.jsx(Zn, { ...n, userFlow: e, pageId: t }),
335
- cardNotification: (n) => /* @__PURE__ */ c.jsx(ts, { ...n }),
336
- chart: (n) => /* @__PURE__ */ c.jsx(ms, { ...n, userFlow: e }),
337
- dataCard: (n) => /* @__PURE__ */ c.jsx(Ss, { ...n, userFlow: e, pageId: t }),
338
- checkbox: (n) => /* @__PURE__ */ c.jsx(xs, { ...n, userFlow: e, pageId: t }),
339
- code: (n) => /* @__PURE__ */ c.jsx(Ns, { ...n, userFlow: e, pageId: t }),
340
- divider: (n) => /* @__PURE__ */ c.jsx(Ts, { ...n }),
341
- drawer: (n) => /* @__PURE__ */ c.jsx(qs, { ...n, userFlow: e, pageId: t }),
342
- heading: (n) => fn(n),
343
- link: (n) => /* @__PURE__ */ c.jsx(Bs, { ...n, userFlow: e, pageId: t }),
344
- pill: (n) => /* @__PURE__ */ c.jsx(Hs, { ...n }),
345
- previewerMarkdown: (n) => /* @__PURE__ */ c.jsx(Xs, { ...n }),
346
- modal: (n) => /* @__PURE__ */ c.jsx(Us, { ...n, userFlow: e, pageId: t }),
347
- roundButton: (n) => /* @__PURE__ */ c.jsx(Js, { ...n, userFlow: e, pageId: t }),
348
- row: (n) => /* @__PURE__ */ c.jsx(Ys, { ...n, userFlow: e, pageId: t }),
349
- select: (n) => /* @__PURE__ */ c.jsx(aa, { ...n, userFlow: e, pageId: t }),
350
- switch: (n) => /* @__PURE__ */ c.jsx(ya, { ...n, userFlow: e, pageId: t }),
351
- spacing: (n) => /* @__PURE__ */ c.jsx(fa, { ...n, userFlow: e, pageId: t }),
352
- table: (n) => /* @__PURE__ */ c.jsx(ja, { ...n, userFlow: e, pageId: t }),
353
- tabs: (n) => /* @__PURE__ */ c.jsx(va, { ...n, userFlow: e, pageId: t }),
354
- text: (n) => yn(n),
355
- textField: (n) => /* @__PURE__ */ c.jsx(Ta, { ...n, userFlow: e, pageId: t }),
356
- toast: (n) => /* @__PURE__ */ c.jsx(Oa, { ...n, userFlow: e, pageId: t })
322
+ aiPromptCodeEditor: (n) => /* @__PURE__ */ o.jsx(Rn, { ...n, userFlow: e, pageId: t }),
323
+ box: (n) => /* @__PURE__ */ o.jsx(Vn, { ...n, userFlow: e, pageId: t }),
324
+ breadcrumbs: (n) => /* @__PURE__ */ o.jsx(ts, { ...n, userFlow: e, pageId: t }),
325
+ tooltip: (n) => /* @__PURE__ */ o.jsx(Ka, { ...n, userFlow: e, pageId: t }),
326
+ textarea: (n) => /* @__PURE__ */ o.jsx(qa, { ...n, userFlow: e, pageId: t }),
327
+ card: (n) => /* @__PURE__ */ o.jsx(cs, { ...n, userFlow: e, pageId: t }),
328
+ dropdownButton: (n) => /* @__PURE__ */ o.jsx(Ks, { ...n, userFlow: e, pageId: t }),
329
+ menu: (n) => /* @__PURE__ */ o.jsx(zs, { ...n, userFlow: e, pageId: t }),
330
+ radioGroup: (n) => /* @__PURE__ */ o.jsx(Fn, { ...n, userFlow: e, pageId: t }),
331
+ stepper: (n) => /* @__PURE__ */ o.jsx(Pn, { ...n, userFlow: e, pageId: t }),
332
+ progressBar: (n) => /* @__PURE__ */ o.jsx(es, { ...n, userFlow: e, pageId: t }),
333
+ button: (n) => /* @__PURE__ */ o.jsx(ns, { ...n, userFlow: e, pageId: t }),
334
+ cardAccordion: (n) => /* @__PURE__ */ o.jsx(as, { ...n, userFlow: e, pageId: t }),
335
+ cardNotification: (n) => /* @__PURE__ */ o.jsx(is, { ...n }),
336
+ chart: (n) => /* @__PURE__ */ o.jsx(Cs, { ...n, userFlow: e }),
337
+ dataCard: (n) => /* @__PURE__ */ o.jsx($s, { ...n, userFlow: e, pageId: t }),
338
+ checkbox: (n) => /* @__PURE__ */ o.jsx(ws, { ...n, userFlow: e, pageId: t }),
339
+ code: (n) => /* @__PURE__ */ o.jsx(Os, { ...n, userFlow: e, pageId: t }),
340
+ divider: (n) => /* @__PURE__ */ o.jsx(Ds, { ...n }),
341
+ drawer: (n) => /* @__PURE__ */ o.jsx(Gs, { ...n, userFlow: e, pageId: t }),
342
+ heading: (n) => pn(n),
343
+ link: (n) => /* @__PURE__ */ o.jsx(Hs, { ...n, userFlow: e, pageId: t }),
344
+ pill: (n) => /* @__PURE__ */ o.jsx(Zs, { ...n }),
345
+ previewerMarkdown: (n) => /* @__PURE__ */ o.jsx(Fs, { ...n }),
346
+ modal: (n) => /* @__PURE__ */ o.jsx(Ws, { ...n, userFlow: e, pageId: t }),
347
+ roundButton: (n) => /* @__PURE__ */ o.jsx(Ps, { ...n, userFlow: e, pageId: t }),
348
+ row: (n) => /* @__PURE__ */ o.jsx(na, { ...n, userFlow: e, pageId: t }),
349
+ select: (n) => /* @__PURE__ */ o.jsx(da, { ...n, userFlow: e, pageId: t }),
350
+ switch: (n) => /* @__PURE__ */ o.jsx(ja, { ...n, userFlow: e, pageId: t }),
351
+ spacing: (n) => /* @__PURE__ */ o.jsx(pa, { ...n, userFlow: e, pageId: t }),
352
+ table: (n) => /* @__PURE__ */ o.jsx(Ea, { ...n, userFlow: e, pageId: t }),
353
+ tabs: (n) => /* @__PURE__ */ o.jsx($a, { ...n, userFlow: e, pageId: t }),
354
+ text: (n) => jn(n),
355
+ textField: (n) => /* @__PURE__ */ o.jsx(La, { ...n, userFlow: e, pageId: t }),
356
+ toast: (n) => /* @__PURE__ */ o.jsx(Ia, { ...n, userFlow: e, pageId: t })
357
357
  };
358
- return (o = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : o.map((n) => {
359
- const d = l[n.component];
358
+ return (c = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : c.map((n) => {
359
+ const d = i[n.component];
360
360
  return d ? d({ ...n, userFlow: e, pageId: t }) : null;
361
361
  });
362
362
  };
363
- function mn(e) {
363
+ function Cn(e) {
364
364
  return !!(e == null || typeof e == "string" && e.trim() === "" || Array.isArray(e) && e.length === 0);
365
365
  }
366
- function Qe(e, t) {
366
+ function nt(e, t) {
367
367
  if (!(t != null && t.length))
368
368
  return !1;
369
369
  for (const s of t)
370
370
  if (s.when === "empty") {
371
371
  const r = e == null ? void 0 : e[s.key];
372
- if (mn(r))
372
+ if (Cn(r))
373
373
  return !0;
374
374
  }
375
375
  return !1;
376
376
  }
377
377
  function I(e, t) {
378
- const s = v((r) => {
379
- var l;
380
- return (l = r[e]) == null ? void 0 : l.entries;
378
+ const s = N((r) => {
379
+ var i;
380
+ return (i = r[e]) == null ? void 0 : i.entries;
381
381
  });
382
- return A(
382
+ return E(
383
383
  () => ({
384
- disabled: Qe(s, t)
384
+ disabled: nt(s, t)
385
385
  }),
386
386
  [t, s]
387
387
  );
388
388
  }
389
- const P = (e) => {
389
+ const ee = (e) => {
390
390
  if (!e)
391
391
  return { "content-type": "application/json" };
392
392
  if (typeof e == "function")
@@ -398,440 +398,490 @@ const P = (e) => {
398
398
  return { "content-type": "application/json", Authorization: e };
399
399
  }
400
400
  return e;
401
- }, se = () => new AbortController(), xn = (e, t = {}, s = {}, r = !1, l) => {
402
- const i = se();
403
- r && i.abort();
404
- const o = P(t);
401
+ }, oe = () => new AbortController(), wn = (e, t = {}, s = {}, r = !1, i) => {
402
+ const l = oe();
403
+ r && l.abort();
404
+ const c = ee(t);
405
405
  return {
406
- call: J.get(e, {
406
+ call: X.get(e, {
407
407
  headers: {
408
- ...o
408
+ ...c
409
409
  },
410
410
  params: s,
411
- signal: i.signal,
412
- _userFlow: l
411
+ signal: l.signal,
412
+ _userFlow: i
413
413
  }),
414
- controller: i
414
+ controller: l
415
415
  };
416
- }, xe = (e, t = {}, s = {}, r = {}, l = !1, i) => {
417
- const o = se();
418
- l && o.abort();
419
- const n = P(t);
416
+ }, we = (e, t = {}, s = {}, r = {}, i = !1, l) => {
417
+ const c = oe();
418
+ i && c.abort();
419
+ const n = ee(t);
420
420
  return {
421
- call: J.post(e, s, {
421
+ call: X.post(e, s, {
422
422
  headers: {
423
423
  ...n
424
424
  },
425
425
  params: r,
426
- signal: o.signal,
427
- _userFlow: i
426
+ signal: c.signal,
427
+ _userFlow: l
428
428
  }),
429
- controller: o
429
+ controller: c
430
430
  };
431
- }, gn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
432
- const o = se();
433
- l && o.abort();
434
- const n = P(t);
431
+ }, Nn = (e, t = {}, s = {}, r = {}, i = !1, l) => {
432
+ const c = oe();
433
+ i && c.abort();
434
+ const n = ee(t);
435
435
  return {
436
- call: J.put(e, s, {
436
+ call: X.put(e, s, {
437
437
  headers: {
438
438
  ...n
439
439
  },
440
440
  params: r,
441
- signal: o.signal,
442
- _userFlow: i
441
+ signal: c.signal,
442
+ _userFlow: l
443
443
  }),
444
- controller: o
444
+ controller: c
445
445
  };
446
- }, pn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
447
- const o = se();
448
- l && o.abort();
449
- const n = P(t);
446
+ }, vn = (e, t = {}, s = {}, r = {}, i = !1, l) => {
447
+ const c = oe();
448
+ i && c.abort();
449
+ const n = ee(t);
450
450
  return {
451
- call: J.patch(e, s, {
451
+ call: X.patch(e, s, {
452
452
  headers: {
453
453
  ...n
454
454
  },
455
455
  params: r,
456
- signal: o.signal,
457
- _userFlow: i
456
+ signal: c.signal,
457
+ _userFlow: l
458
458
  }),
459
- controller: o
459
+ controller: c
460
460
  };
461
- }, bn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
462
- const o = se();
463
- l && o.abort();
464
- const n = P(t);
461
+ }, Sn = (e, t = {}, s = {}, r = {}, i = !1, l) => {
462
+ const c = oe();
463
+ i && c.abort();
464
+ const n = ee(t);
465
465
  return {
466
- call: J.delete(e, {
466
+ call: X.delete(e, {
467
467
  headers: {
468
468
  ...n
469
469
  },
470
470
  data: s,
471
471
  params: r,
472
- signal: o.signal,
473
- _userFlow: i
472
+ signal: c.signal,
473
+ _userFlow: l
474
474
  }),
475
- controller: o
475
+ controller: c
476
476
  };
477
- }, Ye = () => {
477
+ }, st = () => {
478
478
  let e;
479
479
  return { callEndpoint: async (r) => {
480
480
  r.controller && (e = r.controller);
481
- let l = {};
481
+ let i = {};
482
482
  try {
483
- l = await r.call;
484
- } catch (i) {
485
- throw i;
483
+ i = await r.call;
484
+ } catch (l) {
485
+ throw l;
486
486
  }
487
- return l;
487
+ return i;
488
488
  }, cancelEndpoint: () => {
489
489
  e && e.abort();
490
490
  } };
491
- }, Ze = async (e, t, s = "", r = {}, l = {}) => {
491
+ }, at = async (e, t, s = "", r = {}, i = {}) => {
492
492
  try {
493
- const { callEndpoint: i } = Ye(), { api: o, headers: n } = e, d = sessionStorage.getItem("sessionId"), a = new URLSearchParams({ session_name: t });
493
+ const { callEndpoint: l } = st(), { api: c, headers: n } = e, d = sessionStorage.getItem("sessionId"), a = new URLSearchParams({ session_name: t });
494
494
  s && a.append("hash_code", s), d && a.append("sessionId", d);
495
- const u = `${o}/not-front/next-ui/?${a.toString()}`, h = P(n), _ = xe(
495
+ const _ = `${c}/not-front/next-ui/?${a.toString()}`, u = ee(n), h = we(
496
+ _,
496
497
  u,
497
- h,
498
498
  r,
499
- l,
499
+ i,
500
500
  !1,
501
501
  t
502
502
  );
503
- return await i(_);
504
- } catch (i) {
505
- return console.error(i), Promise.reject(i);
503
+ return await l(h);
504
+ } catch (l) {
505
+ return console.error(l), Promise.reject(l);
506
506
  }
507
+ }, rt = (e) => {
508
+ const t = e == null ? void 0 : e.toLowerCase();
509
+ switch (t) {
510
+ case "post":
511
+ case "get":
512
+ case "put":
513
+ case "patch":
514
+ case "delete":
515
+ return t;
516
+ default:
517
+ return "get";
518
+ }
519
+ }, kn = (e, t, s) => {
520
+ const { url: r, paginationKeys: i, params: l } = e, c = [], n = (i == null ? void 0 : i.page) ?? "page";
521
+ if (c.push(`${n}=${t}`), typeof s == "string") {
522
+ const _ = (i == null ? void 0 : i.text) ?? "text";
523
+ c.push(`${_}=${encodeURIComponent(s || "")}`);
524
+ }
525
+ if (l && typeof l == "object") {
526
+ const _ = Object.entries(l).map(
527
+ ([u, h]) => `${encodeURIComponent(u)}=${encodeURIComponent(h)}`
528
+ );
529
+ c.push(..._);
530
+ }
531
+ const d = c.join("&");
532
+ return d ? `${r}?${d}` : r;
533
+ }, Se = (e, t, s, r) => {
534
+ const { type: i, url: l, method: c, headers: n } = e;
535
+ if (i === "rest") {
536
+ const d = kn(e, t, s), _ = { ...(e == null ? void 0 : e.data) ?? {}, ...r ?? {} };
537
+ return {
538
+ type: "rest",
539
+ url: d,
540
+ method: rt(c),
541
+ headers: n,
542
+ data: _
543
+ };
544
+ } else
545
+ return {
546
+ type: "graphql",
547
+ url: l,
548
+ method: "post",
549
+ headers: n,
550
+ query: e == null ? void 0 : e.query,
551
+ variables: {
552
+ ...(e == null ? void 0 : e.variables) || {},
553
+ ...typeof s == "string" ? { text: s } : {},
554
+ page: t
555
+ }
556
+ };
507
557
  }, K = () => {
508
- const e = v((n) => n), { callEndpoint: t } = Ye(), s = async (n, d, a, u, h = !0) => {
509
- var _;
558
+ const e = N((n) => n), { callEndpoint: t } = st(), s = async (n, d, a, _, u = !0) => {
559
+ var h;
510
560
  try {
511
- const f = (_ = e[n]) == null ? void 0 : _.apiConfig, g = {
561
+ const f = (h = e[n]) == null ? void 0 : h.apiConfig, m = {
512
562
  state: { ...a },
513
- triggerKey: u
563
+ triggerKey: _
514
564
  };
515
- return h && Q(n, !0), await Ze(
565
+ return u && Y(n, !0), await at(
516
566
  f,
517
567
  n,
518
568
  d,
519
- g
569
+ m
520
570
  );
521
571
  } catch (f) {
522
- throw h && Q(n, !1), console.error("[getNextUI] Error fetching next UI:", f), f;
572
+ throw u && Y(n, !1), console.error("[getNextUI] Error fetching next UI:", f), f;
523
573
  }
524
574
  }, r = (n, d) => {
525
- const { method: a, url: u, headers: h, data: _, params: f } = n;
526
- switch (a) {
575
+ const { url: a, headers: _, data: u, params: h } = n;
576
+ switch (rt(n.method)) {
527
577
  case "post":
528
- return xe(u, h, _, {}, !1, d);
578
+ return we(a, _, u, {}, !1, d);
529
579
  case "put":
530
- return gn(u, h, _, {}, !1, d);
580
+ return Nn(a, _, u, {}, !1, d);
531
581
  case "patch":
532
- return pn(u, h, _, {}, !1, d);
582
+ return vn(a, _, u, {}, !1, d);
533
583
  case "delete":
534
- return bn(u, h, _, f, !1, d);
584
+ return Sn(a, _, u, h, !1, d);
535
585
  case "get":
536
586
  default:
537
- return xn(u, h, f, !1, d);
587
+ return wn(a, _, h, !1, d);
538
588
  }
539
- }, l = (n, d) => {
540
- const { url: a, headers: u } = n, h = {
589
+ }, i = (n, d) => {
590
+ const { url: a, headers: _ } = n, u = {
541
591
  query: n == null ? void 0 : n.query,
542
592
  variables: (n == null ? void 0 : n.variables) || {}
543
593
  };
544
- return xe(
594
+ return we(
545
595
  a,
546
596
  {
547
- ...u,
597
+ ..._,
548
598
  "Content-Type": "application/json"
549
599
  },
550
- h,
600
+ u,
551
601
  {},
552
602
  !1,
553
603
  d
554
604
  );
555
- }, i = async (n, d, a = !0) => {
556
- var u, h;
605
+ }, l = async (n, d, a = !0) => {
606
+ var _, u;
557
607
  if (!n) {
558
608
  console.warn("[fetchDataSource] Invalid or missing dataSource");
559
609
  return;
560
610
  }
561
- a && Q(d, !0);
611
+ a && Y(d, !0);
562
612
  try {
563
- let _;
613
+ let h;
564
614
  switch (n == null ? void 0 : n.type) {
565
615
  case "rest":
566
- _ = r(n, d);
616
+ h = r(n, d);
567
617
  break;
568
618
  case "graphql":
569
- _ = l(n, d);
619
+ h = i(n, d);
570
620
  break;
571
621
  default:
572
622
  throw new Error("[fetchDataSource] Unsupported data source type");
573
623
  }
574
- return await t(_);
575
- } catch (_) {
576
- const f = _;
624
+ return await t(h);
625
+ } catch (h) {
626
+ const f = h;
577
627
  return console.error("[fetchDataSource] Error:", f), {
578
- status: ((u = f == null ? void 0 : f.response) == null ? void 0 : u.status) ?? 0,
579
- data: ((h = f == null ? void 0 : f.response) == null ? void 0 : h.data) ?? {
628
+ status: ((_ = f == null ? void 0 : f.response) == null ? void 0 : _.status) ?? 0,
629
+ data: ((u = f == null ? void 0 : f.response) == null ? void 0 : u.data) ?? {
580
630
  message: f == null ? void 0 : f.message,
581
631
  code: f == null ? void 0 : f.code,
582
632
  config: f == null ? void 0 : f.config
583
633
  }
584
634
  };
585
635
  } finally {
586
- a && Q(d, !1);
636
+ a && Y(d, !1);
587
637
  }
588
638
  };
589
639
  return {
590
640
  getNextUI: s,
591
- fetchDataSource: i,
592
- fetchAndGetNextUI: async (n, d, a, u, h) => {
641
+ fetchDataSource: l,
642
+ fetchAndGetNextUI: async (n, d, a, _, u) => {
593
643
  try {
594
- Q(n, !0);
595
- const _ = await i(h, n, !1);
596
- return _ && await s(
644
+ Y(n, !0);
645
+ const h = await l(u, n, !1);
646
+ return h && await s(
597
647
  n,
598
648
  d,
599
649
  a,
600
- u
650
+ _
601
651
  );
602
- } catch (_) {
603
- throw Q(n, !1), console.error(
652
+ } catch (h) {
653
+ throw Y(n, !1), console.error(
604
654
  "[fetchAndGetNextUI] Error fetching and navigating:",
605
- _
606
- ), _;
655
+ h
656
+ ), h;
607
657
  }
608
658
  }
609
659
  };
610
- }, jn = "_accordion_1ri2t_1", wn = "_accordionBody_1ri2t_8", De = {
611
- accordion: jn,
612
- accordionBody: wn
613
- }, Cn = (e) => {
660
+ }, En = "_accordion_1ri2t_1", Tn = "_accordionBody_1ri2t_8", Me = {
661
+ accordion: En,
662
+ accordionBody: Tn
663
+ }, On = (e) => {
614
664
  const {
615
665
  userFlow: t,
616
666
  pageId: s,
617
667
  responseKey: r,
618
- dependencies: l,
619
- customContent: i,
620
- actionContent: o,
668
+ dependencies: i,
669
+ customContent: l,
670
+ actionContent: c,
621
671
  components: n,
622
672
  ...d
623
- } = e, { getNextUI: a } = K(), [u, h] = L(
673
+ } = e, { getNextUI: a } = K(), [_, u] = R(
624
674
  d.checkboxChecked || !1
625
- ), { disabled: _ } = I(
675
+ ), { disabled: h } = I(
626
676
  t,
627
- l
628
- ), f = O(t, s, n), g = o ? O(t, s, o) : void 0, x = i ? O(t, s, i) : void 0, m = R(
629
- async (b) => {
677
+ i
678
+ ), f = S(t, s, n), m = c ? S(t, s, c) : void 0, g = l ? S(t, s, l) : void 0, x = L(
679
+ async (p) => {
630
680
  var C;
631
681
  try {
632
- const j = b.target.checked;
633
- h(j);
634
- const N = {
635
- ...(C = v.getState()[t]) == null ? void 0 : C.entries,
682
+ const j = p.target.checked;
683
+ u(j);
684
+ const w = {
685
+ ...(C = N.getState()[t]) == null ? void 0 : C.entries,
636
686
  [r]: j
637
687
  };
638
- if (q(t, N), d.actionType === "GO_TO_NEXT_UI") {
639
- const w = await a(
688
+ if ($(t, w), d.actionType === "GO_TO_NEXT_UI") {
689
+ const v = await a(
640
690
  t,
641
691
  s,
642
- N,
692
+ w,
643
693
  r
644
694
  );
645
- w != null && w.data && $(t, w == null ? void 0 : w.data);
695
+ v != null && v.data && D(t, v == null ? void 0 : v.data);
646
696
  }
647
697
  } catch (j) {
648
698
  console.error("Error in accordion checkbox action:", j), alert(JSON.stringify(j));
649
699
  }
650
700
  },
651
701
  [t, s, r, d.actionType, a]
652
- ), y = d.disabled || _, p = {
702
+ ), y = d.disabled || h, b = {
653
703
  ...d,
654
- className: De.accordion,
704
+ className: Me.accordion,
655
705
  disabled: y,
656
- checkboxChecked: u,
657
- onChanceCheckbox: d.hasCheckbox ? m : void 0,
658
- actionContent: g ? /* @__PURE__ */ c.jsx(c.Fragment, { children: g.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-action-${C}`)) }) : void 0,
659
- customContent: x ? /* @__PURE__ */ c.jsx(c.Fragment, { children: x.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-custom-${C}`)) }) : void 0,
660
- children: f ? /* @__PURE__ */ c.jsx("section", { className: De.accordionBody, children: f.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-child-${C}`)) }) : void 0
706
+ checkboxChecked: _,
707
+ onChanceCheckbox: d.hasCheckbox ? x : void 0,
708
+ actionContent: m ? /* @__PURE__ */ o.jsx(o.Fragment, { children: m.map((p, C) => /* @__PURE__ */ o.jsx(T, { children: p }, `accordion-action-${C}`)) }) : void 0,
709
+ customContent: g ? /* @__PURE__ */ o.jsx(o.Fragment, { children: g.map((p, C) => /* @__PURE__ */ o.jsx(T, { children: p }, `accordion-custom-${C}`)) }) : void 0,
710
+ children: f ? /* @__PURE__ */ o.jsx("section", { className: Me.accordionBody, children: f.map((p, C) => /* @__PURE__ */ o.jsx(T, { children: p }, `accordion-child-${C}`)) }) : void 0
661
711
  };
662
- return /* @__PURE__ */ c.jsx(it, { ...p });
663
- }, Nn = (e) => {
664
- const t = ne.useThemeStore((o) => o.theme.mode), s = e.dataSource, r = A(() => ({
712
+ return /* @__PURE__ */ o.jsx(mt, { ...b });
713
+ }, An = (e) => {
714
+ const t = re.useThemeStore((c) => c.theme.mode), s = e.dataSource, r = E(() => ({
665
715
  url: e.dataSource.url,
666
716
  method: e.dataSource.method,
667
717
  headers: e.dataSource.headers,
668
718
  params: s == null ? void 0 : s.data
669
- }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, s == null ? void 0 : s.data]), l = e.locale ?? "en", i = A(() => {
670
- var n, d, a, u, h;
671
- const o = {
719
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, s == null ? void 0 : s.data]), i = e.locale ?? "en", l = E(() => {
720
+ var n, d, a, _, u;
721
+ const c = {
672
722
  title: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.title,
673
723
  welcomeTitle: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.welcomeTitle,
674
724
  welcomeDescription: (a = e == null ? void 0 : e.translations) == null ? void 0 : a.welcomeDescription,
675
- placeholder: (u = e == null ? void 0 : e.translations) == null ? void 0 : u.placeholder,
676
- disclaimer: (h = e == null ? void 0 : e.translations) == null ? void 0 : h.disclaimer
725
+ placeholder: (_ = e == null ? void 0 : e.translations) == null ? void 0 : _.placeholder,
726
+ disclaimer: (u = e == null ? void 0 : e.translations) == null ? void 0 : u.disclaimer
677
727
  };
678
- return Object.fromEntries(Object.entries(o).filter(([, _]) => !!_));
728
+ return Object.fromEntries(Object.entries(c).filter(([, h]) => !!h));
679
729
  }, [e == null ? void 0 : e.translations]);
680
- return V(() => {
730
+ return U(() => {
681
731
  e.onResolveProps && e.onResolveProps({
682
732
  dataSource: r,
683
- locale: l,
684
- translations: i,
733
+ locale: i,
734
+ translations: l,
685
735
  initialSuggestions: e.initialSuggestions,
686
736
  theme: t
687
737
  });
688
738
  }, [
689
739
  e.onResolveProps,
690
740
  r,
691
- l,
692
741
  i,
742
+ l,
693
743
  e.initialSuggestions,
694
744
  t
695
- ]), e.onResolveProps ? null : /* @__PURE__ */ c.jsx(
696
- It,
745
+ ]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx(
746
+ Vt,
697
747
  {
698
748
  dataSource: r,
699
- locale: l,
700
- translations: i,
749
+ locale: i,
750
+ translations: l,
701
751
  initialSuggestions: e.initialSuggestions,
702
752
  theme: t
703
753
  }
704
754
  );
705
- }, vn = "_promptCodeEditor_1d57s_1", Sn = {
706
- promptCodeEditor: vn
707
- }, kn = (e) => {
755
+ }, $n = "_promptCodeEditor_1d57s_1", qn = {
756
+ promptCodeEditor: $n
757
+ }, Rn = (e) => {
708
758
  const {
709
759
  userFlow: t,
710
760
  responseKey: s,
711
761
  codeBlockValue: r,
712
- language: l,
713
- disabled: i,
714
- dependencies: o,
762
+ language: i,
763
+ disabled: l,
764
+ dependencies: c,
715
765
  dataSource: n,
716
766
  inputLabel: d,
717
767
  inputPlaceholder: a,
718
- codeBlockLabel: u
719
- } = e, h = ne.useThemeStore((b) => b.theme.mode), [_, f] = L(
768
+ codeBlockLabel: _
769
+ } = e, u = re.useThemeStore((p) => p.theme.mode), [h, f] = R(
720
770
  r || ""
721
- ), { disabled: g } = I(
771
+ ), { disabled: m } = I(
722
772
  t,
723
- o
724
- ), x = i ?? g, m = l ?? "json", y = {
773
+ c
774
+ ), g = l ?? m, x = i ?? "json", y = {
725
775
  url: (n == null ? void 0 : n.url) || "",
726
776
  method: (n == null ? void 0 : n.method) || "post",
727
777
  headers: n == null ? void 0 : n.headers,
728
778
  body: n == null ? void 0 : n.data
729
- }, p = (b) => {
730
- f(b);
779
+ }, b = (p) => {
780
+ f(p);
731
781
  const C = {
732
- [s]: b
782
+ [s]: p
733
783
  };
734
- q(t, C);
784
+ $(t, C);
735
785
  };
736
- return V(() => {
737
- r !== void 0 && r !== _ && f(r);
738
- }, [r]), /* @__PURE__ */ c.jsx("section", { className: Sn.promptCodeEditor, children: /* @__PURE__ */ c.jsx(
739
- Bt,
786
+ return U(() => {
787
+ r !== void 0 && r !== h && f(r);
788
+ }, [r]), /* @__PURE__ */ o.jsx("section", { className: qn.promptCodeEditor, children: /* @__PURE__ */ o.jsx(
789
+ Ht,
740
790
  {
741
- themeMode: h,
791
+ themeMode: u,
742
792
  requestConfig: y,
743
- language: m,
744
- disabled: x,
793
+ language: x,
794
+ disabled: g,
745
795
  inputLabel: d,
746
796
  inputPlaceholder: a,
747
- codeBlockLabel: u,
748
- codeBlockValue: _,
749
- onCodeChange: p
797
+ codeBlockLabel: _,
798
+ codeBlockValue: h,
799
+ onCodeChange: b
750
800
  }
751
801
  ) });
752
- }, En = "_summaryCard_jva4h_1", Tn = {
753
- summaryCard: En
754
- }, On = (e) => {
755
- const t = e.dataSource, s = A(() => ({
802
+ }, Dn = "_summaryCard_jva4h_1", Ln = {
803
+ summaryCard: Dn
804
+ }, In = (e) => {
805
+ const t = e.dataSource, s = E(() => ({
756
806
  url: e.dataSource.url,
757
807
  method: e.dataSource.method,
758
808
  headers: e.dataSource.headers,
759
809
  body: t == null ? void 0 : t.data
760
- }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), r = e.locale ?? "en", l = A(() => {
761
- var o, n, d;
762
- const i = {
763
- title: (o = e == null ? void 0 : e.translations) == null ? void 0 : o.title,
810
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), r = e.locale ?? "en", i = E(() => {
811
+ var c, n, d;
812
+ const l = {
813
+ title: (c = e == null ? void 0 : e.translations) == null ? void 0 : c.title,
764
814
  loading: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.loading,
765
815
  noData: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.noData
766
816
  };
767
817
  return Object.fromEntries(
768
- Object.entries(i).filter(([, a]) => !!a)
818
+ Object.entries(l).filter(([, a]) => !!a)
769
819
  );
770
820
  }, [e == null ? void 0 : e.translations]);
771
- return V(() => {
821
+ return U(() => {
772
822
  e.onResolveProps && e.onResolveProps({
773
823
  dataSource: s,
774
824
  locale: r,
775
- translations: l
825
+ translations: i
776
826
  });
777
- }, [e.onResolveProps, s, r, l]), e.onResolveProps ? null : /* @__PURE__ */ c.jsx("section", { className: Tn.summaryCard, children: /* @__PURE__ */ c.jsx(
778
- Kt,
827
+ }, [e.onResolveProps, s, r, i]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx("section", { className: Ln.summaryCard, children: /* @__PURE__ */ o.jsx(
828
+ zt,
779
829
  {
780
830
  dataSource: s,
781
831
  locale: r,
782
- translations: l
832
+ translations: i
783
833
  }
784
834
  ) });
785
- }, An = "_body_14tsv_1", $n = "_body_content_14tsv_5", Re = {
786
- body: An,
787
- body_content: $n
788
- }, qn = ({ inputs: e }) => /* @__PURE__ */ c.jsx("section", { className: Re.body, children: /* @__PURE__ */ c.jsx("div", { className: Re.body_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx(T, { children: t }, s)) }) }), Dn = "_slotStack_1b4wy_1", Rn = {
789
- slotStack: Dn
790
- }, Ln = (e) => {
835
+ }, Bn = "_body_14tsv_1", Gn = "_body_content_14tsv_5", Ue = {
836
+ body: Bn,
837
+ body_content: Gn
838
+ }, Kn = ({ inputs: e }) => /* @__PURE__ */ o.jsx("section", { className: Ue.body, children: /* @__PURE__ */ o.jsx("div", { className: Ue.body_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx(T, { children: t }, s)) }) }), Mn = "_slotStack_1b4wy_1", Un = {
839
+ slotStack: Mn
840
+ }, Vn = (e) => {
791
841
  const {
792
842
  userFlow: t,
793
843
  pageId: s,
794
844
  component: r,
795
- hash: l,
796
- responseKey: i,
797
- content: o
798
- } = e, n = ne.useThemeStore((u) => u.theme.mode) === "dark", d = O(
845
+ hash: i,
846
+ responseKey: l,
847
+ content: c
848
+ } = e, n = re.useThemeStore((_) => _.theme.mode) === "dark", d = S(
799
849
  t,
800
850
  s,
801
- o != null && o.length ? o : null
802
- ), a = d && d.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Rn.slotStack, children: d.map((u, h) => /* @__PURE__ */ c.jsx(T, { children: u }, `box-${l}-${h}`)) }) : null;
803
- return /* @__PURE__ */ c.jsx(lt, { darkMode: n, children: a });
851
+ c != null && c.length ? c : null
852
+ ), a = d && d.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Un.slotStack, children: d.map((_, u) => /* @__PURE__ */ o.jsx(T, { children: _ }, `box-${i}-${u}`)) }) : null;
853
+ return /* @__PURE__ */ o.jsx(xt, { darkMode: n, children: a });
804
854
  };
805
- var he = { exports: {} };
855
+ var be = { exports: {} };
806
856
  /*!
807
857
  Copyright (c) 2018 Jed Watson.
808
858
  Licensed under the MIT License (MIT), see
809
859
  http://jedwatson.github.io/classnames
810
860
  */
811
- var Le;
812
- function In() {
813
- return Le || (Le = 1, (function(e) {
861
+ var Ve;
862
+ function Hn() {
863
+ return Ve || (Ve = 1, (function(e) {
814
864
  (function() {
815
865
  var t = {}.hasOwnProperty;
816
866
  function s() {
817
- for (var r = [], l = 0; l < arguments.length; l++) {
818
- var i = arguments[l];
819
- if (i) {
820
- var o = typeof i;
821
- if (o === "string" || o === "number")
822
- r.push(i);
823
- else if (Array.isArray(i)) {
824
- if (i.length) {
825
- var n = s.apply(null, i);
867
+ for (var r = [], i = 0; i < arguments.length; i++) {
868
+ var l = arguments[i];
869
+ if (l) {
870
+ var c = typeof l;
871
+ if (c === "string" || c === "number")
872
+ r.push(l);
873
+ else if (Array.isArray(l)) {
874
+ if (l.length) {
875
+ var n = s.apply(null, l);
826
876
  n && r.push(n);
827
877
  }
828
- } else if (o === "object") {
829
- if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) {
830
- r.push(i.toString());
878
+ } else if (c === "object") {
879
+ if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]")) {
880
+ r.push(l.toString());
831
881
  continue;
832
882
  }
833
- for (var d in i)
834
- t.call(i, d) && i[d] && r.push(d);
883
+ for (var d in l)
884
+ t.call(l, d) && l[d] && r.push(d);
835
885
  }
836
886
  }
837
887
  }
@@ -839,54 +889,54 @@ function In() {
839
889
  }
840
890
  e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
841
891
  })();
842
- })(he)), he.exports;
892
+ })(be)), be.exports;
843
893
  }
844
- var Bn = In();
845
- const F = /* @__PURE__ */ _n(Bn), Kn = "_fieldset_1xrth_1", Gn = "_fieldsetColumn_1xrth_8", Mn = "_legend_1xrth_14", Un = "_options_1xrth_20", Vn = "_optionsRow_1xrth_25", zn = "_optionsColumn_1xrth_36", Y = {
846
- fieldset: Kn,
847
- fieldsetColumn: Gn,
848
- legend: Mn,
849
- options: Un,
850
- optionsRow: Vn,
851
- optionsColumn: zn
852
- }, Hn = (e) => {
894
+ var zn = Hn();
895
+ const P = /* @__PURE__ */ xn(zn), Xn = "_fieldset_1xrth_1", Jn = "_fieldsetColumn_1xrth_8", Wn = "_legend_1xrth_14", Qn = "_options_1xrth_20", Yn = "_optionsRow_1xrth_25", Zn = "_optionsColumn_1xrth_36", Z = {
896
+ fieldset: Xn,
897
+ fieldsetColumn: Jn,
898
+ legend: Wn,
899
+ options: Qn,
900
+ optionsRow: Yn,
901
+ optionsColumn: Zn
902
+ }, Fn = (e) => {
853
903
  const {
854
904
  userFlow: t,
855
905
  pageId: s,
856
906
  responseKey: r,
857
- label: l,
858
- value: i,
859
- required: o,
907
+ label: i,
908
+ value: l,
909
+ required: c,
860
910
  actionType: n,
861
911
  dependencies: d,
862
912
  direction: a,
863
- items: u
864
- } = e, h = a === "column" ? "column" : "row", { getNextUI: _ } = K(), { disabled: f } = I(
913
+ items: _
914
+ } = e, u = a === "column" ? "column" : "row", { getNextUI: h } = K(), { disabled: f } = I(
865
915
  t,
866
916
  d
867
- ), g = v(
868
- (b) => {
917
+ ), m = N(
918
+ (p) => {
869
919
  var C, j;
870
- return (j = (C = b[t]) == null ? void 0 : C.entries) == null ? void 0 : j[r];
920
+ return (j = (C = p[t]) == null ? void 0 : C.entries) == null ? void 0 : j[r];
871
921
  }
872
- ), x = g != null ? String(g) : i ?? "", m = f, y = A(() => l ? o ? `${l} *` : l : null, [l, o]), p = R(
873
- async (b) => {
922
+ ), g = m != null ? String(m) : l ?? "", x = f, y = E(() => i ? c ? `${i} *` : i : null, [i, c]), b = L(
923
+ async (p) => {
874
924
  var C;
875
- if (!m)
925
+ if (!x)
876
926
  try {
877
927
  const j = {
878
- ...(C = v.getState()[t]) == null ? void 0 : C.entries,
879
- [r]: b
928
+ ...(C = N.getState()[t]) == null ? void 0 : C.entries,
929
+ [r]: p
880
930
  };
881
- if (q(t, j), n === "GO_TO_NEXT_UI" || n === "GO_TO_NEXT_UI_WITHOUT_LOADING") {
882
- const k = await _(
931
+ if ($(t, j), n === "GO_TO_NEXT_UI" || n === "GO_TO_NEXT_UI_WITHOUT_LOADING") {
932
+ const O = await h(
883
933
  t,
884
934
  s,
885
935
  j,
886
936
  r,
887
937
  n === "GO_TO_NEXT_UI"
888
938
  );
889
- k != null && k.data && $(t, k == null ? void 0 : k.data);
939
+ O != null && O.data && D(t, O == null ? void 0 : O.data);
890
940
  }
891
941
  } catch (j) {
892
942
  alert(JSON.stringify(j));
@@ -894,170 +944,184 @@ const F = /* @__PURE__ */ _n(Bn), Kn = "_fieldset_1xrth_1", Gn = "_fieldsetColum
894
944
  },
895
945
  [
896
946
  n,
897
- _,
898
- m,
947
+ h,
948
+ x,
899
949
  s,
900
950
  r,
901
951
  t
902
952
  ]
903
953
  );
904
- return /* @__PURE__ */ c.jsxs(
954
+ return /* @__PURE__ */ o.jsxs(
905
955
  "fieldset",
906
956
  {
907
- className: F(
908
- Y.fieldset,
909
- h === "column" && Y.fieldsetColumn
957
+ className: P(
958
+ Z.fieldset,
959
+ u === "column" && Z.fieldsetColumn
910
960
  ),
911
961
  children: [
912
- y ? /* @__PURE__ */ c.jsx("legend", { className: Y.legend, children: y }) : null,
913
- /* @__PURE__ */ c.jsx(
962
+ y ? /* @__PURE__ */ o.jsx("legend", { className: Z.legend, children: y }) : null,
963
+ /* @__PURE__ */ o.jsx(
914
964
  "div",
915
965
  {
916
- className: F(
917
- Y.options,
918
- h === "column" ? Y.optionsColumn : Y.optionsRow
966
+ className: P(
967
+ Z.options,
968
+ u === "column" ? Z.optionsColumn : Z.optionsRow
919
969
  ),
920
- children: u.map((b) => /* @__PURE__ */ c.jsx(
921
- dt,
970
+ children: _.map((p) => /* @__PURE__ */ o.jsx(
971
+ gt,
922
972
  {
923
973
  name: r,
924
- value: b.value,
925
- checked: x === b.value,
926
- disabled: m || b.disabled,
927
- labelRight: b.label,
974
+ value: p.value,
975
+ checked: g === p.value,
976
+ disabled: x || p.disabled,
977
+ labelRight: p.label,
928
978
  onChange: () => {
929
- p(b.value);
979
+ b(p.value);
930
980
  }
931
981
  },
932
- b.value
982
+ p.value
933
983
  ))
934
984
  }
935
985
  )
936
986
  ]
937
987
  }
938
988
  );
939
- }, Xn = ({
989
+ }, Pn = ({
940
990
  userFlow: e,
941
991
  pageId: t,
942
992
  component: s,
943
993
  hash: r,
944
- responseKey: l,
945
- items: i,
946
- itemActive: o,
994
+ responseKey: i,
995
+ items: l,
996
+ itemActive: c,
947
997
  darkMode: n
948
- }) => /* @__PURE__ */ c.jsx(_t, { items: i, itemActive: o, darkMode: n }), Jn = ({
998
+ }) => /* @__PURE__ */ o.jsx(bt, { items: l, itemActive: c, darkMode: n }), es = ({
949
999
  userFlow: e,
950
1000
  pageId: t,
951
1001
  component: s,
952
1002
  hash: r,
953
- responseKey: l,
954
- total: i,
955
- done: o,
1003
+ responseKey: i,
1004
+ total: l,
1005
+ done: c,
956
1006
  inProgress: n
957
- }) => /* @__PURE__ */ c.jsx(ut, { total: i, done: o, inProgress: n }), Wn = ({
1007
+ }) => /* @__PURE__ */ o.jsx(pt, { total: l, done: c, inProgress: n }), ts = ({
958
1008
  userFlow: e,
959
1009
  items: t,
960
1010
  responseKey: s
961
1011
  }) => {
962
- const { getNextUI: r } = K(), l = R(
963
- async ({ actionType: o, hashCode: n, redirectUrl: d }) => {
1012
+ const { getNextUI: r } = K(), i = L(
1013
+ async ({ actionType: c, hashCode: n, redirectUrl: d }) => {
964
1014
  var a;
965
1015
  try {
966
- switch (o) {
1016
+ switch (c) {
967
1017
  case "GO_TO_NEXT_UI":
968
- const u = await r(
1018
+ const _ = await r(
969
1019
  e,
970
1020
  n,
971
- { ...(a = v.getState()[e]) == null ? void 0 : a.entries },
1021
+ { ...(a = N.getState()[e]) == null ? void 0 : a.entries },
972
1022
  s
973
1023
  );
974
- u != null && u.data && $(e, u == null ? void 0 : u.data);
1024
+ _ != null && _.data && D(e, _ == null ? void 0 : _.data);
975
1025
  break;
976
1026
  case "REDIRECT":
977
1027
  d ? window.location.href = d : console.warn("Missing redirectUrl for REDIRECT actionType");
978
1028
  break;
979
1029
  default:
980
- console.warn(`Unhandled actionType: ${o}`);
1030
+ console.warn(`Unhandled actionType: ${c}`);
981
1031
  break;
982
1032
  }
983
- } catch (u) {
984
- alert(JSON.stringify(u));
1033
+ } catch (_) {
1034
+ alert(JSON.stringify(_));
985
1035
  }
986
1036
  },
987
1037
  []
988
- ), i = A(() => t == null ? void 0 : t.map((o) => ({
989
- title: o == null ? void 0 : o.title,
990
- component: /* @__PURE__ */ c.jsx("div", { onClick: () => l(o) })
1038
+ ), l = E(() => t == null ? void 0 : t.map((c) => ({
1039
+ title: c == null ? void 0 : c.title,
1040
+ component: /* @__PURE__ */ o.jsx("div", { onClick: () => i(c) })
991
1041
  })), []);
992
- return /* @__PURE__ */ c.jsx(ht, { items: i });
1042
+ return /* @__PURE__ */ o.jsx(jt, { items: l });
993
1043
  };
994
- function we(e, t) {
995
- const { getNextUI: s, fetchDataSource: r, fetchAndGetNextUI: l } = K();
996
- return R(
997
- async (i) => {
998
- var _, f, g, x;
999
- const { responseKey: o, actionType: n, dataSource: d, redirectUrl: a, dependencies: u } = i, h = (_ = v.getState()[e]) == null ? void 0 : _.entries;
1000
- if (!Qe(h, u))
1044
+ function ke(e, t) {
1045
+ const { getNextUI: s, fetchDataSource: r, fetchAndGetNextUI: i } = K();
1046
+ return L(
1047
+ async (l) => {
1048
+ var h, f, m, g;
1049
+ const { responseKey: c, actionType: n, dataSource: d, redirectUrl: a, dependencies: _ } = l, u = (h = N.getState()[e]) == null ? void 0 : h.entries;
1050
+ if (!nt(u, _))
1001
1051
  try {
1002
- const m = {
1003
- ...(f = v.getState()[e]) == null ? void 0 : f.entries,
1004
- [o]: { status: 200 }
1052
+ const x = {
1053
+ ...(f = N.getState()[e]) == null ? void 0 : f.entries,
1054
+ [c]: { status: 200 }
1005
1055
  };
1006
- switch (q(e, m), n) {
1056
+ switch ($(e, x), n) {
1007
1057
  case "CLOSE_MODAL":
1008
- ce(e, !1);
1058
+ ue(e, !1);
1009
1059
  break;
1010
1060
  case "CLOSE_DRAWER":
1011
- W(e, !1);
1061
+ J(e, !1);
1012
1062
  break;
1013
1063
  case "OPEN_DRAWER":
1014
- W(e, !0);
1064
+ J(e, !0);
1015
1065
  break;
1016
1066
  case "GO_TO_NEXT_UI": {
1017
1067
  const y = await s(
1018
1068
  e,
1019
1069
  t,
1020
- m,
1021
- o
1070
+ x,
1071
+ c
1022
1072
  );
1023
- y != null && y.data && $(e, y == null ? void 0 : y.data);
1073
+ y != null && y.data && D(e, y == null ? void 0 : y.data);
1024
1074
  break;
1025
1075
  }
1026
1076
  case "FETCH_AND_GO_TO_NEXT_UI": {
1027
- const y = await l(
1077
+ const y = await i(
1028
1078
  e,
1029
1079
  t,
1030
- m,
1031
- o,
1080
+ x,
1081
+ c,
1032
1082
  d
1033
1083
  );
1034
- y != null && y.data && $(e, y == null ? void 0 : y.data);
1084
+ y != null && y.data && D(e, y == null ? void 0 : y.data);
1085
+ break;
1086
+ }
1087
+ case "FETCH_DATA_SOURCE": {
1088
+ const y = await r(
1089
+ d,
1090
+ e,
1091
+ !1
1092
+ );
1093
+ $(e, {
1094
+ [c]: {
1095
+ status: y == null ? void 0 : y.status,
1096
+ content: y == null ? void 0 : y.data
1097
+ }
1098
+ });
1035
1099
  break;
1036
1100
  }
1037
1101
  case "GET_DATA_SOURCE": {
1038
1102
  const y = await s(
1039
1103
  e,
1040
1104
  t,
1041
- m,
1042
- o
1043
- ), p = (g = y == null ? void 0 : y.data) == null ? void 0 : g.content;
1044
- if ((p == null ? void 0 : p.type) !== "fetch")
1105
+ x,
1106
+ c
1107
+ ), b = (m = y == null ? void 0 : y.data) == null ? void 0 : m.content;
1108
+ if ((b == null ? void 0 : b.type) !== "fetch")
1045
1109
  break;
1046
- const b = p == null ? void 0 : p.dataSource, C = await r(b, e, !1), j = {
1047
- ...(x = v.getState()[e]) == null ? void 0 : x.entries,
1048
- [o]: {
1110
+ const p = b == null ? void 0 : b.dataSource, C = await r(p, e, !1), j = {
1111
+ ...(g = N.getState()[e]) == null ? void 0 : g.entries,
1112
+ [c]: {
1049
1113
  status: C == null ? void 0 : C.status,
1050
1114
  content: C == null ? void 0 : C.data
1051
1115
  }
1052
1116
  };
1053
- q(e, j);
1054
- const N = await s(
1117
+ $(e, j);
1118
+ const w = await s(
1055
1119
  e,
1056
1120
  t,
1057
1121
  j,
1058
- o
1122
+ c
1059
1123
  );
1060
- N != null && N.data && $(e, N == null ? void 0 : N.data);
1124
+ w != null && w.data && D(e, w == null ? void 0 : w.data);
1061
1125
  break;
1062
1126
  }
1063
1127
  case "REDIRECT":
@@ -1066,12 +1130,12 @@ function we(e, t) {
1066
1130
  default:
1067
1131
  console.warn(`Unhandled actionType: ${n}`);
1068
1132
  }
1069
- } catch (m) {
1070
- alert(JSON.stringify(m));
1133
+ } catch (x) {
1134
+ alert(JSON.stringify(x));
1071
1135
  }
1072
1136
  },
1073
1137
  [
1074
- l,
1138
+ i,
1075
1139
  r,
1076
1140
  s,
1077
1141
  t,
@@ -1079,462 +1143,435 @@ function we(e, t) {
1079
1143
  ]
1080
1144
  );
1081
1145
  }
1082
- const Qn = (e) => {
1146
+ const ns = (e) => {
1083
1147
  const {
1084
1148
  userFlow: t,
1085
1149
  pageId: s,
1086
1150
  responseKey: r,
1087
- actionType: l,
1088
- label: i,
1089
- content: o,
1151
+ actionType: i,
1152
+ label: l,
1153
+ content: c,
1090
1154
  dataSource: n,
1091
1155
  redirectUrl: d,
1092
1156
  dependencies: a,
1093
- onClick: u,
1094
- ...h
1095
- } = e, _ = we(t, s), { disabled: f } = I(
1157
+ onClick: _,
1158
+ ...u
1159
+ } = e, h = ke(t, s), { disabled: f } = I(
1096
1160
  t,
1097
1161
  a
1098
- ), g = {
1099
- ...h,
1100
- children: o ?? i
1101
- }, x = (g == null ? void 0 : g.disabled) ?? f, m = R(async () => {
1102
- await _({
1103
- responseKey: r,
1104
- actionType: l,
1105
- dataSource: n,
1106
- redirectUrl: d,
1107
- dependencies: a
1108
- });
1162
+ ), m = {
1163
+ ...u,
1164
+ children: c ?? l
1165
+ }, g = (m == null ? void 0 : m.disabled) ?? f, [x, y] = R(!1), b = _e(!1), p = L(async () => {
1166
+ if (b.current)
1167
+ return;
1168
+ const C = i === "FETCH_DATA_SOURCE";
1169
+ C && (b.current = !0, y(!0));
1170
+ try {
1171
+ await h({
1172
+ responseKey: r,
1173
+ actionType: i,
1174
+ dataSource: n,
1175
+ redirectUrl: d,
1176
+ dependencies: a
1177
+ });
1178
+ } catch (j) {
1179
+ console.error("[ButtonNotFront] Action failed:", j);
1180
+ } finally {
1181
+ C && (b.current = !1, y(!1));
1182
+ }
1109
1183
  }, [
1110
- l,
1184
+ i,
1111
1185
  n,
1112
1186
  a,
1113
1187
  d,
1114
1188
  r,
1115
- _
1189
+ h
1116
1190
  ]);
1117
- return /* @__PURE__ */ c.jsx(
1118
- ft,
1191
+ return /* @__PURE__ */ o.jsx(
1192
+ Ct,
1119
1193
  {
1120
- ...g,
1121
- disabled: x,
1122
- onClick: () => !x && (u ?? m)()
1194
+ ...m,
1195
+ loading: m.loading || x,
1196
+ disabled: g,
1197
+ onClick: () => !g && !x && (_ ?? p)()
1123
1198
  }
1124
1199
  );
1125
- }, Yn = "_slotStack_12u4t_5", Ie = {
1126
- slotStack: Yn
1127
- }, Zn = (e) => {
1200
+ }, ss = "_slotStack_12u4t_5", He = {
1201
+ slotStack: ss
1202
+ }, as = (e) => {
1128
1203
  const {
1129
1204
  userFlow: t,
1130
1205
  pageId: s,
1131
1206
  component: r,
1132
- hash: l,
1133
- responseKey: i,
1134
- dependencies: o,
1207
+ hash: i,
1208
+ responseKey: l,
1209
+ dependencies: c,
1135
1210
  content: n,
1136
1211
  actionContent: d,
1137
1212
  ...a
1138
- } = e, { disabled: u } = I(
1213
+ } = e, { disabled: _ } = I(
1139
1214
  t,
1140
- o
1141
- ), h = O(
1215
+ c
1216
+ ), u = S(
1142
1217
  t,
1143
1218
  s,
1144
1219
  n && n.length > 0 ? n : null
1145
- ), _ = O(
1220
+ ), h = S(
1146
1221
  t,
1147
1222
  s,
1148
1223
  d && d.length > 0 ? d : null
1149
- ), f = h && h.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ie.slotStack, children: h.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `card-accordion-body-${l}-${y}`)) }) : void 0, g = _ && _.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ie.slotStack, children: _.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `card-accordion-actions-${l}-${y}`)) }) : void 0, x = a.disabled || u;
1150
- return /* @__PURE__ */ c.jsx(
1151
- yt,
1224
+ ), f = u && u.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: He.slotStack, children: u.map((x, y) => /* @__PURE__ */ o.jsx(T, { children: x }, `card-accordion-body-${i}-${y}`)) }) : void 0, m = h && h.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: He.slotStack, children: h.map((x, y) => /* @__PURE__ */ o.jsx(T, { children: x }, `card-accordion-actions-${i}-${y}`)) }) : void 0, g = a.disabled || _;
1225
+ return /* @__PURE__ */ o.jsx(
1226
+ wt,
1152
1227
  {
1153
1228
  ...a,
1154
- disabled: x,
1155
- actionContent: g,
1229
+ disabled: g,
1230
+ actionContent: m,
1156
1231
  children: f ?? null
1157
1232
  }
1158
1233
  );
1159
- }, Fn = "_slotStack_ivk5b_1", Pn = {
1160
- slotStack: Fn
1161
- }, es = (e) => {
1234
+ }, rs = "_slotStack_ivk5b_1", os = {
1235
+ slotStack: rs
1236
+ }, cs = (e) => {
1162
1237
  const {
1163
1238
  userFlow: t,
1164
1239
  pageId: s,
1165
1240
  component: r,
1166
- hash: l,
1167
- responseKey: i,
1168
- content: o,
1241
+ hash: i,
1242
+ responseKey: l,
1243
+ content: c,
1169
1244
  colorId: n,
1170
1245
  disabled: d,
1171
1246
  actionType: a,
1172
- dataSource: u,
1173
- redirectUrl: h,
1174
- dependencies: _
1175
- } = e, { getNextUI: f, fetchDataSource: g, fetchAndGetNextUI: x } = K(), { disabled: m } = I(
1247
+ dataSource: _,
1248
+ redirectUrl: u,
1249
+ dependencies: h
1250
+ } = e, { getNextUI: f, fetchDataSource: m, fetchAndGetNextUI: g } = K(), { disabled: x } = I(
1176
1251
  t,
1177
- _
1178
- ), y = d ?? m, p = O(
1252
+ h
1253
+ ), y = d ?? x, b = S(
1179
1254
  t,
1180
1255
  s,
1181
- o && o.length > 0 ? o : null
1182
- ), b = p && p.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Pn.slotStack, children: p.map((j, N) => /* @__PURE__ */ c.jsx(T, { children: j }, `card-body-${l}-${N}`)) }) : null, C = R(async () => {
1183
- var j, N, w;
1256
+ c && c.length > 0 ? c : null
1257
+ ), p = b && b.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: os.slotStack, children: b.map((j, w) => /* @__PURE__ */ o.jsx(T, { children: j }, `card-body-${i}-${w}`)) }) : null, C = L(async () => {
1258
+ var j, w, v;
1184
1259
  if (!(!a || y))
1185
1260
  try {
1186
- const k = {
1187
- ...(j = v.getState()[t]) == null ? void 0 : j.entries,
1188
- [i]: { status: 200 }
1261
+ const O = {
1262
+ ...(j = N.getState()[t]) == null ? void 0 : j.entries,
1263
+ [l]: { status: 200 }
1189
1264
  };
1190
- switch (q(t, k), a) {
1265
+ switch ($(t, O), a) {
1191
1266
  case "CLOSE_MODAL":
1192
- ce(t, !1);
1267
+ ue(t, !1);
1193
1268
  break;
1194
1269
  case "CLOSE_DRAWER":
1195
- W(t, !1);
1270
+ J(t, !1);
1196
1271
  break;
1197
1272
  case "OPEN_DRAWER":
1198
- W(t, !0);
1273
+ J(t, !0);
1199
1274
  break;
1200
1275
  case "GO_TO_NEXT_UI":
1201
1276
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
1202
- const E = await f(
1277
+ const q = await f(
1203
1278
  t,
1204
1279
  s,
1205
- k,
1206
- i,
1280
+ O,
1281
+ l,
1207
1282
  a === "GO_TO_NEXT_UI"
1208
1283
  );
1209
- E != null && E.data && $(t, E == null ? void 0 : E.data);
1284
+ q != null && q.data && D(t, q == null ? void 0 : q.data);
1210
1285
  break;
1211
1286
  }
1212
1287
  case "FETCH_AND_GO_TO_NEXT_UI": {
1213
- const S = await x(
1288
+ const A = await g(
1214
1289
  t,
1215
1290
  s,
1216
- k,
1217
- i,
1218
- u
1291
+ O,
1292
+ l,
1293
+ _
1219
1294
  );
1220
- S != null && S.data && $(t, S == null ? void 0 : S.data);
1295
+ A != null && A.data && D(t, A == null ? void 0 : A.data);
1221
1296
  break;
1222
1297
  }
1223
1298
  case "GET_DATA_SOURCE": {
1224
- const S = await f(
1299
+ const A = await f(
1225
1300
  t,
1226
1301
  s,
1227
- k,
1228
- i
1229
- ), E = (N = S == null ? void 0 : S.data) == null ? void 0 : N.content;
1230
- if ((E == null ? void 0 : E.type) !== "fetch")
1302
+ O,
1303
+ l
1304
+ ), q = (w = A == null ? void 0 : A.data) == null ? void 0 : w.content;
1305
+ if ((q == null ? void 0 : q.type) !== "fetch")
1231
1306
  break;
1232
- const G = E == null ? void 0 : E.dataSource, M = await g(G, t, !1), H = {
1233
- ...(w = v.getState()[t]) == null ? void 0 : w.entries,
1234
- [i]: {
1235
- status: M == null ? void 0 : M.status,
1236
- content: M == null ? void 0 : M.data
1307
+ const W = q == null ? void 0 : q.dataSource, V = await m(W, t, !1), k = {
1308
+ ...(v = N.getState()[t]) == null ? void 0 : v.entries,
1309
+ [l]: {
1310
+ status: V == null ? void 0 : V.status,
1311
+ content: V == null ? void 0 : V.data
1237
1312
  }
1238
1313
  };
1239
- q(t, H);
1240
- const D = await f(
1314
+ $(t, k);
1315
+ const B = await f(
1241
1316
  t,
1242
1317
  s,
1243
- H,
1244
- i
1318
+ k,
1319
+ l
1245
1320
  );
1246
- D != null && D.data && $(t, D == null ? void 0 : D.data);
1321
+ B != null && B.data && D(t, B == null ? void 0 : B.data);
1247
1322
  break;
1248
1323
  }
1249
1324
  case "REDIRECT":
1250
- h && (window.location.href = h);
1325
+ u && (window.location.href = u);
1251
1326
  break;
1252
1327
  default:
1253
1328
  console.warn(`Unhandled card actionType: ${a}`);
1254
1329
  }
1255
- } catch (k) {
1256
- alert(JSON.stringify(k));
1330
+ } catch (O) {
1331
+ alert(JSON.stringify(O));
1257
1332
  }
1258
1333
  }, [
1259
1334
  a,
1260
- u,
1335
+ _,
1261
1336
  y,
1262
- x,
1263
1337
  g,
1338
+ m,
1264
1339
  f,
1265
1340
  s,
1266
- h,
1267
- i,
1341
+ u,
1342
+ l,
1268
1343
  t
1269
1344
  ]);
1270
- return /* @__PURE__ */ c.jsx(
1271
- mt,
1345
+ return /* @__PURE__ */ o.jsx(
1346
+ Nt,
1272
1347
  {
1273
1348
  colorId: n,
1274
1349
  disabled: y,
1275
1350
  onClick: a && !y ? () => void C() : void 0,
1276
- children: b
1351
+ children: p
1277
1352
  }
1278
1353
  );
1279
- }, ts = (e) => {
1280
- const { content: t, description: s, ...r } = e, l = {
1354
+ }, is = (e) => {
1355
+ const { content: t, description: s, ...r } = e, i = {
1281
1356
  ...r,
1282
1357
  children: t ?? s
1283
1358
  };
1284
- return /* @__PURE__ */ c.jsx(pe, { ...l });
1285
- }, ns = (e, t, s) => {
1286
- const { url: r, paginationKeys: l, params: i } = e, o = [], n = (l == null ? void 0 : l.page) ?? "page";
1287
- if (o.push(`${n}=${t}`), typeof s == "string") {
1288
- const u = (l == null ? void 0 : l.text) ?? "text";
1289
- o.push(`${u}=${encodeURIComponent(s || "")}`);
1290
- }
1291
- if (i && typeof i == "object") {
1292
- const u = Object.entries(i).map(
1293
- ([h, _]) => `${encodeURIComponent(h)}=${encodeURIComponent(_)}`
1294
- );
1295
- o.push(...u);
1296
- }
1297
- const d = o.join("&");
1298
- return d ? `${r}?${d}` : r;
1299
- }, Ce = (e, t, s, r) => {
1300
- const { type: l, url: i, method: o, headers: n } = e;
1301
- if (l === "rest") {
1302
- const d = ns(e, t, s), u = { ...(e == null ? void 0 : e.data) ?? {}, ...r ?? {} };
1303
- return {
1304
- type: "rest",
1305
- url: d,
1306
- method: o,
1307
- headers: n,
1308
- data: u
1309
- };
1310
- } else
1311
- return {
1312
- type: "graphql",
1313
- url: i,
1314
- method: "post",
1315
- headers: n,
1316
- query: e == null ? void 0 : e.query,
1317
- variables: {
1318
- ...(e == null ? void 0 : e.variables) || {},
1319
- ...typeof s == "string" ? { text: s } : {},
1320
- page: t
1321
- }
1322
- };
1323
- }, fe = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ss = (e, t) => {
1359
+ return /* @__PURE__ */ o.jsx(ie, { ...i });
1360
+ }, pe = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ls = (e, t) => {
1324
1361
  if (!t || e == null)
1325
1362
  return null;
1326
- const { extractionJsonPath: s, injectionJsonPath: r } = t, l = B.value(e, s);
1327
- if (l == null)
1363
+ const { extractionJsonPath: s, injectionJsonPath: r } = t, i = G.value(e, s);
1364
+ if (i == null)
1328
1365
  return null;
1329
1366
  try {
1330
- const i = {};
1331
- return B.value(i, r, l), i;
1332
- } catch (i) {
1367
+ const l = {};
1368
+ return G.value(l, r, i), l;
1369
+ } catch (l) {
1333
1370
  return console.warn(
1334
1371
  "[buildCursorPayload] invalid injectionJsonPath:",
1335
1372
  r,
1336
- i
1373
+ l
1337
1374
  ), null;
1338
1375
  }
1339
- }, Fe = (e, t, s, r) => {
1340
- const l = B.query(e, t), i = l == null ? void 0 : l.map((a) => {
1341
- var u, h;
1376
+ }, ot = (e, t, s, r) => {
1377
+ const i = G.query(e, t), l = i == null ? void 0 : i.map((a) => {
1378
+ var _, u;
1342
1379
  if (s) {
1343
- const _ = {};
1344
- for (const [f, g] of Object.entries(s))
1345
- if (typeof g == "object" && "path" in g) {
1346
- const x = g, m = (u = B.query(a, x.path)) == null ? void 0 : u[0];
1347
- x.translations && String(m) in x.translations ? _[f] = fe(
1348
- x.translations[String(m)]
1349
- ) : _[f] = fe(m);
1380
+ const h = {};
1381
+ for (const [f, m] of Object.entries(s))
1382
+ if (typeof m == "object" && "path" in m) {
1383
+ const g = m, x = (_ = G.query(a, g.path)) == null ? void 0 : _[0];
1384
+ g.translations && String(x) in g.translations ? h[f] = pe(
1385
+ g.translations[String(x)]
1386
+ ) : h[f] = pe(x);
1350
1387
  } else {
1351
- const x = g;
1352
- _[f] = fe((h = B.query(a, x)) == null ? void 0 : h[0]);
1388
+ const g = m;
1389
+ h[f] = pe((u = G.query(a, g)) == null ? void 0 : u[0]);
1353
1390
  }
1354
- return _;
1391
+ return h;
1355
1392
  } else
1356
1393
  return a;
1357
- }), o = B.value(e, (r == null ? void 0 : r.size) ?? "$.meta.size") ?? l.length, n = B.value(e, (r == null ? void 0 : r.total) ?? "$.meta.total") ?? 0, d = {
1358
- size: o,
1394
+ }), c = G.value(e, (r == null ? void 0 : r.size) ?? "$.meta.size") ?? i.length, n = G.value(e, (r == null ? void 0 : r.total) ?? "$.meta.total") ?? 0, d = {
1395
+ size: c,
1359
1396
  total: n,
1360
- totalPages: r != null && r.totalPages ? B.value(
1397
+ totalPages: r != null && r.totalPages ? G.value(
1361
1398
  e,
1362
1399
  (r == null ? void 0 : r.totalPages) ?? "$.meta.totalPages"
1363
- ) : o > 0 ? Math.ceil(n / o) : 0
1400
+ ) : c > 0 ? Math.ceil(n / c) : 0
1364
1401
  };
1365
- return { items: i, pagination: d };
1366
- }, Ne = ({
1402
+ return { items: l, pagination: d };
1403
+ }, Ee = ({
1367
1404
  width: e,
1368
1405
  data: t,
1369
1406
  Chart: s,
1370
1407
  children: r
1371
- }) => e ? /* @__PURE__ */ c.jsx(s, { width: e, height: oe, data: t, children: r }) : /* @__PURE__ */ c.jsx(Je, { width: "100%", height: oe, children: /* @__PURE__ */ c.jsx(s, { data: t, children: r }) }), ie = ({ withPadding: e = !1 }) => {
1372
- const t = (s) => /* @__PURE__ */ c.jsx("span", { style: { color: U.labelColor }, children: s });
1373
- return /* @__PURE__ */ c.jsx(
1374
- Gt,
1408
+ }) => e ? /* @__PURE__ */ o.jsx(s, { width: e, height: de, data: t, children: r }) : /* @__PURE__ */ o.jsx(et, { width: "100%", height: de, children: /* @__PURE__ */ o.jsx(s, { data: t, children: r }) }), he = ({ withPadding: e = !1 }) => {
1409
+ const t = (s) => /* @__PURE__ */ o.jsx("span", { style: { color: M.labelColor }, children: s });
1410
+ return /* @__PURE__ */ o.jsx(
1411
+ Xt,
1375
1412
  {
1376
1413
  formatter: t,
1377
1414
  wrapperStyle: {
1378
- fontSize: U.fontSize,
1379
- fontFamily: U.fontFamily,
1415
+ fontSize: M.fontSize,
1416
+ fontFamily: M.fontFamily,
1380
1417
  padding: e ? "1rem 0" : "0"
1381
1418
  }
1382
1419
  }
1383
1420
  );
1384
- }, as = ({
1421
+ }, ds = ({
1385
1422
  active: e,
1386
1423
  payload: t,
1387
1424
  label: s,
1388
1425
  tooltipKey: r
1389
1426
  }) => {
1390
- var i;
1427
+ var l;
1391
1428
  if (!e || !t || !t.length)
1392
1429
  return null;
1393
- const l = {
1394
- backgroundColor: U.tooltipBg,
1395
- borderRadius: U.tooltipBorderRadius,
1396
- color: U.tooltipColor,
1430
+ const i = {
1431
+ backgroundColor: M.tooltipBg,
1432
+ borderRadius: M.tooltipBorderRadius,
1433
+ color: M.tooltipColor,
1397
1434
  padding: "8px 12px",
1398
1435
  border: "1px solid #e5e7eb"
1399
1436
  };
1400
1437
  if (r) {
1401
- const o = (i = t[0]) == null ? void 0 : i.payload;
1402
- if (o && o[r] !== void 0 && o[r] !== null)
1403
- return /* @__PURE__ */ c.jsx("div", { style: l, children: /* @__PURE__ */ c.jsx("p", { style: { margin: 0 }, children: o[r] }) });
1438
+ const c = (l = t[0]) == null ? void 0 : l.payload;
1439
+ if (c && c[r] !== void 0 && c[r] !== null)
1440
+ return /* @__PURE__ */ o.jsx("div", { style: i, children: /* @__PURE__ */ o.jsx("p", { style: { margin: 0 }, children: c[r] }) });
1404
1441
  }
1405
- return /* @__PURE__ */ c.jsxs("div", { style: l, children: [
1406
- /* @__PURE__ */ c.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1407
- t.map((o, n) => /* @__PURE__ */ c.jsx("p", { style: { margin: "2px 0", color: o.color }, children: `${o.name}: ${o.value}` }, n))
1442
+ return /* @__PURE__ */ o.jsxs("div", { style: i, children: [
1443
+ /* @__PURE__ */ o.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1444
+ t.map((c, n) => /* @__PURE__ */ o.jsx("p", { style: { margin: "2px 0", color: c.color }, children: `${c.name}: ${c.value}` }, n))
1408
1445
  ] });
1409
- }, le = ({ tooltipKey: e } = {}) => /* @__PURE__ */ c.jsx(
1410
- Mt,
1446
+ }, fe = ({ tooltipKey: e } = {}) => /* @__PURE__ */ o.jsx(
1447
+ Jt,
1411
1448
  {
1412
- content: /* @__PURE__ */ c.jsx(as, { tooltipKey: e })
1449
+ content: /* @__PURE__ */ o.jsx(ds, { tooltipKey: e })
1413
1450
  }
1414
- ), ve = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ c.jsx(
1415
- Ut,
1451
+ ), Te = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ o.jsx(
1452
+ Wt,
1416
1453
  {
1417
1454
  dataKey: e,
1418
1455
  hide: t,
1419
1456
  tick: {
1420
- fill: U.labelColor,
1421
- fontSize: U.fontSize
1457
+ fill: M.labelColor,
1458
+ fontSize: M.fontSize
1422
1459
  }
1423
1460
  }
1424
- ), Se = () => /* @__PURE__ */ c.jsx(
1425
- Vt,
1461
+ ), Oe = () => /* @__PURE__ */ o.jsx(
1462
+ Qt,
1426
1463
  {
1427
1464
  tick: {
1428
- fill: U.labelColor,
1429
- fontSize: U.fontSize
1465
+ fill: M.labelColor,
1466
+ fontSize: M.fontSize
1430
1467
  }
1431
1468
  }
1432
- ), rs = (e) => {
1433
- const { data: t, xKey: s, yKeys: r, tooltipKey: l, width: i } = e;
1434
- return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: zt, children: [
1435
- /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1436
- /* @__PURE__ */ c.jsx(ve, { dataKey: s }),
1437
- /* @__PURE__ */ c.jsx(Se, {}),
1438
- /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1439
- /* @__PURE__ */ c.jsx(ie, {}),
1440
- r.map((o, n) => /* @__PURE__ */ c.jsx(
1441
- Ht,
1469
+ ), _s = (e) => {
1470
+ const { data: t, xKey: s, yKeys: r, tooltipKey: i, width: l } = e;
1471
+ return /* @__PURE__ */ o.jsxs(Ee, { width: l, data: t, Chart: Yt, children: [
1472
+ /* @__PURE__ */ o.jsx(Ne, { strokeDasharray: "3 3" }),
1473
+ /* @__PURE__ */ o.jsx(Te, { dataKey: s }),
1474
+ /* @__PURE__ */ o.jsx(Oe, {}),
1475
+ /* @__PURE__ */ o.jsx(fe, { tooltipKey: i }),
1476
+ /* @__PURE__ */ o.jsx(he, {}),
1477
+ r.map((c, n) => /* @__PURE__ */ o.jsx(
1478
+ Zt,
1442
1479
  {
1443
1480
  type: "monotone",
1444
- dataKey: o,
1445
- stroke: z[n % z.length],
1446
- fill: z[n % z.length]
1481
+ dataKey: c,
1482
+ stroke: H[n % H.length],
1483
+ fill: H[n % H.length]
1447
1484
  },
1448
- o
1485
+ c
1449
1486
  ))
1450
1487
  ] });
1451
- }, os = (e) => {
1452
- const { data: t, yKeys: s, xKey: r, tooltipKey: l, width: i } = e;
1453
- return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: Xt, children: [
1454
- /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1455
- /* @__PURE__ */ c.jsx(ve, { dataKey: r }),
1456
- /* @__PURE__ */ c.jsx(Se, {}),
1457
- /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1458
- /* @__PURE__ */ c.jsx(ie, {}),
1459
- s.map((o, n) => /* @__PURE__ */ c.jsx(
1460
- Jt,
1488
+ }, us = (e) => {
1489
+ const { data: t, yKeys: s, xKey: r, tooltipKey: i, width: l } = e;
1490
+ return /* @__PURE__ */ o.jsxs(Ee, { width: l, data: t, Chart: Ft, children: [
1491
+ /* @__PURE__ */ o.jsx(Ne, { strokeDasharray: "3 3" }),
1492
+ /* @__PURE__ */ o.jsx(Te, { dataKey: r }),
1493
+ /* @__PURE__ */ o.jsx(Oe, {}),
1494
+ /* @__PURE__ */ o.jsx(fe, { tooltipKey: i }),
1495
+ /* @__PURE__ */ o.jsx(he, {}),
1496
+ s.map((c, n) => /* @__PURE__ */ o.jsx(
1497
+ Pt,
1461
1498
  {
1462
- dataKey: o,
1463
- fill: z[n % z.length]
1499
+ dataKey: c,
1500
+ fill: H[n % H.length]
1464
1501
  },
1465
- o
1502
+ c
1466
1503
  ))
1467
1504
  ] });
1468
- }, cs = (e) => {
1469
- const { data: t, xKey: s, yKeys: r, tooltipKey: l, width: i } = e;
1470
- return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: Wt, children: [
1471
- /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1472
- /* @__PURE__ */ c.jsx(ve, { dataKey: s }),
1473
- /* @__PURE__ */ c.jsx(Se, {}),
1474
- /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1475
- /* @__PURE__ */ c.jsx(ie, {}),
1476
- r.map((o, n) => /* @__PURE__ */ c.jsx(
1477
- Qt,
1505
+ }, hs = (e) => {
1506
+ const { data: t, xKey: s, yKeys: r, tooltipKey: i, width: l } = e;
1507
+ return /* @__PURE__ */ o.jsxs(Ee, { width: l, data: t, Chart: en, children: [
1508
+ /* @__PURE__ */ o.jsx(Ne, { strokeDasharray: "3 3" }),
1509
+ /* @__PURE__ */ o.jsx(Te, { dataKey: s }),
1510
+ /* @__PURE__ */ o.jsx(Oe, {}),
1511
+ /* @__PURE__ */ o.jsx(fe, { tooltipKey: i }),
1512
+ /* @__PURE__ */ o.jsx(he, {}),
1513
+ r.map((c, n) => /* @__PURE__ */ o.jsx(
1514
+ tn,
1478
1515
  {
1479
1516
  type: "monotone",
1480
- dataKey: o,
1481
- stroke: z[n % z.length],
1517
+ dataKey: c,
1518
+ stroke: H[n % H.length],
1482
1519
  strokeWidth: 2,
1483
1520
  dot: !1
1484
1521
  },
1485
- o
1522
+ c
1486
1523
  ))
1487
1524
  ] });
1488
- }, is = (e) => {
1489
- const { data: t, xKey: s, yKeys: r, tooltipKey: l } = e, i = ({
1490
- cx: o,
1525
+ }, fs = (e) => {
1526
+ const { data: t, xKey: s, yKeys: r, tooltipKey: i } = e, l = ({
1527
+ cx: c,
1491
1528
  cy: n,
1492
1529
  midAngle: d,
1493
1530
  innerRadius: a,
1494
- outerRadius: u,
1495
- value: h
1531
+ outerRadius: _,
1532
+ value: u
1496
1533
  }) => {
1497
- const _ = Math.PI / 180, f = 25 + a + (u - a), g = o + f * Math.cos(-(d ?? 0) * _), x = n + f * Math.sin(-(d ?? 0) * _);
1498
- return /* @__PURE__ */ c.jsx(
1534
+ const h = Math.PI / 180, f = 25 + a + (_ - a), m = c + f * Math.cos(-(d ?? 0) * h), g = n + f * Math.sin(-(d ?? 0) * h);
1535
+ return /* @__PURE__ */ o.jsx(
1499
1536
  "text",
1500
1537
  {
1501
- x: g,
1502
- y: x,
1503
- fill: U.labelColor,
1504
- color: U.labelColor,
1538
+ x: m,
1539
+ y: g,
1540
+ fill: M.labelColor,
1541
+ color: M.labelColor,
1505
1542
  textAnchor: "middle",
1506
1543
  dominantBaseline: "central",
1507
- children: h
1544
+ children: u
1508
1545
  }
1509
1546
  );
1510
1547
  };
1511
- return /* @__PURE__ */ c.jsx(Je, { width: "100%", height: oe, children: /* @__PURE__ */ c.jsxs(Yt, { children: [
1512
- /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1513
- /* @__PURE__ */ c.jsx(ie, {}),
1514
- /* @__PURE__ */ c.jsx(
1515
- Zt,
1548
+ return /* @__PURE__ */ o.jsx(et, { width: "100%", height: de, children: /* @__PURE__ */ o.jsxs(nn, { children: [
1549
+ /* @__PURE__ */ o.jsx(fe, { tooltipKey: i }),
1550
+ /* @__PURE__ */ o.jsx(he, {}),
1551
+ /* @__PURE__ */ o.jsx(
1552
+ sn,
1516
1553
  {
1517
1554
  data: t,
1518
1555
  dataKey: r[0],
1519
1556
  nameKey: s,
1520
- label: i,
1557
+ label: l,
1521
1558
  outerRadius: 120,
1522
- children: t.map((o, n) => /* @__PURE__ */ c.jsx(
1523
- Ft,
1559
+ children: t.map((c, n) => /* @__PURE__ */ o.jsx(
1560
+ an,
1524
1561
  {
1525
- fill: z[n % z.length]
1562
+ fill: H[n % H.length]
1526
1563
  },
1527
1564
  `cell-${n}`
1528
1565
  ))
1529
1566
  }
1530
1567
  )
1531
1568
  ] }) });
1532
- }, oe = 400, Pe = 56, ls = /* @__PURE__ */ new Set(["bar", "line", "area"]), ds = {
1533
- area: rs,
1534
- bar: os,
1535
- line: cs,
1536
- pie: is
1537
- }, z = [
1569
+ }, de = 400, ct = 56, ys = /* @__PURE__ */ new Set(["bar", "line", "area"]), ms = {
1570
+ area: _s,
1571
+ bar: us,
1572
+ line: hs,
1573
+ pie: fs
1574
+ }, H = [
1538
1575
  "var(--color-primitive-palette-1-50)",
1539
1576
  "var(--color-primitive-palette-2-50)",
1540
1577
  "var(--color-primitive-palette-3-50)",
@@ -1552,7 +1589,7 @@ const Qn = (e) => {
1552
1589
  "var(--color-primitive-palette-15-50)",
1553
1590
  "var(--color-primitive-palette-16-50)",
1554
1591
  "var(--color-primitive-palette-17-50)"
1555
- ], U = {
1592
+ ], M = {
1556
1593
  fontFamily: "Roboto, sans-serif",
1557
1594
  fontSize: 12,
1558
1595
  labelColor: "var(--color-neutral-90)",
@@ -1560,340 +1597,340 @@ const Qn = (e) => {
1560
1597
  tooltipColor: "#000",
1561
1598
  tooltipBorderRadius: "4px"
1562
1599
  };
1563
- function _s(e, t, s = Pe) {
1600
+ function xs(e, t, s = ct) {
1564
1601
  return e <= 0 ? 0 : t <= 0 ? e : Math.max(e, t * s);
1565
1602
  }
1566
- const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5hx_29", Be = {
1567
- chartScrollViewport: us,
1568
- chartScrollViewport_track: hs
1569
- }, fs = "Scrollable chart area", ys = ({
1603
+ const gs = "_chartScrollViewport_sm5hx_1", bs = "_chartScrollViewport_track_sm5hx_29", ze = {
1604
+ chartScrollViewport: gs,
1605
+ chartScrollViewport_track: bs
1606
+ }, ps = "Scrollable chart area", js = ({
1570
1607
  dataLength: e,
1571
1608
  minCategoryWidth: t,
1572
1609
  children: s
1573
1610
  }) => {
1574
- const r = ge(null), [l, i] = L(0), o = t ?? Pe;
1575
- V(() => {
1576
- const u = r.current;
1577
- if (!u)
1611
+ const r = _e(null), [i, l] = R(0), c = t ?? ct;
1612
+ U(() => {
1613
+ const _ = r.current;
1614
+ if (!_)
1578
1615
  return;
1579
- const h = () => {
1580
- i(u.clientWidth);
1616
+ const u = () => {
1617
+ l(_.clientWidth);
1581
1618
  };
1582
- h();
1583
- const _ = new ResizeObserver(h);
1584
- return _.observe(u), () => _.disconnect();
1619
+ u();
1620
+ const h = new ResizeObserver(u);
1621
+ return h.observe(_), () => h.disconnect();
1585
1622
  }, []);
1586
- const n = _s(
1587
- l,
1623
+ const n = xs(
1624
+ i,
1588
1625
  e,
1589
- o
1590
- ), d = l > 0 && n > l, a = R(
1591
- (u) => {
1592
- const h = r.current;
1593
- if (h)
1594
- switch (u.key) {
1626
+ c
1627
+ ), d = i > 0 && n > i, a = L(
1628
+ (_) => {
1629
+ const u = r.current;
1630
+ if (u)
1631
+ switch (_.key) {
1595
1632
  case "ArrowLeft":
1596
- h.scrollLeft -= o, u.preventDefault();
1633
+ u.scrollLeft -= c, _.preventDefault();
1597
1634
  break;
1598
1635
  case "ArrowRight":
1599
- h.scrollLeft += o, u.preventDefault();
1636
+ u.scrollLeft += c, _.preventDefault();
1600
1637
  break;
1601
1638
  case "Home":
1602
- h.scrollLeft = 0, u.preventDefault();
1639
+ u.scrollLeft = 0, _.preventDefault();
1603
1640
  break;
1604
1641
  case "End":
1605
- h.scrollLeft = h.scrollWidth - h.clientWidth, u.preventDefault();
1642
+ u.scrollLeft = u.scrollWidth - u.clientWidth, _.preventDefault();
1606
1643
  break;
1607
1644
  }
1608
1645
  },
1609
- [o]
1646
+ [c]
1610
1647
  );
1611
- return /* @__PURE__ */ c.jsx(
1648
+ return /* @__PURE__ */ o.jsx(
1612
1649
  "div",
1613
1650
  {
1614
1651
  ref: r,
1615
- className: Be.chartScrollViewport,
1652
+ className: ze.chartScrollViewport,
1616
1653
  role: d ? "region" : void 0,
1617
1654
  tabIndex: d ? 0 : void 0,
1618
- "aria-label": d ? fs : void 0,
1655
+ "aria-label": d ? ps : void 0,
1619
1656
  onKeyDown: d ? a : void 0,
1620
- children: /* @__PURE__ */ c.jsx(
1657
+ children: /* @__PURE__ */ o.jsx(
1621
1658
  "div",
1622
1659
  {
1623
- className: Be.chartScrollViewport_track,
1624
- style: { width: n, height: oe },
1625
- children: l > 0 ? s(n) : null
1660
+ className: ze.chartScrollViewport_track,
1661
+ style: { width: n, height: de },
1662
+ children: i > 0 ? s(n) : null
1626
1663
  }
1627
1664
  )
1628
1665
  }
1629
1666
  );
1630
- }, ms = (e) => {
1631
- const { component: t, userFlow: s, hash: r, responseKey: l, dataSource: i, ...o } = e, n = ds[o.type], { fetchDataSource: d } = K(), [a, u] = L(!1), [h, _] = L([]), f = async () => {
1632
- var m, y;
1667
+ }, Cs = (e) => {
1668
+ const { component: t, userFlow: s, hash: r, responseKey: i, dataSource: l, ...c } = e, n = ms[c.type], { fetchDataSource: d } = K(), [a, _] = R(!1), [u, h] = R([]), f = async () => {
1669
+ var x, y;
1633
1670
  try {
1634
- u(!0);
1635
- const { jsonPathData: p, mapperData: b } = i, C = Ce(
1636
- i,
1671
+ _(!0);
1672
+ const { jsonPathData: b, mapperData: p } = l, C = Se(
1673
+ l,
1637
1674
  1
1638
1675
  ), j = await d(
1639
1676
  C,
1640
1677
  s,
1641
1678
  !1
1642
- ), N = p ? (m = Fe(j == null ? void 0 : j.data, p, b)) == null ? void 0 : m.items : (y = j == null ? void 0 : j.data) == null ? void 0 : y.data;
1643
- _(N), u(!1);
1644
- } catch (p) {
1645
- alert(JSON.stringify(p)), u(!1);
1679
+ ), w = b ? (x = ot(j == null ? void 0 : j.data, b, p)) == null ? void 0 : x.items : (y = j == null ? void 0 : j.data) == null ? void 0 : y.data;
1680
+ h(w), _(!1);
1681
+ } catch (b) {
1682
+ alert(JSON.stringify(b)), _(!1);
1646
1683
  }
1647
1684
  };
1648
- if (V(() => {
1649
- n && (i ? f() : _(o.data));
1685
+ if (U(() => {
1686
+ n && (l ? f() : h(c.data));
1650
1687
  }, []), !n)
1651
- return /* @__PURE__ */ c.jsx("div", { children: "Not supported chart type" });
1652
- const g = {
1653
- ...o,
1654
- data: h
1688
+ return /* @__PURE__ */ o.jsx("div", { children: "Not supported chart type" });
1689
+ const m = {
1690
+ ...c,
1691
+ data: u
1655
1692
  };
1656
- return a ? /* @__PURE__ */ c.jsx(He, { height: 400 }) : h.length === 0 ? /* @__PURE__ */ c.jsx(pe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : ls.has(o.type) ? /* @__PURE__ */ c.jsx(
1657
- ys,
1693
+ return a ? /* @__PURE__ */ o.jsx(Fe, { height: 400 }) : u.length === 0 ? /* @__PURE__ */ o.jsx(ie, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : ys.has(c.type) ? /* @__PURE__ */ o.jsx(
1694
+ js,
1658
1695
  {
1659
- dataLength: h.length,
1660
- minCategoryWidth: o.minCategoryWidth,
1661
- children: (m) => /* @__PURE__ */ c.jsx(n, { ...g, width: m })
1696
+ dataLength: u.length,
1697
+ minCategoryWidth: c.minCategoryWidth,
1698
+ children: (x) => /* @__PURE__ */ o.jsx(n, { ...m, width: x })
1662
1699
  }
1663
- ) : /* @__PURE__ */ c.jsx(n, { ...g });
1664
- }, xs = (e) => {
1700
+ ) : /* @__PURE__ */ o.jsx(n, { ...m });
1701
+ }, ws = (e) => {
1665
1702
  const {
1666
1703
  userFlow: t,
1667
1704
  pageId: s,
1668
1705
  responseKey: r,
1669
- actionType: l,
1670
- label: i,
1671
- value: o,
1706
+ actionType: i,
1707
+ label: l,
1708
+ value: c,
1672
1709
  required: n,
1673
1710
  dependencies: d,
1674
1711
  ...a
1675
- } = e, u = {
1712
+ } = e, _ = {
1676
1713
  ...a
1677
- }, { getNextUI: h } = K(), [_, f] = L(o || !1), { disabled: g } = I(
1714
+ }, { getNextUI: u } = K(), [h, f] = R(c || !1), { disabled: m } = I(
1678
1715
  t,
1679
1716
  d
1680
- ), x = A(() => n && i ? `${i} *` : i ?? "", [i, n]), m = R(async () => {
1681
- var p;
1717
+ ), g = E(() => n && l ? `${l} *` : l ?? "", [l, n]), x = L(async () => {
1718
+ var b;
1682
1719
  try {
1683
- const b = !_;
1684
- f(b);
1720
+ const p = !h;
1721
+ f(p);
1685
1722
  const C = {
1686
- ...(p = v.getState()[t]) == null ? void 0 : p.entries,
1687
- [r]: b
1723
+ ...(b = N.getState()[t]) == null ? void 0 : b.entries,
1724
+ [r]: p
1688
1725
  };
1689
- switch (q(t, C), l) {
1726
+ switch ($(t, C), i) {
1690
1727
  case "GO_TO_NEXT_UI":
1691
1728
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
1692
- const N = await h(
1729
+ const w = await u(
1693
1730
  t,
1694
1731
  s,
1695
1732
  C,
1696
1733
  r,
1697
- l === "GO_TO_NEXT_UI"
1734
+ i === "GO_TO_NEXT_UI"
1698
1735
  );
1699
- N != null && N.data && $(t, N == null ? void 0 : N.data);
1736
+ w != null && w.data && D(t, w == null ? void 0 : w.data);
1700
1737
  break;
1701
1738
  }
1702
1739
  default:
1703
1740
  break;
1704
1741
  }
1705
- } catch (b) {
1706
- console.error("Error in checkbox action:", b), alert(JSON.stringify(b));
1742
+ } catch (p) {
1743
+ console.error("Error in checkbox action:", p), alert(JSON.stringify(p));
1707
1744
  }
1708
- }, [t, s, r, l, _]), y = (u == null ? void 0 : u.disabled) ?? g;
1709
- return /* @__PURE__ */ c.jsx(
1710
- xt,
1745
+ }, [t, s, r, i, h]), y = (_ == null ? void 0 : _.disabled) ?? m;
1746
+ return /* @__PURE__ */ o.jsx(
1747
+ vt,
1711
1748
  {
1712
- ...u,
1713
- labelRight: x,
1714
- checked: _,
1749
+ ..._,
1750
+ labelRight: g,
1751
+ checked: h,
1715
1752
  disabled: y,
1716
1753
  onChange: () => {
1717
- !y && m();
1754
+ !y && x();
1718
1755
  }
1719
1756
  }
1720
1757
  );
1721
- }, gs = "_codeEditor_1wi2p_1", ps = "_codeEditor_label_1wi2p_4", bs = "_codeEditor_wrapper_1wi2p_13", js = "_input_1wi2p_17", ws = "_preview_1wi2p_18", Cs = "_preview_inner_1wi2p_33", Z = {
1722
- codeEditor: gs,
1723
- codeEditor_label: ps,
1724
- codeEditor_wrapper: bs,
1725
- input: js,
1726
- preview: ws,
1727
- preview_inner: Cs
1728
- }, Ns = (e) => {
1758
+ }, Ns = "_codeEditor_1wi2p_1", vs = "_codeEditor_label_1wi2p_4", Ss = "_codeEditor_wrapper_1wi2p_13", ks = "_input_1wi2p_17", Es = "_preview_1wi2p_18", Ts = "_preview_inner_1wi2p_33", F = {
1759
+ codeEditor: Ns,
1760
+ codeEditor_label: vs,
1761
+ codeEditor_wrapper: Ss,
1762
+ input: ks,
1763
+ preview: Es,
1764
+ preview_inner: Ts
1765
+ }, Os = (e) => {
1729
1766
  const {
1730
1767
  userFlow: t,
1731
1768
  responseKey: s,
1732
1769
  label: r,
1733
- language: l,
1734
- placeholder: i,
1735
- value: o,
1770
+ language: i,
1771
+ placeholder: l,
1772
+ value: c,
1736
1773
  required: n,
1737
1774
  dependencies: d,
1738
1775
  disabled: a,
1739
- showPreview: u,
1740
- height: h = "400px"
1741
- } = e, [_, f] = L(o ?? ""), g = ne.useThemeStore((C) => C.theme.mode), { disabled: x } = I(
1776
+ showPreview: _,
1777
+ height: u = "400px"
1778
+ } = e, [h, f] = R(c ?? ""), m = re.useThemeStore((C) => C.theme.mode), { disabled: g } = I(
1742
1779
  t,
1743
1780
  d
1744
- ), m = a ?? x, y = {
1745
- json: ke(),
1746
- markdown: en(),
1747
- sql: tn(),
1748
- yaml: nn()
1749
- }, p = A(() => n && r ? `${r} *` : r ?? "", [r, n]), b = (C) => {
1781
+ ), x = a ?? g, y = {
1782
+ json: Re(),
1783
+ markdown: on(),
1784
+ sql: cn(),
1785
+ yaml: ln()
1786
+ }, b = E(() => n && r ? `${r} *` : r ?? "", [r, n]), p = (C) => {
1750
1787
  f(C);
1751
1788
  const j = {
1752
1789
  [s]: C
1753
1790
  };
1754
- q(t, j);
1791
+ $(t, j);
1755
1792
  };
1756
- return /* @__PURE__ */ c.jsxs("div", { className: Z.codeEditor, children: [
1757
- p && p !== "" && /* @__PURE__ */ c.jsx("label", { className: Z.codeEditor_label, children: p }),
1758
- /* @__PURE__ */ c.jsxs("div", { className: Z.codeEditor_wrapper, children: [
1759
- /* @__PURE__ */ c.jsx(
1760
- Pt,
1793
+ return /* @__PURE__ */ o.jsxs("div", { className: F.codeEditor, children: [
1794
+ b && b !== "" && /* @__PURE__ */ o.jsx("label", { className: F.codeEditor_label, children: b }),
1795
+ /* @__PURE__ */ o.jsxs("div", { className: F.codeEditor_wrapper, children: [
1796
+ /* @__PURE__ */ o.jsx(
1797
+ rn,
1761
1798
  {
1762
- className: Z.input,
1763
- value: _,
1764
- height: h,
1765
- placeholder: i,
1766
- extensions: [y[l] ?? ke()],
1767
- onChange: (C) => b(C),
1768
- theme: g,
1769
- editable: !m
1799
+ className: F.input,
1800
+ value: h,
1801
+ height: u,
1802
+ placeholder: l,
1803
+ extensions: [y[i] ?? Re()],
1804
+ onChange: (C) => p(C),
1805
+ theme: m,
1806
+ editable: !x
1770
1807
  }
1771
1808
  ),
1772
- l === "markdown" && u && /* @__PURE__ */ c.jsx("div", { className: Z.preview, style: { height: h }, children: /* @__PURE__ */ c.jsx(Xe, { className: Z.preview_inner, children: _ }) })
1809
+ i === "markdown" && _ && /* @__PURE__ */ o.jsx("div", { className: F.preview, style: { height: u }, children: /* @__PURE__ */ o.jsx(Pe, { className: F.preview_inner, children: h }) })
1773
1810
  ] })
1774
1811
  ] });
1775
- }, vs = "_slotStack_6n2wy_5", Ke = {
1776
- slotStack: vs
1777
- }, Ss = (e) => {
1812
+ }, As = "_slotStack_6n2wy_5", Xe = {
1813
+ slotStack: As
1814
+ }, $s = (e) => {
1778
1815
  const {
1779
1816
  userFlow: t,
1780
1817
  pageId: s,
1781
1818
  component: r,
1782
- hash: l,
1783
- responseKey: i,
1784
- content: o,
1819
+ hash: i,
1820
+ responseKey: l,
1821
+ content: c,
1785
1822
  topContent: n,
1786
1823
  icon: d,
1787
1824
  headerStatusColor: a,
1788
- ...u
1789
- } = e, h = a ? `palette_${a}_50` : void 0, _ = O(
1825
+ ..._
1826
+ } = e, u = a ? `palette_${a}_50` : void 0, h = S(
1790
1827
  t,
1791
1828
  s,
1792
- o && o.length > 0 ? o : null
1793
- ), f = O(
1829
+ c && c.length > 0 ? c : null
1830
+ ), f = S(
1794
1831
  t,
1795
1832
  s,
1796
1833
  n && n.length > 0 ? n : null
1797
- ), g = _ && _.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ke.slotStack, children: _.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `data-card-body-${l}-${y}`)) }) : void 0, x = f && f.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ke.slotStack, children: f.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `data-card-top-${l}-${y}`)) }) : void 0;
1798
- return /* @__PURE__ */ c.jsx(
1799
- gt,
1834
+ ), m = h && h.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Xe.slotStack, children: h.map((x, y) => /* @__PURE__ */ o.jsx(T, { children: x }, `data-card-body-${i}-${y}`)) }) : void 0, g = f && f.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Xe.slotStack, children: f.map((x, y) => /* @__PURE__ */ o.jsx(T, { children: x }, `data-card-top-${i}-${y}`)) }) : void 0;
1835
+ return /* @__PURE__ */ o.jsx(
1836
+ St,
1800
1837
  {
1801
- ...u,
1838
+ ..._,
1802
1839
  icon: d,
1803
- headerStatusColor: h,
1804
- topContent: x,
1805
- children: g
1840
+ headerStatusColor: u,
1841
+ topContent: g,
1842
+ children: m
1806
1843
  }
1807
1844
  );
1808
- }, ks = "_dividerNotFront_tze3j_1", Es = {
1809
- dividerNotFront: ks
1810
- }, Ts = (e) => /* @__PURE__ */ c.jsx(pt, { ...e, className: Es.dividerNotFront }), Os = "_drawer_13pxo_1", As = "_drawerBody_13pxo_5", $s = "_drawerFooter_13pxo_11", ye = {
1811
- drawer: Os,
1812
- drawerBody: As,
1813
- drawerFooter: $s
1814
- }, qs = ({
1845
+ }, qs = "_dividerNotFront_tze3j_1", Rs = {
1846
+ dividerNotFront: qs
1847
+ }, Ds = (e) => /* @__PURE__ */ o.jsx(kt, { ...e, className: Rs.dividerNotFront }), Ls = "_drawer_13pxo_1", Is = "_drawerBody_13pxo_5", Bs = "_drawerFooter_13pxo_11", je = {
1848
+ drawer: Ls,
1849
+ drawerBody: Is,
1850
+ drawerFooter: Bs
1851
+ }, Gs = ({
1815
1852
  userFlow: e,
1816
1853
  pageId: t,
1817
1854
  responseKey: s,
1818
1855
  header: r,
1819
- body: l,
1820
- footer: i,
1821
- ...o
1856
+ body: i,
1857
+ footer: l,
1858
+ ...c
1822
1859
  }) => {
1823
- const n = v((x) => {
1824
- var m;
1825
- return (m = x[e]) == null ? void 0 : m.isDrawerOpen;
1826
- }), d = v((x) => {
1827
- var m;
1828
- return (m = x[e]) == null ? void 0 : m.isLoading;
1829
- }), a = n && !d, u = {
1830
- ...o,
1860
+ const n = N((g) => {
1861
+ var x;
1862
+ return (x = g[e]) == null ? void 0 : x.isDrawerOpen;
1863
+ }), d = N((g) => {
1864
+ var x;
1865
+ return (x = g[e]) == null ? void 0 : x.isLoading;
1866
+ }), a = n && !d, _ = {
1867
+ ...c,
1831
1868
  isOpen: a,
1832
1869
  children: null
1833
- }, h = R(() => {
1834
- je(e), W(e, !1);
1835
- }, [e]), _ = Array.isArray(r) ? O(e, t, r) : r ? /* @__PURE__ */ c.jsx(ze, { type: "h2", children: r }) : void 0, f = O(e, t, l), g = i ? O(e, t, i) : void 0;
1836
- return /* @__PURE__ */ c.jsx(
1837
- bt,
1870
+ }, u = L(() => {
1871
+ ve(e), J(e, !1);
1872
+ }, [e]), h = Array.isArray(r) ? S(e, t, r) : r ? /* @__PURE__ */ o.jsx(Ze, { type: "h2", children: r }) : void 0, f = S(e, t, i), m = l ? S(e, t, l) : void 0;
1873
+ return /* @__PURE__ */ o.jsx(
1874
+ Et,
1838
1875
  {
1839
- ...u,
1840
- className: ye.drawer,
1876
+ ..._,
1877
+ className: je.drawer,
1841
1878
  isOpen: a,
1842
- onClose: h,
1879
+ onClose: u,
1843
1880
  heightGap: 0,
1844
- title: _ ? /* @__PURE__ */ c.jsx(c.Fragment, { children: Array.isArray(_) ? _.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-header-${m}`)) : _ }) : void 0,
1845
- children: /* @__PURE__ */ c.jsx("section", { className: ye.drawerBody, children: f.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-body-${m}`)) }),
1846
- footer: g ? /* @__PURE__ */ c.jsx("div", { className: ye.drawerFooter, children: g.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-footer-${m}`)) }) : void 0
1881
+ title: h ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Array.isArray(h) ? h.map((g, x) => /* @__PURE__ */ o.jsx(T, { children: g }, `drawer-header-${x}`)) : h }) : void 0,
1882
+ children: /* @__PURE__ */ o.jsx("section", { className: je.drawerBody, children: f.map((g, x) => /* @__PURE__ */ o.jsx(T, { children: g }, `drawer-body-${x}`)) }),
1883
+ footer: m ? /* @__PURE__ */ o.jsx("div", { className: je.drawerFooter, children: m.map((g, x) => /* @__PURE__ */ o.jsx(T, { children: g }, `drawer-footer-${x}`)) }) : void 0
1847
1884
  }
1848
1885
  );
1849
- }, Ds = (e) => {
1886
+ }, Ks = (e) => {
1850
1887
  const {
1851
1888
  userFlow: t,
1852
1889
  pageId: s,
1853
1890
  component: r,
1854
- hash: l,
1855
- responseKey: i,
1856
- content: o,
1891
+ hash: i,
1892
+ responseKey: l,
1893
+ content: c,
1857
1894
  items: n,
1858
1895
  disabled: d,
1859
1896
  variant: a,
1860
- leftIcon: u,
1861
- rightIcon: h
1862
- } = e, _ = we(t, s), f = A(
1863
- () => n.map((g) => ({
1864
- label: g.content ?? g.label ?? "",
1897
+ leftIcon: _,
1898
+ rightIcon: u
1899
+ } = e, h = ke(t, s), f = E(
1900
+ () => n.map((m) => ({
1901
+ label: m.content ?? m.label ?? "",
1865
1902
  onClick: () => {
1866
- _({
1867
- responseKey: g.responseKey,
1868
- actionType: g.actionType,
1869
- dataSource: g.dataSource,
1870
- redirectUrl: g.redirectUrl,
1871
- dependencies: g.dependencies
1903
+ h({
1904
+ responseKey: m.responseKey,
1905
+ actionType: m.actionType,
1906
+ dataSource: m.dataSource,
1907
+ redirectUrl: m.redirectUrl,
1908
+ dependencies: m.dependencies
1872
1909
  });
1873
1910
  }
1874
1911
  })),
1875
- [n, _]
1912
+ [n, h]
1876
1913
  );
1877
- return /* @__PURE__ */ c.jsx(
1878
- jt,
1914
+ return /* @__PURE__ */ o.jsx(
1915
+ Tt,
1879
1916
  {
1880
1917
  disabled: d,
1881
1918
  variant: a,
1882
1919
  items: f,
1883
- children: /* @__PURE__ */ c.jsxs(T, { children: [
1884
- u ? /* @__PURE__ */ c.jsx(
1885
- Ee,
1920
+ children: /* @__PURE__ */ o.jsxs(T, { children: [
1921
+ _ ? /* @__PURE__ */ o.jsx(
1922
+ De,
1886
1923
  {
1887
- name: u,
1924
+ name: _,
1888
1925
  size: "md",
1889
1926
  style: { marginRight: 8, verticalAlign: "middle" }
1890
1927
  }
1891
1928
  ) : null,
1892
- o,
1893
- h ? /* @__PURE__ */ c.jsx(
1894
- Ee,
1929
+ c,
1930
+ u ? /* @__PURE__ */ o.jsx(
1931
+ De,
1895
1932
  {
1896
- name: h,
1933
+ name: u,
1897
1934
  size: "md",
1898
1935
  style: { marginLeft: 8, verticalAlign: "middle" }
1899
1936
  }
@@ -1901,166 +1938,166 @@ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5h
1901
1938
  ] })
1902
1939
  }
1903
1940
  );
1904
- }, Rs = "_header_g1eri_1", Ls = "_header_content_g1eri_5", Ge = {
1905
- header: Rs,
1906
- header_content: Ls
1907
- }, Is = ({ components: e = [] }) => /* @__PURE__ */ c.jsx("section", { className: F(Ge.header, "avocado-dark-theme"), children: /* @__PURE__ */ c.jsx("div", { className: Ge.header_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx(T, { children: t }, s)) }) }), Bs = (e) => {
1941
+ }, Ms = "_header_g1eri_1", Us = "_header_content_g1eri_5", Je = {
1942
+ header: Ms,
1943
+ header_content: Us
1944
+ }, Vs = ({ components: e = [] }) => /* @__PURE__ */ o.jsx("section", { className: P(Je.header, "avocado-dark-theme"), children: /* @__PURE__ */ o.jsx("div", { className: Je.header_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx(T, { children: t }, s)) }) }), Hs = (e) => {
1908
1945
  const {
1909
1946
  userFlow: t,
1910
1947
  pageId: s,
1911
1948
  responseKey: r,
1912
- actionType: l,
1913
- content: i,
1914
- redirectUrl: o,
1949
+ actionType: i,
1950
+ content: l,
1951
+ redirectUrl: c,
1915
1952
  target: n,
1916
1953
  dependencies: d,
1917
1954
  component: a,
1918
- hash: u,
1919
- ...h
1920
- } = e, { getNextUI: _ } = K(), { disabled: f } = I(
1955
+ hash: _,
1956
+ ...u
1957
+ } = e, { getNextUI: h } = K(), { disabled: f } = I(
1921
1958
  t,
1922
1959
  d
1923
- ), g = l && h ? (() => {
1924
- const { href: y, target: p, download: b, ...C } = h;
1960
+ ), m = i && u ? (() => {
1961
+ const { href: y, target: b, download: p, ...C } = u;
1925
1962
  return C;
1926
- })() : h, x = R(async () => {
1963
+ })() : u, g = L(async () => {
1927
1964
  var y;
1928
- if (l)
1965
+ if (i)
1929
1966
  try {
1930
- const p = {
1931
- ...(y = v.getState()[t]) == null ? void 0 : y.entries,
1967
+ const b = {
1968
+ ...(y = N.getState()[t]) == null ? void 0 : y.entries,
1932
1969
  [r]: { status: 200 }
1933
1970
  };
1934
- switch (q(t, p), l) {
1971
+ switch ($(t, b), i) {
1935
1972
  case "GO_TO_NEXT_UI": {
1936
- const b = await _(
1973
+ const p = await h(
1937
1974
  t,
1938
1975
  s,
1939
- p,
1976
+ b,
1940
1977
  r
1941
1978
  );
1942
- b != null && b.data && $(t, b == null ? void 0 : b.data);
1979
+ p != null && p.data && D(t, p == null ? void 0 : p.data);
1943
1980
  break;
1944
1981
  }
1945
1982
  case "REDIRECT":
1946
- if (!o) {
1983
+ if (!c) {
1947
1984
  console.warn("Missing redirectUrl for REDIRECT actionType");
1948
1985
  break;
1949
1986
  }
1950
- n === "_blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.assign(o);
1987
+ n === "_blank" ? window.open(c, "_blank", "noopener,noreferrer") : window.location.assign(c);
1951
1988
  break;
1952
1989
  default:
1953
- console.warn(`Unhandled actionType for link: ${l}`);
1990
+ console.warn(`Unhandled actionType for link: ${i}`);
1954
1991
  break;
1955
1992
  }
1956
- } catch (p) {
1957
- alert(JSON.stringify(p));
1993
+ } catch (b) {
1994
+ alert(JSON.stringify(b));
1958
1995
  }
1959
- }, [l, _, s, o, r, n, t]), m = g.disabled ?? f;
1960
- return /* @__PURE__ */ c.jsx(
1961
- wt,
1996
+ }, [i, h, s, c, r, n, t]), x = m.disabled ?? f;
1997
+ return /* @__PURE__ */ o.jsx(
1998
+ Ot,
1962
1999
  {
1963
- ...g,
1964
- disabled: m,
1965
- onClick: l ? x : void 0,
1966
- children: i
2000
+ ...m,
2001
+ disabled: x,
2002
+ onClick: i ? g : void 0,
2003
+ children: l
1967
2004
  }
1968
2005
  );
1969
- }, Ks = (e) => {
2006
+ }, zs = (e) => {
1970
2007
  const {
1971
2008
  userFlow: t,
1972
2009
  pageId: s,
1973
2010
  component: r,
1974
- hash: l,
1975
- responseKey: i,
1976
- items: o,
2011
+ hash: i,
2012
+ responseKey: l,
2013
+ items: c,
1977
2014
  closeOnClick: n,
1978
2015
  disabled: d,
1979
2016
  listOrigin: a,
1980
- size: u,
1981
- variant: h
1982
- } = e, _ = we(t, s), f = A(
1983
- () => o.map((g) => ({
1984
- icon: g.leftIcon,
1985
- label: g.content ?? g.label ?? "",
1986
- onClick: (x) => {
1987
- var m;
1988
- (m = x == null ? void 0 : x.preventDefault) == null || m.call(x), _({
1989
- responseKey: g.responseKey,
1990
- actionType: g.actionType,
1991
- dataSource: g.dataSource,
1992
- redirectUrl: g.redirectUrl,
1993
- dependencies: g.dependencies
2017
+ size: _,
2018
+ variant: u
2019
+ } = e, h = ke(t, s), f = E(
2020
+ () => c.map((m) => ({
2021
+ icon: m.leftIcon,
2022
+ label: m.content ?? m.label ?? "",
2023
+ onClick: (g) => {
2024
+ var x;
2025
+ (x = g == null ? void 0 : g.preventDefault) == null || x.call(g), h({
2026
+ responseKey: m.responseKey,
2027
+ actionType: m.actionType,
2028
+ dataSource: m.dataSource,
2029
+ redirectUrl: m.redirectUrl,
2030
+ dependencies: m.dependencies
1994
2031
  });
1995
2032
  }
1996
2033
  })),
1997
- [o, _]
2034
+ [c, h]
1998
2035
  );
1999
- return /* @__PURE__ */ c.jsx(
2000
- Ct,
2036
+ return /* @__PURE__ */ o.jsx(
2037
+ At,
2001
2038
  {
2002
2039
  items: f,
2003
2040
  closeOnClick: n,
2004
2041
  disabled: d,
2005
2042
  listOrigin: a,
2006
- size: u,
2007
- variant: h
2043
+ size: _,
2044
+ variant: u
2008
2045
  }
2009
2046
  );
2010
- }, Gs = "_modalContent_p06ci_1", Ms = {
2011
- modalContent: Gs
2012
- }, Us = ({
2047
+ }, Xs = "_modalContent_p06ci_1", Js = {
2048
+ modalContent: Xs
2049
+ }, Ws = ({
2013
2050
  userFlow: e,
2014
2051
  pageId: t,
2015
2052
  responseKey: s,
2016
2053
  header: r,
2017
- body: l,
2018
- footer: i,
2019
- headerStatusColor: o,
2054
+ body: i,
2055
+ footer: l,
2056
+ headerStatusColor: c,
2020
2057
  ...n
2021
2058
  }) => {
2022
- const d = v((y) => {
2023
- var p;
2024
- return (p = y[e]) == null ? void 0 : p.isModalOpen;
2025
- }), a = v((y) => {
2026
- var p;
2027
- return (p = y[e]) == null ? void 0 : p.isLoading;
2028
- }), u = d && !a, h = {
2059
+ const d = N((y) => {
2060
+ var b;
2061
+ return (b = y[e]) == null ? void 0 : b.isModalOpen;
2062
+ }), a = N((y) => {
2063
+ var b;
2064
+ return (b = y[e]) == null ? void 0 : b.isLoading;
2065
+ }), _ = d && !a, u = {
2029
2066
  ...n
2030
- }, _ = (h == null ? void 0 : h.headerStatusColor) ?? o, f = R(() => {
2031
- je(e), ce(e, !1);
2032
- }, [e, s]), g = Array.isArray(r) ? O(e, t, r) : r, x = O(e, t, l), m = O(e, t, i);
2033
- return /* @__PURE__ */ c.jsx(
2034
- Nt,
2067
+ }, h = (u == null ? void 0 : u.headerStatusColor) ?? c, f = L(() => {
2068
+ ve(e), ue(e, !1);
2069
+ }, [e, s]), m = Array.isArray(r) ? S(e, t, r) : r, g = S(e, t, i), x = S(e, t, l);
2070
+ return /* @__PURE__ */ o.jsx(
2071
+ $t,
2035
2072
  {
2036
- ...h,
2037
- headerStatusColor: _,
2038
- header: typeof g == "string" ? g : /* @__PURE__ */ c.jsx(c.Fragment, { children: g.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-header-${p}`)) }),
2039
- children: /* @__PURE__ */ c.jsx("section", { className: Ms.modalContent, children: x.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-body-${p}`)) }),
2040
- actions: /* @__PURE__ */ c.jsx(c.Fragment, { children: m.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-footer-${p}`)) }),
2041
- open: u,
2073
+ ...u,
2074
+ headerStatusColor: h,
2075
+ header: typeof m == "string" ? m : /* @__PURE__ */ o.jsx(o.Fragment, { children: m.map((y, b) => /* @__PURE__ */ o.jsx(T, { children: y }, `modal-header-${b}`)) }),
2076
+ children: /* @__PURE__ */ o.jsx("section", { className: Js.modalContent, children: g.map((y, b) => /* @__PURE__ */ o.jsx(T, { children: y }, `modal-body-${b}`)) }),
2077
+ actions: /* @__PURE__ */ o.jsx(o.Fragment, { children: x.map((y, b) => /* @__PURE__ */ o.jsx(T, { children: y }, `modal-footer-${b}`)) }),
2078
+ open: _,
2042
2079
  onClose: f
2043
2080
  }
2044
2081
  );
2045
- }, Vs = ({ userFlow: e, pageId: t }) => {
2046
- var i, o;
2047
- const s = rn(e);
2082
+ }, Qs = ({ userFlow: e, pageId: t }) => {
2083
+ var l, c;
2084
+ const s = un(e);
2048
2085
  if (!s)
2049
2086
  return null;
2050
2087
  const r = [
2051
2088
  ...(s == null ? void 0 : s.components) || [],
2052
- ...((i = s == null ? void 0 : s.header) == null ? void 0 : i.components) || [],
2053
- ...((o = s == null ? void 0 : s.body) == null ? void 0 : o.components) || []
2054
- ], l = O(
2089
+ ...((l = s == null ? void 0 : s.header) == null ? void 0 : l.components) || [],
2090
+ ...((c = s == null ? void 0 : s.body) == null ? void 0 : c.components) || []
2091
+ ], i = S(
2055
2092
  e,
2056
2093
  t,
2057
2094
  r
2058
2095
  );
2059
- return /* @__PURE__ */ c.jsx(c.Fragment, { children: l == null ? void 0 : l.map((n, d) => {
2096
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: i == null ? void 0 : i.map((n, d) => {
2060
2097
  const a = `overlay-${d}-${s == null ? void 0 : s.hash}`;
2061
- return /* @__PURE__ */ c.jsx(T, { children: n }, a);
2098
+ return /* @__PURE__ */ o.jsx(T, { children: n }, a);
2062
2099
  }) });
2063
- }, zs = {
2100
+ }, Ys = {
2064
2101
  success: {
2065
2102
  color: "success-opacity",
2066
2103
  textColor: "success-60",
@@ -2086,89 +2123,89 @@ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5h
2086
2123
  textColor: "neutral-70",
2087
2124
  iconColor: "neutral-70"
2088
2125
  }
2089
- }, Hs = (e) => {
2090
- const { content: t, variant: s = "neutral", ...r } = e, l = zs[s], i = {
2126
+ }, Zs = (e) => {
2127
+ const { content: t, variant: s = "neutral", ...r } = e, i = Ys[s], l = {
2091
2128
  ...r,
2092
2129
  children: t,
2093
- color: (r == null ? void 0 : r.color) ?? l.color,
2094
- textColor: (r == null ? void 0 : r.textColor) ?? l.textColor,
2095
- iconColor: (r == null ? void 0 : r.iconColor) ?? l.iconColor
2130
+ color: (r == null ? void 0 : r.color) ?? i.color,
2131
+ textColor: (r == null ? void 0 : r.textColor) ?? i.textColor,
2132
+ iconColor: (r == null ? void 0 : r.iconColor) ?? i.iconColor
2096
2133
  };
2097
- return /* @__PURE__ */ c.jsx(me, { ...i });
2098
- }, Xs = (e) => {
2134
+ return /* @__PURE__ */ o.jsx(Ce, { ...l });
2135
+ }, Fs = (e) => {
2099
2136
  const { content: t } = e;
2100
- return /* @__PURE__ */ c.jsx(Xe, { children: t });
2101
- }, Js = (e) => {
2137
+ return /* @__PURE__ */ o.jsx(Pe, { children: t });
2138
+ }, Ps = (e) => {
2102
2139
  const {
2103
2140
  userFlow: t,
2104
2141
  pageId: s,
2105
2142
  responseKey: r,
2106
- actionType: l,
2107
- dataSource: i,
2108
- dependencies: o,
2143
+ actionType: i,
2144
+ dataSource: l,
2145
+ dependencies: c,
2109
2146
  onClick: n,
2110
2147
  ...d
2111
- } = e, { getNextUI: a, fetchAndGetNextUI: u } = K(), { disabled: h } = I(
2148
+ } = e, { getNextUI: a, fetchAndGetNextUI: _ } = K(), { disabled: u } = I(
2112
2149
  t,
2113
- o
2114
- ), _ = {
2150
+ c
2151
+ ), h = {
2115
2152
  ...d
2116
- }, f = (_ == null ? void 0 : _.disabled) ?? h, g = R(async () => {
2117
- var x;
2153
+ }, f = (h == null ? void 0 : h.disabled) ?? u, m = L(async () => {
2154
+ var g;
2118
2155
  try {
2119
- const m = {
2120
- ...(x = v.getState()[t]) == null ? void 0 : x.entries,
2156
+ const x = {
2157
+ ...(g = N.getState()[t]) == null ? void 0 : g.entries,
2121
2158
  [r]: { status: 200 }
2122
2159
  };
2123
- switch (q(t, m), l) {
2160
+ switch ($(t, x), i) {
2124
2161
  case "GO_TO_NEXT_UI": {
2125
2162
  const y = await a(
2126
2163
  t,
2127
2164
  s,
2128
- m,
2165
+ x,
2129
2166
  r
2130
2167
  );
2131
- y != null && y.data && $(t, y == null ? void 0 : y.data);
2168
+ y != null && y.data && D(t, y == null ? void 0 : y.data);
2132
2169
  break;
2133
2170
  }
2134
2171
  case "FETCH_AND_GO_TO_NEXT_UI": {
2135
- const y = await u(
2172
+ const y = await _(
2136
2173
  t,
2137
2174
  s,
2138
- m,
2175
+ x,
2139
2176
  r,
2140
- i
2177
+ l
2141
2178
  );
2142
- y != null && y.data && $(t, y == null ? void 0 : y.data);
2179
+ y != null && y.data && D(t, y == null ? void 0 : y.data);
2143
2180
  break;
2144
2181
  }
2145
2182
  case "CLOSE_MODAL":
2146
- ce(t, !1);
2183
+ ue(t, !1);
2147
2184
  break;
2148
2185
  case "CLOSE_DRAWER":
2149
- W(t, !1);
2186
+ J(t, !1);
2150
2187
  break;
2151
2188
  case "OPEN_DRAWER":
2152
- W(t, !0);
2189
+ J(t, !0);
2153
2190
  break;
2154
2191
  default:
2155
- console.warn(`Unhandled actionType: ${l}`);
2192
+ console.warn(`Unhandled actionType: ${i}`);
2156
2193
  break;
2157
2194
  }
2158
- } catch (m) {
2159
- alert(JSON.stringify(m));
2195
+ } catch (x) {
2196
+ alert(JSON.stringify(x));
2160
2197
  }
2161
- }, [l, i, s, r, t]);
2162
- return /* @__PURE__ */ c.jsx(
2163
- vt,
2198
+ }, [i, l, s, r, t]);
2199
+ return /* @__PURE__ */ o.jsx(
2200
+ qt,
2164
2201
  {
2165
- ..._,
2202
+ ...h,
2166
2203
  disabled: f,
2167
- onClick: () => !f && (n ?? g)()
2204
+ onClick: () => !f && (n ?? m)()
2168
2205
  }
2169
2206
  );
2170
- }, Ws = "_row_1bqj4_1", Qs = "_row_column_1bqj4_65", X = {
2171
- row: Ws,
2207
+ }, ea = "_row_1bqj4_1", ta = "_row_column_1bqj4_65", z = {
2208
+ row: ea,
2172
2209
  "row__gap-none": "_row__gap-none_1bqj4_5",
2173
2210
  "row__gap-xxs": "_row__gap-xxs_1bqj4_8",
2174
2211
  "row__gap-xs": "_row__gap-xs_1bqj4_11",
@@ -2189,7 +2226,7 @@ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5h
2189
2226
  "row__align-center": "_row__align-center_1bqj4_56",
2190
2227
  "row__align-stretch": "_row__align-stretch_1bqj4_59",
2191
2228
  "row__align-baseline": "_row__align-baseline_1bqj4_62",
2192
- row_column: Qs,
2229
+ row_column: ta,
2193
2230
  "row_column__gap-none": "_row_column__gap-none_1bqj4_72",
2194
2231
  "row_column__gap-xxs": "_row_column__gap-xxs_1bqj4_75",
2195
2232
  "row_column__gap-xs": "_row_column__gap-xs_1bqj4_78",
@@ -2210,25 +2247,25 @@ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5h
2210
2247
  "row_column__align-center": "_row_column__align-center_1bqj4_123",
2211
2248
  "row_column__align-stretch": "_row_column__align-stretch_1bqj4_126",
2212
2249
  "row_column__align-baseline": "_row_column__align-baseline_1bqj4_129"
2213
- }, Ys = (e) => {
2250
+ }, na = (e) => {
2214
2251
  const {
2215
2252
  userFlow: t,
2216
2253
  pageId: s,
2217
2254
  columnWidth: r,
2218
- columns: l,
2219
- gap: i = "md",
2220
- justifyContent: o = "start",
2255
+ columns: i,
2256
+ gap: l = "md",
2257
+ justifyContent: c = "start",
2221
2258
  alignItems: n = "stretch"
2222
- } = e, d = Array.isArray(l) ? l.map((a, u) => {
2223
- const h = `col_${u}`, _ = `col_${u}`;
2259
+ } = e, d = Array.isArray(i) ? i.map((a, _) => {
2260
+ const u = `col_${_}`, h = `col_${_}`;
2224
2261
  if (Array.isArray(a))
2225
2262
  return {
2226
2263
  gap: "md",
2227
2264
  justifyContent: "start",
2228
2265
  alignItems: "start",
2229
2266
  items: a,
2230
- hash: h,
2231
- responseKey: _
2267
+ hash: u,
2268
+ responseKey: h
2232
2269
  };
2233
2270
  const f = a;
2234
2271
  return {
@@ -2236,816 +2273,876 @@ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5h
2236
2273
  justifyContent: (f == null ? void 0 : f.justifyContent) ?? "start",
2237
2274
  alignItems: (f == null ? void 0 : f.alignItems) ?? "start",
2238
2275
  items: (f == null ? void 0 : f.items) ?? [],
2239
- hash: (f == null ? void 0 : f.hash) ?? h,
2240
- responseKey: (f == null ? void 0 : f.responseKey) ?? _
2276
+ hash: (f == null ? void 0 : f.hash) ?? u,
2277
+ responseKey: (f == null ? void 0 : f.responseKey) ?? h
2241
2278
  };
2242
2279
  }) : [];
2243
- return d.length === 0 ? null : /* @__PURE__ */ c.jsx(
2280
+ return d.length === 0 ? null : /* @__PURE__ */ o.jsx(
2244
2281
  "div",
2245
2282
  {
2246
- className: F(
2247
- X.row,
2248
- X[`row__gap-${i}`],
2249
- X[`row__justify-${o}`],
2250
- X[`row__align-${n}`]
2283
+ className: P(
2284
+ z.row,
2285
+ z[`row__gap-${l}`],
2286
+ z[`row__justify-${c}`],
2287
+ z[`row__align-${n}`]
2251
2288
  ),
2252
- children: d == null ? void 0 : d.map((a, u) => {
2253
- const h = (r == null ? void 0 : r[u]) || `${100 / d.length}%`, _ = O(t, s, a.items);
2254
- return !_ || _.length === 0 ? null : /* @__PURE__ */ c.jsx(
2289
+ children: d == null ? void 0 : d.map((a, _) => {
2290
+ const u = (r == null ? void 0 : r[_]) || `${100 / d.length}%`, h = S(t, s, a.items);
2291
+ return !h || h.length === 0 ? null : /* @__PURE__ */ o.jsx(
2255
2292
  "div",
2256
2293
  {
2257
- className: F(
2258
- X.row_column,
2259
- X[`row_column__gap-${a.gap}`],
2260
- X[`row_column__justify-${a.justifyContent}`],
2261
- X[`row_column__align-${a.alignItems}`]
2294
+ className: P(
2295
+ z.row_column,
2296
+ z[`row_column__gap-${a.gap}`],
2297
+ z[`row_column__justify-${a.justifyContent}`],
2298
+ z[`row_column__align-${a.alignItems}`]
2262
2299
  ),
2263
- style: { width: h },
2264
- children: _
2300
+ style: { width: u },
2301
+ children: h
2265
2302
  },
2266
- a.hash || u
2303
+ a.hash || _
2267
2304
  );
2268
2305
  })
2269
2306
  }
2270
2307
  );
2271
2308
  };
2272
- function et({
2309
+ function it({
2273
2310
  userFlow: e,
2274
2311
  pageId: t,
2275
2312
  responseKey: s,
2276
2313
  actionType: r,
2277
- getNextUI: l,
2278
- isMulti: i = !1,
2279
- debounceMs: o
2314
+ getNextUI: i,
2315
+ isMulti: l = !1,
2316
+ debounceMs: c
2280
2317
  }) {
2281
- const n = ge(null);
2282
- V(() => () => {
2318
+ const n = _e(null);
2319
+ U(() => () => {
2283
2320
  n.current !== null && (clearTimeout(n.current), n.current = null);
2284
2321
  }, []);
2285
- const d = R(
2286
- async (u) => {
2322
+ const d = L(
2323
+ async (_) => {
2287
2324
  var f;
2288
- const h = {
2289
- ...(f = v.getState()[e]) == null ? void 0 : f.entries
2325
+ const u = {
2326
+ ...(f = N.getState()[e]) == null ? void 0 : f.entries
2290
2327
  };
2291
- if (u ? (h[s] = u, q(e, h)) : (delete h[s], on(e, s)), r && (r === "GO_TO_NEXT_UI" || r === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
2328
+ if (_ ? (u[s] = _, $(e, u)) : (delete u[s], hn(e, s)), r && (r === "GO_TO_NEXT_UI" || r === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
2292
2329
  try {
2293
- const x = await l(
2330
+ const g = await i(
2294
2331
  e,
2295
2332
  t,
2296
- h,
2333
+ u,
2297
2334
  s,
2298
2335
  r === "GO_TO_NEXT_UI"
2299
2336
  );
2300
- x != null && x.data && $(e, x.data);
2301
- } catch (g) {
2302
- console.error("[useSelectChange] Failed to fetch next UI", g);
2337
+ g != null && g.data && D(e, g.data);
2338
+ } catch (m) {
2339
+ console.error("[useSelectChange] Failed to fetch next UI", m);
2303
2340
  }
2304
2341
  },
2305
- [e, t, s, r, l]
2342
+ [e, t, s, r, i]
2306
2343
  );
2307
- return R(
2308
- (u) => {
2309
- if (!i) {
2310
- d(u);
2344
+ return L(
2345
+ (_) => {
2346
+ if (!l) {
2347
+ d(_);
2311
2348
  return;
2312
2349
  }
2313
- if (o == null) {
2314
- d(u);
2350
+ if (c == null) {
2351
+ d(_);
2315
2352
  return;
2316
2353
  }
2317
2354
  n.current !== null && (clearTimeout(n.current), n.current = null), n.current = setTimeout(() => {
2318
- d(u), n.current = null;
2319
- }, o);
2355
+ d(_), n.current = null;
2356
+ }, c);
2320
2357
  },
2321
- [i, o, d]
2358
+ [l, c, d]
2322
2359
  );
2323
2360
  }
2324
- const Zs = /\{([^}]+)\}/g, Fs = (e, t) => {
2361
+ const sa = /\{([^}]+)\}/g, aa = (e, t) => {
2325
2362
  var s;
2326
- return t.includes("{") ? t.replace(Zs, (r, l) => {
2327
- var o;
2328
- const i = (o = B.query(e, l.trim())) == null ? void 0 : o[0];
2329
- return i != null ? String(i) : "";
2330
- }) : (s = B.query(e, t)) == null ? void 0 : s[0];
2331
- }, Ps = (e, t, s, r) => {
2332
- const l = B.query(e, t);
2333
- return (l == null ? void 0 : l.map((i) => {
2363
+ return t.includes("{") ? t.replace(sa, (r, i) => {
2364
+ var c;
2365
+ const l = (c = G.query(e, i.trim())) == null ? void 0 : c[0];
2366
+ return l != null ? String(l) : "";
2367
+ }) : (s = G.query(e, t)) == null ? void 0 : s[0];
2368
+ }, ra = (e, t, s, r) => {
2369
+ const i = G.query(e, t);
2370
+ return (i == null ? void 0 : i.map((l) => {
2334
2371
  var d;
2335
- const o = Fs(i, s), n = r ? (d = B.query(i, r)) == null ? void 0 : d[0] : i;
2336
- return { label: o, value: n };
2372
+ const c = aa(l, s), n = r ? (d = G.query(l, r)) == null ? void 0 : d[0] : l;
2373
+ return { label: c, value: n };
2337
2374
  })) ?? [];
2338
- }, ea = (e, t, s, r = 10) => {
2375
+ }, oa = (e, t, s, r = 10) => {
2339
2376
  var n, d;
2340
- let l, i;
2377
+ let i, l;
2341
2378
  if (s) {
2342
- const a = B.value(e, s.size ?? "$.meta.size") ?? r, u = B.value(e, s.total ?? "$.meta.total") ?? 0;
2343
- l = a, i = u;
2379
+ const a = G.value(e, s.size ?? "$.meta.size") ?? r, _ = G.value(e, s.total ?? "$.meta.total") ?? 0;
2380
+ i = a, l = _;
2344
2381
  } else {
2345
2382
  const a = e == null ? void 0 : e.meta;
2346
- l = (a == null ? void 0 : a.size) ?? ((n = a == null ? void 0 : a.page) == null ? void 0 : n.size) ?? r, i = (a == null ? void 0 : a.total) ?? ((d = a == null ? void 0 : a.page) == null ? void 0 : d.total) ?? 0;
2383
+ i = (a == null ? void 0 : a.size) ?? ((n = a == null ? void 0 : a.page) == null ? void 0 : n.size) ?? r, l = (a == null ? void 0 : a.total) ?? ((d = a == null ? void 0 : a.page) == null ? void 0 : d.total) ?? 0;
2347
2384
  }
2348
- const o = i > 0 ? Math.ceil(i / l) > t : !1;
2385
+ const c = l > 0 ? Math.ceil(l / i) > t : !1;
2349
2386
  return {
2350
- pageSize: l,
2351
- total: i,
2352
- hasMore: o
2387
+ pageSize: i,
2388
+ total: l,
2389
+ hasMore: c
2353
2390
  };
2354
- }, ta = "_selectNotFront_ch3v5_1", tt = {
2355
- selectNotFront: ta
2356
- }, na = ({
2391
+ }, ca = "_selectNotFront_ch3v5_1", lt = {
2392
+ selectNotFront: ca
2393
+ }, ia = ({
2357
2394
  userFlow: e,
2358
2395
  pageId: t,
2359
2396
  responseKey: s,
2360
2397
  required: r,
2361
- dataSource: l,
2362
- actionType: i,
2363
- dependencies: o,
2398
+ dataSource: i,
2399
+ actionType: l,
2400
+ dependencies: c,
2364
2401
  debounceMs: n,
2365
2402
  ...d
2366
2403
  }) => {
2367
2404
  const a = {
2368
2405
  ...d
2369
- }, { getNextUI: u, fetchDataSource: h } = K(), [_, f] = L((a == null ? void 0 : a.value) ?? ""), { disabled: g } = I(
2406
+ }, { getNextUI: _, fetchDataSource: u } = K(), [h, f] = R((a == null ? void 0 : a.value) ?? ""), { disabled: m } = I(
2370
2407
  e,
2371
- o
2372
- ), x = (a == null ? void 0 : a.disabled) ?? g, m = A(() => r && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, r]), y = A(() => {
2373
- const j = a != null && a.isMulti ? _ : [_], N = {};
2374
- return Array.isArray(j) && j.forEach((w) => {
2375
- if (!w) return;
2376
- const k = JSON.stringify(w.value), S = JSON.stringify(w.label);
2377
- N[k] = w, S in N || (N[S] = w);
2378
- }), N;
2379
- }, [_]), p = et({
2408
+ c
2409
+ ), g = (a == null ? void 0 : a.disabled) ?? m, x = E(() => r && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, r]), y = E(() => {
2410
+ const j = a != null && a.isMulti ? h : [h], w = {};
2411
+ return Array.isArray(j) && j.forEach((v) => {
2412
+ if (!v) return;
2413
+ const O = JSON.stringify(v.value), A = JSON.stringify(v.label);
2414
+ w[O] = v, A in w || (w[A] = v);
2415
+ }), w;
2416
+ }, [h]), b = it({
2380
2417
  userFlow: e,
2381
2418
  pageId: t,
2382
2419
  responseKey: s,
2383
- actionType: i,
2384
- getNextUI: u,
2420
+ actionType: l,
2421
+ getNextUI: _,
2385
2422
  isMulti: a == null ? void 0 : a.isMulti,
2386
2423
  debounceMs: n
2387
- }), b = (j) => {
2388
- f(j), p(j);
2389
- }, C = async (j, N, { page: w }) => {
2424
+ }), p = (j) => {
2425
+ f(j), b(j);
2426
+ }, C = async (j, w, { page: v }) => {
2390
2427
  const {
2391
- jsonPathLabel: k,
2392
- jsonPathOptions: S,
2393
- jsonPathValue: E,
2394
- jsonPathPagination: G
2395
- } = l, M = Ce(
2396
- l,
2397
- w,
2428
+ jsonPathLabel: O,
2429
+ jsonPathOptions: A,
2430
+ jsonPathValue: q,
2431
+ jsonPathPagination: W
2432
+ } = i, V = Se(
2433
+ i,
2434
+ v,
2398
2435
  j
2399
- ), H = await h(
2400
- M,
2436
+ ), k = await u(
2437
+ V,
2401
2438
  e,
2402
2439
  !1
2403
- ), D = H == null ? void 0 : H.data, ae = D ? Ps(
2404
- D,
2405
- S,
2406
- k,
2407
- E
2408
- ) : [], { hasMore: st } = ea(
2409
- D,
2410
- w,
2411
- G
2440
+ ), B = k == null ? void 0 : k.data, te = B ? ra(
2441
+ B,
2442
+ A,
2443
+ O,
2444
+ q
2445
+ ) : [], { hasMore: ye } = oa(
2446
+ B,
2447
+ v,
2448
+ W
2412
2449
  );
2413
2450
  return {
2414
- options: ae,
2415
- hasMore: st,
2451
+ options: te,
2452
+ hasMore: ye,
2416
2453
  additional: {
2417
- page: w + 1
2454
+ page: v + 1
2418
2455
  }
2419
2456
  };
2420
2457
  };
2421
- return /* @__PURE__ */ c.jsx(
2422
- St,
2458
+ return /* @__PURE__ */ o.jsx(
2459
+ Rt,
2423
2460
  {
2424
2461
  ...a,
2425
- className: tt.selectNotFront,
2426
- label: m,
2427
- value: _,
2428
- disabled: x,
2429
- noOptionsMessage: () => /* @__PURE__ */ c.jsx(c.Fragment, { children: "Sin opciones" }),
2430
- onChange: (j) => !x && b(j),
2462
+ className: lt.selectNotFront,
2463
+ label: x,
2464
+ value: h,
2465
+ disabled: g,
2466
+ noOptionsMessage: () => /* @__PURE__ */ o.jsx(o.Fragment, { children: "Sin opciones" }),
2467
+ onChange: (j) => !g && p(j),
2431
2468
  loadOptions: C,
2432
2469
  additional: { page: 1 },
2433
2470
  isOptionDisabled: (j) => {
2434
- const N = JSON.stringify(j == null ? void 0 : j.value), w = JSON.stringify(j == null ? void 0 : j.label);
2435
- return !!(y != null && y[N]) || !!(y != null && y[w]);
2471
+ const w = JSON.stringify(j == null ? void 0 : j.value), v = JSON.stringify(j == null ? void 0 : j.label);
2472
+ return !!(y != null && y[w]) || !!(y != null && y[v]);
2436
2473
  },
2437
2474
  debounceTimeout: 350
2438
2475
  }
2439
2476
  );
2440
- }, sa = ({
2477
+ }, la = ({
2441
2478
  userFlow: e,
2442
2479
  pageId: t,
2443
2480
  responseKey: s,
2444
2481
  dataSource: r,
2445
- required: l,
2446
- actionType: i,
2447
- dependencies: o,
2482
+ required: i,
2483
+ actionType: l,
2484
+ dependencies: c,
2448
2485
  debounceMs: n,
2449
2486
  ...d
2450
2487
  }) => {
2451
2488
  const a = {
2452
2489
  ...d
2453
- }, { getNextUI: u } = K(), [h, _] = L(a.value || ""), { disabled: f } = I(
2490
+ }, { getNextUI: _ } = K(), [u, h] = R(a.value || ""), { disabled: f } = I(
2454
2491
  e,
2455
- o
2456
- ), g = (a == null ? void 0 : a.disabled) ?? f, x = A(() => l && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, l]), m = et({
2492
+ c
2493
+ ), m = (a == null ? void 0 : a.disabled) ?? f, g = E(() => i && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, i]), x = it({
2457
2494
  userFlow: e,
2458
2495
  pageId: t,
2459
2496
  responseKey: s,
2460
- actionType: i,
2461
- getNextUI: u,
2497
+ actionType: l,
2498
+ getNextUI: _,
2462
2499
  isMulti: a == null ? void 0 : a.isMulti,
2463
2500
  debounceMs: n
2464
- }), y = (p) => {
2465
- _(p), m(p);
2501
+ }), y = (b) => {
2502
+ h(b), x(b);
2466
2503
  };
2467
- return /* @__PURE__ */ c.jsx(
2468
- kt,
2504
+ return /* @__PURE__ */ o.jsx(
2505
+ Dt,
2469
2506
  {
2470
2507
  ...a,
2471
- className: tt.selectNotFront,
2472
- label: x,
2473
- value: h,
2474
- disabled: g,
2475
- onChange: (p) => !g && y(p)
2508
+ className: lt.selectNotFront,
2509
+ label: g,
2510
+ value: u,
2511
+ disabled: m,
2512
+ onChange: (b) => !m && y(b)
2476
2513
  }
2477
2514
  );
2478
- }, aa = (e) => {
2515
+ }, da = (e) => {
2479
2516
  const { dataSource: t } = e;
2480
- return t ? /* @__PURE__ */ c.jsx(na, { ...e }) : /* @__PURE__ */ c.jsx(sa, { ...e });
2481
- }, ra = "_spacing_19hqa_1", oa = "_spacing__xxs_19hqa_1", ca = "_spacing__xs_19hqa_4", ia = "_spacing__sm_19hqa_7", la = "_spacing__md_19hqa_10", da = "_spacing__lg_19hqa_13", _a = "_spacing__xl_19hqa_16", ua = "_spacing__xxl_19hqa_19", ha = "_spacing__xxxl_19hqa_22", Me = {
2482
- spacing: ra,
2483
- spacing__xxs: oa,
2484
- spacing__xs: ca,
2485
- spacing__sm: ia,
2486
- spacing__md: la,
2487
- spacing__lg: da,
2488
- spacing__xl: _a,
2489
- spacing__xxl: ua,
2490
- spacing__xxxl: ha
2491
- }, fa = (e) => {
2492
- const { size: t } = e, s = F(Me.spacing, Me[`spacing__${t}`]);
2493
- return /* @__PURE__ */ c.jsx("div", { className: s });
2494
- }, ya = (e) => {
2517
+ return t ? /* @__PURE__ */ o.jsx(ia, { ...e }) : /* @__PURE__ */ o.jsx(la, { ...e });
2518
+ }, _a = "_spacing_19hqa_1", ua = "_spacing__xxs_19hqa_1", ha = "_spacing__xs_19hqa_4", fa = "_spacing__sm_19hqa_7", ya = "_spacing__md_19hqa_10", ma = "_spacing__lg_19hqa_13", xa = "_spacing__xl_19hqa_16", ga = "_spacing__xxl_19hqa_19", ba = "_spacing__xxxl_19hqa_22", We = {
2519
+ spacing: _a,
2520
+ spacing__xxs: ua,
2521
+ spacing__xs: ha,
2522
+ spacing__sm: fa,
2523
+ spacing__md: ya,
2524
+ spacing__lg: ma,
2525
+ spacing__xl: xa,
2526
+ spacing__xxl: ga,
2527
+ spacing__xxxl: ba
2528
+ }, pa = (e) => {
2529
+ const { size: t } = e, s = P(We.spacing, We[`spacing__${t}`]);
2530
+ return /* @__PURE__ */ o.jsx("div", { className: s });
2531
+ }, ja = (e) => {
2495
2532
  const {
2496
2533
  userFlow: t,
2497
2534
  pageId: s,
2498
2535
  responseKey: r,
2499
- actionType: l,
2500
- label: i,
2501
- value: o,
2536
+ actionType: i,
2537
+ label: l,
2538
+ value: c,
2502
2539
  required: n,
2503
2540
  dependencies: d,
2504
2541
  ...a
2505
- } = e, u = {
2542
+ } = e, _ = {
2506
2543
  ...a
2507
- }, { getNextUI: h } = K(), [_, f] = L(o || !1), { disabled: g } = I(
2544
+ }, { getNextUI: u } = K(), [h, f] = R(c || !1), { disabled: m } = I(
2508
2545
  t,
2509
2546
  d
2510
- ), x = (u == null ? void 0 : u.disabled) ?? g, m = A(() => n && i ? `${i} *` : i ?? "", [i, n]), y = R(async () => {
2511
- var p;
2547
+ ), g = (_ == null ? void 0 : _.disabled) ?? m, x = E(() => n && l ? `${l} *` : l ?? "", [l, n]), y = L(async () => {
2548
+ var b;
2512
2549
  try {
2513
- const b = !_;
2514
- f(b);
2550
+ const p = !h;
2551
+ f(p);
2515
2552
  const C = {
2516
- ...(p = v.getState()[t]) == null ? void 0 : p.entries,
2517
- [r]: b
2553
+ ...(b = N.getState()[t]) == null ? void 0 : b.entries,
2554
+ [r]: p
2518
2555
  };
2519
- switch (q(t, C), l) {
2556
+ switch ($(t, C), i) {
2520
2557
  case "GO_TO_NEXT_UI":
2521
2558
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
2522
- const N = await h(
2559
+ const w = await u(
2523
2560
  t,
2524
2561
  s,
2525
2562
  C,
2526
2563
  r,
2527
- l === "GO_TO_NEXT_UI"
2564
+ i === "GO_TO_NEXT_UI"
2528
2565
  );
2529
- N != null && N.data && $(t, N == null ? void 0 : N.data);
2566
+ w != null && w.data && D(t, w == null ? void 0 : w.data);
2530
2567
  break;
2531
2568
  }
2532
2569
  default:
2533
2570
  break;
2534
2571
  }
2535
- } catch (b) {
2536
- console.error("Error in switch action:", b), alert(JSON.stringify(b));
2572
+ } catch (p) {
2573
+ console.error("Error in switch action:", p), alert(JSON.stringify(p));
2537
2574
  }
2538
- }, [t, s, r, l, _]);
2539
- return /* @__PURE__ */ c.jsx(
2540
- Et,
2575
+ }, [t, s, r, i, h]);
2576
+ return /* @__PURE__ */ o.jsx(
2577
+ Lt,
2541
2578
  {
2542
- ...u,
2543
- label: m,
2544
- checked: _,
2545
- disabled: x,
2546
- onChange: () => !x && y()
2579
+ ..._,
2580
+ label: x,
2581
+ checked: h,
2582
+ disabled: g,
2583
+ onChange: () => !g && y()
2547
2584
  }
2548
2585
  );
2549
- }, ma = "_tableSkeleton_3nr9n_1", xa = "_tableArrayPills_3nr9n_7", nt = {
2550
- tableSkeleton: ma,
2551
- tableArrayPills: xa
2552
- }, ga = ({ values: e }) => {
2586
+ }, Ca = "_tableSkeleton_3nr9n_1", wa = "_tableArrayPills_3nr9n_7", dt = {
2587
+ tableSkeleton: Ca,
2588
+ tableArrayPills: wa
2589
+ }, Na = ({ values: e }) => {
2553
2590
  const s = e == null ? void 0 : e.slice(0, 4), r = (e == null ? void 0 : e.length) - 4;
2554
- return /* @__PURE__ */ c.jsxs("div", { className: nt.tableArrayPills, children: [
2555
- s.map((l, i) => /* @__PURE__ */ c.jsx(me, { children: String(l) }, i)),
2556
- r > 0 && /* @__PURE__ */ c.jsxs(me, { outlined: !0, children: [
2591
+ return /* @__PURE__ */ o.jsxs("div", { className: dt.tableArrayPills, children: [
2592
+ s.map((i, l) => /* @__PURE__ */ o.jsx(Ce, { children: String(i) }, l)),
2593
+ r > 0 && /* @__PURE__ */ o.jsxs(Ce, { outlined: !0, children: [
2557
2594
  "+",
2558
2595
  r
2559
2596
  ] })
2560
2597
  ] });
2561
- }, pa = ({
2598
+ }, va = ({
2562
2599
  userFlow: e,
2563
2600
  pageId: t,
2564
2601
  tableResponseKey: s,
2565
2602
  component: r,
2566
- rowData: l
2603
+ rowData: i
2567
2604
  }) => {
2568
- const { getNextUI: i, fetchAndGetNextUI: o, fetchDataSource: n } = K(), d = O(e, t, [
2605
+ const { getNextUI: l, fetchAndGetNextUI: c, fetchDataSource: n } = K(), d = S(e, t, [
2569
2606
  { ...r }
2570
2607
  ]), a = (d == null ? void 0 : d[0]) || null;
2571
2608
  if (!a) return null;
2572
2609
  const {
2573
- actionType: u,
2574
- responseKey: h,
2575
- dataSource: _
2576
- } = a.props, f = R(async () => {
2577
- var g, x, m;
2610
+ actionType: _,
2611
+ responseKey: u,
2612
+ dataSource: h
2613
+ } = a.props, f = L(async () => {
2614
+ var m, g, x;
2578
2615
  try {
2579
2616
  const y = {
2580
- ...(g = v.getState()[e]) == null ? void 0 : g.entries,
2581
- [h]: { status: 200 },
2582
- [s]: [{ ...l }]
2617
+ ...(m = N.getState()[e]) == null ? void 0 : m.entries,
2618
+ [u]: { status: 200 },
2619
+ [s]: [{ ...i }]
2583
2620
  };
2584
- switch (q(e, y), u) {
2621
+ switch ($(e, y), _) {
2585
2622
  case "GO_TO_NEXT_UI": {
2586
- const p = await i(
2623
+ const b = await l(
2587
2624
  e,
2588
2625
  t,
2589
2626
  y,
2590
- h
2627
+ u
2591
2628
  );
2592
- p != null && p.data && $(e, p == null ? void 0 : p.data);
2629
+ b != null && b.data && D(e, b == null ? void 0 : b.data);
2593
2630
  break;
2594
2631
  }
2595
2632
  case "FETCH_AND_GO_TO_NEXT_UI": {
2596
- const p = await o(
2633
+ const b = await c(
2597
2634
  e,
2598
2635
  t,
2599
2636
  y,
2600
- h,
2601
- _
2637
+ u,
2638
+ h
2602
2639
  );
2603
- p != null && p.data && $(e, p == null ? void 0 : p.data);
2640
+ b != null && b.data && D(e, b == null ? void 0 : b.data);
2604
2641
  break;
2605
2642
  }
2606
2643
  case "GET_DATA_SOURCE": {
2607
- const p = await i(
2644
+ const b = await l(
2608
2645
  e,
2609
2646
  t,
2610
2647
  y,
2611
- h
2612
- ), b = (x = p == null ? void 0 : p.data) == null ? void 0 : x.content;
2613
- if ((b == null ? void 0 : b.type) !== "fetch") break;
2614
- const C = b == null ? void 0 : b.dataSource, j = await n(
2648
+ u
2649
+ ), p = (g = b == null ? void 0 : b.data) == null ? void 0 : g.content;
2650
+ if ((p == null ? void 0 : p.type) !== "fetch") break;
2651
+ const C = p == null ? void 0 : p.dataSource, j = await n(
2615
2652
  C,
2616
2653
  e,
2617
2654
  // Avoid to handle loading state until all the requests are done
2618
2655
  !1
2619
- ), N = {
2620
- ...(m = v.getState()[e]) == null ? void 0 : m.entries,
2621
- [h]: {
2656
+ ), w = {
2657
+ ...(x = N.getState()[e]) == null ? void 0 : x.entries,
2658
+ [u]: {
2622
2659
  status: j == null ? void 0 : j.status,
2623
2660
  content: j == null ? void 0 : j.data
2624
2661
  }
2625
2662
  };
2626
- q(e, N);
2627
- const w = await i(
2663
+ $(e, w);
2664
+ const v = await l(
2628
2665
  e,
2629
2666
  t,
2630
- N,
2631
- h
2667
+ w,
2668
+ u
2632
2669
  );
2633
- w != null && w.data && $(e, w == null ? void 0 : w.data);
2670
+ v != null && v.data && D(e, v == null ? void 0 : v.data);
2634
2671
  break;
2635
2672
  }
2636
2673
  default:
2637
- console.warn(`Unhandled actionType: ${u}`);
2674
+ console.warn(`Unhandled actionType: ${_}`);
2638
2675
  break;
2639
2676
  }
2640
2677
  } catch (y) {
2641
2678
  alert(JSON.stringify(y));
2642
2679
  }
2643
- }, [u, _, t, h, e]);
2644
- return ot(a, {
2680
+ }, [_, h, t, u, e]);
2681
+ return ft(a, {
2645
2682
  onClick: f
2646
2683
  });
2647
- }, ba = () => /* @__PURE__ */ c.jsx("div", { className: nt.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ c.jsx(
2648
- He,
2684
+ }, Sa = () => /* @__PURE__ */ o.jsx("div", { className: dt.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ o.jsx(
2685
+ Fe,
2649
2686
  {
2650
2687
  maxWidth: "100%",
2651
2688
  height: 42,
2652
2689
  radius: 8
2653
2690
  },
2654
2691
  `tableSkeletonBase${t}`
2655
- )) }), ja = ({
2692
+ )) }), ka = (e, t) => !(t != null && t.length) || !e ? e : e.map((s) => t.some(
2693
+ (i) => Array.isArray(s != null && s.accessor ? i[s == null ? void 0 : s.accessor] : void 0)
2694
+ ) ? {
2695
+ ...s,
2696
+ renderCell: (i) => {
2697
+ const l = s.accessor ? i[s.accessor] : void 0;
2698
+ return Array.isArray(l) ? /* @__PURE__ */ o.jsx(Na, { values: l }) : l ?? "";
2699
+ }
2700
+ } : s), Ea = ({
2656
2701
  userFlow: e,
2657
2702
  pageId: t,
2658
2703
  responseKey: s,
2659
2704
  component: r,
2660
- dataSource: l,
2661
- rightActions: i,
2662
- ...o
2705
+ dataSource: i,
2706
+ rightActions: l,
2707
+ data: c,
2708
+ pageSize: n,
2709
+ ...d
2663
2710
  }) => {
2664
- var C, j, N;
2665
- const { fetchDataSource: n } = K(), [d, a] = L(!1), [u, h] = L(1), [_, f] = L(null), g = ge(
2711
+ var q, W, V;
2712
+ const { fetchDataSource: a } = K(), [_, u] = R(!1), [h, f] = R(1), [m, g] = R(null), x = !i && Array.isArray(c), y = _e(
2666
2713
  /* @__PURE__ */ new Map([[1, null]])
2667
- ), x = A(() => {
2668
- if (i != null && i.length)
2669
- return i.map((w, k) => ({
2670
- renderContent: (S) => /* @__PURE__ */ c.jsx(
2671
- pa,
2714
+ ), b = E(() => {
2715
+ if (l != null && l.length)
2716
+ return l.map((k, B) => ({
2717
+ renderContent: (te) => /* @__PURE__ */ o.jsx(
2718
+ va,
2672
2719
  {
2673
2720
  userFlow: e,
2674
2721
  pageId: t,
2675
2722
  tableResponseKey: s,
2676
- component: w,
2677
- rowData: S
2723
+ component: k,
2724
+ rowData: te
2678
2725
  },
2679
- `tableRowAction${k}`
2726
+ `tableRowAction${B}`
2680
2727
  )
2681
2728
  }));
2682
- }, [i, e, t]), m = async (w = 1) => {
2729
+ }, [l, e, t, s]), p = async (k = 1) => {
2730
+ if (!i)
2731
+ return;
2683
2732
  const {
2684
- mapperData: k,
2685
- jsonPathData: S,
2686
- jsonPathPagination: E,
2687
- jsonPathCursorPagination: G
2688
- } = l;
2689
- if (G && w !== 1 && !g.current.has(w)) {
2690
- h(1), m(1);
2733
+ mapperData: B,
2734
+ jsonPathData: te,
2735
+ jsonPathPagination: ye,
2736
+ jsonPathCursorPagination: ne
2737
+ } = i;
2738
+ if (ne && k !== 1 && !y.current.has(k)) {
2739
+ f(1), p(1);
2691
2740
  return;
2692
2741
  }
2693
- G && w === 1 && (g.current = /* @__PURE__ */ new Map([[1, null]]));
2742
+ ne && k === 1 && (y.current = /* @__PURE__ */ new Map([[1, null]]));
2694
2743
  try {
2695
- a(!0);
2696
- const M = G ? g.current.get(w) ?? null : null, H = Ce(
2697
- l,
2698
- w,
2744
+ u(!0);
2745
+ const me = ne ? y.current.get(k) ?? null : null, _t = Se(
2746
+ i,
2747
+ k,
2699
2748
  void 0,
2700
- M
2701
- ), D = await n(
2702
- H,
2749
+ me
2750
+ ), Q = await a(
2751
+ _t,
2703
2752
  e,
2704
2753
  !1
2705
2754
  );
2706
- if (f(
2707
- Fe(
2708
- D == null ? void 0 : D.data,
2709
- S,
2710
- k,
2711
- E
2755
+ if (g(
2756
+ ot(
2757
+ Q == null ? void 0 : Q.data,
2758
+ te,
2759
+ B,
2760
+ ye
2712
2761
  )
2713
- ), G) {
2714
- const ae = ss(
2715
- D == null ? void 0 : D.data,
2716
- G
2762
+ ), ne) {
2763
+ const Ae = ls(
2764
+ Q == null ? void 0 : Q.data,
2765
+ ne
2717
2766
  );
2718
- ae && g.current.set(w + 1, ae);
2767
+ Ae && y.current.set(k + 1, Ae);
2719
2768
  }
2720
- a(!1);
2721
- } catch (M) {
2722
- console.error("[TableNotFront] fetchData:", M), a(!1);
2769
+ u(!1);
2770
+ } catch (me) {
2771
+ console.error("[TableNotFront] fetchData:", me), u(!1);
2723
2772
  }
2724
- }, y = (w) => {
2725
- h(w), m(w);
2773
+ }, C = (k) => {
2774
+ f(k), p(k);
2726
2775
  };
2727
- V(() => {
2728
- m();
2776
+ U(() => {
2777
+ x || p();
2729
2778
  }, []);
2730
- const p = A(() => !(_ != null && _.items) || !(o != null && o.columns) ? o == null ? void 0 : o.columns : o.columns.map((w) => {
2731
- var S;
2732
- return ((S = _ == null ? void 0 : _.items) == null ? void 0 : S.some(
2733
- (E) => Array.isArray(w != null && w.accessor ? E[w == null ? void 0 : w.accessor] : void 0)
2734
- )) ? {
2735
- ...w,
2736
- renderCell: (E) => {
2737
- const G = w.accessor ? E[w.accessor] : void 0;
2738
- return Array.isArray(G) ? /* @__PURE__ */ c.jsx(ga, { values: G }) : G ?? "";
2739
- }
2740
- } : w;
2741
- }), [_ == null ? void 0 : _.items, o == null ? void 0 : o.columns]), b = {
2742
- ...o,
2743
- data: _ == null ? void 0 : _.items,
2744
- columns: p,
2745
- rightActions: x
2779
+ const j = x ? c : m == null ? void 0 : m.items, w = x && !!n && ((c == null ? void 0 : c.length) ?? 0) > n, v = E(() => {
2780
+ if (!w || !c || !n)
2781
+ return j ?? [];
2782
+ const k = (h - 1) * n;
2783
+ return c.slice(k, k + n);
2784
+ }, [w, c, n, h, j]), O = E(
2785
+ () => ka(
2786
+ d.columns,
2787
+ j
2788
+ ),
2789
+ [j, d.columns]
2790
+ ), A = {
2791
+ ...d,
2792
+ data: v,
2793
+ columns: O ?? [],
2794
+ rightActions: b
2746
2795
  };
2747
- return /* @__PURE__ */ c.jsx(c.Fragment, { children: d ? /* @__PURE__ */ c.jsx(ba, {}) : _ && ((C = _ == null ? void 0 : _.items) == null ? void 0 : C.length) > 0 ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2748
- /* @__PURE__ */ c.jsx(Tt, { ...b }),
2749
- (_ == null ? void 0 : _.pagination) && ((j = _ == null ? void 0 : _.pagination) == null ? void 0 : j.totalPages) > 1 && /* @__PURE__ */ c.jsx(
2750
- Ot,
2796
+ return x ? !j || j.length === 0 ? /* @__PURE__ */ o.jsx(ie, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2797
+ /* @__PURE__ */ o.jsx($e, { ...A }),
2798
+ w && n && c && /* @__PURE__ */ o.jsx(
2799
+ qe,
2751
2800
  {
2752
2801
  classname: { global: "row__end" },
2753
- page: u,
2754
- size: _ == null ? void 0 : _.pagination.size,
2755
- total: (N = _ == null ? void 0 : _.pagination) == null ? void 0 : N.total,
2756
- onChange: y
2802
+ page: h,
2803
+ size: n,
2804
+ total: c.length,
2805
+ onChange: f
2757
2806
  }
2758
2807
  )
2759
- ] }) : /* @__PURE__ */ c.jsx(pe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
2760
- }, wa = "_tabsPanel_kvslb_1", Ca = {
2761
- tabsPanel: wa
2762
- }, Na = ({ userFlow: e, pageId: t, components: s }) => {
2763
- const r = O(e, t, s);
2764
- return r != null && r.length ? /* @__PURE__ */ c.jsx("section", { className: Ca.tabsPanel, children: r.map((l, i) => /* @__PURE__ */ c.jsx(T, { children: l }, `tabs-panel-${i}`)) }) : null;
2765
- }, va = ({
2808
+ ] }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: _ ? /* @__PURE__ */ o.jsx(Sa, {}) : m && ((q = m == null ? void 0 : m.items) == null ? void 0 : q.length) > 0 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2809
+ /* @__PURE__ */ o.jsx($e, { ...A }),
2810
+ (m == null ? void 0 : m.pagination) && ((W = m == null ? void 0 : m.pagination) == null ? void 0 : W.totalPages) > 1 && /* @__PURE__ */ o.jsx(
2811
+ qe,
2812
+ {
2813
+ classname: { global: "row__end" },
2814
+ page: h,
2815
+ size: m == null ? void 0 : m.pagination.size,
2816
+ total: (V = m == null ? void 0 : m.pagination) == null ? void 0 : V.total,
2817
+ onChange: C
2818
+ }
2819
+ )
2820
+ ] }) : /* @__PURE__ */ o.jsx(ie, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
2821
+ }, Ta = "_tabsPanel_kvslb_1", Oa = {
2822
+ tabsPanel: Ta
2823
+ }, Aa = ({ userFlow: e, pageId: t, components: s }) => {
2824
+ const r = S(e, t, s);
2825
+ return r != null && r.length ? /* @__PURE__ */ o.jsx("section", { className: Oa.tabsPanel, children: r.map((i, l) => /* @__PURE__ */ o.jsx(T, { children: i }, `tabs-panel-${l}`)) }) : null;
2826
+ }, $a = ({
2766
2827
  userFlow: e,
2767
2828
  pageId: t,
2768
2829
  hash: s,
2769
2830
  items: r,
2770
- activeIndex: l,
2771
- className: i,
2772
- responseKey: o
2831
+ activeIndex: i,
2832
+ className: l,
2833
+ responseKey: c
2773
2834
  }) => {
2774
- const n = r.map((a, u) => ({
2835
+ const n = r.map((a, _) => ({
2775
2836
  label: a.label,
2776
2837
  disabled: a.disabled,
2777
- children: /* @__PURE__ */ c.jsx(
2778
- Na,
2838
+ children: /* @__PURE__ */ o.jsx(
2839
+ Aa,
2779
2840
  {
2780
2841
  userFlow: e,
2781
2842
  pageId: t,
2782
2843
  components: a.components
2783
2844
  },
2784
- `${s}-tab-${u}`
2845
+ `${s}-tab-${_}`
2785
2846
  )
2786
2847
  })), d = (a) => {
2787
- var h;
2788
- const u = {
2789
- ...(h = v.getState()[e]) == null ? void 0 : h.entries,
2790
- [o]: a
2848
+ var u;
2849
+ const _ = {
2850
+ ...(u = N.getState()[e]) == null ? void 0 : u.entries,
2851
+ [c]: a
2791
2852
  };
2792
- q(e, u);
2853
+ $(e, _);
2793
2854
  };
2794
- return /* @__PURE__ */ c.jsx(
2795
- At,
2855
+ return /* @__PURE__ */ o.jsx(
2856
+ It,
2796
2857
  {
2797
- className: i,
2798
- activeIndex: l,
2858
+ className: l,
2859
+ activeIndex: i,
2799
2860
  items: n,
2800
2861
  onClick: d
2801
2862
  }
2802
2863
  );
2803
- }, Sa = (e) => {
2864
+ }, qa = (e) => {
2804
2865
  const {
2805
2866
  userFlow: t,
2806
2867
  pageId: s,
2807
2868
  component: r,
2808
- hash: l,
2809
- responseKey: i,
2810
- required: o,
2869
+ hash: i,
2870
+ responseKey: l,
2871
+ required: c,
2811
2872
  dependencies: n,
2812
2873
  ...d
2813
2874
  } = e, a = {
2814
2875
  ...d
2815
- }, [u, h] = L((a == null ? void 0 : a.value) ?? ""), { disabled: _ } = I(
2876
+ }, [_, u] = R((a == null ? void 0 : a.value) ?? ""), { disabled: h } = I(
2816
2877
  t,
2817
2878
  n
2818
- ), f = (a == null ? void 0 : a.disabled) ?? _, g = A(() => o && (a != null && a.label) ? `${a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, o]), x = (m) => {
2819
- var p;
2820
- const y = (p = m == null ? void 0 : m.target) == null ? void 0 : p.value;
2821
- h(y), q(t, { [i]: y });
2879
+ ), f = (a == null ? void 0 : a.disabled) ?? h, m = E(() => c && (a != null && a.label) ? `${a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, c]), g = (x) => {
2880
+ var b;
2881
+ const y = (b = x == null ? void 0 : x.target) == null ? void 0 : b.value;
2882
+ u(y), $(t, { [l]: y });
2822
2883
  };
2823
- return V(() => {
2824
- h((a == null ? void 0 : a.value) ?? "");
2825
- }, [a == null ? void 0 : a.value]), /* @__PURE__ */ c.jsx(
2826
- $t,
2884
+ return U(() => {
2885
+ u((a == null ? void 0 : a.value) ?? "");
2886
+ }, [a == null ? void 0 : a.value]), /* @__PURE__ */ o.jsx(
2887
+ Bt,
2827
2888
  {
2828
2889
  ...a,
2829
- label: g,
2830
- value: u,
2890
+ label: m,
2891
+ value: _,
2831
2892
  disabled: f,
2832
- onChange: (m) => !f && x(m)
2893
+ onChange: (x) => !f && g(x)
2833
2894
  }
2834
2895
  );
2835
- }, ka = "_textFieldNotFront_1n8fy_1", Ea = {
2836
- textFieldNotFront: ka
2837
- }, Ta = (e) => {
2896
+ }, Ra = "_textFieldNotFront_1n8fy_1", Da = {
2897
+ textFieldNotFront: Ra
2898
+ }, La = (e) => {
2838
2899
  const {
2839
2900
  userFlow: t,
2840
2901
  pageId: s,
2841
2902
  component: r,
2842
- hash: l,
2843
- responseKey: i,
2844
- required: o,
2903
+ hash: i,
2904
+ responseKey: l,
2905
+ required: c,
2845
2906
  dependencies: n,
2846
2907
  ...d
2847
2908
  } = e, a = {
2848
2909
  ...d
2849
- }, [u, h] = L((a == null ? void 0 : a.value) ?? ""), { disabled: _ } = I(
2910
+ }, [_, u] = R((a == null ? void 0 : a.value) ?? ""), { disabled: h } = I(
2850
2911
  t,
2851
2912
  n
2852
- ), f = (a == null ? void 0 : a.disabled) ?? _, g = A(() => o && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, o]), x = (m) => {
2853
- var b;
2854
- const y = (b = m == null ? void 0 : m.target) == null ? void 0 : b.value;
2855
- h(y);
2856
- const p = {
2857
- [i]: y
2913
+ ), f = (a == null ? void 0 : a.disabled) ?? h, m = E(() => c && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, c]), g = (x) => {
2914
+ var p;
2915
+ const y = (p = x == null ? void 0 : x.target) == null ? void 0 : p.value;
2916
+ u(y);
2917
+ const b = {
2918
+ [l]: y
2858
2919
  };
2859
- q(t, p);
2920
+ $(t, b);
2860
2921
  };
2861
- return V(() => {
2862
- h((a == null ? void 0 : a.value) ?? "");
2863
- }, [a == null ? void 0 : a.value]), /* @__PURE__ */ c.jsx(
2864
- qt,
2922
+ return U(() => {
2923
+ u((a == null ? void 0 : a.value) ?? "");
2924
+ }, [a == null ? void 0 : a.value]), /* @__PURE__ */ o.jsx(
2925
+ Gt,
2865
2926
  {
2866
2927
  ...a,
2867
- className: Ea.textFieldNotFront,
2928
+ className: Da.textFieldNotFront,
2868
2929
  allowClear: !1,
2869
- label: g,
2870
- value: u,
2930
+ label: m,
2931
+ value: _,
2871
2932
  disabled: f,
2872
- onChange: (m) => !f && x(m)
2933
+ onChange: (x) => !f && g(x)
2873
2934
  }
2874
2935
  );
2875
- }, Oa = ({
2936
+ }, Ia = ({
2876
2937
  userFlow: e,
2877
2938
  pageId: t,
2878
2939
  responseKey: s,
2879
2940
  variant: r,
2880
- content: l,
2881
- actionType: i,
2882
- redirectUrl: o
2941
+ content: i,
2942
+ actionType: l,
2943
+ redirectUrl: c
2883
2944
  }) => {
2884
- const n = R(async () => {
2885
- je(e);
2945
+ const n = L(async () => {
2946
+ ve(e);
2886
2947
  try {
2887
- switch (i) {
2948
+ switch (l) {
2888
2949
  case "AUTOCLOSE_AND_REDIRECT":
2889
- window.location.href = o;
2950
+ window.location.href = c;
2890
2951
  break;
2891
2952
  default:
2892
- console.warn(`Unhandled actionType: ${i}`);
2953
+ console.warn(`Unhandled actionType: ${l}`);
2893
2954
  break;
2894
2955
  }
2895
2956
  } catch (d) {
2896
2957
  console.error("Error in toast action:", d), alert(JSON.stringify(d));
2897
2958
  }
2898
- }, [i, t, s, e, o]);
2899
- return V(() => {
2959
+ }, [l, t, s, e, c]);
2960
+ return U(() => {
2900
2961
  ({
2901
- info: ee.info,
2902
- error: ee.error,
2903
- success: ee.success,
2904
- warning: ee.warning
2905
- }[r] || ee.info)(l, {
2906
- autoClose: i ? !1 : 4e3,
2962
+ info: se.info,
2963
+ error: se.error,
2964
+ success: se.success,
2965
+ warning: se.warning
2966
+ }[r] || se.info)(i, {
2967
+ autoClose: l ? !1 : 4e3,
2907
2968
  containerId: e,
2908
2969
  onClose: n
2909
2970
  });
2910
2971
  }, [n, e]), null;
2911
- }, Aa = "_tooltipNotFront_106iw_1", $a = "_tooltipNotFront_content_106iw_5", Ue = {
2912
- tooltipNotFront: Aa,
2913
- tooltipNotFront_content: $a
2914
- }, qa = (e) => {
2972
+ }, Ba = "_tooltipNotFront_106iw_1", Ga = "_tooltipNotFront_content_106iw_5", Qe = {
2973
+ tooltipNotFront: Ba,
2974
+ tooltipNotFront_content: Ga
2975
+ }, Ka = (e) => {
2915
2976
  const {
2916
2977
  userFlow: t,
2917
2978
  pageId: s,
2918
2979
  component: r,
2919
- hash: l,
2920
- responseKey: i,
2921
- content: o,
2980
+ hash: i,
2981
+ responseKey: l,
2982
+ content: c,
2922
2983
  label: n,
2923
2984
  placement: d,
2924
2985
  notShowArrow: a,
2925
- visible: u
2926
- } = e, h = O(
2986
+ visible: _
2987
+ } = e, u = S(
2927
2988
  t,
2928
2989
  s,
2929
- o != null && o.length ? o : null
2930
- ), _ = h && h.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ue.tooltipNotFront_content, children: h.map((f, g) => /* @__PURE__ */ c.jsx(T, { children: f }, `tooltip-${l}-${g}`)) }) : null;
2931
- return /* @__PURE__ */ c.jsx(
2932
- Dt,
2990
+ c != null && c.length ? c : null
2991
+ ), h = u && u.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Qe.tooltipNotFront_content, children: u.map((f, m) => /* @__PURE__ */ o.jsx(T, { children: f }, `tooltip-${i}-${m}`)) }) : null;
2992
+ return /* @__PURE__ */ o.jsx(
2993
+ Kt,
2933
2994
  {
2934
- className: Ue.tooltipNotFront,
2995
+ className: Qe.tooltipNotFront,
2935
2996
  label: n,
2936
2997
  placement: d,
2937
2998
  notShowArrow: a,
2938
- visible: u,
2939
- children: _
2999
+ visible: _,
3000
+ children: h
2940
3001
  }
2941
3002
  );
2942
3003
  };
2943
- function Wa({
3004
+ function rr({
2944
3005
  sessionName: e,
2945
3006
  apiConfig: t,
2946
3007
  onResolveComponentProps: s,
2947
3008
  children: r
2948
3009
  }) {
2949
- const l = Da(
3010
+ const i = za(
2950
3011
  e,
2951
3012
  t,
2952
3013
  null,
2953
3014
  s
2954
3015
  );
2955
- return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2956
- l,
3016
+ return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3017
+ i,
2957
3018
  r
2958
3019
  ] });
2959
3020
  }
2960
- const Ve = (e, t, s, r, l) => {
2961
- const i = O(
3021
+ const Ma = { api: "", headers: {} }, Ua = ({
3022
+ userFlow: e,
3023
+ components: t,
3024
+ hash: s,
3025
+ apiConfig: r
3026
+ }) => {
3027
+ const i = s ?? `${e}-page`;
3028
+ R(() => {
3029
+ var d, a;
3030
+ return (a = (d = N.getState()[e]) == null ? void 0 : d.pages) != null && a[i] || ce(e, r ?? Ma, {
3031
+ type: "page",
3032
+ hash: i,
3033
+ body: { components: t }
3034
+ }), null;
3035
+ });
3036
+ const l = S(e, i, t);
3037
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: l });
3038
+ };
3039
+ function Va(e) {
3040
+ if (e == null || typeof e != "object" || !("components" in e) || !Array.isArray(e.components))
3041
+ throw new Error(
3042
+ "[renderNotFront] payload.display must be an object with a `components` array"
3043
+ );
3044
+ return e.components;
3045
+ }
3046
+ const Ha = ({ payload: e, userFlow: t }) => {
3047
+ const s = Va(e.display), r = Ua({
3048
+ userFlow: t,
3049
+ hash: e.id,
3050
+ components: s
3051
+ });
3052
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: r });
3053
+ }, or = Ha, Ye = (e, t, s, r, i) => {
3054
+ const l = S(
2962
3055
  e,
2963
3056
  t,
2964
3057
  (r == null ? void 0 : r.components) || null,
2965
- l
3058
+ i
2966
3059
  );
2967
3060
  switch (s) {
2968
3061
  case "body":
2969
- return /* @__PURE__ */ c.jsx(
2970
- qn,
3062
+ return /* @__PURE__ */ o.jsx(
3063
+ Kn,
2971
3064
  {
2972
3065
  ...r,
2973
- inputs: i || []
3066
+ inputs: l || []
2974
3067
  },
2975
3068
  JSON.stringify(r == null ? void 0 : r.components)
2976
3069
  );
2977
3070
  case "header":
2978
- return /* @__PURE__ */ c.jsx(
2979
- Is,
3071
+ return /* @__PURE__ */ o.jsx(
3072
+ Vs,
2980
3073
  {
2981
3074
  ...r,
2982
- components: i || []
3075
+ components: l || []
2983
3076
  },
2984
3077
  JSON.stringify(r == null ? void 0 : r.components)
2985
3078
  );
2986
3079
  default:
2987
3080
  return null;
2988
3081
  }
2989
- }, Da = (e, t, s, r) => {
2990
- var _, f, g;
2991
- const [l, i] = L(!1), o = v((x) => x), n = (_ = o[e]) == null ? void 0 : _.currentPageId;
2992
- V(() => {
3082
+ }, za = (e, t, s, r) => {
3083
+ var h, f, m;
3084
+ const [i, l] = R(!1), c = N((g) => g), n = (h = c[e]) == null ? void 0 : h.currentPageId;
3085
+ U(() => {
2993
3086
  if (typeof window > "u") return;
2994
- const x = new URL(window.location.href), m = x.searchParams.get("sessionId");
2995
- m && (sessionStorage.setItem("sessionId", m), x.searchParams.delete("sessionId"), window.history.replaceState({}, "", x.toString()));
3087
+ const g = new URL(window.location.href), x = g.searchParams.get("sessionId");
3088
+ x && (sessionStorage.setItem("sessionId", x), g.searchParams.delete("sessionId"), window.history.replaceState({}, "", g.toString()));
2996
3089
  }, []);
2997
- const d = n ? Ve(
3090
+ const d = n ? Ye(
2998
3091
  e,
2999
3092
  n,
3000
3093
  "header",
3001
- ((f = o[e].pages[n].page) == null ? void 0 : f.header) || null,
3094
+ ((f = c[e].pages[n].page) == null ? void 0 : f.header) || null,
3002
3095
  r
3003
- ) : null, a = n ? Ve(
3096
+ ) : null, a = n ? Ye(
3004
3097
  e,
3005
3098
  n,
3006
3099
  "body",
3007
- ((g = o[e].pages[n].page) == null ? void 0 : g.body) || null,
3100
+ ((m = c[e].pages[n].page) == null ? void 0 : m.body) || null,
3008
3101
  r
3009
- ) : null, u = A(() => {
3010
- var x;
3011
- return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3012
- ((x = o[e]) == null ? void 0 : x.isLoading) && /* @__PURE__ */ c.jsx(Rt, {}),
3102
+ ) : null, _ = E(() => {
3103
+ var g;
3104
+ return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3105
+ ((g = c[e]) == null ? void 0 : g.isLoading) && /* @__PURE__ */ o.jsx(Mt, {}),
3013
3106
  d,
3014
3107
  a,
3015
- n && /* @__PURE__ */ c.jsx(Vs, { userFlow: e, pageId: n }),
3016
- o[e] && /* @__PURE__ */ c.jsx(Lt, {})
3108
+ n && /* @__PURE__ */ o.jsx(Qs, { userFlow: e, pageId: n }),
3109
+ c[e] && /* @__PURE__ */ o.jsx(Ut, {})
3017
3110
  ] });
3018
- }, [d, a, n, e]), h = async () => {
3111
+ }, [d, a, n, e]), u = async () => {
3019
3112
  try {
3020
- const x = await Ze(
3113
+ const g = await at(
3021
3114
  t,
3022
3115
  e
3023
- ), m = x == null ? void 0 : x.data, y = m == null ? void 0 : m.content;
3024
- (x == null ? void 0 : x.status) === 200 ? de(e, t, y, m == null ? void 0 : m.sessionState) : i(!0);
3025
- } catch (x) {
3026
- console.error("[not-page]: API call failed", x), i(!0);
3116
+ ), x = g == null ? void 0 : g.data, y = x == null ? void 0 : x.content;
3117
+ (g == null ? void 0 : g.status) === 200 ? ce(e, t, y, x == null ? void 0 : x.sessionState) : l(!0);
3118
+ } catch (g) {
3119
+ console.error("[not-page]: API call failed", g), l(!0);
3027
3120
  }
3028
3121
  };
3029
- return V(() => {
3030
- t != null && t.api && !s && e ? h() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? de(e, t, s) : (!(t != null && t.api) && !s || !e) && (i(!0), console.error(
3122
+ return U(() => {
3123
+ t != null && t.api && !s && e ? u() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? ce(e, t, s) : (!(t != null && t.api) && !s || !e) && (l(!0), console.error(
3031
3124
  "[not-page]: API call failed",
3032
3125
  "not api config",
3033
3126
  "not userFlow"
3034
3127
  ));
3035
- const x = "avocado-theme-mode-changed", m = (y) => {
3036
- const p = y.detail;
3037
- ne.setThemeMode(p);
3128
+ const g = "avocado-theme-mode-changed", x = (y) => {
3129
+ const b = y.detail;
3130
+ re.setThemeMode(b);
3038
3131
  };
3039
- return window.addEventListener(x, m), () => {
3040
- window.removeEventListener(x, m);
3132
+ return window.addEventListener(g, x), () => {
3133
+ window.removeEventListener(g, x);
3041
3134
  };
3042
- }, []), l && console.error("[not-page]: No render page"), u;
3135
+ }, []), i && console.error("[not-page]: No render page"), _;
3043
3136
  };
3044
3137
  export {
3045
- ms as Chart,
3046
- Wa as NotFrontPage,
3047
- Ys as Row,
3048
- fn as heading,
3049
- yn as text,
3050
- Da as usePage
3138
+ Cs as Chart,
3139
+ rr as NotFrontPage,
3140
+ Ha as RenderNotFront,
3141
+ na as Row,
3142
+ Va as extractNotFrontComponents,
3143
+ pn as heading,
3144
+ or as renderNotFront,
3145
+ jn as text,
3146
+ Ua as useNotFrontFragment,
3147
+ za as usePage
3051
3148
  };