@epam/ai-dial-conversation-panel 1.2.0-dev.148 → 1.2.0-dev.152

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.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { ConversationTransferJobStatus as e, DeploymentIcon as t, FilterTab as n, buildCssVars as r, getUtf8ByteLength as i, mergeClasses as a, sanitizeConversationName as o, stripTrailingDots as s } from "@epam/ai-dial-chat-shared";
2
2
  import { PanelEmpty as c, PanelNoResults as l, SidebarOrientation as u, SidebarPanel as d } from "@epam/ai-dial-sidebar";
3
- import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b, FilterChips as x, GhostIconButton as S, Highlight as C, Input as w, Popup as T, PopupSize as E, ProgressBar as D, Search as O, Skeleton as ee, SkeletonVariant as k, Spinner as A, Tooltip as j, mergeClasses as te } from "@epam/ai-dial-ui-kit";
4
- import { createElement as M, memo as N, useCallback as P, useEffect as F, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as I, useRef as L, useState as R } from "react";
5
- import { Fragment as ae, jsx as z, jsxs as B } from "react/jsx-runtime";
6
- import { IconAlertCircleFilled as oe, IconAlertTriangleFilled as V, IconCaretDownFilled as se, IconCaretRightFilled as ce, IconCheck as H, IconChevronDown as le, IconChevronUp as ue, IconClock as de, IconDotsVertical as U, IconFile as fe, IconFileZip as pe, IconJson as me, IconPlus as W, IconSparkles as G, IconX as he } from "@tabler/icons-react";
3
+ import { Button as f, ButtonVariant as p, ConfirmationPopup as m, ConfirmationPopupVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, Dropdown as v, ElementSize as y, EllipsisTooltip as b, FilterChips as x, GhostIconButton as S, Highlight as C, Input as w, Popup as T, PopupSize as E, ProgressBar as D, Search as O, Skeleton as ee, SkeletonVariant as k, Spinner as A, Tooltip as j, mergeClasses as M } from "@epam/ai-dial-ui-kit";
4
+ import { createElement as te, memo as N, useCallback as P, useEffect as F, useId as ne, useImperativeHandle as re, useLayoutEffect as ie, useMemo as I, useRef as L, useState as R } from "react";
5
+ import { jsx as z, jsxs as B } from "react/jsx-runtime";
6
+ import { IconAlertCircleFilled as ae, IconAlertTriangleFilled as oe, IconCaretDownFilled as V, IconCaretRightFilled as se, IconCheck as ce, IconChevronDown as H, IconChevronUp as le, IconDotsVertical as ue, IconFile as de, IconFileZip as U, IconJson as fe, IconPlus as pe, IconSparkles as me, IconX as W } from "@tabler/icons-react";
7
7
  //#region src/constants/public-class-names.ts
8
- var ge = {
8
+ var he = {
9
9
  newChatButton: "dial-cp-new-chat-button",
10
10
  search: "dial-cp-search"
11
- }, _e = typeof window < "u" ? ie : F;
12
- function ve(e) {
11
+ }, G = typeof window < "u" ? ie : F;
12
+ function ge(e) {
13
13
  if (e !== void 0) switch (typeof e) {
14
14
  case "number": return e;
15
15
  case "string":
@@ -17,15 +17,15 @@ function ve(e) {
17
17
  break;
18
18
  }
19
19
  }
20
- function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
20
+ function _e({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
21
21
  let { styleHeight: s, styleWidth: c } = I(() => ({
22
- styleHeight: ve(o?.height),
23
- styleWidth: ve(o?.width)
22
+ styleHeight: ge(o?.height),
23
+ styleWidth: ge(o?.width)
24
24
  }), [o?.height, o?.width]), [l, u] = R({
25
25
  height: t,
26
26
  width: n
27
27
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
28
- return _e(() => {
28
+ return G(() => {
29
29
  if (i === null || d) return;
30
30
  let t = new ResizeObserver((e) => {
31
31
  for (let t of e) {
@@ -54,16 +54,16 @@ function ye({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
54
54
  c
55
55
  ]);
56
56
  }
57
- function be(e) {
57
+ function ve(e) {
58
58
  let t = L(() => {
59
59
  throw Error("Cannot call during render.");
60
60
  });
61
- return _e(() => {
61
+ return G(() => {
62
62
  t.current = e;
63
63
  }, [e]), P((e) => t.current?.(e), [t]);
64
64
  }
65
65
  var K = null;
66
- function xe(e = !1) {
66
+ function ye(e = !1) {
67
67
  if (K === null || e) {
68
68
  let e = document.createElement("div"), t = e.style;
69
69
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
@@ -72,8 +72,8 @@ function xe(e = !1) {
72
72
  }
73
73
  return K;
74
74
  }
75
- function Se({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
76
- if (t === "horizontal" && n) switch (xe()) {
75
+ function be({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
76
+ if (t === "horizontal" && n) switch (ye()) {
77
77
  case "negative": return -r;
78
78
  case "positive-descending":
79
79
  if (e) {
@@ -93,7 +93,7 @@ function J(e, t) {
93
93
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
94
94
  return !0;
95
95
  }
96
- function Ce({ cachedBounds: e, itemCount: t, itemSize: n }) {
96
+ function xe({ cachedBounds: e, itemCount: t, itemSize: n }) {
97
97
  if (t === 0) return 0;
98
98
  if (typeof n == "number") return t * n;
99
99
  {
@@ -101,9 +101,9 @@ function Ce({ cachedBounds: e, itemCount: t, itemSize: n }) {
101
101
  return q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
102
102
  }
103
103
  }
104
- function we({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
104
+ function Se({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
105
105
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
106
- let s = Ce({
106
+ let s = xe({
107
107
  cachedBounds: t,
108
108
  itemCount: r,
109
109
  itemSize: i
@@ -115,7 +115,7 @@ function we({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
115
115
  default: return a >= u && a <= l ? a : a < u ? u : l;
116
116
  }
117
117
  }
118
- function Te({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
118
+ function Ce({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
119
119
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
120
120
  for (; u < a;) {
121
121
  let n = e.get(u);
@@ -134,7 +134,7 @@ function Te({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
134
134
  stopIndexOverscan: l
135
135
  };
136
136
  }
137
- function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
137
+ function we({ itemCount: e, itemProps: t, itemSize: n }) {
138
138
  let r = /* @__PURE__ */ new Map();
139
139
  return {
140
140
  get(i) {
@@ -171,8 +171,8 @@ function Ee({ itemCount: e, itemProps: t, itemSize: n }) {
171
171
  }
172
172
  };
173
173
  }
174
- function De({ itemCount: e, itemProps: t, itemSize: n }) {
175
- return I(() => Ee({
174
+ function Te({ itemCount: e, itemProps: t, itemSize: n }) {
175
+ return I(() => we({
176
176
  itemCount: e,
177
177
  itemProps: t,
178
178
  itemSize: n
@@ -182,7 +182,7 @@ function De({ itemCount: e, itemProps: t, itemSize: n }) {
182
182
  n
183
183
  ]);
184
184
  }
185
- function Oe({ containerSize: e, itemSize: t }) {
185
+ function Ee({ containerSize: e, itemSize: t }) {
186
186
  let n;
187
187
  switch (typeof t) {
188
188
  case "string":
@@ -194,8 +194,8 @@ function Oe({ containerSize: e, itemSize: t }) {
194
194
  }
195
195
  return n;
196
196
  }
197
- function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
198
- let { height: u = n, width: d = n } = ye({
197
+ function De({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
198
+ let { height: u = n, width: d = n } = _e({
199
199
  defaultHeight: r === "vertical" ? n : void 0,
200
200
  defaultWidth: r === "horizontal" ? n : void 0,
201
201
  element: e,
@@ -204,7 +204,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
204
204
  }), f = L({
205
205
  height: 0,
206
206
  width: 0
207
- }), p = r === "vertical" ? u : d, m = Oe({
207
+ }), p = r === "vertical" ? u : d, m = Ee({
208
208
  containerSize: p,
209
209
  itemSize: s
210
210
  });
@@ -221,11 +221,11 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
221
221
  c,
222
222
  d
223
223
  ]);
224
- let h = De({
224
+ let h = Te({
225
225
  itemCount: a,
226
226
  itemProps: o,
227
227
  itemSize: m
228
- }), g = P((e) => h.get(e), [h]), [_, v] = R(() => Te({
228
+ }), g = P((e) => h.get(e), [h]), [_, v] = R(() => Ce({
229
229
  cachedBounds: h,
230
230
  containerScrollOffset: 0,
231
231
  containerSize: p,
@@ -236,7 +236,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
236
236
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
237
237
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
238
238
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
239
- }, C = P(() => Ce({
239
+ }, C = P(() => xe({
240
240
  cachedBounds: h,
241
241
  itemCount: a,
242
242
  itemSize: m
@@ -244,9 +244,9 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
244
244
  h,
245
245
  a,
246
246
  m
247
- ]), w = P((t) => Te({
247
+ ]), w = P((t) => Ce({
248
248
  cachedBounds: h,
249
- containerScrollOffset: Se({
249
+ containerScrollOffset: be({
250
250
  containerElement: e,
251
251
  direction: r,
252
252
  isRtl: i,
@@ -264,19 +264,19 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
264
264
  a,
265
265
  l
266
266
  ]);
267
- return _e(() => {
267
+ return G(() => {
268
268
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
269
269
  }, [
270
270
  e,
271
271
  r,
272
272
  w
273
- ]), _e(() => {
273
+ ]), G(() => {
274
274
  if (!e) return;
275
275
  let t = () => {
276
276
  v((t) => {
277
- let { scrollLeft: n, scrollTop: o } = e, s = Te({
277
+ let { scrollLeft: n, scrollTop: o } = e, s = Ce({
278
278
  cachedBounds: h,
279
- containerScrollOffset: Se({
279
+ containerScrollOffset: be({
280
280
  containerElement: e,
281
281
  direction: r,
282
282
  isRtl: i,
@@ -302,8 +302,8 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
302
302
  ]), {
303
303
  getCellBounds: g,
304
304
  getEstimatedSize: C,
305
- scrollToIndex: be(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
306
- let s = we({
305
+ scrollToIndex: ve(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
306
+ let s = Se({
307
307
  align: t,
308
308
  cachedBounds: h,
309
309
  containerScrollOffset: n,
@@ -313,7 +313,7 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
313
313
  itemSize: m
314
314
  });
315
315
  if (e) {
316
- if (s = Se({
316
+ if (s = be({
317
317
  containerElement: e,
318
318
  direction: r,
319
319
  isRtl: i,
@@ -331,19 +331,19 @@ function ke({ containerElement: e, containerStyle: t, defaultContainerSize: n =
331
331
  stopIndexVisible: x
332
332
  };
333
333
  }
334
- function Ae(e) {
334
+ function Oe(e) {
335
335
  return I(() => e, Object.values(e));
336
336
  }
337
- function je(e, t) {
337
+ function ke(e, t) {
338
338
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
339
339
  return J(n, a) && J(r, o) && J(i, s);
340
340
  }
341
- function Me(e) {
341
+ function Ae(e) {
342
342
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
343
343
  }
344
- var Ne = "data-react-window-index";
345
- function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
346
- let m = Ae(u), h = I(() => N(s, je), [s]), [g, _] = R(null), v = Me(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = ke({
344
+ var je = "data-react-window-index";
345
+ function Me({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
346
+ let m = Oe(u), h = I(() => N(s, ke), [s]), [g, _] = R(null), v = Ae(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = De({
347
347
  containerElement: g,
348
348
  containerStyle: f,
349
349
  defaultContainerSize: n,
@@ -369,12 +369,12 @@ function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
369
369
  top: r
370
370
  });
371
371
  }
372
- }), [g, x]), _e(() => {
372
+ }), [g, x]), G(() => {
373
373
  if (!g) return;
374
374
  let e = Array.from(g.children).filter((e, t) => {
375
375
  if (e.hasAttribute("aria-hidden")) return !1;
376
376
  let n = `${S + t}`;
377
- return e.setAttribute(Ne, n), !0;
377
+ return e.setAttribute(je, n), !0;
378
378
  });
379
379
  if (v) return l.observeRowElements(e);
380
380
  }, [
@@ -402,7 +402,7 @@ function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
402
402
  let e = [];
403
403
  if (c > 0) for (let t = S; t <= w; t++) {
404
404
  let n = y(t);
405
- e.push(/* @__PURE__ */ M(h, {
405
+ e.push(/* @__PURE__ */ te(h, {
406
406
  ...m,
407
407
  ariaAttributes: {
408
408
  "aria-posinset": t + 1,
@@ -437,7 +437,7 @@ function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
437
437
  zIndex: -1
438
438
  }
439
439
  });
440
- return M(d, {
440
+ return te(d, {
441
441
  role: "list",
442
442
  ...p,
443
443
  className: t,
@@ -455,25 +455,25 @@ function Pe({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
455
455
  //#region src/types/virtual-row.ts
456
456
  var Y = /* @__PURE__ */ function(e) {
457
457
  return e.Header = "header", e.Item = "item", e;
458
- }({}), Fe = (e) => `${60 + e * 23 % 35}%`, Ie = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Le = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, Re = (e) => {
458
+ }({}), Ne = (e) => `${60 + e * 23 % 35}%`, Pe = (e, t) => e ? t ? "pe-9" : "pe-2 group-focus-within/conversation:pe-9 group-hover/conversation:pe-9" : "pe-3", Fe = (e, t) => t.rows[e].kind === Y.Item ? 36 : e === 0 ? 24 : 56, Ie = (e) => {
459
459
  switch (e) {
460
460
  case n.Shared: return n.Shared;
461
461
  case n.Organization: return n.Organization;
462
462
  default: return n.MyChats;
463
463
  }
464
- }, ze = (e, t) => {
464
+ }, Le = (e, t) => {
465
465
  let n = null;
466
466
  for (let r of e) if (r.kind === Y.Header) n = r.groupKey;
467
467
  else if (r.item.id === t) return n;
468
468
  return null;
469
- }, Be = (e, t, r) => {
469
+ }, Re = (e, t, r) => {
470
470
  let i = /* @__PURE__ */ new Set();
471
471
  if (t != null && i.add(t), t === n.Pinned) {
472
472
  let t = r.find((t) => t.id === e);
473
- t && i.add(Re(t.source));
473
+ t && i.add(Ie(t.source));
474
474
  } else i.add(n.Pinned);
475
475
  return i;
476
- }, Ve = (e, t, n, r) => {
476
+ }, ze = (e, t, n, r) => {
477
477
  let i = e.currentTarget.getBoundingClientRect();
478
478
  if (e.clientY >= i.top + i.height / 2) return t;
479
479
  let a = null, o = !1;
@@ -483,7 +483,7 @@ var Y = /* @__PURE__ */ function(e) {
483
483
  a = e.item.id;
484
484
  }
485
485
  return null;
486
- }, X = [
486
+ }, Be = [
487
487
  {
488
488
  value: n.All,
489
489
  labelKey: "all"
@@ -500,8 +500,8 @@ var Y = /* @__PURE__ */ function(e) {
500
500
  value: n.Organization,
501
501
  labelKey: "organization"
502
502
  }
503
- ], He = N(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => /* @__PURE__ */ z(x, {
504
- items: I(() => X.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
503
+ ], Ve = N(({ activeTab: e, labels: t, onChange: n, tabClassName: r = "dial-tiny-semi-text", hiddenSources: i }) => /* @__PURE__ */ z(x, {
504
+ items: I(() => Be.filter(({ value: e }) => !i?.includes(e)).map(({ value: e, labelKey: n }) => ({
505
505
  value: e,
506
506
  label: t[n]
507
507
  })), [t, i]),
@@ -510,40 +510,37 @@ var Y = /* @__PURE__ */ function(e) {
510
510
  stretch: !0,
511
511
  "aria-label": t.groupAriaLabel ?? "Filter chats",
512
512
  className: "px-3 py-2",
513
- chipClassName: te("!px-2", r)
514
- })), Ue = { button: "_button_1vksy_1" }, We = N(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => /* @__PURE__ */ z("div", {
513
+ chipClassName: M("!px-2", r)
514
+ })), He = { button: "_button_1pnt8_1" }, Ue = N(({ label: e, onClick: t, labelClassName: n = "dial-small-semi-text", colors: i, className: o }) => /* @__PURE__ */ z("div", {
515
515
  className: "px-3 py-2",
516
516
  style: r({
517
517
  "--cp-new-chat-bg": i?.background,
518
518
  "--cp-new-chat-text": i?.text,
519
519
  "--cp-new-chat-focus-outline": i?.focusOutline
520
520
  }),
521
- children: /* @__PURE__ */ B("button", {
522
- onClick: t,
523
- type: "button",
524
- className: a("flex h-[36px] w-full cursor-pointer items-center justify-center gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", Ue.button, o, ge.newChatButton),
525
- children: [/* @__PURE__ */ z(W, {
521
+ children: /* @__PURE__ */ z(f, {
522
+ label: e,
523
+ textClassName: n,
524
+ iconBefore: /* @__PURE__ */ z(pe, {
526
525
  size: 18,
527
526
  stroke: _,
528
527
  className: "shrink-0",
529
528
  "aria-hidden": !0
530
- }), /* @__PURE__ */ z("span", {
531
- className: n,
532
- children: e
533
- })]
529
+ }),
530
+ onClick: t,
531
+ className: a("h-[36px] w-full gap-2 px-3 py-1 shadow-chat-button hover:shadow-xs focus-visible:shadow-xs active:shadow-xs", He.button, o, he.newChatButton)
534
532
  })
535
- })), Z = {
533
+ })), X = {
536
534
  skeletonColor: "var(--cp-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
537
- item: "_item_i3lsf_2",
538
- itemActive: "_itemActive_i3lsf_15",
539
- groupHeader: "_groupHeader_i3lsf_20",
540
- taskBadge: "_taskBadge_i3lsf_24",
541
- dropZoneActive: "_dropZoneActive_i3lsf_30",
542
- triggerActive: "_triggerActive_i3lsf_35",
543
- triggerIcon: "_triggerIcon_i3lsf_38",
544
- unreadDot: "_unreadDot_i3lsf_46",
545
- search: "_search_i3lsf_54"
546
- }, Ge = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
535
+ item: "_item_j0zft_2",
536
+ itemActive: "_itemActive_j0zft_15",
537
+ groupHeader: "_groupHeader_j0zft_20",
538
+ dropZoneActive: "_dropZoneActive_j0zft_24",
539
+ triggerActive: "_triggerActive_j0zft_29",
540
+ triggerIcon: "_triggerIcon_j0zft_32",
541
+ unreadDot: "_unreadDot_j0zft_40",
542
+ search: "_search_j0zft_48"
543
+ }, Z = ({ label: e, isExpanded: t, onToggle: n, listId: r, className: i = "dial-tiny-lead-text", dropZoneGroupKey: o, isDragOver: s, onDragOver: c, onDragLeave: l, onDrop: u }) => {
547
544
  let d = o != null;
548
545
  return /* @__PURE__ */ B("button", {
549
546
  type: "button",
@@ -559,25 +556,28 @@ var Y = /* @__PURE__ */ function(e) {
559
556
  onDrop: d ? (e) => {
560
557
  d && (e.preventDefault(), u?.(o, o, null));
561
558
  } : void 0,
562
- className: a("group flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, Z.groupHeader, s && Z.dropZoneActive),
563
- children: [t ? /* @__PURE__ */ z(se, {
559
+ className: a("group flex h-6 w-full items-center gap-1 rounded py-1 pe-3 text-start", i, X.groupHeader, s && X.dropZoneActive),
560
+ children: [t ? /* @__PURE__ */ z(V, {
564
561
  size: 12,
565
562
  className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100",
566
563
  "aria-hidden": !0
567
- }) : /* @__PURE__ */ z(ce, {
564
+ }) : /* @__PURE__ */ z(se, {
568
565
  size: 12,
569
566
  className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 rtl:scale-x-[-1]",
570
567
  "aria-hidden": !0
571
568
  }), /* @__PURE__ */ z(b, { text: e })]
572
569
  });
573
- }, Ke = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, taskBadgeClassName: d = "dial-caption-lead-semi-text", unreadIndicatorLabel: p = "Unread", rowGroupKey: m, rows: h, draggingId: b, dragOverId: x, allowedDropGroups: w, onDragStart: T, onDragEnd: E, onDragOver: D, onDragLeave: O, onDrop: A }) => {
574
- let [j, te] = R(!1), M = L(null), N = P((t) => {
575
- te(t), t && M.current && s?.(e, M.current);
576
- }, [e, s]), F = o?.(e) ?? [], ne = F.length > 0, re = e.isIconLoading ? /* @__PURE__ */ z(ee, {
570
+ }, We = ({ item: e, isActive: n, onSelectConversation: r, searchQuery: i = "", getActions: o, onActionMenuOpen: s, actionsLabel: c = "More actions", itemTitleClassName: l = "dial-small-text", itemIconBadgeClassName: u, unreadIndicatorLabel: d = "Unread", rowGroupKey: p, rows: m, draggingId: h, dragOverId: b, allowedDropGroups: x, onDragStart: w, onDragEnd: T, onDragOver: E, onDragLeave: D, onDrop: O }) => {
571
+ let [A, j] = R(!1), M = L(null), te = P((t) => {
572
+ j(t), t && M.current && s?.(e, M.current);
573
+ }, [e, s]), N = o?.(e) ?? [], F = N.length > 0, ne = e.leadingIcon ? /* @__PURE__ */ z("span", {
574
+ className: "flex size-6 shrink-0 items-center justify-center",
575
+ children: e.leadingIcon
576
+ }) : e.isIconLoading ? /* @__PURE__ */ z(ee, {
577
577
  variant: k.Circular,
578
578
  width: g.LG,
579
579
  height: g.LG,
580
- color: Z.skeletonColor,
580
+ color: X.skeletonColor,
581
581
  "aria-hidden": !0
582
582
  }) : /* @__PURE__ */ z(t, {
583
583
  src: e.iconUrl,
@@ -585,48 +585,38 @@ var Y = /* @__PURE__ */ function(e) {
585
585
  initialsName: e.iconTooltip ?? "",
586
586
  labels: { tooltip: e.iconTooltip },
587
587
  styles: { badgeClassName: u }
588
- }), ie = /* @__PURE__ */ B("span", {
589
- className: "flex shrink-0 items-center gap-0.5",
588
+ }), re = Pe(F, A), ie = e.isUnread ? /* @__PURE__ */ B("span", {
589
+ className: "flex size-6 shrink-0 items-center justify-center",
590
590
  children: [/* @__PURE__ */ z("span", {
591
- className: "relative flex size-3 shrink-0 items-center justify-center",
592
- children: e.isUnread && /* @__PURE__ */ B(ae, { children: [/* @__PURE__ */ z("span", {
593
- className: a("size-[5.33px] rounded-full", Z.unreadDot),
594
- "aria-hidden": !0
595
- }), /* @__PURE__ */ z("span", {
596
- className: "sr-only",
597
- children: p
598
- })] })
599
- }), re]
600
- }), I = Ie(ne, j), oe = e.showTaskBadge ? /* @__PURE__ */ B("span", {
601
- className: a("flex h-5 shrink-0 items-center justify-center gap-0.5 rounded-full border pe-2 ps-1", Z.taskBadge, d),
602
- children: [/* @__PURE__ */ z(de, {
603
- size: 12,
604
- "aria-hidden": !0,
605
- stroke: _
606
- }), e.taskBadgeLabel]
607
- }) : void 0, V = m != null, se = P((e) => {
608
- e.currentTarget.contains(e.relatedTarget) || O?.();
609
- }, [O]), ce = P((t) => {
610
- if (!m || !h || !A) return;
591
+ className: a("size-[7.11px] rounded-full", X.unreadDot, F && (A ? "opacity-0" : "group-focus-within/conversation:opacity-0 group-hover/conversation:opacity-0")),
592
+ "aria-hidden": !0
593
+ }), /* @__PURE__ */ z("span", {
594
+ className: "sr-only",
595
+ children: d
596
+ })]
597
+ }) : void 0, I = p != null, ae = P((e) => {
598
+ e.currentTarget.contains(e.relatedTarget) || D?.();
599
+ }, [D]), oe = P((t) => {
600
+ if (!p || !m || !O) return;
611
601
  t.preventDefault();
612
- let n = Ve(t, e.id, h, m);
613
- A(e.id, m, n);
602
+ let n = ze(t, e.id, m, p);
603
+ O(e.id, p, n);
614
604
  }, [
615
605
  e.id,
616
- h,
617
606
  m,
618
- A
619
- ]), H = e.id === b, le = e.id === x, ue = m != null && (w?.has(m) ?? !1), fe = b != null;
607
+ p,
608
+ O
609
+ ]), V = e.id === h, se = e.id === b, ce = p != null && (x?.has(p) ?? !1), H = h != null;
620
610
  return /* @__PURE__ */ B("li", {
621
- className: a("group/conversation relative", H && "cursor-grabbing opacity-50", le && ue && "rounded", le && ue && Z.dropZoneActive, fe && !H && !ue && "cursor-not-allowed"),
622
- draggable: V || void 0,
623
- onDragStart: V ? () => T?.(e.id) : void 0,
624
- onDragEnd: V ? E : void 0,
625
- onDragOver: V ? (t) => {
626
- t.preventDefault(), D?.(e.id);
611
+ className: a("group/conversation relative", V && "cursor-grabbing opacity-50", se && ce && "rounded", se && ce && X.dropZoneActive, H && !V && !ce && "cursor-not-allowed"),
612
+ draggable: I || void 0,
613
+ onDragStart: I ? () => w?.(e.id) : void 0,
614
+ onDragEnd: I ? T : void 0,
615
+ onDragOver: I ? (t) => {
616
+ t.preventDefault(), E?.(e.id);
627
617
  } : void 0,
628
- onDragLeave: V ? se : void 0,
629
- onDrop: V ? ce : void 0,
618
+ onDragLeave: I ? ae : void 0,
619
+ onDrop: I ? oe : void 0,
630
620
  children: [/* @__PURE__ */ z("a", {
631
621
  href: e.href,
632
622
  className: "contents",
@@ -634,43 +624,43 @@ var Y = /* @__PURE__ */ function(e) {
634
624
  e.href && (t.preventDefault(), r(e.id));
635
625
  },
636
626
  children: /* @__PURE__ */ z(f, {
637
- iconBefore: ie,
627
+ iconBefore: ne,
638
628
  label: /* @__PURE__ */ z(C, {
639
629
  text: e.title,
640
630
  query: i,
641
- className: l,
631
+ className: e.isUnread ? "dial-small-semi-text" : l,
642
632
  maxLines: 1
643
633
  }),
644
- iconAfter: oe,
634
+ iconAfter: ie,
645
635
  textClassName: "min-w-0 flex-1",
646
636
  "aria-current": n ? "page" : void 0,
647
637
  onClick: e.href ? void 0 : () => r(e.id),
648
638
  tabIndex: e.href ? -1 : void 0,
649
- className: a("h-8 w-full justify-start gap-2 py-2 ps-0 after:pointer-events-none", I, Z.item, n && Z.itemActive, j && Z.itemActive)
639
+ className: a("h-8 w-full justify-start gap-2 py-2 ps-3 after:pointer-events-none", re, X.item, n && X.itemActive, A && X.itemActive)
650
640
  })
651
- }), ne && /* @__PURE__ */ z("div", {
652
- className: a("absolute inset-y-0 end-1 flex items-center", j ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
641
+ }), F && /* @__PURE__ */ z("div", {
642
+ className: a("absolute inset-y-0 end-1 flex items-center", A ? "opacity-100" : "opacity-0 group-focus-within/conversation:opacity-100 group-hover/conversation:opacity-100"),
653
643
  children: /* @__PURE__ */ z(v, {
654
- items: F,
655
- onOpenChange: N,
644
+ items: N,
645
+ onOpenChange: te,
656
646
  matchReferenceWidth: !1,
657
647
  listClassName: "w-[200px]",
658
648
  children: /* @__PURE__ */ z(S, {
659
649
  ref: M,
660
- icon: /* @__PURE__ */ z(U, {
650
+ icon: /* @__PURE__ */ z(ue, {
661
651
  size: g.SM,
662
- className: Z.triggerIcon,
652
+ className: X.triggerIcon,
663
653
  "aria-hidden": !0,
664
654
  stroke: _
665
655
  }),
666
656
  size: y.Small,
667
657
  "aria-label": c,
668
- className: a(j && Z.triggerActive)
658
+ className: a(A && X.triggerActive)
669
659
  })
670
660
  })
671
661
  })]
672
662
  });
673
- }, qe = ({ index: e, style: t, rows: r, expandedGroups: i, onToggleGroup: a, listId: o, activeConversationId: s, searchQuery: c, onSelectConversation: l, getActions: u, onActionMenuOpen: d, actionsLabel: f, unreadIndicatorLabel: p, styles: m, draggingId: h, dragOverId: g, allowedDropGroups: _, onDragStart: v, onDragEnd: y, onDragOver: b, onDragLeave: x, onDrop: S }) => {
663
+ }, Ge = ({ index: e, style: t, rows: r, expandedGroups: i, onToggleGroup: a, listId: o, activeConversationId: s, searchQuery: c, onSelectConversation: l, getActions: u, onActionMenuOpen: d, actionsLabel: f, unreadIndicatorLabel: p, styles: m, draggingId: h, dragOverId: g, allowedDropGroups: _, onDragStart: v, onDragEnd: y, onDragOver: b, onDragLeave: x, onDrop: S }) => {
674
664
  let C = r[e];
675
665
  if (C.kind === Y.Header) {
676
666
  let r = C.groupKey === n.Pinned;
@@ -678,7 +668,7 @@ var Y = /* @__PURE__ */ function(e) {
678
668
  role: "presentation",
679
669
  style: t,
680
670
  className: e === 0 ? "pt-0" : "pt-8",
681
- children: /* @__PURE__ */ z(Ge, {
671
+ children: /* @__PURE__ */ z(Z, {
682
672
  label: C.label,
683
673
  isExpanded: i.has(C.groupKey),
684
674
  onToggle: () => a(C.groupKey),
@@ -696,7 +686,7 @@ var Y = /* @__PURE__ */ function(e) {
696
686
  role: "presentation",
697
687
  style: t,
698
688
  className: "pt-1",
699
- children: /* @__PURE__ */ z(Ke, {
689
+ children: /* @__PURE__ */ z(We, {
700
690
  item: C.item,
701
691
  isActive: C.item.id === s,
702
692
  searchQuery: c,
@@ -707,7 +697,6 @@ var Y = /* @__PURE__ */ function(e) {
707
697
  unreadIndicatorLabel: p,
708
698
  itemTitleClassName: m?.itemTitleClassName,
709
699
  itemIconBadgeClassName: m?.itemIconBadgeClassName,
710
- taskBadgeClassName: m?.taskBadgeClassName,
711
700
  rowGroupKey: C.groupKey,
712
701
  rows: r,
713
702
  draggingId: h,
@@ -720,44 +709,44 @@ var Y = /* @__PURE__ */ function(e) {
720
709
  onDrop: S
721
710
  })
722
711
  });
723
- }, Je = (e, t) => t === n.All ? !0 : e.source === t, Ye = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Xe = new Set([
712
+ }, Ke = (e, t) => t === n.All ? !0 : e.source === t, qe = (e, t) => t ? e.title.toLowerCase().includes(t.toLowerCase()) : !0, Je = new Set([
724
713
  n.Pinned,
725
714
  n.MyChats,
726
715
  n.Shared,
727
716
  n.Organization
728
- ]), Ze = N(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: S, onActiveFilterChange: C, isFilterTabsHidden: w = !1, hiddenSources: T }) => {
729
- let { colors: E, typography: D, newChatButton: k, searchWrapperClassName: A, headerClassName: j, headerActionsClassName: te, newChatButtonClassName: M } = m ?? {}, { title: N, emptyLabel: re, noResultsLabel: ie, loadingLabel: ae = "Loading conversations", newChatLabel: oe, searchPlaceholder: V, searchClearLabel: se, filterLabels: ce, groupLabels: H, actionsLabel: le, unreadIndicatorLabel: ue, closeAriaLabel: de } = f, [U, fe] = R(""), [pe, me] = R(n.All);
717
+ ]), Ye = N(({ conversations: e, isLoading: t, isOpen: i, onSelectConversation: o, activeConversationId: s, labels: f, onNewChat: p, styles: m, className: h, isOverlay: g = !1, getActions: _, onActionMenuOpen: v, onToggle: y, headerActions: b, onMoveConversation: x, activeFilter: S, onActiveFilterChange: C, isFilterTabsHidden: w = !1, hiddenSources: T }) => {
718
+ let { colors: E, typography: D, newChatButton: k, searchWrapperClassName: A, headerClassName: j, headerActionsClassName: M, newChatButtonClassName: te } = m ?? {}, { title: N, emptyLabel: re, noResultsLabel: ie, loadingLabel: ae = "Loading conversations", newChatLabel: oe, searchPlaceholder: V, searchClearLabel: se, filterLabels: ce, groupLabels: H, actionsLabel: le, unreadIndicatorLabel: ue, closeAriaLabel: de } = f, [U, fe] = R(""), [pe, me] = R(n.All);
730
719
  F(() => {
731
720
  S != null && me(S);
732
721
  }, [S]);
733
- let W = I(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [G, he] = R(() => Xe), [_e, ve] = R(5), ye = ne(), be = L(null), K = L(null), [xe, Se] = R(null), [q, J] = R(null), [Ce, we] = R(null), Te = L(null), Ee = L(null), De = P(({ height: e }) => {
722
+ let W = I(() => T?.length ? e.filter((e) => e.source == null || !T.includes(e.source)) : e, [e, T]), [G, ge] = R(() => Je), [_e, ve] = R(5), K = ne(), ye = L(null), be = L(null), [q, J] = R(null), [xe, Se] = R(null), [Ce, we] = R(null), Te = L(null), Ee = L(null), De = P(({ height: e }) => {
734
723
  ve(Math.ceil(e / 36 * 2));
735
724
  }, []), Oe = P((e) => {
736
725
  fe(e ?? "");
737
726
  }, []), ke = P((e) => {
738
- he((t) => {
727
+ ge((t) => {
739
728
  let n = new Set(t);
740
729
  return n.has(e) ? n.delete(e) : n.add(e), n;
741
730
  });
742
731
  }, []), Ae = P(() => {
743
- Te.current = null, Ee.current = null, Se(null), J(null), we(null);
732
+ Te.current = null, Ee.current = null, J(null), Se(null), we(null);
744
733
  }, []), je = P((e, t) => {
745
- let n = Be(e, ze(t, e), W);
746
- Te.current = e, Ee.current = n, Se(e), we(n);
747
- }, [W]), Me = P(() => {
734
+ let n = Re(e, Le(t, e), W);
735
+ Te.current = e, Ee.current = n, J(e), we(n);
736
+ }, [W]), Pe = P(() => {
748
737
  Ae();
749
- }, [Ae]), Ne = P((e) => {
750
- J(e);
751
- }, []), Ie = P(() => {
752
- J(null);
753
- }, []), Re = P((e, t, n) => {
738
+ }, [Ae]), Ie = P((e) => {
739
+ Se(e);
740
+ }, []), ze = P(() => {
741
+ Se(null);
742
+ }, []), Be = P((e, t, n) => {
754
743
  let r = Te.current, i = Ee.current;
755
744
  Ae(), r != null && r !== e && i?.has(t) && x?.({
756
745
  draggedId: r,
757
746
  targetGroupKey: t,
758
747
  afterId: n
759
748
  });
760
- }, [Ae, x]), Ve = r({
749
+ }, [Ae, x]), He = r({
761
750
  "--cp-item-hover": E?.itemHover,
762
751
  "--cp-item-active": E?.itemActive,
763
752
  "--cp-text": E?.text,
@@ -770,29 +759,26 @@ var Y = /* @__PURE__ */ function(e) {
770
759
  "--cp-trigger-icon": E?.triggerIcon,
771
760
  "--cp-trigger-icon-idle": E?.triggerIconIdle,
772
761
  "--cp-skeleton-color": E?.skeletonColor,
773
- "--cp-task-badge-border": E?.taskBadgeBorder,
774
- "--cp-task-badge-bg": E?.taskBadgeBackground,
775
- "--cp-task-badge-text": E?.taskBadgeText,
776
762
  "--cp-unread-dot": E?.unreadDot
777
- }), X = I(() => W.filter((e) => Je(e, pe) && Ye(e, U)), [
763
+ }), Z = I(() => W.filter((e) => Ke(e, pe) && qe(e, U)), [
778
764
  W,
779
765
  pe,
780
766
  U
781
- ]), Ue = I(() => X.filter((e) => e.isPinned), [X]), Ge = I(() => X.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [X]), Ke = I(() => X.filter((e) => !e.isPinned && e.source === n.Shared), [X]), Ze = I(() => X.filter((e) => !e.isPinned && e.source === n.Organization), [X]), Qe = I(() => [
767
+ ]), We = I(() => Z.filter((e) => e.isPinned), [Z]), Ye = I(() => Z.filter((e) => !e.isPinned && e.source !== n.Shared && e.source !== n.Organization), [Z]), Xe = I(() => Z.filter((e) => !e.isPinned && e.source === n.Shared), [Z]), Ze = I(() => Z.filter((e) => !e.isPinned && e.source === n.Organization), [Z]), Q = I(() => [
782
768
  {
783
769
  key: n.Pinned,
784
770
  label: H?.pinned ?? "Pinned",
785
- items: Ue
771
+ items: We
786
772
  },
787
773
  {
788
774
  key: n.MyChats,
789
775
  label: H?.myChats ?? "My chats",
790
- items: Ge
776
+ items: Ye
791
777
  },
792
778
  {
793
779
  key: n.Shared,
794
780
  label: H?.shared ?? "Shared",
795
- items: Ke
781
+ items: Xe
796
782
  },
797
783
  {
798
784
  key: n.Organization,
@@ -801,13 +787,13 @@ var Y = /* @__PURE__ */ function(e) {
801
787
  }
802
788
  ], [
803
789
  H,
804
- Ue,
805
- Ge,
806
- Ke,
790
+ We,
791
+ Ye,
792
+ Xe,
807
793
  Ze
808
- ]), Q = I(() => {
794
+ ]), $ = I(() => {
809
795
  let e = [];
810
- for (let t of Qe) if (t.items.length !== 0 && (e.push({
796
+ for (let t of Q) if (t.items.length !== 0 && (e.push({
811
797
  kind: Y.Header,
812
798
  groupKey: t.key,
813
799
  label: t.label
@@ -817,26 +803,26 @@ var Y = /* @__PURE__ */ function(e) {
817
803
  groupKey: t.key
818
804
  });
819
805
  return e;
820
- }, [Qe, G]);
806
+ }, [Q, G]);
821
807
  F(() => {
822
- if (!s || K.current === s) return;
823
- let e = Q.findIndex((e) => e.kind === Y.Item && e.item.id === s);
824
- e >= 0 && (be.current?.scrollToRow({
808
+ if (!s || be.current === s) return;
809
+ let e = $.findIndex((e) => e.kind === Y.Item && e.item.id === s);
810
+ e >= 0 && (ye.current?.scrollToRow({
825
811
  index: e,
826
812
  align: "smart",
827
813
  behavior: "smooth"
828
- }), K.current = s);
814
+ }), be.current = s);
829
815
  }, [
830
816
  s,
831
- Qe,
817
+ Q,
832
818
  G,
833
- Q
819
+ $
834
820
  ]);
835
- let $ = I(() => ({
836
- rows: Q,
821
+ let Qe = I(() => ({
822
+ rows: $,
837
823
  expandedGroups: G,
838
824
  onToggleGroup: ke,
839
- listId: ye,
825
+ listId: K,
840
826
  activeConversationId: s,
841
827
  searchQuery: U,
842
828
  onSelectConversation: o,
@@ -847,22 +833,21 @@ var Y = /* @__PURE__ */ function(e) {
847
833
  styles: {
848
834
  groupHeaderClassName: D?.groupHeaderClassName,
849
835
  itemTitleClassName: D?.itemTitleClassName,
850
- itemIconBadgeClassName: m?.itemIconBadgeClassName,
851
- taskBadgeClassName: m?.taskBadgeClassName
836
+ itemIconBadgeClassName: m?.itemIconBadgeClassName
852
837
  },
853
- draggingId: xe,
854
- dragOverId: q,
838
+ draggingId: q,
839
+ dragOverId: xe,
855
840
  allowedDropGroups: Ce,
856
- onDragStart: (e) => je(e, Q),
857
- onDragEnd: Me,
858
- onDragOver: Ne,
859
- onDragLeave: Ie,
860
- onDrop: Re
841
+ onDragStart: (e) => je(e, $),
842
+ onDragEnd: Pe,
843
+ onDragOver: Ie,
844
+ onDragLeave: ze,
845
+ onDrop: Be
861
846
  }), [
862
- Q,
847
+ $,
863
848
  G,
864
849
  ke,
865
- ye,
850
+ K,
866
851
  s,
867
852
  U,
868
853
  o,
@@ -873,16 +858,15 @@ var Y = /* @__PURE__ */ function(e) {
873
858
  D?.groupHeaderClassName,
874
859
  D?.itemTitleClassName,
875
860
  m?.itemIconBadgeClassName,
876
- m?.taskBadgeClassName,
877
- xe,
878
861
  q,
862
+ xe,
879
863
  Ce,
880
864
  je,
881
- Me,
882
- Ne,
865
+ Pe,
883
866
  Ie,
884
- Re
885
- ]), $e = W.length === 0, et = W.length > 0 && X.length === 0;
867
+ ze,
868
+ Be
869
+ ]), $e = W.length === 0, et = W.length > 0 && Z.length === 0;
886
870
  return /* @__PURE__ */ B(d, {
887
871
  isOpen: i,
888
872
  isOverlay: g,
@@ -900,26 +884,26 @@ var Y = /* @__PURE__ */ function(e) {
900
884
  },
901
885
  typography: { fontClassName: D?.fontClassName },
902
886
  bodyClassName: "flex flex-col overflow-hidden p-0 gap-3",
903
- cssVars: Ve,
887
+ cssVars: He,
904
888
  titleClassName: D?.fontClassName,
905
889
  headerClassName: a("h-[64px]", j),
906
- headerActionsClassName: te,
890
+ headerActionsClassName: M,
907
891
  className: a(i ? "w-[324px] mobile:w-full" : "w-0", h)
908
892
  },
909
893
  rightActions: b,
910
894
  children: [
911
- /* @__PURE__ */ z(We, {
895
+ /* @__PURE__ */ z(Ue, {
912
896
  label: oe,
913
897
  onClick: p,
914
898
  labelClassName: D?.newChatLabelClassName,
915
899
  colors: k,
916
- className: M
900
+ className: te
917
901
  }),
918
902
  /* @__PURE__ */ z("div", {
919
903
  role: "search",
920
- className: a("px-3 py-2", ge.search),
904
+ className: a("px-3 py-2", he.search),
921
905
  children: /* @__PURE__ */ z(O, {
922
- wrapperClassName: a(Z.search, A),
906
+ wrapperClassName: a(X.search, A),
923
907
  value: U,
924
908
  onChange: Oe,
925
909
  placeholder: V,
@@ -927,7 +911,7 @@ var Y = /* @__PURE__ */ function(e) {
927
911
  "aria-label": V
928
912
  })
929
913
  }),
930
- !w && /* @__PURE__ */ z(He, {
914
+ !w && /* @__PURE__ */ z(Ve, {
931
915
  activeTab: pe,
932
916
  labels: ce,
933
917
  onChange: (e) => {
@@ -948,27 +932,27 @@ var Y = /* @__PURE__ */ function(e) {
948
932
  className: "flex flex-col gap-3 px-2 py-3",
949
933
  children: Array.from({ length: 15 }, (e, t) => /* @__PURE__ */ z(ee, {
950
934
  avatar: { size: 24 },
951
- showTitle: { width: Fe(t) },
935
+ showTitle: { width: Ne(t) },
952
936
  paragraph: !1,
953
937
  active: !0,
954
- color: Z.skeletonColor
938
+ color: X.skeletonColor
955
939
  }, t))
956
- }) : $e ? /* @__PURE__ */ z(c, { label: re }) : et ? /* @__PURE__ */ z(l, { label: ie }) : /* @__PURE__ */ z(Pe, {
957
- listRef: be,
958
- id: ye,
940
+ }) : $e ? /* @__PURE__ */ z(c, { label: re }) : et ? /* @__PURE__ */ z(l, { label: ie }) : /* @__PURE__ */ z(Me, {
941
+ listRef: ye,
942
+ id: K,
959
943
  role: "list",
960
944
  style: { height: "100%" },
961
- rowComponent: qe,
962
- rowCount: Q.length,
963
- rowHeight: Le,
945
+ rowComponent: Ge,
946
+ rowCount: $.length,
947
+ rowHeight: Fe,
964
948
  overscanCount: _e,
965
949
  onResize: De,
966
- rowProps: $
950
+ rowProps: Qe
967
951
  })
968
952
  })
969
953
  ]
970
954
  });
971
- }), Qe = 8e3, Q = "flex size-7 shrink-0 items-center justify-center", $ = {
955
+ }), Xe = 8e3, Ze = "flex size-7 shrink-0 items-center justify-center", Q = {
972
956
  root: "_root_11lia_1",
973
957
  text: "_text_11lia_5",
974
958
  textSecondary: "_textSecondary_11lia_9",
@@ -977,17 +961,17 @@ var Y = /* @__PURE__ */ function(e) {
977
961
  errorIcon: "_errorIcon_11lia_21",
978
962
  failureCount: "_failureCount_11lia_25",
979
963
  warningIcon: "_warningIcon_11lia_35"
980
- }, $e = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
964
+ }, $ = ({ title: e, failedCount: t, isCollapsed: n, jobsId: r, labels: i, styles: o, onToggleCollapse: s, onClose: c }) => {
981
965
  let l = o?.typography;
982
966
  return /* @__PURE__ */ B("div", {
983
- className: a($.divider, "mx-4 flex items-center justify-between py-3"),
967
+ className: a(Q.divider, "mx-4 flex items-center justify-between py-3"),
984
968
  children: [/* @__PURE__ */ B("div", {
985
969
  className: "flex min-w-0 items-center gap-2",
986
970
  children: [/* @__PURE__ */ z("span", {
987
- className: a($.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
971
+ className: a(Q.text, "truncate", l?.titleClassName || "dial-small-paragraph-semi-text"),
988
972
  children: e
989
973
  }), t > 0 && /* @__PURE__ */ z("span", {
990
- className: a($.failureCount, "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1", l?.failureCountClassName || "dial-small-paragraph-semi-text"),
974
+ className: a(Q.failureCount, "inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1", l?.failureCountClassName || "dial-small-paragraph-semi-text"),
991
975
  children: t
992
976
  })]
993
977
  }), /* @__PURE__ */ B("div", {
@@ -997,45 +981,45 @@ var Y = /* @__PURE__ */ function(e) {
997
981
  size: y.Small,
998
982
  "aria-expanded": !n,
999
983
  "aria-controls": r,
1000
- icon: z(n ? ue : le, {
984
+ icon: z(n ? le : H, {
1001
985
  size: g.SM,
1002
- className: $.textSecondary,
986
+ className: Q.textSecondary,
1003
987
  stroke: _,
1004
988
  "aria-hidden": !0
1005
989
  }),
1006
990
  onClick: s,
1007
- className: Q
991
+ className: Ze
1008
992
  }), /* @__PURE__ */ z(S, {
1009
993
  "aria-label": i.closeQueueAriaLabel,
1010
994
  size: y.Small,
1011
- icon: /* @__PURE__ */ z(he, {
995
+ icon: /* @__PURE__ */ z(W, {
1012
996
  size: g.SM,
1013
- className: $.textSecondary,
997
+ className: Q.textSecondary,
1014
998
  stroke: _,
1015
999
  "aria-hidden": !0
1016
1000
  }),
1017
1001
  onClick: c,
1018
- className: Q
1002
+ className: Ze
1019
1003
  })]
1020
1004
  })]
1021
1005
  });
1022
- }, et = [".dial", ".zip"], tt = (e) => {
1006
+ }, Qe = [".dial", ".zip"], $e = (e) => {
1023
1007
  let t = e.toLowerCase();
1024
- return et.some((e) => t.endsWith(e)) ? pe : t.endsWith(".json") ? me : fe;
1025
- }, nt = ({ job: t, labels: n, onCancel: r, styles: i }) => {
1026
- let o = i?.typography, s = tt(t.fileName), c = t.status === e.Canceled;
1008
+ return Qe.some((e) => t.endsWith(e)) ? U : t.endsWith(".json") ? fe : de;
1009
+ }, et = ({ job: t, labels: n, onCancel: r, styles: i }) => {
1010
+ let o = i?.typography, s = $e(t.fileName), c = t.status === e.Canceled;
1027
1011
  return /* @__PURE__ */ B("div", {
1028
1012
  className: "group flex items-center gap-2 px-4 py-2",
1029
1013
  children: [
1030
1014
  /* @__PURE__ */ z(s, {
1031
1015
  size: g.SM,
1032
1016
  stroke: _,
1033
- className: $.textSecondary,
1017
+ className: Q.textSecondary,
1034
1018
  "aria-hidden": !0
1035
1019
  }),
1036
1020
  /* @__PURE__ */ z(b, {
1037
1021
  text: t.fileName,
1038
- className: a(c ? $.textSecondary : $.text, o?.jobLabelClassName || "dial-small-text"),
1022
+ className: a(c ? Q.textSecondary : Q.text, o?.jobLabelClassName || "dial-small-text"),
1039
1023
  contentClassName: "!z-[80]"
1040
1024
  }),
1041
1025
  t.status === e.InProgress && /* @__PURE__ */ B("div", {
@@ -1047,9 +1031,9 @@ var Y = /* @__PURE__ */ function(e) {
1047
1031
  }), /* @__PURE__ */ z(S, {
1048
1032
  "aria-label": n.cancelJobAriaLabel(t.fileName),
1049
1033
  size: y.Small,
1050
- icon: /* @__PURE__ */ z(he, {
1034
+ icon: /* @__PURE__ */ z(W, {
1051
1035
  size: g.SM,
1052
- className: $.textSecondary,
1036
+ className: Q.textSecondary,
1053
1037
  stroke: _,
1054
1038
  "aria-hidden": !0
1055
1039
  }),
@@ -1059,10 +1043,10 @@ var Y = /* @__PURE__ */ function(e) {
1059
1043
  }),
1060
1044
  t.status === e.Success && /* @__PURE__ */ z("span", {
1061
1045
  className: "flex size-7 shrink-0 items-center justify-center",
1062
- children: /* @__PURE__ */ z(H, {
1046
+ children: /* @__PURE__ */ z(ce, {
1063
1047
  size: g.SM,
1064
1048
  stroke: _,
1065
- className: $.successIcon,
1049
+ className: Q.successIcon,
1066
1050
  "aria-hidden": !0
1067
1051
  })
1068
1052
  }),
@@ -1075,9 +1059,9 @@ var Y = /* @__PURE__ */ function(e) {
1075
1059
  role: "img",
1076
1060
  "aria-label": n.jobWarningMessage(t.warningCode, t.warningNames),
1077
1061
  tabIndex: 0,
1078
- children: /* @__PURE__ */ z(V, {
1062
+ children: /* @__PURE__ */ z(oe, {
1079
1063
  size: g.SM,
1080
- className: $.warningIcon,
1064
+ className: Q.warningIcon,
1081
1065
  "aria-hidden": !0
1082
1066
  })
1083
1067
  })
@@ -1091,20 +1075,20 @@ var Y = /* @__PURE__ */ function(e) {
1091
1075
  role: "img",
1092
1076
  "aria-label": n.jobErrorMessage(t.errorCode),
1093
1077
  tabIndex: 0,
1094
- children: /* @__PURE__ */ z(oe, {
1078
+ children: /* @__PURE__ */ z(ae, {
1095
1079
  size: g.SM,
1096
- className: $.errorIcon,
1080
+ className: Q.errorIcon,
1097
1081
  "aria-hidden": !0
1098
1082
  })
1099
1083
  })
1100
1084
  }),
1101
1085
  c && /* @__PURE__ */ z("span", {
1102
- className: a($.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
1086
+ className: a(Q.textSecondary, "shrink-0", o?.canceledLabelClassName || "dial-small-text"),
1103
1087
  children: n.canceledLabel
1104
1088
  })
1105
1089
  ]
1106
1090
  });
1107
- }, rt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), it = (t) => t.filter((t) => t.status !== e.InProgress).length, at = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, ot = N(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
1091
+ }, tt = (e) => Math.round(e.reduce((e, t) => e + t.progress.percent, 0) / e.length), nt = (t) => t.filter((t) => t.status !== e.InProgress).length, rt = (e, t, n) => e && t ? n.closeQueueConfirmDescriptionMixed : t ? n.closeQueueConfirmDescriptionFailed : n.closeQueueConfirmDescriptionInProgress, it = N(({ title: t, jobs: n, onClose: i, onCancel: o, labels: s, styles: c }) => {
1108
1092
  let [l, u] = R(!1), d = ne(), [f, p] = R(!1), g = c?.colors, _ = {
1109
1093
  ...r({
1110
1094
  "--cp-transfer-queue-bg": g?.background,
@@ -1131,7 +1115,7 @@ var Y = /* @__PURE__ */ function(e) {
1131
1115
  }, []);
1132
1116
  if (F(() => {
1133
1117
  if (!x) return;
1134
- let e = setTimeout(i, Qe);
1118
+ let e = setTimeout(i, Xe);
1135
1119
  return () => clearTimeout(e);
1136
1120
  }, [x, i]), n.length === 0) return null;
1137
1121
  let T = n.filter((t) => t.status === e.Failed).length;
@@ -1139,9 +1123,9 @@ var Y = /* @__PURE__ */ function(e) {
1139
1123
  role: "status",
1140
1124
  "aria-live": "polite",
1141
1125
  style: _,
1142
- className: a($.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
1126
+ className: a(Q.root, "w-[370px] max-w-[calc(100vw-2rem)] rounded-xl shadow-md", c?.rootClassName),
1143
1127
  children: [
1144
- /* @__PURE__ */ z($e, {
1128
+ /* @__PURE__ */ z($, {
1145
1129
  title: t,
1146
1130
  failedCount: T,
1147
1131
  isCollapsed: l,
@@ -1152,15 +1136,15 @@ var Y = /* @__PURE__ */ function(e) {
1152
1136
  onClose: S
1153
1137
  }),
1154
1138
  l && v && /* @__PURE__ */ z(D, {
1155
- value: rt(n),
1139
+ value: tt(n),
1156
1140
  size: y.Small,
1157
1141
  "aria-label": s.queueProgressAriaLabel,
1158
- "aria-valuetext": s.queueProgressValueText(it(n), n.length)
1142
+ "aria-valuetext": s.queueProgressValueText(nt(n), n.length)
1159
1143
  }),
1160
1144
  !l && /* @__PURE__ */ z("div", {
1161
1145
  id: d,
1162
1146
  className: a("flex max-h-[40vh] flex-col overflow-y-auto py-1", c?.bodyClassName),
1163
- children: n.map((e) => /* @__PURE__ */ z(nt, {
1147
+ children: n.map((e) => /* @__PURE__ */ z(et, {
1164
1148
  job: e,
1165
1149
  labels: s,
1166
1150
  onCancel: o,
@@ -1170,7 +1154,7 @@ var Y = /* @__PURE__ */ function(e) {
1170
1154
  /* @__PURE__ */ z(m, {
1171
1155
  open: f,
1172
1156
  header: s.closeQueueConfirmHeader,
1173
- description: at(v, b, s),
1157
+ description: rt(v, b, s),
1174
1158
  confirmLabel: s.closeLabel,
1175
1159
  cancelLabel: s.cancelLabel,
1176
1160
  variant: h.Danger,
@@ -1180,10 +1164,10 @@ var Y = /* @__PURE__ */ function(e) {
1180
1164
  ]
1181
1165
  });
1182
1166
  });
1183
- ot.displayName = "ImportExportQueue";
1167
+ it.displayName = "ImportExportQueue";
1184
1168
  //#endregion
1185
1169
  //#region src/components/RenameConversationPopup/RenameConversationPopup.tsx
1186
- var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
1170
+ var at = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCancel: c, onGenerateWithAi: l, labels: u, styles: d }) => {
1187
1171
  let [f, m] = R(t), [h, v] = R(!1), [y, b] = R(null), x = L(null), C = L(!1), D = L(0);
1188
1172
  F(() => {
1189
1173
  let n = e && !C.current;
@@ -1204,9 +1188,9 @@ var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1204
1188
  k,
1205
1189
  a,
1206
1190
  O
1207
- ]), te = P((e) => {
1191
+ ]), M = P((e) => {
1208
1192
  e.key === "Enter" && j();
1209
- }, [j]), M = P(async () => {
1193
+ }, [j]), te = P(async () => {
1210
1194
  if (h) return;
1211
1195
  let e = ++D.current;
1212
1196
  v(!0), b(null);
@@ -1255,14 +1239,14 @@ var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1255
1239
  placeholder: u.inputPlaceholder,
1256
1240
  error: N,
1257
1241
  onChange: (e) => m(o(e ?? "")),
1258
- onKeyDown: te
1242
+ onKeyDown: M
1259
1243
  })
1260
1244
  }), /* @__PURE__ */ z(S, {
1261
1245
  "aria-label": u.renameWithAiLabel,
1262
1246
  tooltipProps: { tooltip: u.renameWithAiLabel },
1263
1247
  disabled: h || n,
1264
- onClick: M,
1265
- icon: h ? /* @__PURE__ */ z(A, { size: g.MD }) : /* @__PURE__ */ z(G, {
1248
+ onClick: te,
1249
+ icon: h ? /* @__PURE__ */ z(A, { size: g.MD }) : /* @__PURE__ */ z(me, {
1266
1250
  size: g.MD,
1267
1251
  stroke: _
1268
1252
  })
@@ -1271,6 +1255,6 @@ var st = N(({ isOpen: e, currentTitle: t, isSaving: n, error: r, onSave: a, onCa
1271
1255
  })
1272
1256
  });
1273
1257
  });
1274
- st.displayName = "RenameConversationPopup";
1258
+ at.displayName = "RenameConversationPopup";
1275
1259
  //#endregion
1276
- export { ge as CONVERSATION_PANEL_CLASS, Ze as ConversationPanel, ot as ImportExportQueue, st as RenameConversationPopup, tt as getTransferFileIcon };
1260
+ export { he as CONVERSATION_PANEL_CLASS, Ye as ConversationPanel, it as ImportExportQueue, at as RenameConversationPopup, $e as getTransferFileIcon };