@foris/avocado-not-front 4.6.3 → 4.7.0-beta.0.5

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