@epam/statgpt-ui-components 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,30 +1,30 @@
1
- import { jsx as s, jsxs as u, Fragment as q } from "react/jsx-runtime";
2
- import * as de from "react";
3
- import { useEffect as O, useState as j, useRef as W, useCallback as P, useMemo as U, useId as ue, createContext as Q, useContext as K } from "react";
4
- import p from "classnames";
5
- import { IconX as me, IconCalendarEvent as he, IconSquareCheckFilled as fe, IconChevronDown as pe, IconGripVertical as X, IconChevronRight as Z, IconDatabase as ge } from "@tabler/icons-react";
6
- import { extendTailwindMerge as xe } from "tailwind-merge";
7
- import be from "react-flatpickr";
1
+ import { jsx as r, jsxs as m, Fragment as q } from "react/jsx-runtime";
2
+ import * as ue from "react";
3
+ import { useEffect as O, useState as j, useRef as W, useCallback as P, useMemo as U, useId as me, createContext as Q, useContext as K } from "react";
4
+ import g from "classnames";
5
+ import { IconX as he, IconCalendarEvent as fe, IconSquareCheckFilled as pe, IconChevronDown as ge, IconGripVertical as X, IconChevronRight as Z, IconDatabase as xe } from "@tabler/icons-react";
6
+ import { extendTailwindMerge as be } from "tailwind-merge";
7
+ import Ne from "react-flatpickr";
8
8
  import { CalendarResolution as A } from "@epam/statgpt-shared-toolkit";
9
- import { useFloating as J, useRole as Ne, useDismiss as ee, useInteractions as te, FloatingPortal as we, FloatingOverlay as ve, FloatingFocusManager as Ce, autoUpdate as ye, offset as Ee, flip as Ie, size as Se, shift as ke, useClick as De } from "@floating-ui/react";
9
+ import { useFloating as J, useRole as we, useDismiss as ee, useInteractions as te, FloatingPortal as ne, FloatingOverlay as ve, FloatingFocusManager as Ce, autoUpdate as ye, offset as Ee, flip as Ie, size as Se, shift as ke, useClick as De } from "@floating-ui/react";
10
10
  import { useSensors as Le, useSensor as Oe, PointerSensor as Fe, DndContext as Re, closestCenter as _e, DragOverlay as Ae } from "@dnd-kit/core";
11
11
  import { useSortable as Me, SortableContext as Te, verticalListSortingStrategy as Pe, arrayMove as Ye } from "@dnd-kit/sortable";
12
12
  import { CSS as je } from "@dnd-kit/utilities";
13
- const ne = ({
13
+ const re = ({
14
14
  title: e,
15
15
  btnClassNames: t,
16
16
  iconWidth: n,
17
- iconHeight: r,
18
- onClick: a
19
- }) => /* @__PURE__ */ s(
17
+ iconHeight: s,
18
+ onClick: l
19
+ }) => /* @__PURE__ */ r(
20
20
  "button",
21
21
  {
22
22
  type: "button",
23
23
  "aria-label": "button",
24
24
  className: t,
25
25
  title: e,
26
- onClick: a,
27
- children: /* @__PURE__ */ s(me, { height: r || 20, width: n || 20 })
26
+ onClick: l,
27
+ children: /* @__PURE__ */ r(he, { height: s || 20, width: n || 20 })
28
28
  }
29
29
  );
30
30
  var _ = /* @__PURE__ */ ((e) => (e.INFO = "info", e.ERROR = "error", e.SUCCESS = "success", e.IN_PROGRESS = "in_progress", e))(_ || {});
@@ -32,44 +32,44 @@ const ze = 3e4, bt = ({
32
32
  alertDetails: e,
33
33
  infoIcon: t,
34
34
  successIcon: n,
35
- errorIcon: r,
36
- onClose: a,
37
- closeButtonTitle: l,
35
+ errorIcon: s,
36
+ onClose: l,
37
+ closeButtonTitle: a,
38
38
  children: c
39
39
  }) => {
40
- const i = e?.type, m = i === _.IN_PROGRESS || i === _.INFO, h = () => m ? "alert-in-progress" : i === _.SUCCESS ? "alert-success" : "alert-error", f = m ? t : i === _.SUCCESS ? n : i === _.ERROR ? r : null, g = e?.text;
40
+ const i = e?.type, h = i === _.IN_PROGRESS || i === _.INFO, d = () => h ? "alert-in-progress" : i === _.SUCCESS ? "alert-success" : "alert-error", p = h ? t : i === _.SUCCESS ? n : i === _.ERROR ? s : null, f = e?.text;
41
41
  return O(() => {
42
- if (!e || m)
42
+ if (!e || h)
43
43
  return;
44
- const C = setTimeout(() => {
45
- a?.();
44
+ const v = setTimeout(() => {
45
+ l?.();
46
46
  }, ze);
47
- return () => clearTimeout(C);
48
- }, [e, m, a]), /* @__PURE__ */ s(
47
+ return () => clearTimeout(v);
48
+ }, [e, h, l]), /* @__PURE__ */ r(
49
49
  "div",
50
50
  {
51
- className: p(
51
+ className: g(
52
52
  "alert alert-shadow fixed bottom-3 right-3 z-10 w-[min(380px,calc(100vw-24px))] max-w-[calc(100vw-24px)]",
53
- h()
53
+ d()
54
54
  ),
55
- children: /* @__PURE__ */ u("div", { className: "alert-content flex items-start", children: [
56
- f && /* @__PURE__ */ s("div", { className: "alert-icon", children: f }),
57
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
58
- /* @__PURE__ */ s("h3", { className: "alert-title truncate", children: e?.title }),
59
- c ?? (g && /* @__PURE__ */ s(
55
+ children: /* @__PURE__ */ m("div", { className: "alert-content flex items-start", children: [
56
+ p && /* @__PURE__ */ r("div", { className: "alert-icon", children: p }),
57
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
58
+ /* @__PURE__ */ r("h3", { className: "alert-title truncate", children: e?.title }),
59
+ c ?? (f && /* @__PURE__ */ r(
60
60
  "div",
61
61
  {
62
62
  className: "alert-text whitespace-pre-line break-words",
63
- title: g,
64
- children: g
63
+ title: f,
64
+ children: f
65
65
  }
66
66
  ))
67
67
  ] }),
68
- /* @__PURE__ */ s(ne, { title: l, onClick: a })
68
+ /* @__PURE__ */ r(re, { title: a, onClick: l })
69
69
  ] })
70
70
  }
71
71
  );
72
- }, He = () => /* @__PURE__ */ s("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ s("div", { className: "loader" }) }), $e = xe({
72
+ }, He = () => /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ r("div", { className: "loader" }) }), $e = be({
73
73
  extend: {
74
74
  classGroups: {
75
75
  typography: [
@@ -87,43 +87,43 @@ const ze = 3e4, bt = ({
87
87
  }
88
88
  });
89
89
  function F(...e) {
90
- return $e(p(...e));
90
+ return $e(g(...e));
91
91
  }
92
92
  const Ge = ({
93
93
  buttonClassName: e,
94
94
  textClassName: t,
95
95
  isLoading: n = !1,
96
- title: r,
97
- disabled: a,
98
- iconAfter: l,
96
+ title: s,
97
+ disabled: l,
98
+ iconAfter: a,
99
99
  iconBefore: c,
100
100
  onClick: i,
101
- isSmallButton: m
101
+ isSmallButton: h
102
102
  }) => {
103
- const h = F([
104
- m ? "font-semibold" : "",
105
- l ? "mr-2" : "",
103
+ const d = F([
104
+ h ? "font-semibold" : "",
105
+ a ? "mr-2" : "",
106
106
  c ? "ml-2" : "",
107
107
  t
108
108
  ]);
109
- return /* @__PURE__ */ u(
109
+ return /* @__PURE__ */ m(
110
110
  "button",
111
111
  {
112
112
  type: "button",
113
- className: p(
113
+ className: g(
114
114
  "base-button",
115
115
  e,
116
- m ? "small-button" : ""
116
+ h ? "small-button" : ""
117
117
  ),
118
- disabled: a || n,
118
+ disabled: l || n,
119
119
  "aria-label": "button",
120
- onClick: (f) => i?.(f),
121
- title: r,
120
+ onClick: (p) => i?.(p),
121
+ title: s,
122
122
  children: [
123
123
  c,
124
- n && /* @__PURE__ */ s(He, {}),
125
- r ? m ? /* @__PURE__ */ s("h4", { className: h, children: r }) : /* @__PURE__ */ s("h3", { className: h, children: r }) : null,
126
- l
124
+ n && /* @__PURE__ */ r(He, {}),
125
+ s ? h ? /* @__PURE__ */ r("h4", { className: d, children: s }) : /* @__PURE__ */ r("h3", { className: d, children: s }) : null,
126
+ a
127
127
  ]
128
128
  }
129
129
  );
@@ -133,18 +133,18 @@ function Be(e = 719) {
133
133
  () => typeof window < "u" ? window.innerWidth < e : !1
134
134
  );
135
135
  return O(() => {
136
- const r = window.matchMedia(`(max-width: ${e}px)`), a = (l) => {
137
- n(l.matches);
136
+ const s = window.matchMedia(`(max-width: ${e}px)`), l = (a) => {
137
+ n(a.matches);
138
138
  };
139
- return n(r.matches), r.addEventListener("change", a), () => r.removeEventListener("change", a);
139
+ return n(s.matches), s.addEventListener("change", l), () => s.removeEventListener("change", l);
140
140
  }, [e]), t;
141
141
  }
142
142
  function Nt(e, t) {
143
143
  const n = W(null);
144
144
  return P(
145
- (...a) => {
145
+ (...l) => {
146
146
  n.current && clearTimeout(n.current), n.current = setTimeout(() => {
147
- e(...a);
147
+ e(...l);
148
148
  }, t);
149
149
  },
150
150
  [e, t]
@@ -154,131 +154,131 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
154
154
  label: e,
155
155
  onChange: t,
156
156
  value: n,
157
- options: r,
158
- calendarResolution: a = A.DAY,
159
- id: l,
157
+ options: s,
158
+ calendarResolution: l = A.DAY,
159
+ id: a,
160
160
  icon: c,
161
161
  isEndDate: i
162
162
  }) => {
163
- const m = W(null), h = Be();
163
+ const h = W(null), d = Be();
164
164
  O(() => {
165
- const N = m?.current;
165
+ const N = h?.current;
166
166
  N && N.querySelector("input")?.setAttribute("aria-label", e);
167
167
  }, [e]);
168
- const f = {
169
- ...r,
168
+ const p = {
169
+ ...s,
170
170
  disableMobile: !0,
171
- defaultDate: a === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
172
- }, g = (N, v, b) => {
173
- const d = `calendar__${a === A.MONTH ? "month" : "day"}`;
174
- b.calendarContainer && b.calendarContainer.classList.add(d);
175
- }, C = (N, v, b) => {
176
- if (a === A.MONTH && N.length > 0) {
177
- const d = r.minDate, o = r.maxDate, x = N[0].getFullYear(), w = b.calendarContainer, S = "flatpickr-disabled", y = w.querySelectorAll(
171
+ defaultDate: l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n
172
+ }, f = (N, C, b) => {
173
+ const u = `calendar__${l === A.MONTH ? "month" : "day"}`;
174
+ b.calendarContainer && b.calendarContainer.classList.add(u);
175
+ }, v = (N, C, b) => {
176
+ if (l === A.MONTH && N.length > 0) {
177
+ const u = s.minDate, o = s.maxDate, x = N[0].getFullYear(), w = b.calendarContainer, S = "flatpickr-disabled", y = w.querySelectorAll(
178
178
  ".flatpickr-monthSelect-month"
179
179
  ), E = w.querySelectorAll(
180
180
  ".flatpickr-next-month"
181
181
  )[0], D = w.querySelectorAll(
182
182
  ".flatpickr-prev-month"
183
183
  )[0];
184
- x === o.getFullYear() && E.classList.add(S), x === d.getFullYear() && D.classList.add(S), (x === d.getFullYear() || x === o.getFullYear()) && y.forEach((k) => {
184
+ x === o.getFullYear() && E.classList.add(S), x === u.getFullYear() && D.classList.add(S), (x === u.getFullYear() || x === o.getFullYear()) && y.forEach((k) => {
185
185
  k.classList.remove(S);
186
- const I = new Date(k.getAttribute("aria-label")), R = I.getFullYear() === d.getFullYear() && I.getMonth() === d.getMonth(), z = I.getFullYear() === o.getFullYear() && I.getMonth() === o.getMonth();
187
- R || z || (I < d || I > o) && k.classList.add(S);
186
+ const I = new Date(k.getAttribute("aria-label")), R = I.getFullYear() === u.getFullYear() && I.getMonth() === u.getMonth(), z = I.getFullYear() === o.getFullYear() && I.getMonth() === o.getMonth();
187
+ R || z || (I < u || I > o) && k.classList.add(S);
188
188
  });
189
189
  }
190
190
  setTimeout(() => {
191
- const d = b.calendarContainer, o = b._input?.getBoundingClientRect();
192
- d && (d.style.top = `${o.top - d.offsetHeight - 8}px`, d.style.width = `${d.style.width}px`, i ? (d.style.right = `${window.innerWidth - o.right - (h ? We : 0)}px`, d.style.left = "auto") : d.style.left = `${o.left}px`);
191
+ const u = b.calendarContainer, o = b._input?.getBoundingClientRect();
192
+ u && (u.style.top = `${o.top - u.offsetHeight - 8}px`, u.style.width = `${u.style.width}px`, i ? (u.style.right = `${window.innerWidth - o.right - (d ? We : 0)}px`, u.style.left = "auto") : u.style.left = `${o.left}px`);
193
193
  }, 0);
194
194
  };
195
- return /* @__PURE__ */ u("div", { className: "calendar relative", ref: m, children: [
196
- /* @__PURE__ */ s("div", { className: "calendar-title mb-1", children: e }),
197
- /* @__PURE__ */ s(
195
+ return /* @__PURE__ */ m("div", { className: "calendar relative", ref: h, children: [
196
+ /* @__PURE__ */ r("div", { className: "calendar-title mb-1", children: e }),
197
+ /* @__PURE__ */ r(
198
198
  "label",
199
199
  {
200
- htmlFor: l,
200
+ htmlFor: a,
201
201
  className: "absolute right-[11px] top-[29px] cursor-pointer",
202
- children: c || /* @__PURE__ */ s(he, {})
202
+ children: c || /* @__PURE__ */ r(fe, {})
203
203
  }
204
204
  ),
205
- /* @__PURE__ */ s(
206
- be,
205
+ /* @__PURE__ */ r(
206
+ Ne,
207
207
  {
208
- defaultValue: (a === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
209
- options: f,
208
+ defaultValue: (l === A.MONTH ? new Date(n.getFullYear(), n.getMonth()) : n)?.toDateString(),
209
+ options: p,
210
210
  onChange: (N) => {
211
211
  t(N[0]);
212
212
  },
213
- onOpen: [C],
214
- onReady: [g],
215
- id: l
213
+ onOpen: [v],
214
+ onReady: [f],
215
+ id: a
216
216
  }
217
217
  )
218
218
  ] });
219
- }, re = ({
219
+ }, se = ({
220
220
  label: e,
221
221
  id: t,
222
222
  checked: n,
223
- checkboxIcon: r,
224
- onChange: a,
225
- disabled: l = !1,
223
+ checkboxIcon: s,
224
+ onChange: l,
225
+ disabled: a = !1,
226
226
  className: c,
227
227
  stopPropagation: i = !0
228
228
  }) => {
229
- const m = P(
230
- (g) => {
231
- i && g.stopPropagation();
229
+ const h = P(
230
+ (f) => {
231
+ i && f.stopPropagation();
232
232
  },
233
233
  [i]
234
- ), h = P(
235
- (g) => {
236
- i && g.stopPropagation(), a?.(t, g.target.checked);
234
+ ), d = P(
235
+ (f) => {
236
+ i && f.stopPropagation(), l?.(t, f.target.checked);
237
237
  },
238
- [a, t, i]
239
- ), f = () => {
238
+ [l, t, i]
239
+ ), p = () => {
240
240
  if (n)
241
- return r || /* @__PURE__ */ s(fe, { className: "absolute size-4" });
241
+ return s || /* @__PURE__ */ r(pe, { className: "absolute size-4" });
242
242
  };
243
- return /* @__PURE__ */ u(
243
+ return /* @__PURE__ */ m(
244
244
  "label",
245
245
  {
246
246
  htmlFor: t,
247
- onClick: m,
247
+ onClick: h,
248
248
  className: F(
249
249
  "flex min-w-0 items-center py-1 shrink-0",
250
- l ? "cursor-not-allowed opacity-50" : "cursor-pointer",
250
+ a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
251
251
  c
252
252
  ),
253
253
  children: [
254
- /* @__PURE__ */ s(
254
+ /* @__PURE__ */ r(
255
255
  "span",
256
256
  {
257
- className: p(
257
+ className: g(
258
258
  "checkbox-button relative flex size-[14px] items-center justify-center"
259
259
  ),
260
260
  "aria-hidden": !0,
261
- children: f()
261
+ children: p()
262
262
  }
263
263
  ),
264
- e ? /* @__PURE__ */ s(
264
+ e ? /* @__PURE__ */ r(
265
265
  "p",
266
266
  {
267
- className: p(
267
+ className: g(
268
268
  "checkbox-button-text text-neutrals-1000 min-w-0 ml-2 flex-1 truncate pr-2"
269
269
  ),
270
270
  title: e,
271
271
  children: e
272
272
  }
273
273
  ) : null,
274
- /* @__PURE__ */ s(
274
+ /* @__PURE__ */ r(
275
275
  "input",
276
276
  {
277
277
  id: t,
278
278
  type: "checkbox",
279
279
  checked: n,
280
- disabled: l,
281
- onChange: h,
280
+ disabled: a,
281
+ onChange: d,
282
282
  className: "hidden"
283
283
  }
284
284
  )
@@ -289,49 +289,49 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
289
289
  title: e,
290
290
  icon: t,
291
291
  children: n,
292
- value: r
292
+ value: s
293
293
  }) => {
294
- const [a, l] = j(!1);
295
- return /* @__PURE__ */ u(
294
+ const [l, a] = j(!1);
295
+ return /* @__PURE__ */ m(
296
296
  "div",
297
297
  {
298
- className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${a ? "collapsible-block-open" : ""}`,
298
+ className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${l ? "collapsible-block-open" : ""}`,
299
299
  children: [
300
- /* @__PURE__ */ u(
300
+ /* @__PURE__ */ m(
301
301
  "div",
302
302
  {
303
303
  className: "collapsible-block-title flex cursor-pointer items-center py-4",
304
- onClick: () => l(!a),
304
+ onClick: () => a(!l),
305
305
  children: [
306
- /* @__PURE__ */ s("div", { className: `${a ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ s(pe, { className: "mr-3 size-5" }) }),
307
- /* @__PURE__ */ u("div", { className: "flex flex-1 items-center justify-between", children: [
308
- /* @__PURE__ */ s("span", { children: e }),
309
- r && /* @__PURE__ */ s("p", { className: "body-1 text-neutrals-800", children: r })
306
+ /* @__PURE__ */ r("div", { className: `${l ? "rotate-180" : ""} transition-transform`, children: t || /* @__PURE__ */ r(ge, { className: "mr-3 size-5" }) }),
307
+ /* @__PURE__ */ m("div", { className: "flex flex-1 items-center justify-between", children: [
308
+ /* @__PURE__ */ r("span", { children: e }),
309
+ s && /* @__PURE__ */ r("p", { className: "body-1 text-neutrals-800", children: s })
310
310
  ] })
311
311
  ]
312
312
  }
313
313
  ),
314
- a && /* @__PURE__ */ s("div", { className: "collapsible-block-content pb-4", children: n })
314
+ l && /* @__PURE__ */ r("div", { className: "collapsible-block-content pb-4", children: n })
315
315
  ]
316
316
  }
317
317
  );
318
318
  }, Et = ({ text: e, highlightText: t }) => {
319
319
  const n = U(() => {
320
- const r = [];
320
+ const s = [];
321
321
  if (!t)
322
322
  return [{ id: 0, text: e, highlight: !1 }];
323
- const a = t?.toLowerCase() || "", l = e?.toLowerCase()?.split(a) || "";
324
- for (let c = 0, i = 0; c < l?.length; c++) {
325
- const m = l?.[c], h = m.length;
326
- m !== "" && r.push({
327
- id: r.length,
323
+ const l = t?.toLowerCase() || "", a = e?.toLowerCase()?.split(l) || "";
324
+ for (let c = 0, i = 0; c < a?.length; c++) {
325
+ const h = a?.[c], d = h.length;
326
+ h !== "" && s.push({
327
+ id: s.length,
328
328
  highlight: !1,
329
329
  text: e?.substring(
330
330
  i,
331
- i + h
331
+ i + d
332
332
  )
333
- }), i += h, c !== l?.length - 1 && (r.push({
334
- id: r.length,
333
+ }), i += d, c !== a?.length - 1 && (s.push({
334
+ id: s.length,
335
335
  highlight: !0,
336
336
  text: e?.substring(
337
337
  i,
@@ -339,34 +339,34 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
339
339
  )
340
340
  }), i += t.length);
341
341
  }
342
- return r;
342
+ return s;
343
343
  }, [t, e]);
344
- return /* @__PURE__ */ s(q, { children: n.map((r) => /* @__PURE__ */ s(
344
+ return /* @__PURE__ */ r(q, { children: n.map((s) => /* @__PURE__ */ r(
345
345
  "span",
346
346
  {
347
- className: p(r?.highlight && "bg-highlight"),
348
- children: r?.text
347
+ className: g(s?.highlight && "bg-highlight"),
348
+ children: s?.text
349
349
  },
350
- r?.id
350
+ s?.id
351
351
  )) });
352
352
  }, It = ({
353
353
  icon: e,
354
354
  onClick: t,
355
355
  buttonClassName: n,
356
- disabled: r,
357
- title: a,
358
- isBaseIconStyles: l = !0
359
- }) => /* @__PURE__ */ s(
356
+ disabled: s,
357
+ title: l,
358
+ isBaseIconStyles: a = !0
359
+ }) => /* @__PURE__ */ r(
360
360
  "button",
361
361
  {
362
362
  type: "button",
363
- className: p(
364
- l && "base-icon-button",
363
+ className: g(
364
+ a && "base-icon-button",
365
365
  n
366
366
  ),
367
367
  onClick: (c) => t?.(c),
368
- disabled: r,
369
- title: a,
368
+ disabled: s,
369
+ title: l,
370
370
  "aria-label": "button",
371
371
  children: e
372
372
  }
@@ -374,53 +374,53 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
374
374
  value: e,
375
375
  inputId: t,
376
376
  placeholder: n = "",
377
- cssClass: r = "",
378
- type: a = "text",
379
- disabled: l,
377
+ cssClass: s = "",
378
+ type: l = "text",
379
+ disabled: a,
380
380
  readonly: c,
381
381
  onChange: i,
382
- onKeyDown: m,
383
- onFocus: h,
384
- onBlur: f
382
+ onKeyDown: h,
383
+ onFocus: d,
384
+ onBlur: p
385
385
  }) => {
386
- const g = p(
386
+ const f = g(
387
387
  "truncate outline-none shadow-none body-1",
388
- r,
388
+ s,
389
389
  c ? "pointer-events-none" : ""
390
390
  );
391
- return /* @__PURE__ */ s(
391
+ return /* @__PURE__ */ r(
392
392
  "input",
393
393
  {
394
- type: a,
394
+ type: l,
395
395
  autoComplete: "off",
396
396
  id: t,
397
397
  placeholder: n,
398
398
  value: e || "",
399
399
  title: e ? String(e) : "",
400
- disabled: l,
401
- className: g,
402
- onKeyDown: m,
403
- onFocus: h,
404
- onBlur: f,
405
- onChange: (C) => i?.(C.currentTarget.value)
400
+ disabled: a,
401
+ className: f,
402
+ onKeyDown: h,
403
+ onFocus: d,
404
+ onBlur: p,
405
+ onChange: (v) => i?.(v.currentTarget.value)
406
406
  }
407
407
  );
408
408
  }, St = ({
409
409
  iconBeforeInput: e,
410
410
  iconAfterInput: t,
411
411
  containerClasses: n,
412
- cssClass: r,
413
- ...a
414
- }) => /* @__PURE__ */ u("div", { className: p("input w-full flex flex-row", n), children: [
412
+ cssClass: s,
413
+ ...l
414
+ }) => /* @__PURE__ */ m("div", { className: g("input w-full flex flex-row", n), children: [
415
415
  e,
416
- /* @__PURE__ */ s(
416
+ /* @__PURE__ */ r(
417
417
  Ue,
418
418
  {
419
- cssClass: p(
419
+ cssClass: g(
420
420
  "border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
421
- r
421
+ s
422
422
  ),
423
- ...a
423
+ ...l
424
424
  }
425
425
  ),
426
426
  t
@@ -428,74 +428,74 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
428
428
  url: e,
429
429
  title: t,
430
430
  linkClassName: n = "",
431
- iconBefore: r,
432
- iconAfter: a
431
+ iconBefore: s,
432
+ iconAfter: l
433
433
  }) => {
434
- const l = p(
435
- a ? "mr-2" : "",
436
- r ? "ml-2" : ""
434
+ const a = g(
435
+ l ? "mr-2" : "",
436
+ s ? "ml-2" : ""
437
437
  );
438
- return /* @__PURE__ */ u(
438
+ return /* @__PURE__ */ m(
439
439
  "a",
440
440
  {
441
441
  href: e,
442
442
  target: "_blank",
443
443
  rel: "noopener noreferrer",
444
- className: p("base-link", n),
444
+ className: g("base-link", n),
445
445
  title: t,
446
446
  children: [
447
- r,
448
- /* @__PURE__ */ s("span", { className: l, children: t }),
449
- a
447
+ s,
448
+ /* @__PURE__ */ r("span", { className: a, children: t }),
449
+ l
450
450
  ]
451
451
  }
452
452
  );
453
- }, Dt = ({ title: e, text: t, disabled: n, onClick: r }) => /* @__PURE__ */ s(
453
+ }, Dt = ({ title: e, text: t, disabled: n, onClick: s }) => /* @__PURE__ */ r(
454
454
  "button",
455
455
  {
456
456
  type: "button",
457
- className: p(
457
+ className: g(
458
458
  "tag flex items-center justify-center",
459
459
  "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-neutrals-100"
460
460
  ),
461
461
  disabled: n,
462
- onClick: () => r?.(t || e),
462
+ onClick: () => s?.(t || e),
463
463
  "aria-label": "button",
464
- children: /* @__PURE__ */ s("h4", { children: e })
464
+ children: /* @__PURE__ */ r("h4", { children: e })
465
465
  }
466
466
  ), Lt = ({
467
467
  label: e,
468
468
  id: t,
469
469
  checked: n,
470
- radioIcon: r,
471
- description: a,
472
- onChange: l
470
+ radioIcon: s,
471
+ description: l,
472
+ onChange: a
473
473
  }) => {
474
474
  const c = P(
475
475
  (i) => {
476
- i.stopPropagation(), l?.(t, i.target.checked);
476
+ i.stopPropagation(), a?.(t, i.target.checked);
477
477
  },
478
- [l, t]
478
+ [a, t]
479
479
  );
480
- return /* @__PURE__ */ u(
480
+ return /* @__PURE__ */ m(
481
481
  "label",
482
482
  {
483
483
  className: "flex min-w-0 cursor-pointer flex-col py-[6px]",
484
484
  htmlFor: t,
485
485
  children: [
486
- /* @__PURE__ */ u("p", { className: "radio-label flex min-w-0 items-center", children: [
487
- /* @__PURE__ */ s(
486
+ /* @__PURE__ */ m("p", { className: "radio-label flex min-w-0 items-center", children: [
487
+ /* @__PURE__ */ r(
488
488
  "span",
489
489
  {
490
- className: p(
490
+ className: g(
491
491
  "flex justify-center items-center w-4 h-4 mr-2 relative",
492
492
  "radio-button",
493
493
  n ? "radio-button-active" : ""
494
494
  ),
495
- children: n && r
495
+ children: n && s
496
496
  }
497
497
  ),
498
- e && /* @__PURE__ */ s(
498
+ e && /* @__PURE__ */ r(
499
499
  "span",
500
500
  {
501
501
  className: "radio-title body-1 min-w-0 flex-1 truncate pr-2 text-neutrals-1000",
@@ -504,15 +504,15 @@ const wt = 24, vt = 24, V = 1e3, We = 24, Ct = ({
504
504
  }
505
505
  )
506
506
  ] }),
507
- a && /* @__PURE__ */ s(
507
+ l && /* @__PURE__ */ r(
508
508
  "span",
509
509
  {
510
510
  className: "radio-description body-2 ml-6 flex w-auto items-center text-neutrals-800",
511
- title: a,
512
- children: a
511
+ title: l,
512
+ children: l
513
513
  }
514
514
  ),
515
- /* @__PURE__ */ s(
515
+ /* @__PURE__ */ r(
516
516
  "input",
517
517
  {
518
518
  type: "radio",
@@ -531,91 +531,91 @@ const Ve = ({
531
531
  portalId: e,
532
532
  state: t = T.Opened,
533
533
  heading: n,
534
- size: r,
535
- onClose: a,
536
- children: l,
534
+ size: s,
535
+ onClose: l,
536
+ children: a,
537
537
  overlayClassName: c,
538
538
  containerClassName: i,
539
- dividers: m = !0,
540
- closeButtonTitle: h
539
+ dividers: h = !0,
540
+ closeButtonTitle: d
541
541
  }) => {
542
- const { refs: f, context: g } = J({
542
+ const { refs: p, context: f } = J({
543
543
  open: t !== T.Closed && !!t,
544
- onOpenChange: a
545
- }), C = Ne(g, { role: "dialog" }), N = ee(g, { outsidePress: !0 }), { getFloatingProps: v } = te([C, N]), b = P(
546
- (d) => {
547
- d?.preventDefault(), d?.stopPropagation(), a();
544
+ onOpenChange: l
545
+ }), v = we(f, { role: "dialog" }), N = ee(f, { outsidePress: !0 }), { getFloatingProps: C } = te([v, N]), b = P(
546
+ (u) => {
547
+ u?.preventDefault(), u?.stopPropagation(), l();
548
548
  },
549
- [a]
549
+ [l]
550
550
  );
551
- return /* @__PURE__ */ s(we, { id: e, children: t !== T.Closed && /* @__PURE__ */ s(
551
+ return /* @__PURE__ */ r(ne, { id: e, children: t !== T.Closed && /* @__PURE__ */ r(
552
552
  ve,
553
553
  {
554
- className: p(
554
+ className: g(
555
555
  "z-modal flex items-center justify-center bg-blackout p-4",
556
556
  c
557
557
  ),
558
- children: /* @__PURE__ */ s(Ce, { context: g, children: /* @__PURE__ */ u(
558
+ children: /* @__PURE__ */ r(Ce, { context: f, children: /* @__PURE__ */ m(
559
559
  "div",
560
560
  {
561
- className: p(
561
+ className: g(
562
562
  "relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
563
- r === G.LG && "max-w-[65%]",
564
- r === G.SM && "max-w-[30%]",
565
- m && "divide-neutrals-400 divide-y",
563
+ s === G.LG && "max-w-[65%]",
564
+ s === G.SM && "max-w-[30%]",
565
+ h && "divide-neutrals-400 divide-y",
566
566
  i,
567
567
  "sm:w-full sm:max-w-full sm:px-4 sm:py-6"
568
568
  ),
569
- ref: f.setFloating,
570
- ...v({
571
- onClick(d) {
572
- d.stopPropagation();
569
+ ref: p.setFloating,
570
+ ...C({
571
+ onClick(u) {
572
+ u.stopPropagation();
573
573
  }
574
574
  }),
575
575
  children: [
576
- /* @__PURE__ */ u("div", { className: "modal-heading mb-2 flex flex-row items-center justify-between px-6 py-3 sm:p-0 sm:pb-2", children: [
577
- n && (typeof n == "string" ? /* @__PURE__ */ s("h2", { className: "modal-heading-title sm:h3 mr-3 min-w-0 flex-1", children: n }) : n),
578
- /* @__PURE__ */ s(
579
- ne,
576
+ /* @__PURE__ */ m("div", { className: "modal-heading mb-2 flex flex-row items-center justify-between px-6 py-3 sm:p-0 sm:pb-2", children: [
577
+ n && (typeof n == "string" ? /* @__PURE__ */ r("h2", { className: "modal-heading-title sm:h3 mr-3 min-w-0 flex-1", children: n }) : n),
578
+ /* @__PURE__ */ r(
579
+ re,
580
580
  {
581
- title: h,
581
+ title: d,
582
582
  onClick: b,
583
583
  btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
584
584
  }
585
585
  )
586
586
  ] }),
587
- l.map((d) => d)
587
+ a.map((u) => u)
588
588
  ]
589
589
  }
590
590
  ) })
591
591
  }
592
592
  ) });
593
- }, Ot = (e) => e.state === T.Closed ? null : /* @__PURE__ */ s(Ve, { ...e }), H = "statgpt-dropdown-open", L = 8, qe = {
593
+ }, Ot = (e) => e.state === T.Closed ? null : /* @__PURE__ */ r(Ve, { ...e }), H = "statgpt-dropdown-open", L = 8, qe = {
594
594
  name: "keepDropdownWithinViewport",
595
595
  fn({ y: e, rects: t }) {
596
596
  if (typeof window > "u")
597
597
  return {};
598
- const n = document.documentElement.clientHeight || window.innerHeight, r = Math.min(
598
+ const n = document.documentElement.clientHeight || window.innerHeight, s = Math.min(
599
599
  t.floating.height,
600
600
  Math.max(0, n - L * 2)
601
- ), a = L, l = n - r - L;
601
+ ), l = L, a = n - s - L;
602
602
  return {
603
- y: Math.min(Math.max(e, a), Math.max(a, l))
603
+ y: Math.min(Math.max(e, l), Math.max(l, a))
604
604
  };
605
605
  }
606
606
  }, Ft = ({
607
607
  triggerButton: e,
608
608
  options: t,
609
609
  content: n,
610
- selectedOption: r,
611
- disabled: a,
612
- containerClassName: l,
610
+ selectedOption: s,
611
+ disabled: l,
612
+ containerClassName: a,
613
613
  openedClassName: c,
614
614
  onOptionSelect: i
615
615
  }) => {
616
- const m = ue(), [h, f] = j(!1), { refs: g, floatingStyles: C, context: N } = J({
617
- open: h,
618
- onOpenChange: a ? void 0 : f,
616
+ const h = me(), [d, p] = j(!1), { refs: f, floatingStyles: v, context: N } = J({
617
+ open: d,
618
+ onOpenChange: l ? void 0 : p,
619
619
  placement: "bottom-end",
620
620
  strategy: "fixed",
621
621
  middleware: [
@@ -634,64 +634,64 @@ const Ve = ({
634
634
  qe
635
635
  ],
636
636
  whileElementsMounted: ye
637
- }), v = De(N), b = ee(N, { outsidePress: !0 }), { getReferenceProps: d, getFloatingProps: o } = te([
638
- v,
637
+ }), C = De(N), b = ee(N, { outsidePress: !0 }), { getReferenceProps: u, getFloatingProps: o } = te([
638
+ C,
639
639
  b
640
640
  ]);
641
641
  return O(() => {
642
- h && window.dispatchEvent(
643
- new CustomEvent(H, { detail: m })
642
+ d && window.dispatchEvent(
643
+ new CustomEvent(H, { detail: h })
644
644
  );
645
- }, [m, h]), O(() => {
645
+ }, [h, d]), O(() => {
646
646
  const x = (w) => {
647
- w instanceof CustomEvent && w.detail !== m && f(!1);
647
+ w instanceof CustomEvent && w.detail !== h && p(!1);
648
648
  };
649
649
  return window.addEventListener(H, x), () => {
650
650
  window.removeEventListener(H, x);
651
651
  };
652
- }, [m]), O(() => {
653
- a && f(!1);
654
- }, [a]), /* @__PURE__ */ u(q, { children: [
655
- /* @__PURE__ */ s(
652
+ }, [h]), O(() => {
653
+ l && p(!1);
654
+ }, [l]), /* @__PURE__ */ m(q, { children: [
655
+ /* @__PURE__ */ r(
656
656
  "div",
657
657
  {
658
- ref: g.setReference,
659
- ...d({
658
+ ref: f.setReference,
659
+ ...u({
660
660
  onClick(x) {
661
661
  x.stopPropagation();
662
662
  }
663
663
  }),
664
- className: p(l, h && c),
664
+ className: g(a, d && c),
665
665
  children: e
666
666
  }
667
667
  ),
668
- h && /* @__PURE__ */ u(
668
+ d && /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ m(
669
669
  "div",
670
670
  {
671
- ref: g.setFloating,
672
- style: { ...C, overflowY: "auto" },
673
- className: "dropdown-menu-shadow dropdown-container z-10 flex flex-col rounded bg-white",
671
+ ref: f.setFloating,
672
+ style: { ...v, overflowY: "auto" },
673
+ className: "dropdown-menu-shadow dropdown-container z-dropdown flex flex-col rounded bg-white",
674
674
  ...o(),
675
675
  children: [
676
676
  n && n,
677
- t && t.map((x) => /* @__PURE__ */ s(
677
+ t && t.map((x) => /* @__PURE__ */ r(
678
678
  "div",
679
679
  {
680
680
  onClick: (w) => {
681
- w.stopPropagation(), i?.(x.key), f(!1);
681
+ w.stopPropagation(), i?.(x.key), p(!1);
682
682
  },
683
- className: p(
683
+ className: g(
684
684
  "text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
685
- r === x.key && "bg-hues-100"
685
+ s === x.key && "bg-hues-100"
686
686
  ),
687
- children: /* @__PURE__ */ u(
687
+ children: /* @__PURE__ */ m(
688
688
  "div",
689
689
  {
690
690
  className: "dropdown-item-text flex h-full items-center gap-x-2 p-2 hover:bg-hues-100",
691
691
  title: x.title,
692
692
  children: [
693
693
  x.icon ? x.icon : null,
694
- /* @__PURE__ */ s("p", { children: x?.title })
694
+ /* @__PURE__ */ r("p", { children: x?.title })
695
695
  ]
696
696
  }
697
697
  )
@@ -700,17 +700,17 @@ const Ve = ({
700
700
  ))
701
701
  ]
702
702
  }
703
- )
703
+ ) })
704
704
  ] });
705
- }, Rt = ({ limitMessages: e, query: t }) => /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center justify-between bg-hues-100 px-2 py-1", children: [
706
- /* @__PURE__ */ s("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ s("div", { className: "flex flex-col", children: /* @__PURE__ */ u("div", { className: "flex gap-x-[4px]", children: [
707
- /* @__PURE__ */ u("span", { className: "h5 text-primary", children: [
705
+ }, Rt = ({ limitMessages: e, query: t }) => /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center justify-between bg-hues-100 px-2 py-1", children: [
706
+ /* @__PURE__ */ r("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ r("div", { className: "flex flex-col", children: /* @__PURE__ */ m("div", { className: "flex gap-x-[4px]", children: [
707
+ /* @__PURE__ */ m("span", { className: "h5 text-primary", children: [
708
708
  e?.excelFormatTitle,
709
709
  " "
710
710
  ] }),
711
- /* @__PURE__ */ s("span", { className: "body-3 text-neutrals-800", children: e?.excelFormatText })
711
+ /* @__PURE__ */ r("span", { className: "body-3 text-neutrals-800", children: e?.excelFormatText })
712
712
  ] }) }) }),
713
- /* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ u("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
713
+ /* @__PURE__ */ r("a", { href: t, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ m("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
714
714
  e?.dataExplorerIcon,
715
715
  e?.dataExplorer
716
716
  ] }) })
@@ -718,24 +718,24 @@ const Ve = ({
718
718
  limitMessages: e,
719
719
  isDownload: t,
720
720
  showAdvancedViewButton: n,
721
- onAdvancedViewClick: r,
722
- query: a
723
- }) => /* @__PURE__ */ u(
721
+ onAdvancedViewClick: s,
722
+ query: l
723
+ }) => /* @__PURE__ */ m(
724
724
  "div",
725
725
  {
726
- className: p(
726
+ className: g(
727
727
  "bg-semantic-warning-light px-2 py-1 flex justify-between flex-wrap items-center",
728
728
  e?.containerClassName
729
729
  ),
730
730
  children: [
731
- /* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
732
- /* @__PURE__ */ s("span", { children: e?.warningIcon }),
733
- /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
734
- /* @__PURE__ */ u("div", { className: "flex gap-x-[4px]", children: [
735
- /* @__PURE__ */ u(
731
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-x-2", children: [
732
+ /* @__PURE__ */ r("span", { children: e?.warningIcon }),
733
+ /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
734
+ /* @__PURE__ */ m("div", { className: "flex gap-x-[4px]", children: [
735
+ /* @__PURE__ */ m(
736
736
  "span",
737
737
  {
738
- className: p(
738
+ className: g(
739
739
  "text-primary h5",
740
740
  e?.largeQueryClassName
741
741
  ),
@@ -746,10 +746,10 @@ const Ve = ({
746
746
  ]
747
747
  }
748
748
  ),
749
- /* @__PURE__ */ s(
749
+ /* @__PURE__ */ r(
750
750
  "span",
751
751
  {
752
- className: p(
752
+ className: g(
753
753
  "text-neutrals-800 body-3",
754
754
  e?.limitMessageClassName
755
755
  ),
@@ -757,10 +757,10 @@ const Ve = ({
757
757
  }
758
758
  )
759
759
  ] }),
760
- t && /* @__PURE__ */ s(
760
+ t && /* @__PURE__ */ r(
761
761
  "span",
762
762
  {
763
- className: p(
763
+ className: g(
764
764
  "text-neutrals-800 body-3",
765
765
  e?.limitMessageClassName
766
766
  ),
@@ -769,10 +769,10 @@ const Ve = ({
769
769
  )
770
770
  ] })
771
771
  ] }),
772
- n && /* @__PURE__ */ u(
772
+ n && /* @__PURE__ */ m(
773
773
  "span",
774
774
  {
775
- onClick: () => r?.(),
775
+ onClick: () => s?.(),
776
776
  className: "h4 flex cursor-pointer items-center gap-x-[4px] text-primary",
777
777
  children: [
778
778
  e?.editIcon,
@@ -780,22 +780,22 @@ const Ve = ({
780
780
  ]
781
781
  }
782
782
  ),
783
- t && /* @__PURE__ */ s("a", { href: a || "", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ u("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
783
+ t && /* @__PURE__ */ r("a", { href: l || "", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ m("span", { className: "body-3 flex cursor-pointer items-center gap-x-[4px]", children: [
784
784
  e?.dataExplorerIcon,
785
785
  e?.dataExplorer
786
786
  ] }) })
787
787
  ]
788
788
  }
789
- ), se = Q(null);
789
+ ), le = Q(null);
790
790
  function At({
791
791
  value: e,
792
792
  children: t
793
793
  }) {
794
794
  const n = U(() => e ?? {}, [e]);
795
- return /* @__PURE__ */ s(se.Provider, { value: n, children: t });
795
+ return /* @__PURE__ */ r(le.Provider, { value: n, children: t });
796
796
  }
797
797
  function Qe() {
798
- return K(se);
798
+ return K(le);
799
799
  }
800
800
  var M = /* @__PURE__ */ ((e) => (e.Info = "info", e.Error = "error", e.Warning = "warning", e.Note = "note", e))(M || {});
801
801
  const Ke = {
@@ -808,81 +808,82 @@ function Mt({
808
808
  type: e,
809
809
  icon: t,
810
810
  children: n,
811
- className: r,
812
- contentClassName: a
811
+ className: s,
812
+ contentClassName: l
813
813
  }) {
814
- const l = Qe(), c = t ?? l?.icons?.[e], i = l?.classes?.container ?? Je, m = l?.classes?.types?.[e] ?? Ke[e], h = F(i, m, r), f = F(Xe, l?.classes?.icon), g = F(
814
+ const a = Qe(), c = t ?? a?.icons?.[e], i = a?.classes?.container ?? Je, h = a?.classes?.types?.[e] ?? Ke[e], d = F(i, h, s), p = F(Xe, a?.classes?.icon), f = F(
815
815
  Ze,
816
- l?.classes?.content,
817
- a
816
+ a?.classes?.content,
817
+ l
818
818
  );
819
- return /* @__PURE__ */ u("div", { "data-type": e, className: h, children: [
820
- c ? /* @__PURE__ */ s("span", { className: f, children: c }) : null,
821
- n ? /* @__PURE__ */ s("div", { className: g, children: n }) : null
819
+ return /* @__PURE__ */ m("div", { "data-type": e, className: d, children: [
820
+ c ? /* @__PURE__ */ r("span", { className: p, children: c }) : null,
821
+ n ? /* @__PURE__ */ r("div", { className: f, children: n }) : null
822
822
  ] });
823
823
  }
824
824
  const Tt = ({
825
825
  title: e,
826
826
  copiedTitle: t,
827
827
  tooltip: n,
828
- icon: r,
828
+ hoverTooltip: s,
829
+ icon: l,
829
830
  copiedIcon: a,
830
- className: l,
831
- buttonTextClassName: c,
832
- onClick: i
831
+ className: c,
832
+ buttonTextClassName: i,
833
+ onClick: h
833
834
  }) => {
834
- const [m, h] = j(!1), f = W(null), g = () => {
835
- i(), h(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
836
- h(!1);
835
+ const [d, p] = j(!1), f = W(null), v = () => {
836
+ h(), p(!0), f.current && clearTimeout(f.current), f.current = setTimeout(() => {
837
+ p(!1);
837
838
  }, 1e3);
838
839
  };
839
840
  return O(() => () => {
840
841
  f.current && clearTimeout(f.current);
841
- }, []), /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
842
- /* @__PURE__ */ s(
842
+ }, []), /* @__PURE__ */ m("div", { className: "relative w-fit", title: s, children: [
843
+ /* @__PURE__ */ r(
843
844
  Ge,
844
845
  {
845
- title: m ? t : e,
846
+ title: d ? t : e,
846
847
  isSmallButton: !0,
847
- disabled: m,
848
+ disabled: d,
848
849
  buttonClassName: F([
849
850
  "text-button-tertiary small-icon-button !h-6 !p-0",
850
- l
851
+ c
851
852
  ]),
852
- textClassName: F(["ml-1", c]),
853
- onClick: g,
854
- iconBefore: m ? a : r
853
+ textClassName: F(["ml-1", i]),
854
+ onClick: v,
855
+ iconBefore: d ? a : l
855
856
  }
856
857
  ),
857
- n && m && /* @__PURE__ */ s("div", { className: "h4 absolute left-1/2 top-full z-50 mt-1 -translate-x-1/2 whitespace-nowrap rounded border border-neutrals-400 bg-white px-3 py-4 text-neutrals-900 shadow", children: n })
858
+ n && d && /* @__PURE__ */ r("div", { className: "h4 absolute left-1/2 top-full z-50 mt-1 -translate-x-1/2 whitespace-nowrap rounded border border-neutrals-400 bg-white px-3 py-4 text-neutrals-900 shadow", children: n })
858
859
  ] });
859
860
  };
860
861
  function et({
861
862
  id: e,
862
863
  label: t,
863
864
  hasChildren: n,
864
- showDragHandle: r,
865
- showCheckbox: a,
866
- isChecked: l,
865
+ showDragHandle: s,
866
+ showCheckbox: l,
867
+ isChecked: a,
867
868
  isExpanded: c
868
869
  }) {
869
- return /* @__PURE__ */ u("div", { className: "relative cursor-grabbing rounded bg-neutrals-200 shadow", children: [
870
- /* @__PURE__ */ s("div", { className: "absolute -left-[0.5px] top-0.5 h-5 w-0.5 rounded-full bg-gradients-light" }),
871
- /* @__PURE__ */ u("div", { className: "flex items-stretch overflow-hidden rounded", children: [
872
- r ? /* @__PURE__ */ s("div", { className: "flex w-6 items-center justify-center", children: /* @__PURE__ */ s("span", { "aria-hidden": !0, className: "rounded p-1", children: /* @__PURE__ */ s(X, { size: 16 }) }) }) : null,
873
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 items-center gap-2 p-1", children: [
874
- a ? /* @__PURE__ */ s(re, { id: e, checked: !!l, className: "p-0" }) : null,
875
- /* @__PURE__ */ s("span", { className: "body-3 truncate", children: t })
870
+ return /* @__PURE__ */ m("div", { className: "relative cursor-grabbing rounded bg-neutrals-200 shadow", children: [
871
+ /* @__PURE__ */ r("div", { className: "absolute -left-[0.5px] top-0.5 h-5 w-0.5 rounded-full bg-gradients-light" }),
872
+ /* @__PURE__ */ m("div", { className: "flex items-stretch overflow-hidden rounded", children: [
873
+ s ? /* @__PURE__ */ r("div", { className: "flex w-6 items-center justify-center", children: /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "rounded p-1", children: /* @__PURE__ */ r(X, { size: 16 }) }) }) : null,
874
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 items-center gap-2 p-1", children: [
875
+ l ? /* @__PURE__ */ r(se, { id: e, checked: !!a, className: "p-0" }) : null,
876
+ /* @__PURE__ */ r("span", { className: "body-3 truncate", children: t })
876
877
  ] }),
877
- n ? /* @__PURE__ */ s("div", { className: "flex w-8 items-center justify-center", children: /* @__PURE__ */ s(
878
+ n ? /* @__PURE__ */ r("div", { className: "flex w-8 items-center justify-center", children: /* @__PURE__ */ r(
878
879
  "span",
879
880
  {
880
881
  "aria-hidden": !0,
881
- className: p(
882
+ className: g(
882
883
  "transition-transform",
883
884
  c ? "rotate-90" : "rotate-0"
884
885
  ),
885
- children: /* @__PURE__ */ s(Z, { size: 16 })
886
+ children: /* @__PURE__ */ r(Z, { size: 16 })
886
887
  }
887
888
  ) }) : null
888
889
  ] })
@@ -900,83 +901,83 @@ function $(e) {
900
901
  } : null;
901
902
  }
902
903
  function tt(e, t, n) {
903
- const r = ie(e, t);
904
- return r ? r.find((a) => a.id === n) ?? null : null;
904
+ const s = oe(e, t);
905
+ return s ? s.find((l) => l.id === n) ?? null : null;
905
906
  }
906
- function le(e, t) {
907
+ function ie(e, t) {
907
908
  if (t.length === 0) return e;
908
- const [n, ...r] = t, a = e.find((l) => l.id === n);
909
- return a?.items ? le(a.items, r) : null;
909
+ const [n, ...s] = t, l = e.find((a) => a.id === n);
910
+ return l?.items ? ie(l.items, s) : null;
910
911
  }
911
- function ie(e, t) {
912
- const n = le(e, t);
912
+ function oe(e, t) {
913
+ const n = ie(e, t);
913
914
  return n ? n.filter(
914
- (r) => r.type === "item"
915
+ (s) => s.type === "item"
915
916
  ) : null;
916
917
  }
917
- function oe(e, t, n) {
918
+ function ce(e, t, n) {
918
919
  if (t.length === 0)
919
920
  return n(e);
920
- const [r, ...a] = t;
921
- return e.map((l) => l.id !== r || !l.items ? l : {
922
- ...l,
923
- items: oe(l.items, a, n)
921
+ const [s, ...l] = t;
922
+ return e.map((a) => a.id !== s || !a.items ? a : {
923
+ ...a,
924
+ items: ce(a.items, l, n)
924
925
  });
925
926
  }
926
927
  function nt({
927
928
  parentPath: e,
928
929
  item: t,
929
930
  showDragHandle: n,
930
- showCheckbox: r,
931
- renderLabel: a,
932
- onItemClick: l,
931
+ showCheckbox: s,
932
+ renderLabel: l,
933
+ onItemClick: a,
933
934
  onToggleExpanded: c,
934
935
  onToggleChecked: i
935
936
  }) {
936
- const m = !!t.items?.length, h = !!t.isExpanded, f = t.isDisabled ? !1 : t.draggable ?? !0, g = t.isDisabled ? !1 : t.checkable ?? !0, C = ae(e, t.id), {
937
+ const h = !!t.items?.length, d = !!t.isExpanded, p = t.isDisabled ? !1 : t.draggable ?? !0, f = t.isDisabled ? !1 : t.checkable ?? !0, v = ae(e, t.id), {
937
938
  attributes: N,
938
- listeners: v,
939
+ listeners: C,
939
940
  setNodeRef: b,
940
- setActivatorNodeRef: d,
941
+ setActivatorNodeRef: u,
941
942
  transform: o,
942
943
  transition: x,
943
944
  isDragging: w
944
- } = Me({ id: C, disabled: !f }), S = {
945
+ } = Me({ id: v, disabled: !p }), S = {
945
946
  transform: je.Transform.toString(o),
946
947
  transition: x,
947
948
  opacity: w ? 0.6 : void 0
948
- }, y = !!t.isDisabled, E = y || !g, D = [...e, t.id];
949
- return /* @__PURE__ */ u(
949
+ }, y = !!t.isDisabled, E = y || !f, D = [...e, t.id];
950
+ return /* @__PURE__ */ m(
950
951
  "div",
951
952
  {
952
953
  ref: b,
953
954
  style: S,
954
- className: p([
955
+ className: g([
955
956
  "group flex items-stretch overflow-hidden rounded bg-white",
956
957
  "select-none",
957
958
  y ? "opacity-50" : ""
958
959
  ]),
959
960
  children: [
960
- n ? /* @__PURE__ */ s(
961
+ n ? /* @__PURE__ */ r(
961
962
  "div",
962
963
  {
963
- className: p([
964
+ className: g([
964
965
  "group/drag-handle flex w-6 items-center justify-center rounded",
965
966
  y ? "" : "hover:bg-neutrals-100 cursor-grab"
966
967
  ]),
967
- children: /* @__PURE__ */ s(
968
+ children: /* @__PURE__ */ r(
968
969
  "span",
969
970
  {
970
- ref: d,
971
+ ref: u,
971
972
  "aria-hidden": !0,
972
- className: p([
973
+ className: g([
973
974
  "rounded p-1",
974
- f ? "cursor-grab" : "cursor-default",
975
+ p ? "cursor-grab" : "cursor-default",
975
976
  "transition-opacity"
976
977
  ]),
977
- ...f ? v : {},
978
- ...f ? N : {},
979
- children: /* @__PURE__ */ s(
978
+ ...p ? C : {},
979
+ ...p ? N : {},
980
+ children: /* @__PURE__ */ r(
980
981
  X,
981
982
  {
982
983
  size: 16,
@@ -987,32 +988,32 @@ function nt({
987
988
  )
988
989
  }
989
990
  ) : null,
990
- /* @__PURE__ */ u(
991
+ /* @__PURE__ */ m(
991
992
  "button",
992
993
  {
993
994
  type: "button",
994
995
  disabled: y,
995
996
  "aria-disabled": E,
996
997
  onClick: (k) => {
997
- E || l?.({
998
+ E || a?.({
998
999
  itemId: t.id,
999
1000
  path: D,
1000
1001
  nativeEvent: k
1001
1002
  });
1002
1003
  },
1003
- className: p([
1004
+ className: g([
1004
1005
  "flex min-w-0 flex-1 items-center gap-2 p-1 text-left rounded",
1005
1006
  y ? "" : "hover:bg-neutrals-100",
1006
1007
  y ? "" : "hover:text-blue-700",
1007
1008
  "focus:outline-none"
1008
1009
  ]),
1009
1010
  children: [
1010
- r ? /* @__PURE__ */ s(
1011
- re,
1011
+ s ? /* @__PURE__ */ r(
1012
+ se,
1012
1013
  {
1013
1014
  id: `draggable-list-${D.join("-")}`,
1014
1015
  checked: !!t.isChecked,
1015
- disabled: !g,
1016
+ disabled: !f,
1016
1017
  className: "p-0",
1017
1018
  stopPropagation: !0,
1018
1019
  onChange: (k, I) => i?.({
@@ -1022,11 +1023,11 @@ function nt({
1022
1023
  })
1023
1024
  }
1024
1025
  ) : null,
1025
- /* @__PURE__ */ s("span", { className: "body-3 truncate text-neutrals-800", children: a ? a(t) : t.label })
1026
+ /* @__PURE__ */ r("span", { className: "body-3 truncate text-neutrals-800", children: l ? l(t) : t.label })
1026
1027
  ]
1027
1028
  }
1028
1029
  ),
1029
- m ? /* @__PURE__ */ s(
1030
+ h ? /* @__PURE__ */ r(
1030
1031
  "button",
1031
1032
  {
1032
1033
  type: "button",
@@ -1035,24 +1036,24 @@ function nt({
1035
1036
  k.stopPropagation(), c?.({
1036
1037
  itemId: t.id,
1037
1038
  path: D,
1038
- nextExpanded: !h
1039
+ nextExpanded: !d
1039
1040
  });
1040
1041
  },
1041
- "aria-label": h ? "Collapse" : "Expand",
1042
- className: p([
1042
+ "aria-label": d ? "Collapse" : "Expand",
1043
+ className: g([
1043
1044
  "flex w-8 items-center justify-center rounded",
1044
1045
  y ? "" : "hover:bg-neutrals-100",
1045
1046
  "focus:outline-none"
1046
1047
  ]),
1047
- children: /* @__PURE__ */ s(
1048
+ children: /* @__PURE__ */ r(
1048
1049
  "span",
1049
1050
  {
1050
1051
  "aria-hidden": !0,
1051
- className: p(
1052
+ className: g(
1052
1053
  "transition-transform duration-150 ease-out",
1053
- h ? "rotate-90" : "rotate-0"
1054
+ d ? "rotate-90" : "rotate-0"
1054
1055
  ),
1055
- children: /* @__PURE__ */ s(Z, { size: 16 })
1056
+ children: /* @__PURE__ */ r(Z, { size: 16 })
1056
1057
  }
1057
1058
  )
1058
1059
  }
@@ -1065,36 +1066,36 @@ function Pt({
1065
1066
  items: e,
1066
1067
  showDragHandle: t = !0,
1067
1068
  showCheckbox: n = !0,
1068
- onItemsChange: r,
1069
- onToggleExpanded: a,
1070
- onToggleChecked: l,
1069
+ onItemsChange: s,
1070
+ onToggleExpanded: l,
1071
+ onToggleChecked: a,
1071
1072
  onItemClick: c,
1072
1073
  renderLabel: i
1073
1074
  }) {
1074
- const m = Le(
1075
+ const h = Le(
1075
1076
  Oe(Fe, { activationConstraint: { distance: 6 } })
1076
- ), [h, f] = de.useState(null), g = (v) => {
1077
- const b = String(v.active.id), d = $(b);
1078
- if (!d) return;
1079
- const o = tt(e, d.parentPath, d.itemId);
1080
- !o || o.type !== "item" || f({
1077
+ ), [d, p] = ue.useState(null), f = (C) => {
1078
+ const b = String(C.active.id), u = $(b);
1079
+ if (!u) return;
1080
+ const o = tt(e, u.parentPath, u.itemId);
1081
+ !o || o.type !== "item" || p({
1081
1082
  id: b,
1082
1083
  label: o.label,
1083
1084
  hasChildren: !!o.items?.length,
1084
1085
  isChecked: o.isChecked,
1085
1086
  isExpanded: o.isExpanded
1086
1087
  });
1087
- }, C = (v) => {
1088
- f(null);
1089
- const b = v.over;
1088
+ }, v = (C) => {
1089
+ p(null);
1090
+ const b = C.over;
1090
1091
  if (!b) return;
1091
- const d = $(String(v.active.id)), o = $(String(b.id));
1092
- if (!d || !o || d.parentPath.join("/") !== o.parentPath.join("/")) return;
1093
- const x = ie(e, d.parentPath);
1092
+ const u = $(String(C.active.id)), o = $(String(b.id));
1093
+ if (!u || !o || u.parentPath.join("/") !== o.parentPath.join("/")) return;
1094
+ const x = oe(e, u.parentPath);
1094
1095
  if (!x) return;
1095
- const w = x.findIndex((E) => E.id === d.itemId), S = x.findIndex((E) => E.id === o.itemId);
1096
+ const w = x.findIndex((E) => E.id === u.itemId), S = x.findIndex((E) => E.id === o.itemId);
1096
1097
  if (w === -1 || S === -1 || w === S) return;
1097
- const y = oe(e, d.parentPath, (E) => {
1098
+ const y = ce(e, u.parentPath, (E) => {
1098
1099
  const D = E.filter(
1099
1100
  (R) => R.type === "item"
1100
1101
  ), k = Ye(D, w, S);
@@ -1105,29 +1106,29 @@ function Pt({
1105
1106
  return I += 1, z;
1106
1107
  });
1107
1108
  });
1108
- r(y);
1109
- }, N = (v, b = []) => {
1110
- const d = v.filter((o) => o.type === "item").map((o) => ae(b, o.id));
1111
- return /* @__PURE__ */ s(
1109
+ s(y);
1110
+ }, N = (C, b = []) => {
1111
+ const u = C.filter((o) => o.type === "item").map((o) => ae(b, o.id));
1112
+ return /* @__PURE__ */ r(
1112
1113
  Te,
1113
1114
  {
1114
- items: d,
1115
+ items: u,
1115
1116
  strategy: Pe,
1116
- children: /* @__PURE__ */ s("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: v.map((o) => o.type === "group" ? /* @__PURE__ */ u(
1117
+ children: /* @__PURE__ */ r("ul", { className: "m-0 flex list-none flex-col gap-2 p-0", children: C.map((o) => o.type === "group" ? /* @__PURE__ */ m(
1117
1118
  "li",
1118
1119
  {
1119
1120
  className: "m-0 mt-2 flex flex-col gap-2 p-0 first:mt-0",
1120
1121
  children: [
1121
- /* @__PURE__ */ u("div", { className: "h5 flex items-center gap-2 py-1 text-neutrals-1000", children: [
1122
- /* @__PURE__ */ s(ge, { size: 12, className: "shrink-0" }),
1122
+ /* @__PURE__ */ m("div", { className: "h5 flex items-center gap-2 py-1 text-neutrals-1000", children: [
1123
+ /* @__PURE__ */ r(xe, { size: 12, className: "shrink-0" }),
1123
1124
  o.label
1124
1125
  ] }),
1125
- /* @__PURE__ */ s("div", { className: "border-l border-neutrals-600 pl-2", children: N(o.items, [...b, o.id]) })
1126
+ /* @__PURE__ */ r("div", { className: "border-l border-neutrals-600 pl-2", children: N(o.items, [...b, o.id]) })
1126
1127
  ]
1127
1128
  },
1128
1129
  o.id
1129
- ) : /* @__PURE__ */ u("li", { className: "m-0 flex flex-col gap-2 p-0", children: [
1130
- /* @__PURE__ */ s(
1130
+ ) : /* @__PURE__ */ m("li", { className: "m-0 flex flex-col gap-2 p-0", children: [
1131
+ /* @__PURE__ */ r(
1131
1132
  nt,
1132
1133
  {
1133
1134
  parentPath: b,
@@ -1136,34 +1137,34 @@ function Pt({
1136
1137
  showCheckbox: n,
1137
1138
  renderLabel: i,
1138
1139
  onItemClick: c,
1139
- onToggleExpanded: a,
1140
- onToggleChecked: l
1140
+ onToggleExpanded: l,
1141
+ onToggleChecked: a
1141
1142
  }
1142
1143
  ),
1143
- o.items?.length && o.isExpanded ? /* @__PURE__ */ s("div", { className: "pl-7", children: N(o.items, [...b, o.id]) }) : null
1144
+ o.items?.length && o.isExpanded ? /* @__PURE__ */ r("div", { className: "pl-7", children: N(o.items, [...b, o.id]) }) : null
1144
1145
  ] }, o.id)) })
1145
1146
  }
1146
1147
  );
1147
1148
  };
1148
- return /* @__PURE__ */ u(
1149
+ return /* @__PURE__ */ m(
1149
1150
  Re,
1150
1151
  {
1151
- sensors: m,
1152
+ sensors: h,
1152
1153
  collisionDetection: _e,
1153
- onDragStart: g,
1154
- onDragEnd: C,
1154
+ onDragStart: f,
1155
+ onDragEnd: v,
1155
1156
  children: [
1156
- /* @__PURE__ */ s("div", { className: "flex flex-col", children: N(e) }),
1157
- /* @__PURE__ */ s(Ae, { children: h ? /* @__PURE__ */ s(
1157
+ /* @__PURE__ */ r("div", { className: "flex flex-col", children: N(e) }),
1158
+ /* @__PURE__ */ r(Ae, { children: d ? /* @__PURE__ */ r(
1158
1159
  et,
1159
1160
  {
1160
- id: h.id,
1161
- label: h.label,
1162
- hasChildren: h.hasChildren,
1161
+ id: d.id,
1162
+ label: d.label,
1163
+ hasChildren: d.hasChildren,
1163
1164
  showDragHandle: t,
1164
1165
  showCheckbox: n,
1165
- isChecked: h.isChecked,
1166
- isExpanded: h.isExpanded
1166
+ isChecked: d.isChecked,
1167
+ isExpanded: d.isExpanded
1167
1168
  }
1168
1169
  ) : null })
1169
1170
  ]
@@ -1172,50 +1173,50 @@ function Pt({
1172
1173
  }
1173
1174
  const rt = (e, t) => e.label.toLowerCase().includes(t);
1174
1175
  function Yt(e, t, n = {}) {
1175
- const r = at(t);
1176
- if (!r)
1176
+ const s = lt(t);
1177
+ if (!s)
1177
1178
  return e;
1178
1179
  const {
1179
- expandMatchedBranches: a = !0,
1180
- includeGroupDescendantsOnMatch: l = !0,
1180
+ expandMatchedBranches: l = !0,
1181
+ includeGroupDescendantsOnMatch: a = !0,
1181
1182
  includeItemDescendantsOnMatch: c = !1,
1182
1183
  match: i = rt
1183
1184
  } = n;
1184
- return B(e, r, {
1185
- expandMatchedBranches: a,
1186
- includeGroupDescendantsOnMatch: l,
1185
+ return B(e, s, {
1186
+ expandMatchedBranches: l,
1187
+ includeGroupDescendantsOnMatch: a,
1187
1188
  includeItemDescendantsOnMatch: c,
1188
1189
  match: i
1189
1190
  }) ?? [];
1190
1191
  }
1191
1192
  function B(e, t, n) {
1192
- const r = [];
1193
- for (const a of e) {
1194
- const l = st(a, t, n);
1195
- l && r.push(l);
1193
+ const s = [];
1194
+ for (const l of e) {
1195
+ const a = st(l, t, n);
1196
+ a && s.push(a);
1196
1197
  }
1197
- return r.length ? r : null;
1198
+ return s.length ? s : null;
1198
1199
  }
1199
1200
  function st(e, t, n) {
1200
- const r = n.match(e, t);
1201
+ const s = n.match(e, t);
1201
1202
  if (e.type === "group") {
1202
- if (r && n.includeGroupDescendantsOnMatch)
1203
+ if (s && n.includeGroupDescendantsOnMatch)
1203
1204
  return Y(e, n.expandMatchedBranches);
1204
1205
  const c = e.items?.length ? B(e.items, t, n) : null;
1205
- return !r && !c ? null : {
1206
+ return !s && !c ? null : {
1206
1207
  ...e,
1207
1208
  items: c ?? []
1208
1209
  };
1209
1210
  }
1210
- const a = e.items?.length ? B(e.items, t, n) : null;
1211
- if (r && n.includeItemDescendantsOnMatch)
1211
+ const l = e.items?.length ? B(e.items, t, n) : null;
1212
+ if (s && n.includeItemDescendantsOnMatch)
1212
1213
  return Y(e, n.expandMatchedBranches);
1213
- if (!r && !a)
1214
+ if (!s && !l)
1214
1215
  return null;
1215
- const l = {
1216
+ const a = {
1216
1217
  ...e
1217
1218
  };
1218
- return a ? (l.items = a, n.expandMatchedBranches && (l.isExpanded = !0)) : delete l.items, l;
1219
+ return l ? (a.items = l, n.expandMatchedBranches && (a.isExpanded = !0)) : delete a.items, a;
1219
1220
  }
1220
1221
  function Y(e, t) {
1221
1222
  return e.type === "group" ? {
@@ -1229,20 +1230,20 @@ function Y(e, t) {
1229
1230
  items: e.items?.map((n) => Y(n, t))
1230
1231
  };
1231
1232
  }
1232
- function at(e) {
1233
+ function lt(e) {
1233
1234
  return e.trim().toLowerCase();
1234
1235
  }
1235
- var lt = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(lt || {});
1236
- const ce = Q(null);
1236
+ var at = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(at || {});
1237
+ const de = Q(null);
1237
1238
  function jt({
1238
1239
  children: e,
1239
1240
  isAgentAvailable: t
1240
1241
  }) {
1241
1242
  const n = U(() => ({ isAgentAvailable: t }), [t]);
1242
- return /* @__PURE__ */ s(ce.Provider, { value: n, children: e });
1243
+ return /* @__PURE__ */ r(de.Provider, { value: n, children: e });
1243
1244
  }
1244
1245
  function zt() {
1245
- const e = K(ce);
1246
+ const e = K(de);
1246
1247
  if (!e)
1247
1248
  throw new Error(
1248
1249
  "useAgentAvailability must be used within AgentAvailabilityProvider"
@@ -1256,8 +1257,8 @@ export {
1256
1257
  Ge as Button,
1257
1258
  We as CALENDAR_MOBILE_PADDING,
1258
1259
  Ct as Calendar,
1259
- re as Checkbox,
1260
- ne as CloseButton,
1260
+ se as Checkbox,
1261
+ re as CloseButton,
1261
1262
  yt as CollapsibleBlock,
1262
1263
  Tt as CopyButton,
1263
1264
  Rt as DownloadFormatMessage,
@@ -1270,7 +1271,7 @@ export {
1270
1271
  M as InlineAlertType,
1271
1272
  Ue as Input,
1272
1273
  St as InputWithIcon,
1273
- lt as KeyboardKey,
1274
+ at as KeyboardKey,
1274
1275
  kt as Link,
1275
1276
  He as Loader,
1276
1277
  G as PopUpSize,