@swisper.ai/web-chat-ui 0.0.8 → 0.1.0

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.
Files changed (28) hide show
  1. package/dist/components/chat-card/components/chat-card-header.d.ts.map +1 -1
  2. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts.map +1 -1
  3. package/dist/components/rich-text-field/utils.d.ts +2 -2
  4. package/dist/index.css +1 -1
  5. package/dist/index.es.js +932 -930
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.d.ts +20 -15
  8. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.d.ts.map +1 -1
  9. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.d.ts +0 -1
  10. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.d.ts.map +1 -1
  11. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts +4 -4
  12. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts.map +1 -1
  13. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.d.ts +13 -13
  14. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.d.ts.map +1 -1
  15. package/package.json +5 -5
  16. package/src/components/chat-card/components/chat-card-header.tsx +3 -7
  17. package/src/components/chat-thinking-process/chat-thinking-process.tsx +4 -12
  18. package/src/components/rich-text-area/__tests__/rich-text-area.spec.tsx +12 -2
  19. package/src/layouts/chat-card-three-column-layout/__stories__/stay-list.tsx +6 -9
  20. package/src/layouts/chat-card-three-column-layout/__tests__/chat-card-three-column-layout.sizing.test.ts +10 -12
  21. package/src/layouts/chat-card-three-column-layout/__tests__/chat-card-three-column-layout.spec.tsx +71 -26
  22. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.json +18 -12
  23. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.sizing.ts +0 -2
  24. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.tsx +20 -56
  25. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.tsx +36 -34
  26. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.ts +33 -22
  27. package/src/layouts/chat-card-two-column-layout/__stories__/route-map.tsx +1 -1
  28. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.json +2 -2
package/dist/index.es.js CHANGED
@@ -1,54 +1,54 @@
1
1
  import { Slot as e } from "@radix-ui/react-slot";
2
2
  import t, { Children as n, cloneElement as r, createContext as i, forwardRef as a, isValidElement as o, memo as s, useCallback as c, useContext as l, useEffect as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
3
- import { Button as g, Chip as _, Collapsible as v, CollapsibleContent as y, CollapsibleTrigger as b, Divider as x, EmptyState as S, EmptyStateActionRow as C, EmptyStateDescription as w, EmptyStateIcon as T, EmptyStateTitle as E, IconButton as D, List as ee, ListItem as te, ListItemAction as O, ListItemTitle as k, ListItemTrigger as A, Menu as ne, MenuProvider as re, MenuTrigger as j, OrderChip as ie, Panel as M, PanelActionButton as N, PanelActionCloseButton as P, PanelBody as ae, PanelContent as oe, PanelFooter as se, PanelHeader as ce, PanelProvider as F, PanelTitle as le, Popover as ue, PopoverContent as de, PopoverTrigger as fe, ScrollArea as pe, SelectField as me, Skeleton as he, Tooltip as ge, Typography as I, listItemVariants as _e, panelBodyPadding as ve, useIsResolution as ye } from "@swisper.ai/ui";
4
- import { cn as L, useElementMeasure as R } from "@swisper.ai/web-core";
5
- import { Fragment as be, jsx as z, jsxs as B } from "react/jsx-runtime";
6
- import { cva as V } from "class-variance-authority";
7
- import { AttachmentsIcon as xe, ChevronDownIcon as Se, ChevronUpIcon as Ce, CloseIcon as we, CodeIcon as Te, DeleteIcon as Ee, DocIcon as De, DraftIcon as Oe, FormatAlignCenterIcon as ke, FormatAlignLeftIcon as Ae, FormatAlignRightIcon as je, FormatBoldIcon as Me, FormatCleanIcon as Ne, FormatColorIcon as Pe, FormatItalicIcon as Fe, FormatUnderlineIcon as Ie, ImageIcon as Le, LinkOffIcon as Re, LinkOnIcon as ze, MoreHorizontalIcon as Be, OpenInFullIcon as Ve, PdfIcon as He, PptIcon as Ue, SignalReadIcon as We, SignalUnreadIcon as Ge, SnoozeIcon as Ke, XlsIcon as qe } from "@swisper.ai/icons";
8
- import { CodeNode as Je } from "@lexical/code";
9
- import { $isLinkNode as Ye, LinkNode as Xe, TOGGLE_LINK_COMMAND as Ze } from "@lexical/link";
10
- import { $createListItemNode as Qe, $createListNode as $e, ListItemNode as et, ListNode as tt } from "@lexical/list";
11
- import { LexicalComposer as nt } from "@lexical/react/LexicalComposer";
12
- import { ContentEditable as rt } from "@lexical/react/LexicalContentEditable";
13
- import { LexicalErrorBoundary as it } from "@lexical/react/LexicalErrorBoundary";
14
- import { HistoryPlugin as at } from "@lexical/react/LexicalHistoryPlugin";
15
- import { RichTextPlugin as ot } from "@lexical/react/LexicalRichTextPlugin";
16
- import { $createHeadingNode as st, HeadingNode as ct, QuoteNode as lt } from "@lexical/rich-text";
17
- import { useLexicalComposerContext as ut } from "@lexical/react/LexicalComposerContext";
18
- import { $convertFromMarkdownString as dt, $convertToMarkdownString as ft, TRANSFORMERS as pt, TRANSFORMERS as mt } from "@lexical/markdown";
19
- import { $addUpdateTag as H, $createParagraphNode as ht, $createRangeSelection as gt, $createTextNode as _t, $getPreviousSelection as vt, $getRoot as U, $getSelection as W, $insertNodes as yt, $isElementNode as bt, $isParagraphNode as xt, $isRangeSelection as G, $isTextNode as K, $selectAll as St, $setSelection as Ct, $setState as wt, COMMAND_PRIORITY_CRITICAL as Tt, COMMAND_PRIORITY_EDITOR as Et, COMMAND_PRIORITY_LOW as Dt, DecoratorNode as Ot, ElementNode as kt, FORMAT_ELEMENT_COMMAND as At, FORMAT_TEXT_COMMAND as jt, PASTE_COMMAND as Mt, SELECTION_CHANGE_COMMAND as Nt, SKIP_DOM_SELECTION_TAG as Pt, SKIP_SELECTION_FOCUS_TAG as Ft, createCommand as It, createState as Lt, isHTMLElement as Rt, setNodeIndentFromDOM as zt } from "lexical";
20
- import { OnChangePlugin as Bt } from "@lexical/react/LexicalOnChangePlugin";
21
- import { createPortal as Vt } from "react-dom";
22
- import { useVirtualizer as Ht } from "@tanstack/react-virtual";
23
- import * as Ut from "@radix-ui/react-scroll-area";
24
- import { nanoid as Wt } from "nanoid";
25
- import Gt from "mime";
26
- import { Streamdown as Kt, defaultRehypePlugins as qt, defaultRemarkPlugins as Jt } from "streamdown";
27
- import Yt, { defaultSchema as Xt } from "rehype-sanitize";
3
+ import { Button as g, Chip as _, Collapsible as v, CollapsibleChevron as y, CollapsibleContent as b, CollapsibleTrigger as x, Divider as S, EmptyState as C, EmptyStateActionRow as w, EmptyStateDescription as T, EmptyStateIcon as E, EmptyStateTitle as ee, IconButton as D, List as te, ListItem as O, ListItemAction as k, ListItemTitle as A, ListItemTrigger as j, Menu as ne, MenuProvider as M, MenuTrigger as re, OrderChip as N, Panel as ie, PanelActionButton as P, PanelActionCloseButton as ae, PanelBody as oe, PanelContent as se, PanelFooter as ce, PanelHeader as F, PanelProvider as le, PanelTitle as ue, Popover as de, PopoverContent as fe, PopoverTrigger as pe, ScrollArea as me, SelectField as he, Skeleton as ge, Tooltip as _e, Typography as I, listItemVariants as ve, panelBodyPadding as ye, useIsResolution as be } from "@swisper.ai/ui";
4
+ import { cn as L, useElementMeasure as xe } from "@swisper.ai/web-core";
5
+ import { Fragment as Se, jsx as R, jsxs as z } from "react/jsx-runtime";
6
+ import { cva as B } from "class-variance-authority";
7
+ import { CodeNode as Ce } from "@lexical/code";
8
+ import { $isLinkNode as we, LinkNode as Te, TOGGLE_LINK_COMMAND as Ee } from "@lexical/link";
9
+ import { $createListItemNode as De, $createListNode as Oe, ListItemNode as ke, ListNode as Ae } from "@lexical/list";
10
+ import { LexicalComposer as je } from "@lexical/react/LexicalComposer";
11
+ import { ContentEditable as Me } from "@lexical/react/LexicalContentEditable";
12
+ import { LexicalErrorBoundary as Ne } from "@lexical/react/LexicalErrorBoundary";
13
+ import { HistoryPlugin as Pe } from "@lexical/react/LexicalHistoryPlugin";
14
+ import { RichTextPlugin as Fe } from "@lexical/react/LexicalRichTextPlugin";
15
+ import { $createHeadingNode as Ie, HeadingNode as Le, QuoteNode as Re } from "@lexical/rich-text";
16
+ import { useLexicalComposerContext as ze } from "@lexical/react/LexicalComposerContext";
17
+ import { $convertFromMarkdownString as Be, $convertToMarkdownString as Ve, TRANSFORMERS as He, TRANSFORMERS as Ue } from "@lexical/markdown";
18
+ import { $addUpdateTag as V, $createParagraphNode as We, $createRangeSelection as Ge, $createTextNode as Ke, $getPreviousSelection as qe, $getRoot as H, $getSelection as U, $insertNodes as Je, $isElementNode as Ye, $isParagraphNode as Xe, $isRangeSelection as W, $isTextNode as G, $selectAll as Ze, $setSelection as Qe, $setState as $e, COMMAND_PRIORITY_CRITICAL as et, COMMAND_PRIORITY_EDITOR as tt, COMMAND_PRIORITY_LOW as nt, DecoratorNode as rt, ElementNode as it, FORMAT_ELEMENT_COMMAND as at, FORMAT_TEXT_COMMAND as ot, PASTE_COMMAND as st, SELECTION_CHANGE_COMMAND as ct, SKIP_DOM_SELECTION_TAG as lt, SKIP_SELECTION_FOCUS_TAG as ut, createCommand as dt, createState as ft, isHTMLElement as pt, setNodeIndentFromDOM as mt } from "lexical";
19
+ import { OnChangePlugin as ht } from "@lexical/react/LexicalOnChangePlugin";
20
+ import { createPortal as gt } from "react-dom";
21
+ import { useVirtualizer as _t } from "@tanstack/react-virtual";
22
+ import * as vt from "@radix-ui/react-scroll-area";
23
+ import { nanoid as yt } from "nanoid";
24
+ import { AttachmentsIcon as bt, ChevronDownIcon as xt, ChevronUpIcon as St, CloseIcon as Ct, CodeIcon as wt, DeleteIcon as Tt, DocIcon as Et, DraftIcon as Dt, FormatAlignCenterIcon as Ot, FormatAlignLeftIcon as kt, FormatAlignRightIcon as At, FormatBoldIcon as jt, FormatCleanIcon as Mt, FormatColorIcon as Nt, FormatItalicIcon as Pt, FormatUnderlineIcon as Ft, ImageIcon as It, LinkOffIcon as Lt, LinkOnIcon as Rt, MoreHorizontalIcon as zt, OpenInFullIcon as Bt, PdfIcon as Vt, PptIcon as Ht, SignalReadIcon as Ut, SignalUnreadIcon as Wt, SnoozeIcon as Gt, XlsIcon as Kt } from "@swisper.ai/icons";
25
+ import qt from "mime";
26
+ import { Streamdown as Jt, defaultRehypePlugins as Yt, defaultRemarkPlugins as Xt } from "streamdown";
27
+ import Zt, { defaultSchema as Qt } from "rehype-sanitize";
28
28
  import "katex/dist/katex.min.css";
29
- import { MessageScroller as q, useMessageScroller as Zt, useMessageScrollerScrollable as Qt } from "@shadcn/react/message-scroller";
30
- import { AnimatePresence as $t, motion as en } from "motion/react";
31
- import { TablePlugin as tn } from "@lexical/react/LexicalTablePlugin";
32
- import { TableCellNode as nn, TableNode as rn, TableRowNode as an } from "@lexical/table";
33
- import { $generateHtmlFromNodes as on, $generateNodesFromDOM as sn } from "@lexical/html";
34
- import { EditorRefPlugin as cn } from "@lexical/react/LexicalEditorRefPlugin";
35
- import { $getNearestBlockElementAncestorOrThrow as ln, mergeRegister as un } from "@lexical/utils";
36
- import { $forEachSelectedTextNode as dn, $getSelectionStyleValueForProperty as fn, $isAtNodeEnd as pn, $patchStyleText as mn } from "@lexical/selection";
29
+ import { MessageScroller as K, useMessageScroller as $t, useMessageScrollerScrollable as en } from "@shadcn/react/message-scroller";
30
+ import { AnimatePresence as tn, motion as nn } from "motion/react";
31
+ import { TablePlugin as rn } from "@lexical/react/LexicalTablePlugin";
32
+ import { TableCellNode as an, TableNode as on, TableRowNode as sn } from "@lexical/table";
33
+ import { $generateHtmlFromNodes as cn, $generateNodesFromDOM as ln } from "@lexical/html";
34
+ import { EditorRefPlugin as un } from "@lexical/react/LexicalEditorRefPlugin";
35
+ import { $getNearestBlockElementAncestorOrThrow as dn, mergeRegister as fn } from "@lexical/utils";
36
+ import { $forEachSelectedTextNode as pn, $getSelectionStyleValueForProperty as mn, $isAtNodeEnd as hn, $patchStyleText as gn } from "@lexical/selection";
37
37
  import "@lexical/react/LexicalDecoratorBlockNode";
38
- import hn from "inline-style-parser";
39
- import gn from "remark-gfm";
40
- import _n from "remark-parse";
41
- import { unified as vn } from "unified";
42
- import { visit as yn } from "unist-util-visit";
43
- import { createParser as bn } from "eventsource-parser";
38
+ import _n from "inline-style-parser";
39
+ import vn from "remark-gfm";
40
+ import yn from "remark-parse";
41
+ import { unified as bn } from "unified";
42
+ import { visit as xn } from "unist-util-visit";
43
+ import { createParser as Sn } from "eventsource-parser";
44
44
  //#region src/layouts/chat-card-list-layout/chat-card-list-layout.tsx
45
- var xn = 3, Sn = i(null);
46
- function Cn() {
47
- let e = l(Sn);
45
+ var Cn = 3, wn = i(null);
46
+ function Tn() {
47
+ let e = l(wn);
48
48
  if (!e) throw Error("[web-chat-ui] \"useChatCardListLayoutContext\" must be used within a ChatCardListLayout. ChatCardListLayoutItems and ChatCardListLayoutShowMore both read it, so both must be rendered inside the ChatCardListLayout element, not as siblings of it.");
49
49
  return e;
50
50
  }
51
- var wn = a(function({ children: t, className: n, visibleCount: r = xn, defaultExpanded: i = !1, expanded: a, onExpandedChange: o, asChild: s = !1, ...l }, u) {
51
+ var En = a(function({ children: t, className: n, visibleCount: r = Cn, defaultExpanded: i = !1, expanded: a, onExpandedChange: o, asChild: s = !1, ...l }, u) {
52
52
  let [d, f] = h(i), [m, g] = h(0), _ = a ?? d, v = c(() => {
53
53
  a === void 0 && f(!0), o?.(!0);
54
54
  }, [a, o]), y = p(() => ({
@@ -63,9 +63,9 @@ var wn = a(function({ children: t, className: n, visibleCount: r = xn, defaultEx
63
63
  v,
64
64
  m
65
65
  ]), b = s ? e : "div";
66
- return /* @__PURE__ */ z(Sn.Provider, {
66
+ return /* @__PURE__ */ R(wn.Provider, {
67
67
  value: y,
68
- children: /* @__PURE__ */ z(b, {
68
+ children: /* @__PURE__ */ R(b, {
69
69
  ref: u,
70
70
  "data-slot": "chat-card-list-layout",
71
71
  "data-testid": "chat-card-list-layout",
@@ -76,19 +76,19 @@ var wn = a(function({ children: t, className: n, visibleCount: r = xn, defaultEx
76
76
  })
77
77
  });
78
78
  });
79
- wn.displayName = "ChatCardListLayout";
80
- function Tn({ children: e }) {
81
- let { visibleCount: t, isExpanded: r, setHiddenCount: i } = Cn(), a = n.toArray(e), o = r ? 0 : Math.max(0, a.length - t);
79
+ En.displayName = "ChatCardListLayout";
80
+ function Dn({ children: e }) {
81
+ let { visibleCount: t, isExpanded: r, setHiddenCount: i } = Tn(), a = n.toArray(e), o = r ? 0 : Math.max(0, a.length - t);
82
82
  return f(() => {
83
83
  i(o);
84
- }, [o, i]), /* @__PURE__ */ z(be, { children: r ? a : a.slice(0, t) });
84
+ }, [o, i]), /* @__PURE__ */ R(Se, { children: r ? a : a.slice(0, t) });
85
85
  }
86
- var En = a(function({ children: e, onClick: t, className: n, ...r }, i) {
87
- let { isExpanded: a, hiddenCount: o, expand: s } = Cn();
86
+ var On = a(function({ children: e, onClick: t, className: n, ...r }, i) {
87
+ let { isExpanded: a, hiddenCount: o, expand: s } = Tn();
88
88
  function c(e) {
89
89
  s(), t?.(e);
90
90
  }
91
- return a || o === 0 ? null : /* @__PURE__ */ z(g, {
91
+ return a || o === 0 ? null : /* @__PURE__ */ R(g, {
92
92
  ref: i,
93
93
  variant: "tertiary",
94
94
  size: "sm",
@@ -100,224 +100,228 @@ var En = a(function({ children: e, onClick: t, className: n, ...r }, i) {
100
100
  children: e
101
101
  });
102
102
  });
103
- En.displayName = "ChatCardListLayoutShowMore";
104
- function Dn(e) {
103
+ On.displayName = "ChatCardListLayoutShowMore";
104
+ function kn(e) {
105
105
  return e >= 1132 ? "xl" : e >= 698 ? "lg" : e >= 640 ? "md" : "sm";
106
106
  }
107
- function On(e, t) {
108
- let n = e === "unset" ? "xl" : Dn(e);
107
+ function An(e, t) {
108
+ let n = e === "unset" ? "xl" : kn(e);
109
109
  return {
110
110
  size: n,
111
- isListFloating: n === "sm" || n === "md",
112
111
  isDetailsFloating: t === "floating" || n !== "xl",
113
112
  isDetailsSheet: n === "sm"
114
113
  };
115
114
  }
116
115
  //#endregion
117
116
  //#region src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.variants.ts
118
- var kn = "responsive", An = V([
117
+ var jn = "responsive", Mn = B([
119
118
  "relative grid gap-[8px]",
120
119
  "grid-cols-[1fr] [grid-template-areas:'main']",
121
120
  "data-[size=lg]:grid-cols-[290px_1fr] data-[size=lg]:[grid-template-areas:'list_main']",
122
121
  "data-[size=xl]:grid-cols-[358px_1fr] data-[size=xl]:[grid-template-areas:'list_main']",
123
122
  "data-[details-floating=false]:has-[>[data-slot=chat-card-three-column-layout-details]]:grid-cols-[358px_1fr_358px]",
124
123
  "data-[details-floating=false]:has-[>[data-slot=chat-card-three-column-layout-details]]:[grid-template-areas:'list_main_details']"
125
- ]), jn = V([
124
+ ]), Nn = B([
126
125
  "min-w-0",
127
- "data-[floating=true]:absolute data-[floating=true]:bottom-0 data-[floating=true]:inset-x-0 data-[floating=true]:z-10",
128
- "data-[floating=false]:[grid-area:list] data-[floating=false]:min-h-0 data-[floating=false]:h-full data-[floating=false]:overflow-hidden"
129
- ]), Mn = V(["[grid-area:main] relative min-w-0 min-h-0 h-full"]), Nn = V([
126
+ "data-[size=lg]:[grid-area:list] data-[size=lg]:min-h-0 data-[size=lg]:h-full data-[size=lg]:overflow-hidden",
127
+ "data-[size=xl]:[grid-area:list] data-[size=xl]:min-h-0 data-[size=xl]:h-full data-[size=xl]:overflow-hidden"
128
+ ], {
129
+ variants: { hideOnMobile: {
130
+ true: "data-[size=sm]:hidden data-[size=md]:hidden",
131
+ false: ""
132
+ } },
133
+ defaultVariants: { hideOnMobile: !1 }
134
+ }), Pn = B(["[grid-area:main] relative min-w-0 min-h-0 h-full"]), Fn = B([
130
135
  "min-h-0 min-w-0 max-w-full",
131
136
  "data-[floating=false]:[grid-area:details] data-[floating=false]:h-full",
132
137
  "data-[floating=true]:z-20 data-[floating=true]:[grid-area:main]",
133
138
  "data-[floating=true]:data-[sheet=false]:w-[358px] data-[floating=true]:data-[sheet=false]:h-full data-[floating=true]:data-[sheet=false]:justify-self-end data-[floating=true]:data-[sheet=false]:self-stretch data-[floating=true]:data-[sheet=false]:p-[12px]",
134
139
  "data-[sheet=true]:w-full data-[sheet=true]:h-[85%] data-[sheet=true]:justify-self-start data-[sheet=true]:self-end"
135
- ]), Pn = V([
140
+ ]), In = B([
136
141
  "relative z-30 min-w-0 min-h-0 h-full p-[12px] row-1",
137
- "data-[list-floating=false]:col-[2/-1]",
138
- "data-[list-floating=true]:col-span-full"
139
- ]), Fn = V(["data-[state=open]:w-(--message-list-content-width) data-[state=open]:mx-0", "data-[state=open]:min-w-[min(1432px,calc(var(--chat-window-width,100%)-var(--spacing-message)*2))]"]), In = i(null);
140
- function Ln(e) {
141
- let t = l(In);
142
- if (!t) throw Error(`[web-chat-ui] "${e}" must be used within a ChatCardThreeColumnLayout. It reads its floating state from the layout, so render it as a child of the ChatCardThreeColumnLayout element, not as a sibling of it.`);
142
+ "col-span-full",
143
+ "data-[size=lg]:col-[2/-1] data-[size=xl]:col-[2/-1]"
144
+ ]), Ln = B(["data-[state=open]:w-(--message-list-content-width) data-[state=open]:mx-0", "data-[state=open]:min-w-[min(1432px,calc(var(--chat-window-width,100%)-var(--spacing-message)*2))]"]), Rn = i(null);
145
+ function zn(e) {
146
+ let t = l(Rn);
147
+ if (!t) throw Error(`[web-chat-ui] "${e}" must be used within a ChatCardThreeColumnLayout. It reads its placement from the layout, so render it as a child of the ChatCardThreeColumnLayout element, not as a sibling of it.`);
143
148
  return t;
144
149
  }
145
- function Rn(e, t) {
150
+ function Bn(e, t) {
146
151
  return typeof e == "function" ? e(t) : e;
147
152
  }
148
- function zn(e, t) {
153
+ function Vn(e, t) {
149
154
  return c((n) => {
150
155
  e(n), typeof t == "function" ? t(n) : t && (t.current = n);
151
156
  }, [e, t]);
152
157
  }
153
- var Bn = a(function({ children: t, className: n, detailsPlacement: r = kn, asChild: i = !1, ...a }, o) {
154
- let { ref: s, width: c } = R(), l = zn(s, o), { size: u, isListFloating: d, isDetailsFloating: f, isDetailsSheet: m } = On(c, r), h = p(() => ({
155
- isListFloating: d,
156
- isDetailsFloating: f,
157
- isDetailsSheet: m
158
+ var Hn = a(function({ children: t, className: n, detailsPlacement: r = jn, asChild: i = !1, ...a }, o) {
159
+ let { ref: s, width: c } = xe(), l = Vn(s, o), { size: u, isDetailsFloating: d, isDetailsSheet: f } = An(c, r), m = p(() => ({
160
+ size: u,
161
+ isDetailsFloating: d,
162
+ isDetailsSheet: f
158
163
  }), [
164
+ u,
159
165
  d,
160
- f,
161
- m
162
- ]), g = i ? e : "div";
163
- return /* @__PURE__ */ z(In.Provider, {
164
- value: h,
165
- children: /* @__PURE__ */ z(g, {
166
+ f
167
+ ]), h = i ? e : "div";
168
+ return /* @__PURE__ */ R(Rn.Provider, {
169
+ value: m,
170
+ children: /* @__PURE__ */ R(h, {
166
171
  ref: l,
167
172
  "data-testid": "chat-card-three-column-layout",
168
173
  "data-slot": "chat-card-three-column-layout",
169
174
  "data-details-placement": r,
170
175
  "data-size": u,
171
- "data-list-floating": d,
172
- "data-details-floating": f,
173
- className: L(An(), n),
176
+ "data-details-floating": d,
177
+ className: L(Mn(), n),
174
178
  ...a,
175
179
  children: t
176
180
  })
177
181
  });
178
182
  });
179
- Bn.displayName = "ChatCardThreeColumnLayout";
180
- var Vn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
181
- let { isListFloating: o } = Ln("ChatCardThreeColumnLayoutList");
182
- return /* @__PURE__ */ z(r ? e : "aside", {
183
- ref: a,
183
+ Hn.displayName = "ChatCardThreeColumnLayout";
184
+ var Un = a(function({ children: t, className: n, hideOnMobile: r = !1, asChild: i = !1, ...a }, o) {
185
+ let { size: s } = zn("ChatCardThreeColumnLayoutList");
186
+ return /* @__PURE__ */ R(i ? e : "aside", {
187
+ ref: o,
184
188
  "data-testid": "chat-card-three-column-layout-list",
185
189
  "data-slot": "chat-card-three-column-layout-list",
186
- "data-floating": o,
187
- className: L(jn(), n),
188
- ...i,
189
- children: Rn(t, o)
190
+ "data-size": s,
191
+ className: L(Nn({ hideOnMobile: r }), n),
192
+ ...a,
193
+ children: t
190
194
  });
191
195
  });
192
- Vn.displayName = "ChatCardThreeColumnLayoutList";
193
- var Hn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
194
- return Ln("ChatCardThreeColumnLayoutMain"), /* @__PURE__ */ z(r ? e : "main", {
196
+ Un.displayName = "ChatCardThreeColumnLayoutList";
197
+ var Wn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
198
+ return zn("ChatCardThreeColumnLayoutMain"), /* @__PURE__ */ R(r ? e : "main", {
195
199
  ref: a,
196
200
  "data-testid": "chat-card-three-column-layout-main",
197
201
  "data-slot": "chat-card-three-column-layout-main",
198
- className: L(Mn(), n),
202
+ className: L(Pn(), n),
199
203
  ...i,
200
204
  children: t
201
205
  });
202
206
  });
203
- Hn.displayName = "ChatCardThreeColumnLayoutMain";
204
- var Un = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
205
- let { isDetailsFloating: o, isDetailsSheet: s } = Ln("ChatCardThreeColumnLayoutDetails");
206
- return /* @__PURE__ */ z(r ? e : "aside", {
207
+ Wn.displayName = "ChatCardThreeColumnLayoutMain";
208
+ var Gn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
209
+ let { isDetailsFloating: o, isDetailsSheet: s } = zn("ChatCardThreeColumnLayoutDetails");
210
+ return /* @__PURE__ */ R(r ? e : "aside", {
207
211
  ref: a,
208
212
  "data-testid": "chat-card-three-column-layout-details",
209
213
  "data-slot": "chat-card-three-column-layout-details",
210
214
  "data-floating": o,
211
215
  "data-sheet": s,
212
- className: L(Nn(), n),
216
+ className: L(Fn(), n),
213
217
  ...i,
214
- children: Rn(t, o)
218
+ children: Bn(t, o)
215
219
  });
216
220
  });
217
- Un.displayName = "ChatCardThreeColumnLayoutDetails";
218
- var Wn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
219
- let { isListFloating: o } = Ln("ChatCardThreeColumnLayoutPanel");
220
- return /* @__PURE__ */ z(r ? e : "section", {
221
+ Gn.displayName = "ChatCardThreeColumnLayoutDetails";
222
+ var Kn = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
223
+ let { size: o } = zn("ChatCardThreeColumnLayoutPanel");
224
+ return /* @__PURE__ */ R(r ? e : "section", {
221
225
  ref: a,
222
226
  "data-testid": "chat-card-three-column-layout-panel",
223
227
  "data-slot": "chat-card-three-column-layout-panel",
224
- "data-list-floating": o,
225
- className: L(Pn(), n),
228
+ "data-size": o,
229
+ className: L(In(), n),
226
230
  ...i,
227
231
  children: t
228
232
  });
229
233
  });
230
- Wn.displayName = "ChatCardThreeColumnLayoutPanel";
234
+ Kn.displayName = "ChatCardThreeColumnLayoutPanel";
231
235
  //#endregion
232
236
  //#region src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.variants.ts
233
- var Gn = V(["@container/chat-card-two-column-layout"]), Kn = V([
237
+ var qn = B(["@container/chat-card-two-column-layout"]), Jn = B([
234
238
  "grid h-full gap-16",
235
239
  "grid-cols-[minmax(0,1fr)] grid-rows-[auto_1fr]",
236
240
  "@[744px]/chat-card-two-column-layout:grid-cols-[336px_minmax(0,1fr)] @[744px]/chat-card-two-column-layout:grid-rows-[minmax(0,1fr)]"
237
- ]), qn = V(["min-w-0 min-h-0", "@[744px]/chat-card-two-column-layout:h-full @[744px]/chat-card-two-column-layout:overflow-hidden"]), Jn = V(["relative min-w-0 min-h-0 h-full"]), Yn = V(["data-[state=open]:w-full data-[state=open]:mx-0", "data-[state=open]:min-w-[min(1130px,calc(var(--chat-window-width,100%)-var(--spacing-message)*2))]"]), Xn = i(!1);
238
- function Zn(e) {
239
- if (!l(Xn)) throw Error(`[web-chat-ui] "${e}" must be used within a ChatCardTwoColumnLayout. Its columns come from the layout’s container query, so render it as a child of the ChatCardTwoColumnLayout element, not as a sibling of it.`);
241
+ ]), Yn = B(["min-w-0 min-h-0", "@[744px]/chat-card-two-column-layout:h-full @[744px]/chat-card-two-column-layout:overflow-hidden"]), Xn = B(["relative min-w-0 min-h-0 h-full"]), Zn = B(["data-[state=open]:w-full data-[state=open]:mx-0", "data-[state=open]:min-w-[min(1130px,calc(var(--chat-window-width,100%)-var(--spacing-message)*2))]"]), Qn = i(!1);
242
+ function $n(e) {
243
+ if (!l(Qn)) throw Error(`[web-chat-ui] "${e}" must be used within a ChatCardTwoColumnLayout. Its columns come from the layout’s container query, so render it as a child of the ChatCardTwoColumnLayout element, not as a sibling of it.`);
240
244
  }
241
- var Qn = a(function({ children: t, className: n, gridClassName: r, asChild: i = !1, ...a }, o) {
245
+ var er = a(function({ children: t, className: n, gridClassName: r, asChild: i = !1, ...a }, o) {
242
246
  let s = i ? e : "div";
243
- return /* @__PURE__ */ z(Xn.Provider, {
247
+ return /* @__PURE__ */ R(Qn.Provider, {
244
248
  value: !0,
245
- children: /* @__PURE__ */ z(s, {
249
+ children: /* @__PURE__ */ R(s, {
246
250
  ref: o,
247
251
  "data-testid": "chat-card-two-column-layout",
248
252
  "data-slot": "chat-card-two-column-layout",
249
- className: L(Gn(), n),
253
+ className: L(qn(), n),
250
254
  ...a,
251
- children: /* @__PURE__ */ z("div", {
255
+ children: /* @__PURE__ */ R("div", {
252
256
  "data-testid": "chat-card-two-column-layout-grid",
253
257
  "data-slot": "chat-card-two-column-layout-grid",
254
- className: L(Kn(), r),
258
+ className: L(Jn(), r),
255
259
  children: t
256
260
  })
257
261
  })
258
262
  });
259
263
  });
260
- Qn.displayName = "ChatCardTwoColumnLayout";
261
- var $n = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
262
- return Zn("ChatCardTwoColumnLayoutAside"), /* @__PURE__ */ z(r ? e : "aside", {
264
+ er.displayName = "ChatCardTwoColumnLayout";
265
+ var tr = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
266
+ return $n("ChatCardTwoColumnLayoutAside"), /* @__PURE__ */ R(r ? e : "aside", {
263
267
  ref: a,
264
268
  "data-testid": "chat-card-two-column-layout-aside",
265
269
  "data-slot": "chat-card-two-column-layout-aside",
266
- className: L(qn(), n),
270
+ className: L(Yn(), n),
267
271
  ...i,
268
272
  children: t
269
273
  });
270
274
  });
271
- $n.displayName = "ChatCardTwoColumnLayoutAside";
272
- var er = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
273
- return Zn("ChatCardTwoColumnLayoutMain"), /* @__PURE__ */ z(r ? e : "main", {
275
+ tr.displayName = "ChatCardTwoColumnLayoutAside";
276
+ var nr = a(function({ children: t, className: n, asChild: r = !1, ...i }, a) {
277
+ return $n("ChatCardTwoColumnLayoutMain"), /* @__PURE__ */ R(r ? e : "main", {
274
278
  ref: a,
275
279
  "data-testid": "chat-card-two-column-layout-main",
276
280
  "data-slot": "chat-card-two-column-layout-main",
277
- className: L(Jn(), n),
281
+ className: L(Xn(), n),
278
282
  ...i,
279
283
  children: t
280
284
  });
281
285
  });
282
- er.displayName = "ChatCardTwoColumnLayoutMain";
286
+ nr.displayName = "ChatCardTwoColumnLayoutMain";
283
287
  //#endregion
284
288
  //#region src/components/chat-card/context.tsx
285
- var tr = i(null);
286
- function J() {
287
- let e = l(tr);
289
+ var rr = i(null);
290
+ function q() {
291
+ let e = l(rr);
288
292
  if (!e) throw Error("[web-chat-ui] useChatCardContext() called outside ChatCard. Wrap this component in <ChatCard>, or the provider and the caller resolved two copies of the package.");
289
293
  return e;
290
294
  }
291
- function nr({ value: e, children: t }) {
292
- return /* @__PURE__ */ z(tr.Provider, {
295
+ function ir({ value: e, children: t }) {
296
+ return /* @__PURE__ */ R(rr.Provider, {
293
297
  value: e,
294
298
  children: t
295
299
  });
296
300
  }
297
301
  //#endregion
298
302
  //#region src/components/chat-card/components/chat-card-header.tsx
299
- function rr({ className: e, children: t, hoverAreaClassName: n, ...r }) {
300
- let { isCollapsible: i, level: a } = J(), o = /* @__PURE__ */ z("div", {
303
+ function ar({ className: e, children: t, hoverAreaClassName: n, ...r }) {
304
+ let { isCollapsible: i, level: a } = q(), o = /* @__PURE__ */ R("div", {
301
305
  "data-slot": "chat-card-header-hover-area",
302
306
  className: L("w-full", "flex flex-row items-start", "gap-card-header-gap", a === 1 && "px-card-header-hover-area rounded-card-header", a === 1 && i && "hover:bg-layout-accent-low-background-hover-base", a === 1 && "group-hover/chat-card:bg-layout-accent-low-background-hover-base", !i && "cursor-default", n),
303
307
  children: t
304
308
  });
305
- return /* @__PURE__ */ z("header", {
309
+ return /* @__PURE__ */ R("header", {
306
310
  "data-slot": "chat-card-header",
307
311
  "data-level": a,
308
312
  "data-collapsible": i,
309
313
  className: L("flex items-start", a === 1 ? "p-card-header-lvl-1" : "px-card-header-lvl-2", e),
310
314
  ...r,
311
- children: i ? /* @__PURE__ */ z(b, {
315
+ children: i ? /* @__PURE__ */ R(x, {
312
316
  className: "w-full",
313
317
  asChild: !0,
314
318
  children: o
315
319
  }) : o
316
320
  });
317
321
  }
318
- function ir({ className: e, children: t, ...n }) {
319
- let { level: r } = J();
320
- return /* @__PURE__ */ z("div", {
322
+ function or({ className: e, children: t, ...n }) {
323
+ let { level: r } = q();
324
+ return /* @__PURE__ */ R("div", {
321
325
  "data-slot": "chat-card-icon",
322
326
  "data-testid": "chat-card-icon",
323
327
  "data-level": r,
@@ -326,9 +330,9 @@ function ir({ className: e, children: t, ...n }) {
326
330
  children: t
327
331
  });
328
332
  }
329
- function ar({ className: e, children: t, ...n }) {
330
- let { level: r } = J();
331
- return /* @__PURE__ */ z("div", {
333
+ function sr({ className: e, children: t, ...n }) {
334
+ let { level: r } = q();
335
+ return /* @__PURE__ */ R("div", {
332
336
  "data-slot": "chat-card-header-content",
333
337
  "data-testid": "chat-card-header-content",
334
338
  "data-level": r,
@@ -337,8 +341,8 @@ function ar({ className: e, children: t, ...n }) {
337
341
  children: t
338
342
  });
339
343
  }
340
- function or({ className: e, children: t, ...n }) {
341
- return /* @__PURE__ */ z(I, {
344
+ function cr({ className: e, children: t, ...n }) {
345
+ return /* @__PURE__ */ R(I, {
342
346
  "data-testid": "chat-card-title",
343
347
  variant: "body-medium",
344
348
  className: L(e),
@@ -346,8 +350,8 @@ function or({ className: e, children: t, ...n }) {
346
350
  children: t
347
351
  });
348
352
  }
349
- function sr({ className: e, children: t, ...n }) {
350
- return /* @__PURE__ */ z(I, {
353
+ function lr({ className: e, children: t, ...n }) {
354
+ return /* @__PURE__ */ R(I, {
351
355
  "data-testid": "chat-card-sub-title",
352
356
  variant: "body-small-high",
353
357
  className: L("text-text-secondary", e),
@@ -355,9 +359,9 @@ function sr({ className: e, children: t, ...n }) {
355
359
  children: t
356
360
  });
357
361
  }
358
- function cr({ className: e, children: t, ...n }) {
359
- let { level: r } = J();
360
- return /* @__PURE__ */ z("div", {
362
+ function ur({ className: e, children: t, ...n }) {
363
+ let { level: r } = q();
364
+ return /* @__PURE__ */ R("div", {
361
365
  role: "group",
362
366
  "data-slot": "chat-card-actions",
363
367
  "data-testid": "chat-card-actions",
@@ -367,11 +371,11 @@ function cr({ className: e, children: t, ...n }) {
367
371
  children: t
368
372
  });
369
373
  }
370
- function lr({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip: r, onClick: i, ...a }) {
374
+ function dr({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip: r, onClick: i, ...a }) {
371
375
  function o(e) {
372
376
  n && e.stopPropagation(), i?.(e);
373
377
  }
374
- let s = /* @__PURE__ */ z(D, {
378
+ let s = /* @__PURE__ */ R(D, {
375
379
  "data-slot": "chat-card-action-button",
376
380
  variant: "tertiary",
377
381
  size: "sm",
@@ -380,26 +384,26 @@ function lr({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip:
380
384
  ...a,
381
385
  children: t
382
386
  });
383
- return r ? /* @__PURE__ */ z(ge, {
387
+ return r ? /* @__PURE__ */ R(_e, {
384
388
  tooltip: r,
385
389
  children: s
386
390
  }) : s;
387
391
  }
388
- function ur({ className: e, ...t }) {
389
- let { isCollapsible: n } = J();
390
- if (n) return /* @__PURE__ */ z(lr, {
392
+ function fr({ className: e, ...t }) {
393
+ let { isCollapsible: n } = q();
394
+ if (n) return /* @__PURE__ */ R(dr, {
391
395
  "data-slot": "chat-card-collapsible-button",
392
396
  shouldPreventCollapse: !1,
393
397
  isSemantic: !1,
394
- className: L("transition-transform duration-300", "group-data-[state=open]/collapsible:rotate-180", e),
398
+ className: e,
395
399
  ...t,
396
- children: /* @__PURE__ */ z(Se, {})
400
+ children: /* @__PURE__ */ R(y, {})
397
401
  });
398
402
  }
399
403
  //#endregion
400
404
  //#region src/components/chat-card/components/chat-card-body.tsx
401
- function dr({ className: e, children: t, ...n }) {
402
- return /* @__PURE__ */ z("figure", {
405
+ function pr({ className: e, children: t, ...n }) {
406
+ return /* @__PURE__ */ R("figure", {
403
407
  "data-slot": "chat-card-media",
404
408
  "data-testid": "chat-card-media",
405
409
  className: L("min-h-0 shrink-0 h-[222px]", e),
@@ -407,20 +411,20 @@ function dr({ className: e, children: t, ...n }) {
407
411
  children: t
408
412
  });
409
413
  }
410
- function fr({ className: t, children: n, asChild: r = !1, ...i }) {
414
+ function mr({ className: t, children: n, asChild: r = !1, ...i }) {
411
415
  let a = r ? e : "div";
412
- return /* @__PURE__ */ z(y, {
416
+ return /* @__PURE__ */ R(b, {
413
417
  "data-slot": "chat-card-body",
414
418
  "data-testid": "chat-card-body",
415
419
  className: L("flex flex-1 flex-col", "min-h-0", "md:group-data-[collapsible=true]/chat-card:max-h-[90vh]", "overflow-hidden", t),
416
420
  asChild: !0,
417
421
  ...i,
418
- children: /* @__PURE__ */ z(a, { children: n })
422
+ children: /* @__PURE__ */ R(a, { children: n })
419
423
  });
420
424
  }
421
- function pr({ className: t, children: n, asChild: r = !1, hasPadding: i = !0, hasHeaderPadding: a = !0, ...o }) {
422
- let { level: s } = J();
423
- return /* @__PURE__ */ z(r ? e : "div", {
425
+ function hr({ className: t, children: n, asChild: r = !1, hasPadding: i = !0, hasHeaderPadding: a = !0, ...o }) {
426
+ let { level: s } = q();
427
+ return /* @__PURE__ */ R(r ? e : "div", {
424
428
  "data-slot": "chat-card-content",
425
429
  "data-testid": "chat-card-content",
426
430
  "data-padding": i,
@@ -431,9 +435,9 @@ function pr({ className: t, children: n, asChild: r = !1, hasPadding: i = !0, ha
431
435
  children: n
432
436
  });
433
437
  }
434
- function mr({ className: e, children: t, ...n }) {
435
- let { level: r } = J();
436
- return /* @__PURE__ */ z("div", {
438
+ function gr({ className: e, children: t, ...n }) {
439
+ let { level: r } = q();
440
+ return /* @__PURE__ */ R("div", {
437
441
  "data-slot": "chat-card-preview",
438
442
  "data-testid": "chat-card-preview",
439
443
  "data-level": r,
@@ -444,9 +448,9 @@ function mr({ className: e, children: t, ...n }) {
444
448
  }
445
449
  //#endregion
446
450
  //#region src/components/chat-card/components/chat-card-footer.tsx
447
- function hr({ className: e, children: t, ...n }) {
448
- let { level: r } = J();
449
- return /* @__PURE__ */ z("footer", {
451
+ function _r({ className: e, children: t, ...n }) {
452
+ let { level: r } = q();
453
+ return /* @__PURE__ */ R("footer", {
450
454
  "data-slot": "chat-card-footer",
451
455
  "data-level": r,
452
456
  className: L("mt-auto", "flex flex-row items-center justify-end", "gap-card-footer-gap", "w-full", "data-[level=1]:p-card-footer-lvl-1", "data-[level=2]:p-card-footer-lvl-2", e),
@@ -454,24 +458,24 @@ function hr({ className: e, children: t, ...n }) {
454
458
  children: t
455
459
  });
456
460
  }
457
- function gr({ className: e, children: t }) {
458
- return /* @__PURE__ */ z("div", {
461
+ function vr({ className: e, children: t }) {
462
+ return /* @__PURE__ */ R("div", {
459
463
  "data-slot": "chat-card-footer-notes",
460
464
  "data-testid": "chat-card-footer-notes",
461
465
  className: L("mr-auto shrink-0", "flex flex-col items-start justify-center", "gap-card-footer-gap-left-notes", e),
462
466
  children: t
463
467
  });
464
468
  }
465
- function _r({ className: e, children: t }) {
466
- return /* @__PURE__ */ z("div", {
469
+ function yr({ className: e, children: t }) {
470
+ return /* @__PURE__ */ R("div", {
467
471
  "data-slot": "chat-card-footer-price",
468
472
  "data-testid": "chat-card-footer-price",
469
473
  className: L("flex flex-col items-end justify-center", "gap-card-footer-gap-prices", "shrink-0", e),
470
474
  children: t
471
475
  });
472
476
  }
473
- function vr({ className: e, children: t, ...n }) {
474
- return /* @__PURE__ */ z("div", {
477
+ function br({ className: e, children: t, ...n }) {
478
+ return /* @__PURE__ */ R("div", {
475
479
  role: "group",
476
480
  "data-slot": "chat-card-footer-actions",
477
481
  "data-testid": "chat-card-footer-actions",
@@ -482,8 +486,8 @@ function vr({ className: e, children: t, ...n }) {
482
486
  }
483
487
  //#endregion
484
488
  //#region src/components/chat-card/components/chat-card-form.tsx
485
- var yr = a(function({ className: t, children: n, asChild: r, ...i }, a) {
486
- return /* @__PURE__ */ z(r ? e : "form", {
489
+ var xr = a(function({ className: t, children: n, asChild: r, ...i }, a) {
490
+ return /* @__PURE__ */ R(r ? e : "form", {
487
491
  ref: a,
488
492
  "data-slot": "chat-card-form",
489
493
  "data-testid": "chat-card-form",
@@ -492,17 +496,17 @@ var yr = a(function({ className: t, children: n, asChild: r, ...i }, a) {
492
496
  children: n
493
497
  });
494
498
  });
495
- yr.displayName = "ChatCardForm";
496
- function br({ className: e, children: t }) {
497
- return /* @__PURE__ */ z("ul", {
499
+ xr.displayName = "ChatCardForm";
500
+ function Sr({ className: e, children: t }) {
501
+ return /* @__PURE__ */ R("ul", {
498
502
  "data-slot": "chat-card-attributes",
499
503
  "data-testid": "chat-card-attributes",
500
504
  className: L("flex flex-col justify-start items-start gap-8", "mb-24", e),
501
505
  children: t
502
506
  });
503
507
  }
504
- function xr({ className: e, children: t, ...n }) {
505
- return /* @__PURE__ */ z("li", {
508
+ function Cr({ className: e, children: t, ...n }) {
509
+ return /* @__PURE__ */ R("li", {
506
510
  "data-slot": "chat-card-attribute",
507
511
  "data-testid": "chat-card-attribute-item",
508
512
  className: L("grid grid-cols-[66px_1fr] gap-8", "w-full", "min-h-24", e),
@@ -510,8 +514,8 @@ function xr({ className: e, children: t, ...n }) {
510
514
  children: t
511
515
  });
512
516
  }
513
- function Sr({ className: e, children: t, hasPadding: n = !1, ...r }) {
514
- return /* @__PURE__ */ z(_, {
517
+ function wr({ className: e, children: t, hasPadding: n = !1, ...r }) {
518
+ return /* @__PURE__ */ R(_, {
515
519
  variant: "outlined",
516
520
  size: "md",
517
521
  color: "info",
@@ -523,8 +527,8 @@ function Sr({ className: e, children: t, hasPadding: n = !1, ...r }) {
523
527
  children: t
524
528
  });
525
529
  }
526
- function Cr({ className: t, children: n, asChild: r = !1, ...i }) {
527
- return /* @__PURE__ */ z(r ? e : I, {
530
+ function Tr({ className: t, children: n, asChild: r = !1, ...i }) {
531
+ return /* @__PURE__ */ R(r ? e : I, {
528
532
  "data-testid": "chat-card-attribute-value",
529
533
  variant: "body-sm",
530
534
  className: L("flex-1 text-text-secondary", t),
@@ -534,7 +538,7 @@ function Cr({ className: t, children: n, asChild: r = !1, ...i }) {
534
538
  }
535
539
  //#endregion
536
540
  //#region src/components/chat-card/chat-card.tsx
537
- var wr = a(function({ className: e, variant: t = "default", level: n = 1, children: r, fullWidth: i = !1, defaultOpen: a = !0, open: o, isRounded: s = !0, isCollapsible: l = !0, isSelected: u = !1, onOpenChange: d, onClick: f, ...m }, g) {
541
+ var Er = a(function({ className: e, variant: t = "default", level: n = 1, children: r, fullWidth: i = !1, defaultOpen: a = !0, open: o, isRounded: s = !0, isCollapsible: l = !0, isSelected: u = !1, onOpenChange: d, onClick: f, ...m }, g) {
538
542
  let _ = o !== void 0, [y, b] = h(a), x = _ ? o : y, S = c((e) => {
539
543
  _ || b(e), d?.(e);
540
544
  }, [_, d]), C = p(() => ({
@@ -549,14 +553,14 @@ var wr = a(function({ className: e, variant: t = "default", level: n = 1, childr
549
553
  function w(e) {
550
554
  f?.(e), !e.defaultPrevented && l && !x && S(!0);
551
555
  }
552
- return /* @__PURE__ */ z(nr, {
556
+ return /* @__PURE__ */ R(ir, {
553
557
  value: C,
554
- children: /* @__PURE__ */ z(v, {
558
+ children: /* @__PURE__ */ R(v, {
555
559
  isDisabled: !l,
556
560
  open: x,
557
561
  onOpenChange: S,
558
562
  asChild: !0,
559
- children: /* @__PURE__ */ z("section", {
563
+ children: /* @__PURE__ */ R("section", {
560
564
  ref: g,
561
565
  role: "region",
562
566
  "data-slot": "chat-card",
@@ -576,10 +580,10 @@ var wr = a(function({ className: e, variant: t = "default", level: n = 1, childr
576
580
  })
577
581
  });
578
582
  });
579
- wr.displayName = "ChatCard";
583
+ Er.displayName = "ChatCard";
580
584
  //#endregion
581
585
  //#region src/components/chat-card/hooks.ts
582
- function Tr({ isEditable: e, defaultEditing: t = !1 }) {
586
+ function Dr({ isEditable: e, defaultEditing: t = !1 }) {
583
587
  let [n, r] = h(t);
584
588
  function i() {
585
589
  return e ? !0 : (console.warn("Chat card is not editable"), !1);
@@ -603,26 +607,26 @@ function Tr({ isEditable: e, defaultEditing: t = !1 }) {
603
607
  }
604
608
  //#endregion
605
609
  //#region src/components/chat-card/contexts.tsx
606
- var Er = i(null);
607
- function Dr() {
608
- let e = l(Er);
610
+ var Or = i(null);
611
+ function kr() {
612
+ let e = l(Or);
609
613
  if (!e) throw Error("\"useEditableChatCardContext\" must be used within a EditableChatCardContextProvider");
610
614
  return e;
611
615
  }
612
- function Or({ children: e, defaultEditing: t = !1, isEditable: n = !1 }) {
613
- let r = Tr({
616
+ function Ar({ children: e, defaultEditing: t = !1, isEditable: n = !1 }) {
617
+ let r = Dr({
614
618
  isEditable: n,
615
619
  defaultEditing: t
616
620
  });
617
- return /* @__PURE__ */ z(Er.Provider, {
621
+ return /* @__PURE__ */ R(Or.Provider, {
618
622
  value: r,
619
623
  children: e
620
624
  });
621
625
  }
622
626
  //#endregion
623
627
  //#region src/components/chat-card-container/chat-card-container.tsx
624
- function kr({ children: e, variant: t = "fixed", inline: n = !1, className: r, ...i }) {
625
- return /* @__PURE__ */ z("div", {
628
+ function jr({ children: e, variant: t = "fixed", inline: n = !1, className: r, ...i }) {
629
+ return /* @__PURE__ */ R("div", {
626
630
  "data-slot": "chat-card-container",
627
631
  "data-testid": "chat-card-container",
628
632
  "data-variant": t,
@@ -634,21 +638,21 @@ function kr({ children: e, variant: t = "fixed", inline: n = !1, className: r, .
634
638
  }
635
639
  //#endregion
636
640
  //#region src/components/chat-container/chat-container.tsx
637
- var Ar = "var(--spacing-chat-area)", jr = {
641
+ var Mr = "var(--spacing-chat-area)", Nr = {
638
642
  prompt: "--type-window-height",
639
643
  welcome: "--welcome-screen-box-height"
640
644
  };
641
- function Mr(e) {
645
+ function Pr(e) {
642
646
  return e === "unset" ? "unset" : `${e}px`;
643
647
  }
644
- var Nr = i(null);
645
- function Pr() {
646
- let e = l(Nr);
648
+ var Fr = i(null);
649
+ function Ir() {
650
+ let e = l(Fr);
647
651
  if (!e) throw Error("[web-chat-ui] ChatContainer slot rendered outside a ChatContainer. ChatContainerPrompt and ChatContainerWelcome report their measured height up to the container, so one must be mounted above them. If it is mounted, check the slot is not rendered through a portal that escapes the provider.");
648
652
  return e;
649
653
  }
650
- function Fr({ asChild: t = !1, children: n, className: r, contentWidth: i = Ar, style: a, ...o }) {
651
- let s = t ? e : "section", { ref: l, width: u, height: d } = R(), [f, m] = h({
654
+ function Lr({ asChild: t = !1, children: n, className: r, contentWidth: i = Mr, style: a, ...o }) {
655
+ let s = t ? e : "section", { ref: l, width: u, height: d } = xe(), [f, m] = h({
652
656
  prompt: "unset",
653
657
  welcome: "unset"
654
658
  }), g = c((e, t) => {
@@ -660,8 +664,8 @@ function Fr({ asChild: t = !1, children: n, className: r, contentWidth: i = Ar,
660
664
  "--chat-window-width": u === "unset" ? "100%" : `${u}px`,
661
665
  "--chat-window-height": d === "unset" ? "100%" : `${d}px`,
662
666
  "--message-list-content-width": `min(${i}, var(--chat-window-width))`,
663
- [jr.prompt]: Mr(f.prompt),
664
- [jr.welcome]: Mr(f.welcome),
667
+ [Nr.prompt]: Pr(f.prompt),
668
+ [Nr.welcome]: Pr(f.welcome),
665
669
  ...a
666
670
  }), [
667
671
  u,
@@ -670,9 +674,9 @@ function Fr({ asChild: t = !1, children: n, className: r, contentWidth: i = Ar,
670
674
  f,
671
675
  a
672
676
  ]);
673
- return /* @__PURE__ */ z(Nr.Provider, {
677
+ return /* @__PURE__ */ R(Fr.Provider, {
674
678
  value: _,
675
- children: /* @__PURE__ */ z(s, {
679
+ children: /* @__PURE__ */ R(s, {
676
680
  ref: l,
677
681
  "data-slot": "chat-container",
678
682
  "data-testid": "chat-container",
@@ -683,17 +687,17 @@ function Fr({ asChild: t = !1, children: n, className: r, contentWidth: i = Ar,
683
687
  })
684
688
  });
685
689
  }
686
- function Ir(e) {
687
- let { setSlotHeight: t } = Pr(), { ref: n, height: r } = R();
690
+ function Rr(e) {
691
+ let { setSlotHeight: t } = Ir(), { ref: n, height: r } = xe();
688
692
  return f(() => (t(e, r), () => t(e, "unset")), [
689
693
  e,
690
694
  r,
691
695
  t
692
696
  ]), n;
693
697
  }
694
- function Lr({ asChild: t = !1, children: n, className: r, ...i }) {
695
- let a = Ir("prompt");
696
- return /* @__PURE__ */ z(t ? e : "div", {
698
+ function zr({ asChild: t = !1, children: n, className: r, ...i }) {
699
+ let a = Rr("prompt");
700
+ return /* @__PURE__ */ R(t ? e : "div", {
697
701
  ref: a,
698
702
  "data-slot": "chat-container-prompt",
699
703
  "data-testid": "chat-container-prompt",
@@ -702,9 +706,9 @@ function Lr({ asChild: t = !1, children: n, className: r, ...i }) {
702
706
  children: n
703
707
  });
704
708
  }
705
- function Rr({ asChild: t = !1, children: n, className: r, ...i }) {
706
- let a = Ir("welcome");
707
- return /* @__PURE__ */ z(t ? e : "div", {
709
+ function Br({ asChild: t = !1, children: n, className: r, ...i }) {
710
+ let a = Rr("welcome");
711
+ return /* @__PURE__ */ R(t ? e : "div", {
708
712
  ref: a,
709
713
  "data-slot": "chat-container-welcome",
710
714
  "data-testid": "chat-container-welcome",
@@ -715,8 +719,8 @@ function Rr({ asChild: t = !1, children: n, className: r, ...i }) {
715
719
  }
716
720
  //#endregion
717
721
  //#region src/components/chat-input/plugins/auto-focus-plugin.tsx
718
- function zr({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
719
- let [r] = ut();
722
+ function Vr({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
723
+ let [r] = ze();
720
724
  return u(() => {
721
725
  t && !n && r.focus(() => {
722
726
  let e = document.activeElement, t = r.getRootElement();
@@ -731,36 +735,36 @@ function zr({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
731
735
  }
732
736
  //#endregion
733
737
  //#region src/components/chat-input/transformers.ts
734
- var Br = pt, Vr = pt;
738
+ var Hr = He, Ur = He;
735
739
  //#endregion
736
740
  //#region src/components/chat-input/plugins/hooks.ts
737
- function Hr() {
738
- let [e] = ut();
741
+ function J() {
742
+ let [e] = ze();
739
743
  return e;
740
744
  }
741
745
  //#endregion
742
746
  //#region src/components/chat-input/plugins/utils.ts
743
- function Ur() {
744
- return U().getTextContent();
745
- }
746
747
  function Wr() {
747
- let e = U().getLastDescendant();
748
- if (e && K(e)) {
749
- let t = gt(), n = e.getTextContentSize();
750
- t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Ct(t);
748
+ return H().getTextContent();
749
+ }
750
+ function Gr() {
751
+ let e = H().getLastDescendant();
752
+ if (e && G(e)) {
753
+ let t = Ge(), n = e.getTextContentSize();
754
+ t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Qe(t);
751
755
  } else {
752
- St();
753
- let e = W();
754
- if (G(e)) {
755
- let t = e.focus.getNode(), n = K(t) ? t.getTextContentSize() : 0;
756
- e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Ct(e);
756
+ Ze();
757
+ let e = U();
758
+ if (W(e)) {
759
+ let t = e.focus.getNode(), n = G(t) ? t.getTextContentSize() : 0;
760
+ e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Qe(e);
757
761
  }
758
762
  }
759
763
  }
760
764
  //#endregion
761
765
  //#region src/components/chat-input/plugins/controlled-value-plugin.tsx
762
- function Gr({ value: e, emittedValuesRef: t }) {
763
- let n = Hr(), r = m();
766
+ function Kr({ value: e, emittedValuesRef: t }) {
767
+ let n = J(), r = m();
764
768
  return u(() => {
765
769
  if (!n || e === r.current) return;
766
770
  if (r.current = e, t && e !== void 0) {
@@ -769,9 +773,9 @@ function Gr({ value: e, emittedValuesRef: t }) {
769
773
  }
770
774
  let i = "";
771
775
  n.getEditorState().read(() => {
772
- i = ft(Br);
776
+ i = Ve(Hr);
773
777
  }), e !== void 0 && e !== i && n.update(() => {
774
- H(Pt), dt(e ?? "", Vr), Wr();
778
+ V(lt), Be(e ?? "", Ur), Gr();
775
779
  }, { discrete: !0 });
776
780
  }, [
777
781
  n,
@@ -781,8 +785,8 @@ function Gr({ value: e, emittedValuesRef: t }) {
781
785
  }
782
786
  //#endregion
783
787
  //#region src/components/chat-input/plugins/disabled-plugin.tsx
784
- function Kr({ isDisabled: e, isReadOnly: t }) {
785
- let n = Hr();
788
+ function qr({ isDisabled: e, isReadOnly: t }) {
789
+ let n = J();
786
790
  return u(() => {
787
791
  n.setEditable(!e && !t);
788
792
  }, [
@@ -793,8 +797,8 @@ function Kr({ isDisabled: e, isReadOnly: t }) {
793
797
  }
794
798
  //#endregion
795
799
  //#region src/components/chat-input/plugins/focus-plugin.tsx
796
- function qr({ onFocusChange: e }) {
797
- let t = Hr();
800
+ function Jr({ onFocusChange: e }) {
801
+ let t = J();
798
802
  return u(() => {
799
803
  if (!e) return;
800
804
  let n = t.getRootElement();
@@ -812,80 +816,80 @@ function qr({ onFocusChange: e }) {
812
816
  }
813
817
  //#endregion
814
818
  //#region src/components/chat-input/plugins/has-value-plugin.tsx
815
- function Jr(e) {
819
+ function Yr(e) {
816
820
  let t = !1;
817
821
  return e.getEditorState().read(() => {
818
- t = Ur().length > 0;
822
+ t = Wr().length > 0;
819
823
  }), t;
820
824
  }
821
- function Yr(e, t, n) {
822
- let r = Jr(e);
825
+ function Xr(e, t, n) {
826
+ let r = Yr(e);
823
827
  n.current !== r && (n.current = r, t?.(r));
824
828
  }
825
- function Xr({ onHasValueChange: e }) {
826
- let t = Hr(), n = m();
829
+ function Zr({ onHasValueChange: e }) {
830
+ let t = J(), n = m();
827
831
  return u(() => {
828
- if (t) return Yr(t, e, n), t.registerUpdateListener(() => {
829
- Yr(t, e, n);
832
+ if (t) return Xr(t, e, n), t.registerUpdateListener(() => {
833
+ Xr(t, e, n);
830
834
  });
831
835
  }, [t, e]), null;
832
836
  }
833
837
  //#endregion
834
838
  //#region src/components/chat-input/plugins/markdown-plain-paste-plugin.tsx
835
- function Zr() {
836
- let e = Hr();
837
- return u(() => e.registerCommand(Mt, (t) => {
839
+ function Qr() {
840
+ let e = J();
841
+ return u(() => e.registerCommand(st, (t) => {
838
842
  let { clipboardData: n } = t;
839
843
  if (!n) return !1;
840
844
  let r = n.getData("text/plain");
841
845
  return r ? (t.preventDefault(), e.update(() => {
842
- let e = W();
843
- if (G(e)) {
846
+ let e = U();
847
+ if (W(e)) {
844
848
  e.insertText(r);
845
849
  return;
846
850
  }
847
- let t = U();
851
+ let t = H();
848
852
  t.clear(), r.split(/\r?\n/).forEach((e) => {
849
- let n = ht();
850
- e.length > 0 && n.append(_t(e)), t.append(n);
853
+ let n = We();
854
+ e.length > 0 && n.append(Ke(e)), t.append(n);
851
855
  });
852
856
  }), !0) : !1;
853
- }, Tt), [e]), null;
857
+ }, et), [e]), null;
854
858
  }
855
859
  //#endregion
856
860
  //#region src/components/chat-input/plugins/value-plugin.tsx
857
- var Qr = 50;
858
- function $r({ onChange: e, emittedValuesRef: t }) {
861
+ var $r = 50;
862
+ function ei({ onChange: e, emittedValuesRef: t }) {
859
863
  let n = c((n, r, i) => {
860
864
  if (!i.has("focus") && e) try {
861
865
  n.read(() => {
862
- let n = ft(Br);
863
- t && (t.current.push(n), t.current.splice(0, t.current.length - Qr)), e(n);
866
+ let n = Ve(Hr);
867
+ t && (t.current.push(n), t.current.splice(0, t.current.length - $r)), e(n);
864
868
  });
865
869
  } catch (e) {
866
870
  console.error("ValuePlugin error:", e);
867
871
  }
868
872
  }, [e, t]);
869
- return /* @__PURE__ */ z(Bt, { onChange: n });
873
+ return /* @__PURE__ */ R(ht, { onChange: n });
870
874
  }
871
875
  //#endregion
872
876
  //#region src/components/chat-input/chat-input.tsx
873
- var ei = i(null);
874
- function ti() {
875
- let e = l(ei);
877
+ var ti = i(null);
878
+ function ni() {
879
+ let e = l(ti);
876
880
  if (!e) throw Error("\"useChatInputContext\" must be used within a ChatInputContextProvider");
877
881
  return e;
878
882
  }
879
- var ni = {
883
+ var ri = {
880
884
  namespace: "chat-input",
881
885
  editable: !0,
882
886
  nodes: [
883
- ct,
884
- lt,
885
- tt,
886
- et,
887
- Je,
888
- Xe
887
+ Le,
888
+ Re,
889
+ Ae,
890
+ ke,
891
+ Ce,
892
+ Te
889
893
  ],
890
894
  theme: {
891
895
  paragraph: "m-0 min-h-[26px]",
@@ -898,7 +902,7 @@ var ni = {
898
902
  onError: (e) => {
899
903
  console.error("ChatInput Lexical error:", e);
900
904
  }
901
- }, ri = a(function({ className: e, children: t, initialConfig: n = ni, ...r }, i) {
905
+ }, ii = a(function({ className: e, children: t, initialConfig: n = ri, ...r }, i) {
902
906
  let [a, o] = h(!1), [s, c] = h(!1), [l, u] = h(!1), d = p(() => ({
903
907
  hasError: a,
904
908
  hasValue: s,
@@ -911,11 +915,11 @@ var ni = {
911
915
  s,
912
916
  l
913
917
  ]);
914
- return /* @__PURE__ */ z(ei.Provider, {
918
+ return /* @__PURE__ */ R(ti.Provider, {
915
919
  value: d,
916
- children: /* @__PURE__ */ z(nt, {
920
+ children: /* @__PURE__ */ R(je, {
917
921
  initialConfig: n,
918
- children: /* @__PURE__ */ z("div", {
922
+ children: /* @__PURE__ */ R("div", {
919
923
  ref: i,
920
924
  "data-slot": "chat-input",
921
925
  "data-testid": "chat-input",
@@ -930,24 +934,24 @@ var ni = {
930
934
  })
931
935
  });
932
936
  });
933
- ri.displayName = "ChatInput";
934
- var ii = a(function({ className: e, children: t, ...n }, r) {
935
- return /* @__PURE__ */ z(I, {
937
+ ii.displayName = "ChatInput";
938
+ var ai = a(function({ className: e, children: t, ...n }, r) {
939
+ return /* @__PURE__ */ R(I, {
936
940
  ref: r,
937
941
  variant: "body",
938
942
  className: L("pointer-events-none absolute inset-0 z-0", "min-h-[26px]", "text-text-tertiary", e),
939
943
  asChild: !0,
940
944
  ...n,
941
- children: /* @__PURE__ */ z("p", {
945
+ children: /* @__PURE__ */ R("p", {
942
946
  "data-slot": "chat-input-placeholder",
943
947
  children: t
944
948
  })
945
949
  });
946
950
  });
947
- ii.displayName = "ChatInputPlaceholder";
948
- var ai = a(function({ className: e, style: t, placeholderClassName: n, placeholder: r = "Input your message...", children: i, value: a, autoFocus: o = !0, isDisabled: s = !1, isReadOnly: c = !1, onChange: l, onKeyDown: u, ...d }, f) {
949
- let { setHasValue: p, setIsFocused: h } = ti(), g = c && !s, _ = m([]);
950
- return /* @__PURE__ */ B("div", {
951
+ ai.displayName = "ChatInputPlaceholder";
952
+ var oi = a(function({ className: e, style: t, placeholderClassName: n, placeholder: r = "Input your message...", children: i, value: a, autoFocus: o = !0, isDisabled: s = !1, isReadOnly: c = !1, onChange: l, onKeyDown: u, ...d }, f) {
953
+ let { setHasValue: p, setIsFocused: h } = ni(), g = c && !s, _ = m([]);
954
+ return /* @__PURE__ */ z("div", {
951
955
  "data-slot": "chat-input-textarea",
952
956
  "data-testid": "chat-input-textarea",
953
957
  "data-disabled": s,
@@ -958,38 +962,38 @@ var ai = a(function({ className: e, style: t, placeholderClassName: n, placehold
958
962
  style: t,
959
963
  ...d,
960
964
  children: [
961
- /* @__PURE__ */ z(ot, {
962
- contentEditable: /* @__PURE__ */ z(rt, {
965
+ /* @__PURE__ */ R(Fe, {
966
+ contentEditable: /* @__PURE__ */ R(Me, {
963
967
  ref: f,
964
968
  "data-slot": "chat-input-editable",
965
969
  className: L("min-h-[26px]!", "overflow-y-auto text-wrap outline-none", e),
966
970
  "aria-label": "Chat input",
967
971
  "aria-placeholder": r,
968
- placeholder: /* @__PURE__ */ z(ii, {
972
+ placeholder: /* @__PURE__ */ R(ai, {
969
973
  className: n,
970
974
  children: r
971
975
  }),
972
976
  onKeyDown: u
973
977
  }),
974
- ErrorBoundary: it
978
+ ErrorBoundary: Ne
975
979
  }),
976
- /* @__PURE__ */ z(at, {}),
977
- /* @__PURE__ */ z(Kr, {
980
+ /* @__PURE__ */ R(Pe, {}),
981
+ /* @__PURE__ */ R(qr, {
978
982
  isDisabled: s,
979
983
  isReadOnly: c
980
984
  }),
981
- /* @__PURE__ */ z(Gr, {
985
+ /* @__PURE__ */ R(Kr, {
982
986
  value: a,
983
987
  emittedValuesRef: _
984
988
  }),
985
- /* @__PURE__ */ z($r, {
989
+ /* @__PURE__ */ R(ei, {
986
990
  onChange: l,
987
991
  emittedValuesRef: _
988
992
  }),
989
- /* @__PURE__ */ z(Zr, {}),
990
- /* @__PURE__ */ z(Xr, { onHasValueChange: p }),
991
- /* @__PURE__ */ z(qr, { onFocusChange: h }),
992
- /* @__PURE__ */ z(zr, {
993
+ /* @__PURE__ */ R(Qr, {}),
994
+ /* @__PURE__ */ R(Zr, { onHasValueChange: p }),
995
+ /* @__PURE__ */ R(Jr, { onFocusChange: h }),
996
+ /* @__PURE__ */ R(Vr, {
993
997
  autoFocus: o,
994
998
  isDisabled: s || c
995
999
  }),
@@ -997,12 +1001,12 @@ var ai = a(function({ className: e, style: t, placeholderClassName: n, placehold
997
1001
  ]
998
1002
  });
999
1003
  });
1000
- ai.displayName = "ChatInputTextarea";
1004
+ oi.displayName = "ChatInputTextarea";
1001
1005
  //#endregion
1002
1006
  //#region src/components/chat-list/chat-list.tsx
1003
- var oi = i(null);
1004
- function si() {
1005
- let e = l(oi);
1007
+ var si = i(null);
1008
+ function Y() {
1009
+ let e = l(si);
1006
1010
  if (!e) throw Error("\"useChatListContext\" must be used within a ChatList");
1007
1011
  return e;
1008
1012
  }
@@ -1043,9 +1047,9 @@ function ci({ children: e, className: t, loadedCount: n, totalCount: r, hasMore:
1043
1047
  C,
1044
1048
  y
1045
1049
  ]);
1046
- return /* @__PURE__ */ z(oi.Provider, {
1050
+ return /* @__PURE__ */ R(si.Provider, {
1047
1051
  value: E,
1048
- children: /* @__PURE__ */ z("div", {
1052
+ children: /* @__PURE__ */ R("div", {
1049
1053
  "data-slot": "chat-list",
1050
1054
  "data-testid": "chat-list",
1051
1055
  "data-loading": a,
@@ -1061,30 +1065,30 @@ function ci({ children: e, className: t, loadedCount: n, totalCount: r, hasMore:
1061
1065
  }
1062
1066
  var li = ["w-2/3", "w-1/2"], ui = ["w-full", "w-4/5"];
1063
1067
  function di({ children: e, rows: t = 16, className: n, rowClassName: r }) {
1064
- let { isLoading: i, loadedCount: a, skeletonContainer: o } = si();
1065
- return !(i && a === 0) || !o ? null : Vt(/* @__PURE__ */ z("div", {
1068
+ let { isLoading: i, loadedCount: a, skeletonContainer: o } = Y();
1069
+ return !(i && a === 0) || !o ? null : gt(/* @__PURE__ */ R("div", {
1066
1070
  "data-slot": "chat-list-skeleton",
1067
1071
  "data-testid": "chat-list-skeleton",
1068
1072
  role: "status",
1069
1073
  "aria-busy": "true",
1070
1074
  "aria-label": "Loading chats",
1071
1075
  className: L("flex min-h-0 flex-1 flex-col gap-4 overflow-hidden", n),
1072
- children: e ?? Array.from({ length: t }, (e, t) => /* @__PURE__ */ B("div", {
1076
+ children: e ?? Array.from({ length: t }, (e, t) => /* @__PURE__ */ z("div", {
1073
1077
  "data-slot": "chat-list-skeleton-row",
1074
1078
  className: L("flex shrink-0 flex-col gap-4 px-12 py-8", r),
1075
- children: [/* @__PURE__ */ z("div", {
1079
+ children: [/* @__PURE__ */ R("div", {
1076
1080
  className: "flex h-20 items-center",
1077
- children: /* @__PURE__ */ z(he, { className: L("h-12", li[t % 2]) })
1078
- }), /* @__PURE__ */ z("div", {
1081
+ children: /* @__PURE__ */ R(ge, { className: L("h-12", li[t % 2]) })
1082
+ }), /* @__PURE__ */ R("div", {
1079
1083
  className: "flex h-16 items-center",
1080
- children: /* @__PURE__ */ z(he, { className: L("h-10", ui[t % 2]) })
1084
+ children: /* @__PURE__ */ R(ge, { className: L("h-10", ui[t % 2]) })
1081
1085
  })]
1082
1086
  }, t))
1083
1087
  }), o);
1084
1088
  }
1085
1089
  function fi({ children: e, className: t }) {
1086
- let { isEmpty: n } = si();
1087
- return n ? /* @__PURE__ */ z("div", {
1090
+ let { isEmpty: n } = Y();
1091
+ return n ? /* @__PURE__ */ R("div", {
1088
1092
  "data-slot": "chat-list-empty-state",
1089
1093
  "data-testid": "chat-list-empty-state",
1090
1094
  role: "status",
@@ -1095,15 +1099,15 @@ function fi({ children: e, className: t }) {
1095
1099
  }) : null;
1096
1100
  }
1097
1101
  function pi({ children: e, error: t, className: n, messageClassName: r }) {
1098
- let { hasError: i, loadedCount: a } = si();
1099
- return i && a === 0 ? /* @__PURE__ */ z("div", {
1102
+ let { hasError: i, loadedCount: a } = Y();
1103
+ return i && a === 0 ? /* @__PURE__ */ R("div", {
1100
1104
  "data-slot": "chat-list-error",
1101
1105
  "data-testid": "chat-list-error",
1102
1106
  role: "alert",
1103
1107
  "aria-live": "assertive",
1104
1108
  "aria-label": "Error loading chats",
1105
1109
  className: L("flex flex-1 items-center justify-center", n),
1106
- children: e || /* @__PURE__ */ z("div", {
1110
+ children: e || /* @__PURE__ */ R("div", {
1107
1111
  "data-slot": "chat-list-error-message",
1108
1112
  className: L("text-text-error-main", r),
1109
1113
  children: t instanceof Error ? t.message : t || "An error occurred"
@@ -1111,7 +1115,7 @@ function pi({ children: e, error: t, className: n, messageClassName: r }) {
1111
1115
  }) : null;
1112
1116
  }
1113
1117
  function mi({ children: e }) {
1114
- let { loadMoreContentRef: t, bumpLoadMore: n } = si();
1118
+ let { loadMoreContentRef: t, bumpLoadMore: n } = Y();
1115
1119
  return t.current = e ?? null, f(() => (n(), () => {
1116
1120
  t.current = null, n();
1117
1121
  }), [n, t]), null;
@@ -1119,7 +1123,7 @@ function mi({ children: e }) {
1119
1123
  //#endregion
1120
1124
  //#region src/components/chat-list/chat-list-items.tsx
1121
1125
  var hi = "chat-list-load-more", gi = s(function({ children: e, className: t, listClassName: n, rowClassName: r, estimateSize: i = 54, overscan: a = 6, gap: o = 4 }) {
1122
- let { loadedCount: s, hasMore: l, isLoading: d, isLoadingMore: f, onLoadMore: p, getItemKey: m, scrollElementRef: h, setScrollElement: g, loadMoreContentRef: _, loadMoreVersion: v, setSkeletonContainer: y } = si(), b = v >= 0 ? _.current : null, x = d && s === 0, S = l ? s + 1 : s, C = c((e) => e >= s ? hi : m(e), [m, s]), w = Ht({
1126
+ let { loadedCount: s, hasMore: l, isLoading: d, isLoadingMore: f, onLoadMore: p, getItemKey: m, scrollElementRef: h, setScrollElement: g, loadMoreContentRef: _, loadMoreVersion: v, setSkeletonContainer: y } = Y(), b = v >= 0 ? _.current : null, x = d && s === 0, S = l ? s + 1 : s, C = c((e) => e >= s ? hi : m(e), [m, s]), w = _t({
1123
1127
  count: x ? 0 : S,
1124
1128
  getScrollElement: () => h.current,
1125
1129
  estimateSize: () => i,
@@ -1138,17 +1142,17 @@ var hi = "chat-list-load-more", gi = s(function({ children: e, className: t, lis
1138
1142
  f,
1139
1143
  p,
1140
1144
  x
1141
- ]), x ? /* @__PURE__ */ z("div", {
1145
+ ]), x ? /* @__PURE__ */ R("div", {
1142
1146
  ref: y,
1143
1147
  "data-slot": "chat-list-items",
1144
1148
  "data-testid": "chat-list-items",
1145
1149
  className: L("flex min-h-0 flex-1 flex-col overflow-hidden", t)
1146
- }) : /* @__PURE__ */ z(pe, {
1150
+ }) : /* @__PURE__ */ R(me, {
1147
1151
  ref: g,
1148
1152
  "data-slot": "chat-list-items",
1149
1153
  "data-testid": "chat-list-items",
1150
1154
  className: L("min-h-0 flex-1", "overflow-auto", t),
1151
- children: /* @__PURE__ */ z("ul", {
1155
+ children: /* @__PURE__ */ R("ul", {
1152
1156
  "data-slot": "chat-list-items-list",
1153
1157
  role: "list",
1154
1158
  "aria-label": "Chats",
@@ -1156,7 +1160,7 @@ var hi = "chat-list-load-more", gi = s(function({ children: e, className: t, lis
1156
1160
  style: { height: `${w.getTotalSize()}px` },
1157
1161
  children: T.map((t) => {
1158
1162
  let n = t.index >= s;
1159
- return /* @__PURE__ */ z("li", {
1163
+ return /* @__PURE__ */ R("li", {
1160
1164
  "data-slot": "chat-list-items-row",
1161
1165
  "data-index": t.index,
1162
1166
  "data-load-more": n,
@@ -1178,7 +1182,7 @@ var hi = "chat-list-load-more", gi = s(function({ children: e, className: t, lis
1178
1182
  })
1179
1183
  });
1180
1184
  }), _i = a(function({ children: t, className: n, asChild: r = !1, isSelected: i = !1, ...a }, o) {
1181
- return /* @__PURE__ */ z(r ? e : "div", {
1185
+ return /* @__PURE__ */ R(r ? e : "div", {
1182
1186
  ref: o,
1183
1187
  "data-slot": "chat-list-item",
1184
1188
  "data-testid": "chat-list-item",
@@ -1218,7 +1222,7 @@ function bi({ children: e, reportInputHeight: t, resetCompact: n }) {
1218
1222
  a,
1219
1223
  o
1220
1224
  ]);
1221
- return /* @__PURE__ */ z(vi.Provider, {
1225
+ return /* @__PURE__ */ R(vi.Provider, {
1222
1226
  value: s,
1223
1227
  children: e
1224
1228
  });
@@ -1226,7 +1230,7 @@ function bi({ children: e, reportInputHeight: t, resetCompact: n }) {
1226
1230
  //#endregion
1227
1231
  //#region src/components/chat-prompt-box/chat-prompt-box-focus-plugin.tsx
1228
1232
  function xi() {
1229
- let e = Hr(), { registerFocusInput: t, unregisterFocusInput: n } = yi();
1233
+ let e = J(), { registerFocusInput: t, unregisterFocusInput: n } = yi();
1230
1234
  return u(() => (t(() => {
1231
1235
  e.focus();
1232
1236
  }), () => {
@@ -1249,10 +1253,10 @@ var Ti = a(function(e, t) {
1249
1253
  }, []), a = c(() => {
1250
1254
  r(!0);
1251
1255
  }, []);
1252
- return /* @__PURE__ */ z(bi, {
1256
+ return /* @__PURE__ */ R(bi, {
1253
1257
  reportInputHeight: i,
1254
1258
  resetCompact: a,
1255
- children: /* @__PURE__ */ z(Ei, {
1259
+ children: /* @__PURE__ */ R(Ei, {
1256
1260
  ref: t,
1257
1261
  "data-compact": n,
1258
1262
  ...e
@@ -1264,29 +1268,29 @@ var Ei = a(function({ className: e, innerClassName: t, children: n, onMouseDown:
1264
1268
  let { focusInput: o } = yi(), s = c((e) => {
1265
1269
  wi(e.target) || o(), r?.(e);
1266
1270
  }, [o, r]);
1267
- return /* @__PURE__ */ B(ri, {
1271
+ return /* @__PURE__ */ z(ii, {
1268
1272
  ref: a,
1269
1273
  "data-slot": "chat-prompt-box",
1270
1274
  className: L("group/chat-prompt-box", "relative overflow-hidden", "cursor-text", "p-px", "rounded-[16px]", "bg-transparent", "hover:bg-promptbox-background-border-base", "data-[focused=true]:bg-promptbox-background-border-base", e),
1271
1275
  onMouseDown: s,
1272
1276
  ...i,
1273
- children: [/* @__PURE__ */ z("div", {
1277
+ children: [/* @__PURE__ */ R("div", {
1274
1278
  "data-slot": "chat-prompt-box-inner",
1275
1279
  className: L("rounded-[15px]", "p-[4px]", "bg-[#171A20]", "group-hover/chat-prompt-box:bg-[#252931]", "group-data-[focused=true]/chat-prompt-box:bg-[linear-gradient(var(--color-promptbox-background-hover),var(--color-promptbox-background-hover)),var(--color-promptbox-background-base)]", "group-data-[focused=true]/chat-prompt-box:group-hover/chat-prompt-box:bg-[linear-gradient(var(--color-promptbox-background-hover),var(--color-promptbox-background-hover)),var(--color-promptbox-background-base)]", t),
1276
1280
  children: n
1277
- }), /* @__PURE__ */ z(Di, {})]
1281
+ }), /* @__PURE__ */ R(Di, {})]
1278
1282
  });
1279
1283
  });
1280
1284
  Ei.displayName = "ChatPromptBoxContainer";
1281
1285
  function Di() {
1282
- return /* @__PURE__ */ B(be, { children: [/* @__PURE__ */ z("div", {
1286
+ return /* @__PURE__ */ z(Se, { children: [/* @__PURE__ */ R("div", {
1283
1287
  "data-slot": "chat-prompt-box-glow-top",
1284
1288
  className: L("absolute left-1/2 top-[-40px]", "translate-x-[-50%]", "pointer-events-none", "w-[380px] h-[72px]", "opacity-0 group-data-[focused=true]/chat-prompt-box:opacity-50"),
1285
1289
  style: {
1286
1290
  borderRadius: "380px",
1287
1291
  background: "gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.00) 100%)"
1288
1292
  }
1289
- }), /* @__PURE__ */ z("div", {
1293
+ }), /* @__PURE__ */ R("div", {
1290
1294
  "data-slot": "chat-prompt-box-glow-bottom",
1291
1295
  className: L("absolute left-1/2 -bottom-22", "translate-x-[-50%]", "pointer-events-none", "w-[1082px] h-[172px]", "opacity-0 group-data-[focused=true]/chat-prompt-box:opacity-5"),
1292
1296
  style: {
@@ -1296,7 +1300,7 @@ function Di() {
1296
1300
  })] });
1297
1301
  }
1298
1302
  function Oi({ className: e, children: t, ...n }) {
1299
- return /* @__PURE__ */ z("div", {
1303
+ return /* @__PURE__ */ R("div", {
1300
1304
  "data-slot": "chat-prompt-box-toolbar",
1301
1305
  "data-testid": "chat-prompt-box-toolbar",
1302
1306
  className: L(e),
@@ -1305,7 +1309,7 @@ function Oi({ className: e, children: t, ...n }) {
1305
1309
  });
1306
1310
  }
1307
1311
  function ki({ className: e, children: t, ...n }) {
1308
- return /* @__PURE__ */ z("div", {
1312
+ return /* @__PURE__ */ R("div", {
1309
1313
  "data-slot": "chat-prompt-box-content",
1310
1314
  "data-testid": "chat-prompt-box-content",
1311
1315
  className: L("relative", "px-[8px] py-[8px]", "flex flex-row gap-[8px]", "group-data-[compact=false]/chat-prompt-box:pb-[calc(8px+4px+40px)]", e),
@@ -1314,7 +1318,7 @@ function ki({ className: e, children: t, ...n }) {
1314
1318
  });
1315
1319
  }
1316
1320
  var Ai = a(function({ className: e, textareaClassName: t, placeholderClassName: n, children: r, ...i }, a) {
1317
- let { reportInputHeight: o, resetCompact: s } = yi(), { hasValue: l } = ti(), { ref: u, height: d } = R();
1321
+ let { reportInputHeight: o, resetCompact: s } = yi(), { hasValue: l } = ni(), { ref: u, height: d } = xe();
1318
1322
  f(() => {
1319
1323
  typeof d == "number" && o(d);
1320
1324
  }, [d, o]), f(() => () => {
@@ -1325,22 +1329,22 @@ var Ai = a(function({ className: e, textareaClassName: t, placeholderClassName:
1325
1329
  let p = c((e) => {
1326
1330
  u(e), typeof a == "function" ? a(e) : a && (a.current = e);
1327
1331
  }, [u, a]);
1328
- return /* @__PURE__ */ z("div", {
1332
+ return /* @__PURE__ */ R("div", {
1329
1333
  "data-slot": "chat-prompt-box-input",
1330
1334
  "data-testid": "chat-prompt-box-input",
1331
1335
  className: L("min-h-[40px]", "inline-flex justify-center items-center", "group-data-[compact=false]/chat-prompt-box:items-start", "group-data-[compact=false]/chat-prompt-box:min-h-[48px]", "order-2 grow min-w-0 flex-1", "[&>div]:flex-1 [&>div]:min-w-0", e),
1332
- children: /* @__PURE__ */ B(ai, {
1336
+ children: /* @__PURE__ */ z(oi, {
1333
1337
  ref: p,
1334
1338
  className: L("max-h-[72px]!", t),
1335
1339
  placeholderClassName: L("leading-[24px]!", n),
1336
1340
  ...i,
1337
- children: [/* @__PURE__ */ z(xi, {}), r]
1341
+ children: [/* @__PURE__ */ R(xi, {}), r]
1338
1342
  })
1339
1343
  });
1340
1344
  });
1341
1345
  Ai.displayName = "ChatPromptBoxInput";
1342
1346
  function ji({ className: e, children: t, ...n }) {
1343
- return /* @__PURE__ */ z("div", {
1347
+ return /* @__PURE__ */ R("div", {
1344
1348
  "data-slot": "chat-prompt-box-actions-left",
1345
1349
  "data-testid": "chat-prompt-box-actions-left",
1346
1350
  role: "group",
@@ -1350,7 +1354,7 @@ function ji({ className: e, children: t, ...n }) {
1350
1354
  });
1351
1355
  }
1352
1356
  function Mi({ className: e, children: t, ...n }) {
1353
- return /* @__PURE__ */ z("div", {
1357
+ return /* @__PURE__ */ R("div", {
1354
1358
  "data-slot": "chat-prompt-box-actions-right",
1355
1359
  "data-testid": "chat-prompt-box-actions-right",
1356
1360
  role: "group",
@@ -1362,7 +1366,7 @@ function Mi({ className: e, children: t, ...n }) {
1362
1366
  //#endregion
1363
1367
  //#region src/components/chat-message/chat-message.tsx
1364
1368
  function Ni({ children: e, className: t, isQuestion: n }) {
1365
- return /* @__PURE__ */ z("div", {
1369
+ return /* @__PURE__ */ R("div", {
1366
1370
  "data-slot": "chat-message",
1367
1371
  "data-question": n,
1368
1372
  className: L("group/message", "flex flex-col", "data-[question=true]:items-end", "gap-8", t),
@@ -1370,7 +1374,7 @@ function Ni({ children: e, className: t, isQuestion: n }) {
1370
1374
  });
1371
1375
  }
1372
1376
  function Pi({ children: e, className: t }) {
1373
- return /* @__PURE__ */ z("div", {
1377
+ return /* @__PURE__ */ R("div", {
1374
1378
  "data-slot": "chat-message-content",
1375
1379
  "data-bubble": !0,
1376
1380
  className: L("w-fit", "min-w-message-mobile-min md:min-w-auto", "group-data-[question=true]/message:data-[bubble=true]:p-16", "group-data-[question=true]/message:data-[bubble=true]:rounded-[20px]", "group-data-[question=true]/message:data-[bubble=true]:bg-[#22283499]", t),
@@ -1378,7 +1382,7 @@ function Pi({ children: e, className: t }) {
1378
1382
  });
1379
1383
  }
1380
1384
  function Fi({ children: e, className: t }) {
1381
- return /* @__PURE__ */ z("div", {
1385
+ return /* @__PURE__ */ R("div", {
1382
1386
  "data-slot": "chat-message-actions",
1383
1387
  className: L("transition-opacity duration-300", "md:opacity-0 group-hover/message:opacity-100", t),
1384
1388
  children: e
@@ -1387,12 +1391,12 @@ function Fi({ children: e, className: t }) {
1387
1391
  //#endregion
1388
1392
  //#region src/contexts/chat-context/utils.ts
1389
1393
  function Ii() {
1390
- return `__${Wt()}__`;
1394
+ return `__${yt()}__`;
1391
1395
  }
1392
1396
  //#endregion
1393
1397
  //#region src/contexts/chat-context/chat-context.tsx
1394
1398
  var Li = i(null);
1395
- function Y() {
1399
+ function X() {
1396
1400
  let e = l(Li);
1397
1401
  if (!e) throw Error("\"useChatContext\" must be used within a ChatProvider");
1398
1402
  return e;
@@ -1432,7 +1436,7 @@ function Ri({ children: e, chatId: t }) {
1432
1436
  f,
1433
1437
  g
1434
1438
  ]);
1435
- return /* @__PURE__ */ z(Li.Provider, {
1439
+ return /* @__PURE__ */ R(Li.Provider, {
1436
1440
  value: _,
1437
1441
  children: e
1438
1442
  });
@@ -1453,7 +1457,7 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1453
1457
  isProgrammaticScroll: !1,
1454
1458
  userScrollIntent: !1,
1455
1459
  scrollStrategy: "lastItem"
1456
- }), s = m(null), l = m(null), u = m(null), d = m(null), f = m(null), g = m(null), _ = m(0), v = m(!0), y = m(!1), b = m(!1), x = m(!1), S = m(!1), C = m(null), w = m(null), T = m("lastItem"), E = m(0), D = m(() => {}), ee = m(() => {}), te = m(() => {}), O = m(() => {});
1460
+ }), s = m(null), l = m(null), u = m(null), d = m(null), f = m(null), g = m(null), _ = m(0), v = m(!0), y = m(!1), b = m(!1), x = m(!1), S = m(!1), C = m(null), w = m(null), T = m("lastItem"), E = m(0), ee = m(() => {}), D = m(() => {}), te = m(() => {}), O = m(() => {});
1457
1461
  O.current = c(() => {
1458
1462
  n && o({
1459
1463
  isAtBottom: v.current,
@@ -1470,31 +1474,31 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1470
1474
  te.current = k;
1471
1475
  let A = c(() => {
1472
1476
  g.current?.disconnect(), g.current = null;
1473
- }, []), ne = c(() => {
1477
+ }, []), j = c(() => {
1474
1478
  f.current?.disconnect(), f.current = null;
1475
- }, []), re = m(() => {}), j = c(() => {
1479
+ }, []), ne = m(() => {}), M = c(() => {
1476
1480
  requestAnimationFrame(() => {
1477
1481
  requestAnimationFrame(() => {
1478
- x.current = !1, re.current(), O.current();
1482
+ x.current = !1, ne.current(), O.current();
1479
1483
  });
1480
1484
  });
1481
- }, []), ie = c(() => {
1485
+ }, []), re = c(() => {
1482
1486
  C.current &&= (clearTimeout(C.current), null), S.current && (S.current = !1, O.current());
1483
- }, []), M = c(() => {
1487
+ }, []), N = c(() => {
1484
1488
  S.current = !0, C.current && clearTimeout(C.current), C.current = setTimeout(() => {
1485
1489
  C.current = null, S.current = !1, O.current();
1486
1490
  }, Bi), O.current();
1487
- }, []), N = c(() => {
1491
+ }, []), ie = c(() => {
1488
1492
  T.current = "lastItem", te.current(), O.current();
1489
1493
  }, []), P = c((e) => {
1490
- b.current !== e && (b.current = e, e && re.current(), O.current());
1494
+ b.current !== e && (b.current = e, e && ne.current(), O.current());
1491
1495
  }, []), ae = c(() => {
1492
1496
  if (b.current) return;
1493
1497
  x.current = !0, O.current();
1494
1498
  let e = y.current ? "smooth" : "instant";
1495
1499
  y.current = !0, requestAnimationFrame(() => {
1496
1500
  if (b.current) {
1497
- j();
1501
+ M();
1498
1502
  return;
1499
1503
  }
1500
1504
  T.current === "lastItem" ? u.current?.scrollIntoView({
@@ -1504,10 +1508,10 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1504
1508
  }) : s.current?.scrollTo({
1505
1509
  top: s.current.scrollHeight,
1506
1510
  behavior: e
1507
- }), j(), O.current();
1511
+ }), M(), O.current();
1508
1512
  });
1509
- }, [j]);
1510
- D.current = ae;
1513
+ }, [M]);
1514
+ ee.current = ae;
1511
1515
  let oe = c(() => {
1512
1516
  let e = s.current;
1513
1517
  if (!e) return;
@@ -1516,37 +1520,37 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1516
1520
  e.scrollTo({
1517
1521
  top: t,
1518
1522
  behavior: "instant"
1519
- }), E.current = e.scrollHeight, j(), O.current();
1523
+ }), E.current = e.scrollHeight, M(), O.current();
1520
1524
  }));
1521
- }, [j]), se = c(() => {
1525
+ }, [M]), se = c(() => {
1522
1526
  let e = s.current;
1523
1527
  if (!e) return;
1524
1528
  let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 1;
1525
1529
  (t || b.current) && (v.current = t, i(t), T.current === "end" && t && oe(), O.current());
1526
1530
  }, [oe]);
1527
- re.current = se;
1531
+ ne.current = se;
1528
1532
  let ce = c(() => {
1529
- ne();
1533
+ j();
1530
1534
  let e = s.current;
1531
1535
  if (!e) return;
1532
1536
  let t = new ResizeObserver(() => {
1533
- re.current();
1537
+ ne.current();
1534
1538
  });
1535
1539
  t.observe(e), f.current = t;
1536
- }, [ne]), F = c((e) => {
1540
+ }, [j]), F = c((e) => {
1537
1541
  if (k(), T.current !== "end") return;
1538
1542
  let t = new ResizeObserver(() => {
1539
1543
  T.current === "end" && oe();
1540
1544
  });
1541
1545
  t.observe(e), d.current = t;
1542
1546
  }, [k, oe]);
1543
- ee.current = F;
1547
+ D.current = F;
1544
1548
  let le = c(() => {
1545
1549
  if (!S.current || T.current === "end") return;
1546
- T.current = "end", ie();
1550
+ T.current = "end", re();
1547
1551
  let e = u.current;
1548
- e && ee.current(e), O.current();
1549
- }, [ie]), ue = c((e) => {
1552
+ e && D.current(e), O.current();
1553
+ }, [re]), ue = c((e) => {
1550
1554
  if (!e && !b.current) {
1551
1555
  O.current();
1552
1556
  return;
@@ -1565,23 +1569,23 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1565
1569
  T.current !== "end" && ue(!0);
1566
1570
  return;
1567
1571
  }
1568
- i && (P(!0), N());
1572
+ i && (P(!0), ie());
1569
1573
  }, [
1570
- N,
1574
+ ie,
1571
1575
  ue,
1572
1576
  P
1573
1577
  ]), fe = c((e) => {
1574
1578
  let t = s.current;
1575
- e.deltaY < 0 && t && t.scrollHeight > t.clientHeight && (P(!0), N()), M();
1579
+ e.deltaY < 0 && t && t.scrollHeight > t.clientHeight && (P(!0), ie()), N();
1576
1580
  }, [
1581
+ ie,
1577
1582
  N,
1578
- M,
1579
1583
  P
1580
1584
  ]), pe = c(() => {
1581
- M();
1582
- }, [M]), me = c(() => {
1583
- M();
1584
- }, [M]), he = c(() => {
1585
+ N();
1586
+ }, [N]), me = c(() => {
1587
+ N();
1588
+ }, [N]), he = c(() => {
1585
1589
  A();
1586
1590
  let e = s.current, t = l.current;
1587
1591
  if (!e || !t) return;
@@ -1593,21 +1597,21 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1593
1597
  });
1594
1598
  n.observe(t), g.current = n;
1595
1599
  }, [A, ue]), ge = c((e) => {
1596
- s.current && (s.current.removeEventListener("scroll", de), s.current.removeEventListener("wheel", fe), s.current.removeEventListener("touchstart", pe), s.current.removeEventListener("pointerdown", me), ne()), s.current = e, e ? (w.current = e.scrollTop, E.current = e.scrollHeight, e.addEventListener("scroll", de, { passive: !0 }), e.addEventListener("wheel", fe, { passive: !0 }), e.addEventListener("touchstart", pe, { passive: !0 }), e.addEventListener("pointerdown", me), he(), ce(), se()) : (ie(), A(), ne());
1600
+ s.current && (s.current.removeEventListener("scroll", de), s.current.removeEventListener("wheel", fe), s.current.removeEventListener("touchstart", pe), s.current.removeEventListener("pointerdown", me), j()), s.current = e, e ? (w.current = e.scrollTop, E.current = e.scrollHeight, e.addEventListener("scroll", de, { passive: !0 }), e.addEventListener("wheel", fe, { passive: !0 }), e.addEventListener("touchstart", pe, { passive: !0 }), e.addEventListener("pointerdown", me), he(), ce(), se()) : (re(), A(), j());
1597
1601
  }, [
1598
1602
  he,
1599
1603
  ce,
1600
- ie,
1604
+ re,
1601
1605
  A,
1602
- ne,
1606
+ j,
1603
1607
  me,
1604
1608
  de,
1605
1609
  pe,
1606
1610
  fe,
1607
1611
  se
1608
- ]), I = c((e) => {
1612
+ ]), _e = c((e) => {
1609
1613
  l.current = e, e ? he() : A();
1610
- }, [he, A]), _e = c((e) => {
1614
+ }, [he, A]), I = c((e) => {
1611
1615
  let t = u.current;
1612
1616
  if (e === null) {
1613
1617
  k(), u.current = null, O.current();
@@ -1631,42 +1635,42 @@ function Ui({ children: e, chatId: t, debug: n = !1 }) {
1631
1635
  O.current();
1632
1636
  }, [F, k]), ye = c(() => {
1633
1637
  P(!1), _.current < zi && (T.current = "lastItem", k()), O.current();
1634
- }, [k, P]), L = c(() => {
1635
- ye(), M(), le(), x.current = !0, O.current();
1638
+ }, [k, P]), be = c(() => {
1639
+ ye(), N(), le(), x.current = !0, O.current();
1636
1640
  let e = y.current ? "smooth" : "instant";
1637
1641
  y.current = !0, requestAnimationFrame(() => {
1638
1642
  s.current?.scrollTo({
1639
1643
  top: s.current.scrollHeight,
1640
1644
  behavior: e
1641
- }), j(), O.current();
1645
+ }), M(), O.current();
1642
1646
  });
1643
1647
  }, [
1644
1648
  le,
1645
- j,
1646
1649
  M,
1650
+ N,
1647
1651
  ye
1648
- ]), R = c(() => {
1652
+ ]), L = c(() => {
1649
1653
  ae();
1650
- }, [ae]), be = p(() => ({
1654
+ }, [ae]), xe = p(() => ({
1651
1655
  viewportRef: ge,
1652
- bottomTriggerRef: I,
1653
- lastItemRef: _e,
1656
+ bottomTriggerRef: _e,
1657
+ lastItemRef: I,
1654
1658
  isAtBottom: r,
1655
1659
  setMessageCount: ve,
1656
- scrollBottom: L,
1657
- scrollToLatest: R
1660
+ scrollBottom: be,
1661
+ scrollToLatest: L
1658
1662
  }), [
1659
1663
  ge,
1660
- I,
1661
1664
  _e,
1665
+ I,
1662
1666
  r,
1663
1667
  ve,
1664
- L,
1665
- R
1668
+ be,
1669
+ L
1666
1670
  ]);
1667
- return /* @__PURE__ */ B(Vi.Provider, {
1668
- value: be,
1669
- children: [n && /* @__PURE__ */ z("code", {
1671
+ return /* @__PURE__ */ z(Vi.Provider, {
1672
+ value: xe,
1673
+ children: [n && /* @__PURE__ */ R("code", {
1670
1674
  className: "absolute top-0 left-0 z-50 w-full bg-red-500/90 p-8 text-white pointer-events-none",
1671
1675
  children: JSON.stringify(a, null, 2)
1672
1676
  }), e]
@@ -1684,9 +1688,9 @@ function qi({ children: e, className: t, messageCount: n = 0, gap: r = 16 }) {
1684
1688
  let { setMessageCount: i } = Hi(), a = p(() => ({ messageCount: n }), [n]);
1685
1689
  return f(() => {
1686
1690
  i(n);
1687
- }, [n, i]), /* @__PURE__ */ z(Wi.Provider, {
1691
+ }, [n, i]), /* @__PURE__ */ R(Wi.Provider, {
1688
1692
  value: a,
1689
- children: /* @__PURE__ */ z("div", {
1693
+ children: /* @__PURE__ */ R("div", {
1690
1694
  "data-slot": "chat-messages",
1691
1695
  "data-testid": "chat-messages",
1692
1696
  className: L("relative flex min-h-0 flex-1 flex-col", t),
@@ -1699,39 +1703,39 @@ function Ji({ children: e, className: t, scrollAreaClassName: n, viewportClassNa
1699
1703
  let { viewportRef: a, bottomTriggerRef: o, scrollToLatest: s } = Hi(), { messageCount: c } = Ki(), l = p(() => Array.from({ length: c }, (e, t) => t), [c]), u = c - 1;
1700
1704
  return f(() => {
1701
1705
  s();
1702
- }, [c, s]), /* @__PURE__ */ B(Ut.Root, {
1706
+ }, [c, s]), /* @__PURE__ */ z(vt.Root, {
1703
1707
  "data-slot": "chat-messages-scroll-area",
1704
1708
  className: L("min-h-0 flex-1", "relative group/scroll-area", "overflow-y-hidden", "transform-gpu", n),
1705
- children: [/* @__PURE__ */ z(Ut.Viewport, {
1709
+ children: [/* @__PURE__ */ R(vt.Viewport, {
1706
1710
  ref: a,
1707
1711
  "data-slot": "chat-messages-viewport",
1708
1712
  className: L("@container-[size]", "will-change-scroll h-full w-full", r),
1709
1713
  style: { scrollbarGutter: "stable both-edges" },
1710
- children: /* @__PURE__ */ B("ul", {
1714
+ children: /* @__PURE__ */ z("ul", {
1711
1715
  "data-slot": "chat-messages-list",
1712
1716
  "data-testid": "chat-messages-list",
1713
1717
  role: "log",
1714
1718
  "aria-label": "Message list",
1715
1719
  "aria-atomic": "false",
1716
1720
  className: L("m-0 flex flex-col gap-(--chat-messages-gap) p-0", t),
1717
- children: [l.map((t) => /* @__PURE__ */ z(Yi, {
1721
+ children: [l.map((t) => /* @__PURE__ */ R(Yi, {
1718
1722
  index: t,
1719
1723
  isLast: t === u,
1720
1724
  children: e
1721
- }, t)), /* @__PURE__ */ z("li", {
1725
+ }, t)), /* @__PURE__ */ R("li", {
1722
1726
  ref: o,
1723
1727
  "data-slot": "chat-messages-bottom-trigger",
1724
1728
  className: L("h-px -mt-(--chat-messages-gap)", i),
1725
1729
  "aria-hidden": "true"
1726
1730
  })]
1727
1731
  })
1728
- }), /* @__PURE__ */ z(Zi, { orientation: "vertical" })]
1732
+ }), /* @__PURE__ */ R(Zi, { orientation: "vertical" })]
1729
1733
  });
1730
1734
  }
1731
1735
  var Yi = s(function({ children: e, index: t, isLast: n }) {
1732
- return /* @__PURE__ */ z("li", {
1736
+ return /* @__PURE__ */ R("li", {
1733
1737
  "data-slot": "chat-messages-row",
1734
- children: /* @__PURE__ */ z(Gi.Provider, {
1738
+ children: /* @__PURE__ */ R(Gi.Provider, {
1735
1739
  value: n,
1736
1740
  children: e(t)
1737
1741
  })
@@ -1739,7 +1743,7 @@ var Yi = s(function({ children: e, index: t, isLast: n }) {
1739
1743
  });
1740
1744
  function Xi({ children: e, className: t, ...n }) {
1741
1745
  let r = l(Gi), { lastItemRef: i } = Hi();
1742
- return /* @__PURE__ */ z("div", {
1746
+ return /* @__PURE__ */ R("div", {
1743
1747
  ref: r ? i : void 0,
1744
1748
  "data-slot": "chat-message-list-group",
1745
1749
  "data-is-last": r,
@@ -1749,12 +1753,12 @@ function Xi({ children: e, className: t, ...n }) {
1749
1753
  });
1750
1754
  }
1751
1755
  function Zi({ className: e, orientation: t = "vertical", ...n }) {
1752
- return /* @__PURE__ */ z(Ut.ScrollAreaScrollbar, {
1756
+ return /* @__PURE__ */ R(vt.ScrollAreaScrollbar, {
1753
1757
  "data-slot": "scroll-area-scrollbar",
1754
1758
  orientation: t,
1755
1759
  className: L("opacity-0 group-hover/scroll-area:opacity-100", "rounded-[8px]", "bg-scrollbar-track hover:bg-scrollbar-track-hover", "transition-opacity duration-200 ease-in-out", "flextouch-none select-none transition-colors", t === "vertical" && "h-full w-scrollbar border-l border-l-transparent px-4 py-[12px]", t === "horizontal" && "h-scrollbar w-full border-t border-t-transparent px-[12px] py-4", e),
1756
1760
  ...n,
1757
- children: /* @__PURE__ */ z(Ut.ScrollAreaThumb, {
1761
+ children: /* @__PURE__ */ R(vt.ScrollAreaThumb, {
1758
1762
  "data-slot": "scroll-area-thumb",
1759
1763
  className: L("relative flex-1 rounded-full", "bg-scrollbar-thumb hover:bg-scrollbar-thumb-hover", t === "vertical" && "w-scrollbar-thumb!", t === "horizontal" && "h-scrollbar-thumb!")
1760
1764
  })
@@ -1762,23 +1766,23 @@ function Zi({ className: e, orientation: t = "vertical", ...n }) {
1762
1766
  }
1763
1767
  var Qi = s(function({ className: e, buttonClassName: t, tooltip: n, children: r }) {
1764
1768
  let { isAtBottom: i, scrollBottom: a } = Hi();
1765
- return /* @__PURE__ */ z("div", {
1769
+ return /* @__PURE__ */ R("div", {
1766
1770
  "data-slot": "chat-messages-scroll-button",
1767
1771
  "data-testid": "chat-message-history-scroll-button",
1768
1772
  "data-hidden": i,
1769
1773
  "aria-hidden": i ? !0 : void 0,
1770
1774
  className: L("absolute", "px-[12px]", "bottom-0", "right-0 -translate-x-[12px]", "md:right-auto md:left-1/2 md:-translate-x-1/2", "-translate-y-[12px]", "flex items-center justify-center", "transition-opacity duration-200 ease-in-out", "data-[hidden=true]:pointer-events-none", "data-[hidden=true]:opacity-0 data-[hidden=false]:opacity-100", e),
1771
- children: /* @__PURE__ */ z(ge, {
1775
+ children: /* @__PURE__ */ R(_e, {
1772
1776
  tooltip: n,
1773
1777
  side: "top",
1774
- children: /* @__PURE__ */ z(D, {
1778
+ children: /* @__PURE__ */ R(D, {
1775
1779
  className: L("bg-paper-elevation-2", t),
1776
1780
  color: "primary",
1777
1781
  size: "md",
1778
1782
  onClick: () => a(),
1779
1783
  tabIndex: -1,
1780
1784
  "aria-label": n,
1781
- children: r || /* @__PURE__ */ z(Se, {})
1785
+ children: r || /* @__PURE__ */ R(xt, {})
1782
1786
  })
1783
1787
  })
1784
1788
  });
@@ -1786,7 +1790,7 @@ var Qi = s(function({ className: e, buttonClassName: t, tooltip: n, children: r
1786
1790
  //#endregion
1787
1791
  //#region src/components/chat-message-attachment-card/chat-message-attachment-card.tsx
1788
1792
  function $i({ className: e, children: t, isPreview: n, isInteractive: r = !0 }) {
1789
- return /* @__PURE__ */ z("div", {
1793
+ return /* @__PURE__ */ R("div", {
1790
1794
  role: "group",
1791
1795
  "data-slot": "chat-message-attachment-card",
1792
1796
  "data-testid": "chat-message-attachment-card",
@@ -1797,7 +1801,7 @@ function $i({ className: e, children: t, isPreview: n, isInteractive: r = !0 })
1797
1801
  });
1798
1802
  }
1799
1803
  function ea({ className: e, children: t }) {
1800
- return /* @__PURE__ */ z("div", {
1804
+ return /* @__PURE__ */ R("div", {
1801
1805
  "data-slot": "chat-message-attachment-card-content",
1802
1806
  "data-testid": "chat-message-attachment-card-content",
1803
1807
  className: L("flex-1", "flex items-center", "overflow-hidden", e),
@@ -1805,7 +1809,7 @@ function ea({ className: e, children: t }) {
1805
1809
  });
1806
1810
  }
1807
1811
  function ta({ className: e, children: t }) {
1808
- return /* @__PURE__ */ z(I, {
1812
+ return /* @__PURE__ */ R(I, {
1809
1813
  variant: "body-sm",
1810
1814
  "data-slot": "chat-message-attachment-card-title",
1811
1815
  "data-testid": "chat-message-attachment-card-title",
@@ -1814,11 +1818,11 @@ function ta({ className: e, children: t }) {
1814
1818
  });
1815
1819
  }
1816
1820
  function na({ className: e, imageClassName: t, previewSrc: n }) {
1817
- return /* @__PURE__ */ z("figure", {
1821
+ return /* @__PURE__ */ R("figure", {
1818
1822
  "data-slot": "chat-message-attachment-card-preview",
1819
1823
  "data-testid": "chat-message-attachment-card-preview",
1820
1824
  className: L("absolute top-0 left-0", "inset-0 w-full h-full", "overflow-hidden rounded-promptbox-attachment", "pointer-events-none", e),
1821
- children: /* @__PURE__ */ z("img", {
1825
+ children: /* @__PURE__ */ R("img", {
1822
1826
  "data-slot": "chat-message-attachment-card-preview-image",
1823
1827
  src: n,
1824
1828
  alt: "Preview",
@@ -1827,18 +1831,18 @@ function na({ className: e, imageClassName: t, previewSrc: n }) {
1827
1831
  });
1828
1832
  }
1829
1833
  function ra({ className: e, buttonClassName: t, onDelete: n }) {
1830
- return /* @__PURE__ */ z("div", {
1834
+ return /* @__PURE__ */ R("div", {
1831
1835
  role: "group",
1832
1836
  "data-slot": "chat-message-attachment-card-actions",
1833
1837
  "data-testid": "chat-message-attachment-card-actions",
1834
1838
  className: L("absolute top-0 right-0", "translate-x-1/2 -translate-y-1/2", "hidden", "group-data-[interactive=true]/chat-message-attachment-card:group-hover/chat-message-attachment-card:flex", "rounded-overlay-tools-wrapper", "bg-overlay-tools-background-base", e),
1835
- children: /* @__PURE__ */ z(D, {
1839
+ children: /* @__PURE__ */ R(D, {
1836
1840
  variant: "tertiary",
1837
1841
  isSemantic: !1,
1838
1842
  onClick: n,
1839
1843
  size: "xs",
1840
1844
  className: L("size-[24px]", "text-icon-button-tertiary-icon", t),
1841
- children: /* @__PURE__ */ z(we, {})
1845
+ children: /* @__PURE__ */ R(Ct, {})
1842
1846
  })
1843
1847
  });
1844
1848
  }
@@ -1846,38 +1850,38 @@ function ra({ className: e, buttonClassName: t, onDelete: n }) {
1846
1850
  //#region src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx
1847
1851
  var ia = {
1848
1852
  spreadsheet: {
1849
- component: qe,
1853
+ component: Kt,
1850
1854
  className: "bg-data-d"
1851
1855
  },
1852
1856
  pdf: {
1853
- component: He,
1857
+ component: Vt,
1854
1858
  className: "bg-data-a"
1855
1859
  },
1856
1860
  presentation: {
1857
- component: Ue,
1861
+ component: Ht,
1858
1862
  className: "bg-data-e"
1859
1863
  },
1860
1864
  document: {
1861
- component: De,
1865
+ component: Et,
1862
1866
  className: "bg-data-c"
1863
1867
  },
1864
1868
  code: {
1865
- component: Te,
1869
+ component: wt,
1866
1870
  className: "bg-data-f"
1867
1871
  },
1868
1872
  unknown: {
1869
- component: Oe,
1873
+ component: Dt,
1870
1874
  className: "bg-data-f"
1871
1875
  }
1872
1876
  };
1873
1877
  function aa({ icon: e, className: t, ...n }) {
1874
1878
  let { component: r, className: i } = ia[e];
1875
- return /* @__PURE__ */ z("span", {
1879
+ return /* @__PURE__ */ R("span", {
1876
1880
  "data-slot": "chat-message-attachment-card-icon",
1877
1881
  "data-testid": "chat-attachment-icon",
1878
1882
  "data-icon": e,
1879
1883
  className: L("inline-flex items-center justify-center", "rounded-[8px]", "p-8", "size-promptbox-attachment-size-icon-container", "text-icon-fill-inverse", "[&_svg]:size-[24px]", i, t),
1880
- children: /* @__PURE__ */ z(r, { ...n })
1884
+ children: /* @__PURE__ */ R(r, { ...n })
1881
1885
  });
1882
1886
  }
1883
1887
  //#endregion
@@ -1896,7 +1900,7 @@ var oa = {
1896
1900
  "application/vnd.oasis.opendocument.text": "document"
1897
1901
  };
1898
1902
  function sa(e) {
1899
- let t = Gt.getType(e.name);
1903
+ let t = qt.getType(e.name);
1900
1904
  return t ? t in oa ? oa[t] : t.startsWith("text/") || t.includes("javascript") || t.includes("json") ? "code" : "unknown" : "unknown";
1901
1905
  }
1902
1906
  //#endregion
@@ -1910,14 +1914,14 @@ function la({ customComponents: e }) {
1910
1914
  let t = p(() => Object.keys(e).filter((e) => ca(e) ? !0 : (console.warn(`[MarkdownViewer] Invalid custom component tag: ${e}`), !1)), [e]);
1911
1915
  return {
1912
1916
  components: e,
1913
- remarkPlugins: p(() => [...Object.values(Jt)], []),
1914
- rehypePlugins: p(() => [...Object.values(qt), [Yt, {
1915
- ...Xt,
1916
- tagNames: [...Xt?.tagNames || [], ...t],
1917
+ remarkPlugins: p(() => [...Object.values(Xt)], []),
1918
+ rehypePlugins: p(() => [...Object.values(Yt), [Zt, {
1919
+ ...Qt,
1920
+ tagNames: [...Qt?.tagNames || [], ...t],
1917
1921
  protocols: {
1918
- ...Xt?.protocols,
1922
+ ...Qt?.protocols,
1919
1923
  href: [
1920
- ...Xt?.protocols?.href ?? [],
1924
+ ...Qt?.protocols?.href ?? [],
1921
1925
  "swisper",
1922
1926
  "swisper://"
1923
1927
  ]
@@ -1929,7 +1933,7 @@ function la({ customComponents: e }) {
1929
1933
  //#region src/components/markdown-viewer/markdown-viewer.tsx
1930
1934
  function ua({ markdown: e, className: t, isStreaming: n = !1, hasCaret: r = !1, customComponents: i = {} }) {
1931
1935
  let { components: a, remarkPlugins: o, rehypePlugins: s } = la({ customComponents: i });
1932
- return /* @__PURE__ */ z(Kt, {
1936
+ return /* @__PURE__ */ R(Jt, {
1933
1937
  className: t,
1934
1938
  caret: r ? "block" : void 0,
1935
1939
  isAnimating: n,
@@ -1968,7 +1972,7 @@ function da(e, t = "|") {
1968
1972
  //#region src/components/chat-message-response/chat-message-response.tsx
1969
1973
  function fa({ message: e, isStreaming: t }) {
1970
1974
  let n = p(() => ({}), []);
1971
- return /* @__PURE__ */ z(ua, {
1975
+ return /* @__PURE__ */ R(ua, {
1972
1976
  hasCaret: !1,
1973
1977
  markdown: e,
1974
1978
  isStreaming: t,
@@ -1978,7 +1982,7 @@ function fa({ message: e, isStreaming: t }) {
1978
1982
  //#endregion
1979
1983
  //#region src/components/chat-message-toolbar/chat-message-toolbar.tsx
1980
1984
  function pa({ children: e, className: t, reverse: n = !1, ...r }) {
1981
- return /* @__PURE__ */ z("div", {
1985
+ return /* @__PURE__ */ R("div", {
1982
1986
  "data-slot": "chat-message-toolbar",
1983
1987
  "data-testid": "chat-message-toolbar",
1984
1988
  "data-reverse": n,
@@ -1988,7 +1992,7 @@ function pa({ children: e, className: t, reverse: n = !1, ...r }) {
1988
1992
  });
1989
1993
  }
1990
1994
  function ma({ children: e, className: t, ...n }) {
1991
- return /* @__PURE__ */ z("div", {
1995
+ return /* @__PURE__ */ R("div", {
1992
1996
  "data-slot": "chat-message-toolbar-actions",
1993
1997
  "data-testid": "chat-message-toolbar-actions",
1994
1998
  role: "group",
@@ -1998,7 +2002,7 @@ function ma({ children: e, className: t, ...n }) {
1998
2002
  });
1999
2003
  }
2000
2004
  var ha = a(function({ children: e, className: t, tooltip: n, ...r }, i) {
2001
- let a = /* @__PURE__ */ z(D, {
2005
+ let a = /* @__PURE__ */ R(D, {
2002
2006
  ref: i,
2003
2007
  variant: "tertiary",
2004
2008
  isSemantic: !1,
@@ -2008,14 +2012,14 @@ var ha = a(function({ children: e, className: t, tooltip: n, ...r }, i) {
2008
2012
  ...r,
2009
2013
  children: e
2010
2014
  });
2011
- return n ? /* @__PURE__ */ z(ge, {
2015
+ return n ? /* @__PURE__ */ R(_e, {
2012
2016
  tooltip: n,
2013
2017
  children: a
2014
2018
  }) : a;
2015
2019
  });
2016
2020
  ha.displayName = "ChatMessageToolbarActionButton";
2017
2021
  function ga({ className: e, children: t, ...n }) {
2018
- return /* @__PURE__ */ z("div", {
2022
+ return /* @__PURE__ */ R("div", {
2019
2023
  "data-slot": "chat-message-toolbar-timestamp",
2020
2024
  className: L("text-action-active", e),
2021
2025
  ...n,
@@ -2057,9 +2061,9 @@ function Ta({ children: e, variant: t = "default", className: n, overlayClassNam
2057
2061
  f,
2058
2062
  m
2059
2063
  ]);
2060
- return /* @__PURE__ */ z(Ca.Provider, {
2064
+ return /* @__PURE__ */ R(Ca.Provider, {
2061
2065
  value: g,
2062
- children: /* @__PURE__ */ B("div", {
2066
+ children: /* @__PURE__ */ z("div", {
2063
2067
  role: "alert",
2064
2068
  "data-slot": "chat-notification-card",
2065
2069
  "data-testid": "chat-notification-card",
@@ -2068,7 +2072,7 @@ function Ta({ children: e, variant: t = "default", className: n, overlayClassNam
2068
2072
  "aria-expanded": d,
2069
2073
  className: L("group/chat-notification-card", "relative", "p-[12px]", "rounded-[12px] overflow-hidden", "bg-paper-elevation-2", "flex flex-col gap-8", "bg-paper-elevation-2", "data-[variant=floating]:border data-[variant=floating]:border-component-divider", n),
2070
2074
  onClick: s,
2071
- children: [e, /* @__PURE__ */ z("div", {
2075
+ children: [e, /* @__PURE__ */ R("div", {
2072
2076
  "data-slot": "chat-notification-card-overlay",
2073
2077
  className: L("absolute inset-0 pointer-events-none bg-secondary-states-hover opacity-0 group-hover/chat-notification-card:opacity-100 transition-opacity duration-200 ease-in-out", r)
2074
2078
  })]
@@ -2076,7 +2080,7 @@ function Ta({ children: e, variant: t = "default", className: n, overlayClassNam
2076
2080
  });
2077
2081
  }
2078
2082
  function Ea({ children: e, className: t }) {
2079
- return /* @__PURE__ */ z("header", {
2083
+ return /* @__PURE__ */ R("header", {
2080
2084
  "data-slot": "chat-notification-card-head",
2081
2085
  "data-testid": "chat-notification-card-head",
2082
2086
  className: L("grid grid-cols-[minmax(0,1fr)_auto] items-center gap-8", "min-h-[32px]", t),
@@ -2084,7 +2088,7 @@ function Ea({ children: e, className: t }) {
2084
2088
  });
2085
2089
  }
2086
2090
  function Da({ children: e, className: t }) {
2087
- return /* @__PURE__ */ z("div", {
2091
+ return /* @__PURE__ */ R("div", {
2088
2092
  "data-slot": "chat-notification-card-header",
2089
2093
  "data-testid": "chat-notification-card-header",
2090
2094
  className: L("min-w-0 flex items-center gap-8 overflow-hidden", "text-layout-feedback-info-background-default", t),
@@ -2092,7 +2096,7 @@ function Da({ children: e, className: t }) {
2092
2096
  });
2093
2097
  }
2094
2098
  function Oa({ children: e, className: t }) {
2095
- return /* @__PURE__ */ z("div", {
2099
+ return /* @__PURE__ */ R("div", {
2096
2100
  "data-slot": "chat-notification-card-header-icon",
2097
2101
  "data-testid": "chat-notification-card-header-icon",
2098
2102
  className: L("shrink-0", "inline-flex items-center justify-center", "pointer-events-none", "[&_svg]:size-[20px]!", t),
@@ -2100,7 +2104,7 @@ function Oa({ children: e, className: t }) {
2100
2104
  });
2101
2105
  }
2102
2106
  function ka({ children: e, className: t }) {
2103
- return /* @__PURE__ */ z("div", {
2107
+ return /* @__PURE__ */ R("div", {
2104
2108
  "data-slot": "chat-notification-card-header-title",
2105
2109
  "data-testid": "chat-notification-card-header-title",
2106
2110
  className: L("min-w-0 flex flex-1 items-center gap-8 overflow-hidden", t),
@@ -2108,14 +2112,14 @@ function ka({ children: e, className: t }) {
2108
2112
  });
2109
2113
  }
2110
2114
  function Aa({ children: e, className: t }) {
2111
- return /* @__PURE__ */ z(I, {
2115
+ return /* @__PURE__ */ R(I, {
2112
2116
  variant: "body-sm",
2113
2117
  fontWeight: "semibold",
2114
2118
  "data-slot": "chat-notification-card-header-title-label",
2115
2119
  "data-testid": "chat-notification-card-header-title-label",
2116
2120
  className: L("min-w-0 truncate", "text-left text-inherit uppercase", t),
2117
2121
  asChild: !0,
2118
- children: /* @__PURE__ */ z("span", { children: e })
2122
+ children: /* @__PURE__ */ R("span", { children: e })
2119
2123
  });
2120
2124
  }
2121
2125
  var ja = {
@@ -2125,7 +2129,7 @@ var ja = {
2125
2129
  };
2126
2130
  function Ma({ children: e, priority: t = "medium", className: n, ...r }) {
2127
2131
  let i = ja[t];
2128
- return t === "low" ? null : /* @__PURE__ */ z(_, {
2132
+ return t === "low" ? null : /* @__PURE__ */ R(_, {
2129
2133
  "data-slot": "chat-notification-card-header-status",
2130
2134
  "data-testid": "chat-notification-card-header-status",
2131
2135
  "data-priority": t,
@@ -2138,7 +2142,7 @@ function Ma({ children: e, priority: t = "medium", className: n, ...r }) {
2138
2142
  });
2139
2143
  }
2140
2144
  function Na({ children: e, className: t }) {
2141
- return /* @__PURE__ */ z("div", {
2145
+ return /* @__PURE__ */ R("div", {
2142
2146
  "data-slot": "chat-notification-card-actions",
2143
2147
  "data-testid": "chat-notification-card-actions",
2144
2148
  role: "group",
@@ -2147,13 +2151,13 @@ function Na({ children: e, className: t }) {
2147
2151
  });
2148
2152
  }
2149
2153
  function Pa({ children: e, className: t }) {
2150
- return /* @__PURE__ */ z(I, {
2154
+ return /* @__PURE__ */ R(I, {
2151
2155
  variant: "caption",
2152
2156
  "data-slot": "chat-notification-card-timestamp",
2153
2157
  "data-testid": "chat-notification-card-timestamp",
2154
2158
  className: L("text-text-secondary", "inline-flex px-8", "leading-[32px]", t),
2155
2159
  asChild: !0,
2156
- children: /* @__PURE__ */ z("span", { children: e })
2160
+ children: /* @__PURE__ */ R("span", { children: e })
2157
2161
  });
2158
2162
  }
2159
2163
  function Fa({ children: e, className: t }) {
@@ -2163,7 +2167,7 @@ function Fa({ children: e, className: t }) {
2163
2167
  function r(e) {
2164
2168
  e.stopPropagation();
2165
2169
  }
2166
- return /* @__PURE__ */ z("div", {
2170
+ return /* @__PURE__ */ R("div", {
2167
2171
  "data-slot": "chat-notification-card-buttons",
2168
2172
  "data-testid": "chat-notification-card-buttons",
2169
2173
  role: "group",
@@ -2177,7 +2181,7 @@ var Ia = a(function({ className: e, isRead: t = !1, onRead: n, ...r }, i) {
2177
2181
  function a() {
2178
2182
  n?.(!t);
2179
2183
  }
2180
- return /* @__PURE__ */ z(D, {
2184
+ return /* @__PURE__ */ R(D, {
2181
2185
  ref: i,
2182
2186
  "data-slot": "chat-notification-card-read-action-button",
2183
2187
  "data-read": t,
@@ -2187,7 +2191,7 @@ var Ia = a(function({ className: e, isRead: t = !1, onRead: n, ...r }, i) {
2187
2191
  className: e,
2188
2192
  onClick: a,
2189
2193
  ...r,
2190
- children: z(t ? Ge : We, {})
2194
+ children: R(t ? Wt : Ut, {})
2191
2195
  });
2192
2196
  });
2193
2197
  Ia.displayName = "ChatNotificationCardReadActionButton";
@@ -2205,12 +2209,12 @@ var La = a(function({ className: e, labelClassName: t, cancelLabelClassName: n,
2205
2209
  function b() {
2206
2210
  m(!1), o?.();
2207
2211
  }
2208
- return _ ? /* @__PURE__ */ B(g, {
2212
+ return _ ? /* @__PURE__ */ z(g, {
2209
2213
  ref: f,
2210
2214
  "data-slot": "chat-notification-card-snooze-button",
2211
2215
  "data-snoozed": "true",
2212
2216
  "data-hover": p,
2213
- startIcon: z(p ? we : Ke, {}),
2217
+ startIcon: R(p ? Ct : Gt, {}),
2214
2218
  variant: "tertiary",
2215
2219
  size: "md",
2216
2220
  onMouseEnter: v,
@@ -2218,16 +2222,16 @@ var La = a(function({ className: e, labelClassName: t, cancelLabelClassName: n,
2218
2222
  onClick: b,
2219
2223
  className: L("group/snooze-button", "text-chip-outlined-warning-text h-[32px]!", e),
2220
2224
  ...d,
2221
- children: [/* @__PURE__ */ z("span", {
2225
+ children: [/* @__PURE__ */ R("span", {
2222
2226
  "data-slot": "chat-notification-card-snooze-button-label",
2223
2227
  className: L("group-data-[hover=true]/snooze-button:opacity-0", "transition-opacity duration-200 ease-in-out", t),
2224
2228
  children: a(r)
2225
- }), /* @__PURE__ */ z("span", {
2229
+ }), /* @__PURE__ */ R("span", {
2226
2230
  "data-slot": "chat-notification-card-snooze-button-cancel-label",
2227
2231
  className: L("absolute left-0 w-full text-center pl-[16px]", "transition-opacity duration-200 ease-in-out", "opacity-0", "group-data-[hover=true]/snooze-button:opacity-100", n),
2228
2232
  children: i
2229
2233
  })]
2230
- }) : /* @__PURE__ */ z(D, {
2234
+ }) : /* @__PURE__ */ R(D, {
2231
2235
  ref: f,
2232
2236
  "data-slot": "chat-notification-card-snooze-button",
2233
2237
  "data-snoozed": "false",
@@ -2237,12 +2241,12 @@ var La = a(function({ className: e, labelClassName: t, cancelLabelClassName: n,
2237
2241
  className: L("group/snooze-button", e),
2238
2242
  onClick: s,
2239
2243
  ...d,
2240
- children: /* @__PURE__ */ z(Ke, {})
2244
+ children: /* @__PURE__ */ R(Gt, {})
2241
2245
  });
2242
2246
  });
2243
2247
  La.displayName = "ChatNotificationCardSnoozeButton";
2244
2248
  var Ra = a(function({ className: e, ...t }, n) {
2245
- return /* @__PURE__ */ z(D, {
2249
+ return /* @__PURE__ */ R(D, {
2246
2250
  ref: n,
2247
2251
  "data-slot": "chat-notification-card-delete-button",
2248
2252
  "aria-label": "Delete notification",
@@ -2250,12 +2254,12 @@ var Ra = a(function({ className: e, ...t }, n) {
2250
2254
  variant: "tertiary",
2251
2255
  className: e,
2252
2256
  ...t,
2253
- children: /* @__PURE__ */ z(Ee, {})
2257
+ children: /* @__PURE__ */ R(Tt, {})
2254
2258
  });
2255
2259
  });
2256
2260
  Ra.displayName = "ChatNotificationCardDeleteButton";
2257
2261
  var za = a(function({ className: e, ...t }, n) {
2258
- return /* @__PURE__ */ z(D, {
2262
+ return /* @__PURE__ */ R(D, {
2259
2263
  ref: n,
2260
2264
  "data-slot": "chat-notification-card-close-button",
2261
2265
  "aria-label": "Close notification",
@@ -2263,41 +2267,41 @@ var za = a(function({ className: e, ...t }, n) {
2263
2267
  variant: "tertiary",
2264
2268
  className: e,
2265
2269
  ...t,
2266
- children: /* @__PURE__ */ z(we, {})
2270
+ children: /* @__PURE__ */ R(Ct, {})
2267
2271
  });
2268
2272
  });
2269
2273
  za.displayName = "ChatNotificationCardCloseButton";
2270
2274
  function Ba({ children: e, className: t }) {
2271
- return /* @__PURE__ */ B("div", {
2275
+ return /* @__PURE__ */ z("div", {
2272
2276
  "data-slot": "chat-notification-card-content",
2273
2277
  "data-testid": "chat-notification-card-content",
2274
2278
  className: L("flex flex-col items-start text-left gap-4", "relative pr-[40px]", t),
2275
- children: [e, /* @__PURE__ */ z(Wa, {})]
2279
+ children: [e, /* @__PURE__ */ R(Wa, {})]
2276
2280
  });
2277
2281
  }
2278
2282
  function Va({ children: e, className: t }) {
2279
- return /* @__PURE__ */ z(I, {
2283
+ return /* @__PURE__ */ R(I, {
2280
2284
  variant: "body-sm",
2281
2285
  fontWeight: "semibold",
2282
2286
  "data-slot": "chat-notification-card-content-title",
2283
2287
  "data-testid": "chat-notification-card-content-title",
2284
2288
  className: L("text-text-primary", "text-left", t),
2285
2289
  asChild: !0,
2286
- children: /* @__PURE__ */ z("span", { children: e })
2290
+ children: /* @__PURE__ */ R("span", { children: e })
2287
2291
  });
2288
2292
  }
2289
2293
  function Ha({ children: e, className: t }) {
2290
- return /* @__PURE__ */ z(I, {
2294
+ return /* @__PURE__ */ R(I, {
2291
2295
  variant: "body-sm",
2292
2296
  "data-slot": "chat-notification-card-content-description",
2293
2297
  "data-testid": "chat-notification-card-content-description",
2294
2298
  className: L("text-text-primary", "mt-8", "group-data-[expanded=false]/chat-notification-card:line-clamp-2", "w-full [&>div>*]:wrap-break-word", t),
2295
2299
  asChild: !0,
2296
- children: /* @__PURE__ */ z("div", { children: e })
2300
+ children: /* @__PURE__ */ R("div", { children: e })
2297
2301
  });
2298
2302
  }
2299
2303
  function Ua({ children: e, className: t }) {
2300
- return /* @__PURE__ */ z("div", {
2304
+ return /* @__PURE__ */ R("div", {
2301
2305
  "data-slot": "chat-notification-card-content-actions",
2302
2306
  "data-testid": "chat-notification-card-content-actions",
2303
2307
  role: "group",
@@ -2313,7 +2317,7 @@ var Wa = a(function({ className: e, onMouseDown: t, onClick: n, ...r }, i) {
2313
2317
  function c(e) {
2314
2318
  e.stopPropagation(), o(), n?.(e);
2315
2319
  }
2316
- return /* @__PURE__ */ z(D, {
2320
+ return /* @__PURE__ */ R(D, {
2317
2321
  ref: i,
2318
2322
  "data-slot": "chat-notification-card-expand-button",
2319
2323
  "data-testid": "chat-notification-card-expand-button",
@@ -2324,7 +2328,7 @@ var Wa = a(function({ className: e, onMouseDown: t, onClick: n, ...r }, i) {
2324
2328
  onMouseDown: s,
2325
2329
  onClick: c,
2326
2330
  ...r,
2327
- children: z(a ? Ce : Se, {})
2331
+ children: R(a ? St : xt, {})
2328
2332
  });
2329
2333
  });
2330
2334
  Wa.displayName = "ChatNotificationCardExpandButton";
@@ -2332,13 +2336,13 @@ var Ga = Oa, Ka = Ha, qa = Pa;
2332
2336
  //#endregion
2333
2337
  //#region src/components/chat-notification-popup/chat-notification-popup.tsx
2334
2338
  function Ja({ children: e, ...t }) {
2335
- return /* @__PURE__ */ z(ue, {
2339
+ return /* @__PURE__ */ R(de, {
2336
2340
  ...t,
2337
2341
  children: e
2338
2342
  });
2339
2343
  }
2340
2344
  var Ya = a(function({ children: e, ...t }, n) {
2341
- return /* @__PURE__ */ z(fe, {
2345
+ return /* @__PURE__ */ R(pe, {
2342
2346
  ref: n,
2343
2347
  "data-slot": "chat-notification-popup-trigger",
2344
2348
  ...t,
@@ -2347,7 +2351,7 @@ var Ya = a(function({ children: e, ...t }, n) {
2347
2351
  });
2348
2352
  Ya.displayName = "ChatNotificationPopupTrigger";
2349
2353
  var Xa = a(function({ children: e, className: t, ...n }, r) {
2350
- return /* @__PURE__ */ z(de, {
2354
+ return /* @__PURE__ */ R(fe, {
2351
2355
  ref: r,
2352
2356
  "data-slot": "chat-notification-popup-content",
2353
2357
  className: L("md:w-[467px]", t),
@@ -2359,7 +2363,7 @@ Xa.displayName = "ChatNotificationPopupContent";
2359
2363
  //#endregion
2360
2364
  //#region src/components/chat-reply/chat-reply.tsx
2361
2365
  function Za({ className: e, children: t, hasPadding: n = !0 }) {
2362
- return /* @__PURE__ */ z("ul", {
2366
+ return /* @__PURE__ */ R("ul", {
2363
2367
  "data-testid": "chat-replies",
2364
2368
  "data-slot": "chat-replies",
2365
2369
  "data-padding": n,
@@ -2368,7 +2372,7 @@ function Za({ className: e, children: t, hasPadding: n = !0 }) {
2368
2372
  });
2369
2373
  }
2370
2374
  function Qa({ className: e, children: t, isMultiline: n = !1, ...r }) {
2371
- return /* @__PURE__ */ z("li", {
2375
+ return /* @__PURE__ */ R("li", {
2372
2376
  "data-testid": "chat-reply",
2373
2377
  "data-slot": "chat-reply",
2374
2378
  "data-multiline": n,
@@ -2378,7 +2382,7 @@ function Qa({ className: e, children: t, isMultiline: n = !1, ...r }) {
2378
2382
  });
2379
2383
  }
2380
2384
  function $a({ className: e, children: t, ...n }) {
2381
- return /* @__PURE__ */ z(_, {
2385
+ return /* @__PURE__ */ R(_, {
2382
2386
  variant: "outlined",
2383
2387
  size: "sm",
2384
2388
  color: "secondary",
@@ -2390,14 +2394,14 @@ function $a({ className: e, children: t, ...n }) {
2390
2394
  });
2391
2395
  }
2392
2396
  function eo({ className: e, children: t, asChild: n = !1, ...r }) {
2393
- return /* @__PURE__ */ z(I, {
2397
+ return /* @__PURE__ */ R(I, {
2394
2398
  "data-testid": "chat-reply-value",
2395
2399
  "data-slot": "chat-reply-value",
2396
2400
  variant: "body-sm",
2397
2401
  className: L("leading-[24px]", "flex flex-1 min-w-0 text-text-secondary", "items-start", "group-data-[multiline=false]/chat-reply:flex-1 truncate", "group-data-[multiline=true]/chat-reply:flex-wrap", "group-data-[multiline=true]/chat-reply:gap-4", e),
2398
2402
  asChild: !0,
2399
2403
  ...r,
2400
- children: /* @__PURE__ */ z("div", { children: t })
2404
+ children: /* @__PURE__ */ R("div", { children: t })
2401
2405
  });
2402
2406
  }
2403
2407
  //#endregion
@@ -2409,12 +2413,12 @@ function no() {
2409
2413
  return e;
2410
2414
  }
2411
2415
  var ro = a(function({ children: e, className: t, hasLoop: i = !0, ...a }, s) {
2412
- return /* @__PURE__ */ z(ee, {
2416
+ return /* @__PURE__ */ R(te, {
2413
2417
  asChild: !0,
2414
2418
  hasLoop: i,
2415
2419
  ref: s,
2416
2420
  ...a,
2417
- children: /* @__PURE__ */ z("ol", {
2421
+ children: /* @__PURE__ */ R("ol", {
2418
2422
  "data-slot": "chat-suggestions",
2419
2423
  "data-testid": "chat-suggestions",
2420
2424
  className: L("m-0 p-0 list-none flex flex-col items-stretch gap-0", t),
@@ -2428,51 +2432,51 @@ var io = a(function({ index: e, children: t, className: n, triggerClassName: r,
2428
2432
  function l(e) {
2429
2433
  a?.(e), i?.();
2430
2434
  }
2431
- return /* @__PURE__ */ z(to.Provider, {
2435
+ return /* @__PURE__ */ R(to.Provider, {
2432
2436
  value: c,
2433
- children: /* @__PURE__ */ B(te, {
2437
+ children: /* @__PURE__ */ z(O, {
2434
2438
  ref: s,
2435
2439
  "data-slot": "chat-suggestion",
2436
- className: _e(L("relative items-start gap-0 p-4 text-typography-text-secondary", n), { highlighted: "bg-layout-accent-low-background-hover-default" }),
2440
+ className: ve(L("relative items-start gap-0 p-4 text-typography-text-secondary", n), { highlighted: "bg-layout-accent-low-background-hover-default" }),
2437
2441
  ...o,
2438
2442
  onMouseEnter: l,
2439
- children: [/* @__PURE__ */ z(A, { className: L("absolute inset-0 rounded-[inherit] outline-none", r) }), t]
2443
+ children: [/* @__PURE__ */ R(j, { className: L("absolute inset-0 rounded-[inherit] outline-none", r) }), t]
2440
2444
  })
2441
2445
  });
2442
2446
  });
2443
2447
  io.displayName = "ChatSuggestion";
2444
2448
  function ao({ children: e, className: t, innerClassName: n }) {
2445
2449
  let { index: r = 0 } = no();
2446
- return /* @__PURE__ */ z("span", {
2450
+ return /* @__PURE__ */ R("span", {
2447
2451
  "aria-hidden": "true",
2448
2452
  "data-slot": "chat-suggestion-label-icon",
2449
2453
  className: L("inline-flex flex-row justify-center items-center shrink-0 size-auto text-inherit", t),
2450
- children: /* @__PURE__ */ z("span", {
2454
+ children: /* @__PURE__ */ R("span", {
2451
2455
  "aria-hidden": "true",
2452
2456
  "data-slot": "chat-suggestion-label-icon-inner",
2453
2457
  className: L("size-[32px]", "inline-flex items-center justify-center", "px-8 py-[7px]", "[&_svg]:size-[18px]!", n),
2454
- children: e || /* @__PURE__ */ z(ie, { children: /* @__PURE__ */ z(I, {
2458
+ children: e || /* @__PURE__ */ R(N, { children: /* @__PURE__ */ R(I, {
2455
2459
  variant: "caption-md",
2456
2460
  fontWeight: "semibold",
2457
2461
  className: "text-inherit",
2458
2462
  asChild: !0,
2459
- children: /* @__PURE__ */ z("span", { children: r + 1 })
2463
+ children: /* @__PURE__ */ R("span", { children: r + 1 })
2460
2464
  }) })
2461
2465
  })
2462
2466
  });
2463
2467
  }
2464
2468
  function oo({ children: e, className: t, isMultiline: n = !0 }) {
2465
- return /* @__PURE__ */ z(I, {
2469
+ return /* @__PURE__ */ R(I, {
2466
2470
  variant: "body-small-low",
2467
2471
  "data-slot": "chat-suggestion-label",
2468
2472
  "data-multiline": n,
2469
2473
  className: L("gap-0 px-4 my-[7px]", "h-full min-w-0 flex-1 items-center justify-center text-left text-inherit", "data-[multiline=false]:truncate", "data-[multiline=true]:line-clamp-3", t),
2470
2474
  asChild: !0,
2471
- children: /* @__PURE__ */ z(k, { children: e })
2475
+ children: /* @__PURE__ */ R(A, { children: e })
2472
2476
  });
2473
2477
  }
2474
2478
  function so({ children: e, className: t }) {
2475
- return /* @__PURE__ */ z("div", {
2479
+ return /* @__PURE__ */ R("div", {
2476
2480
  role: "group",
2477
2481
  "data-slot": "chat-suggestion-actions",
2478
2482
  className: L("shrink-0 flex items-center justify-center gap-8", "self-start", "min-w-[32px] h-[32px]", "pointer-events-none", "*:text-secondary-main", "[&>svg]:size-[18px]!", "opacity-0", "group-data-highlighted/list-item:opacity-100", t),
@@ -2480,7 +2484,7 @@ function so({ children: e, className: t }) {
2480
2484
  });
2481
2485
  }
2482
2486
  var co = a(function({ className: e, children: t, ...n }, r) {
2483
- return /* @__PURE__ */ z(O, {
2487
+ return /* @__PURE__ */ R(k, {
2484
2488
  ref: r,
2485
2489
  className: L("pointer-events-auto", e),
2486
2490
  ...n,
@@ -2497,7 +2501,7 @@ function lo(e, t) {
2497
2501
  }));
2498
2502
  return n.displayName = t, n;
2499
2503
  }
2500
- var uo = lo(q.Viewport, "ChatThreadViewportPrimitive"), fo = lo(q.Content, "ChatThreadContentPrimitive"), po = lo(q.Item, "ChatThreadItemPrimitive");
2504
+ var uo = lo(K.Viewport, "ChatThreadViewportPrimitive"), fo = lo(K.Content, "ChatThreadContentPrimitive"), po = lo(K.Item, "ChatThreadItemPrimitive");
2501
2505
  function mo(e, t) {
2502
2506
  typeof e == "function" ? e(t) : e && (e.current = t);
2503
2507
  }
@@ -2510,7 +2514,7 @@ function yo() {
2510
2514
  return l(vo) ?? _o;
2511
2515
  }
2512
2516
  function bo({ children: e }) {
2513
- let { scrollToEnd: t, scrollToMessage: n, scrollToStart: r } = Zt(), i = p(() => ({
2517
+ let { scrollToEnd: t, scrollToMessage: n, scrollToStart: r } = $t(), i = p(() => ({
2514
2518
  scrollToEnd: t,
2515
2519
  scrollToMessage: n,
2516
2520
  scrollToStart: r
@@ -2519,7 +2523,7 @@ function bo({ children: e }) {
2519
2523
  n,
2520
2524
  r
2521
2525
  ]);
2522
- return /* @__PURE__ */ z(vo.Provider, {
2526
+ return /* @__PURE__ */ R(vo.Provider, {
2523
2527
  value: i,
2524
2528
  children: e
2525
2529
  });
@@ -2551,23 +2555,23 @@ function wo({ children: e, conversationId: t, groupIds: n, isStreaming: r = !1,
2551
2555
  i,
2552
2556
  f
2553
2557
  ]);
2554
- return /* @__PURE__ */ z(q.Provider, {
2558
+ return /* @__PURE__ */ R(K.Provider, {
2555
2559
  autoScroll: a,
2556
2560
  scrollPreviousItemPeek: s,
2557
2561
  scrollMargin: c,
2558
2562
  defaultScrollPosition: o,
2559
2563
  ...l,
2560
- children: /* @__PURE__ */ B(xo.Provider, {
2564
+ children: /* @__PURE__ */ z(xo.Provider, {
2561
2565
  value: m,
2562
- children: [i === "follow" && /* @__PURE__ */ z(To, {
2566
+ children: [i === "follow" && /* @__PURE__ */ R(To, {
2563
2567
  groupIds: n,
2564
2568
  knownGroupIds: f
2565
- }), /* @__PURE__ */ z(bo, { children: e })]
2569
+ }), /* @__PURE__ */ R(bo, { children: e })]
2566
2570
  })
2567
2571
  }, u.id);
2568
2572
  }
2569
2573
  function To({ groupIds: e, knownGroupIds: t }) {
2570
- let { scrollToEnd: n } = Zt(), r = e.at(-1);
2574
+ let { scrollToEnd: n } = $t(), r = e.at(-1);
2571
2575
  return f(() => {
2572
2576
  r === void 0 || t === null || t.has(r) || n({ behavior: "auto" });
2573
2577
  }, [
@@ -2582,7 +2586,7 @@ var Eo = a(function({ children: e, className: t, viewportClassName: n, contentCl
2582
2586
  }, [i, g]), w = c((e) => {
2583
2587
  S.current = e, mo(a, e);
2584
2588
  }, [a]);
2585
- return Do(x, S, v, b), /* @__PURE__ */ B(q.Root, {
2589
+ return Do(x, S, v, b), /* @__PURE__ */ z(K.Root, {
2586
2590
  "data-slot": "chat-thread",
2587
2591
  "data-testid": "chat-thread",
2588
2592
  "data-scroll-mode": y,
@@ -2592,7 +2596,7 @@ var Eo = a(function({ children: e, className: t, viewportClassName: n, contentCl
2592
2596
  className: L("relative flex flex-col flex-1 min-h-0 overflow-hidden", t),
2593
2597
  ...h,
2594
2598
  children: [
2595
- /* @__PURE__ */ z(uo, {
2599
+ /* @__PURE__ */ R(uo, {
2596
2600
  ref: C,
2597
2601
  "data-slot": "chat-thread-viewport",
2598
2602
  "aria-label": "Chat message history",
@@ -2602,7 +2606,7 @@ var Eo = a(function({ children: e, className: t, viewportClassName: n, contentCl
2602
2606
  scrollbarWidth: "thin",
2603
2607
  scrollbarColor: "var(--color-scrollbar-thumb) transparent"
2604
2608
  },
2605
- children: /* @__PURE__ */ z(fo, {
2609
+ children: /* @__PURE__ */ R(fo, {
2606
2610
  ref: w,
2607
2611
  "data-slot": "chat-thread-content",
2608
2612
  "aria-busy": _,
@@ -2611,11 +2615,11 @@ var Eo = a(function({ children: e, className: t, viewportClassName: n, contentCl
2611
2615
  children: e
2612
2616
  })
2613
2617
  }),
2614
- d && !u && /* @__PURE__ */ z(Mo, {
2618
+ d && !u && /* @__PURE__ */ R(Mo, {
2615
2619
  error: f,
2616
2620
  children: p?.(f)
2617
2621
  }),
2618
- o && /* @__PURE__ */ z(jo, {
2622
+ o && /* @__PURE__ */ R(jo, {
2619
2623
  className: s,
2620
2624
  tooltip: l
2621
2625
  })
@@ -2647,7 +2651,7 @@ function Do(e, t, n, r) {
2647
2651
  }
2648
2652
  var Oo = a(function({ groupId: e, className: t, children: n, ...r }, i) {
2649
2653
  let { knownGroupIds: a, scrollMode: o } = So("ChatThreadGroup"), s = o === "anchor" && a !== null && !a.has(e);
2650
- return /* @__PURE__ */ z(po, {
2654
+ return /* @__PURE__ */ R(po, {
2651
2655
  ref: i,
2652
2656
  messageId: `chat-thread-group-${e}`,
2653
2657
  scrollAnchor: s,
@@ -2660,7 +2664,7 @@ var Oo = a(function({ groupId: e, className: t, children: n, ...r }, i) {
2660
2664
  });
2661
2665
  Oo.displayName = "ChatThreadGroup";
2662
2666
  var ko = a(function({ messageId: e, children: t, ...n }, r) {
2663
- return /* @__PURE__ */ z("div", {
2667
+ return /* @__PURE__ */ R("div", {
2664
2668
  ref: r,
2665
2669
  "data-slot": "chat-thread-question",
2666
2670
  "data-chat-thread-question": "",
@@ -2671,7 +2675,7 @@ var ko = a(function({ messageId: e, children: t, ...n }, r) {
2671
2675
  });
2672
2676
  ko.displayName = "ChatThreadQuestion";
2673
2677
  var Ao = a(function({ messageId: e, children: t, ...n }, r) {
2674
- return /* @__PURE__ */ z("div", {
2678
+ return /* @__PURE__ */ R("div", {
2675
2679
  ref: r,
2676
2680
  "data-slot": "chat-thread-answer",
2677
2681
  "data-chat-thread-answer": "",
@@ -2682,19 +2686,19 @@ var Ao = a(function({ messageId: e, children: t, ...n }, r) {
2682
2686
  });
2683
2687
  Ao.displayName = "ChatThreadAnswer";
2684
2688
  function jo({ className: e, tooltip: t }) {
2685
- let { end: n } = Qt();
2686
- return /* @__PURE__ */ z("div", {
2689
+ let { end: n } = en();
2690
+ return /* @__PURE__ */ R("div", {
2687
2691
  "data-slot": "chat-thread-scroll-button",
2688
2692
  "data-testid": "chat-message-history-scroll-button",
2689
2693
  "data-hidden": !n,
2690
2694
  "aria-hidden": !n || void 0,
2691
2695
  className: L("absolute", "px-[12px]", "bottom-0", "right-0 -translate-x-[12px]", "md:right-auto md:left-1/2 md:-translate-x-1/2", "-translate-y-[12px]", "flex items-center justify-center", "transition-opacity duration-200 ease-in-out", "data-[hidden=true]:pointer-events-none", "data-[hidden=true]:opacity-0 data-[hidden=false]:opacity-100", e),
2692
- children: /* @__PURE__ */ z(q.Button, {
2696
+ children: /* @__PURE__ */ R(K.Button, {
2693
2697
  direction: "end",
2694
- render: ({ inert: e, children: n, ...r }) => /* @__PURE__ */ z(ge, {
2698
+ render: ({ inert: e, children: n, ...r }) => /* @__PURE__ */ R(_e, {
2695
2699
  tooltip: t,
2696
2700
  side: "top",
2697
- children: /* @__PURE__ */ z(D, {
2701
+ children: /* @__PURE__ */ R(D, {
2698
2702
  ...r,
2699
2703
  inert: e ? "" : void 0,
2700
2704
  className: "bg-paper-elevation-2",
@@ -2702,21 +2706,21 @@ function jo({ className: e, tooltip: t }) {
2702
2706
  size: "md",
2703
2707
  tabIndex: -1,
2704
2708
  "aria-label": t,
2705
- children: /* @__PURE__ */ z(Se, {})
2709
+ children: /* @__PURE__ */ R(xt, {})
2706
2710
  })
2707
2711
  })
2708
2712
  })
2709
2713
  });
2710
2714
  }
2711
2715
  function Mo({ children: e, error: t, className: n }) {
2712
- return /* @__PURE__ */ z("div", {
2716
+ return /* @__PURE__ */ R("div", {
2713
2717
  "data-slot": "chat-thread-error-state",
2714
2718
  "data-testid": "chat-message-history-error-state",
2715
2719
  role: "alert",
2716
2720
  "aria-live": "assertive",
2717
2721
  "aria-label": "Error loading messages",
2718
2722
  className: L("absolute inset-0 flex items-center justify-center", n),
2719
- children: e || /* @__PURE__ */ z("div", {
2723
+ children: e || /* @__PURE__ */ R("div", {
2720
2724
  className: "text-text-error-main",
2721
2725
  children: t instanceof Error ? t.message : t || "An error occurred"
2722
2726
  })
@@ -2725,9 +2729,9 @@ function Mo({ children: e, error: t, className: n }) {
2725
2729
  //#endregion
2726
2730
  //#region src/components/canvas-shell/canvas-shell.tsx
2727
2731
  function No({ className: e, children: t, ...n }) {
2728
- return /* @__PURE__ */ z(F, {
2732
+ return /* @__PURE__ */ R(le, {
2729
2733
  isCollapsible: !1,
2730
- children: /* @__PURE__ */ z(M, {
2734
+ children: /* @__PURE__ */ R(ie, {
2731
2735
  "data-slot": "canvas-shell",
2732
2736
  className: e,
2733
2737
  ...n,
@@ -2736,7 +2740,7 @@ function No({ className: e, children: t, ...n }) {
2736
2740
  });
2737
2741
  }
2738
2742
  function Po({ className: e, children: t, hasBorder: n = !0, ...r }) {
2739
- return /* @__PURE__ */ z(ce, {
2743
+ return /* @__PURE__ */ R(F, {
2740
2744
  "data-slot": "canvas-shell-header",
2741
2745
  hasBorder: n,
2742
2746
  className: e,
@@ -2745,7 +2749,7 @@ function Po({ className: e, children: t, hasBorder: n = !0, ...r }) {
2745
2749
  });
2746
2750
  }
2747
2751
  function Fo({ className: e, children: t, ...n }) {
2748
- return /* @__PURE__ */ z(le, {
2752
+ return /* @__PURE__ */ R(ue, {
2749
2753
  "data-slot": "canvas-shell-title",
2750
2754
  className: e,
2751
2755
  ...n,
@@ -2753,7 +2757,7 @@ function Fo({ className: e, children: t, ...n }) {
2753
2757
  });
2754
2758
  }
2755
2759
  function Io({ className: e, children: t, ...n }) {
2756
- return /* @__PURE__ */ z(P, {
2760
+ return /* @__PURE__ */ R(ae, {
2757
2761
  "data-slot": "canvas-shell-close-trigger",
2758
2762
  className: e,
2759
2763
  ...n,
@@ -2761,13 +2765,13 @@ function Io({ className: e, children: t, ...n }) {
2761
2765
  });
2762
2766
  }
2763
2767
  function Lo({ className: e, children: t, isFullScreen: n, labels: r, ...i }) {
2764
- return /* @__PURE__ */ z(N, {
2768
+ return /* @__PURE__ */ R(P, {
2765
2769
  "data-slot": "canvas-shell-full-screen-trigger",
2766
2770
  "aria-pressed": n,
2767
2771
  "aria-label": n ? r?.exit ?? "Exit full screen" : r?.enter ?? "Full screen",
2768
2772
  className: L("max-md:hidden", e),
2769
2773
  ...i,
2770
- children: t || /* @__PURE__ */ z(Ve, {})
2774
+ children: t || /* @__PURE__ */ R(Bt, {})
2771
2775
  });
2772
2776
  }
2773
2777
  function Ro({ className: e, children: t, menuClassName: n, onOpenChange: r, ...i }) {
@@ -2775,33 +2779,33 @@ function Ro({ className: e, children: t, menuClassName: n, onOpenChange: r, ...i
2775
2779
  function s(e) {
2776
2780
  o(e), r?.(e);
2777
2781
  }
2778
- return /* @__PURE__ */ B(re, {
2782
+ return /* @__PURE__ */ z(M, {
2779
2783
  modal: !1,
2780
2784
  onOpenChange: s,
2781
- children: [/* @__PURE__ */ z(j, {
2785
+ children: [/* @__PURE__ */ R(re, {
2782
2786
  asChild: !0,
2783
- children: /* @__PURE__ */ z(N, {
2787
+ children: /* @__PURE__ */ R(P, {
2784
2788
  "data-slot": "canvas-shell-options-button",
2785
2789
  isActive: a,
2786
2790
  "aria-label": "More options",
2787
2791
  className: e,
2788
2792
  ...i,
2789
- children: /* @__PURE__ */ z(Be, {})
2793
+ children: /* @__PURE__ */ R(zt, {})
2790
2794
  })
2791
- }), /* @__PURE__ */ z(ne, {
2795
+ }), /* @__PURE__ */ R(ne, {
2792
2796
  className: L("w-[200px]", n),
2793
2797
  children: t
2794
2798
  })]
2795
2799
  });
2796
2800
  }
2797
- var zo = ve;
2801
+ var zo = ye;
2798
2802
  function Bo({ className: e, children: t, bodyClassName: n, hasPadding: r = !0, hasScroll: i = !0, ...a }) {
2799
- return /* @__PURE__ */ z(oe, {
2803
+ return /* @__PURE__ */ R(se, {
2800
2804
  "data-slot": "canvas-shell-content",
2801
2805
  "data-has-scroll": i,
2802
2806
  className: e,
2803
2807
  ...a,
2804
- children: /* @__PURE__ */ z(ae, {
2808
+ children: /* @__PURE__ */ R(oe, {
2805
2809
  "data-slot": "canvas-shell-content-body",
2806
2810
  hasPadding: r,
2807
2811
  hasScroll: i,
@@ -2811,7 +2815,7 @@ function Bo({ className: e, children: t, bodyClassName: n, hasPadding: r = !0, h
2811
2815
  });
2812
2816
  }
2813
2817
  function Vo({ className: e, children: t, ...n }) {
2814
- return /* @__PURE__ */ z(se, {
2818
+ return /* @__PURE__ */ R(ce, {
2815
2819
  "data-slot": "canvas-shell-footer",
2816
2820
  className: e,
2817
2821
  ...n,
@@ -2821,11 +2825,11 @@ function Vo({ className: e, children: t, ...n }) {
2821
2825
  //#endregion
2822
2826
  //#region src/components/new-chat-trigger/new-chat-trigger.tsx
2823
2827
  var Ho = a(({ asChild: t = !1, children: n, onClick: r, ...i }, a) => {
2824
- let { goToNewChat: o } = Y(), s = t ? e : "button";
2828
+ let { goToNewChat: o } = X(), s = t ? e : "button";
2825
2829
  function c(e) {
2826
2830
  r?.(e), o();
2827
2831
  }
2828
- return /* @__PURE__ */ z(s, {
2832
+ return /* @__PURE__ */ R(s, {
2829
2833
  ref: a,
2830
2834
  "data-testid": "new-chat-trigger",
2831
2835
  onClick: c,
@@ -2837,11 +2841,11 @@ Ho.displayName = "NewChatTrigger";
2837
2841
  //#endregion
2838
2842
  //#region src/components/chat-thinking-process/chat-thinking-process.tsx
2839
2843
  var Uo = a(function({ children: e, className: t, defaultOpen: n = !1, isStreaming: r = !1, ...i }, a) {
2840
- return /* @__PURE__ */ z(v, {
2844
+ return /* @__PURE__ */ R(v, {
2841
2845
  defaultOpen: n,
2842
2846
  asChild: !0,
2843
2847
  ...i,
2844
- children: /* @__PURE__ */ z("div", {
2848
+ children: /* @__PURE__ */ R("div", {
2845
2849
  ref: a,
2846
2850
  "data-slot": "chat-thinking-process",
2847
2851
  "data-testid": "chat-thinking-process",
@@ -2853,16 +2857,16 @@ var Uo = a(function({ children: e, className: t, defaultOpen: n = !1, isStreamin
2853
2857
  });
2854
2858
  Uo.displayName = "ChatThinkingProcess";
2855
2859
  function Wo({ children: e, className: t, ...n }) {
2856
- return /* @__PURE__ */ B(b, {
2860
+ return /* @__PURE__ */ z(x, {
2857
2861
  "data-slot": "chat-thinking-process-trigger",
2858
2862
  "data-testid": "chat-thinking-process-trigger",
2859
2863
  className: L("flex w-full items-center gap-4", "cursor-pointer text-left", t),
2860
2864
  ...n,
2861
- children: [e, /* @__PURE__ */ z("style", { children: "\n @keyframes shimmer {\n 100% {\n mask-position: left;\n }\n }\n " })]
2865
+ children: [e, /* @__PURE__ */ R("style", { children: "\n @keyframes shimmer {\n 100% {\n mask-position: left;\n }\n }\n " })]
2862
2866
  });
2863
2867
  }
2864
2868
  function Go({ children: e, className: t, ...n }) {
2865
- return /* @__PURE__ */ z("span", {
2869
+ return /* @__PURE__ */ R("span", {
2866
2870
  "data-slot": "chat-thinking-process-trigger-icon",
2867
2871
  "data-testid": "chat-thinking-process-trigger-icon",
2868
2872
  className: L("inline-flex shrink-0 items-center justify-center", t),
@@ -2871,26 +2875,24 @@ function Go({ children: e, className: t, ...n }) {
2871
2875
  });
2872
2876
  }
2873
2877
  function Ko({ children: e, className: t, ...n }) {
2874
- return /* @__PURE__ */ z(I, {
2878
+ return /* @__PURE__ */ R(I, {
2875
2879
  asChild: !0,
2876
2880
  variant: "body-sm",
2877
2881
  "data-slot": "chat-thinking-process-trigger-label",
2878
2882
  "data-testid": "chat-thinking-process-trigger-label",
2879
2883
  className: L("text-text-secondary", "font-semibold", "group-data-[streaming=true]/thinking-process:mask-[linear-gradient(-60deg,#000_30%,rgba(0,0,0,0.2),#192029_70%)]", "group-data-[streaming=true]/thinking-process:mask-size-[300%_100%]", "group-data-[streaming=true]/thinking-process:mask-right", "group-data-[streaming=true]/thinking-process:animate-[shimmer_3.2s_infinite]", t),
2880
- children: /* @__PURE__ */ z("span", {
2884
+ children: /* @__PURE__ */ R("span", {
2881
2885
  ...n,
2882
2886
  children: e
2883
2887
  })
2884
2888
  });
2885
2889
  }
2886
2890
  function qo({ className: e, ...t }) {
2887
- return /* @__PURE__ */ z("span", {
2891
+ return /* @__PURE__ */ R(y, {
2888
2892
  "data-slot": "chat-thinking-process-trigger-arrow",
2889
2893
  "data-testid": "chat-thinking-process-trigger-arrow",
2890
- "aria-hidden": !0,
2891
- className: L("inline-flex shrink-0 items-center justify-center text-text-secondary", "transition-transform duration-300", "group-data-[state=open]/collapsible:rotate-180", e),
2892
- ...t,
2893
- children: /* @__PURE__ */ z(Se, {})
2894
+ className: L("items-center justify-center text-text-secondary", e),
2895
+ ...t
2894
2896
  });
2895
2897
  }
2896
2898
  function Jo({ children: e, className: n, itemsClassName: r, rowClassName: i, markerClassName: a, connectorClassName: o, previewClassName: s, hasLastMessagePreview: c = !0, ...l }) {
@@ -2901,37 +2903,37 @@ function Jo({ children: e, className: n, itemsClassName: r, rowClassName: i, mar
2901
2903
  lastItemIndex: String(n.length)
2902
2904
  };
2903
2905
  }, [e]);
2904
- return /* @__PURE__ */ B("div", {
2906
+ return /* @__PURE__ */ z("div", {
2905
2907
  "data-slot": "chat-thinking-process-content",
2906
2908
  "data-testid": "chat-thinking-process-content",
2907
2909
  "data-preview": c,
2908
2910
  className: L("pt-8", n),
2909
- children: [c && u && /* @__PURE__ */ z($t, {
2911
+ children: [c && u && /* @__PURE__ */ R(tn, {
2910
2912
  mode: "wait",
2911
- children: /* @__PURE__ */ z(Yo, {
2913
+ children: /* @__PURE__ */ R(Yo, {
2912
2914
  contentId: d,
2913
2915
  className: s,
2914
2916
  children: u
2915
2917
  })
2916
- }), /* @__PURE__ */ z(y, {
2918
+ }), /* @__PURE__ */ R(b, {
2917
2919
  "data-slot": "chat-thinking-process-content-items",
2918
2920
  "data-testid": "chat-thinking-process-content-items",
2919
2921
  className: L("flex flex-col", r),
2920
2922
  ...l,
2921
- children: t.Children.map(e, (e) => /* @__PURE__ */ B("div", {
2923
+ children: t.Children.map(e, (e) => /* @__PURE__ */ z("div", {
2922
2924
  "data-slot": "chat-thinking-process-content-row",
2923
2925
  className: L("relative flex gap-8 text-text-secondary text-sm last:pb-0", "pl-8", "last:[&>div:first-child>span:last-child]:hidden", i),
2924
- children: [/* @__PURE__ */ B("div", {
2926
+ children: [/* @__PURE__ */ z("div", {
2925
2927
  className: "relative flex w-8 shrink-0 flex-col items-center self-stretch",
2926
2928
  "aria-hidden": !0,
2927
- children: [/* @__PURE__ */ z("span", {
2929
+ children: [/* @__PURE__ */ R("span", {
2928
2930
  "data-slot": "chat-thinking-process-content-marker",
2929
2931
  className: L("mt-[7px] size-[6px] shrink-0 rounded-full bg-text-secondary", a)
2930
- }), /* @__PURE__ */ z("span", {
2932
+ }), /* @__PURE__ */ R("span", {
2931
2933
  "data-slot": "chat-thinking-process-content-connector",
2932
2934
  className: L("absolute top-[16px] bottom-[-4px] left-1/2 w-px -translate-x-1/2 bg-component-divider", o)
2933
2935
  })]
2934
- }), /* @__PURE__ */ z("div", {
2936
+ }), /* @__PURE__ */ R("div", {
2935
2937
  className: "min-w-0 flex-1 pb-8",
2936
2938
  children: e
2937
2939
  })]
@@ -2940,7 +2942,7 @@ function Jo({ children: e, className: n, itemsClassName: r, rowClassName: i, mar
2940
2942
  });
2941
2943
  }
2942
2944
  function Yo({ children: e, className: t, contentId: n }) {
2943
- return /* @__PURE__ */ z(en.div, {
2945
+ return /* @__PURE__ */ R(nn.div, {
2944
2946
  "data-slot": "chat-thinking-process-content-preview",
2945
2947
  "data-testid": "chat-thinking-process-content-preview",
2946
2948
  initial: { opacity: 0 },
@@ -2955,7 +2957,7 @@ function Yo({ children: e, className: t, contentId: n }) {
2955
2957
  }, n);
2956
2958
  }
2957
2959
  function Xo({ children: e, className: t, ...n }) {
2958
- return /* @__PURE__ */ z("div", {
2960
+ return /* @__PURE__ */ R("div", {
2959
2961
  "data-slot": "chat-thinking-process-content-item",
2960
2962
  "data-testid": "chat-thinking-process-content-item",
2961
2963
  className: L("text-text-secondary text-sm", t),
@@ -2965,14 +2967,14 @@ function Xo({ children: e, className: t, ...n }) {
2965
2967
  }
2966
2968
  //#endregion
2967
2969
  //#region src/components/deprecated-empty-state.ts
2968
- var Zo = S, Qo = T, $o = E, es = w, ts = C, ns = {
2970
+ var Zo = C, Qo = E, $o = ee, es = T, ts = w, ns = {
2969
2971
  paragraph: "editor-paragraph",
2970
2972
  text: {
2971
2973
  bold: "editor-text-bold",
2972
2974
  italic: "editor-text-italic",
2973
2975
  underline: "editor-text-underline"
2974
2976
  }
2975
- }, rs = class e extends Ot {
2977
+ }, rs = class e extends rt {
2976
2978
  __src;
2977
2979
  __altText;
2978
2980
  static getType() {
@@ -2992,7 +2994,7 @@ var Zo = S, Qo = T, $o = E, es = w, ts = C, ns = {
2992
2994
  return !1;
2993
2995
  }
2994
2996
  decorate() {
2995
- return /* @__PURE__ */ z("img", {
2997
+ return /* @__PURE__ */ R("img", {
2996
2998
  src: this.__src,
2997
2999
  alt: this.__altText,
2998
3000
  style: {
@@ -3054,7 +3056,7 @@ var ss = {
3054
3056
  importRegExp: /./,
3055
3057
  dependencies: [],
3056
3058
  export: (e) => {
3057
- if (!K(e)) return null;
3059
+ if (!G(e)) return null;
3058
3060
  let t = e.getStyle() ?? "", n = e.getTextContent(), r = os(t);
3059
3061
  if (r.fontSize || r.fontFamily || r.color) {
3060
3062
  let e = "";
@@ -3069,7 +3071,7 @@ var ss = {
3069
3071
  importRegExp: /<span\s+style="([^"]+)">(.+?)<\/span>/,
3070
3072
  dependencies: [],
3071
3073
  replace: (e, t) => {
3072
- let [, n, r] = t, i = _t(r);
3074
+ let [, n, r] = t, i = Ke(r);
3073
3075
  return i.setFormat(e.getFormat()), i.setStyle(n), e.replace(i), i;
3074
3076
  }
3075
3077
  }, ls = {
@@ -3079,10 +3081,10 @@ var ss = {
3079
3081
  importRegExp: /<ins>(.*?)<\/ins>/,
3080
3082
  dependencies: [],
3081
3083
  replace: (e, t) => {
3082
- let n = _t(t[1]);
3084
+ let n = Ke(t[1]);
3083
3085
  return n.setFormat(e.getFormat()), n.hasFormat("underline") || n.toggleFormat("underline"), e.replace(n), n;
3084
3086
  },
3085
- export: (e) => !K(e) || !e.hasFormat("underline") ? null : `<ins>${e.getTextContent()}</ins>`
3087
+ export: (e) => !G(e) || !e.hasFormat("underline") ? null : `<ins>${e.getTextContent()}</ins>`
3086
3088
  }, us = (e) => {
3087
3089
  let t = /text-align:\s*(\w+)/i.exec(e);
3088
3090
  return t ? t[1].trim() : null;
@@ -3095,10 +3097,10 @@ var ss = {
3095
3097
  if (!r) return !1;
3096
3098
  if (!n[2]) return;
3097
3099
  let i = t[0];
3098
- K(i) && i.setTextContent(n[2]), e.setFormat(r), e.append(...t);
3100
+ G(i) && i.setTextContent(n[2]), e.setFormat(r), e.append(...t);
3099
3101
  },
3100
3102
  export: (e, t) => {
3101
- if (!xt(e)) return null;
3103
+ if (!Xe(e)) return null;
3102
3104
  let n = e.getFormatType();
3103
3105
  return !n || n === "left" ? null : `<div style="text-align: ${n}">${t(e)}</div>`;
3104
3106
  }
@@ -3120,13 +3122,13 @@ var ss = {
3120
3122
  e.replace(i);
3121
3123
  }
3122
3124
  }, ms = [
3123
- ...mt,
3125
+ ...Ue,
3124
3126
  ss,
3125
3127
  ls,
3126
3128
  ds,
3127
3129
  fs
3128
3130
  ], hs = [
3129
- ...mt,
3131
+ ...Ue,
3130
3132
  cs,
3131
3133
  ls,
3132
3134
  ds,
@@ -3134,52 +3136,52 @@ var ss = {
3134
3136
  ];
3135
3137
  //#endregion
3136
3138
  //#region src/components/rich-text-area/html-config.ts
3137
- function X(e) {
3139
+ function gs(e) {
3138
3140
  let t = e.nodeName.toLowerCase();
3139
3141
  if (t !== "h1" && t !== "h2" && t !== "h3" && t !== "h4" && t !== "h5" && t !== "h6") return null;
3140
- let n = st(t), r = e.getAttribute("style") ?? "";
3142
+ let n = Ie(t), r = e.getAttribute("style") ?? "";
3141
3143
  if (n.setStyle(r), e.style) {
3142
3144
  let t = e.style.textAlign;
3143
- (t === "left" || t === "right" || t === "center" || t === "justify" || t === "start" || t === "end") && n.setFormat(t), zt(e, n);
3145
+ (t === "left" || t === "right" || t === "center" || t === "justify" || t === "start" || t === "end") && n.setFormat(t), mt(e, n);
3144
3146
  }
3145
3147
  return { node: n };
3146
3148
  }
3147
- function gs(e) {
3149
+ function _s(e) {
3148
3150
  if (e.getAttribute("__lexicallisttype") === "check" || e.classList.contains("contains-task-list")) return !0;
3149
- for (let t of e.childNodes) if (Rt(t) && t.hasAttribute("aria-checked")) return !0;
3151
+ for (let t of e.childNodes) if (pt(t) && t.hasAttribute("aria-checked")) return !0;
3150
3152
  return !1;
3151
3153
  }
3152
- function _s(e) {
3154
+ function vs(e) {
3153
3155
  let t = e.nodeName.toLowerCase(), n = null;
3154
3156
  if (t === "ol") {
3155
3157
  let t = e.start;
3156
- n = $e("number", t);
3157
- } else t === "ul" && (n = gs(e) ? $e("check") : $e("bullet"));
3158
+ n = Oe("number", t);
3159
+ } else t === "ul" && (n = _s(e) ? Oe("check") : Oe("bullet"));
3158
3160
  if (!n) return null;
3159
3161
  let r = e.getAttribute("style") ?? "";
3160
3162
  return n.setStyle(r), { node: n };
3161
3163
  }
3162
- function vs(e) {
3164
+ function ys(e) {
3163
3165
  if (e.classList.contains("task-list-item")) {
3164
3166
  for (let t of e.children) if (t.tagName === "INPUT") {
3165
3167
  let n = t;
3166
3168
  if (n.getAttribute("type") === "checkbox") {
3167
- let t = n.hasAttribute("checked"), r = Qe(t), i = e.getAttribute("style") ?? "";
3169
+ let t = n.hasAttribute("checked"), r = De(t), i = e.getAttribute("style") ?? "";
3168
3170
  return r.setStyle(i), { node: r };
3169
3171
  }
3170
3172
  }
3171
3173
  }
3172
- let t = e.getAttribute("aria-checked"), n = Qe(t === "true" || t !== "false" && void 0), r = e.getAttribute("style") ?? "";
3174
+ let t = e.getAttribute("aria-checked"), n = De(t === "true" || t !== "false" && void 0), r = e.getAttribute("style") ?? "";
3173
3175
  return n.setStyle(r), { node: n };
3174
3176
  }
3175
3177
  var Z = 4;
3176
- function ys(e) {
3178
+ function bs(e) {
3177
3179
  let { color: t, fontSize: n, fontFamily: r } = os(e.getAttribute("style") ?? "");
3178
3180
  if (!t && !n && !r) return null;
3179
3181
  let i = e.style;
3180
3182
  return {
3181
3183
  forChild: (e) => {
3182
- if (!K(e)) return e;
3184
+ if (!G(e)) return e;
3183
3185
  let a = i.fontWeight, o = (i.textDecoration || "").split(" ");
3184
3186
  (a === "700" || a === "bold") && !e.hasFormat("bold") && e.toggleFormat("bold"), o.includes("line-through") && !e.hasFormat("strikethrough") && e.toggleFormat("strikethrough"), i.fontStyle === "italic" && !e.hasFormat("italic") && e.toggleFormat("italic"), o.includes("underline") && !e.hasFormat("underline") && e.toggleFormat("underline"), i.verticalAlign === "sub" && !e.hasFormat("subscript") && e.toggleFormat("subscript"), i.verticalAlign === "super" && !e.hasFormat("superscript") && e.toggleFormat("superscript");
3185
3187
  let s = "";
@@ -3188,59 +3190,59 @@ function ys(e) {
3188
3190
  node: null
3189
3191
  };
3190
3192
  }
3191
- var bs = {
3193
+ var xs = {
3192
3194
  h1: () => ({
3193
- conversion: X,
3195
+ conversion: gs,
3194
3196
  priority: Z
3195
3197
  }),
3196
3198
  h2: () => ({
3197
- conversion: X,
3199
+ conversion: gs,
3198
3200
  priority: Z
3199
3201
  }),
3200
3202
  h3: () => ({
3201
- conversion: X,
3203
+ conversion: gs,
3202
3204
  priority: Z
3203
3205
  }),
3204
3206
  h4: () => ({
3205
- conversion: X,
3207
+ conversion: gs,
3206
3208
  priority: Z
3207
3209
  }),
3208
3210
  h5: () => ({
3209
- conversion: X,
3211
+ conversion: gs,
3210
3212
  priority: Z
3211
3213
  }),
3212
3214
  h6: () => ({
3213
- conversion: X,
3215
+ conversion: gs,
3214
3216
  priority: Z
3215
3217
  }),
3216
3218
  ul: () => ({
3217
- conversion: _s,
3219
+ conversion: vs,
3218
3220
  priority: Z
3219
3221
  }),
3220
3222
  ol: () => ({
3221
- conversion: _s,
3223
+ conversion: vs,
3222
3224
  priority: Z
3223
3225
  }),
3224
3226
  li: () => ({
3225
- conversion: vs,
3227
+ conversion: ys,
3226
3228
  priority: Z
3227
3229
  }),
3228
3230
  span: () => ({
3229
- conversion: ys,
3231
+ conversion: bs,
3230
3232
  priority: Z
3231
3233
  })
3232
3234
  };
3233
- function xs(e) {
3235
+ function Ss(e) {
3234
3236
  return (t, n) => {
3235
3237
  let r = e.prototype.exportDOM.call(n, t), i = n.getStyle();
3236
3238
  return r.element && i && r.element.setAttribute("style", i), r;
3237
3239
  };
3238
3240
  }
3239
- var Ss = /* @__PURE__ */ new Map([
3240
- [ct, xs(ct)],
3241
- [tt, xs(tt)],
3242
- [et, xs(et)]
3243
- ]), Cs = class e extends kt {
3241
+ var Cs = /* @__PURE__ */ new Map([
3242
+ [Le, Ss(Le)],
3243
+ [Ae, Ss(Ae)],
3244
+ [ke, Ss(ke)]
3245
+ ]), ws = class e extends it {
3244
3246
  static getType() {
3245
3247
  return "div-block";
3246
3248
  }
@@ -3257,7 +3259,7 @@ var Ss = /* @__PURE__ */ new Map([
3257
3259
  }
3258
3260
  static importDOM() {
3259
3261
  return { div: () => ({
3260
- conversion: ws,
3262
+ conversion: Ts,
3261
3263
  priority: 4
3262
3264
  }) };
3263
3265
  }
@@ -3269,7 +3271,7 @@ var Ss = /* @__PURE__ */ new Map([
3269
3271
  } : e;
3270
3272
  }
3271
3273
  static importJSON(e) {
3272
- let t = Ts().updateFromJSON(e);
3274
+ let t = Es().updateFromJSON(e);
3273
3275
  return e.style !== void 0 && t.setStyle(e.style), t;
3274
3276
  }
3275
3277
  updateFromJSON(e) {
@@ -3278,36 +3280,36 @@ var Ss = /* @__PURE__ */ new Map([
3278
3280
  }
3279
3281
  collapseAtStart(e) {
3280
3282
  let t = this.getChildren();
3281
- if (t.length === 0 || K(t[0]) && t[0].getTextContent().trim() === "") {
3283
+ if (t.length === 0 || G(t[0]) && t[0].getTextContent().trim() === "") {
3282
3284
  if (this.getNextSibling() !== null) return this.selectNext(), this.remove(), !0;
3283
3285
  if (this.getPreviousSibling() !== null) return this.selectPrevious(), this.remove(), !0;
3284
3286
  } else {
3285
- let e = ht();
3287
+ let e = We();
3286
3288
  return e.setFormat(this.getFormatType()), e.setStyle(this.getStyle()), e.setIndent(this.getIndent()), e.setDirection(this.getDirection()), t.forEach((t) => e.append(t)), this.replace(e), !0;
3287
3289
  }
3288
3290
  return !1;
3289
3291
  }
3290
3292
  };
3291
- function ws(e) {
3292
- let t = Ts(), n = e.getAttribute("style") ?? "";
3293
+ function Ts(e) {
3294
+ let t = Es(), n = e.getAttribute("style") ?? "";
3293
3295
  if (t.setStyle(n), e.style) {
3294
3296
  let n = e.style.textAlign;
3295
- (n === "left" || n === "right" || n === "center" || n === "justify" || n === "start" || n === "end") && t.setFormat(n), zt(e, t);
3297
+ (n === "left" || n === "right" || n === "center" || n === "justify" || n === "start" || n === "end") && t.setFormat(n), mt(e, t);
3296
3298
  }
3297
3299
  return { node: t };
3298
3300
  }
3299
- function Ts() {
3300
- return new Cs();
3301
+ function Es() {
3302
+ return new ws();
3301
3303
  }
3302
3304
  //#endregion
3303
3305
  //#region src/components/rich-text-area/plugins/value-plugin.tsx
3304
- var Es = 50;
3305
- function Ds({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3306
+ var Ds = 50;
3307
+ function Os({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3306
3308
  let r = c((r, i, a) => {
3307
3309
  if (!a.has("focus") && e) try {
3308
3310
  r.read(() => {
3309
- let r = t === "html" ? on(i) : ft(ms);
3310
- n && (n.current.push(r), n.current.splice(0, n.current.length - Es)), e(r);
3311
+ let r = t === "html" ? cn(i) : Ve(ms);
3312
+ n && (n.current.push(r), n.current.splice(0, n.current.length - Ds)), e(r);
3311
3313
  });
3312
3314
  } catch {}
3313
3315
  }, [
@@ -3315,26 +3317,26 @@ function Ds({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3315
3317
  t,
3316
3318
  n
3317
3319
  ]);
3318
- return /* @__PURE__ */ z(Bt, { onChange: r });
3320
+ return /* @__PURE__ */ R(ht, { onChange: r });
3319
3321
  }
3320
3322
  //#endregion
3321
3323
  //#region src/components/rich-text-area/hooks.ts
3322
3324
  function Q() {
3323
- let [e] = ut();
3325
+ let [e] = ze();
3324
3326
  return e;
3325
3327
  }
3326
- function Os() {
3327
- let [e] = ut();
3328
+ function ks() {
3329
+ let [e] = ze();
3328
3330
  return c(() => {
3329
3331
  let t = "";
3330
3332
  return e.getEditorState().read(() => {
3331
- t = W()?.getTextContent() ?? "";
3333
+ t = U()?.getTextContent() ?? "";
3332
3334
  }), t;
3333
3335
  }, [e]);
3334
3336
  }
3335
3337
  //#endregion
3336
3338
  //#region src/components/rich-text-area/plugins/disabled-plugin.tsx
3337
- function ks({ isDisabled: e }) {
3339
+ function As({ isDisabled: e }) {
3338
3340
  let t = Q();
3339
3341
  return u(() => {
3340
3342
  t.setEditable(!e);
@@ -3342,60 +3344,60 @@ function ks({ isDisabled: e }) {
3342
3344
  }
3343
3345
  //#endregion
3344
3346
  //#region src/components/rich-text-area/plugins/controlled-plugin.tsx
3345
- function As({ controlledRef: e }) {
3347
+ function js({ controlledRef: e }) {
3346
3348
  let t = m(null);
3347
3349
  return d(e, () => ({ focus: () => {
3348
3350
  Promise.resolve().then(() => {
3349
3351
  t.current?.focus();
3350
3352
  });
3351
- } }), []), /* @__PURE__ */ z(cn, { editorRef: t });
3353
+ } }), []), /* @__PURE__ */ R(un, { editorRef: t });
3352
3354
  }
3353
3355
  //#endregion
3354
3356
  //#region src/components/rich-text-area/utils/index.ts
3355
- function js(e) {
3357
+ function Ms(e) {
3356
3358
  let t = e.getRootElement();
3357
3359
  t && (t.scrollTop = t.scrollHeight);
3358
3360
  }
3359
- function Ms() {
3360
- let e = U().getLastDescendant();
3361
- if (e && K(e)) {
3362
- let t = gt(), n = e.getTextContentSize();
3363
- t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Ct(t);
3361
+ function Ns() {
3362
+ let e = H().getLastDescendant();
3363
+ if (e && G(e)) {
3364
+ let t = Ge(), n = e.getTextContentSize();
3365
+ t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Qe(t);
3364
3366
  } else {
3365
- St();
3366
- let e = W();
3367
- if (G(e)) {
3368
- let t = e.focus.getNode(), n = K(t) ? t.getTextContentSize() : 0;
3369
- e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Ct(e);
3367
+ Ze();
3368
+ let e = U();
3369
+ if (W(e)) {
3370
+ let t = e.focus.getNode(), n = G(t) ? t.getTextContentSize() : 0;
3371
+ e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Qe(e);
3370
3372
  }
3371
3373
  }
3372
3374
  }
3373
- function Ns(e, t) {
3375
+ function Ps(e, t) {
3374
3376
  let n = new DOMParser().parseFromString(t, "text/html");
3375
- return sn(e, n).map((e) => {
3376
- if (K(e)) {
3377
- let t = ht();
3377
+ return ln(e, n).map((e) => {
3378
+ if (G(e)) {
3379
+ let t = We();
3378
3380
  return t.append(e), t;
3379
3381
  }
3380
3382
  return e;
3381
3383
  });
3382
3384
  }
3383
- function Ps(e, t) {
3384
- let n = U();
3385
- n.clear(), Ns(e, t).forEach((e) => n.append(e));
3386
- }
3387
3385
  function Fs(e, t) {
3388
- let n = W(), r = Ns(e, t);
3389
- if (G(n)) n.insertNodes(r);
3386
+ let n = H();
3387
+ n.clear(), Ps(e, t).forEach((e) => n.append(e));
3388
+ }
3389
+ function Is(e, t) {
3390
+ let n = U(), r = Ps(e, t);
3391
+ if (W(n)) n.insertNodes(r);
3390
3392
  else {
3391
- let e = U();
3393
+ let e = H();
3392
3394
  e.clear(), r.forEach((t) => e.append(t));
3393
3395
  }
3394
3396
  }
3395
3397
  //#endregion
3396
3398
  //#region src/components/rich-text-area/plugins/controlled-value-plugin.tsx
3397
- function Is({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3398
- let r = Q(), i = m(), a = m(!!e?.trim()), o = ye("desktop");
3399
+ function Ls({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3400
+ let r = Q(), i = m(), a = m(!!e?.trim()), o = be("desktop");
3399
3401
  return u(() => {
3400
3402
  if (!r || e === i.current) return;
3401
3403
  if (i.current = e, n && e !== void 0) {
@@ -3404,20 +3406,20 @@ function Is({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3404
3406
  }
3405
3407
  let s = "";
3406
3408
  if (r.getEditorState().read(() => {
3407
- s = t === "html" ? on(r) : ft(ms);
3409
+ s = t === "html" ? cn(r) : Ve(ms);
3408
3410
  }), e !== void 0 && e !== s) {
3409
3411
  if (e === "") {
3410
3412
  r.update(() => {
3411
- H(Pt), t === "html" ? U().clear() : dt("", hs), Ms();
3413
+ V(lt), t === "html" ? H().clear() : Be("", hs), Ns();
3412
3414
  }, { discrete: !0 }), Promise.resolve().then(() => {
3413
3415
  o ? r.focus() : r.blur();
3414
3416
  });
3415
3417
  return;
3416
3418
  }
3417
3419
  r.update(() => {
3418
- H(Pt), t === "html" ? Ps(r, e) : dt(e, hs), Ms();
3420
+ V(lt), t === "html" ? Fs(r, e) : Be(e, hs), Ns();
3419
3421
  }), a.current && (a.current = !1, Promise.resolve().then(() => {
3420
- requestAnimationFrame(() => js(r));
3422
+ requestAnimationFrame(() => Ms(r));
3421
3423
  })), o && Promise.resolve().then(() => {
3422
3424
  r.focus();
3423
3425
  });
@@ -3432,7 +3434,7 @@ function Is({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3432
3434
  }
3433
3435
  //#endregion
3434
3436
  //#region src/components/rich-text-area/plugins/blur-plugin.tsx
3435
- function Ls({ onBlur: e }) {
3437
+ function Rs({ onBlur: e }) {
3436
3438
  let t = Q();
3437
3439
  return u(() => {
3438
3440
  if (!e) return;
@@ -3448,7 +3450,7 @@ function Ls({ onBlur: e }) {
3448
3450
  }
3449
3451
  //#endregion
3450
3452
  //#region src/components/rich-text-area/plugins/focus-plugin.tsx
3451
- function Rs({ onFocusChange: e }) {
3453
+ function zs({ onFocusChange: e }) {
3452
3454
  let t = Q();
3453
3455
  return u(() => {
3454
3456
  if (!e) return;
@@ -3467,91 +3469,91 @@ function Rs({ onFocusChange: e }) {
3467
3469
  }
3468
3470
  //#endregion
3469
3471
  //#region src/components/rich-text-area/plugins/image-drop-plugin.tsx
3470
- var zs = It("INSERT_IMAGE_COMMAND"), Bs = "helvetiq:insert-image", Vs = class extends CustomEvent {
3472
+ var Bs = dt("INSERT_IMAGE_COMMAND"), Vs = "helvetiq:insert-image", Hs = class extends CustomEvent {
3471
3473
  constructor(e) {
3472
- super(Bs, { detail: e });
3474
+ super(Vs, { detail: e });
3473
3475
  }
3474
3476
  };
3475
- function Hs() {
3477
+ function Us() {
3476
3478
  let e = Q();
3477
- return u(() => e.registerCommand(zs, (t) => (e.update(() => {
3479
+ return u(() => e.registerCommand(Bs, (t) => (e.update(() => {
3478
3480
  let e = is(t.src, t.altText);
3479
- yt([e]);
3480
- }), !0), Et), [e]), u(() => {
3481
+ Je([e]);
3482
+ }), !0), tt), [e]), u(() => {
3481
3483
  if (!e.getRootElement()) return;
3482
3484
  function t(t) {
3483
3485
  let n = t;
3484
- e.dispatchCommand(zs, n.detail);
3486
+ e.dispatchCommand(Bs, n.detail);
3485
3487
  }
3486
- return document.addEventListener(Bs, t), () => {
3487
- document.removeEventListener(Bs, t);
3488
+ return document.addEventListener(Vs, t), () => {
3489
+ document.removeEventListener(Vs, t);
3488
3490
  };
3489
3491
  }, [e]), null;
3490
3492
  }
3491
3493
  //#endregion
3492
3494
  //#region src/components/rich-text-area/plugins/html-paste-plugin.tsx
3493
- var Us = It("PASTE_HTML_COMMAND"), Ws = It("INSERT_HTML_COMMAND"), Gs = "helvetiq:paste-html", Ks = "helvetiq:insert-html", qs = class extends CustomEvent {
3495
+ var Ws = dt("PASTE_HTML_COMMAND"), Gs = dt("INSERT_HTML_COMMAND"), Ks = "helvetiq:paste-html", qs = "helvetiq:insert-html", Js = class extends CustomEvent {
3494
3496
  constructor(e) {
3495
- super(Gs, { detail: e });
3497
+ super(Ks, { detail: e });
3496
3498
  }
3497
- }, Js = class extends CustomEvent {
3499
+ }, Ys = class extends CustomEvent {
3498
3500
  constructor(e) {
3499
- super(Ks, { detail: e });
3501
+ super(qs, { detail: e });
3500
3502
  }
3501
3503
  };
3502
- function Ys() {
3504
+ function Xs() {
3503
3505
  let e = Q();
3504
- return u(() => e.registerCommand(Us, (t) => (e.update(() => {
3505
- let n = U();
3506
+ return u(() => e.registerCommand(Ws, (t) => (e.update(() => {
3507
+ let n = H();
3506
3508
  n.clear();
3507
- let r = new DOMParser().parseFromString(t.html, "text/html"), i = sn(e, r);
3509
+ let r = new DOMParser().parseFromString(t.html, "text/html"), i = ln(e, r);
3508
3510
  n.append(...i);
3509
- }), !0), Et), [e]), u(() => e.registerCommand(Ws, (t) => (e.update(() => {
3510
- let n = new DOMParser().parseFromString(t.html, "text/html"), r = sn(e, n);
3511
- yt(r);
3512
- }), !0), Et), [e]), u(() => {
3511
+ }), !0), tt), [e]), u(() => e.registerCommand(Gs, (t) => (e.update(() => {
3512
+ let n = new DOMParser().parseFromString(t.html, "text/html"), r = ln(e, n);
3513
+ Je(r);
3514
+ }), !0), tt), [e]), u(() => {
3513
3515
  if (!e.getRootElement()) return;
3514
3516
  function t(t) {
3515
3517
  let n = t;
3516
- e.dispatchCommand(Us, n.detail);
3518
+ e.dispatchCommand(Ws, n.detail);
3517
3519
  }
3518
3520
  function n(t) {
3519
3521
  let n = t;
3520
- e.dispatchCommand(Ws, n.detail);
3522
+ e.dispatchCommand(Gs, n.detail);
3521
3523
  }
3522
- return document.addEventListener(Gs, t), document.addEventListener(Ks, n), () => {
3523
- document.removeEventListener(Gs, t), document.removeEventListener(Ks, n);
3524
+ return document.addEventListener(Ks, t), document.addEventListener(qs, n), () => {
3525
+ document.removeEventListener(Ks, t), document.removeEventListener(qs, n);
3524
3526
  };
3525
3527
  }, [e]), null;
3526
3528
  }
3527
3529
  //#endregion
3528
3530
  //#region src/components/rich-text-area/plugins/markdown-plain-paste-plugin.tsx
3529
- function Xs() {
3531
+ function Zs() {
3530
3532
  let e = Q();
3531
- return u(() => e.registerCommand(Mt, (t) => {
3533
+ return u(() => e.registerCommand(st, (t) => {
3532
3534
  let { clipboardData: n } = t;
3533
3535
  if (!n) return !1;
3534
3536
  let r = n.getData("text/plain");
3535
3537
  return r ? (t.preventDefault(), e.update(() => {
3536
- let e = W();
3537
- if (G(e)) {
3538
+ let e = U();
3539
+ if (W(e)) {
3538
3540
  e.insertText(r);
3539
3541
  return;
3540
3542
  }
3541
- let t = U();
3543
+ let t = H();
3542
3544
  t.clear(), r.split(/\r?\n/).forEach((e) => {
3543
- let n = ht();
3544
- e.length > 0 && n.append(_t(e)), t.append(n);
3545
+ let n = We();
3546
+ e.length > 0 && n.append(Ke(e)), t.append(n);
3545
3547
  });
3546
3548
  }), !0) : !1;
3547
- }, Tt), [e]), null;
3549
+ }, et), [e]), null;
3548
3550
  }
3549
3551
  //#endregion
3550
3552
  //#region src/components/rich-text-area/plugins/file-attachment-plugin.tsx
3551
- var Zs = It("ATTACH_FILE_COMMAND");
3552
- function Qs({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3553
+ var Qs = dt("ATTACH_FILE_COMMAND");
3554
+ function $s({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3553
3555
  let r = Q(), i = m(null);
3554
- u(() => r.registerCommand(Zs, () => (i.current?.click(), !0), Et), [r]);
3556
+ u(() => r.registerCommand(Qs, () => (i.current?.click(), !0), tt), [r]);
3555
3557
  function a(e) {
3556
3558
  let r = Array.from(e.target.files ?? []);
3557
3559
  if (t) n?.(r);
@@ -3561,7 +3563,7 @@ function Qs({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3561
3563
  }
3562
3564
  e.target.value = "";
3563
3565
  }
3564
- return /* @__PURE__ */ z("input", {
3566
+ return /* @__PURE__ */ R("input", {
3565
3567
  ref: i,
3566
3568
  type: "file",
3567
3569
  multiple: t,
@@ -3573,45 +3575,45 @@ function Qs({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3573
3575
  }
3574
3576
  //#endregion
3575
3577
  //#region src/components/rich-text-area/styled.tsx
3576
- var $s = a(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ z("div", {
3578
+ var ec = a(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ R("div", {
3577
3579
  ref: r,
3578
3580
  className: L("w-full resize-none border-none outline-none bg-transparent font-[inherit] text-[inherit] flex items-center [&_.editor-paragraph]:m-0 [&_.editor-paragraph]:min-h-[26px] [&_.editor-text-bold]:font-bold [&_.editor-text-italic]:italic [&_.editor-text-underline]:underline", e),
3579
3581
  ...n,
3580
3582
  children: t
3581
3583
  }));
3582
- $s.displayName = "Wrapper";
3584
+ ec.displayName = "Wrapper";
3583
3585
  //#endregion
3584
3586
  //#region src/components/rich-text-area/rich-text-area.tsx
3585
- var ec = {
3587
+ var tc = {
3586
3588
  namespace: "helvetiq",
3587
3589
  theme: ns,
3588
3590
  editable: !0,
3589
3591
  nodes: [
3590
- tt,
3591
- et,
3592
- ct,
3593
- lt,
3594
- Je,
3595
- Xe,
3592
+ Ae,
3593
+ ke,
3594
+ Le,
3595
+ Re,
3596
+ Ce,
3597
+ Te,
3596
3598
  rs,
3597
- Cs,
3598
- rn,
3599
- nn,
3600
- an
3599
+ ws,
3600
+ on,
3601
+ an,
3602
+ sn
3601
3603
  ],
3602
3604
  html: {
3603
- import: bs,
3604
- export: Ss
3605
+ import: xs,
3606
+ export: Cs
3605
3607
  },
3606
3608
  onError: (e) => {
3607
3609
  console.error("Lexical error:", e);
3608
3610
  }
3609
3611
  };
3610
- function tc({ children: e, name: t, value: n, source: r = "markdown", className: i, containerClassName: a, placeholderClassName: o, placeholder: s = "", isDisabled: c = !1, onChange: l, onBlur: u, onKeyDown: d, onFocusChange: f, forwardedRef: p, ...h }) {
3612
+ function nc({ children: e, name: t, value: n, source: r = "markdown", className: i, containerClassName: a, placeholderClassName: o, placeholder: s = "", isDisabled: c = !1, onChange: l, onBlur: u, onKeyDown: d, onFocusChange: f, forwardedRef: p, ...h }) {
3611
3613
  let g = m([]);
3612
- return /* @__PURE__ */ z(nt, {
3613
- initialConfig: ec,
3614
- children: /* @__PURE__ */ B($s, {
3614
+ return /* @__PURE__ */ R(je, {
3615
+ initialConfig: tc,
3616
+ children: /* @__PURE__ */ z(ec, {
3615
3617
  "data-slot": "rich-text-area",
3616
3618
  "data-testid": "rich-text-area",
3617
3619
  "aria-disabled": c,
@@ -3619,17 +3621,17 @@ function tc({ children: e, name: t, value: n, source: r = "markdown", className:
3619
3621
  className: L("relative size-full overflow-hidden", "data-[disabled=true]:opacity-80", "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:select-none", a),
3620
3622
  ...h,
3621
3623
  children: [
3622
- /* @__PURE__ */ z(ot, {
3623
- contentEditable: /* @__PURE__ */ z(rt, {
3624
+ /* @__PURE__ */ R(Fe, {
3625
+ contentEditable: /* @__PURE__ */ R(Me, {
3624
3626
  "data-slot": "rich-text-area-editable",
3625
3627
  className: L("relative inset-0 overflow-y-auto", i),
3626
3628
  "data-name": t,
3627
3629
  "aria-placeholder": s,
3628
- placeholder: /* @__PURE__ */ z(I, {
3630
+ placeholder: /* @__PURE__ */ R(I, {
3629
3631
  variant: "body",
3630
3632
  className: L("absolute left-0 top-0", "text-text-tertiary", "pointer-events-none user-select-none", o),
3631
3633
  asChild: !0,
3632
- children: /* @__PURE__ */ z("p", {
3634
+ children: /* @__PURE__ */ R("p", {
3633
3635
  "data-slot": "rich-text-area-placeholder",
3634
3636
  children: s
3635
3637
  })
@@ -3640,38 +3642,38 @@ function tc({ children: e, name: t, value: n, source: r = "markdown", className:
3640
3642
  minHeight: "20px"
3641
3643
  }
3642
3644
  }),
3643
- ErrorBoundary: it
3645
+ ErrorBoundary: Ne
3644
3646
  }),
3645
- /* @__PURE__ */ z(ks, { isDisabled: c }),
3646
- /* @__PURE__ */ z(Is, {
3647
+ /* @__PURE__ */ R(As, { isDisabled: c }),
3648
+ /* @__PURE__ */ R(Ls, {
3647
3649
  value: n,
3648
3650
  source: r,
3649
3651
  emittedValuesRef: g
3650
3652
  }),
3651
- /* @__PURE__ */ z(Ds, {
3653
+ /* @__PURE__ */ R(Os, {
3652
3654
  onChange: l,
3653
3655
  source: r,
3654
3656
  emittedValuesRef: g
3655
3657
  }),
3656
- /* @__PURE__ */ z(Ls, { onBlur: u }),
3657
- /* @__PURE__ */ z(at, {}),
3658
- /* @__PURE__ */ z(As, { controlledRef: p ?? null }),
3659
- /* @__PURE__ */ z(Rs, { onFocusChange: f }),
3660
- /* @__PURE__ */ z(tn, {}),
3661
- r === "markdown" && /* @__PURE__ */ z(Xs, {}),
3658
+ /* @__PURE__ */ R(Rs, { onBlur: u }),
3659
+ /* @__PURE__ */ R(Pe, {}),
3660
+ /* @__PURE__ */ R(js, { controlledRef: p ?? null }),
3661
+ /* @__PURE__ */ R(zs, { onFocusChange: f }),
3662
+ /* @__PURE__ */ R(rn, {}),
3663
+ r === "markdown" && /* @__PURE__ */ R(Zs, {}),
3662
3664
  e
3663
3665
  ]
3664
3666
  })
3665
3667
  });
3666
3668
  }
3667
- var nc = a((e, t) => /* @__PURE__ */ z(tc, {
3669
+ var rc = a((e, t) => /* @__PURE__ */ R(nc, {
3668
3670
  ...e,
3669
3671
  forwardedRef: t
3670
3672
  }));
3671
- nc.displayName = "RichTextArea";
3673
+ rc.displayName = "RichTextArea";
3672
3674
  //#endregion
3673
3675
  //#region src/components/rich-text-field/constants.ts
3674
- var rc = "Arial, sans-serif", ic = [
3676
+ var ic = "Arial, sans-serif", ac = [
3675
3677
  {
3676
3678
  value: "Arial, sans-serif",
3677
3679
  label: "Arial"
@@ -3708,7 +3710,7 @@ var rc = "Arial, sans-serif", ic = [
3708
3710
  value: "\"Brush Script MT\", cursive",
3709
3711
  label: "Brush Script MT"
3710
3712
  }
3711
- ], ac = rc, oc = [
3713
+ ], oc = ic, sc = [
3712
3714
  {
3713
3715
  label: "10",
3714
3716
  value: "10"
@@ -3737,11 +3739,11 @@ var rc = "Arial, sans-serif", ic = [
3737
3739
  label: "48",
3738
3740
  value: "48"
3739
3741
  }
3740
- ], sc = "left", cc = "#000000";
3742
+ ], cc = "left", lc = "#000000";
3741
3743
  //#endregion
3742
3744
  //#region src/components/rich-text-field/components/toolbar-select.tsx
3743
- function lc({ className: e, selectItemClassName: t, ...n }) {
3744
- return /* @__PURE__ */ z(me, {
3745
+ function uc({ className: e, selectItemClassName: t, ...n }) {
3746
+ return /* @__PURE__ */ R(he, {
3745
3747
  fullWidth: !1,
3746
3748
  size: "small",
3747
3749
  className: L(e),
@@ -3751,44 +3753,44 @@ function lc({ className: e, selectItemClassName: t, ...n }) {
3751
3753
  }
3752
3754
  //#endregion
3753
3755
  //#region src/components/rich-text-field/components/alignment-select.tsx
3754
- function uc(e) {
3756
+ function dc(e) {
3755
3757
  return e === "center" || e === "right" ? e : e === "end" ? "right" : "left";
3756
3758
  }
3757
- var dc = {
3759
+ var fc = {
3758
3760
  left: {
3759
3761
  label: "Left",
3760
- icon: /* @__PURE__ */ z(Ae, { fontSize: "inherit" })
3762
+ icon: /* @__PURE__ */ R(kt, { fontSize: "inherit" })
3761
3763
  },
3762
3764
  center: {
3763
3765
  label: "Center",
3764
- icon: /* @__PURE__ */ z(ke, { fontSize: "inherit" })
3766
+ icon: /* @__PURE__ */ R(Ot, { fontSize: "inherit" })
3765
3767
  },
3766
3768
  right: {
3767
3769
  label: "Right",
3768
- icon: /* @__PURE__ */ z(je, { fontSize: "inherit" })
3770
+ icon: /* @__PURE__ */ R(At, { fontSize: "inherit" })
3769
3771
  }
3770
3772
  };
3771
- function fc({ className: e }) {
3772
- let t = Q(), [n, r] = h(sc), i = p(() => Object.entries(dc).map(([e, { label: t, icon: n }]) => ({
3773
+ function pc({ className: e }) {
3774
+ let t = Q(), [n, r] = h(cc), i = p(() => Object.entries(fc).map(([e, { label: t, icon: n }]) => ({
3773
3775
  value: e,
3774
3776
  label: t,
3775
3777
  icon: n
3776
3778
  })), []), a = c(() => {
3777
- let e = W();
3778
- if (G(e)) {
3779
- let t = e.anchor.getNode(), n = t.getParent(), i = bt(t) ? t : n;
3780
- bt(i) && r(uc(i.getFormatType() || "left"));
3779
+ let e = U();
3780
+ if (W(e)) {
3781
+ let t = e.anchor.getNode(), n = t.getParent(), i = Ye(t) ? t : n;
3782
+ Ye(i) && r(dc(i.getFormatType() || "left"));
3781
3783
  }
3782
3784
  }, []);
3783
- u(() => un(t.registerUpdateListener(({ editorState: e }) => {
3785
+ u(() => fn(t.registerUpdateListener(({ editorState: e }) => {
3784
3786
  e.read(() => {
3785
3787
  a();
3786
3788
  });
3787
- }), t.registerCommand(Nt, () => (a(), !1), Dt)), [t, a]);
3789
+ }), t.registerCommand(ct, () => (a(), !1), nt)), [t, a]);
3788
3790
  function o(e) {
3789
- t.dispatchCommand(At, e);
3791
+ t.dispatchCommand(at, e);
3790
3792
  }
3791
- return /* @__PURE__ */ z(lc, {
3793
+ return /* @__PURE__ */ R(uc, {
3792
3794
  shouldShowOnlyIcon: !0,
3793
3795
  options: i,
3794
3796
  value: n,
@@ -3799,7 +3801,7 @@ function fc({ className: e }) {
3799
3801
  //#endregion
3800
3802
  //#region src/components/rich-text-field/components/toolbar-button.tsx
3801
3803
  function $({ className: e, children: t, isActive: n, isDisabled: r = !1, ...i }) {
3802
- return /* @__PURE__ */ z(D, {
3804
+ return /* @__PURE__ */ R(D, {
3803
3805
  isActive: n,
3804
3806
  className: L("border-none bg-transparent", e),
3805
3807
  size: "sm",
@@ -3811,91 +3813,91 @@ function $({ className: e, children: t, isActive: n, isDisabled: r = !1, ...i })
3811
3813
  }
3812
3814
  //#endregion
3813
3815
  //#region src/components/rich-text-field/components/attachment-button.tsx
3814
- function pc(e) {
3816
+ function mc(e) {
3815
3817
  let t = Q();
3816
3818
  function n() {
3817
- t.dispatchCommand(Zs, void 0);
3819
+ t.dispatchCommand(Qs, void 0);
3818
3820
  }
3819
- return /* @__PURE__ */ z($, {
3821
+ return /* @__PURE__ */ R($, {
3820
3822
  "data-testid": "attachment-button",
3821
3823
  "aria-label": "Add Attachment",
3822
3824
  onClick: n,
3823
3825
  ...e,
3824
- children: /* @__PURE__ */ z(xe, {})
3826
+ children: /* @__PURE__ */ R(bt, {})
3825
3827
  });
3826
3828
  }
3827
3829
  //#endregion
3828
3830
  //#region src/components/rich-text-field/utils.ts
3829
- function mc(e) {
3831
+ function hc(e) {
3830
3832
  let t;
3831
- for (let n of hn(e, { silent: !0 })) n.type === "declaration" && n.value && (t ||= {}, t[n.property] = n.value);
3832
- return t || hc;
3833
- }
3834
- var hc = Object.freeze({});
3835
- function gc(e) {
3836
- return typeof e == "string" ? mc(e) : hc;
3833
+ for (let n of _n(e, { silent: !0 })) n.type === "declaration" && n.value && (t ||= {}, t[n.property] = n.value);
3834
+ return t || gc;
3837
3835
  }
3836
+ var gc = Object.freeze({});
3838
3837
  function _c(e) {
3838
+ return typeof e == "string" ? hc(e) : gc;
3839
+ }
3840
+ function vc(e) {
3839
3841
  let t = [];
3840
3842
  for (let [n, r] of Object.entries(e)) n && r && t.push(`${n}: ${r};`);
3841
3843
  return t.sort().join(" ");
3842
3844
  }
3843
- function vc(e, t) {
3845
+ function yc(e, t) {
3844
3846
  return e === t || !e && !t;
3845
3847
  }
3846
- function yc(e, t) {
3848
+ function bc(e, t) {
3847
3849
  if (e === t) return !0;
3848
- for (let n in e) if (!(n in t && vc(e[n], t[n]))) return !1;
3850
+ for (let n in e) if (!(n in t && yc(e[n], t[n]))) return !1;
3849
3851
  for (let n in t) if (!(n in e)) return !1;
3850
3852
  return !0;
3851
3853
  }
3852
- var bc = Lt("style", {
3853
- isEqual: yc,
3854
- parse: gc,
3855
- unparse: _c
3854
+ var xc = ft("style", {
3855
+ isEqual: bc,
3856
+ parse: _c,
3857
+ unparse: vc
3856
3858
  });
3857
- function xc(e, t) {
3858
- return wt(e, bc, t);
3859
- }
3860
3859
  function Sc(e, t) {
3861
- return e === hc || e === t ? t : {
3860
+ return $e(e, xc, t);
3861
+ }
3862
+ function Cc(e, t) {
3863
+ return e === gc || e === t ? t : {
3862
3864
  ...e,
3863
3865
  ...t
3864
3866
  };
3865
3867
  }
3866
- It("PATCH_TEXT_STYLE_COMMAND");
3867
- function Cc(e) {
3868
- let t = W();
3868
+ dt("PATCH_TEXT_STYLE_COMMAND");
3869
+ function wc(e) {
3870
+ let t = U();
3869
3871
  if (!t) {
3870
- let e = vt();
3872
+ let e = qe();
3871
3873
  if (!e) return !1;
3872
- t = e.clone(), Ct(t);
3874
+ t = e.clone(), Qe(t);
3873
3875
  }
3874
- let n = typeof e == "function" ? e : (t) => Sc(t, e);
3875
- if (G(t) && t.isCollapsed()) {
3876
+ let n = typeof e == "function" ? e : (t) => Cc(t, e);
3877
+ if (W(t) && t.isCollapsed()) {
3876
3878
  let e = t.focus.getNode();
3877
- K(e) && xc(e, n);
3878
- } else dn((e) => xc(e, n));
3879
+ G(e) && Sc(e, n);
3880
+ } else pn((e) => Sc(e, n));
3879
3881
  return !0;
3880
3882
  }
3881
- function wc(e) {
3883
+ function Tc(e) {
3882
3884
  let t = e.anchor, n = e.focus, r = e.anchor.getNode(), i = e.focus.getNode();
3883
- return r === i ? r : e.isBackward() ? pn(n) ? r : i : pn(t) ? r : i;
3885
+ return r === i ? r : e.isBackward() ? hn(n) ? r : i : hn(t) ? r : i;
3884
3886
  }
3885
- var Tc = (e, t, n, r) => {
3887
+ var Ec = (e, t, n, r) => {
3886
3888
  e.update(() => {
3887
- if (r && H(Pt), e.isEditable()) {
3888
- let e = W();
3889
- e !== null && mn(e, { "font-size": t + "px" });
3889
+ if (r && V(lt), e.isEditable()) {
3890
+ let e = U();
3891
+ e !== null && gn(e, { "font-size": t + "px" });
3890
3892
  }
3891
3893
  });
3892
- }, Ec = (e) => e.startsWith("http") ? e : `https://${e}`, Dc = i(null);
3893
- function Oc() {
3894
- let e = l(Dc);
3894
+ }, Dc = (e) => e.startsWith("http") ? e : `https://${e}`, Oc = i(null);
3895
+ function kc() {
3896
+ let e = l(Oc);
3895
3897
  if (!e) throw Error("\"useRichTextFieldContext\" must be used within a RichTextFieldContextProvider");
3896
3898
  return e;
3897
3899
  }
3898
- function kc(e) {
3900
+ function Ac(e) {
3899
3901
  let t = e.trim(), n = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);
3900
3902
  if (n) {
3901
3903
  let e = n[1];
@@ -3910,49 +3912,49 @@ function kc(e) {
3910
3912
  let e = (e) => Math.max(0, Math.min(255, e)), [t, n, i] = r.slice(1, 4).map((t) => e(Number.parseInt(t, 10))), a = (e) => e.toString(16).padStart(2, "0");
3911
3913
  return `#${a(t)}${a(n)}${a(i)}`;
3912
3914
  }
3913
- return cc;
3915
+ return lc;
3914
3916
  }
3915
- function Ac({ children: e }) {
3916
- let t = Q(), [n, r] = h(ac), [i, a] = h("16"), [o, s] = h(!1), [l, d] = h(!1), [f, m] = h(!1), [g, _] = h(cc), [v, y] = h(!1), b = c(() => {
3917
- let e = W();
3918
- if (G(e)) {
3919
- r(fn(e, "font-family", ac));
3920
- let t = fn(e, "font-size", "16px");
3917
+ function jc({ children: e }) {
3918
+ let t = Q(), [n, r] = h(oc), [i, a] = h("16"), [o, s] = h(!1), [l, d] = h(!1), [f, m] = h(!1), [g, _] = h(lc), [v, y] = h(!1), b = c(() => {
3919
+ let e = U();
3920
+ if (W(e)) {
3921
+ r(mn(e, "font-family", oc));
3922
+ let t = mn(e, "font-size", "16px");
3921
3923
  a(t ? t.replace("px", "") : "16"), s(e.hasFormat("bold")), d(e.hasFormat("italic")), m(e.hasFormat("underline"));
3922
- let n = fn(e, "color", "#000000") || "#000000";
3923
- _(kc(n));
3924
- let i = wc(e), o = i.getParent(), c = Ye(o) || Ye(i);
3924
+ let n = mn(e, "color", "#000000") || "#000000";
3925
+ _(Ac(n));
3926
+ let i = Tc(e), o = i.getParent(), c = we(o) || we(i);
3925
3927
  y(c);
3926
3928
  }
3927
3929
  }, []);
3928
- u(() => un(t.registerUpdateListener(({ editorState: e }) => {
3930
+ u(() => fn(t.registerUpdateListener(({ editorState: e }) => {
3929
3931
  e.read(() => {
3930
3932
  b();
3931
3933
  });
3932
- }), t.registerCommand(Nt, () => (b(), !1), Dt)), [t, b]);
3934
+ }), t.registerCommand(ct, () => (b(), !1), nt)), [t, b]);
3933
3935
  let x = c((e) => {
3934
3936
  t.update(() => {
3935
- H(Ft);
3936
- let t = W();
3937
- t !== null && mn(t, { "font-family": e });
3937
+ V(ut);
3938
+ let t = U();
3939
+ t !== null && gn(t, { "font-family": e });
3938
3940
  });
3939
3941
  }, [t]), S = c((e) => {
3940
- Tc(t, e, null, !1);
3942
+ Ec(t, e, null, !1);
3941
3943
  }, [t]), C = c(() => {
3942
- t.dispatchCommand(jt, "bold");
3944
+ t.dispatchCommand(ot, "bold");
3943
3945
  }, [t]), w = c(() => {
3944
- t.dispatchCommand(jt, "italic");
3946
+ t.dispatchCommand(ot, "italic");
3945
3947
  }, [t]), T = c(() => {
3946
- t.dispatchCommand(jt, "underline");
3948
+ t.dispatchCommand(ot, "underline");
3947
3949
  }, [t]), E = c((e) => {
3948
3950
  t.update(() => {
3949
- H(Ft);
3950
- let t = W();
3951
- t !== null && mn(t, { color: e });
3951
+ V(ut);
3952
+ let t = U();
3953
+ t !== null && gn(t, { color: e });
3952
3954
  });
3953
- }, [t]), D = c(() => {
3954
- v ? (y(!1), t.dispatchCommand(Ze, null)) : (y(!0), t.dispatchCommand(Ze, Ec("https://")));
3955
- }, [v, y]), ee = p(() => ({
3955
+ }, [t]), ee = c(() => {
3956
+ v ? (y(!1), t.dispatchCommand(Ee, null)) : (y(!0), t.dispatchCommand(Ee, Dc("https://")));
3957
+ }, [v, y]), D = p(() => ({
3956
3958
  fontFamily: n,
3957
3959
  fontSize: i,
3958
3960
  textColor: g,
@@ -3966,7 +3968,7 @@ function Ac({ children: e }) {
3966
3968
  onBold: C,
3967
3969
  onItalic: w,
3968
3970
  onUnderline: T,
3969
- onLink: D
3971
+ onLink: ee
3970
3972
  }), [
3971
3973
  n,
3972
3974
  i,
@@ -3981,84 +3983,84 @@ function Ac({ children: e }) {
3981
3983
  C,
3982
3984
  w,
3983
3985
  T,
3984
- D
3986
+ ee
3985
3987
  ]);
3986
- return /* @__PURE__ */ z(Dc.Provider, {
3987
- value: ee,
3988
+ return /* @__PURE__ */ R(Oc.Provider, {
3989
+ value: D,
3988
3990
  children: e
3989
3991
  });
3990
3992
  }
3991
3993
  //#endregion
3992
3994
  //#region src/components/rich-text-field/components/bold-button.tsx
3993
- function jc({ ...e }) {
3994
- let { isBold: t, onBold: n } = Oc();
3995
- return /* @__PURE__ */ z($, {
3995
+ function Mc({ ...e }) {
3996
+ let { isBold: t, onBold: n } = kc();
3997
+ return /* @__PURE__ */ R($, {
3996
3998
  "data-testid": "bold-button",
3997
3999
  "aria-label": "Format Bold",
3998
4000
  isActive: t,
3999
4001
  onClick: n,
4000
4002
  ...e,
4001
- children: /* @__PURE__ */ z(Me, {})
4003
+ children: /* @__PURE__ */ R(jt, {})
4002
4004
  });
4003
4005
  }
4004
4006
  //#endregion
4005
4007
  //#region src/components/rich-text-field/components/clean-format-button.tsx
4006
- function Mc({ ...e }) {
4008
+ function Nc({ ...e }) {
4007
4009
  let t = Q(), n = c(() => {
4008
4010
  t.update(() => {
4009
- let e = W();
4010
- if (G(e)) {
4011
- Cc(() => hc);
4012
- for (let t of e.extract()) K(t) && (t.setFormat(0), t.setStyle(""), ln(t).setFormat(""));
4011
+ let e = U();
4012
+ if (W(e)) {
4013
+ wc(() => gc);
4014
+ for (let t of e.extract()) G(t) && (t.setFormat(0), t.setStyle(""), dn(t).setFormat(""));
4013
4015
  }
4014
4016
  });
4015
4017
  }, [t]);
4016
- return /* @__PURE__ */ z($, {
4018
+ return /* @__PURE__ */ R($, {
4017
4019
  "data-testid": "clean-format-button",
4018
4020
  "aria-label": "Reset Formatting",
4019
4021
  onClick: n,
4020
4022
  ...e,
4021
- children: /* @__PURE__ */ z(Ne, {})
4023
+ children: /* @__PURE__ */ R(Mt, {})
4022
4024
  });
4023
4025
  }
4024
4026
  //#endregion
4025
4027
  //#region src/components/rich-text-field/components/image-button.tsx
4026
- function Nc({ ...e }) {
4027
- return /* @__PURE__ */ z($, {
4028
+ function Pc({ ...e }) {
4029
+ return /* @__PURE__ */ R($, {
4028
4030
  "data-testid": "image-button",
4029
4031
  "aria-label": "Add Image",
4030
4032
  ...e,
4031
- children: /* @__PURE__ */ z(Le, {})
4033
+ children: /* @__PURE__ */ R(It, {})
4032
4034
  });
4033
4035
  }
4034
4036
  //#endregion
4035
4037
  //#region src/components/rich-text-field/components/italic-button.tsx
4036
- function Pc({ ...e }) {
4037
- let { isItalic: t, onItalic: n } = Oc();
4038
- return /* @__PURE__ */ z($, {
4038
+ function Fc({ ...e }) {
4039
+ let { isItalic: t, onItalic: n } = kc();
4040
+ return /* @__PURE__ */ R($, {
4039
4041
  "data-testid": "italic-button",
4040
4042
  "aria-label": "Format Italics",
4041
4043
  isActive: t,
4042
4044
  onClick: n,
4043
4045
  ...e,
4044
- children: /* @__PURE__ */ z(Fe, {})
4046
+ children: /* @__PURE__ */ R(Pt, {})
4045
4047
  });
4046
4048
  }
4047
4049
  //#endregion
4048
4050
  //#region src/components/rich-text-field/components/link-button.tsx
4049
- function Fc({ isActive: e, ...t }) {
4050
- return /* @__PURE__ */ z($, {
4051
+ function Ic({ isActive: e, ...t }) {
4052
+ return /* @__PURE__ */ R($, {
4051
4053
  "data-testid": "link-button",
4052
4054
  "aria-label": "Add Link",
4053
4055
  ...t,
4054
- children: z(e ? ze : Re, {})
4056
+ children: R(e ? Rt : Lt, {})
4055
4057
  });
4056
4058
  }
4057
4059
  //#endregion
4058
4060
  //#region src/components/rich-text-field/components/size-select.tsx
4059
- function Ic({ className: e }) {
4060
- let { fontSize: t, onFontSize: n } = Oc(), r = p(() => [...oc], []);
4061
- return /* @__PURE__ */ z(lc, {
4061
+ function Lc({ className: e }) {
4062
+ let { fontSize: t, onFontSize: n } = kc(), r = p(() => [...sc], []);
4063
+ return /* @__PURE__ */ R(uc, {
4062
4064
  "data-testid": "size-select",
4063
4065
  options: r,
4064
4066
  value: t,
@@ -4068,23 +4070,23 @@ function Ic({ className: e }) {
4068
4070
  }
4069
4071
  //#endregion
4070
4072
  //#region src/components/rich-text-field/components/text-color-button.tsx
4071
- function Lc({ wrapperClassName: e, ...t }) {
4072
- let { textColor: n, onTextColor: r } = Oc(), i = n === cc;
4073
+ function Rc({ wrapperClassName: e, ...t }) {
4074
+ let { textColor: n, onTextColor: r } = kc(), i = n === lc;
4073
4075
  function a(e) {
4074
4076
  r(e.target.value);
4075
4077
  }
4076
- return /* @__PURE__ */ B("div", {
4078
+ return /* @__PURE__ */ z("div", {
4077
4079
  "data-slot": "rich-text-field-text-color",
4078
4080
  className: L("relative", e),
4079
- children: [/* @__PURE__ */ z($, {
4081
+ children: [/* @__PURE__ */ R($, {
4080
4082
  "data-testid": "text-color-button",
4081
4083
  "aria-label": "Text Color",
4082
4084
  ...t,
4083
- children: /* @__PURE__ */ z("span", {
4085
+ children: /* @__PURE__ */ R("span", {
4084
4086
  style: i ? {} : { color: n },
4085
- children: /* @__PURE__ */ z(Pe, {})
4087
+ children: /* @__PURE__ */ R(Nt, {})
4086
4088
  })
4087
- }), /* @__PURE__ */ z("input", {
4089
+ }), /* @__PURE__ */ R("input", {
4088
4090
  type: "color",
4089
4091
  "data-slot": "rich-text-field-text-color-input",
4090
4092
  value: n,
@@ -4103,9 +4105,9 @@ function Lc({ wrapperClassName: e, ...t }) {
4103
4105
  }
4104
4106
  //#endregion
4105
4107
  //#region src/components/rich-text-field/components/typography-select.tsx
4106
- function Rc({ className: e }) {
4107
- let { fontFamily: t, onFontFamily: n } = Oc(), r = p(() => [...ic], []);
4108
- return /* @__PURE__ */ z(lc, {
4108
+ function zc({ className: e }) {
4109
+ let { fontFamily: t, onFontFamily: n } = kc(), r = p(() => [...ac], []);
4110
+ return /* @__PURE__ */ R(uc, {
4109
4111
  "data-testid": "typography-select",
4110
4112
  options: r,
4111
4113
  value: t,
@@ -4115,38 +4117,38 @@ function Rc({ className: e }) {
4115
4117
  }
4116
4118
  //#endregion
4117
4119
  //#region src/components/rich-text-field/components/underline-button.tsx
4118
- function zc({ ...e }) {
4119
- let { isUnderline: t, onUnderline: n } = Oc();
4120
- return /* @__PURE__ */ z($, {
4120
+ function Bc({ ...e }) {
4121
+ let { isUnderline: t, onUnderline: n } = kc();
4122
+ return /* @__PURE__ */ R($, {
4121
4123
  "data-testid": "underline-button",
4122
4124
  "aria-label": "Format Underline",
4123
4125
  isActive: t,
4124
4126
  onClick: n,
4125
4127
  ...e,
4126
- children: /* @__PURE__ */ z(Ie, {})
4128
+ children: /* @__PURE__ */ R(Ft, {})
4127
4129
  });
4128
4130
  }
4129
4131
  //#endregion
4130
4132
  //#region src/components/rich-text-field/components/formatting-toolbar-plugin.tsx
4131
- var Bc = ({ hasAttachments: e }) => /* @__PURE__ */ B(be, { children: [
4132
- /* @__PURE__ */ z(Rc, {}),
4133
- /* @__PURE__ */ z(Ic, {}),
4134
- /* @__PURE__ */ z(x, { orientation: "vertical" }),
4135
- /* @__PURE__ */ z(jc, {}),
4136
- /* @__PURE__ */ z(Pc, {}),
4137
- /* @__PURE__ */ z(zc, {}),
4138
- /* @__PURE__ */ z(Lc, {}),
4139
- /* @__PURE__ */ z(x, { orientation: "vertical" }),
4140
- /* @__PURE__ */ z(Fc, { isDisabled: !0 }),
4141
- /* @__PURE__ */ z(pc, { isDisabled: !e }),
4142
- /* @__PURE__ */ z(Nc, { isDisabled: !0 }),
4143
- /* @__PURE__ */ z(x, { orientation: "vertical" }),
4144
- /* @__PURE__ */ z(fc, {}),
4145
- /* @__PURE__ */ z(x, { orientation: "vertical" }),
4146
- /* @__PURE__ */ z(Mc, {})
4133
+ var Vc = ({ hasAttachments: e }) => /* @__PURE__ */ z(Se, { children: [
4134
+ /* @__PURE__ */ R(zc, {}),
4135
+ /* @__PURE__ */ R(Lc, {}),
4136
+ /* @__PURE__ */ R(S, { orientation: "vertical" }),
4137
+ /* @__PURE__ */ R(Mc, {}),
4138
+ /* @__PURE__ */ R(Fc, {}),
4139
+ /* @__PURE__ */ R(Bc, {}),
4140
+ /* @__PURE__ */ R(Rc, {}),
4141
+ /* @__PURE__ */ R(S, { orientation: "vertical" }),
4142
+ /* @__PURE__ */ R(Ic, { isDisabled: !0 }),
4143
+ /* @__PURE__ */ R(mc, { isDisabled: !e }),
4144
+ /* @__PURE__ */ R(Pc, { isDisabled: !0 }),
4145
+ /* @__PURE__ */ R(S, { orientation: "vertical" }),
4146
+ /* @__PURE__ */ R(pc, {}),
4147
+ /* @__PURE__ */ R(S, { orientation: "vertical" }),
4148
+ /* @__PURE__ */ R(Nc, {})
4147
4149
  ] });
4148
- function Vc({ className: e, children: t = Bc, hasAttachments: n = !1 }) {
4149
- return /* @__PURE__ */ z("div", {
4150
+ function Hc({ className: e, children: t = Vc, hasAttachments: n = !1 }) {
4151
+ return /* @__PURE__ */ R("div", {
4150
4152
  "data-testid": "formatting-toolbar",
4151
4153
  "data-slot": "rich-text-field-toolbar",
4152
4154
  className: L("flex items-center gap-[2px]", "px-[16px] py-[8px] overflow-x-auto", "bg-paper-elevation-1 border-b border-divider-border-base", e),
@@ -4155,9 +4157,9 @@ function Vc({ className: e, children: t = Bc, hasAttachments: n = !1 }) {
4155
4157
  }
4156
4158
  //#endregion
4157
4159
  //#region src/components/rich-text-field/rich-text-field.tsx
4158
- var Hc = a(({ children: e, className: t, placeholderClassName: n, containerClassName: r, toolbarPlacement: i = "top", toolbarChildren: a, toolbarClassName: o, isMultipleAttachments: s, enableAttachments: c, acceptedFiles: l, onFileAttach: u, ...d }, f) => {
4160
+ var Uc = a(({ children: e, className: t, placeholderClassName: n, containerClassName: r, toolbarPlacement: i = "top", toolbarChildren: a, toolbarClassName: o, isMultipleAttachments: s, enableAttachments: c, acceptedFiles: l, onFileAttach: u, ...d }, f) => {
4159
4161
  let p = i === "top";
4160
- return /* @__PURE__ */ B(nc, {
4162
+ return /* @__PURE__ */ z(rc, {
4161
4163
  ref: f,
4162
4164
  "data-testid": "rich-text-field",
4163
4165
  "data-slot": "rich-text-field",
@@ -4166,21 +4168,21 @@ var Hc = a(({ children: e, className: t, placeholderClassName: n, containerClass
4166
4168
  containerClassName: L("h-rich-text-field-height", "rounded-rich-text-field-toolbar", p ? "pt-rich-text-field-toolbar-height" : "pb-rich-text-field-toolbar-height", r),
4167
4169
  className: L("p-rich-text-field-editor-padding", "bg-rich-text-field-background", "size-full", t),
4168
4170
  ...d,
4169
- children: [/* @__PURE__ */ z(Ac, { children: /* @__PURE__ */ z(Vc, {
4171
+ children: [/* @__PURE__ */ R(jc, { children: /* @__PURE__ */ R(Hc, {
4170
4172
  hasAttachments: c,
4171
4173
  className: L("absolute right-0 w-full", p ? "top-0" : "bottom-0", o),
4172
4174
  children: a
4173
- }) }), /* @__PURE__ */ z(Qs, {
4175
+ }) }), /* @__PURE__ */ R($s, {
4174
4176
  acceptedFiles: l,
4175
4177
  onFileAttach: u,
4176
4178
  isMultiple: s
4177
4179
  })]
4178
4180
  });
4179
4181
  });
4180
- Hc.displayName = "RichTextField";
4182
+ Uc.displayName = "RichTextField";
4181
4183
  //#endregion
4182
4184
  //#region src/components/topmenu/topmenu.tsx
4183
- var Uc = V("flex shrink-0 items-center justify-end", {
4185
+ var Wc = B("flex shrink-0 items-center justify-end", {
4184
4186
  variants: {
4185
4187
  size: {
4186
4188
  md: ["px-[4px]", "rounded-overlay-tools-wrapper bg-overlay-tools-background-base"],
@@ -4205,8 +4207,8 @@ var Uc = V("flex shrink-0 items-center justify-end", {
4205
4207
  hasBorder: !0
4206
4208
  }
4207
4209
  });
4208
- function Wc({ className: e, children: t, ...n }) {
4209
- return /* @__PURE__ */ z("div", {
4210
+ function Gc({ className: e, children: t, ...n }) {
4211
+ return /* @__PURE__ */ R("div", {
4210
4212
  "data-slot": "topmenu",
4211
4213
  role: "group",
4212
4214
  className: L("absolute top-0 right-0", "flex flex-col items-end w-fit", e),
@@ -4214,11 +4216,11 @@ function Wc({ className: e, children: t, ...n }) {
4214
4216
  children: t
4215
4217
  });
4216
4218
  }
4217
- function Gc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
4218
- return /* @__PURE__ */ z("div", {
4219
+ function Kc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
4220
+ return /* @__PURE__ */ R("div", {
4219
4221
  "data-slot": "topmenu-actions",
4220
4222
  "data-size": t ?? "lg",
4221
- className: L(Uc({
4223
+ className: L(Wc({
4222
4224
  size: t,
4223
4225
  hasBorder: n
4224
4226
  }), e),
@@ -4228,42 +4230,42 @@ function Gc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
4228
4230
  }
4229
4231
  //#endregion
4230
4232
  //#region src/domain/actions/constants.ts
4231
- var Kc = "swisper";
4233
+ var qc = "swisper";
4232
4234
  //#endregion
4233
4235
  //#region src/domain/actions/utils/index.ts
4234
- function qc(e, t) {
4235
- let n = `${Kc}://action/${e}`;
4236
+ function Jc(e, t) {
4237
+ let n = `${qc}://action/${e}`;
4236
4238
  return t ? `${n}?${new URLSearchParams(t).toString()}` : n;
4237
4239
  }
4238
- function Jc({ action: e, label: t, params: n }) {
4239
- return `[${t}](${qc(e, n)})`;
4240
+ function Yc({ action: e, label: t, params: n }) {
4241
+ return `[${t}](${Jc(e, n)})`;
4240
4242
  }
4241
- function Yc(e) {
4243
+ function Xc(e) {
4242
4244
  if (!e?.startsWith("swisper://")) return !1;
4243
4245
  let t = new URL(e);
4244
4246
  return t.protocol === "swisper:" && t.hostname === "action" && t.pathname.startsWith("/") && t.pathname.split("/").length === 2;
4245
4247
  }
4246
- function Xc(e) {
4248
+ function Zc(e) {
4247
4249
  let t;
4248
4250
  try {
4249
4251
  t = new URL(e);
4250
4252
  } catch {
4251
4253
  return null;
4252
4254
  }
4253
- return Yc(e) ? {
4255
+ return Xc(e) ? {
4254
4256
  option: t.pathname.replace("/", ""),
4255
4257
  payload: Object.fromEntries(t.searchParams.entries())
4256
4258
  } : null;
4257
4259
  }
4258
- function Zc(e) {
4260
+ function Qc(e) {
4259
4261
  for (let t of e) if (t.type === "text" && typeof t.value == "string") return t.value;
4260
4262
  return null;
4261
4263
  }
4262
- function Qc(e) {
4263
- let t = vn().use(_n).use(gn).parse(e), n = null;
4264
- return yn(t, (e) => {
4264
+ function $c(e) {
4265
+ let t = bn().use(yn).use(vn).parse(e), n = null;
4266
+ return xn(t, (e) => {
4265
4267
  if (e.type !== "link") return;
4266
- let t = Xc(e.url), r = Zc(e.children);
4268
+ let t = Zc(e.url), r = Qc(e.children);
4267
4269
  if (t && r) {
4268
4270
  n = {
4269
4271
  label: r,
@@ -4277,23 +4279,23 @@ function Qc(e) {
4277
4279
  }
4278
4280
  //#endregion
4279
4281
  //#region src/domain/actions/hooks/index.ts
4280
- function $c(e) {
4281
- return p(() => e.map((e) => Qc(e) || { label: e }).filter((e) => e !== null), [e]);
4282
+ function el(e) {
4283
+ return p(() => e.map((e) => $c(e) || { label: e }).filter((e) => e !== null), [e]);
4282
4284
  }
4283
4285
  //#endregion
4284
4286
  //#region src/hooks/use-chat-stream-message.ts
4285
- function el(e) {
4287
+ function tl(e) {
4286
4288
  return JSON.parse(e);
4287
4289
  }
4288
- function tl(e) {
4290
+ function nl(e) {
4289
4291
  return e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
4290
4292
  }
4291
- function nl(e, t) {
4293
+ function rl(e, t) {
4292
4294
  return e instanceof Error ? e : Error(t);
4293
4295
  }
4294
- function rl() {
4296
+ function il() {
4295
4297
  return { streamMessage: c(async ({ stream: e, abortController: t, timeout: n = 2e4, tokenParser: r, onChunkReceived: i, onAbort: a, onFinish: o, onError: s }) => {
4296
- let c = r ?? el, l, u = !1, d = () => {
4298
+ let c = r ?? tl, l, u = !1, d = () => {
4297
4299
  l !== void 0 && (clearTimeout(l), l = void 0);
4298
4300
  }, f = (e) => {
4299
4301
  u || (u = !0, d(), a?.(e));
@@ -4304,7 +4306,7 @@ function rl() {
4304
4306
  }, n));
4305
4307
  };
4306
4308
  try {
4307
- let n = "", r = new TextDecoder("utf-8"), a = bn({
4309
+ let n = "", r = new TextDecoder("utf-8"), a = Sn({
4308
4310
  onEvent(e) {
4309
4311
  try {
4310
4312
  n += e.data;
@@ -4320,7 +4322,7 @@ function rl() {
4320
4322
  }
4321
4323
  });
4322
4324
  for (t?.signal.addEventListener("abort", () => {
4323
- let e = nl(t.signal.reason, "Stream aborted");
4325
+ let e = rl(t.signal.reason, "Stream aborted");
4324
4326
  f(e);
4325
4327
  }, { once: !0 }), p(); !u;) {
4326
4328
  let { value: t, done: n } = await e.read(), i = r.decode(t, { stream: !0 });
@@ -4329,8 +4331,8 @@ function rl() {
4329
4331
  d(), !u && !t?.signal.aborted && o?.(n);
4330
4332
  } catch (e) {
4331
4333
  let n = e;
4332
- if (u || t?.signal.aborted || tl(n)) {
4333
- u || f(nl(n, "Stream aborted"));
4334
+ if (u || t?.signal.aborted || nl(n)) {
4335
+ u || f(rl(n, "Stream aborted"));
4334
4336
  return;
4335
4337
  }
4336
4338
  t?.abort(n), console.error("Error while reading stream:", n), s?.(n);
@@ -4339,8 +4341,8 @@ function rl() {
4339
4341
  }
4340
4342
  //#endregion
4341
4343
  //#region src/hooks/use-on-chat-changed.ts
4342
- function il(e) {
4343
- let { chatId: t, isNewChat: n } = Y(), r = m(n), i = m(t), a = m(e);
4344
+ function al(e) {
4345
+ let { chatId: t, isNewChat: n } = X(), r = m(n), i = m(t), a = m(e);
4344
4346
  a.current = e, r.current = n, u(() => {
4345
4347
  i.current !== t && (a.current({
4346
4348
  chatId: t,
@@ -4351,20 +4353,20 @@ function il(e) {
4351
4353
  }
4352
4354
  //#endregion
4353
4355
  //#region src/hooks/use-current-chat-id.ts
4354
- function al() {
4355
- let { chatId: e } = Y();
4356
+ function ol() {
4357
+ let { chatId: e } = X();
4356
4358
  return e;
4357
4359
  }
4358
4360
  //#endregion
4359
4361
  //#region src/hooks/use-is-current-chat-new.ts
4360
- function ol() {
4361
- let { isNewChat: e } = Y();
4362
+ function sl() {
4363
+ let { isNewChat: e } = X();
4362
4364
  return e;
4363
4365
  }
4364
4366
  //#endregion
4365
4367
  //#region src/hooks/use-loaded-chat-ids.ts
4366
- function sl() {
4367
- let { loadedChatIdsRef: e } = Y();
4368
+ function cl() {
4369
+ let { loadedChatIdsRef: e } = X();
4368
4370
  return {
4369
4371
  getIsChatLoaded: c((t) => e.current?.has(t) ?? !1, []),
4370
4372
  markAsLoaded: c((t) => {
@@ -4377,8 +4379,8 @@ function sl() {
4377
4379
  }
4378
4380
  //#endregion
4379
4381
  //#region src/hooks/use-chat-prompt-placeholder.ts
4380
- function cl() {
4381
- let { promptPlaceholder: e, setPromptPlaceholder: t, clearPromptPlaceholder: n } = Y();
4382
+ function ll() {
4383
+ let { promptPlaceholder: e, setPromptPlaceholder: t, clearPromptPlaceholder: n } = X();
4382
4384
  return {
4383
4385
  promptPlaceholder: e,
4384
4386
  setPromptPlaceholder: t,
@@ -4386,6 +4388,6 @@ function cl() {
4386
4388
  };
4387
4389
  }
4388
4390
  //#endregion
4389
- export { Ps as $replaceEditorHTMLContent, Fs as $replaceEditorSelectionHTMLContent, Ms as $setSelectionToEnd, fc as AlignmentSelect, pc as AttachmentButton, jc as BoldButton, Kc as CHAT_ACTION_PROTOCOL, No as CanvasShell, Io as CanvasShellCloseTrigger, Bo as CanvasShellContent, Vo as CanvasShellFooter, Lo as CanvasShellFullScreenTrigger, Po as CanvasShellHeader, Ro as CanvasShellOptionsButton, Fo as CanvasShellTitle, wr as ChatCard, lr as ChatCardActionButton, cr as ChatCardActions, xr as ChatCardAttribute, Sr as ChatCardAttributeLabel, Cr as ChatCardAttributeValue, br as ChatCardAttributes, fr as ChatCardBody, ur as ChatCardCollapsibleButton, kr as ChatCardContainer, pr as ChatCardContent, hr as ChatCardFooter, vr as ChatCardFooterActions, gr as ChatCardFooterNotes, _r as ChatCardFooterPrice, yr as ChatCardForm, rr as ChatCardHeader, ar as ChatCardHeaderContent, ir as ChatCardIcon, wn as ChatCardListLayout, Tn as ChatCardListLayoutItems, En as ChatCardListLayoutShowMore, dr as ChatCardMedia, mr as ChatCardPreview, sr as ChatCardSubTitle, Bn as ChatCardThreeColumnLayout, Un as ChatCardThreeColumnLayoutDetails, Vn as ChatCardThreeColumnLayoutList, Hn as ChatCardThreeColumnLayoutMain, Wn as ChatCardThreeColumnLayoutPanel, or as ChatCardTitle, Qn as ChatCardTwoColumnLayout, $n as ChatCardTwoColumnLayoutAside, er as ChatCardTwoColumnLayoutMain, Fr as ChatContainer, Lr as ChatContainerPrompt, Rr as ChatContainerWelcome, Ui as ChatConversationProvider, ri as ChatInput, ai as ChatInputTextarea, ci as ChatList, fi as ChatListEmptyState, pi as ChatListError, _i as ChatListItem, gi as ChatListItems, mi as ChatListLoadMore, di as ChatListSkeleton, Ni as ChatMessage, Fi as ChatMessageActions, $i as ChatMessageAttachmentCard, ra as ChatMessageAttachmentCardActions, ea as ChatMessageAttachmentCardContent, aa as ChatMessageAttachmentCardIcon, na as ChatMessageAttachmentCardPreview, ta as ChatMessageAttachmentCardTitle, Pi as ChatMessageContent, Xi as ChatMessageListGroup, fa as ChatMessageResponse, pa as ChatMessageToolbar, ha as ChatMessageToolbarActionButton, ma as ChatMessageToolbarActions, ga as ChatMessageToolbarTimestamp, qi as ChatMessages, Ji as ChatMessagesList, Qi as ChatMessagesScrollButton, Ta as ChatNotificationCard, Na as ChatNotificationCardActions, Fa as ChatNotificationCardButtons, za as ChatNotificationCardCloseButton, Ba as ChatNotificationCardContent, Ua as ChatNotificationCardContentActions, Ha as ChatNotificationCardContentDescription, Va as ChatNotificationCardContentTitle, Ra as ChatNotificationCardDeleteButton, Ka as ChatNotificationCardDescription, Wa as ChatNotificationCardExpandButton, Ea as ChatNotificationCardHead, Da as ChatNotificationCardHeader, Oa as ChatNotificationCardHeaderIcon, Ma as ChatNotificationCardHeaderStatus, ka as ChatNotificationCardHeaderTitle, Aa as ChatNotificationCardHeaderTitleLabel, Ga as ChatNotificationCardIcon, Ia as ChatNotificationCardReadActionButton, La as ChatNotificationCardSnoozeButton, qa as ChatNotificationCardTimeStamp, Pa as ChatNotificationCardTimestamp, Ja as ChatNotificationPopup, Xa as ChatNotificationPopupContent, Ya as ChatNotificationPopupTrigger, Ti as ChatPromptBox, ji as ChatPromptBoxActionsLeft, Mi as ChatPromptBoxActionsRight, ki as ChatPromptBoxContent, Ai as ChatPromptBoxInput, Oi as ChatPromptBoxToolbar, Ri as ChatProvider, Za as ChatReplies, Qa as ChatReply, $a as ChatReplyLabel, eo as ChatReplyValue, io as ChatSuggestion, co as ChatSuggestionAction, so as ChatSuggestionActions, oo as ChatSuggestionLabel, ao as ChatSuggestionLabelIcon, ro as ChatSuggestions, Uo as ChatThinkingProcess, Jo as ChatThinkingProcessContent, Xo as ChatThinkingProcessContentItem, Wo as ChatThinkingProcessTrigger, qo as ChatThinkingProcessTriggerArrow, Go as ChatThinkingProcessTriggerIcon, Ko as ChatThinkingProcessTriggerLabel, Eo as ChatThread, Ao as ChatThreadAnswer, Mo as ChatThreadErrorState, Oo as ChatThreadGroup, wo as ChatThreadProvider, ko as ChatThreadQuestion, Mc as CleanFormatButton, Or as EditableChatCardContextProvider, Zo as EmptyState, ts as EmptyStateActionRow, es as EmptyStateDescription, Qo as EmptyStateIcon, $o as EmptyStateTitle, Vc as FormattingToolbarPlugin, Ys as HtmlPastePlugin, Ws as INSERT_HTML_COMMAND, Ks as INSERT_HTML_EVENT, zs as INSERT_IMAGE_COMMAND, Bs as INSERT_IMAGE_EVENT_NAME, Vs as ImageAddedEvent, Nc as ImageButton, Hs as ImageDropPlugin, Js as InsertHtmlEvent, Pc as ItalicButton, Fc as LinkButton, ua as MarkdownViewer, Ho as NewChatTrigger, Us as PASTE_HTML_COMMAND, Gs as PASTE_HTML_EVENT, qs as PasteHtmlEvent, nc as RichTextArea, Hc as RichTextField, Ic as SizeSelect, Lc as TextColorButton, $ as ToolbarButton, Wc as TopMenu, Gc as TopMenuActions, Rc as TypographySelect, zc as UnderlineButton, zo as canvasShellContentPadding, Fn as chatCardThreeColumnLayoutCardVariants, Nn as chatCardThreeColumnLayoutDetailsVariants, jn as chatCardThreeColumnLayoutListVariants, Mn as chatCardThreeColumnLayoutMainVariants, Pn as chatCardThreeColumnLayoutPanelVariants, An as chatCardThreeColumnLayoutVariants, qn as chatCardTwoColumnLayoutAsideVariants, Yn as chatCardTwoColumnLayoutCardVariants, Kn as chatCardTwoColumnLayoutGridVariants, Jn as chatCardTwoColumnLayoutMainVariants, Gn as chatCardTwoColumnLayoutVariants, Jc as createChatActionLink, Qc as extractChatActionFromLink, Sa as formatSnoozeDate, sa as getAttachmentIcon, _a as getSnoozeUntilDate, Yc as isChatActionURL, js as scrollRichTextAreaToBottom, $c as useChatActions, Cn as useChatCardListLayoutContext, Y as useChatContext, Hi as useChatConversationContext, ti as useChatInputContext, si as useChatListContext, sl as useChatLoadedIds, wa as useChatNotificationCardContext, cl as useChatPromptPlaceholder, rl as useChatStreamMessage, no as useChatSuggestionContext, yo as useChatThread, Qt as useChatThreadScrollable, al as useCurrentChatId, Tr as useEditChatCard, Dr as useEditableChatCardContext, ol as useIsCurrentChatNew, il as useOnChatChanged, Q as useRichTextAreaEditor, Os as useRichTextAreaSelectedText };
4391
+ export { Fs as $replaceEditorHTMLContent, Is as $replaceEditorSelectionHTMLContent, Ns as $setSelectionToEnd, pc as AlignmentSelect, mc as AttachmentButton, Mc as BoldButton, qc as CHAT_ACTION_PROTOCOL, No as CanvasShell, Io as CanvasShellCloseTrigger, Bo as CanvasShellContent, Vo as CanvasShellFooter, Lo as CanvasShellFullScreenTrigger, Po as CanvasShellHeader, Ro as CanvasShellOptionsButton, Fo as CanvasShellTitle, Er as ChatCard, dr as ChatCardActionButton, ur as ChatCardActions, Cr as ChatCardAttribute, wr as ChatCardAttributeLabel, Tr as ChatCardAttributeValue, Sr as ChatCardAttributes, mr as ChatCardBody, fr as ChatCardCollapsibleButton, jr as ChatCardContainer, hr as ChatCardContent, _r as ChatCardFooter, br as ChatCardFooterActions, vr as ChatCardFooterNotes, yr as ChatCardFooterPrice, xr as ChatCardForm, ar as ChatCardHeader, sr as ChatCardHeaderContent, or as ChatCardIcon, En as ChatCardListLayout, Dn as ChatCardListLayoutItems, On as ChatCardListLayoutShowMore, pr as ChatCardMedia, gr as ChatCardPreview, lr as ChatCardSubTitle, Hn as ChatCardThreeColumnLayout, Gn as ChatCardThreeColumnLayoutDetails, Un as ChatCardThreeColumnLayoutList, Wn as ChatCardThreeColumnLayoutMain, Kn as ChatCardThreeColumnLayoutPanel, cr as ChatCardTitle, er as ChatCardTwoColumnLayout, tr as ChatCardTwoColumnLayoutAside, nr as ChatCardTwoColumnLayoutMain, Lr as ChatContainer, zr as ChatContainerPrompt, Br as ChatContainerWelcome, Ui as ChatConversationProvider, ii as ChatInput, oi as ChatInputTextarea, ci as ChatList, fi as ChatListEmptyState, pi as ChatListError, _i as ChatListItem, gi as ChatListItems, mi as ChatListLoadMore, di as ChatListSkeleton, Ni as ChatMessage, Fi as ChatMessageActions, $i as ChatMessageAttachmentCard, ra as ChatMessageAttachmentCardActions, ea as ChatMessageAttachmentCardContent, aa as ChatMessageAttachmentCardIcon, na as ChatMessageAttachmentCardPreview, ta as ChatMessageAttachmentCardTitle, Pi as ChatMessageContent, Xi as ChatMessageListGroup, fa as ChatMessageResponse, pa as ChatMessageToolbar, ha as ChatMessageToolbarActionButton, ma as ChatMessageToolbarActions, ga as ChatMessageToolbarTimestamp, qi as ChatMessages, Ji as ChatMessagesList, Qi as ChatMessagesScrollButton, Ta as ChatNotificationCard, Na as ChatNotificationCardActions, Fa as ChatNotificationCardButtons, za as ChatNotificationCardCloseButton, Ba as ChatNotificationCardContent, Ua as ChatNotificationCardContentActions, Ha as ChatNotificationCardContentDescription, Va as ChatNotificationCardContentTitle, Ra as ChatNotificationCardDeleteButton, Ka as ChatNotificationCardDescription, Wa as ChatNotificationCardExpandButton, Ea as ChatNotificationCardHead, Da as ChatNotificationCardHeader, Oa as ChatNotificationCardHeaderIcon, Ma as ChatNotificationCardHeaderStatus, ka as ChatNotificationCardHeaderTitle, Aa as ChatNotificationCardHeaderTitleLabel, Ga as ChatNotificationCardIcon, Ia as ChatNotificationCardReadActionButton, La as ChatNotificationCardSnoozeButton, qa as ChatNotificationCardTimeStamp, Pa as ChatNotificationCardTimestamp, Ja as ChatNotificationPopup, Xa as ChatNotificationPopupContent, Ya as ChatNotificationPopupTrigger, Ti as ChatPromptBox, ji as ChatPromptBoxActionsLeft, Mi as ChatPromptBoxActionsRight, ki as ChatPromptBoxContent, Ai as ChatPromptBoxInput, Oi as ChatPromptBoxToolbar, Ri as ChatProvider, Za as ChatReplies, Qa as ChatReply, $a as ChatReplyLabel, eo as ChatReplyValue, io as ChatSuggestion, co as ChatSuggestionAction, so as ChatSuggestionActions, oo as ChatSuggestionLabel, ao as ChatSuggestionLabelIcon, ro as ChatSuggestions, Uo as ChatThinkingProcess, Jo as ChatThinkingProcessContent, Xo as ChatThinkingProcessContentItem, Wo as ChatThinkingProcessTrigger, qo as ChatThinkingProcessTriggerArrow, Go as ChatThinkingProcessTriggerIcon, Ko as ChatThinkingProcessTriggerLabel, Eo as ChatThread, Ao as ChatThreadAnswer, Mo as ChatThreadErrorState, Oo as ChatThreadGroup, wo as ChatThreadProvider, ko as ChatThreadQuestion, Nc as CleanFormatButton, Ar as EditableChatCardContextProvider, Zo as EmptyState, ts as EmptyStateActionRow, es as EmptyStateDescription, Qo as EmptyStateIcon, $o as EmptyStateTitle, Hc as FormattingToolbarPlugin, Xs as HtmlPastePlugin, Gs as INSERT_HTML_COMMAND, qs as INSERT_HTML_EVENT, Bs as INSERT_IMAGE_COMMAND, Vs as INSERT_IMAGE_EVENT_NAME, Hs as ImageAddedEvent, Pc as ImageButton, Us as ImageDropPlugin, Ys as InsertHtmlEvent, Fc as ItalicButton, Ic as LinkButton, ua as MarkdownViewer, Ho as NewChatTrigger, Ws as PASTE_HTML_COMMAND, Ks as PASTE_HTML_EVENT, Js as PasteHtmlEvent, rc as RichTextArea, Uc as RichTextField, Lc as SizeSelect, Rc as TextColorButton, $ as ToolbarButton, Gc as TopMenu, Kc as TopMenuActions, zc as TypographySelect, Bc as UnderlineButton, zo as canvasShellContentPadding, Ln as chatCardThreeColumnLayoutCardVariants, Fn as chatCardThreeColumnLayoutDetailsVariants, Nn as chatCardThreeColumnLayoutListVariants, Pn as chatCardThreeColumnLayoutMainVariants, In as chatCardThreeColumnLayoutPanelVariants, Mn as chatCardThreeColumnLayoutVariants, Yn as chatCardTwoColumnLayoutAsideVariants, Zn as chatCardTwoColumnLayoutCardVariants, Jn as chatCardTwoColumnLayoutGridVariants, Xn as chatCardTwoColumnLayoutMainVariants, qn as chatCardTwoColumnLayoutVariants, Yc as createChatActionLink, $c as extractChatActionFromLink, Sa as formatSnoozeDate, sa as getAttachmentIcon, _a as getSnoozeUntilDate, Xc as isChatActionURL, Ms as scrollRichTextAreaToBottom, el as useChatActions, Tn as useChatCardListLayoutContext, X as useChatContext, Hi as useChatConversationContext, ni as useChatInputContext, Y as useChatListContext, cl as useChatLoadedIds, wa as useChatNotificationCardContext, ll as useChatPromptPlaceholder, il as useChatStreamMessage, no as useChatSuggestionContext, yo as useChatThread, en as useChatThreadScrollable, ol as useCurrentChatId, Dr as useEditChatCard, kr as useEditableChatCardContext, sl as useIsCurrentChatNew, al as useOnChatChanged, Q as useRichTextAreaEditor, ks as useRichTextAreaSelectedText };
4390
4392
 
4391
4393
  //# sourceMappingURL=index.es.js.map