@swisper.ai/web-chat-ui 0.2.14 → 0.3.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/README.md +1 -1
  2. package/dist/components/chat-artifact/chat-artifact.d.ts +7 -7
  3. package/dist/components/chat-artifact/chat-artifact.d.ts.map +1 -1
  4. package/dist/components/chat-artifact/chat-artifact.stories.d.ts +5 -3
  5. package/dist/components/chat-artifact/chat-artifact.stories.d.ts.map +1 -1
  6. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts +22 -31
  7. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts.map +1 -1
  8. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts +9 -11
  9. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts.map +1 -1
  10. package/dist/components/chat-thinking-process/index.d.ts +1 -1
  11. package/dist/components/chat-thinking-process/index.d.ts.map +1 -1
  12. package/dist/docs/agent.stories.d.ts.map +1 -1
  13. package/dist/docs/chatbot-panel.d.ts.map +1 -1
  14. package/dist/index.css +1 -1
  15. package/dist/index.es.js +991 -1027
  16. package/dist/index.es.js.map +1 -1
  17. package/package.json +1 -2
  18. package/src/components/chat-artifact/chat-artifact.json +25 -16
  19. package/src/components/chat-artifact/chat-artifact.stories.tsx +116 -23
  20. package/src/components/chat-artifact/chat-artifact.tsx +64 -55
  21. package/src/components/chat-message/__stories__/tool-steps.tsx +1 -4
  22. package/src/components/chat-thinking-process/chat-thinking-process.json +27 -28
  23. package/src/components/chat-thinking-process/chat-thinking-process.stories.tsx +58 -124
  24. package/src/components/chat-thinking-process/chat-thinking-process.tsx +55 -116
  25. package/src/components/chat-thinking-process/index.ts +1 -0
  26. package/src/docs/agent.stories.tsx +2 -7
  27. package/src/docs/chatbot-panel.tsx +1 -4
  28. package/src/docs/chatbot.mdx +1 -2
package/dist/index.es.js CHANGED
@@ -1,81 +1,80 @@
1
- import { Button as e, Chip as t, Collapsible as n, CollapsibleChevron as r, CollapsibleContent as i, CollapsibleTrigger as a, Divider as o, EmptyState as s, EmptyStateActionRow as c, EmptyStateDescription as l, EmptyStateIcon as u, EmptyStateTitle as d, IconButton as f, List as p, ListItem as m, ListItemAction as h, ListItemTitle as g, ListItemTrigger as _, Menu as v, MenuList as y, MenuProvider as b, MenuTrigger as x, Panel as S, PanelActionButton as C, PanelActionCloseButton as w, PanelBody as ee, PanelContent as T, PanelFooter as E, PanelHeader as te, PanelProvider as ne, PanelTitle as re, Popover as D, PopoverContent as ie, PopoverTrigger as O, ScrollArea as ae, SelectField as k, Skeleton as oe, Tooltip as A, Typography as j, listItemVariants as se, panelBodyPadding as ce, useIsResolution as le } from "@swisper.ai/ui";
2
- import { cn as M, useElementMeasure as ue } from "@swisper.ai/web-core";
3
- import de, { Children as fe, cloneElement as pe, createContext as N, forwardRef as P, isValidElement as me, memo as he, useCallback as F, useContext as I, useEffect as L, useImperativeHandle as ge, useLayoutEffect as R, useMemo as z, useRef as B, useState as V } from "react";
4
- import { Fragment as _e, jsx as H, jsxs as U } from "react/jsx-runtime";
1
+ import { Button as e, Card as t, CardAction as n, CardDescription as r, CardIcon as i, CardTitle as a, Chip as o, Collapsible as s, CollapsibleChevron as c, CollapsibleContent as l, CollapsibleTrigger as u, Divider as d, EmptyState as f, EmptyStateActionRow as p, EmptyStateDescription as m, EmptyStateIcon as h, EmptyStateTitle as g, IconButton as _, List as v, ListItem as y, ListItemAction as b, ListItemTitle as x, ListItemTrigger as S, Menu as C, MenuList as ee, MenuProvider as te, MenuTrigger as w, Panel as T, PanelActionButton as E, PanelActionCloseButton as ne, PanelBody as re, PanelContent as D, PanelFooter as ie, PanelHeader as O, PanelProvider as ae, PanelTitle as k, Popover as oe, PopoverContent as se, PopoverTrigger as ce, ScrollArea as le, SelectField as ue, Skeleton as de, Tooltip as A, Typography as j, listItemVariants as fe, panelBodyPadding as pe, useIsResolution as me } from "@swisper.ai/ui";
2
+ import { cn as M, useElementMeasure as he } from "@swisper.ai/web-core";
3
+ import { Children as ge, cloneElement as _e, createContext as N, forwardRef as P, isValidElement as ve, memo as ye, useCallback as F, useContext as I, useEffect as L, useImperativeHandle as be, useLayoutEffect as R, useMemo as z, useRef as B, useState as V } from "react";
4
+ import { Fragment as xe, jsx as H, jsxs as U } from "react/jsx-runtime";
5
5
  import { Slot as W } from "@radix-ui/react-slot";
6
- import { CodeNode as ve } from "@lexical/code";
7
- import { $isLinkNode as ye, LinkNode as be, TOGGLE_LINK_COMMAND as xe } from "@lexical/link";
8
- import { $createListItemNode as Se, $createListNode as Ce, ListItemNode as we, ListNode as Te } from "@lexical/list";
9
- import { LexicalComposer as Ee } from "@lexical/react/LexicalComposer";
10
- import { ContentEditable as De } from "@lexical/react/LexicalContentEditable";
11
- import { LexicalErrorBoundary as Oe } from "@lexical/react/LexicalErrorBoundary";
12
- import { HistoryPlugin as ke } from "@lexical/react/LexicalHistoryPlugin";
13
- import { RichTextPlugin as Ae } from "@lexical/react/LexicalRichTextPlugin";
14
- import { $createHeadingNode as je, HeadingNode as Me, QuoteNode as Ne } from "@lexical/rich-text";
15
- import { useLexicalComposerContext as Pe } from "@lexical/react/LexicalComposerContext";
16
- import { $convertFromMarkdownString as Fe, $convertToMarkdownString as Ie, TRANSFORMERS as Le, TRANSFORMERS as Re } from "@lexical/markdown";
17
- import { $addUpdateTag as ze, $createParagraphNode as Be, $createRangeSelection as Ve, $createTextNode as He, $getPreviousSelection as Ue, $getRoot as G, $getSelection as K, $insertNodes as We, $isElementNode as Ge, $isParagraphNode as Ke, $isRangeSelection as q, $isTextNode as J, $selectAll as qe, $setSelection as Je, $setState as Ye, COMMAND_PRIORITY_CRITICAL as Xe, COMMAND_PRIORITY_EDITOR as Ze, COMMAND_PRIORITY_LOW as Qe, DecoratorNode as $e, ElementNode as et, FORMAT_ELEMENT_COMMAND as tt, FORMAT_TEXT_COMMAND as nt, PASTE_COMMAND as rt, SELECTION_CHANGE_COMMAND as it, SKIP_DOM_SELECTION_TAG as at, SKIP_SELECTION_FOCUS_TAG as ot, createCommand as st, createState as ct, isHTMLElement as lt, setNodeIndentFromDOM as ut } from "lexical";
18
- import { OnChangePlugin as dt } from "@lexical/react/LexicalOnChangePlugin";
19
- import { createPortal as ft } from "react-dom";
20
- import { useVirtualizer as pt } from "@tanstack/react-virtual";
21
- import * as mt from "@radix-ui/react-scroll-area";
22
- import { nanoid as ht } from "nanoid";
23
- import { AttachmentsIcon as gt, ChevronDownIcon as _t, ChevronUpIcon as vt, CloseIcon as yt, CodeIcon as bt, DeleteIcon as xt, DocIcon as St, DraftIcon as Ct, FormatAlignCenterIcon as wt, FormatAlignLeftIcon as Tt, FormatAlignRightIcon as Et, FormatBoldIcon as Dt, FormatCleanIcon as Ot, FormatColorIcon as kt, FormatItalicIcon as At, FormatUnderlineIcon as jt, ImageIcon as Mt, LinkOffIcon as Nt, LinkOnIcon as Pt, MoreHorizontalIcon as Ft, OpenInFullIcon as It, PdfIcon as Lt, PptIcon as Rt, SignalReadIcon as zt, SignalUnreadIcon as Bt, SnoozeIcon as Vt, XlsIcon as Ht } from "@swisper.ai/icons";
24
- import Ut from "mime";
25
- import { Streamdown as Wt, defaultRehypePlugins as Gt, defaultRemarkPlugins as Kt } from "streamdown";
26
- import qt, { defaultSchema as Jt } from "rehype-sanitize";
6
+ import { CodeNode as Se } from "@lexical/code";
7
+ import { $isLinkNode as Ce, LinkNode as we, TOGGLE_LINK_COMMAND as Te } from "@lexical/link";
8
+ import { $createListItemNode as Ee, $createListNode as De, ListItemNode as Oe, ListNode as ke } from "@lexical/list";
9
+ import { LexicalComposer as Ae } from "@lexical/react/LexicalComposer";
10
+ import { ContentEditable as je } from "@lexical/react/LexicalContentEditable";
11
+ import { LexicalErrorBoundary as Me } from "@lexical/react/LexicalErrorBoundary";
12
+ import { HistoryPlugin as Ne } from "@lexical/react/LexicalHistoryPlugin";
13
+ import { RichTextPlugin as Pe } from "@lexical/react/LexicalRichTextPlugin";
14
+ import { $createHeadingNode as Fe, HeadingNode as Ie, QuoteNode as Le } from "@lexical/rich-text";
15
+ import { useLexicalComposerContext as Re } from "@lexical/react/LexicalComposerContext";
16
+ import { $convertFromMarkdownString as ze, $convertToMarkdownString as Be, TRANSFORMERS as Ve, TRANSFORMERS as He } from "@lexical/markdown";
17
+ import { $addUpdateTag as Ue, $createParagraphNode as We, $createRangeSelection as Ge, $createTextNode as Ke, $getPreviousSelection as qe, $getRoot as G, $getSelection as K, $insertNodes as Je, $isElementNode as Ye, $isParagraphNode as Xe, $isRangeSelection as q, $isTextNode as J, $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";
18
+ import { OnChangePlugin as ht } from "@lexical/react/LexicalOnChangePlugin";
19
+ import { createPortal as gt } from "react-dom";
20
+ import { useVirtualizer as _t } from "@tanstack/react-virtual";
21
+ import * as vt from "@radix-ui/react-scroll-area";
22
+ import { nanoid as yt } from "nanoid";
23
+ 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";
24
+ import qt from "mime";
25
+ import { Streamdown as Jt, defaultRehypePlugins as Yt, defaultRemarkPlugins as Xt } from "streamdown";
26
+ import Zt, { defaultSchema as Qt } from "rehype-sanitize";
27
27
  import "katex/dist/katex.min.css";
28
- import { MessageScroller as Yt, useMessageScroller as Xt, useMessageScrollerScrollable as Zt } from "@shadcn/react/message-scroller";
29
- import { AnimatePresence as Qt, motion as $t } from "motion/react";
30
- import { TablePlugin as en } from "@lexical/react/LexicalTablePlugin";
31
- import { TableCellNode as tn, TableNode as nn, TableRowNode as rn } from "@lexical/table";
32
- import { $generateHtmlFromNodes as an, $generateNodesFromDOM as on } from "@lexical/html";
33
- import { EditorRefPlugin as sn } from "@lexical/react/LexicalEditorRefPlugin";
34
- import { $getNearestBlockElementAncestorOrThrow as cn, mergeRegister as ln } from "@lexical/utils";
35
- import { $forEachSelectedTextNode as un, $getSelectionStyleValueForProperty as dn, $isAtNodeEnd as fn, $patchStyleText as pn } from "@lexical/selection";
28
+ import { MessageScroller as $t, useMessageScroller as en, useMessageScrollerScrollable as tn } from "@shadcn/react/message-scroller";
29
+ import { TablePlugin as nn } from "@lexical/react/LexicalTablePlugin";
30
+ import { TableCellNode as rn, TableNode as an, TableRowNode as on } from "@lexical/table";
31
+ import { $generateHtmlFromNodes as sn, $generateNodesFromDOM as cn } from "@lexical/html";
32
+ import { EditorRefPlugin as ln } from "@lexical/react/LexicalEditorRefPlugin";
33
+ import { $getNearestBlockElementAncestorOrThrow as un, mergeRegister as dn } from "@lexical/utils";
34
+ import { $forEachSelectedTextNode as fn, $getSelectionStyleValueForProperty as pn, $isAtNodeEnd as mn, $patchStyleText as hn } from "@lexical/selection";
36
35
  import "@lexical/react/LexicalDecoratorBlockNode";
37
- import mn from "inline-style-parser";
38
- import { cva as hn } from "class-variance-authority";
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";
36
+ import gn from "inline-style-parser";
37
+ import { cva as _n } from "class-variance-authority";
38
+ import vn from "remark-gfm";
39
+ import yn from "remark-parse";
40
+ import { unified as bn } from "unified";
41
+ import { visit as xn } from "unist-util-visit";
42
+ import { createParser as Sn } from "eventsource-parser";
44
43
  //#region src/components/chat-card/context.tsx
45
- var xn = N(null);
44
+ var Cn = N(null);
46
45
  function Y() {
47
- let e = I(xn);
46
+ let e = I(Cn);
48
47
  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.");
49
48
  return e;
50
49
  }
51
- function Sn({ value: e, children: t }) {
52
- return /* @__PURE__ */ H(xn.Provider, {
50
+ function wn({ value: e, children: t }) {
51
+ return /* @__PURE__ */ H(Cn.Provider, {
53
52
  value: e,
54
53
  children: t
55
54
  });
56
55
  }
57
56
  //#endregion
58
57
  //#region src/components/chat-card/components/chat-card-header.tsx
59
- function Cn({ className: e, children: t, hoverAreaClassName: n, ...r }) {
60
- let { isCollapsible: i, level: o } = Y(), s = /* @__PURE__ */ H("div", {
58
+ function Tn({ className: e, children: t, hoverAreaClassName: n, ...r }) {
59
+ let { isCollapsible: i, level: a } = Y(), o = /* @__PURE__ */ H("div", {
61
60
  "data-slot": "chat-card-header-hover-area",
62
- className: M("w-full", "flex flex-row items-start", "gap-card-header-gap", o === 1 && "px-card-header-hover-area rounded-card-header", o === 1 && i && "hover:bg-layout-accent-low-background-hover-base", o === 1 && "group-hover/chat-card:bg-layout-accent-low-background-hover-base", !i && "cursor-default", n),
61
+ className: M("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),
63
62
  children: t
64
63
  });
65
64
  return /* @__PURE__ */ H("header", {
66
65
  "data-slot": "chat-card-header",
67
- "data-level": o,
66
+ "data-level": a,
68
67
  "data-collapsible": i,
69
- className: M("flex items-start", o === 1 ? "p-card-header-lvl-1" : "px-card-header-lvl-2", e),
68
+ className: M("flex items-start", a === 1 ? "p-card-header-lvl-1" : "px-card-header-lvl-2", e),
70
69
  ...r,
71
- children: i ? /* @__PURE__ */ H(a, {
70
+ children: i ? /* @__PURE__ */ H(u, {
72
71
  className: "w-full",
73
72
  asChild: !0,
74
- children: s
75
- }) : s
73
+ children: o
74
+ }) : o
76
75
  });
77
76
  }
78
- function wn({ className: e, children: t, ...n }) {
77
+ function En({ className: e, children: t, ...n }) {
79
78
  let { level: r } = Y();
80
79
  return /* @__PURE__ */ H("div", {
81
80
  "data-slot": "chat-card-icon",
@@ -86,7 +85,7 @@ function wn({ className: e, children: t, ...n }) {
86
85
  children: t
87
86
  });
88
87
  }
89
- function Tn({ className: e, children: t, ...n }) {
88
+ function Dn({ className: e, children: t, ...n }) {
90
89
  let { level: r } = Y();
91
90
  return /* @__PURE__ */ H("div", {
92
91
  "data-slot": "chat-card-header-content",
@@ -97,7 +96,7 @@ function Tn({ className: e, children: t, ...n }) {
97
96
  children: t
98
97
  });
99
98
  }
100
- function En({ className: e, children: t, ...n }) {
99
+ function On({ className: e, children: t, ...n }) {
101
100
  return /* @__PURE__ */ H(j, {
102
101
  "data-testid": "chat-card-title",
103
102
  variant: "body-medium",
@@ -106,7 +105,7 @@ function En({ className: e, children: t, ...n }) {
106
105
  children: t
107
106
  });
108
107
  }
109
- function Dn({ className: e, children: t, ...n }) {
108
+ function kn({ className: e, children: t, ...n }) {
110
109
  return /* @__PURE__ */ H(j, {
111
110
  "data-testid": "chat-card-sub-title",
112
111
  variant: "body-small-high",
@@ -115,7 +114,7 @@ function Dn({ className: e, children: t, ...n }) {
115
114
  children: t
116
115
  });
117
116
  }
118
- function On({ className: e, children: t, ...n }) {
117
+ function An({ className: e, children: t, ...n }) {
119
118
  let { level: r } = Y();
120
119
  return /* @__PURE__ */ H("div", {
121
120
  role: "group",
@@ -127,11 +126,11 @@ function On({ className: e, children: t, ...n }) {
127
126
  children: t
128
127
  });
129
128
  }
130
- function kn({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip: r, onClick: i, ...a }) {
129
+ function jn({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip: r, onClick: i, ...a }) {
131
130
  function o(e) {
132
131
  n && e.stopPropagation(), i?.(e);
133
132
  }
134
- let s = /* @__PURE__ */ H(f, {
133
+ let s = /* @__PURE__ */ H(_, {
135
134
  "data-slot": "chat-card-action-button",
136
135
  variant: "tertiary",
137
136
  size: "sm",
@@ -145,20 +144,20 @@ function kn({ className: e, children: t, shouldPreventCollapse: n = !0, tooltip:
145
144
  children: s
146
145
  }) : s;
147
146
  }
148
- function An({ className: e, ...t }) {
147
+ function Mn({ className: e, ...t }) {
149
148
  let { isCollapsible: n } = Y();
150
- if (n) return /* @__PURE__ */ H(kn, {
149
+ if (n) return /* @__PURE__ */ H(jn, {
151
150
  "data-slot": "chat-card-collapsible-button",
152
151
  shouldPreventCollapse: !1,
153
152
  isSemantic: !1,
154
153
  className: e,
155
154
  ...t,
156
- children: /* @__PURE__ */ H(r, { className: "size-16" })
155
+ children: /* @__PURE__ */ H(c, { className: "size-16" })
157
156
  });
158
157
  }
159
158
  //#endregion
160
159
  //#region src/components/chat-card/components/chat-card-body.tsx
161
- function jn({ className: e, children: t, ...n }) {
160
+ function Nn({ className: e, children: t, ...n }) {
162
161
  return /* @__PURE__ */ H("figure", {
163
162
  "data-slot": "chat-card-media",
164
163
  "data-testid": "chat-card-media",
@@ -167,18 +166,18 @@ function jn({ className: e, children: t, ...n }) {
167
166
  children: t
168
167
  });
169
168
  }
170
- function Mn({ className: e, children: t, asChild: n = !1, ...r }) {
171
- let a = n ? W : "div";
172
- return /* @__PURE__ */ H(i, {
169
+ function Pn({ className: e, children: t, asChild: n = !1, ...r }) {
170
+ let i = n ? W : "div";
171
+ return /* @__PURE__ */ H(l, {
173
172
  "data-slot": "chat-card-body",
174
173
  "data-testid": "chat-card-body",
175
174
  className: M("flex flex-1 flex-col", "min-h-0", "md:group-data-[collapsible=true]/cards-ui-card:max-h-[calc(var(--chat-window-height)*0.9)]", "overflow-hidden", e),
176
175
  asChild: !0,
177
176
  ...r,
178
- children: /* @__PURE__ */ H(a, { children: t })
177
+ children: /* @__PURE__ */ H(i, { children: t })
179
178
  });
180
179
  }
181
- function Nn({ className: e, children: t, asChild: n = !1, hasPadding: r = !0, hasHeaderPadding: i = !0, ...a }) {
180
+ function Fn({ className: e, children: t, asChild: n = !1, hasPadding: r = !0, hasHeaderPadding: i = !0, ...a }) {
182
181
  let { level: o } = Y();
183
182
  return /* @__PURE__ */ H(n ? W : "div", {
184
183
  "data-slot": "chat-card-content",
@@ -191,7 +190,7 @@ function Nn({ className: e, children: t, asChild: n = !1, hasPadding: r = !0, ha
191
190
  children: t
192
191
  });
193
192
  }
194
- function Pn({ className: e, children: t, ...n }) {
193
+ function In({ className: e, children: t, ...n }) {
195
194
  let { level: r } = Y();
196
195
  return /* @__PURE__ */ H("div", {
197
196
  "data-slot": "chat-card-preview",
@@ -204,7 +203,7 @@ function Pn({ className: e, children: t, ...n }) {
204
203
  }
205
204
  //#endregion
206
205
  //#region src/components/chat-card/components/chat-card-footer.tsx
207
- function Fn({ className: e, children: t, ...n }) {
206
+ function Ln({ className: e, children: t, ...n }) {
208
207
  let { level: r } = Y();
209
208
  return /* @__PURE__ */ H("footer", {
210
209
  "data-slot": "chat-card-footer",
@@ -214,7 +213,7 @@ function Fn({ className: e, children: t, ...n }) {
214
213
  children: t
215
214
  });
216
215
  }
217
- function In({ className: e, children: t }) {
216
+ function Rn({ className: e, children: t }) {
218
217
  return /* @__PURE__ */ H("div", {
219
218
  "data-slot": "chat-card-footer-notes",
220
219
  "data-testid": "chat-card-footer-notes",
@@ -222,7 +221,7 @@ function In({ className: e, children: t }) {
222
221
  children: t
223
222
  });
224
223
  }
225
- function Ln({ className: e, children: t }) {
224
+ function zn({ className: e, children: t }) {
226
225
  return /* @__PURE__ */ H("div", {
227
226
  "data-slot": "chat-card-footer-price",
228
227
  "data-testid": "chat-card-footer-price",
@@ -230,7 +229,7 @@ function Ln({ className: e, children: t }) {
230
229
  children: t
231
230
  });
232
231
  }
233
- function Rn({ className: e, children: t, ...n }) {
232
+ function Bn({ className: e, children: t, ...n }) {
234
233
  return /* @__PURE__ */ H("div", {
235
234
  role: "group",
236
235
  "data-slot": "chat-card-footer-actions",
@@ -242,7 +241,7 @@ function Rn({ className: e, children: t, ...n }) {
242
241
  }
243
242
  //#endregion
244
243
  //#region src/components/chat-card/components/chat-card-form.tsx
245
- var zn = P(function({ className: e, children: t, asChild: n, ...r }, i) {
244
+ var Vn = P(function({ className: e, children: t, asChild: n, ...r }, i) {
246
245
  return /* @__PURE__ */ H(n ? W : "form", {
247
246
  ref: i,
248
247
  "data-slot": "chat-card-form",
@@ -252,8 +251,8 @@ var zn = P(function({ className: e, children: t, asChild: n, ...r }, i) {
252
251
  children: t
253
252
  });
254
253
  });
255
- zn.displayName = "ChatCardForm";
256
- function Bn({ className: e, children: t }) {
254
+ Vn.displayName = "ChatCardForm";
255
+ function Hn({ className: e, children: t }) {
257
256
  return /* @__PURE__ */ H("ul", {
258
257
  "data-slot": "chat-card-attributes",
259
258
  "data-testid": "chat-card-attributes",
@@ -261,7 +260,7 @@ function Bn({ className: e, children: t }) {
261
260
  children: t
262
261
  });
263
262
  }
264
- function Vn({ className: e, children: t, ...n }) {
263
+ function Un({ className: e, children: t, ...n }) {
265
264
  return /* @__PURE__ */ H("li", {
266
265
  "data-slot": "chat-card-attribute",
267
266
  "data-testid": "chat-card-attribute-item",
@@ -270,20 +269,20 @@ function Vn({ className: e, children: t, ...n }) {
270
269
  children: t
271
270
  });
272
271
  }
273
- function Hn({ className: e, children: n, hasPadding: r = !1, ...i }) {
274
- return /* @__PURE__ */ H(t, {
272
+ function Wn({ className: e, children: t, hasPadding: n = !1, ...r }) {
273
+ return /* @__PURE__ */ H(o, {
275
274
  variant: "outlined",
276
275
  size: "md",
277
276
  color: "info",
278
277
  "data-slot": "chat-card-attribute-label",
279
- "data-has-padding": r,
278
+ "data-has-padding": n,
280
279
  className: M("w-full", "data-[has-padding=true]:my-[5px]", e),
281
280
  "data-testid": "chat-card-attribute-label",
282
- ...i,
283
- children: n
281
+ ...r,
282
+ children: t
284
283
  });
285
284
  }
286
- function Un({ className: e, children: t, asChild: n = !1, ...r }) {
285
+ function Gn({ className: e, children: t, asChild: n = !1, ...r }) {
287
286
  return /* @__PURE__ */ H(n ? W : j, {
288
287
  "data-testid": "chat-card-attribute-value",
289
288
  variant: "body-sm",
@@ -294,24 +293,24 @@ function Un({ className: e, children: t, asChild: n = !1, ...r }) {
294
293
  }
295
294
  //#endregion
296
295
  //#region src/components/chat-card/chat-card.tsx
297
- var Wn = P(function({ className: e, variant: t = "default", level: r = 1, children: i, fullWidth: a = !1, defaultOpen: o = !0, open: s, isRounded: c = !0, isCollapsible: l = !0, isSelected: u = !1, onOpenChange: d, onClick: f, ...p }, m) {
298
- let h = s !== void 0, [g, _] = V(o), v = h ? s : g, y = F((e) => {
296
+ var Kn = P(function({ className: e, variant: t = "default", level: n = 1, children: r, fullWidth: i = !1, defaultOpen: a = !0, open: o, isRounded: c = !0, isCollapsible: l = !0, isSelected: u = !1, onOpenChange: d, onClick: f, ...p }, m) {
297
+ let h = o !== void 0, [g, _] = V(a), v = h ? o : g, y = F((e) => {
299
298
  h || _(e), d?.(e);
300
299
  }, [h, d]), b = z(() => ({
301
300
  isCollapsible: l,
302
- level: r,
301
+ level: n,
303
302
  open: v
304
303
  }), [
305
304
  l,
306
- r,
305
+ n,
307
306
  v
308
307
  ]);
309
308
  function x(e) {
310
309
  f?.(e), !e.defaultPrevented && l && !v && y(!0);
311
310
  }
312
- return /* @__PURE__ */ H(Sn, {
311
+ return /* @__PURE__ */ H(wn, {
313
312
  value: b,
314
- children: /* @__PURE__ */ H(n, {
313
+ children: /* @__PURE__ */ H(s, {
315
314
  isDisabled: !l,
316
315
  open: v,
317
316
  onOpenChange: y,
@@ -323,23 +322,23 @@ var Wn = P(function({ className: e, variant: t = "default", level: r = 1, childr
323
322
  "aria-current": u,
324
323
  "data-testid": "chat-card",
325
324
  "data-variant": t,
326
- "data-level": r,
327
- "data-full-width": a,
325
+ "data-level": n,
326
+ "data-full-width": i,
328
327
  "data-rounded": c,
329
328
  "data-selected": u,
330
329
  "data-collapsible": l,
331
330
  onClick: x,
332
331
  className: M("group/chat-card", "w-full data-[state=closed]:max-w-(--message-list-content-width) data-[state=closed]:mx-auto", "flex flex-col", "relative overflow-hidden", "border border-solid border-card-border-base", "data-[level=1]:bg-card-background-base", "data-[level=2]:bg-card-background-lvl-2", "data-[full-width=true]:w-full", "data-[level=1]:data-[rounded=true]:rounded-card-lvl-1", "data-[level=2]:data-[rounded=true]:rounded-card-lvl-2", "data-[selected=true]:border-primary-main", "hover:data-[variant=action]:bg-secondary-states-hover", "data-[collapsible=true]:data-[state=closed]:cursor-pointer", e),
333
332
  ...p,
334
- children: i
333
+ children: r
335
334
  })
336
335
  })
337
336
  });
338
337
  });
339
- Wn.displayName = "ChatCard";
338
+ Kn.displayName = "ChatCard";
340
339
  //#endregion
341
340
  //#region src/components/chat-card/hooks.ts
342
- function Gn({ isEditable: e, defaultEditing: t = !1 }) {
341
+ function qn({ isEditable: e, defaultEditing: t = !1 }) {
343
342
  let [n, r] = V(t);
344
343
  function i() {
345
344
  return e ? !0 : (console.warn("Chat card is not editable"), !1);
@@ -363,25 +362,25 @@ function Gn({ isEditable: e, defaultEditing: t = !1 }) {
363
362
  }
364
363
  //#endregion
365
364
  //#region src/components/chat-card/contexts.tsx
366
- var Kn = N(null);
367
- function qn() {
368
- let e = I(Kn);
365
+ var Jn = N(null);
366
+ function Yn() {
367
+ let e = I(Jn);
369
368
  if (!e) throw Error("\"useEditableChatCardContext\" must be used within a EditableChatCardContextProvider");
370
369
  return e;
371
370
  }
372
- function Jn({ children: e, defaultEditing: t = !1, isEditable: n = !1 }) {
373
- let r = Gn({
371
+ function Xn({ children: e, defaultEditing: t = !1, isEditable: n = !1 }) {
372
+ let r = qn({
374
373
  isEditable: n,
375
374
  defaultEditing: t
376
375
  });
377
- return /* @__PURE__ */ H(Kn.Provider, {
376
+ return /* @__PURE__ */ H(Jn.Provider, {
378
377
  value: r,
379
378
  children: e
380
379
  });
381
380
  }
382
381
  //#endregion
383
382
  //#region src/components/chat-card-container/chat-card-container.tsx
384
- function Yn({ children: e, variant: t = "fixed", inline: n = !1, className: r, ...i }) {
383
+ function Zn({ children: e, variant: t = "fixed", inline: n = !1, className: r, ...i }) {
385
384
  return /* @__PURE__ */ H("div", {
386
385
  "data-slot": "chat-card-container",
387
386
  "data-testid": "chat-card-container",
@@ -394,21 +393,21 @@ function Yn({ children: e, variant: t = "fixed", inline: n = !1, className: r, .
394
393
  }
395
394
  //#endregion
396
395
  //#region src/components/chat-container/chat-container.tsx
397
- var Xn = "var(--spacing-chat-area)", Zn = {
396
+ var Qn = "var(--spacing-chat-area)", $n = {
398
397
  prompt: "--type-window-height",
399
398
  welcome: "--welcome-screen-box-height"
400
399
  };
401
- function Qn(e) {
400
+ function er(e) {
402
401
  return e === "unset" ? "unset" : `${e}px`;
403
402
  }
404
- var $n = N(null);
405
- function er() {
406
- let e = I($n);
403
+ var tr = N(null);
404
+ function nr() {
405
+ let e = I(tr);
407
406
  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.");
408
407
  return e;
409
408
  }
410
- function tr({ asChild: e = !1, children: t, className: n, contentWidth: r = Xn, style: i, ...a }) {
411
- let o = e ? W : "section", { ref: s, width: c, height: l } = ue(), [u, d] = V({
409
+ function rr({ asChild: e = !1, children: t, className: n, contentWidth: r = Qn, style: i, ...a }) {
410
+ let o = e ? W : "section", { ref: s, width: c, height: l } = he(), [u, d] = V({
412
411
  prompt: "unset",
413
412
  welcome: "unset"
414
413
  }), f = F((e, t) => {
@@ -420,8 +419,8 @@ function tr({ asChild: e = !1, children: t, className: n, contentWidth: r = Xn,
420
419
  "--chat-window-width": c === "unset" ? "100%" : `${c}px`,
421
420
  "--chat-window-height": l === "unset" ? "100%" : `${l}px`,
422
421
  "--message-list-content-width": `min(${r}, var(--chat-window-width))`,
423
- [Zn.prompt]: Qn(u.prompt),
424
- [Zn.welcome]: Qn(u.welcome),
422
+ [$n.prompt]: er(u.prompt),
423
+ [$n.welcome]: er(u.welcome),
425
424
  ...i
426
425
  }), [
427
426
  c,
@@ -430,7 +429,7 @@ function tr({ asChild: e = !1, children: t, className: n, contentWidth: r = Xn,
430
429
  u,
431
430
  i
432
431
  ]);
433
- return /* @__PURE__ */ H($n.Provider, {
432
+ return /* @__PURE__ */ H(tr.Provider, {
434
433
  value: p,
435
434
  children: /* @__PURE__ */ H(o, {
436
435
  ref: s,
@@ -443,16 +442,16 @@ function tr({ asChild: e = !1, children: t, className: n, contentWidth: r = Xn,
443
442
  })
444
443
  });
445
444
  }
446
- function nr(e) {
447
- let { setSlotHeight: t } = er(), { ref: n, height: r } = ue();
445
+ function ir(e) {
446
+ let { setSlotHeight: t } = nr(), { ref: n, height: r } = he();
448
447
  return R(() => (t(e, r), () => t(e, "unset")), [
449
448
  e,
450
449
  r,
451
450
  t
452
451
  ]), n;
453
452
  }
454
- function rr({ asChild: e = !1, children: t, className: n, ...r }) {
455
- let i = nr("prompt");
453
+ function ar({ asChild: e = !1, children: t, className: n, ...r }) {
454
+ let i = ir("prompt");
456
455
  return /* @__PURE__ */ H(e ? W : "div", {
457
456
  ref: i,
458
457
  "data-slot": "chat-container-prompt",
@@ -462,8 +461,8 @@ function rr({ asChild: e = !1, children: t, className: n, ...r }) {
462
461
  children: t
463
462
  });
464
463
  }
465
- function ir({ asChild: e = !1, children: t, className: n, ...r }) {
466
- let i = nr("welcome");
464
+ function or({ asChild: e = !1, children: t, className: n, ...r }) {
465
+ let i = ir("welcome");
467
466
  return /* @__PURE__ */ H(e ? W : "div", {
468
467
  ref: i,
469
468
  "data-slot": "chat-container-welcome",
@@ -475,8 +474,8 @@ function ir({ asChild: e = !1, children: t, className: n, ...r }) {
475
474
  }
476
475
  //#endregion
477
476
  //#region src/components/chat-input/plugins/auto-focus-plugin.tsx
478
- function ar({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
479
- let [r] = Pe();
477
+ function sr({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
478
+ let [r] = Re();
480
479
  return L(() => {
481
480
  t && !n && r.focus(() => {
482
481
  let e = document.activeElement, t = r.getRootElement();
@@ -491,36 +490,36 @@ function ar({ defaultSelection: e = "rootEnd", autoFocus: t, isDisabled: n }) {
491
490
  }
492
491
  //#endregion
493
492
  //#region src/components/chat-input/transformers.ts
494
- var or = Le, sr = Le;
493
+ var cr = Ve, lr = Ve;
495
494
  //#endregion
496
495
  //#region src/components/chat-input/plugins/hooks.ts
497
- function cr() {
498
- let [e] = Pe();
496
+ function ur() {
497
+ let [e] = Re();
499
498
  return e;
500
499
  }
501
500
  //#endregion
502
501
  //#region src/components/chat-input/plugins/utils.ts
503
- function lr() {
502
+ function dr() {
504
503
  return G().getTextContent();
505
504
  }
506
- function ur() {
505
+ function fr() {
507
506
  let e = G().getLastDescendant();
508
507
  if (e && J(e)) {
509
- let t = Ve(), n = e.getTextContentSize();
510
- t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Je(t);
508
+ let t = Ge(), n = e.getTextContentSize();
509
+ t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Qe(t);
511
510
  } else {
512
- qe();
511
+ Ze();
513
512
  let e = K();
514
513
  if (q(e)) {
515
514
  let t = e.focus.getNode(), n = J(t) ? t.getTextContentSize() : 0;
516
- e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Je(e);
515
+ e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Qe(e);
517
516
  }
518
517
  }
519
518
  }
520
519
  //#endregion
521
520
  //#region src/components/chat-input/plugins/controlled-value-plugin.tsx
522
- function dr({ value: e, emittedValuesRef: t }) {
523
- let n = cr(), r = B();
521
+ function pr({ value: e, emittedValuesRef: t }) {
522
+ let n = ur(), r = B();
524
523
  return L(() => {
525
524
  if (!n || e === r.current) return;
526
525
  if (r.current = e, t && e !== void 0) {
@@ -529,9 +528,9 @@ function dr({ value: e, emittedValuesRef: t }) {
529
528
  }
530
529
  let i = "";
531
530
  n.getEditorState().read(() => {
532
- i = Ie(or);
531
+ i = Be(cr);
533
532
  }), e !== void 0 && e !== i && n.update(() => {
534
- ze(at), Fe(e ?? "", sr), ur();
533
+ Ue(lt), ze(e ?? "", lr), fr();
535
534
  }, { discrete: !0 });
536
535
  }, [
537
536
  n,
@@ -541,8 +540,8 @@ function dr({ value: e, emittedValuesRef: t }) {
541
540
  }
542
541
  //#endregion
543
542
  //#region src/components/chat-input/plugins/disabled-plugin.tsx
544
- function fr({ isDisabled: e, isReadOnly: t }) {
545
- let n = cr();
543
+ function mr({ isDisabled: e, isReadOnly: t }) {
544
+ let n = ur();
546
545
  return L(() => {
547
546
  n.setEditable(!e && !t);
548
547
  }, [
@@ -553,8 +552,8 @@ function fr({ isDisabled: e, isReadOnly: t }) {
553
552
  }
554
553
  //#endregion
555
554
  //#region src/components/chat-input/plugins/focus-plugin.tsx
556
- function pr({ onFocusChange: e }) {
557
- let t = cr();
555
+ function hr({ onFocusChange: e }) {
556
+ let t = ur();
558
557
  return L(() => {
559
558
  if (!e) return;
560
559
  let n = t.getRootElement();
@@ -572,29 +571,29 @@ function pr({ onFocusChange: e }) {
572
571
  }
573
572
  //#endregion
574
573
  //#region src/components/chat-input/plugins/has-value-plugin.tsx
575
- function mr(e) {
574
+ function gr(e) {
576
575
  let t = !1;
577
576
  return e.getEditorState().read(() => {
578
- t = lr().length > 0;
577
+ t = dr().length > 0;
579
578
  }), t;
580
579
  }
581
- function hr(e, t, n) {
582
- let r = mr(e);
580
+ function _r(e, t, n) {
581
+ let r = gr(e);
583
582
  n.current !== r && (n.current = r, t?.(r));
584
583
  }
585
- function gr({ onHasValueChange: e }) {
586
- let t = cr(), n = B();
584
+ function vr({ onHasValueChange: e }) {
585
+ let t = ur(), n = B();
587
586
  return L(() => {
588
- if (t) return hr(t, e, n), t.registerUpdateListener(() => {
589
- hr(t, e, n);
587
+ if (t) return _r(t, e, n), t.registerUpdateListener(() => {
588
+ _r(t, e, n);
590
589
  });
591
590
  }, [t, e]), null;
592
591
  }
593
592
  //#endregion
594
593
  //#region src/components/chat-input/plugins/markdown-plain-paste-plugin.tsx
595
- function _r() {
596
- let e = cr();
597
- return L(() => e.registerCommand(rt, (t) => {
594
+ function yr() {
595
+ let e = ur();
596
+ return L(() => e.registerCommand(st, (t) => {
598
597
  let { clipboardData: n } = t;
599
598
  if (!n) return !1;
600
599
  let r = n.getData("text/plain");
@@ -606,46 +605,46 @@ function _r() {
606
605
  }
607
606
  let t = G();
608
607
  t.clear(), r.split(/\r?\n/).forEach((e) => {
609
- let n = Be();
610
- e.length > 0 && n.append(He(e)), t.append(n);
608
+ let n = We();
609
+ e.length > 0 && n.append(Ke(e)), t.append(n);
611
610
  });
612
611
  }), !0) : !1;
613
- }, Xe), [e]), null;
612
+ }, et), [e]), null;
614
613
  }
615
614
  //#endregion
616
615
  //#region src/components/chat-input/plugins/value-plugin.tsx
617
- var vr = 50;
618
- function yr({ onChange: e, emittedValuesRef: t }) {
616
+ var br = 50;
617
+ function xr({ onChange: e, emittedValuesRef: t }) {
619
618
  let n = F((n, r, i) => {
620
619
  if (!i.has("focus") && e) try {
621
620
  n.read(() => {
622
- let n = Ie(or);
623
- t && (t.current.push(n), t.current.splice(0, t.current.length - vr)), e(n);
621
+ let n = Be(cr);
622
+ t && (t.current.push(n), t.current.splice(0, t.current.length - br)), e(n);
624
623
  });
625
624
  } catch (e) {
626
625
  console.error("ValuePlugin error:", e);
627
626
  }
628
627
  }, [e, t]);
629
- return /* @__PURE__ */ H(dt, { onChange: n });
628
+ return /* @__PURE__ */ H(ht, { onChange: n });
630
629
  }
631
630
  //#endregion
632
631
  //#region src/components/chat-input/chat-input.tsx
633
- var br = N(null);
634
- function xr() {
635
- let e = I(br);
632
+ var Sr = N(null);
633
+ function Cr() {
634
+ let e = I(Sr);
636
635
  if (!e) throw Error("\"useChatInputContext\" must be used within a ChatInputContextProvider");
637
636
  return e;
638
637
  }
639
- var Sr = {
638
+ var wr = {
640
639
  namespace: "chat-input",
641
640
  editable: !0,
642
641
  nodes: [
643
- Me,
644
- Ne,
645
- Te,
646
- we,
647
- ve,
648
- be
642
+ Ie,
643
+ Le,
644
+ ke,
645
+ Oe,
646
+ Se,
647
+ we
649
648
  ],
650
649
  theme: {
651
650
  paragraph: "m-0 min-h-[26px]",
@@ -658,7 +657,7 @@ var Sr = {
658
657
  onError: (e) => {
659
658
  console.error("ChatInput Lexical error:", e);
660
659
  }
661
- }, Cr = P(function({ className: e, children: t, initialConfig: n = Sr, ...r }, i) {
660
+ }, Tr = P(function({ className: e, children: t, initialConfig: n = wr, ...r }, i) {
662
661
  let [a, o] = V(!1), [s, c] = V(!1), [l, u] = V(!1), d = z(() => ({
663
662
  hasError: a,
664
663
  hasValue: s,
@@ -671,9 +670,9 @@ var Sr = {
671
670
  s,
672
671
  l
673
672
  ]);
674
- return /* @__PURE__ */ H(br.Provider, {
673
+ return /* @__PURE__ */ H(Sr.Provider, {
675
674
  value: d,
676
- children: /* @__PURE__ */ H(Ee, {
675
+ children: /* @__PURE__ */ H(Ae, {
677
676
  initialConfig: n,
678
677
  children: /* @__PURE__ */ H("div", {
679
678
  ref: i,
@@ -690,8 +689,8 @@ var Sr = {
690
689
  })
691
690
  });
692
691
  });
693
- Cr.displayName = "ChatInput";
694
- var wr = P(function({ className: e, children: t, ...n }, r) {
692
+ Tr.displayName = "ChatInput";
693
+ var Er = P(function({ className: e, children: t, ...n }, r) {
695
694
  return /* @__PURE__ */ H(j, {
696
695
  ref: r,
697
696
  variant: "body",
@@ -704,9 +703,9 @@ var wr = P(function({ className: e, children: t, ...n }, r) {
704
703
  })
705
704
  });
706
705
  });
707
- wr.displayName = "ChatInputPlaceholder";
708
- var Tr = P(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) {
709
- let { setHasValue: p, setIsFocused: m } = xr(), h = c && !s, g = B([]);
706
+ Er.displayName = "ChatInputPlaceholder";
707
+ var Dr = P(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) {
708
+ let { setHasValue: p, setIsFocused: m } = Cr(), h = c && !s, g = B([]);
710
709
  return /* @__PURE__ */ U("div", {
711
710
  "data-slot": "chat-input-textarea",
712
711
  "data-testid": "chat-input-textarea",
@@ -718,38 +717,38 @@ var Tr = P(function({ className: e, style: t, placeholderClassName: n, placehold
718
717
  style: t,
719
718
  ...d,
720
719
  children: [
721
- /* @__PURE__ */ H(Ae, {
722
- contentEditable: /* @__PURE__ */ H(De, {
720
+ /* @__PURE__ */ H(Pe, {
721
+ contentEditable: /* @__PURE__ */ H(je, {
723
722
  ref: f,
724
723
  "data-slot": "chat-input-editable",
725
724
  className: M("min-h-[26px]!", "overflow-y-auto text-wrap outline-none", e),
726
725
  "aria-label": "Chat input",
727
726
  "aria-placeholder": r,
728
- placeholder: /* @__PURE__ */ H(wr, {
727
+ placeholder: /* @__PURE__ */ H(Er, {
729
728
  className: n,
730
729
  children: r
731
730
  }),
732
731
  onKeyDown: u
733
732
  }),
734
- ErrorBoundary: Oe
733
+ ErrorBoundary: Me
735
734
  }),
736
- /* @__PURE__ */ H(ke, {}),
737
- /* @__PURE__ */ H(fr, {
735
+ /* @__PURE__ */ H(Ne, {}),
736
+ /* @__PURE__ */ H(mr, {
738
737
  isDisabled: s,
739
738
  isReadOnly: c
740
739
  }),
741
- /* @__PURE__ */ H(dr, {
740
+ /* @__PURE__ */ H(pr, {
742
741
  value: a,
743
742
  emittedValuesRef: g
744
743
  }),
745
- /* @__PURE__ */ H(yr, {
744
+ /* @__PURE__ */ H(xr, {
746
745
  onChange: l,
747
746
  emittedValuesRef: g
748
747
  }),
749
- /* @__PURE__ */ H(_r, {}),
750
- /* @__PURE__ */ H(gr, { onHasValueChange: p }),
751
- /* @__PURE__ */ H(pr, { onFocusChange: m }),
752
- /* @__PURE__ */ H(ar, {
748
+ /* @__PURE__ */ H(yr, {}),
749
+ /* @__PURE__ */ H(vr, { onHasValueChange: p }),
750
+ /* @__PURE__ */ H(hr, { onFocusChange: m }),
751
+ /* @__PURE__ */ H(sr, {
753
752
  autoFocus: o,
754
753
  isDisabled: s || c
755
754
  }),
@@ -757,16 +756,16 @@ var Tr = P(function({ className: e, style: t, placeholderClassName: n, placehold
757
756
  ]
758
757
  });
759
758
  });
760
- Tr.displayName = "ChatInputTextarea";
759
+ Dr.displayName = "ChatInputTextarea";
761
760
  //#endregion
762
761
  //#region src/components/chat-list/chat-list.tsx
763
- var Er = N(null);
764
- function Dr() {
765
- let e = I(Er);
762
+ var Or = N(null);
763
+ function kr() {
764
+ let e = I(Or);
766
765
  if (!e) throw Error("\"useChatListContext\" must be used within a ChatList");
767
766
  return e;
768
767
  }
769
- function Or({ children: e, className: t, loadedCount: n, totalCount: r, hasMore: i, isLoading: a = !1, isLoadingMore: o = !1, hasError: s = !1, onLoadMore: c, getItemKey: l, "aria-label": u = "Chat list" }) {
768
+ function Ar({ children: e, className: t, loadedCount: n, totalCount: r, hasMore: i, isLoading: a = !1, isLoadingMore: o = !1, hasError: s = !1, onLoadMore: c, getItemKey: l, "aria-label": u = "Chat list" }) {
770
769
  let d = B(null), f = B(null), [p, m] = V(0), [h, g] = V(null), [, _] = V(0), v = F((e) => {
771
770
  d.current = e, _((e) => e + 1);
772
771
  }, []), y = F(() => {
@@ -803,7 +802,7 @@ function Or({ children: e, className: t, loadedCount: n, totalCount: r, hasMore:
803
802
  y,
804
803
  h
805
804
  ]);
806
- return /* @__PURE__ */ H(Er.Provider, {
805
+ return /* @__PURE__ */ H(Or.Provider, {
807
806
  value: S,
808
807
  children: /* @__PURE__ */ H("div", {
809
808
  "data-slot": "chat-list",
@@ -819,10 +818,10 @@ function Or({ children: e, className: t, loadedCount: n, totalCount: r, hasMore:
819
818
  })
820
819
  });
821
820
  }
822
- var kr = ["w-2/3", "w-1/2"], Ar = ["w-full", "w-4/5"];
823
- function jr({ children: e, rows: t = 16, className: n, rowClassName: r }) {
824
- let { isLoading: i, loadedCount: a, skeletonContainer: o } = Dr();
825
- return !(i && a === 0) || !o ? null : ft(/* @__PURE__ */ H("div", {
821
+ var jr = ["w-2/3", "w-1/2"], Mr = ["w-full", "w-4/5"];
822
+ function Nr({ children: e, rows: t = 16, className: n, rowClassName: r }) {
823
+ let { isLoading: i, loadedCount: a, skeletonContainer: o } = kr();
824
+ return !(i && a === 0) || !o ? null : gt(/* @__PURE__ */ H("div", {
826
825
  "data-slot": "chat-list-skeleton",
827
826
  "data-testid": "chat-list-skeleton",
828
827
  role: "status",
@@ -834,16 +833,16 @@ function jr({ children: e, rows: t = 16, className: n, rowClassName: r }) {
834
833
  className: M("flex shrink-0 flex-col gap-4 px-12 py-8", r),
835
834
  children: [/* @__PURE__ */ H("div", {
836
835
  className: "flex h-20 items-center",
837
- children: /* @__PURE__ */ H(oe, { className: M("h-12", kr[t % 2]) })
836
+ children: /* @__PURE__ */ H(de, { className: M("h-12", jr[t % 2]) })
838
837
  }), /* @__PURE__ */ H("div", {
839
838
  className: "flex h-16 items-center",
840
- children: /* @__PURE__ */ H(oe, { className: M("h-10", Ar[t % 2]) })
839
+ children: /* @__PURE__ */ H(de, { className: M("h-10", Mr[t % 2]) })
841
840
  })]
842
841
  }, t))
843
842
  }), o);
844
843
  }
845
- function Mr({ children: e, className: t }) {
846
- let { isEmpty: n } = Dr();
844
+ function Pr({ children: e, className: t }) {
845
+ let { isEmpty: n } = kr();
847
846
  return n ? /* @__PURE__ */ H("div", {
848
847
  "data-slot": "chat-list-empty-state",
849
848
  "data-testid": "chat-list-empty-state",
@@ -854,8 +853,8 @@ function Mr({ children: e, className: t }) {
854
853
  children: e
855
854
  }) : null;
856
855
  }
857
- function Nr({ children: e, error: t, className: n, messageClassName: r }) {
858
- let { hasError: i, loadedCount: a } = Dr();
856
+ function Fr({ children: e, error: t, className: n, messageClassName: r }) {
857
+ let { hasError: i, loadedCount: a } = kr();
859
858
  return i && a === 0 ? /* @__PURE__ */ H("div", {
860
859
  "data-slot": "chat-list-error",
861
860
  "data-testid": "chat-list-error",
@@ -870,57 +869,57 @@ function Nr({ children: e, error: t, className: n, messageClassName: r }) {
870
869
  })
871
870
  }) : null;
872
871
  }
873
- function Pr({ children: e }) {
874
- let { loadMoreContentRef: t, bumpLoadMore: n } = Dr();
872
+ function Ir({ children: e }) {
873
+ let { loadMoreContentRef: t, bumpLoadMore: n } = kr();
875
874
  return t.current = e ?? null, R(() => (n(), () => {
876
875
  t.current = null, n();
877
876
  }), [n, t]), null;
878
877
  }
879
878
  //#endregion
880
879
  //#region src/components/chat-list/chat-list-items.tsx
881
- var Fr = "chat-list-load-more", Ir = he(function({ children: e, className: t, listClassName: n, rowClassName: r, estimateSize: i = 54, overscan: a = 6, gap: o = 4 }) {
882
- let { loadedCount: s, hasMore: c, isLoading: l, isLoadingMore: u, onLoadMore: d, getItemKey: f, scrollElementRef: p, setScrollElement: m, loadMoreContentRef: h, loadMoreVersion: g, setSkeletonContainer: _ } = Dr(), v = g >= 0 ? h.current : null, b = l && s === 0, x = c ? s + 1 : s, S = F((e) => e >= s ? Fr : f(e), [f, s]), C = pt({
883
- count: b ? 0 : x,
880
+ var Lr = "chat-list-load-more", Rr = ye(function({ children: e, className: t, listClassName: n, rowClassName: r, estimateSize: i = 54, overscan: a = 6, gap: o = 4 }) {
881
+ let { loadedCount: s, hasMore: c, isLoading: l, isLoadingMore: u, onLoadMore: d, getItemKey: f, scrollElementRef: p, setScrollElement: m, loadMoreContentRef: h, loadMoreVersion: g, setSkeletonContainer: _ } = kr(), v = g >= 0 ? h.current : null, y = l && s === 0, b = c ? s + 1 : s, x = F((e) => e >= s ? Lr : f(e), [f, s]), S = _t({
882
+ count: y ? 0 : b,
884
883
  getScrollElement: () => p.current,
885
884
  estimateSize: () => i,
886
885
  overscan: a,
887
886
  gap: o,
888
- getItemKey: S
889
- }), w = C.getVirtualItems();
887
+ getItemKey: x
888
+ }), C = S.getVirtualItems();
890
889
  return L(() => {
891
- if (b) return;
892
- let [e] = [...w].reverse();
890
+ if (y) return;
891
+ let [e] = [...C].reverse();
893
892
  e && e.index >= s - 1 && c && !u && d?.();
894
893
  }, [
895
- w,
894
+ C,
896
895
  s,
897
896
  c,
898
897
  u,
899
898
  d,
900
- b
901
- ]), b ? /* @__PURE__ */ H("div", {
899
+ y
900
+ ]), y ? /* @__PURE__ */ H("div", {
902
901
  ref: _,
903
902
  "data-slot": "chat-list-items",
904
903
  "data-testid": "chat-list-items",
905
904
  className: M("flex min-h-0 flex-1 flex-col overflow-hidden", t)
906
- }) : /* @__PURE__ */ H(ae, {
905
+ }) : /* @__PURE__ */ H(le, {
907
906
  ref: m,
908
907
  "data-slot": "chat-list-items",
909
908
  "data-testid": "chat-list-items",
910
909
  className: M("min-h-0 flex-1", "overflow-auto", t),
911
- children: /* @__PURE__ */ H(y, {
910
+ children: /* @__PURE__ */ H(ee, {
912
911
  "data-slot": "chat-list-items-list",
913
912
  role: "list",
914
913
  "aria-label": "Chats",
915
914
  className: M("table relative w-full transform-gpu table-fixed", "space-y-[4px]", n),
916
- style: { height: `${C.getTotalSize()}px` },
917
- children: w.map((t) => {
915
+ style: { height: `${S.getTotalSize()}px` },
916
+ children: C.map((t) => {
918
917
  let n = t.index >= s;
919
918
  return /* @__PURE__ */ H("li", {
920
919
  "data-slot": "chat-list-items-row",
921
920
  "data-index": t.index,
922
921
  "data-load-more": n,
923
- ref: C.measureElement,
922
+ ref: S.measureElement,
924
923
  role: n ? "status" : "listitem",
925
924
  "aria-live": n ? "polite" : void 0,
926
925
  "aria-busy": n ? u : void 0,
@@ -937,7 +936,7 @@ var Fr = "chat-list-load-more", Ir = he(function({ children: e, className: t, li
937
936
  })
938
937
  })
939
938
  });
940
- }), Lr = P(function({ children: e, className: t, asChild: n = !1, isSelected: r = !1, ...i }, a) {
939
+ }), zr = P(function({ children: e, className: t, asChild: n = !1, isSelected: r = !1, ...i }, a) {
941
940
  return /* @__PURE__ */ H(n ? W : "div", {
942
941
  ref: a,
943
942
  "data-slot": "chat-list-item",
@@ -949,16 +948,16 @@ var Fr = "chat-list-load-more", Ir = he(function({ children: e, className: t, li
949
948
  children: e
950
949
  });
951
950
  });
952
- Lr.displayName = "ChatListItem";
951
+ zr.displayName = "ChatListItem";
953
952
  //#endregion
954
953
  //#region src/components/chat-prompt-box/chat-prompt-box-context.tsx
955
- var Rr = N(null);
956
- function zr() {
957
- let e = I(Rr);
954
+ var Br = N(null);
955
+ function Vr() {
956
+ let e = I(Br);
958
957
  if (!e) throw Error("\"useChatPromptBoxContext\" must be used within a ChatPromptBox");
959
958
  return e;
960
959
  }
961
- function Br({ children: e, reportInputHeight: t, resetCompact: n }) {
960
+ function Hr({ children: e, reportInputHeight: t, resetCompact: n }) {
962
961
  let r = B(null), i = F((e) => {
963
962
  r.current = e;
964
963
  }, []), a = F(() => {
@@ -978,15 +977,15 @@ function Br({ children: e, reportInputHeight: t, resetCompact: n }) {
978
977
  a,
979
978
  o
980
979
  ]);
981
- return /* @__PURE__ */ H(Rr.Provider, {
980
+ return /* @__PURE__ */ H(Br.Provider, {
982
981
  value: s,
983
982
  children: e
984
983
  });
985
984
  }
986
985
  //#endregion
987
986
  //#region src/components/chat-prompt-box/chat-prompt-box-focus-plugin.tsx
988
- function Vr() {
989
- let e = cr(), { registerFocusInput: t, unregisterFocusInput: n } = zr();
987
+ function Ur() {
988
+ let e = ur(), { registerFocusInput: t, unregisterFocusInput: n } = Vr();
990
989
  return L(() => (t(() => {
991
990
  e.focus();
992
991
  }), () => {
@@ -999,32 +998,32 @@ function Vr() {
999
998
  }
1000
999
  //#endregion
1001
1000
  //#region src/components/chat-prompt-box/chat-prompt-box.tsx
1002
- var Hr = 40, Ur = "button, a, input, select, textarea, [role=\"button\"]";
1003
- function Wr(e) {
1004
- return e instanceof HTMLElement && !!e.closest(Ur);
1001
+ var Wr = 40, Gr = "button, a, input, select, textarea, [role=\"button\"]";
1002
+ function Kr(e) {
1003
+ return e instanceof HTMLElement && !!e.closest(Gr);
1005
1004
  }
1006
- var Gr = P(function(e, t) {
1005
+ var qr = P(function(e, t) {
1007
1006
  let [n, r] = V(!0), i = F((e) => {
1008
- e > Hr && r(!1);
1007
+ e > Wr && r(!1);
1009
1008
  }, []), a = F(() => {
1010
1009
  r(!0);
1011
1010
  }, []);
1012
- return /* @__PURE__ */ H(Br, {
1011
+ return /* @__PURE__ */ H(Hr, {
1013
1012
  reportInputHeight: i,
1014
1013
  resetCompact: a,
1015
- children: /* @__PURE__ */ H(Kr, {
1014
+ children: /* @__PURE__ */ H(Jr, {
1016
1015
  ref: t,
1017
1016
  "data-compact": n,
1018
1017
  ...e
1019
1018
  })
1020
1019
  });
1021
1020
  });
1022
- Gr.displayName = "ChatPromptBox";
1023
- var Kr = P(function({ className: e, innerClassName: t, children: n, onMouseDown: r, ...i }, a) {
1024
- let { focusInput: o } = zr(), s = F((e) => {
1025
- Wr(e.target) || o(), r?.(e);
1021
+ qr.displayName = "ChatPromptBox";
1022
+ var Jr = P(function({ className: e, innerClassName: t, children: n, onMouseDown: r, ...i }, a) {
1023
+ let { focusInput: o } = Vr(), s = F((e) => {
1024
+ Kr(e.target) || o(), r?.(e);
1026
1025
  }, [o, r]);
1027
- return /* @__PURE__ */ U(Cr, {
1026
+ return /* @__PURE__ */ U(Tr, {
1028
1027
  ref: a,
1029
1028
  "data-slot": "chat-prompt-box",
1030
1029
  className: M("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),
@@ -1034,12 +1033,12 @@ var Kr = P(function({ className: e, innerClassName: t, children: n, onMouseDown:
1034
1033
  "data-slot": "chat-prompt-box-inner",
1035
1034
  className: M("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),
1036
1035
  children: n
1037
- }), /* @__PURE__ */ H(qr, {})]
1036
+ }), /* @__PURE__ */ H(Yr, {})]
1038
1037
  });
1039
1038
  });
1040
- Kr.displayName = "ChatPromptBoxContainer";
1041
- function qr() {
1042
- return /* @__PURE__ */ U(_e, { children: [/* @__PURE__ */ H("div", {
1039
+ Jr.displayName = "ChatPromptBoxContainer";
1040
+ function Yr() {
1041
+ return /* @__PURE__ */ U(xe, { children: [/* @__PURE__ */ H("div", {
1043
1042
  "data-slot": "chat-prompt-box-glow-top",
1044
1043
  className: M("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"),
1045
1044
  style: {
@@ -1055,7 +1054,7 @@ function qr() {
1055
1054
  }
1056
1055
  })] });
1057
1056
  }
1058
- function Jr({ className: e, children: t, ...n }) {
1057
+ function Xr({ className: e, children: t, ...n }) {
1059
1058
  return /* @__PURE__ */ H("div", {
1060
1059
  "data-slot": "chat-prompt-box-toolbar",
1061
1060
  "data-testid": "chat-prompt-box-toolbar",
@@ -1064,7 +1063,7 @@ function Jr({ className: e, children: t, ...n }) {
1064
1063
  children: t
1065
1064
  });
1066
1065
  }
1067
- function Yr({ className: e, children: t, ...n }) {
1066
+ function Zr({ className: e, children: t, ...n }) {
1068
1067
  return /* @__PURE__ */ H("div", {
1069
1068
  "data-slot": "chat-prompt-box-content",
1070
1069
  "data-testid": "chat-prompt-box-content",
@@ -1073,8 +1072,8 @@ function Yr({ className: e, children: t, ...n }) {
1073
1072
  children: t
1074
1073
  });
1075
1074
  }
1076
- var Xr = P(function({ className: e, textareaClassName: t, placeholderClassName: n, children: r, ...i }, a) {
1077
- let { reportInputHeight: o, resetCompact: s } = zr(), { hasValue: c } = xr(), { ref: l, height: u } = ue();
1075
+ var Qr = P(function({ className: e, textareaClassName: t, placeholderClassName: n, children: r, ...i }, a) {
1076
+ let { reportInputHeight: o, resetCompact: s } = Vr(), { hasValue: c } = Cr(), { ref: l, height: u } = he();
1078
1077
  R(() => {
1079
1078
  typeof u == "number" && o(u);
1080
1079
  }, [u, o]), R(() => () => {
@@ -1089,17 +1088,17 @@ var Xr = P(function({ className: e, textareaClassName: t, placeholderClassName:
1089
1088
  "data-slot": "chat-prompt-box-input",
1090
1089
  "data-testid": "chat-prompt-box-input",
1091
1090
  className: M("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),
1092
- children: /* @__PURE__ */ U(Tr, {
1091
+ children: /* @__PURE__ */ U(Dr, {
1093
1092
  ref: d,
1094
1093
  className: M("max-h-[72px]!", t),
1095
1094
  placeholderClassName: M("leading-[24px]!", n),
1096
1095
  ...i,
1097
- children: [/* @__PURE__ */ H(Vr, {}), r]
1096
+ children: [/* @__PURE__ */ H(Ur, {}), r]
1098
1097
  })
1099
1098
  });
1100
1099
  });
1101
- Xr.displayName = "ChatPromptBoxInput";
1102
- function Zr({ className: e, children: t, ...n }) {
1100
+ Qr.displayName = "ChatPromptBoxInput";
1101
+ function $r({ className: e, children: t, ...n }) {
1103
1102
  return /* @__PURE__ */ H("div", {
1104
1103
  "data-slot": "chat-prompt-box-actions-left",
1105
1104
  "data-testid": "chat-prompt-box-actions-left",
@@ -1109,7 +1108,7 @@ function Zr({ className: e, children: t, ...n }) {
1109
1108
  children: t
1110
1109
  });
1111
1110
  }
1112
- function Qr({ className: e, children: t, ...n }) {
1111
+ function ei({ className: e, children: t, ...n }) {
1113
1112
  return /* @__PURE__ */ H("div", {
1114
1113
  "data-slot": "chat-prompt-box-actions-right",
1115
1114
  "data-testid": "chat-prompt-box-actions-right",
@@ -1121,7 +1120,7 @@ function Qr({ className: e, children: t, ...n }) {
1121
1120
  }
1122
1121
  //#endregion
1123
1122
  //#region src/components/chat-message/chat-message.tsx
1124
- function $r({ children: e, className: t, isQuestion: n }) {
1123
+ function ti({ children: e, className: t, isQuestion: n }) {
1125
1124
  return /* @__PURE__ */ H("div", {
1126
1125
  "data-slot": "chat-message",
1127
1126
  "data-question": n,
@@ -1129,7 +1128,7 @@ function $r({ children: e, className: t, isQuestion: n }) {
1129
1128
  children: e
1130
1129
  });
1131
1130
  }
1132
- function ei({ children: e, className: t }) {
1131
+ function ni({ children: e, className: t }) {
1133
1132
  return /* @__PURE__ */ H("div", {
1134
1133
  "data-slot": "chat-message-content",
1135
1134
  "data-bubble": !0,
@@ -1137,7 +1136,7 @@ function ei({ children: e, className: t }) {
1137
1136
  children: e
1138
1137
  });
1139
1138
  }
1140
- function ti({ children: e, className: t }) {
1139
+ function ri({ children: e, className: t }) {
1141
1140
  return /* @__PURE__ */ H("div", {
1142
1141
  "data-slot": "chat-message-actions",
1143
1142
  className: M("transition-opacity duration-300", "md:opacity-0 group-hover/message:opacity-100", t),
@@ -1146,20 +1145,20 @@ function ti({ children: e, className: t }) {
1146
1145
  }
1147
1146
  //#endregion
1148
1147
  //#region src/contexts/chat-context/utils.ts
1149
- function ni() {
1150
- return `__${ht()}__`;
1148
+ function ii() {
1149
+ return `__${yt()}__`;
1151
1150
  }
1152
1151
  //#endregion
1153
1152
  //#region src/contexts/chat-context/chat-context.tsx
1154
- var ri = N(null);
1153
+ var ai = N(null);
1155
1154
  function X() {
1156
- let e = I(ri);
1155
+ let e = I(ai);
1157
1156
  if (!e) throw Error("\"useChatContext\" must be used within a ChatProvider");
1158
1157
  return e;
1159
1158
  }
1160
- function ii({ children: e, chatId: t }) {
1161
- let [n, r] = V(ni()), [i, a] = V(void 0), o = B(/* @__PURE__ */ new Set()), s = t || n, c = s === n, l = F(() => {
1162
- let e = ni();
1159
+ function oi({ children: e, chatId: t }) {
1160
+ let [n, r] = V(ii()), [i, a] = V(void 0), o = B(/* @__PURE__ */ new Set()), s = t || n, c = s === n, l = F(() => {
1161
+ let e = ii();
1163
1162
  return r(e), e;
1164
1163
  }, [r]), u = F((e) => {
1165
1164
  a(e);
@@ -1192,20 +1191,20 @@ function ii({ children: e, chatId: t }) {
1192
1191
  u,
1193
1192
  d
1194
1193
  ]);
1195
- return /* @__PURE__ */ H(ri.Provider, {
1194
+ return /* @__PURE__ */ H(ai.Provider, {
1196
1195
  value: f,
1197
1196
  children: e
1198
1197
  });
1199
1198
  }
1200
1199
  //#endregion
1201
1200
  //#region src/contexts/chat-conversation-context/chat-conversation-context.tsx
1202
- var ai = 3, oi = 250, si = N(null);
1203
- function ci() {
1204
- let e = I(si);
1201
+ var si = 3, ci = 250, li = N(null);
1202
+ function ui() {
1203
+ let e = I(li);
1205
1204
  if (!e) throw Error("\"useChatConversationContext\" must be used within a ChatConversationProvider");
1206
1205
  return e;
1207
1206
  }
1208
- function li({ children: e, chatId: t, debug: n = !1 }) {
1207
+ function di({ children: e, chatId: t, debug: n = !1 }) {
1209
1208
  let [r, i] = V(!0), [a, o] = V({
1210
1209
  isAtBottom: !0,
1211
1210
  isSmoothScroll: !1,
@@ -1213,8 +1212,8 @@ function li({ children: e, chatId: t, debug: n = !1 }) {
1213
1212
  isProgrammaticScroll: !1,
1214
1213
  userScrollIntent: !1,
1215
1214
  scrollStrategy: "lastItem"
1216
- }), s = B(null), c = B(null), l = B(null), u = B(null), d = B(null), f = B(null), p = B(0), m = B(!0), h = B(!1), g = B(!1), _ = B(!1), v = B(!1), y = B(null), b = B(null), x = B("lastItem"), S = B(0), C = B(() => {}), w = B(() => {}), ee = B(() => {}), T = B(() => {});
1217
- T.current = F(() => {
1215
+ }), s = B(null), c = B(null), l = B(null), u = B(null), d = B(null), f = B(null), p = B(0), m = B(!0), h = B(!1), g = B(!1), _ = B(!1), v = B(!1), y = B(null), b = B(null), x = B("lastItem"), S = B(0), C = B(() => {}), ee = B(() => {}), te = B(() => {}), w = B(() => {});
1216
+ w.current = F(() => {
1218
1217
  n && o({
1219
1218
  isAtBottom: m.current,
1220
1219
  isSmoothScroll: h.current,
@@ -1224,33 +1223,33 @@ function li({ children: e, chatId: t, debug: n = !1 }) {
1224
1223
  scrollStrategy: x.current
1225
1224
  });
1226
1225
  }, [n]);
1227
- let E = F(() => {
1226
+ let T = F(() => {
1228
1227
  u.current?.disconnect(), u.current = null;
1229
1228
  }, []);
1230
- ee.current = E;
1231
- let te = F(() => {
1229
+ te.current = T;
1230
+ let E = F(() => {
1232
1231
  f.current?.disconnect(), f.current = null;
1233
1232
  }, []), ne = F(() => {
1234
1233
  d.current?.disconnect(), d.current = null;
1235
1234
  }, []), re = B(() => {}), D = F(() => {
1236
1235
  requestAnimationFrame(() => {
1237
1236
  requestAnimationFrame(() => {
1238
- _.current = !1, re.current(), T.current();
1237
+ _.current = !1, re.current(), w.current();
1239
1238
  });
1240
1239
  });
1241
1240
  }, []), ie = F(() => {
1242
- y.current &&= (clearTimeout(y.current), null), v.current && (v.current = !1, T.current());
1241
+ y.current &&= (clearTimeout(y.current), null), v.current && (v.current = !1, w.current());
1243
1242
  }, []), O = F(() => {
1244
1243
  v.current = !0, y.current && clearTimeout(y.current), y.current = setTimeout(() => {
1245
- y.current = null, v.current = !1, T.current();
1246
- }, oi), T.current();
1244
+ y.current = null, v.current = !1, w.current();
1245
+ }, ci), w.current();
1247
1246
  }, []), ae = F(() => {
1248
- x.current = "lastItem", ee.current(), T.current();
1247
+ x.current = "lastItem", te.current(), w.current();
1249
1248
  }, []), k = F((e) => {
1250
- g.current !== e && (g.current = e, e && re.current(), T.current());
1249
+ g.current !== e && (g.current = e, e && re.current(), w.current());
1251
1250
  }, []), oe = F(() => {
1252
1251
  if (g.current) return;
1253
- _.current = !0, T.current();
1252
+ _.current = !0, w.current();
1254
1253
  let e = h.current ? "smooth" : "instant";
1255
1254
  h.current = !0, requestAnimationFrame(() => {
1256
1255
  if (g.current) {
@@ -1264,28 +1263,28 @@ function li({ children: e, chatId: t, debug: n = !1 }) {
1264
1263
  }) : s.current?.scrollTo({
1265
1264
  top: s.current.scrollHeight,
1266
1265
  behavior: e
1267
- }), D(), T.current();
1266
+ }), D(), w.current();
1268
1267
  });
1269
1268
  }, [D]);
1270
1269
  C.current = oe;
1271
- let A = F(() => {
1270
+ let se = F(() => {
1272
1271
  let e = s.current;
1273
1272
  if (!e) return;
1274
1273
  let t = e.scrollHeight;
1275
- t - e.clientHeight - e.scrollTop <= 1 && t === S.current || (S.current = t, _.current = !0, T.current(), requestAnimationFrame(() => {
1274
+ t - e.clientHeight - e.scrollTop <= 1 && t === S.current || (S.current = t, _.current = !0, w.current(), requestAnimationFrame(() => {
1276
1275
  e.scrollTo({
1277
1276
  top: t,
1278
1277
  behavior: "instant"
1279
- }), S.current = e.scrollHeight, D(), T.current();
1278
+ }), S.current = e.scrollHeight, D(), w.current();
1280
1279
  }));
1281
- }, [D]), j = F(() => {
1280
+ }, [D]), ce = F(() => {
1282
1281
  let e = s.current;
1283
1282
  if (!e) return;
1284
1283
  let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 1;
1285
- (t || g.current) && (m.current = t, i(t), x.current === "end" && t && A(), T.current());
1286
- }, [A]);
1287
- re.current = j;
1288
- let se = F(() => {
1284
+ (t || g.current) && (m.current = t, i(t), x.current === "end" && t && se(), w.current());
1285
+ }, [se]);
1286
+ re.current = ce;
1287
+ let le = F(() => {
1289
1288
  ne();
1290
1289
  let e = s.current;
1291
1290
  if (!e) return;
@@ -1293,139 +1292,139 @@ function li({ children: e, chatId: t, debug: n = !1 }) {
1293
1292
  re.current();
1294
1293
  });
1295
1294
  t.observe(e), d.current = t;
1296
- }, [ne]), ce = F((e) => {
1297
- if (E(), x.current !== "end") return;
1295
+ }, [ne]), ue = F((e) => {
1296
+ if (T(), x.current !== "end") return;
1298
1297
  let t = new ResizeObserver(() => {
1299
- x.current === "end" && A();
1298
+ x.current === "end" && se();
1300
1299
  });
1301
1300
  t.observe(e), u.current = t;
1302
- }, [E, A]);
1303
- w.current = ce;
1304
- let le = F(() => {
1301
+ }, [T, se]);
1302
+ ee.current = ue;
1303
+ let de = F(() => {
1305
1304
  if (!v.current || x.current === "end") return;
1306
1305
  x.current = "end", ie();
1307
1306
  let e = l.current;
1308
- e && w.current(e), T.current();
1309
- }, [ie]), M = F((e) => {
1307
+ e && ee.current(e), w.current();
1308
+ }, [ie]), A = F((e) => {
1310
1309
  if (!e && !g.current) {
1311
- T.current();
1310
+ w.current();
1312
1311
  return;
1313
1312
  }
1314
1313
  if (m.current = e, i(e), _.current) {
1315
- T.current();
1314
+ w.current();
1316
1315
  return;
1317
1316
  }
1318
- e && (k(!1), le()), T.current();
1319
- }, [le, k]), ue = F((e) => {
1317
+ e && (k(!1), de()), w.current();
1318
+ }, [de, k]), j = F((e) => {
1320
1319
  if (e.target !== s.current) return;
1321
1320
  let t = e.target, n = b.current ?? t.scrollTop, r = t.scrollTop;
1322
1321
  if (b.current = r, _.current || !v.current) return;
1323
1322
  let i = r < n;
1324
1323
  if (t.scrollHeight - t.clientHeight - r <= 1) {
1325
- x.current !== "end" && M(!0);
1324
+ x.current !== "end" && A(!0);
1326
1325
  return;
1327
1326
  }
1328
1327
  i && (k(!0), ae());
1329
1328
  }, [
1330
1329
  ae,
1331
- M,
1330
+ A,
1332
1331
  k
1333
- ]), de = F((e) => {
1332
+ ]), fe = F((e) => {
1334
1333
  let t = s.current;
1335
1334
  e.deltaY < 0 && t && t.scrollHeight > t.clientHeight && (k(!0), ae()), O();
1336
1335
  }, [
1337
1336
  ae,
1338
1337
  O,
1339
1338
  k
1340
- ]), fe = F(() => {
1339
+ ]), pe = F(() => {
1341
1340
  O();
1342
- }, [O]), pe = F(() => {
1341
+ }, [O]), me = F(() => {
1343
1342
  O();
1344
- }, [O]), N = F(() => {
1345
- te();
1343
+ }, [O]), M = F(() => {
1344
+ E();
1346
1345
  let e = s.current, t = c.current;
1347
1346
  if (!e || !t) return;
1348
1347
  let n = new IntersectionObserver(([e]) => {
1349
- e && M(e.isIntersecting);
1348
+ e && A(e.isIntersecting);
1350
1349
  }, {
1351
1350
  root: e,
1352
1351
  threshold: 0
1353
1352
  });
1354
1353
  n.observe(t), f.current = n;
1355
- }, [te, M]), P = F((e) => {
1356
- s.current && (s.current.removeEventListener("scroll", ue), s.current.removeEventListener("wheel", de), s.current.removeEventListener("touchstart", fe), s.current.removeEventListener("pointerdown", pe), ne()), s.current = e, e ? (b.current = e.scrollTop, S.current = e.scrollHeight, e.addEventListener("scroll", ue, { passive: !0 }), e.addEventListener("wheel", de, { passive: !0 }), e.addEventListener("touchstart", fe, { passive: !0 }), e.addEventListener("pointerdown", pe), N(), se(), j()) : (ie(), te(), ne());
1354
+ }, [E, A]), he = F((e) => {
1355
+ s.current && (s.current.removeEventListener("scroll", j), s.current.removeEventListener("wheel", fe), s.current.removeEventListener("touchstart", pe), s.current.removeEventListener("pointerdown", me), ne()), s.current = e, e ? (b.current = e.scrollTop, S.current = e.scrollHeight, e.addEventListener("scroll", j, { passive: !0 }), e.addEventListener("wheel", fe, { passive: !0 }), e.addEventListener("touchstart", pe, { passive: !0 }), e.addEventListener("pointerdown", me), M(), le(), ce()) : (ie(), E(), ne());
1357
1356
  }, [
1358
- N,
1359
- se,
1357
+ M,
1358
+ le,
1360
1359
  ie,
1361
- te,
1360
+ E,
1362
1361
  ne,
1362
+ me,
1363
+ j,
1363
1364
  pe,
1364
- ue,
1365
1365
  fe,
1366
- de,
1367
- j
1368
- ]), me = F((e) => {
1369
- c.current = e, e ? N() : te();
1370
- }, [N, te]), he = F((e) => {
1366
+ ce
1367
+ ]), ge = F((e) => {
1368
+ c.current = e, e ? M() : E();
1369
+ }, [M, E]), _e = F((e) => {
1371
1370
  let t = l.current;
1372
1371
  if (e === null) {
1373
- E(), l.current = null, T.current();
1372
+ T(), l.current = null, w.current();
1374
1373
  return;
1375
1374
  }
1376
1375
  if (e === t) {
1377
- x.current === "end" && ce(e);
1376
+ x.current === "end" && ue(e);
1378
1377
  return;
1379
1378
  }
1380
- E(), l.current = e, k(!1), m.current = !0, i(!0), x.current = "lastItem", e && ce(e), T.current();
1379
+ T(), l.current = e, k(!1), m.current = !0, i(!0), x.current = "lastItem", e && ue(e), w.current();
1381
1380
  }, [
1382
- ce,
1383
- E,
1381
+ ue,
1382
+ T,
1384
1383
  k
1385
- ]), I = F((e) => {
1386
- if (p.current = e, e < ai) x.current = "lastItem", E();
1384
+ ]), N = F((e) => {
1385
+ if (p.current = e, e < si) x.current = "lastItem", T();
1387
1386
  else if (x.current === "end") {
1388
1387
  let e = l.current;
1389
- e && ce(e);
1388
+ e && ue(e);
1390
1389
  }
1391
- T.current();
1392
- }, [ce, E]), L = F(() => {
1393
- k(!1), p.current < ai && (x.current = "lastItem", E()), T.current();
1394
- }, [E, k]), ge = F(() => {
1395
- L(), O(), le(), _.current = !0, T.current();
1390
+ w.current();
1391
+ }, [ue, T]), P = F(() => {
1392
+ k(!1), p.current < si && (x.current = "lastItem", T()), w.current();
1393
+ }, [T, k]), ve = F(() => {
1394
+ P(), O(), de(), _.current = !0, w.current();
1396
1395
  let e = h.current ? "smooth" : "instant";
1397
1396
  h.current = !0, requestAnimationFrame(() => {
1398
1397
  s.current?.scrollTo({
1399
1398
  top: s.current.scrollHeight,
1400
1399
  behavior: e
1401
- }), D(), T.current();
1400
+ }), D(), w.current();
1402
1401
  });
1403
1402
  }, [
1404
- le,
1403
+ de,
1405
1404
  D,
1406
1405
  O,
1407
- L
1408
- ]), R = F(() => {
1406
+ P
1407
+ ]), ye = F(() => {
1409
1408
  oe();
1410
- }, [oe]), _e = z(() => ({
1411
- viewportRef: P,
1412
- bottomTriggerRef: me,
1413
- lastItemRef: he,
1409
+ }, [oe]), I = z(() => ({
1410
+ viewportRef: he,
1411
+ bottomTriggerRef: ge,
1412
+ lastItemRef: _e,
1414
1413
  isAtBottom: r,
1415
- setMessageCount: I,
1416
- scrollBottom: ge,
1417
- scrollToLatest: R
1414
+ setMessageCount: N,
1415
+ scrollBottom: ve,
1416
+ scrollToLatest: ye
1418
1417
  }), [
1419
- P,
1420
- me,
1421
1418
  he,
1422
- r,
1423
- I,
1424
1419
  ge,
1425
- R
1420
+ _e,
1421
+ r,
1422
+ N,
1423
+ ve,
1424
+ ye
1426
1425
  ]);
1427
- return /* @__PURE__ */ U(si.Provider, {
1428
- value: _e,
1426
+ return /* @__PURE__ */ U(li.Provider, {
1427
+ value: I,
1429
1428
  children: [n && /* @__PURE__ */ H("code", {
1430
1429
  className: "absolute top-0 left-0 z-50 w-full bg-red-500/90 p-8 text-white pointer-events-none",
1431
1430
  children: JSON.stringify(a, null, 2)
@@ -1434,17 +1433,17 @@ function li({ children: e, chatId: t, debug: n = !1 }) {
1434
1433
  }
1435
1434
  //#endregion
1436
1435
  //#region src/components/chat-messages/chat-messages.tsx
1437
- var ui = N(null), di = N(!1);
1438
- function fi() {
1439
- let e = I(ui);
1436
+ var fi = N(null), pi = N(!1);
1437
+ function mi() {
1438
+ let e = I(fi);
1440
1439
  if (!e) throw Error("\"ChatMessagesList\" must be used within a ChatMessages");
1441
1440
  return e;
1442
1441
  }
1443
- function pi({ children: e, className: t, messageCount: n = 0, gap: r = 16 }) {
1444
- let { setMessageCount: i } = ci(), a = z(() => ({ messageCount: n }), [n]);
1442
+ function hi({ children: e, className: t, messageCount: n = 0, gap: r = 16 }) {
1443
+ let { setMessageCount: i } = ui(), a = z(() => ({ messageCount: n }), [n]);
1445
1444
  return R(() => {
1446
1445
  i(n);
1447
- }, [n, i]), /* @__PURE__ */ H(ui.Provider, {
1446
+ }, [n, i]), /* @__PURE__ */ H(fi.Provider, {
1448
1447
  value: a,
1449
1448
  children: /* @__PURE__ */ H("div", {
1450
1449
  "data-slot": "chat-messages",
@@ -1455,14 +1454,14 @@ function pi({ children: e, className: t, messageCount: n = 0, gap: r = 16 }) {
1455
1454
  })
1456
1455
  });
1457
1456
  }
1458
- function mi({ children: e, className: t, scrollAreaClassName: n, viewportClassName: r, bottomTriggerClassName: i }) {
1459
- let { viewportRef: a, bottomTriggerRef: o, scrollToLatest: s } = ci(), { messageCount: c } = fi(), l = z(() => Array.from({ length: c }, (e, t) => t), [c]), u = c - 1;
1457
+ function gi({ children: e, className: t, scrollAreaClassName: n, viewportClassName: r, bottomTriggerClassName: i }) {
1458
+ let { viewportRef: a, bottomTriggerRef: o, scrollToLatest: s } = ui(), { messageCount: c } = mi(), l = z(() => Array.from({ length: c }, (e, t) => t), [c]), u = c - 1;
1460
1459
  return R(() => {
1461
1460
  s();
1462
- }, [c, s]), /* @__PURE__ */ U(mt.Root, {
1461
+ }, [c, s]), /* @__PURE__ */ U(vt.Root, {
1463
1462
  "data-slot": "chat-messages-scroll-area",
1464
1463
  className: M("min-h-0 flex-1", "relative group/scroll-area", "overflow-y-hidden", "transform-gpu", n),
1465
- children: [/* @__PURE__ */ H(mt.Viewport, {
1464
+ children: [/* @__PURE__ */ H(vt.Viewport, {
1466
1465
  ref: a,
1467
1466
  "data-slot": "chat-messages-viewport",
1468
1467
  className: M("@container-[size]", "will-change-scroll h-full w-full", r),
@@ -1474,7 +1473,7 @@ function mi({ children: e, className: t, scrollAreaClassName: n, viewportClassNa
1474
1473
  "aria-label": "Message list",
1475
1474
  "aria-atomic": "false",
1476
1475
  className: M("m-0 flex flex-col gap-(--chat-messages-gap) p-0", t),
1477
- children: [l.map((t) => /* @__PURE__ */ H(hi, {
1476
+ children: [l.map((t) => /* @__PURE__ */ H(_i, {
1478
1477
  index: t,
1479
1478
  isLast: t === u,
1480
1479
  children: e
@@ -1485,20 +1484,20 @@ function mi({ children: e, className: t, scrollAreaClassName: n, viewportClassNa
1485
1484
  "aria-hidden": "true"
1486
1485
  })]
1487
1486
  })
1488
- }), /* @__PURE__ */ H(_i, { orientation: "vertical" })]
1487
+ }), /* @__PURE__ */ H(yi, { orientation: "vertical" })]
1489
1488
  });
1490
1489
  }
1491
- var hi = he(function({ children: e, index: t, isLast: n }) {
1490
+ var _i = ye(function({ children: e, index: t, isLast: n }) {
1492
1491
  return /* @__PURE__ */ H("li", {
1493
1492
  "data-slot": "chat-messages-row",
1494
- children: /* @__PURE__ */ H(di.Provider, {
1493
+ children: /* @__PURE__ */ H(pi.Provider, {
1495
1494
  value: n,
1496
1495
  children: e(t)
1497
1496
  })
1498
1497
  });
1499
1498
  });
1500
- function gi({ children: e, className: t, ...n }) {
1501
- let r = I(di), { lastItemRef: i } = ci();
1499
+ function vi({ children: e, className: t, ...n }) {
1500
+ let r = I(pi), { lastItemRef: i } = ui();
1502
1501
  return /* @__PURE__ */ H("div", {
1503
1502
  ref: r ? i : void 0,
1504
1503
  "data-slot": "chat-message-list-group",
@@ -1508,20 +1507,20 @@ function gi({ children: e, className: t, ...n }) {
1508
1507
  children: e
1509
1508
  });
1510
1509
  }
1511
- function _i({ className: e, orientation: t = "vertical", ...n }) {
1512
- return /* @__PURE__ */ H(mt.ScrollAreaScrollbar, {
1510
+ function yi({ className: e, orientation: t = "vertical", ...n }) {
1511
+ return /* @__PURE__ */ H(vt.ScrollAreaScrollbar, {
1513
1512
  "data-slot": "scroll-area-scrollbar",
1514
1513
  orientation: t,
1515
1514
  className: M("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),
1516
1515
  ...n,
1517
- children: /* @__PURE__ */ H(mt.ScrollAreaThumb, {
1516
+ children: /* @__PURE__ */ H(vt.ScrollAreaThumb, {
1518
1517
  "data-slot": "scroll-area-thumb",
1519
1518
  className: M("relative flex-1 rounded-full", "bg-scrollbar-thumb hover:bg-scrollbar-thumb-hover", t === "vertical" && "w-scrollbar-thumb!", t === "horizontal" && "h-scrollbar-thumb!")
1520
1519
  })
1521
1520
  });
1522
1521
  }
1523
- var vi = he(function({ className: e, buttonClassName: t, tooltip: n, children: r }) {
1524
- let { isAtBottom: i, scrollBottom: a } = ci();
1522
+ var bi = ye(function({ className: e, buttonClassName: t, tooltip: n, children: r }) {
1523
+ let { isAtBottom: i, scrollBottom: a } = ui();
1525
1524
  return /* @__PURE__ */ H("div", {
1526
1525
  "data-slot": "chat-messages-scroll-button",
1527
1526
  "data-testid": "chat-message-history-scroll-button",
@@ -1531,21 +1530,21 @@ var vi = he(function({ className: e, buttonClassName: t, tooltip: n, children: r
1531
1530
  children: /* @__PURE__ */ H(A, {
1532
1531
  tooltip: n,
1533
1532
  side: "top",
1534
- children: /* @__PURE__ */ H(f, {
1533
+ children: /* @__PURE__ */ H(_, {
1535
1534
  className: M("bg-paper-elevation-2", t),
1536
1535
  color: "primary",
1537
1536
  size: "md",
1538
1537
  onClick: () => a(),
1539
1538
  tabIndex: -1,
1540
1539
  "aria-label": n,
1541
- children: r || /* @__PURE__ */ H(_t, {})
1540
+ children: r || /* @__PURE__ */ H(xt, {})
1542
1541
  })
1543
1542
  })
1544
1543
  });
1545
1544
  });
1546
1545
  //#endregion
1547
1546
  //#region src/components/chat-message-attachment-card/chat-message-attachment-card.tsx
1548
- function yi({ className: e, children: t, isPreview: n, isInteractive: r = !0 }) {
1547
+ function xi({ className: e, children: t, isPreview: n, isInteractive: r = !0 }) {
1549
1548
  return /* @__PURE__ */ H("div", {
1550
1549
  role: "group",
1551
1550
  "data-slot": "chat-message-attachment-card",
@@ -1556,7 +1555,7 @@ function yi({ className: e, children: t, isPreview: n, isInteractive: r = !0 })
1556
1555
  children: t
1557
1556
  });
1558
1557
  }
1559
- function bi({ className: e, children: t }) {
1558
+ function Si({ className: e, children: t }) {
1560
1559
  return /* @__PURE__ */ H("div", {
1561
1560
  "data-slot": "chat-message-attachment-card-content",
1562
1561
  "data-testid": "chat-message-attachment-card-content",
@@ -1564,7 +1563,7 @@ function bi({ className: e, children: t }) {
1564
1563
  children: t
1565
1564
  });
1566
1565
  }
1567
- function xi({ className: e, children: t }) {
1566
+ function Ci({ className: e, children: t }) {
1568
1567
  return /* @__PURE__ */ H(j, {
1569
1568
  variant: "body-sm",
1570
1569
  "data-slot": "chat-message-attachment-card-title",
@@ -1573,7 +1572,7 @@ function xi({ className: e, children: t }) {
1573
1572
  children: t
1574
1573
  });
1575
1574
  }
1576
- function Si({ className: e, imageClassName: t, previewSrc: n }) {
1575
+ function wi({ className: e, imageClassName: t, previewSrc: n }) {
1577
1576
  return /* @__PURE__ */ H("figure", {
1578
1577
  "data-slot": "chat-message-attachment-card-preview",
1579
1578
  "data-testid": "chat-message-attachment-card-preview",
@@ -1586,52 +1585,52 @@ function Si({ className: e, imageClassName: t, previewSrc: n }) {
1586
1585
  })
1587
1586
  });
1588
1587
  }
1589
- function Ci({ className: e, buttonClassName: t, onDelete: n }) {
1588
+ function Ti({ className: e, buttonClassName: t, onDelete: n }) {
1590
1589
  return /* @__PURE__ */ H("div", {
1591
1590
  role: "group",
1592
1591
  "data-slot": "chat-message-attachment-card-actions",
1593
1592
  "data-testid": "chat-message-attachment-card-actions",
1594
1593
  className: M("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),
1595
- children: /* @__PURE__ */ H(f, {
1594
+ children: /* @__PURE__ */ H(_, {
1596
1595
  variant: "tertiary",
1597
1596
  isSemantic: !1,
1598
1597
  onClick: n,
1599
1598
  size: "xs",
1600
1599
  className: M("size-[24px]", "text-icon-button-tertiary-icon", t),
1601
- children: /* @__PURE__ */ H(yt, {})
1600
+ children: /* @__PURE__ */ H(Ct, {})
1602
1601
  })
1603
1602
  });
1604
1603
  }
1605
1604
  //#endregion
1606
1605
  //#region src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx
1607
- var wi = {
1606
+ var Ei = {
1608
1607
  spreadsheet: {
1609
- component: Ht,
1608
+ component: Kt,
1610
1609
  className: "bg-data-d"
1611
1610
  },
1612
1611
  pdf: {
1613
- component: Lt,
1612
+ component: Vt,
1614
1613
  className: "bg-data-a"
1615
1614
  },
1616
1615
  presentation: {
1617
- component: Rt,
1616
+ component: Ht,
1618
1617
  className: "bg-data-e"
1619
1618
  },
1620
1619
  document: {
1621
- component: St,
1620
+ component: Et,
1622
1621
  className: "bg-data-c"
1623
1622
  },
1624
1623
  code: {
1625
- component: bt,
1624
+ component: wt,
1626
1625
  className: "bg-data-f"
1627
1626
  },
1628
1627
  unknown: {
1629
- component: Ct,
1628
+ component: Dt,
1630
1629
  className: "bg-data-f"
1631
1630
  }
1632
1631
  };
1633
- function Ti({ icon: e, className: t, ...n }) {
1634
- let { component: r, className: i } = wi[e];
1632
+ function Di({ icon: e, className: t, ...n }) {
1633
+ let { component: r, className: i } = Ei[e];
1635
1634
  return /* @__PURE__ */ H("span", {
1636
1635
  "data-slot": "chat-message-attachment-card-icon",
1637
1636
  "data-testid": "chat-attachment-icon",
@@ -1642,7 +1641,7 @@ function Ti({ icon: e, className: t, ...n }) {
1642
1641
  }
1643
1642
  //#endregion
1644
1643
  //#region src/components/chat-message-attachment-card/utils.ts
1645
- var Ei = {
1644
+ var Oi = {
1646
1645
  "application/pdf": "pdf",
1647
1646
  "application/vnd.ms-excel": "spreadsheet",
1648
1647
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "spreadsheet",
@@ -1655,29 +1654,29 @@ var Ei = {
1655
1654
  "application/rtf": "document",
1656
1655
  "application/vnd.oasis.opendocument.text": "document"
1657
1656
  };
1658
- function Di(e) {
1659
- let t = Ut.getType(e.name);
1660
- return t ? t in Ei ? Ei[t] : t.startsWith("text/") || t.includes("javascript") || t.includes("json") ? "code" : "unknown" : "unknown";
1657
+ function ki(e) {
1658
+ let t = qt.getType(e.name);
1659
+ return t ? t in Oi ? Oi[t] : t.startsWith("text/") || t.includes("javascript") || t.includes("json") ? "code" : "unknown" : "unknown";
1661
1660
  }
1662
1661
  //#endregion
1663
1662
  //#region src/components/markdown-viewer/utils.ts
1664
- function Oi(e) {
1663
+ function Ai(e) {
1665
1664
  return e.startsWith("swi-");
1666
1665
  }
1667
1666
  //#endregion
1668
1667
  //#region src/components/markdown-viewer/hooks.ts
1669
- function ki({ customComponents: e }) {
1670
- let t = z(() => Object.keys(e).filter((e) => Oi(e) ? !0 : (console.warn(`[MarkdownViewer] Invalid custom component tag: ${e}`), !1)), [e]);
1668
+ function ji({ customComponents: e }) {
1669
+ let t = z(() => Object.keys(e).filter((e) => Ai(e) ? !0 : (console.warn(`[MarkdownViewer] Invalid custom component tag: ${e}`), !1)), [e]);
1671
1670
  return {
1672
1671
  components: e,
1673
- remarkPlugins: z(() => [...Object.values(Kt)], []),
1674
- rehypePlugins: z(() => [...Object.values(Gt), [qt, {
1675
- ...Jt,
1676
- tagNames: [...Jt?.tagNames || [], ...t],
1672
+ remarkPlugins: z(() => [...Object.values(Xt)], []),
1673
+ rehypePlugins: z(() => [...Object.values(Yt), [Zt, {
1674
+ ...Qt,
1675
+ tagNames: [...Qt?.tagNames || [], ...t],
1677
1676
  protocols: {
1678
- ...Jt?.protocols,
1677
+ ...Qt?.protocols,
1679
1678
  href: [
1680
- ...Jt?.protocols?.href ?? [],
1679
+ ...Qt?.protocols?.href ?? [],
1681
1680
  "swisper",
1682
1681
  "swisper://"
1683
1682
  ]
@@ -1687,9 +1686,9 @@ function ki({ customComponents: e }) {
1687
1686
  }
1688
1687
  //#endregion
1689
1688
  //#region src/components/markdown-viewer/markdown-viewer.tsx
1690
- function Ai({ markdown: e, className: t, isStreaming: n = !1, hasCaret: r = !1, customComponents: i = {} }) {
1691
- let { components: a, remarkPlugins: o, rehypePlugins: s } = ki({ customComponents: i });
1692
- return /* @__PURE__ */ H(Wt, {
1689
+ function Mi({ markdown: e, className: t, isStreaming: n = !1, hasCaret: r = !1, customComponents: i = {} }) {
1690
+ let { components: a, remarkPlugins: o, rehypePlugins: s } = ji({ customComponents: i });
1691
+ return /* @__PURE__ */ H(Jt, {
1693
1692
  className: t,
1694
1693
  caret: r ? "block" : void 0,
1695
1694
  isAnimating: n,
@@ -1699,13 +1698,13 @@ function Ai({ markdown: e, className: t, isStreaming: n = !1, hasCaret: r = !1,
1699
1698
  linkSafety: { enabled: !1 },
1700
1699
  remend: { handlers: [{
1701
1700
  name: "swi-tag-filter",
1702
- handle: ji,
1701
+ handle: Ni,
1703
1702
  priority: 0
1704
1703
  }] },
1705
1704
  children: e
1706
1705
  });
1707
1706
  }
1708
- function ji(e, t = "|") {
1707
+ function Ni(e, t = "|") {
1709
1708
  let [n, r] = /<swi-(\w+)([^>]*)$/gm.exec(e) ?? [];
1710
1709
  if (e.endsWith("<swi-")) return e + ">";
1711
1710
  if (n) return e.replace(n, `<swi-${r}>`);
@@ -1726,9 +1725,9 @@ function ji(e, t = "|") {
1726
1725
  }
1727
1726
  //#endregion
1728
1727
  //#region src/components/chat-message-response/chat-message-response.tsx
1729
- function Mi({ message: e, isStreaming: t }) {
1728
+ function Pi({ message: e, isStreaming: t }) {
1730
1729
  let n = z(() => ({}), []);
1731
- return /* @__PURE__ */ H(Ai, {
1730
+ return /* @__PURE__ */ H(Mi, {
1732
1731
  hasCaret: !1,
1733
1732
  markdown: e,
1734
1733
  isStreaming: t,
@@ -1737,7 +1736,7 @@ function Mi({ message: e, isStreaming: t }) {
1737
1736
  }
1738
1737
  //#endregion
1739
1738
  //#region src/components/chat-message-toolbar/chat-message-toolbar.tsx
1740
- function Ni({ children: e, className: t, reverse: n = !1, ...r }) {
1739
+ function Fi({ children: e, className: t, reverse: n = !1, ...r }) {
1741
1740
  return /* @__PURE__ */ H("div", {
1742
1741
  "data-slot": "chat-message-toolbar",
1743
1742
  "data-testid": "chat-message-toolbar",
@@ -1747,7 +1746,7 @@ function Ni({ children: e, className: t, reverse: n = !1, ...r }) {
1747
1746
  children: e
1748
1747
  });
1749
1748
  }
1750
- function Pi({ children: e, className: t, ...n }) {
1749
+ function Ii({ children: e, className: t, ...n }) {
1751
1750
  return /* @__PURE__ */ H("div", {
1752
1751
  "data-slot": "chat-message-toolbar-actions",
1753
1752
  "data-testid": "chat-message-toolbar-actions",
@@ -1757,8 +1756,8 @@ function Pi({ children: e, className: t, ...n }) {
1757
1756
  children: e
1758
1757
  });
1759
1758
  }
1760
- var Fi = P(function({ children: e, className: t, tooltip: n, ...r }, i) {
1761
- let a = /* @__PURE__ */ H(f, {
1759
+ var Li = P(function({ children: e, className: t, tooltip: n, ...r }, i) {
1760
+ let a = /* @__PURE__ */ H(_, {
1762
1761
  ref: i,
1763
1762
  variant: "tertiary",
1764
1763
  isSemantic: !1,
@@ -1773,8 +1772,8 @@ var Fi = P(function({ children: e, className: t, tooltip: n, ...r }, i) {
1773
1772
  children: a
1774
1773
  }) : a;
1775
1774
  });
1776
- Fi.displayName = "ChatMessageToolbarActionButton";
1777
- function Ii({ className: e, children: t, ...n }) {
1775
+ Li.displayName = "ChatMessageToolbarActionButton";
1776
+ function Ri({ className: e, children: t, ...n }) {
1778
1777
  return /* @__PURE__ */ H("div", {
1779
1778
  "data-slot": "chat-message-toolbar-timestamp",
1780
1779
  className: M("text-action-active", e),
@@ -1784,26 +1783,26 @@ function Ii({ className: e, children: t, ...n }) {
1784
1783
  }
1785
1784
  //#endregion
1786
1785
  //#region src/components/chat-notification-card/utils.ts
1787
- function Li(e) {
1786
+ function zi(e) {
1788
1787
  return new Date(Date.now() + e * 60 * 1e3);
1789
1788
  }
1790
- var Ri = 60, zi = 1440, Bi = 6e4;
1791
- function Vi(e, t) {
1789
+ var Bi = 60, Vi = 1440, Hi = 6e4;
1790
+ function Ui(e, t) {
1792
1791
  return `${e} ${t}${e === 1 ? "" : "s"}`;
1793
1792
  }
1794
- function Hi(e, t = "in", n = /* @__PURE__ */ new Date()) {
1795
- let r = Math.max(0, Math.ceil((e.getTime() - n.getTime()) / Bi)), i = Math.floor(r / zi), a = Math.floor(r % zi / Ri), o = r % Ri, s = [];
1796
- return i > 0 && s.push(Vi(i, "day")), a > 0 && s.push(Vi(a, "hour")), s.push(Vi(o, "minute")), [t, ...s].filter(Boolean).join(" ");
1793
+ function Wi(e, t = "in", n = /* @__PURE__ */ new Date()) {
1794
+ let r = Math.max(0, Math.ceil((e.getTime() - n.getTime()) / Hi)), i = Math.floor(r / Vi), a = Math.floor(r % Vi / Bi), o = r % Bi, s = [];
1795
+ return i > 0 && s.push(Ui(i, "day")), a > 0 && s.push(Ui(a, "hour")), s.push(Ui(o, "minute")), [t, ...s].filter(Boolean).join(" ");
1797
1796
  }
1798
1797
  //#endregion
1799
1798
  //#region src/components/chat-notification-card/chat-notification-card.tsx
1800
- var Ui = N(null);
1801
- function Wi() {
1802
- let e = I(Ui);
1799
+ var Gi = N(null);
1800
+ function Ki() {
1801
+ let e = I(Gi);
1803
1802
  if (!e) throw Error("\"useChatNotificationCardContext\" must be used within a ChatNotificationCard");
1804
1803
  return e;
1805
1804
  }
1806
- function Gi({ children: e, variant: t = "default", className: n, overlayClassName: r, defaultExpanded: i = !1, expanded: a, onExpandedChange: o, onClick: s }) {
1805
+ function qi({ children: e, variant: t = "default", className: n, overlayClassName: r, defaultExpanded: i = !1, expanded: a, onExpandedChange: o, onClick: s }) {
1807
1806
  let [c, l] = V(i), u = a ?? c, d = F((e) => {
1808
1807
  a === void 0 && l(e), o?.(e);
1809
1808
  }, [a, o]), f = F(() => {
@@ -1817,7 +1816,7 @@ function Gi({ children: e, variant: t = "default", className: n, overlayClassNam
1817
1816
  d,
1818
1817
  f
1819
1818
  ]);
1820
- return /* @__PURE__ */ H(Ui.Provider, {
1819
+ return /* @__PURE__ */ H(Gi.Provider, {
1821
1820
  value: p,
1822
1821
  children: /* @__PURE__ */ U("div", {
1823
1822
  role: "alert",
@@ -1835,7 +1834,7 @@ function Gi({ children: e, variant: t = "default", className: n, overlayClassNam
1835
1834
  })
1836
1835
  });
1837
1836
  }
1838
- function Ki({ children: e, className: t }) {
1837
+ function Ji({ children: e, className: t }) {
1839
1838
  return /* @__PURE__ */ H("header", {
1840
1839
  "data-slot": "chat-notification-card-head",
1841
1840
  "data-testid": "chat-notification-card-head",
@@ -1843,7 +1842,7 @@ function Ki({ children: e, className: t }) {
1843
1842
  children: e
1844
1843
  });
1845
1844
  }
1846
- function qi({ children: e, className: t }) {
1845
+ function Yi({ children: e, className: t }) {
1847
1846
  return /* @__PURE__ */ H("div", {
1848
1847
  "data-slot": "chat-notification-card-header",
1849
1848
  "data-testid": "chat-notification-card-header",
@@ -1851,7 +1850,7 @@ function qi({ children: e, className: t }) {
1851
1850
  children: e
1852
1851
  });
1853
1852
  }
1854
- function Ji({ children: e, className: t }) {
1853
+ function Xi({ children: e, className: t }) {
1855
1854
  return /* @__PURE__ */ H("div", {
1856
1855
  "data-slot": "chat-notification-card-header-icon",
1857
1856
  "data-testid": "chat-notification-card-header-icon",
@@ -1859,7 +1858,7 @@ function Ji({ children: e, className: t }) {
1859
1858
  children: e
1860
1859
  });
1861
1860
  }
1862
- function Yi({ children: e, className: t }) {
1861
+ function Zi({ children: e, className: t }) {
1863
1862
  return /* @__PURE__ */ H("div", {
1864
1863
  "data-slot": "chat-notification-card-header-title",
1865
1864
  "data-testid": "chat-notification-card-header-title",
@@ -1867,7 +1866,7 @@ function Yi({ children: e, className: t }) {
1867
1866
  children: e
1868
1867
  });
1869
1868
  }
1870
- function Xi({ children: e, className: t }) {
1869
+ function Qi({ children: e, className: t }) {
1871
1870
  return /* @__PURE__ */ H(j, {
1872
1871
  variant: "body-sm",
1873
1872
  fontWeight: "semibold",
@@ -1878,26 +1877,26 @@ function Xi({ children: e, className: t }) {
1878
1877
  children: /* @__PURE__ */ H("span", { children: e })
1879
1878
  });
1880
1879
  }
1881
- var Zi = {
1880
+ var $i = {
1882
1881
  low: "info",
1883
1882
  medium: "warning",
1884
1883
  high: "error"
1885
1884
  };
1886
- function Qi({ children: e, priority: n = "medium", className: r, ...i }) {
1887
- let a = Zi[n];
1888
- return n === "low" ? null : /* @__PURE__ */ H(t, {
1885
+ function ea({ children: e, priority: t = "medium", className: n, ...r }) {
1886
+ let i = $i[t];
1887
+ return t === "low" ? null : /* @__PURE__ */ H(o, {
1889
1888
  "data-slot": "chat-notification-card-header-status",
1890
1889
  "data-testid": "chat-notification-card-header-status",
1891
- "data-priority": n,
1892
- className: M("text-text-secondary", "shrink-0", r),
1890
+ "data-priority": t,
1891
+ className: M("text-text-secondary", "shrink-0", n),
1893
1892
  size: "2xs",
1894
- color: a,
1893
+ color: i,
1895
1894
  variant: "outlined",
1896
- ...i,
1895
+ ...r,
1897
1896
  children: e
1898
1897
  });
1899
1898
  }
1900
- function $i({ children: e, className: t }) {
1899
+ function ta({ children: e, className: t }) {
1901
1900
  return /* @__PURE__ */ H("div", {
1902
1901
  "data-slot": "chat-notification-card-actions",
1903
1902
  "data-testid": "chat-notification-card-actions",
@@ -1906,7 +1905,7 @@ function $i({ children: e, className: t }) {
1906
1905
  children: e
1907
1906
  });
1908
1907
  }
1909
- function ea({ children: e, className: t }) {
1908
+ function na({ children: e, className: t }) {
1910
1909
  return /* @__PURE__ */ H(j, {
1911
1910
  variant: "caption",
1912
1911
  "data-slot": "chat-notification-card-timestamp",
@@ -1916,7 +1915,7 @@ function ea({ children: e, className: t }) {
1916
1915
  children: /* @__PURE__ */ H("span", { children: e })
1917
1916
  });
1918
1917
  }
1919
- function ta({ children: e, className: t }) {
1918
+ function ra({ children: e, className: t }) {
1920
1919
  function n(e) {
1921
1920
  e.stopPropagation();
1922
1921
  }
@@ -1933,11 +1932,11 @@ function ta({ children: e, className: t }) {
1933
1932
  children: e
1934
1933
  });
1935
1934
  }
1936
- var na = P(function({ className: e, isRead: t = !1, onRead: n, ...r }, i) {
1935
+ var ia = P(function({ className: e, isRead: t = !1, onRead: n, ...r }, i) {
1937
1936
  function a() {
1938
1937
  n?.(!t);
1939
1938
  }
1940
- return /* @__PURE__ */ H(f, {
1939
+ return /* @__PURE__ */ H(_, {
1941
1940
  ref: i,
1942
1941
  "data-slot": "chat-notification-card-read-action-button",
1943
1942
  "data-read": t,
@@ -1947,33 +1946,33 @@ var na = P(function({ className: e, isRead: t = !1, onRead: n, ...r }, i) {
1947
1946
  className: e,
1948
1947
  onClick: a,
1949
1948
  ...r,
1950
- children: H(t ? Bt : zt, {})
1949
+ children: H(t ? Wt : Ut, {})
1951
1950
  });
1952
1951
  });
1953
- na.displayName = "ChatNotificationCardReadActionButton";
1954
- var ra = P(function({ className: t, labelClassName: n, cancelLabelClassName: r, snoozeUntilDate: i, cancelLabel: a = "Cancel", formatDate: o = Hi, onCancel: s, onClick: c, onMouseEnter: l, onMouseLeave: u, ...d }, p) {
1955
- let [m, h] = V(!1), g = i && i > /* @__PURE__ */ new Date();
1952
+ ia.displayName = "ChatNotificationCardReadActionButton";
1953
+ var aa = P(function({ className: t, labelClassName: n, cancelLabelClassName: r, snoozeUntilDate: i, cancelLabel: a = "Cancel", formatDate: o = Wi, onCancel: s, onClick: c, onMouseEnter: l, onMouseLeave: u, ...d }, f) {
1954
+ let [p, m] = V(!1), h = i && i > /* @__PURE__ */ new Date();
1956
1955
  L(() => {
1957
- g || h(!1);
1958
- }, [g]);
1959
- function _(e) {
1960
- h(!0), l?.(e);
1956
+ h || m(!1);
1957
+ }, [h]);
1958
+ function g(e) {
1959
+ m(!0), l?.(e);
1961
1960
  }
1962
1961
  function v(e) {
1963
- h(!1), u?.(e);
1962
+ m(!1), u?.(e);
1964
1963
  }
1965
1964
  function y() {
1966
- h(!1), s?.();
1965
+ m(!1), s?.();
1967
1966
  }
1968
- return g ? /* @__PURE__ */ U(e, {
1969
- ref: p,
1967
+ return h ? /* @__PURE__ */ U(e, {
1968
+ ref: f,
1970
1969
  "data-slot": "chat-notification-card-snooze-button",
1971
1970
  "data-snoozed": "true",
1972
- "data-hover": m,
1973
- startIcon: H(m ? yt : Vt, {}),
1971
+ "data-hover": p,
1972
+ startIcon: H(p ? Ct : Gt, {}),
1974
1973
  variant: "tertiary",
1975
1974
  size: "md",
1976
- onMouseEnter: _,
1975
+ onMouseEnter: g,
1977
1976
  onMouseLeave: v,
1978
1977
  onClick: y,
1979
1978
  className: M("group/snooze-button", "text-chip-outlined-warning-text h-[32px]!", t),
@@ -1987,8 +1986,8 @@ var ra = P(function({ className: t, labelClassName: n, cancelLabelClassName: r,
1987
1986
  className: M("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", r),
1988
1987
  children: a
1989
1988
  })]
1990
- }) : /* @__PURE__ */ H(f, {
1991
- ref: p,
1989
+ }) : /* @__PURE__ */ H(_, {
1990
+ ref: f,
1992
1991
  "data-slot": "chat-notification-card-snooze-button",
1993
1992
  "data-snoozed": "false",
1994
1993
  "aria-label": "Snooze notification",
@@ -1997,12 +1996,12 @@ var ra = P(function({ className: t, labelClassName: n, cancelLabelClassName: r,
1997
1996
  className: M("group/snooze-button", t),
1998
1997
  onClick: c,
1999
1998
  ...d,
2000
- children: /* @__PURE__ */ H(Vt, {})
1999
+ children: /* @__PURE__ */ H(Gt, {})
2001
2000
  });
2002
2001
  });
2003
- ra.displayName = "ChatNotificationCardSnoozeButton";
2004
- var ia = P(function({ className: e, ...t }, n) {
2005
- return /* @__PURE__ */ H(f, {
2002
+ aa.displayName = "ChatNotificationCardSnoozeButton";
2003
+ var oa = P(function({ className: e, ...t }, n) {
2004
+ return /* @__PURE__ */ H(_, {
2006
2005
  ref: n,
2007
2006
  "data-slot": "chat-notification-card-delete-button",
2008
2007
  "aria-label": "Delete notification",
@@ -2010,12 +2009,12 @@ var ia = P(function({ className: e, ...t }, n) {
2010
2009
  variant: "tertiary",
2011
2010
  className: e,
2012
2011
  ...t,
2013
- children: /* @__PURE__ */ H(xt, {})
2012
+ children: /* @__PURE__ */ H(Tt, {})
2014
2013
  });
2015
2014
  });
2016
- ia.displayName = "ChatNotificationCardDeleteButton";
2017
- var aa = P(function({ className: e, ...t }, n) {
2018
- return /* @__PURE__ */ H(f, {
2015
+ oa.displayName = "ChatNotificationCardDeleteButton";
2016
+ var sa = P(function({ className: e, ...t }, n) {
2017
+ return /* @__PURE__ */ H(_, {
2019
2018
  ref: n,
2020
2019
  "data-slot": "chat-notification-card-close-button",
2021
2020
  "aria-label": "Close notification",
@@ -2023,19 +2022,19 @@ var aa = P(function({ className: e, ...t }, n) {
2023
2022
  variant: "tertiary",
2024
2023
  className: e,
2025
2024
  ...t,
2026
- children: /* @__PURE__ */ H(yt, {})
2025
+ children: /* @__PURE__ */ H(Ct, {})
2027
2026
  });
2028
2027
  });
2029
- aa.displayName = "ChatNotificationCardCloseButton";
2030
- function oa({ children: e, className: t }) {
2028
+ sa.displayName = "ChatNotificationCardCloseButton";
2029
+ function ca({ children: e, className: t }) {
2031
2030
  return /* @__PURE__ */ U("div", {
2032
2031
  "data-slot": "chat-notification-card-content",
2033
2032
  "data-testid": "chat-notification-card-content",
2034
2033
  className: M("flex flex-col items-start text-left gap-4", "relative pr-[40px]", t),
2035
- children: [e, /* @__PURE__ */ H(ua, {})]
2034
+ children: [e, /* @__PURE__ */ H(fa, {})]
2036
2035
  });
2037
2036
  }
2038
- function sa({ children: e, className: t }) {
2037
+ function la({ children: e, className: t }) {
2039
2038
  return /* @__PURE__ */ H(j, {
2040
2039
  variant: "body-sm",
2041
2040
  fontWeight: "semibold",
@@ -2046,7 +2045,7 @@ function sa({ children: e, className: t }) {
2046
2045
  children: /* @__PURE__ */ H("span", { children: e })
2047
2046
  });
2048
2047
  }
2049
- function ca({ children: e, className: t }) {
2048
+ function ua({ children: e, className: t }) {
2050
2049
  return /* @__PURE__ */ H(j, {
2051
2050
  variant: "body-sm",
2052
2051
  "data-slot": "chat-notification-card-content-description",
@@ -2056,7 +2055,7 @@ function ca({ children: e, className: t }) {
2056
2055
  children: /* @__PURE__ */ H("div", { children: e })
2057
2056
  });
2058
2057
  }
2059
- function la({ children: e, className: t }) {
2058
+ function da({ children: e, className: t }) {
2060
2059
  return /* @__PURE__ */ H("div", {
2061
2060
  "data-slot": "chat-notification-card-content-actions",
2062
2061
  "data-testid": "chat-notification-card-content-actions",
@@ -2065,15 +2064,15 @@ function la({ children: e, className: t }) {
2065
2064
  children: e
2066
2065
  });
2067
2066
  }
2068
- var ua = P(function({ className: e, onMouseDown: t, onClick: n, ...r }, i) {
2069
- let { isExpanded: a, toggleExpanded: o } = Wi();
2067
+ var fa = P(function({ className: e, onMouseDown: t, onClick: n, ...r }, i) {
2068
+ let { isExpanded: a, toggleExpanded: o } = Ki();
2070
2069
  function s(e) {
2071
2070
  e.stopPropagation(), t?.(e);
2072
2071
  }
2073
2072
  function c(e) {
2074
2073
  e.stopPropagation(), o(), n?.(e);
2075
2074
  }
2076
- return /* @__PURE__ */ H(f, {
2075
+ return /* @__PURE__ */ H(_, {
2077
2076
  ref: i,
2078
2077
  "data-slot": "chat-notification-card-expand-button",
2079
2078
  "data-testid": "chat-notification-card-expand-button",
@@ -2084,30 +2083,30 @@ var ua = P(function({ className: e, onMouseDown: t, onClick: n, ...r }, i) {
2084
2083
  onMouseDown: s,
2085
2084
  onClick: c,
2086
2085
  ...r,
2087
- children: H(a ? vt : _t, {})
2086
+ children: H(a ? St : xt, {})
2088
2087
  });
2089
2088
  });
2090
- ua.displayName = "ChatNotificationCardExpandButton";
2091
- var da = Ji, fa = ca, pa = ea;
2089
+ fa.displayName = "ChatNotificationCardExpandButton";
2090
+ var pa = Xi, ma = ua, ha = na;
2092
2091
  //#endregion
2093
2092
  //#region src/components/chat-notification-popup/chat-notification-popup.tsx
2094
- function ma({ children: e, ...t }) {
2095
- return /* @__PURE__ */ H(D, {
2093
+ function ga({ children: e, ...t }) {
2094
+ return /* @__PURE__ */ H(oe, {
2096
2095
  ...t,
2097
2096
  children: e
2098
2097
  });
2099
2098
  }
2100
- var ha = P(function({ children: e, ...t }, n) {
2101
- return /* @__PURE__ */ H(O, {
2099
+ var _a = P(function({ children: e, ...t }, n) {
2100
+ return /* @__PURE__ */ H(ce, {
2102
2101
  ref: n,
2103
2102
  "data-slot": "chat-notification-popup-trigger",
2104
2103
  ...t,
2105
2104
  children: e
2106
2105
  });
2107
2106
  });
2108
- ha.displayName = "ChatNotificationPopupTrigger";
2109
- var ga = P(function({ children: e, className: t, ...n }, r) {
2110
- return /* @__PURE__ */ H(ie, {
2107
+ _a.displayName = "ChatNotificationPopupTrigger";
2108
+ var va = P(function({ children: e, className: t, ...n }, r) {
2109
+ return /* @__PURE__ */ H(se, {
2111
2110
  ref: r,
2112
2111
  "data-slot": "chat-notification-popup-content",
2113
2112
  className: M("md:w-[467px]", t),
@@ -2115,10 +2114,10 @@ var ga = P(function({ children: e, className: t, ...n }, r) {
2115
2114
  children: e
2116
2115
  });
2117
2116
  });
2118
- ga.displayName = "ChatNotificationPopupContent";
2117
+ va.displayName = "ChatNotificationPopupContent";
2119
2118
  //#endregion
2120
2119
  //#region src/components/chat-reply/chat-reply.tsx
2121
- function _a({ className: e, children: t, hasPadding: n = !0 }) {
2120
+ function ya({ className: e, children: t, hasPadding: n = !0 }) {
2122
2121
  return /* @__PURE__ */ H("ul", {
2123
2122
  "data-testid": "chat-replies",
2124
2123
  "data-slot": "chat-replies",
@@ -2127,7 +2126,7 @@ function _a({ className: e, children: t, hasPadding: n = !0 }) {
2127
2126
  children: t
2128
2127
  });
2129
2128
  }
2130
- function va({ className: e, children: t, isMultiline: n = !1, ...r }) {
2129
+ function ba({ className: e, children: t, isMultiline: n = !1, ...r }) {
2131
2130
  return /* @__PURE__ */ H("li", {
2132
2131
  "data-testid": "chat-reply",
2133
2132
  "data-slot": "chat-reply",
@@ -2137,19 +2136,19 @@ function va({ className: e, children: t, isMultiline: n = !1, ...r }) {
2137
2136
  children: t
2138
2137
  });
2139
2138
  }
2140
- function ya({ className: e, children: n, ...r }) {
2141
- return /* @__PURE__ */ H(t, {
2139
+ function xa({ className: e, children: t, ...n }) {
2140
+ return /* @__PURE__ */ H(o, {
2142
2141
  variant: "outlined",
2143
2142
  size: "sm",
2144
2143
  color: "secondary",
2145
2144
  "data-testid": "chat-reply-label",
2146
2145
  "data-slot": "chat-reply-label",
2147
2146
  className: M("shrink-0", e),
2148
- ...r,
2149
- children: n
2147
+ ...n,
2148
+ children: t
2150
2149
  });
2151
2150
  }
2152
- function ba({ className: e, children: t, asChild: n = !1, ...r }) {
2151
+ function Sa({ className: e, children: t, asChild: n = !1, ...r }) {
2153
2152
  return /* @__PURE__ */ H(j, {
2154
2153
  "data-testid": "chat-reply-value",
2155
2154
  "data-slot": "chat-reply-value",
@@ -2162,14 +2161,14 @@ function ba({ className: e, children: t, asChild: n = !1, ...r }) {
2162
2161
  }
2163
2162
  //#endregion
2164
2163
  //#region src/components/chat-suggestion/chat-suggestion.tsx
2165
- var xa = N(null);
2166
- function Sa() {
2167
- let e = I(xa);
2164
+ var Ca = N(null);
2165
+ function wa() {
2166
+ let e = I(Ca);
2168
2167
  if (!e) throw Error("\"useChatSuggestionContext\" must be used within a ChatSuggestion");
2169
2168
  return e;
2170
2169
  }
2171
- var Ca = P(function({ children: e, className: t, hasLoop: n = !0, ...r }, i) {
2172
- return /* @__PURE__ */ H(p, {
2170
+ var Ta = P(function({ children: e, className: t, hasLoop: n = !0, ...r }, i) {
2171
+ return /* @__PURE__ */ H(v, {
2173
2172
  asChild: !0,
2174
2173
  hasLoop: n,
2175
2174
  ref: i,
@@ -2178,31 +2177,31 @@ var Ca = P(function({ children: e, className: t, hasLoop: n = !0, ...r }, i) {
2178
2177
  "data-slot": "chat-suggestions",
2179
2178
  "data-testid": "chat-suggestions",
2180
2179
  className: M("m-0 p-0 list-none flex flex-col items-stretch gap-0", t),
2181
- children: fe.map(e, (e, t) => me(e) ? pe(e, { index: t }) : e)
2180
+ children: ge.map(e, (e, t) => ve(e) ? _e(e, { index: t }) : e)
2182
2181
  })
2183
2182
  });
2184
2183
  });
2185
- Ca.displayName = "ChatSuggestions";
2186
- var wa = P(function({ index: e, children: t, className: n, triggerClassName: r, onHover: i, onMouseEnter: a, ...o }, s) {
2184
+ Ta.displayName = "ChatSuggestions";
2185
+ var Ea = P(function({ index: e, children: t, className: n, triggerClassName: r, onHover: i, onMouseEnter: a, ...o }, s) {
2187
2186
  let c = z(() => ({ index: e }), [e]);
2188
2187
  function l(e) {
2189
2188
  a?.(e), i?.();
2190
2189
  }
2191
- return /* @__PURE__ */ H(xa.Provider, {
2190
+ return /* @__PURE__ */ H(Ca.Provider, {
2192
2191
  value: c,
2193
- children: /* @__PURE__ */ U(m, {
2192
+ children: /* @__PURE__ */ U(y, {
2194
2193
  ref: s,
2195
2194
  "data-slot": "chat-suggestion",
2196
- className: se(M("relative items-start gap-0 p-4 text-typography-text-secondary", n), { highlighted: "bg-layout-accent-low-background-hover-default" }),
2195
+ className: fe(M("relative items-start gap-0 p-4 text-typography-text-secondary", n), { highlighted: "bg-layout-accent-low-background-hover-default" }),
2197
2196
  ...o,
2198
2197
  onMouseEnter: l,
2199
- children: [/* @__PURE__ */ H(_, { className: M("absolute inset-0 rounded-[inherit] outline-none", r) }), t]
2198
+ children: [/* @__PURE__ */ H(S, { className: M("absolute inset-0 rounded-[inherit] outline-none", r) }), t]
2200
2199
  })
2201
2200
  });
2202
2201
  });
2203
- wa.displayName = "ChatSuggestion";
2204
- function Ta({ children: e, className: t, innerClassName: n }) {
2205
- let { index: r = 0 } = Sa();
2202
+ Ea.displayName = "ChatSuggestion";
2203
+ function Da({ children: e, className: t, innerClassName: n }) {
2204
+ let { index: r = 0 } = wa();
2206
2205
  return /* @__PURE__ */ H("span", {
2207
2206
  "aria-hidden": "true",
2208
2207
  "data-slot": "chat-suggestion-label-icon",
@@ -2221,17 +2220,17 @@ function Ta({ children: e, className: t, innerClassName: n }) {
2221
2220
  })
2222
2221
  });
2223
2222
  }
2224
- function Ea({ children: e, className: t, isMultiline: n = !0 }) {
2223
+ function Oa({ children: e, className: t, isMultiline: n = !0 }) {
2225
2224
  return /* @__PURE__ */ H(j, {
2226
2225
  variant: "body-small-low",
2227
2226
  "data-slot": "chat-suggestion-label",
2228
2227
  "data-multiline": n,
2229
2228
  className: M("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),
2230
2229
  asChild: !0,
2231
- children: /* @__PURE__ */ H(g, { children: e })
2230
+ children: /* @__PURE__ */ H(x, { children: e })
2232
2231
  });
2233
2232
  }
2234
- function Da({ children: e, className: t }) {
2233
+ function ka({ children: e, className: t }) {
2235
2234
  return /* @__PURE__ */ H("div", {
2236
2235
  role: "group",
2237
2236
  "data-slot": "chat-suggestion-actions",
@@ -2239,38 +2238,38 @@ function Da({ children: e, className: t }) {
2239
2238
  children: e
2240
2239
  });
2241
2240
  }
2242
- var Oa = P(function({ className: e, children: t, ...n }, r) {
2243
- return /* @__PURE__ */ H(h, {
2241
+ var Aa = P(function({ className: e, children: t, ...n }, r) {
2242
+ return /* @__PURE__ */ H(b, {
2244
2243
  ref: r,
2245
2244
  className: M("pointer-events-auto", e),
2246
2245
  ...n,
2247
2246
  children: t
2248
2247
  });
2249
2248
  });
2250
- Oa.displayName = "ChatSuggestionAction";
2249
+ Aa.displayName = "ChatSuggestionAction";
2251
2250
  //#endregion
2252
2251
  //#region src/components/chat-thread/chat-thread.tsx
2253
- function ka(e, t) {
2252
+ function ja(e, t) {
2254
2253
  let n = P((t, n) => e({
2255
2254
  ...t,
2256
2255
  ref: n
2257
2256
  }));
2258
2257
  return n.displayName = t, n;
2259
2258
  }
2260
- var Aa = ka(Yt.Viewport, "ChatThreadViewportPrimitive"), ja = ka(Yt.Content, "ChatThreadContentPrimitive"), Ma = ka(Yt.Item, "ChatThreadItemPrimitive");
2261
- function Na(e, t) {
2259
+ var Ma = ja($t.Viewport, "ChatThreadViewportPrimitive"), Na = ja($t.Content, "ChatThreadContentPrimitive"), Pa = ja($t.Item, "ChatThreadItemPrimitive");
2260
+ function Fa(e, t) {
2262
2261
  typeof e == "function" ? e(t) : e && (e.current = t);
2263
2262
  }
2264
- var Pa = 12, Fa = "--chat-thread-group-min-height", Ia = {
2263
+ var Ia = 12, La = "--chat-thread-group-min-height", Ra = {
2265
2264
  scrollToEnd: () => !1,
2266
2265
  scrollToMessage: () => !1,
2267
2266
  scrollToStart: () => !1
2268
- }, La = N(null);
2269
- function Ra() {
2270
- return I(La) ?? Ia;
2267
+ }, za = N(null);
2268
+ function Ba() {
2269
+ return I(za) ?? Ra;
2271
2270
  }
2272
- function za({ children: e }) {
2273
- let { scrollToEnd: t, scrollToMessage: n, scrollToStart: r } = Xt(), i = z(() => ({
2271
+ function Va({ children: e }) {
2272
+ let { scrollToEnd: t, scrollToMessage: n, scrollToStart: r } = en(), i = z(() => ({
2274
2273
  scrollToEnd: t,
2275
2274
  scrollToMessage: n,
2276
2275
  scrollToStart: r
@@ -2279,27 +2278,27 @@ function za({ children: e }) {
2279
2278
  n,
2280
2279
  r
2281
2280
  ]);
2282
- return /* @__PURE__ */ H(La.Provider, {
2281
+ return /* @__PURE__ */ H(za.Provider, {
2283
2282
  value: i,
2284
2283
  children: e
2285
2284
  });
2286
2285
  }
2287
- var Ba = N(null);
2288
- function Va(e) {
2289
- let t = I(Ba);
2286
+ var Ha = N(null);
2287
+ function Ua(e) {
2288
+ let t = I(Ha);
2290
2289
  if (!t) throw Error(`[web-chat-ui] <${e}> must be rendered inside <ChatThreadProvider>`);
2291
2290
  return t;
2292
2291
  }
2293
- function Ha(e, t, n) {
2292
+ function Wa(e, t, n) {
2294
2293
  return {
2295
2294
  id: e,
2296
2295
  conversationId: t ?? null,
2297
2296
  knownGroupIds: n.length === 0 ? null : new Set(n)
2298
2297
  };
2299
2298
  }
2300
- function Ua({ children: e, conversationId: t, groupIds: n, isStreaming: r = !1, scrollMode: i = "anchor", autoScroll: a = i === "follow" || !r, defaultScrollPosition: o = "end", scrollPreviousItemPeek: s = 0, scrollMargin: c = Pa, ...l }) {
2301
- let [u, d] = V(() => Ha(0, t, n));
2302
- (u.conversationId !== (t ?? null) || u.knownGroupIds === null != (n.length === 0)) && d(Ha(u.id + 1, t, n));
2299
+ function Ga({ children: e, conversationId: t, groupIds: n, isStreaming: r = !1, scrollMode: i = "anchor", autoScroll: a = i === "follow" || !r, defaultScrollPosition: o = "end", scrollPreviousItemPeek: s = 0, scrollMargin: c = Ia, ...l }) {
2300
+ let [u, d] = V(() => Wa(0, t, n));
2301
+ (u.conversationId !== (t ?? null) || u.knownGroupIds === null != (n.length === 0)) && d(Wa(u.id + 1, t, n));
2303
2302
  let { knownGroupIds: f } = u, p = z(() => ({
2304
2303
  isStreaming: r,
2305
2304
  scrollMargin: c,
@@ -2311,23 +2310,23 @@ function Ua({ children: e, conversationId: t, groupIds: n, isStreaming: r = !1,
2311
2310
  i,
2312
2311
  f
2313
2312
  ]);
2314
- return /* @__PURE__ */ H(Yt.Provider, {
2313
+ return /* @__PURE__ */ H($t.Provider, {
2315
2314
  autoScroll: a,
2316
2315
  scrollPreviousItemPeek: s,
2317
2316
  scrollMargin: c,
2318
2317
  defaultScrollPosition: o,
2319
2318
  ...l,
2320
- children: /* @__PURE__ */ U(Ba.Provider, {
2319
+ children: /* @__PURE__ */ U(Ha.Provider, {
2321
2320
  value: p,
2322
- children: [i === "follow" && /* @__PURE__ */ H(Wa, {
2321
+ children: [i === "follow" && /* @__PURE__ */ H(Ka, {
2323
2322
  groupIds: n,
2324
2323
  knownGroupIds: f
2325
- }), /* @__PURE__ */ H(za, { children: e })]
2324
+ }), /* @__PURE__ */ H(Va, { children: e })]
2326
2325
  })
2327
2326
  }, u.id);
2328
2327
  }
2329
- function Wa({ groupIds: e, knownGroupIds: t }) {
2330
- let { scrollToEnd: n } = Xt(), r = e.at(-1);
2328
+ function Ka({ groupIds: e, knownGroupIds: t }) {
2329
+ let { scrollToEnd: n } = en(), r = e.at(-1);
2331
2330
  return R(() => {
2332
2331
  r === void 0 || t === null || t.has(r) || n({ behavior: "auto" });
2333
2332
  }, [
@@ -2336,13 +2335,13 @@ function Wa({ groupIds: e, knownGroupIds: t }) {
2336
2335
  n
2337
2336
  ]), null;
2338
2337
  }
2339
- var Ga = P(function({ children: e, className: t, viewportClassName: n, contentClassName: r, viewportRef: i, contentRef: a, scrollButton: o = !0, scrollButtonClassName: s, scrollButtonTooltip: c, isLoading: l = !1, hasError: u = !1, error: d, renderError: f, ...p }, m) {
2340
- let { isStreaming: h, scrollMargin: g, scrollMode: _ } = Va("ChatThread"), v = _ === "anchor", y = B(null), b = B(null), x = F((e) => {
2341
- y.current = e, Na(i, e), Na(m, e?.parentElement ?? null);
2338
+ var qa = P(function({ children: e, className: t, viewportClassName: n, contentClassName: r, viewportRef: i, contentRef: a, scrollButton: o = !0, scrollButtonClassName: s, scrollButtonTooltip: c, isLoading: l = !1, hasError: u = !1, error: d, renderError: f, ...p }, m) {
2339
+ let { isStreaming: h, scrollMargin: g, scrollMode: _ } = Ua("ChatThread"), v = _ === "anchor", y = B(null), b = B(null), x = F((e) => {
2340
+ y.current = e, Fa(i, e), Fa(m, e?.parentElement ?? null);
2342
2341
  }, [i, m]), S = F((e) => {
2343
- b.current = e, Na(a, e);
2342
+ b.current = e, Fa(a, e);
2344
2343
  }, [a]);
2345
- return Ka(y, b, g, v), /* @__PURE__ */ U(Yt.Root, {
2344
+ return Ja(y, b, g, v), /* @__PURE__ */ U($t.Root, {
2346
2345
  "data-slot": "chat-thread",
2347
2346
  "data-testid": "chat-thread",
2348
2347
  "data-scroll-mode": _,
@@ -2352,7 +2351,7 @@ var Ga = P(function({ children: e, className: t, viewportClassName: n, contentCl
2352
2351
  className: M("relative flex flex-col flex-1 min-h-0 overflow-hidden", t),
2353
2352
  ...p,
2354
2353
  children: [
2355
- /* @__PURE__ */ H(Aa, {
2354
+ /* @__PURE__ */ H(Ma, {
2356
2355
  ref: x,
2357
2356
  "data-slot": "chat-thread-viewport",
2358
2357
  "aria-label": "Chat message history",
@@ -2362,7 +2361,7 @@ var Ga = P(function({ children: e, className: t, viewportClassName: n, contentCl
2362
2361
  scrollbarWidth: "thin",
2363
2362
  scrollbarColor: "var(--color-scrollbar-thumb) transparent"
2364
2363
  },
2365
- children: /* @__PURE__ */ H(ja, {
2364
+ children: /* @__PURE__ */ H(Na, {
2366
2365
  ref: S,
2367
2366
  "data-slot": "chat-thread-content",
2368
2367
  "aria-busy": h,
@@ -2371,29 +2370,29 @@ var Ga = P(function({ children: e, className: t, viewportClassName: n, contentCl
2371
2370
  children: e
2372
2371
  })
2373
2372
  }),
2374
- u && !l && /* @__PURE__ */ H(Za, {
2373
+ u && !l && /* @__PURE__ */ H($a, {
2375
2374
  error: d,
2376
2375
  children: f?.(d)
2377
2376
  }),
2378
- o && /* @__PURE__ */ H(Xa, {
2377
+ o && /* @__PURE__ */ H(Qa, {
2379
2378
  className: s,
2380
2379
  tooltip: c
2381
2380
  })
2382
2381
  ]
2383
2382
  });
2384
2383
  });
2385
- Ga.displayName = "ChatThread";
2386
- function Ka(e, t, n, r) {
2384
+ qa.displayName = "ChatThread";
2385
+ function Ja(e, t, n, r) {
2387
2386
  R(() => {
2388
2387
  let i = e.current, a = t.current;
2389
2388
  if (!i || !a) return;
2390
2389
  if (!r) {
2391
- a.style.removeProperty(Fa);
2390
+ a.style.removeProperty(La);
2392
2391
  return;
2393
2392
  }
2394
2393
  let o = () => {
2395
2394
  let { paddingTop: e, paddingBottom: t } = window.getComputedStyle(a), r = i.clientHeight - (Number.parseFloat(e) || 0) - (Number.parseFloat(t) || 0) - n;
2396
- a.style.setProperty(Fa, `${Math.max(0, r)}px`);
2395
+ a.style.setProperty(La, `${Math.max(0, r)}px`);
2397
2396
  };
2398
2397
  if (o(), typeof ResizeObserver > "u") return;
2399
2398
  let s = new ResizeObserver(o);
@@ -2405,9 +2404,9 @@ function Ka(e, t, n, r) {
2405
2404
  r
2406
2405
  ]);
2407
2406
  }
2408
- var qa = P(function({ groupId: e, className: t, children: n, ...r }, i) {
2409
- let { knownGroupIds: a, scrollMode: o } = Va("ChatThreadGroup"), s = o === "anchor" && a !== null && !a.has(e);
2410
- return /* @__PURE__ */ H(Ma, {
2407
+ var Ya = P(function({ groupId: e, className: t, children: n, ...r }, i) {
2408
+ let { knownGroupIds: a, scrollMode: o } = Ua("ChatThreadGroup"), s = o === "anchor" && a !== null && !a.has(e);
2409
+ return /* @__PURE__ */ H(Pa, {
2411
2410
  ref: i,
2412
2411
  messageId: `chat-thread-group-${e}`,
2413
2412
  scrollAnchor: s,
@@ -2418,8 +2417,8 @@ var qa = P(function({ groupId: e, className: t, children: n, ...r }, i) {
2418
2417
  children: n
2419
2418
  });
2420
2419
  });
2421
- qa.displayName = "ChatThreadGroup";
2422
- var Ja = P(function({ messageId: e, children: t, ...n }, r) {
2420
+ Ya.displayName = "ChatThreadGroup";
2421
+ var Xa = P(function({ messageId: e, children: t, ...n }, r) {
2423
2422
  return /* @__PURE__ */ H("div", {
2424
2423
  ref: r,
2425
2424
  "data-slot": "chat-thread-question",
@@ -2429,8 +2428,8 @@ var Ja = P(function({ messageId: e, children: t, ...n }, r) {
2429
2428
  children: t
2430
2429
  });
2431
2430
  });
2432
- Ja.displayName = "ChatThreadQuestion";
2433
- var Ya = P(function({ messageId: e, children: t, ...n }, r) {
2431
+ Xa.displayName = "ChatThreadQuestion";
2432
+ var Za = P(function({ messageId: e, children: t, ...n }, r) {
2434
2433
  return /* @__PURE__ */ H("div", {
2435
2434
  ref: r,
2436
2435
  "data-slot": "chat-thread-answer",
@@ -2440,21 +2439,21 @@ var Ya = P(function({ messageId: e, children: t, ...n }, r) {
2440
2439
  children: t
2441
2440
  });
2442
2441
  });
2443
- Ya.displayName = "ChatThreadAnswer";
2444
- function Xa({ className: e, tooltip: t }) {
2445
- let { end: n } = Zt();
2442
+ Za.displayName = "ChatThreadAnswer";
2443
+ function Qa({ className: e, tooltip: t }) {
2444
+ let { end: n } = tn();
2446
2445
  return /* @__PURE__ */ H("div", {
2447
2446
  "data-slot": "chat-thread-scroll-button",
2448
2447
  "data-testid": "chat-message-history-scroll-button",
2449
2448
  "data-hidden": !n,
2450
2449
  "aria-hidden": !n || void 0,
2451
2450
  className: M("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),
2452
- children: /* @__PURE__ */ H(Yt.Button, {
2451
+ children: /* @__PURE__ */ H($t.Button, {
2453
2452
  direction: "end",
2454
2453
  render: ({ inert: e, children: n, ...r }) => /* @__PURE__ */ H(A, {
2455
2454
  tooltip: t,
2456
2455
  side: "top",
2457
- children: /* @__PURE__ */ H(f, {
2456
+ children: /* @__PURE__ */ H(_, {
2458
2457
  ...r,
2459
2458
  inert: e ? "" : void 0,
2460
2459
  className: "bg-paper-elevation-2",
@@ -2462,13 +2461,13 @@ function Xa({ className: e, tooltip: t }) {
2462
2461
  size: "md",
2463
2462
  tabIndex: -1,
2464
2463
  "aria-label": t,
2465
- children: /* @__PURE__ */ H(_t, {})
2464
+ children: /* @__PURE__ */ H(xt, {})
2466
2465
  })
2467
2466
  })
2468
2467
  })
2469
2468
  });
2470
2469
  }
2471
- function Za({ children: e, error: t, className: n }) {
2470
+ function $a({ children: e, error: t, className: n }) {
2472
2471
  return /* @__PURE__ */ H("div", {
2473
2472
  "data-slot": "chat-thread-error-state",
2474
2473
  "data-testid": "chat-message-history-error-state",
@@ -2484,68 +2483,67 @@ function Za({ children: e, error: t, className: n }) {
2484
2483
  }
2485
2484
  //#endregion
2486
2485
  //#region src/components/chat-artifact/chat-artifact.tsx
2487
- function Qa({ asChild: e = !1, className: t, children: n, ...r }) {
2488
- return /* @__PURE__ */ H(e ? W : "button", {
2489
- role: "group",
2490
- "data-slot": "chat-artifact",
2491
- "data-testid": "chat-artifact",
2492
- className: M("cursor-pointer", "w-full", "flex flex-row items-center gap-8", "p-8 rounded-promptbox-attachment", "bg-promptbox-attachment-background", "hover:bg-promptbox-attachment-background-hover", "active:bg-promptbox-attachment-background-pressed", "outline-none", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-focus-visible", t),
2493
- ...r,
2494
- children: n
2486
+ function eo({ asChild: e = !1, className: n, children: r, ...i }) {
2487
+ return /* @__PURE__ */ H(t, {
2488
+ asChild: !0,
2489
+ children: /* @__PURE__ */ H(e ? W : "button", {
2490
+ ...e ? {} : { type: "button" },
2491
+ "data-slot": "chat-artifact",
2492
+ "data-testid": "chat-artifact",
2493
+ className: M("cursor-pointer", "w-full", "flex-row items-start gap-card-header-gap", "py-card-header-lvl-1", "px-[calc(var(--spacing-card-header-lvl-1)+var(--spacing-card-header-hover-area))]", "text-left", "isolate", "before:absolute before:inset-card-header-lvl-1 before:-z-10 before:pointer-events-none", "before:rounded-card-header before:transition-colors", "hover:before:bg-layout-accent-low-background-hover-base", "active:before:bg-layout-accent-low-background-pressed-base", "focus-visible:before:bg-layout-accent-low-background-hover-base", "has-[[data-slot=chat-artifact-actions]:hover]:before:bg-transparent", "outline-none", "focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-focus-visible", n),
2494
+ ...i,
2495
+ children: r
2496
+ })
2495
2497
  });
2496
2498
  }
2497
- function $a({ className: e, children: t }) {
2498
- return /* @__PURE__ */ H("span", {
2499
+ function to({ className: e, children: t }) {
2500
+ return /* @__PURE__ */ H(i, {
2499
2501
  "data-slot": "chat-artifact-icon",
2500
2502
  "data-testid": "chat-artifact-icon",
2501
- className: M("shrink-0", "inline-flex items-center justify-center", "size-32"),
2502
- children: /* @__PURE__ */ H("span", {
2503
- className: M("size-full", "inline-flex items-center justify-center", "rounded-[8px] p-8 [&_svg]:size-16", "bg-secondary-hover", "text-icon-fill-inverse", e),
2504
- children: t
2505
- })
2503
+ className: M("text-avatar-foreground", "[&_svg]:size-4.5", e),
2504
+ children: t
2506
2505
  });
2507
2506
  }
2508
- function eo({ className: e, children: t }) {
2507
+ function no({ className: e, children: t }) {
2509
2508
  return /* @__PURE__ */ H("div", {
2510
2509
  "data-slot": "chat-artifact-content",
2511
2510
  "data-testid": "chat-artifact-content",
2512
- className: M("flex-1 min-w-0", "flex flex-col", "text-left", "overflow-hidden", e),
2511
+ className: M("flex-1 min-w-0", "flex flex-col items-start justify-center", "min-h-15 py-1.5", "text-left", e),
2513
2512
  children: t
2514
2513
  });
2515
2514
  }
2516
- function to({ className: e, children: t }) {
2517
- return /* @__PURE__ */ H(j, {
2518
- variant: "body-sm",
2515
+ function ro({ className: e, children: t }) {
2516
+ return /* @__PURE__ */ H(a, {
2519
2517
  "data-slot": "chat-artifact-title",
2520
2518
  "data-testid": "chat-artifact-title",
2521
- className: M("min-w-0 w-full truncate", e),
2519
+ className: M("w-full wrap-break-word truncate", "text-layout-foreground-base", e),
2522
2520
  children: t
2523
2521
  });
2524
2522
  }
2525
- function no({ className: e, children: t }) {
2526
- return /* @__PURE__ */ H(j, {
2527
- variant: "caption-md",
2523
+ function io({ className: e, children: t }) {
2524
+ return /* @__PURE__ */ H(r, {
2528
2525
  "data-slot": "chat-artifact-caption",
2529
2526
  "data-testid": "chat-artifact-caption",
2530
- className: M("min-w-0 w-full truncate", "text-text-tertiary", e),
2527
+ className: M("min-w-0 w-full truncate", "text-layout-foreground-light", e),
2531
2528
  children: t
2532
2529
  });
2533
2530
  }
2534
- function ro({ className: e, children: t }) {
2535
- return /* @__PURE__ */ H("div", {
2531
+ function ao({ className: e, children: t }) {
2532
+ return /* @__PURE__ */ H(n, {
2536
2533
  role: "group",
2537
2534
  "data-slot": "chat-artifact-actions",
2538
2535
  "data-testid": "chat-artifact-actions",
2539
- className: M("ml-auto shrink-0", "flex items-center gap-8", e),
2536
+ className: M(e),
2537
+ onClick: (e) => e.stopPropagation(),
2540
2538
  children: t
2541
2539
  });
2542
2540
  }
2543
2541
  //#endregion
2544
2542
  //#region src/components/canvas-shell/canvas-shell.tsx
2545
- function io({ className: e, children: t, ...n }) {
2546
- return /* @__PURE__ */ H(ne, {
2543
+ function oo({ className: e, children: t, ...n }) {
2544
+ return /* @__PURE__ */ H(ae, {
2547
2545
  isCollapsible: !1,
2548
- children: /* @__PURE__ */ H(S, {
2546
+ children: /* @__PURE__ */ H(T, {
2549
2547
  "data-slot": "canvas-shell",
2550
2548
  className: e,
2551
2549
  ...n,
@@ -2553,8 +2551,8 @@ function io({ className: e, children: t, ...n }) {
2553
2551
  })
2554
2552
  });
2555
2553
  }
2556
- function ao({ className: e, children: t, hasBorder: n = !0, ...r }) {
2557
- return /* @__PURE__ */ H(te, {
2554
+ function so({ className: e, children: t, hasBorder: n = !0, ...r }) {
2555
+ return /* @__PURE__ */ H(O, {
2558
2556
  "data-slot": "canvas-shell-header",
2559
2557
  hasBorder: n,
2560
2558
  className: e,
@@ -2562,64 +2560,64 @@ function ao({ className: e, children: t, hasBorder: n = !0, ...r }) {
2562
2560
  children: t
2563
2561
  });
2564
2562
  }
2565
- function oo({ className: e, children: t, ...n }) {
2566
- return /* @__PURE__ */ H(re, {
2563
+ function co({ className: e, children: t, ...n }) {
2564
+ return /* @__PURE__ */ H(k, {
2567
2565
  "data-slot": "canvas-shell-title",
2568
2566
  className: e,
2569
2567
  ...n,
2570
2568
  children: t
2571
2569
  });
2572
2570
  }
2573
- function so({ className: e, children: t, ...n }) {
2574
- return /* @__PURE__ */ H(w, {
2571
+ function lo({ className: e, children: t, ...n }) {
2572
+ return /* @__PURE__ */ H(ne, {
2575
2573
  "data-slot": "canvas-shell-close-trigger",
2576
2574
  className: e,
2577
2575
  ...n,
2578
2576
  children: t
2579
2577
  });
2580
2578
  }
2581
- function co({ className: e, children: t, isFullScreen: n, labels: r, ...i }) {
2582
- return /* @__PURE__ */ H(C, {
2579
+ function uo({ className: e, children: t, isFullScreen: n, labels: r, ...i }) {
2580
+ return /* @__PURE__ */ H(E, {
2583
2581
  "data-slot": "canvas-shell-full-screen-trigger",
2584
2582
  "aria-pressed": n,
2585
2583
  "aria-label": n ? r?.exit ?? "Exit full screen" : r?.enter ?? "Full screen",
2586
2584
  className: M("max-md:hidden", e),
2587
2585
  ...i,
2588
- children: t || /* @__PURE__ */ H(It, {})
2586
+ children: t || /* @__PURE__ */ H(Bt, {})
2589
2587
  });
2590
2588
  }
2591
- function lo({ className: e, children: t, menuClassName: n, onOpenChange: r, ...i }) {
2589
+ function fo({ className: e, children: t, menuClassName: n, onOpenChange: r, ...i }) {
2592
2590
  let [a, o] = V(!1);
2593
2591
  function s(e) {
2594
2592
  o(e), r?.(e);
2595
2593
  }
2596
- return /* @__PURE__ */ U(b, {
2594
+ return /* @__PURE__ */ U(te, {
2597
2595
  modal: !1,
2598
2596
  onOpenChange: s,
2599
- children: [/* @__PURE__ */ H(x, {
2597
+ children: [/* @__PURE__ */ H(w, {
2600
2598
  asChild: !0,
2601
- children: /* @__PURE__ */ H(C, {
2599
+ children: /* @__PURE__ */ H(E, {
2602
2600
  "data-slot": "canvas-shell-options-button",
2603
2601
  isActive: a,
2604
2602
  "aria-label": "More options",
2605
2603
  className: e,
2606
2604
  ...i,
2607
- children: /* @__PURE__ */ H(Ft, {})
2605
+ children: /* @__PURE__ */ H(zt, {})
2608
2606
  })
2609
- }), /* @__PURE__ */ H(v, {
2607
+ }), /* @__PURE__ */ H(C, {
2610
2608
  className: M("w-[200px]", n),
2611
2609
  children: t
2612
2610
  })]
2613
2611
  });
2614
2612
  }
2615
- var uo = ce;
2616
- function fo({ className: e, children: t, bodyClassName: n, hasPadding: r = !0, hasScroll: i = !0, ...a }) {
2617
- return /* @__PURE__ */ H(T, {
2613
+ var po = pe;
2614
+ function mo({ className: e, children: t, bodyClassName: n, hasPadding: r = !0, hasScroll: i = !0, ...a }) {
2615
+ return /* @__PURE__ */ H(D, {
2618
2616
  "data-slot": "canvas-shell-content",
2619
2617
  "data-has-scroll": i,
2620
2618
  className: e,
2621
2619
  ...a,
2622
- children: /* @__PURE__ */ H(ee, {
2620
+ children: /* @__PURE__ */ H(re, {
2623
2621
  "data-slot": "canvas-shell-content-body",
2624
2622
  hasPadding: r,
2625
2623
  hasScroll: i,
@@ -2628,8 +2626,8 @@ function fo({ className: e, children: t, bodyClassName: n, hasPadding: r = !0, h
2628
2626
  })
2629
2627
  });
2630
2628
  }
2631
- function po({ className: e, children: t, ...n }) {
2632
- return /* @__PURE__ */ H(E, {
2629
+ function ho({ className: e, children: t, ...n }) {
2630
+ return /* @__PURE__ */ H(ie, {
2633
2631
  "data-slot": "canvas-shell-footer",
2634
2632
  className: e,
2635
2633
  ...n,
@@ -2638,7 +2636,7 @@ function po({ className: e, children: t, ...n }) {
2638
2636
  }
2639
2637
  //#endregion
2640
2638
  //#region src/components/new-chat-trigger/new-chat-trigger.tsx
2641
- var mo = P(({ asChild: e = !1, children: t, onClick: n, ...r }, i) => {
2639
+ var go = P(({ asChild: e = !1, children: t, onClick: n, ...r }, i) => {
2642
2640
  let { goToNewChat: a } = X(), o = e ? W : "button";
2643
2641
  function s(e) {
2644
2642
  n?.(e), a();
@@ -2651,144 +2649,110 @@ var mo = P(({ asChild: e = !1, children: t, onClick: n, ...r }, i) => {
2651
2649
  children: t
2652
2650
  });
2653
2651
  });
2654
- mo.displayName = "NewChatTrigger";
2652
+ go.displayName = "NewChatTrigger";
2655
2653
  //#endregion
2656
2654
  //#region src/components/chat-thinking-process/chat-thinking-process.tsx
2657
- var ho = P(function({ children: e, className: t, defaultOpen: r = !1, isStreaming: i = !1, ...a }, o) {
2658
- return /* @__PURE__ */ H(n, {
2659
- defaultOpen: r,
2655
+ var _o = P(function({ children: e, className: t, defaultOpen: n = !1, isStreaming: r = !1, ...i }, a) {
2656
+ return /* @__PURE__ */ H(s, {
2657
+ defaultOpen: n,
2660
2658
  asChild: !0,
2661
- ...a,
2659
+ ...i,
2662
2660
  children: /* @__PURE__ */ H("div", {
2663
- ref: o,
2661
+ ref: a,
2664
2662
  "data-slot": "chat-thinking-process",
2665
2663
  "data-testid": "chat-thinking-process",
2666
- "data-streaming": i,
2667
- className: M("group/thinking-process", "flex flex-col", t),
2664
+ "data-streaming": r,
2665
+ className: M("group/thinking-process", "flex flex-col py-6", t),
2668
2666
  children: e
2669
2667
  })
2670
2668
  });
2671
2669
  });
2672
- ho.displayName = "ChatThinkingProcess";
2673
- function go({ children: e, className: t, ...n }) {
2674
- return /* @__PURE__ */ U(a, {
2670
+ _o.displayName = "ChatThinkingProcess";
2671
+ function vo({ children: e, className: t, ...n }) {
2672
+ return /* @__PURE__ */ U(u, {
2675
2673
  "data-slot": "chat-thinking-process-trigger",
2676
2674
  "data-testid": "chat-thinking-process-trigger",
2677
- className: M("flex w-full items-center gap-4", "cursor-pointer text-left", t),
2675
+ className: M("flex w-full items-center gap-8", "cursor-pointer text-left", t),
2678
2676
  ...n,
2679
2677
  children: [e, /* @__PURE__ */ H("style", { children: "\n @keyframes shimmer {\n 100% {\n mask-position: left;\n }\n }\n " })]
2680
2678
  });
2681
2679
  }
2682
- function _o({ children: e, className: t, ...n }) {
2680
+ function yo({ children: e, className: t, ...n }) {
2683
2681
  return /* @__PURE__ */ H("span", {
2684
2682
  "data-slot": "chat-thinking-process-trigger-icon",
2685
2683
  "data-testid": "chat-thinking-process-trigger-icon",
2686
- className: M("inline-flex shrink-0 items-center justify-center", t),
2684
+ className: M("inline-flex size-20 shrink-0 items-center justify-center", "text-layout-foreground-light", "[&>svg]:size-20", t),
2687
2685
  ...n,
2688
2686
  children: e
2689
2687
  });
2690
2688
  }
2691
- function vo({ children: e, className: t, ...n }) {
2689
+ function bo({ children: e, className: t, ...n }) {
2692
2690
  return /* @__PURE__ */ H(j, {
2693
2691
  asChild: !0,
2694
- variant: "body-sm",
2692
+ variant: "body-small-low",
2695
2693
  "data-slot": "chat-thinking-process-trigger-label",
2696
2694
  "data-testid": "chat-thinking-process-trigger-label",
2697
- className: M("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),
2695
+ className: M("text-layout-foreground-light", "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),
2698
2696
  children: /* @__PURE__ */ H("span", {
2699
2697
  ...n,
2700
2698
  children: e
2701
2699
  })
2702
2700
  });
2703
2701
  }
2704
- function yo({ className: e, ...t }) {
2705
- return /* @__PURE__ */ H(r, {
2702
+ function xo({ className: e, ...t }) {
2703
+ return /* @__PURE__ */ H(c, {
2706
2704
  "data-slot": "chat-thinking-process-trigger-arrow",
2707
2705
  "data-testid": "chat-thinking-process-trigger-arrow",
2708
- className: M("items-center justify-center text-text-secondary", "size-16", e),
2706
+ className: M("items-center justify-center text-layout-foreground-light", "size-16", e),
2709
2707
  ...t
2710
2708
  });
2711
2709
  }
2712
- function bo({ children: e, className: t, itemsClassName: n, rowClassName: r, markerClassName: a, connectorClassName: o, previewClassName: s, hasLastMessagePreview: c = !0, ...l }) {
2713
- let { lastItemContent: u, lastItemIndex: d } = z(() => {
2714
- let t = de.Children.toArray(e);
2715
- return {
2716
- lastItemContent: t.at(-1),
2717
- lastItemIndex: String(t.length)
2718
- };
2719
- }, [e]);
2720
- return /* @__PURE__ */ U("div", {
2710
+ function So({ children: e, className: t, itemsClassName: n, ...r }) {
2711
+ return /* @__PURE__ */ H("div", {
2721
2712
  "data-slot": "chat-thinking-process-content",
2722
2713
  "data-testid": "chat-thinking-process-content",
2723
- "data-preview": c,
2724
- className: M("pt-8", t),
2725
- children: [c && u && /* @__PURE__ */ H(Qt, {
2726
- mode: "wait",
2727
- children: /* @__PURE__ */ H(xo, {
2728
- contentId: d,
2729
- className: s,
2730
- children: u
2731
- })
2732
- }), /* @__PURE__ */ H(i, {
2714
+ className: M("pl-[28px]", t),
2715
+ children: /* @__PURE__ */ H(l, {
2733
2716
  "data-slot": "chat-thinking-process-content-items",
2734
2717
  "data-testid": "chat-thinking-process-content-items",
2735
- className: M("flex flex-col", n),
2736
- ...l,
2737
- children: de.Children.map(e, (e) => /* @__PURE__ */ U("div", {
2738
- "data-slot": "chat-thinking-process-content-row",
2739
- className: M("relative flex gap-8 text-text-secondary text-sm last:pb-0", "pl-8", "last:[&>div:first-child>span:last-child]:hidden", r),
2740
- children: [/* @__PURE__ */ U("div", {
2741
- className: "relative flex w-8 shrink-0 flex-col items-center self-stretch",
2742
- "aria-hidden": !0,
2743
- children: [/* @__PURE__ */ H("span", {
2744
- "data-slot": "chat-thinking-process-content-marker",
2745
- className: M("mt-[7px] size-[6px] shrink-0 rounded-full bg-text-secondary", a)
2746
- }), /* @__PURE__ */ H("span", {
2747
- "data-slot": "chat-thinking-process-content-connector",
2748
- className: M("absolute top-[16px] bottom-[-4px] left-1/2 w-px -translate-x-1/2 bg-component-divider", o)
2749
- })]
2750
- }), /* @__PURE__ */ H("div", {
2751
- className: "min-w-0 flex-1 pb-8",
2752
- children: e
2753
- })]
2754
- }))
2755
- })]
2718
+ className: M("flex flex-col gap-4 pt-2", n),
2719
+ ...r,
2720
+ children: e
2721
+ })
2756
2722
  });
2757
2723
  }
2758
- function xo({ children: e, className: t, contentId: n }) {
2759
- return /* @__PURE__ */ H($t.div, {
2760
- "data-slot": "chat-thinking-process-content-preview",
2761
- "data-testid": "chat-thinking-process-content-preview",
2762
- initial: { opacity: 0 },
2763
- animate: { opacity: .7 },
2764
- exit: { opacity: 0 },
2765
- transition: {
2766
- duration: .25,
2767
- ease: "easeOut"
2768
- },
2769
- className: M("group-data-[streaming=false]/thinking-process:hidden", "group-data-[state=open]/thinking-process:hidden", "px-4", t),
2770
- children: e
2771
- }, n);
2772
- }
2773
- function So({ children: e, className: t, ...n }) {
2774
- return /* @__PURE__ */ H("div", {
2724
+ function Co({ children: e, className: t, ...n }) {
2725
+ return /* @__PURE__ */ H(j, {
2726
+ asChild: !0,
2727
+ variant: "body-small-low",
2775
2728
  "data-slot": "chat-thinking-process-content-item",
2776
2729
  "data-testid": "chat-thinking-process-content-item",
2777
- className: M("text-text-secondary text-sm", t),
2730
+ className: M("flex items-center gap-4 italic text-layout-foreground-subtle", t),
2731
+ children: /* @__PURE__ */ H("div", {
2732
+ ...n,
2733
+ children: e
2734
+ })
2735
+ });
2736
+ }
2737
+ function wo({ children: e, className: t, ...n }) {
2738
+ return /* @__PURE__ */ H("span", {
2739
+ "data-slot": "chat-thinking-process-content-item-icon",
2740
+ "data-testid": "chat-thinking-process-content-item-icon",
2741
+ className: M("inline-flex h-[14px] shrink-0 items-center justify-center", "[&>img]:h-full [&>img]:w-auto", "[&>svg]:size-[14px]", t),
2778
2742
  ...n,
2779
2743
  children: e
2780
2744
  });
2781
2745
  }
2782
2746
  //#endregion
2783
2747
  //#region src/components/deprecated-empty-state.ts
2784
- var Co = s, wo = u, To = d, Eo = l, Do = c, Oo = {
2748
+ var To = f, Eo = h, Do = g, Oo = m, ko = p, Ao = {
2785
2749
  paragraph: "editor-paragraph",
2786
2750
  text: {
2787
2751
  bold: "editor-text-bold",
2788
2752
  italic: "editor-text-italic",
2789
2753
  underline: "editor-text-underline"
2790
2754
  }
2791
- }, ko = class e extends $e {
2755
+ }, jo = class e extends rt {
2792
2756
  __src;
2793
2757
  __altText;
2794
2758
  static getType() {
@@ -2826,7 +2790,7 @@ var Co = s, wo = u, To = d, Eo = l, Do = c, Oo = {
2826
2790
  return { img: () => ({
2827
2791
  conversion: (e) => {
2828
2792
  let t = e.getAttribute("src") || "", n = e.getAttribute("alt") || "";
2829
- return t ? { node: Ao(t, n) } : null;
2793
+ return t ? { node: Mo(t, n) } : null;
2830
2794
  },
2831
2795
  priority: 0
2832
2796
  }) };
@@ -2841,21 +2805,21 @@ var Co = s, wo = u, To = d, Eo = l, Do = c, Oo = {
2841
2805
  };
2842
2806
  }
2843
2807
  static importJSON(e) {
2844
- return Ao(e.src, e.altText);
2808
+ return Mo(e.src, e.altText);
2845
2809
  }
2846
2810
  isInline() {
2847
2811
  return !1;
2848
2812
  }
2849
2813
  };
2850
- function Ao(e, t) {
2851
- return new ko(e, t);
2814
+ function Mo(e, t) {
2815
+ return new jo(e, t);
2852
2816
  }
2853
- function jo(e) {
2854
- return e instanceof ko;
2817
+ function No(e) {
2818
+ return e instanceof jo;
2855
2819
  }
2856
2820
  //#endregion
2857
2821
  //#region src/components/rich-text-area/transformers.ts
2858
- function Mo(e) {
2822
+ function Po(e) {
2859
2823
  let t = /font-size\s*:\s*([^;]+)/i, n = /font-family\s*:\s*([^;]+)/i, r = /(?<![\w-])color\s*:\s*([^;]+)/i, i = t.exec(e), a = n.exec(e), o = r.exec(e);
2860
2824
  return {
2861
2825
  fontSize: i ? i[1].trim() : null,
@@ -2863,7 +2827,7 @@ function Mo(e) {
2863
2827
  color: o ? o[1].trim() : null
2864
2828
  };
2865
2829
  }
2866
- var No = {
2830
+ var Fo = {
2867
2831
  type: "text-match",
2868
2832
  trigger: "",
2869
2833
  regExp: /./,
@@ -2871,126 +2835,126 @@ var No = {
2871
2835
  dependencies: [],
2872
2836
  export: (e) => {
2873
2837
  if (!J(e)) return null;
2874
- let t = e.getStyle() ?? "", n = e.getTextContent(), r = Mo(t);
2838
+ let t = e.getStyle() ?? "", n = e.getTextContent(), r = Po(t);
2875
2839
  if (r.fontSize || r.fontFamily || r.color) {
2876
2840
  let e = "";
2877
2841
  return r.fontSize && (e += `font-size: ${r.fontSize};`), r.fontFamily && (e += `font-family: ${r.fontFamily};`), r.color && (e += `color: ${r.color};`), `<span style="${e}">${n}</span>`;
2878
2842
  }
2879
2843
  return null;
2880
2844
  }
2881
- }, Po = {
2845
+ }, Io = {
2882
2846
  type: "text-match",
2883
2847
  trigger: "",
2884
2848
  regExp: /<span\s+style="([^"]+)">(.+?)<\/span>/,
2885
2849
  importRegExp: /<span\s+style="([^"]+)">(.+?)<\/span>/,
2886
2850
  dependencies: [],
2887
2851
  replace: (e, t) => {
2888
- let [, n, r] = t, i = He(r);
2852
+ let [, n, r] = t, i = Ke(r);
2889
2853
  return i.setFormat(e.getFormat()), i.setStyle(n), e.replace(i), i;
2890
2854
  }
2891
- }, Fo = {
2855
+ }, Lo = {
2892
2856
  type: "text-match",
2893
2857
  trigger: "",
2894
2858
  regExp: /<ins>(.*?)<\/ins>/,
2895
2859
  importRegExp: /<ins>(.*?)<\/ins>/,
2896
2860
  dependencies: [],
2897
2861
  replace: (e, t) => {
2898
- let n = He(t[1]);
2862
+ let n = Ke(t[1]);
2899
2863
  return n.setFormat(e.getFormat()), n.hasFormat("underline") || n.toggleFormat("underline"), e.replace(n), n;
2900
2864
  },
2901
2865
  export: (e) => !J(e) || !e.hasFormat("underline") ? null : `<ins>${e.getTextContent()}</ins>`
2902
- }, Io = (e) => {
2866
+ }, Ro = (e) => {
2903
2867
  let t = /text-align:\s*(\w+)/i.exec(e);
2904
2868
  return t ? t[1].trim() : null;
2905
- }, Lo = {
2869
+ }, zo = {
2906
2870
  type: "element",
2907
2871
  dependencies: [],
2908
2872
  regExp: /<div\s+style="([^"]+)">(.*?)<\/div>/,
2909
2873
  replace: (e, t, n) => {
2910
- let r = Io(n[1]);
2874
+ let r = Ro(n[1]);
2911
2875
  if (!r) return !1;
2912
2876
  if (!n[2]) return;
2913
2877
  let i = t[0];
2914
2878
  J(i) && i.setTextContent(n[2]), e.setFormat(r), e.append(...t);
2915
2879
  },
2916
2880
  export: (e, t) => {
2917
- if (!Ke(e)) return null;
2881
+ if (!Xe(e)) return null;
2918
2882
  let n = e.getFormatType();
2919
2883
  return !n || n === "left" ? null : `<div style="text-align: ${n}">${t(e)}</div>`;
2920
2884
  }
2921
- }, Ro = {
2885
+ }, Bo = {
2922
2886
  type: "text-match",
2923
2887
  trigger: "",
2924
2888
  regExp: /./,
2925
2889
  importRegExp: /./,
2926
- dependencies: [ko],
2927
- export: (e) => jo(e) ? `<img src="${e.__src}" alt="${e.__altText}" />` : null
2928
- }, zo = {
2890
+ dependencies: [jo],
2891
+ export: (e) => No(e) ? `<img src="${e.__src}" alt="${e.__altText}" />` : null
2892
+ }, Vo = {
2929
2893
  type: "text-match",
2930
2894
  trigger: "",
2931
2895
  regExp: /<img\s+src="([^"]+)"\s+alt="([^"]*)"[^>]*\/?>/,
2932
2896
  importRegExp: /<img\s+src="([^"]+)"\s+alt="([^"]*)"[^>]*\/?>/,
2933
- dependencies: [ko],
2897
+ dependencies: [jo],
2934
2898
  replace: (e, t) => {
2935
- let [, n, r] = t, i = Ao(n, r);
2899
+ let [, n, r] = t, i = Mo(n, r);
2936
2900
  e.replace(i);
2937
2901
  }
2938
- }, Bo = [
2939
- ...Re,
2940
- No,
2902
+ }, Ho = [
2903
+ ...He,
2941
2904
  Fo,
2942
2905
  Lo,
2943
- Ro
2944
- ], Vo = [
2945
- ...Re,
2946
- Po,
2947
- Fo,
2906
+ zo,
2907
+ Bo
2908
+ ], Uo = [
2909
+ ...He,
2910
+ Io,
2948
2911
  Lo,
2949
- zo
2912
+ zo,
2913
+ Vo
2950
2914
  ];
2951
2915
  //#endregion
2952
2916
  //#region src/components/rich-text-area/html-config.ts
2953
- function Ho(e) {
2917
+ function Wo(e) {
2954
2918
  let t = e.nodeName.toLowerCase();
2955
2919
  if (t !== "h1" && t !== "h2" && t !== "h3" && t !== "h4" && t !== "h5" && t !== "h6") return null;
2956
- let n = je(t), r = e.getAttribute("style") ?? "";
2920
+ let n = Fe(t), r = e.getAttribute("style") ?? "";
2957
2921
  if (n.setStyle(r), e.style) {
2958
2922
  let t = e.style.textAlign;
2959
- (t === "left" || t === "right" || t === "center" || t === "justify" || t === "start" || t === "end") && n.setFormat(t), ut(e, n);
2923
+ (t === "left" || t === "right" || t === "center" || t === "justify" || t === "start" || t === "end") && n.setFormat(t), mt(e, n);
2960
2924
  }
2961
2925
  return { node: n };
2962
2926
  }
2963
- function Uo(e) {
2927
+ function Go(e) {
2964
2928
  if (e.getAttribute("__lexicallisttype") === "check" || e.classList.contains("contains-task-list")) return !0;
2965
- for (let t of e.childNodes) if (lt(t) && t.hasAttribute("aria-checked")) return !0;
2929
+ for (let t of e.childNodes) if (pt(t) && t.hasAttribute("aria-checked")) return !0;
2966
2930
  return !1;
2967
2931
  }
2968
- function Wo(e) {
2932
+ function Ko(e) {
2969
2933
  let t = e.nodeName.toLowerCase(), n = null;
2970
2934
  if (t === "ol") {
2971
2935
  let t = e.start;
2972
- n = Ce("number", t);
2973
- } else t === "ul" && (n = Uo(e) ? Ce("check") : Ce("bullet"));
2936
+ n = De("number", t);
2937
+ } else t === "ul" && (n = Go(e) ? De("check") : De("bullet"));
2974
2938
  if (!n) return null;
2975
2939
  let r = e.getAttribute("style") ?? "";
2976
2940
  return n.setStyle(r), { node: n };
2977
2941
  }
2978
- function Go(e) {
2942
+ function qo(e) {
2979
2943
  if (e.classList.contains("task-list-item")) {
2980
2944
  for (let t of e.children) if (t.tagName === "INPUT") {
2981
2945
  let n = t;
2982
2946
  if (n.getAttribute("type") === "checkbox") {
2983
- let t = n.hasAttribute("checked"), r = Se(t), i = e.getAttribute("style") ?? "";
2947
+ let t = n.hasAttribute("checked"), r = Ee(t), i = e.getAttribute("style") ?? "";
2984
2948
  return r.setStyle(i), { node: r };
2985
2949
  }
2986
2950
  }
2987
2951
  }
2988
- let t = e.getAttribute("aria-checked"), n = Se(t === "true" || t !== "false" && void 0), r = e.getAttribute("style") ?? "";
2952
+ let t = e.getAttribute("aria-checked"), n = Ee(t === "true" || t !== "false" && void 0), r = e.getAttribute("style") ?? "";
2989
2953
  return n.setStyle(r), { node: n };
2990
2954
  }
2991
2955
  var Z = 4;
2992
- function Ko(e) {
2993
- let { color: t, fontSize: n, fontFamily: r } = Mo(e.getAttribute("style") ?? "");
2956
+ function Jo(e) {
2957
+ let { color: t, fontSize: n, fontFamily: r } = Po(e.getAttribute("style") ?? "");
2994
2958
  if (!t && !n && !r) return null;
2995
2959
  let i = e.style;
2996
2960
  return {
@@ -3004,59 +2968,59 @@ function Ko(e) {
3004
2968
  node: null
3005
2969
  };
3006
2970
  }
3007
- var qo = {
2971
+ var Yo = {
3008
2972
  h1: () => ({
3009
- conversion: Ho,
2973
+ conversion: Wo,
3010
2974
  priority: Z
3011
2975
  }),
3012
2976
  h2: () => ({
3013
- conversion: Ho,
2977
+ conversion: Wo,
3014
2978
  priority: Z
3015
2979
  }),
3016
2980
  h3: () => ({
3017
- conversion: Ho,
2981
+ conversion: Wo,
3018
2982
  priority: Z
3019
2983
  }),
3020
2984
  h4: () => ({
3021
- conversion: Ho,
2985
+ conversion: Wo,
3022
2986
  priority: Z
3023
2987
  }),
3024
2988
  h5: () => ({
3025
- conversion: Ho,
2989
+ conversion: Wo,
3026
2990
  priority: Z
3027
2991
  }),
3028
2992
  h6: () => ({
3029
- conversion: Ho,
2993
+ conversion: Wo,
3030
2994
  priority: Z
3031
2995
  }),
3032
2996
  ul: () => ({
3033
- conversion: Wo,
2997
+ conversion: Ko,
3034
2998
  priority: Z
3035
2999
  }),
3036
3000
  ol: () => ({
3037
- conversion: Wo,
3001
+ conversion: Ko,
3038
3002
  priority: Z
3039
3003
  }),
3040
3004
  li: () => ({
3041
- conversion: Go,
3005
+ conversion: qo,
3042
3006
  priority: Z
3043
3007
  }),
3044
3008
  span: () => ({
3045
- conversion: Ko,
3009
+ conversion: Jo,
3046
3010
  priority: Z
3047
3011
  })
3048
3012
  };
3049
- function Jo(e) {
3013
+ function Xo(e) {
3050
3014
  return (t, n) => {
3051
3015
  let r = e.prototype.exportDOM.call(n, t), i = n.getStyle();
3052
3016
  return r.element && i && r.element.setAttribute("style", i), r;
3053
3017
  };
3054
3018
  }
3055
- var Yo = /* @__PURE__ */ new Map([
3056
- [Me, Jo(Me)],
3057
- [Te, Jo(Te)],
3058
- [we, Jo(we)]
3059
- ]), Xo = class e extends et {
3019
+ var Zo = /* @__PURE__ */ new Map([
3020
+ [Ie, Xo(Ie)],
3021
+ [ke, Xo(ke)],
3022
+ [Oe, Xo(Oe)]
3023
+ ]), Qo = class e extends it {
3060
3024
  static getType() {
3061
3025
  return "div-block";
3062
3026
  }
@@ -3073,7 +3037,7 @@ var Yo = /* @__PURE__ */ new Map([
3073
3037
  }
3074
3038
  static importDOM() {
3075
3039
  return { div: () => ({
3076
- conversion: Zo,
3040
+ conversion: $o,
3077
3041
  priority: 4
3078
3042
  }) };
3079
3043
  }
@@ -3085,7 +3049,7 @@ var Yo = /* @__PURE__ */ new Map([
3085
3049
  } : e;
3086
3050
  }
3087
3051
  static importJSON(e) {
3088
- let t = Qo().updateFromJSON(e);
3052
+ let t = es().updateFromJSON(e);
3089
3053
  return e.style !== void 0 && t.setStyle(e.style), t;
3090
3054
  }
3091
3055
  updateFromJSON(e) {
@@ -3098,32 +3062,32 @@ var Yo = /* @__PURE__ */ new Map([
3098
3062
  if (this.getNextSibling() !== null) return this.selectNext(), this.remove(), !0;
3099
3063
  if (this.getPreviousSibling() !== null) return this.selectPrevious(), this.remove(), !0;
3100
3064
  } else {
3101
- let e = Be();
3065
+ let e = We();
3102
3066
  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;
3103
3067
  }
3104
3068
  return !1;
3105
3069
  }
3106
3070
  };
3107
- function Zo(e) {
3108
- let t = Qo(), n = e.getAttribute("style") ?? "";
3071
+ function $o(e) {
3072
+ let t = es(), n = e.getAttribute("style") ?? "";
3109
3073
  if (t.setStyle(n), e.style) {
3110
3074
  let n = e.style.textAlign;
3111
- (n === "left" || n === "right" || n === "center" || n === "justify" || n === "start" || n === "end") && t.setFormat(n), ut(e, t);
3075
+ (n === "left" || n === "right" || n === "center" || n === "justify" || n === "start" || n === "end") && t.setFormat(n), mt(e, t);
3112
3076
  }
3113
3077
  return { node: t };
3114
3078
  }
3115
- function Qo() {
3116
- return new Xo();
3079
+ function es() {
3080
+ return new Qo();
3117
3081
  }
3118
3082
  //#endregion
3119
3083
  //#region src/components/rich-text-area/plugins/value-plugin.tsx
3120
- var $o = 50;
3121
- function es({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3084
+ var ts = 50;
3085
+ function ns({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3122
3086
  let r = F((r, i, a) => {
3123
3087
  if (!a.has("focus") && e) try {
3124
3088
  r.read(() => {
3125
- let r = t === "html" ? an(i) : Ie(Bo);
3126
- n && (n.current.push(r), n.current.splice(0, n.current.length - $o)), e(r);
3089
+ let r = t === "html" ? sn(i) : Be(Ho);
3090
+ n && (n.current.push(r), n.current.splice(0, n.current.length - ts)), e(r);
3127
3091
  });
3128
3092
  } catch {}
3129
3093
  }, [
@@ -3131,16 +3095,16 @@ function es({ onChange: e, source: t = "markdown", emittedValuesRef: n }) {
3131
3095
  t,
3132
3096
  n
3133
3097
  ]);
3134
- return /* @__PURE__ */ H(dt, { onChange: r });
3098
+ return /* @__PURE__ */ H(ht, { onChange: r });
3135
3099
  }
3136
3100
  //#endregion
3137
3101
  //#region src/components/rich-text-area/hooks.ts
3138
3102
  function Q() {
3139
- let [e] = Pe();
3103
+ let [e] = Re();
3140
3104
  return e;
3141
3105
  }
3142
- function ts() {
3143
- let [e] = Pe();
3106
+ function rs() {
3107
+ let [e] = Re();
3144
3108
  return F(() => {
3145
3109
  let t = "";
3146
3110
  return e.getEditorState().read(() => {
@@ -3150,7 +3114,7 @@ function ts() {
3150
3114
  }
3151
3115
  //#endregion
3152
3116
  //#region src/components/rich-text-area/plugins/disabled-plugin.tsx
3153
- function ns({ isDisabled: e }) {
3117
+ function is({ isDisabled: e }) {
3154
3118
  let t = Q();
3155
3119
  return L(() => {
3156
3120
  t.setEditable(!e);
@@ -3158,50 +3122,50 @@ function ns({ isDisabled: e }) {
3158
3122
  }
3159
3123
  //#endregion
3160
3124
  //#region src/components/rich-text-area/plugins/controlled-plugin.tsx
3161
- function rs({ controlledRef: e }) {
3125
+ function as({ controlledRef: e }) {
3162
3126
  let t = B(null);
3163
- return ge(e, () => ({ focus: () => {
3127
+ return be(e, () => ({ focus: () => {
3164
3128
  Promise.resolve().then(() => {
3165
3129
  t.current?.focus();
3166
3130
  });
3167
- } }), []), /* @__PURE__ */ H(sn, { editorRef: t });
3131
+ } }), []), /* @__PURE__ */ H(ln, { editorRef: t });
3168
3132
  }
3169
3133
  //#endregion
3170
3134
  //#region src/components/rich-text-area/utils/index.ts
3171
- function is(e) {
3135
+ function os(e) {
3172
3136
  let t = e.getRootElement();
3173
3137
  t && (t.scrollTop = t.scrollHeight);
3174
3138
  }
3175
- function as() {
3139
+ function ss() {
3176
3140
  let e = G().getLastDescendant();
3177
3141
  if (e && J(e)) {
3178
- let t = Ve(), n = e.getTextContentSize();
3179
- t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Je(t);
3142
+ let t = Ge(), n = e.getTextContentSize();
3143
+ t.anchor.set(e.getKey(), n, "text"), t.focus.set(e.getKey(), n, "text"), Qe(t);
3180
3144
  } else {
3181
- qe();
3145
+ Ze();
3182
3146
  let e = K();
3183
3147
  if (q(e)) {
3184
3148
  let t = e.focus.getNode(), n = J(t) ? t.getTextContentSize() : 0;
3185
- e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Je(e);
3149
+ e.anchor.set(e.focus.key, e.focus.offset, e.focus.type), e.focus.set(e.focus.key, n, e.focus.type), Qe(e);
3186
3150
  }
3187
3151
  }
3188
3152
  }
3189
- function os(e, t) {
3153
+ function cs(e, t) {
3190
3154
  let n = new DOMParser().parseFromString(t, "text/html");
3191
- return on(e, n).map((e) => {
3155
+ return cn(e, n).map((e) => {
3192
3156
  if (J(e)) {
3193
- let t = Be();
3157
+ let t = We();
3194
3158
  return t.append(e), t;
3195
3159
  }
3196
3160
  return e;
3197
3161
  });
3198
3162
  }
3199
- function ss(e, t) {
3163
+ function ls(e, t) {
3200
3164
  let n = G();
3201
- n.clear(), os(e, t).forEach((e) => n.append(e));
3165
+ n.clear(), cs(e, t).forEach((e) => n.append(e));
3202
3166
  }
3203
- function cs(e, t) {
3204
- let n = K(), r = os(e, t);
3167
+ function us(e, t) {
3168
+ let n = K(), r = cs(e, t);
3205
3169
  if (q(n)) n.insertNodes(r);
3206
3170
  else {
3207
3171
  let e = G();
@@ -3210,8 +3174,8 @@ function cs(e, t) {
3210
3174
  }
3211
3175
  //#endregion
3212
3176
  //#region src/components/rich-text-area/plugins/controlled-value-plugin.tsx
3213
- function ls({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3214
- let r = Q(), i = B(), a = B(!!e?.trim()), o = le("desktop");
3177
+ function ds({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3178
+ let r = Q(), i = B(), a = B(!!e?.trim()), o = me("desktop");
3215
3179
  return L(() => {
3216
3180
  if (!r || e === i.current) return;
3217
3181
  if (i.current = e, n && e !== void 0) {
@@ -3220,20 +3184,20 @@ function ls({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3220
3184
  }
3221
3185
  let s = "";
3222
3186
  if (r.getEditorState().read(() => {
3223
- s = t === "html" ? an(r) : Ie(Bo);
3187
+ s = t === "html" ? sn(r) : Be(Ho);
3224
3188
  }), e !== void 0 && e !== s) {
3225
3189
  if (e === "") {
3226
3190
  r.update(() => {
3227
- ze(at), t === "html" ? G().clear() : Fe("", Vo), as();
3191
+ Ue(lt), t === "html" ? G().clear() : ze("", Uo), ss();
3228
3192
  }, { discrete: !0 }), Promise.resolve().then(() => {
3229
3193
  o ? r.focus() : r.blur();
3230
3194
  });
3231
3195
  return;
3232
3196
  }
3233
3197
  r.update(() => {
3234
- ze(at), t === "html" ? ss(r, e) : Fe(e, Vo), as();
3198
+ Ue(lt), t === "html" ? ls(r, e) : ze(e, Uo), ss();
3235
3199
  }), a.current && (a.current = !1, Promise.resolve().then(() => {
3236
- requestAnimationFrame(() => is(r));
3200
+ requestAnimationFrame(() => os(r));
3237
3201
  })), o && Promise.resolve().then(() => {
3238
3202
  r.focus();
3239
3203
  });
@@ -3248,7 +3212,7 @@ function ls({ value: e, source: t = "markdown", emittedValuesRef: n }) {
3248
3212
  }
3249
3213
  //#endregion
3250
3214
  //#region src/components/rich-text-area/plugins/blur-plugin.tsx
3251
- function us({ onBlur: e }) {
3215
+ function fs({ onBlur: e }) {
3252
3216
  let t = Q();
3253
3217
  return L(() => {
3254
3218
  if (!e) return;
@@ -3264,7 +3228,7 @@ function us({ onBlur: e }) {
3264
3228
  }
3265
3229
  //#endregion
3266
3230
  //#region src/components/rich-text-area/plugins/focus-plugin.tsx
3267
- function ds({ onFocusChange: e }) {
3231
+ function ps({ onFocusChange: e }) {
3268
3232
  let t = Q();
3269
3233
  return L(() => {
3270
3234
  if (!e) return;
@@ -3283,68 +3247,68 @@ function ds({ onFocusChange: e }) {
3283
3247
  }
3284
3248
  //#endregion
3285
3249
  //#region src/components/rich-text-area/plugins/image-drop-plugin.tsx
3286
- var fs = st("INSERT_IMAGE_COMMAND"), ps = "helvetiq:insert-image", ms = class extends CustomEvent {
3250
+ var ms = dt("INSERT_IMAGE_COMMAND"), hs = "helvetiq:insert-image", gs = class extends CustomEvent {
3287
3251
  constructor(e) {
3288
- super(ps, { detail: e });
3252
+ super(hs, { detail: e });
3289
3253
  }
3290
3254
  };
3291
- function hs() {
3255
+ function _s() {
3292
3256
  let e = Q();
3293
- return L(() => e.registerCommand(fs, (t) => (e.update(() => {
3294
- let e = Ao(t.src, t.altText);
3295
- We([e]);
3296
- }), !0), Ze), [e]), L(() => {
3257
+ return L(() => e.registerCommand(ms, (t) => (e.update(() => {
3258
+ let e = Mo(t.src, t.altText);
3259
+ Je([e]);
3260
+ }), !0), tt), [e]), L(() => {
3297
3261
  if (!e.getRootElement()) return;
3298
3262
  function t(t) {
3299
3263
  let n = t;
3300
- e.dispatchCommand(fs, n.detail);
3264
+ e.dispatchCommand(ms, n.detail);
3301
3265
  }
3302
- return document.addEventListener(ps, t), () => {
3303
- document.removeEventListener(ps, t);
3266
+ return document.addEventListener(hs, t), () => {
3267
+ document.removeEventListener(hs, t);
3304
3268
  };
3305
3269
  }, [e]), null;
3306
3270
  }
3307
3271
  //#endregion
3308
3272
  //#region src/components/rich-text-area/plugins/html-paste-plugin.tsx
3309
- var gs = st("PASTE_HTML_COMMAND"), _s = st("INSERT_HTML_COMMAND"), vs = "helvetiq:paste-html", ys = "helvetiq:insert-html", bs = class extends CustomEvent {
3273
+ var vs = dt("PASTE_HTML_COMMAND"), ys = dt("INSERT_HTML_COMMAND"), bs = "helvetiq:paste-html", xs = "helvetiq:insert-html", Ss = class extends CustomEvent {
3310
3274
  constructor(e) {
3311
- super(vs, { detail: e });
3275
+ super(bs, { detail: e });
3312
3276
  }
3313
- }, xs = class extends CustomEvent {
3277
+ }, Cs = class extends CustomEvent {
3314
3278
  constructor(e) {
3315
- super(ys, { detail: e });
3279
+ super(xs, { detail: e });
3316
3280
  }
3317
3281
  };
3318
- function Ss() {
3282
+ function ws() {
3319
3283
  let e = Q();
3320
- return L(() => e.registerCommand(gs, (t) => (e.update(() => {
3284
+ return L(() => e.registerCommand(vs, (t) => (e.update(() => {
3321
3285
  let n = G();
3322
3286
  n.clear();
3323
- let r = new DOMParser().parseFromString(t.html, "text/html"), i = on(e, r);
3287
+ let r = new DOMParser().parseFromString(t.html, "text/html"), i = cn(e, r);
3324
3288
  n.append(...i);
3325
- }), !0), Ze), [e]), L(() => e.registerCommand(_s, (t) => (e.update(() => {
3326
- let n = new DOMParser().parseFromString(t.html, "text/html"), r = on(e, n);
3327
- We(r);
3328
- }), !0), Ze), [e]), L(() => {
3289
+ }), !0), tt), [e]), L(() => e.registerCommand(ys, (t) => (e.update(() => {
3290
+ let n = new DOMParser().parseFromString(t.html, "text/html"), r = cn(e, n);
3291
+ Je(r);
3292
+ }), !0), tt), [e]), L(() => {
3329
3293
  if (!e.getRootElement()) return;
3330
3294
  function t(t) {
3331
3295
  let n = t;
3332
- e.dispatchCommand(gs, n.detail);
3296
+ e.dispatchCommand(vs, n.detail);
3333
3297
  }
3334
3298
  function n(t) {
3335
3299
  let n = t;
3336
- e.dispatchCommand(_s, n.detail);
3300
+ e.dispatchCommand(ys, n.detail);
3337
3301
  }
3338
- return document.addEventListener(vs, t), document.addEventListener(ys, n), () => {
3339
- document.removeEventListener(vs, t), document.removeEventListener(ys, n);
3302
+ return document.addEventListener(bs, t), document.addEventListener(xs, n), () => {
3303
+ document.removeEventListener(bs, t), document.removeEventListener(xs, n);
3340
3304
  };
3341
3305
  }, [e]), null;
3342
3306
  }
3343
3307
  //#endregion
3344
3308
  //#region src/components/rich-text-area/plugins/markdown-plain-paste-plugin.tsx
3345
- function Cs() {
3309
+ function Ts() {
3346
3310
  let e = Q();
3347
- return L(() => e.registerCommand(rt, (t) => {
3311
+ return L(() => e.registerCommand(st, (t) => {
3348
3312
  let { clipboardData: n } = t;
3349
3313
  if (!n) return !1;
3350
3314
  let r = n.getData("text/plain");
@@ -3356,18 +3320,18 @@ function Cs() {
3356
3320
  }
3357
3321
  let t = G();
3358
3322
  t.clear(), r.split(/\r?\n/).forEach((e) => {
3359
- let n = Be();
3360
- e.length > 0 && n.append(He(e)), t.append(n);
3323
+ let n = We();
3324
+ e.length > 0 && n.append(Ke(e)), t.append(n);
3361
3325
  });
3362
3326
  }), !0) : !1;
3363
- }, Xe), [e]), null;
3327
+ }, et), [e]), null;
3364
3328
  }
3365
3329
  //#endregion
3366
3330
  //#region src/components/rich-text-area/plugins/file-attachment-plugin.tsx
3367
- var ws = st("ATTACH_FILE_COMMAND");
3368
- function Ts({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3331
+ var Es = dt("ATTACH_FILE_COMMAND");
3332
+ function Ds({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3369
3333
  let r = Q(), i = B(null);
3370
- L(() => r.registerCommand(ws, () => (i.current?.click(), !0), Ze), [r]);
3334
+ L(() => r.registerCommand(Es, () => (i.current?.click(), !0), tt), [r]);
3371
3335
  function a(e) {
3372
3336
  let r = Array.from(e.target.files ?? []);
3373
3337
  if (t) n?.(r);
@@ -3389,45 +3353,45 @@ function Ts({ acceptedFiles: e = [], isMultiple: t = !1, onFileAttach: n }) {
3389
3353
  }
3390
3354
  //#endregion
3391
3355
  //#region src/components/rich-text-area/styled.tsx
3392
- var Es = P(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H("div", {
3356
+ var Os = P(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ H("div", {
3393
3357
  ref: r,
3394
3358
  className: M("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),
3395
3359
  ...n,
3396
3360
  children: t
3397
3361
  }));
3398
- Es.displayName = "Wrapper";
3362
+ Os.displayName = "Wrapper";
3399
3363
  //#endregion
3400
3364
  //#region src/components/rich-text-area/rich-text-area.tsx
3401
- var Ds = {
3365
+ var ks = {
3402
3366
  namespace: "helvetiq",
3403
- theme: Oo,
3367
+ theme: Ao,
3404
3368
  editable: !0,
3405
3369
  nodes: [
3406
- Te,
3370
+ ke,
3371
+ Oe,
3372
+ Ie,
3373
+ Le,
3374
+ Se,
3407
3375
  we,
3408
- Me,
3409
- Ne,
3410
- ve,
3411
- be,
3412
- ko,
3413
- Xo,
3414
- nn,
3415
- tn,
3416
- rn
3376
+ jo,
3377
+ Qo,
3378
+ an,
3379
+ rn,
3380
+ on
3417
3381
  ],
3418
3382
  html: {
3419
- import: qo,
3420
- export: Yo
3383
+ import: Yo,
3384
+ export: Zo
3421
3385
  },
3422
3386
  onError: (e) => {
3423
3387
  console.error("Lexical error:", e);
3424
3388
  }
3425
3389
  };
3426
- function Os({ 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, ...m }) {
3390
+ function As({ 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, ...m }) {
3427
3391
  let h = B([]);
3428
- return /* @__PURE__ */ H(Ee, {
3429
- initialConfig: Ds,
3430
- children: /* @__PURE__ */ U(Es, {
3392
+ return /* @__PURE__ */ H(Ae, {
3393
+ initialConfig: ks,
3394
+ children: /* @__PURE__ */ U(Os, {
3431
3395
  "data-slot": "rich-text-area",
3432
3396
  "data-testid": "rich-text-area",
3433
3397
  "aria-disabled": c,
@@ -3435,8 +3399,8 @@ function Os({ children: e, name: t, value: n, source: r = "markdown", className:
3435
3399
  className: M("relative size-full overflow-hidden", "data-[disabled=true]:opacity-80", "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:select-none", a),
3436
3400
  ...m,
3437
3401
  children: [
3438
- /* @__PURE__ */ H(Ae, {
3439
- contentEditable: /* @__PURE__ */ H(De, {
3402
+ /* @__PURE__ */ H(Pe, {
3403
+ contentEditable: /* @__PURE__ */ H(je, {
3440
3404
  "data-slot": "rich-text-area-editable",
3441
3405
  className: M("relative inset-0 overflow-y-auto", i),
3442
3406
  "data-name": t,
@@ -3456,38 +3420,38 @@ function Os({ children: e, name: t, value: n, source: r = "markdown", className:
3456
3420
  minHeight: "20px"
3457
3421
  }
3458
3422
  }),
3459
- ErrorBoundary: Oe
3423
+ ErrorBoundary: Me
3460
3424
  }),
3461
- /* @__PURE__ */ H(ns, { isDisabled: c }),
3462
- /* @__PURE__ */ H(ls, {
3425
+ /* @__PURE__ */ H(is, { isDisabled: c }),
3426
+ /* @__PURE__ */ H(ds, {
3463
3427
  value: n,
3464
3428
  source: r,
3465
3429
  emittedValuesRef: h
3466
3430
  }),
3467
- /* @__PURE__ */ H(es, {
3431
+ /* @__PURE__ */ H(ns, {
3468
3432
  onChange: l,
3469
3433
  source: r,
3470
3434
  emittedValuesRef: h
3471
3435
  }),
3472
- /* @__PURE__ */ H(us, { onBlur: u }),
3473
- /* @__PURE__ */ H(ke, {}),
3474
- /* @__PURE__ */ H(rs, { controlledRef: p ?? null }),
3475
- /* @__PURE__ */ H(ds, { onFocusChange: f }),
3476
- /* @__PURE__ */ H(en, {}),
3477
- r === "markdown" && /* @__PURE__ */ H(Cs, {}),
3436
+ /* @__PURE__ */ H(fs, { onBlur: u }),
3437
+ /* @__PURE__ */ H(Ne, {}),
3438
+ /* @__PURE__ */ H(as, { controlledRef: p ?? null }),
3439
+ /* @__PURE__ */ H(ps, { onFocusChange: f }),
3440
+ /* @__PURE__ */ H(nn, {}),
3441
+ r === "markdown" && /* @__PURE__ */ H(Ts, {}),
3478
3442
  e
3479
3443
  ]
3480
3444
  })
3481
3445
  });
3482
3446
  }
3483
- var ks = P((e, t) => /* @__PURE__ */ H(Os, {
3447
+ var js = P((e, t) => /* @__PURE__ */ H(As, {
3484
3448
  ...e,
3485
3449
  forwardedRef: t
3486
3450
  }));
3487
- ks.displayName = "RichTextArea";
3451
+ js.displayName = "RichTextArea";
3488
3452
  //#endregion
3489
3453
  //#region src/components/rich-text-field/constants.ts
3490
- var As = "Arial, sans-serif", js = [
3454
+ var Ms = "Arial, sans-serif", Ns = [
3491
3455
  {
3492
3456
  value: "Arial, sans-serif",
3493
3457
  label: "Arial"
@@ -3524,7 +3488,7 @@ var As = "Arial, sans-serif", js = [
3524
3488
  value: "\"Brush Script MT\", cursive",
3525
3489
  label: "Brush Script MT"
3526
3490
  }
3527
- ], Ms = As, Ns = [
3491
+ ], Ps = Ms, Fs = [
3528
3492
  {
3529
3493
  label: "10",
3530
3494
  value: "10"
@@ -3553,11 +3517,11 @@ var As = "Arial, sans-serif", js = [
3553
3517
  label: "48",
3554
3518
  value: "48"
3555
3519
  }
3556
- ], Ps = "left", Fs = "#000000";
3520
+ ], Is = "left", Ls = "#000000";
3557
3521
  //#endregion
3558
3522
  //#region src/components/rich-text-field/components/toolbar-select.tsx
3559
- function Is({ className: e, selectItemClassName: t, ...n }) {
3560
- return /* @__PURE__ */ H(k, {
3523
+ function Rs({ className: e, selectItemClassName: t, ...n }) {
3524
+ return /* @__PURE__ */ H(ue, {
3561
3525
  fullWidth: !1,
3562
3526
  size: "small",
3563
3527
  className: M(e),
@@ -3567,44 +3531,44 @@ function Is({ className: e, selectItemClassName: t, ...n }) {
3567
3531
  }
3568
3532
  //#endregion
3569
3533
  //#region src/components/rich-text-field/components/alignment-select.tsx
3570
- function Ls(e) {
3534
+ function zs(e) {
3571
3535
  return e === "center" || e === "right" ? e : e === "end" ? "right" : "left";
3572
3536
  }
3573
- var Rs = {
3537
+ var Bs = {
3574
3538
  left: {
3575
3539
  label: "Left",
3576
- icon: /* @__PURE__ */ H(Tt, { fontSize: "inherit" })
3540
+ icon: /* @__PURE__ */ H(kt, { fontSize: "inherit" })
3577
3541
  },
3578
3542
  center: {
3579
3543
  label: "Center",
3580
- icon: /* @__PURE__ */ H(wt, { fontSize: "inherit" })
3544
+ icon: /* @__PURE__ */ H(Ot, { fontSize: "inherit" })
3581
3545
  },
3582
3546
  right: {
3583
3547
  label: "Right",
3584
- icon: /* @__PURE__ */ H(Et, { fontSize: "inherit" })
3548
+ icon: /* @__PURE__ */ H(At, { fontSize: "inherit" })
3585
3549
  }
3586
3550
  };
3587
- function zs({ className: e }) {
3588
- let t = Q(), [n, r] = V(Ps), i = z(() => Object.entries(Rs).map(([e, { label: t, icon: n }]) => ({
3551
+ function Vs({ className: e }) {
3552
+ let t = Q(), [n, r] = V(Is), i = z(() => Object.entries(Bs).map(([e, { label: t, icon: n }]) => ({
3589
3553
  value: e,
3590
3554
  label: t,
3591
3555
  icon: n
3592
3556
  })), []), a = F(() => {
3593
3557
  let e = K();
3594
3558
  if (q(e)) {
3595
- let t = e.anchor.getNode(), n = t.getParent(), i = Ge(t) ? t : n;
3596
- Ge(i) && r(Ls(i.getFormatType() || "left"));
3559
+ let t = e.anchor.getNode(), n = t.getParent(), i = Ye(t) ? t : n;
3560
+ Ye(i) && r(zs(i.getFormatType() || "left"));
3597
3561
  }
3598
3562
  }, []);
3599
- L(() => ln(t.registerUpdateListener(({ editorState: e }) => {
3563
+ L(() => dn(t.registerUpdateListener(({ editorState: e }) => {
3600
3564
  e.read(() => {
3601
3565
  a();
3602
3566
  });
3603
- }), t.registerCommand(it, () => (a(), !1), Qe)), [t, a]);
3567
+ }), t.registerCommand(ct, () => (a(), !1), nt)), [t, a]);
3604
3568
  function o(e) {
3605
- t.dispatchCommand(tt, e);
3569
+ t.dispatchCommand(at, e);
3606
3570
  }
3607
- return /* @__PURE__ */ H(Is, {
3571
+ return /* @__PURE__ */ H(Rs, {
3608
3572
  shouldShowOnlyIcon: !0,
3609
3573
  options: i,
3610
3574
  value: n,
@@ -3615,7 +3579,7 @@ function zs({ className: e }) {
3615
3579
  //#endregion
3616
3580
  //#region src/components/rich-text-field/components/toolbar-button.tsx
3617
3581
  function $({ className: e, children: t, isActive: n, isDisabled: r = !1, ...i }) {
3618
- return /* @__PURE__ */ H(f, {
3582
+ return /* @__PURE__ */ H(_, {
3619
3583
  isActive: n,
3620
3584
  className: M("border-none bg-transparent", e),
3621
3585
  size: "sm",
@@ -3627,91 +3591,91 @@ function $({ className: e, children: t, isActive: n, isDisabled: r = !1, ...i })
3627
3591
  }
3628
3592
  //#endregion
3629
3593
  //#region src/components/rich-text-field/components/attachment-button.tsx
3630
- function Bs(e) {
3594
+ function Hs(e) {
3631
3595
  let t = Q();
3632
3596
  function n() {
3633
- t.dispatchCommand(ws, void 0);
3597
+ t.dispatchCommand(Es, void 0);
3634
3598
  }
3635
3599
  return /* @__PURE__ */ H($, {
3636
3600
  "data-testid": "attachment-button",
3637
3601
  "aria-label": "Add Attachment",
3638
3602
  onClick: n,
3639
3603
  ...e,
3640
- children: /* @__PURE__ */ H(gt, {})
3604
+ children: /* @__PURE__ */ H(bt, {})
3641
3605
  });
3642
3606
  }
3643
3607
  //#endregion
3644
3608
  //#region src/components/rich-text-field/utils.ts
3645
- function Vs(e) {
3609
+ function Us(e) {
3646
3610
  let t;
3647
- for (let n of mn(e, { silent: !0 })) n.type === "declaration" && n.value && (t ||= {}, t[n.property] = n.value);
3648
- return t || Hs;
3611
+ for (let n of gn(e, { silent: !0 })) n.type === "declaration" && n.value && (t ||= {}, t[n.property] = n.value);
3612
+ return t || Ws;
3649
3613
  }
3650
- var Hs = Object.freeze({});
3651
- function Us(e) {
3652
- return typeof e == "string" ? Vs(e) : Hs;
3614
+ var Ws = Object.freeze({});
3615
+ function Gs(e) {
3616
+ return typeof e == "string" ? Us(e) : Ws;
3653
3617
  }
3654
- function Ws(e) {
3618
+ function Ks(e) {
3655
3619
  let t = [];
3656
3620
  for (let [n, r] of Object.entries(e)) n && r && t.push(`${n}: ${r};`);
3657
3621
  return t.sort().join(" ");
3658
3622
  }
3659
- function Gs(e, t) {
3623
+ function qs(e, t) {
3660
3624
  return e === t || !e && !t;
3661
3625
  }
3662
- function Ks(e, t) {
3626
+ function Js(e, t) {
3663
3627
  if (e === t) return !0;
3664
- for (let n in e) if (!(n in t && Gs(e[n], t[n]))) return !1;
3628
+ for (let n in e) if (!(n in t && qs(e[n], t[n]))) return !1;
3665
3629
  for (let n in t) if (!(n in e)) return !1;
3666
3630
  return !0;
3667
3631
  }
3668
- var qs = ct("style", {
3669
- isEqual: Ks,
3670
- parse: Us,
3671
- unparse: Ws
3632
+ var Ys = ft("style", {
3633
+ isEqual: Js,
3634
+ parse: Gs,
3635
+ unparse: Ks
3672
3636
  });
3673
- function Js(e, t) {
3674
- return Ye(e, qs, t);
3637
+ function Xs(e, t) {
3638
+ return $e(e, Ys, t);
3675
3639
  }
3676
- function Ys(e, t) {
3677
- return e === Hs || e === t ? t : {
3640
+ function Zs(e, t) {
3641
+ return e === Ws || e === t ? t : {
3678
3642
  ...e,
3679
3643
  ...t
3680
3644
  };
3681
3645
  }
3682
- st("PATCH_TEXT_STYLE_COMMAND");
3683
- function Xs(e) {
3646
+ dt("PATCH_TEXT_STYLE_COMMAND");
3647
+ function Qs(e) {
3684
3648
  let t = K();
3685
3649
  if (!t) {
3686
- let e = Ue();
3650
+ let e = qe();
3687
3651
  if (!e) return !1;
3688
- t = e.clone(), Je(t);
3652
+ t = e.clone(), Qe(t);
3689
3653
  }
3690
- let n = typeof e == "function" ? e : (t) => Ys(t, e);
3654
+ let n = typeof e == "function" ? e : (t) => Zs(t, e);
3691
3655
  if (q(t) && t.isCollapsed()) {
3692
3656
  let e = t.focus.getNode();
3693
- J(e) && Js(e, n);
3694
- } else un((e) => Js(e, n));
3657
+ J(e) && Xs(e, n);
3658
+ } else fn((e) => Xs(e, n));
3695
3659
  return !0;
3696
3660
  }
3697
- function Zs(e) {
3661
+ function $s(e) {
3698
3662
  let t = e.anchor, n = e.focus, r = e.anchor.getNode(), i = e.focus.getNode();
3699
- return r === i ? r : e.isBackward() ? fn(n) ? r : i : fn(t) ? r : i;
3663
+ return r === i ? r : e.isBackward() ? mn(n) ? r : i : mn(t) ? r : i;
3700
3664
  }
3701
- var Qs = (e, t, n, r) => {
3665
+ var ec = (e, t, n, r) => {
3702
3666
  e.update(() => {
3703
- if (r && ze(at), e.isEditable()) {
3667
+ if (r && Ue(lt), e.isEditable()) {
3704
3668
  let e = K();
3705
- e !== null && pn(e, { "font-size": t + "px" });
3669
+ e !== null && hn(e, { "font-size": t + "px" });
3706
3670
  }
3707
3671
  });
3708
- }, $s = (e) => e.startsWith("http") ? e : `https://${e}`, ec = N(null);
3709
- function tc() {
3710
- let e = I(ec);
3672
+ }, tc = (e) => e.startsWith("http") ? e : `https://${e}`, nc = N(null);
3673
+ function rc() {
3674
+ let e = I(nc);
3711
3675
  if (!e) throw Error("\"useRichTextFieldContext\" must be used within a RichTextFieldContextProvider");
3712
3676
  return e;
3713
3677
  }
3714
- function nc(e) {
3678
+ function ic(e) {
3715
3679
  let t = e.trim(), n = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);
3716
3680
  if (n) {
3717
3681
  let e = n[1];
@@ -3726,49 +3690,49 @@ function nc(e) {
3726
3690
  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");
3727
3691
  return `#${a(t)}${a(n)}${a(i)}`;
3728
3692
  }
3729
- return Fs;
3693
+ return Ls;
3730
3694
  }
3731
- function rc({ children: e }) {
3732
- let t = Q(), [n, r] = V(Ms), [i, a] = V("16"), [o, s] = V(!1), [c, l] = V(!1), [u, d] = V(!1), [f, p] = V(Fs), [m, h] = V(!1), g = F(() => {
3695
+ function ac({ children: e }) {
3696
+ let t = Q(), [n, r] = V(Ps), [i, a] = V("16"), [o, s] = V(!1), [c, l] = V(!1), [u, d] = V(!1), [f, p] = V(Ls), [m, h] = V(!1), g = F(() => {
3733
3697
  let e = K();
3734
3698
  if (q(e)) {
3735
- r(dn(e, "font-family", Ms));
3736
- let t = dn(e, "font-size", "16px");
3699
+ r(pn(e, "font-family", Ps));
3700
+ let t = pn(e, "font-size", "16px");
3737
3701
  a(t ? t.replace("px", "") : "16"), s(e.hasFormat("bold")), l(e.hasFormat("italic")), d(e.hasFormat("underline"));
3738
- let n = dn(e, "color", "#000000") || "#000000";
3739
- p(nc(n));
3740
- let i = Zs(e), o = i.getParent(), c = ye(o) || ye(i);
3702
+ let n = pn(e, "color", "#000000") || "#000000";
3703
+ p(ic(n));
3704
+ let i = $s(e), o = i.getParent(), c = Ce(o) || Ce(i);
3741
3705
  h(c);
3742
3706
  }
3743
3707
  }, []);
3744
- L(() => ln(t.registerUpdateListener(({ editorState: e }) => {
3708
+ L(() => dn(t.registerUpdateListener(({ editorState: e }) => {
3745
3709
  e.read(() => {
3746
3710
  g();
3747
3711
  });
3748
- }), t.registerCommand(it, () => (g(), !1), Qe)), [t, g]);
3712
+ }), t.registerCommand(ct, () => (g(), !1), nt)), [t, g]);
3749
3713
  let _ = F((e) => {
3750
3714
  t.update(() => {
3751
- ze(ot);
3715
+ Ue(ut);
3752
3716
  let t = K();
3753
- t !== null && pn(t, { "font-family": e });
3717
+ t !== null && hn(t, { "font-family": e });
3754
3718
  });
3755
3719
  }, [t]), v = F((e) => {
3756
- Qs(t, e, null, !1);
3720
+ ec(t, e, null, !1);
3757
3721
  }, [t]), y = F(() => {
3758
- t.dispatchCommand(nt, "bold");
3722
+ t.dispatchCommand(ot, "bold");
3759
3723
  }, [t]), b = F(() => {
3760
- t.dispatchCommand(nt, "italic");
3724
+ t.dispatchCommand(ot, "italic");
3761
3725
  }, [t]), x = F(() => {
3762
- t.dispatchCommand(nt, "underline");
3726
+ t.dispatchCommand(ot, "underline");
3763
3727
  }, [t]), S = F((e) => {
3764
3728
  t.update(() => {
3765
- ze(ot);
3729
+ Ue(ut);
3766
3730
  let t = K();
3767
- t !== null && pn(t, { color: e });
3731
+ t !== null && hn(t, { color: e });
3768
3732
  });
3769
3733
  }, [t]), C = F(() => {
3770
- m ? (h(!1), t.dispatchCommand(xe, null)) : (h(!0), t.dispatchCommand(xe, $s("https://")));
3771
- }, [m, h]), w = z(() => ({
3734
+ m ? (h(!1), t.dispatchCommand(Te, null)) : (h(!0), t.dispatchCommand(Te, tc("https://")));
3735
+ }, [m, h]), ee = z(() => ({
3772
3736
  fontFamily: n,
3773
3737
  fontSize: i,
3774
3738
  textColor: f,
@@ -3799,33 +3763,33 @@ function rc({ children: e }) {
3799
3763
  x,
3800
3764
  C
3801
3765
  ]);
3802
- return /* @__PURE__ */ H(ec.Provider, {
3803
- value: w,
3766
+ return /* @__PURE__ */ H(nc.Provider, {
3767
+ value: ee,
3804
3768
  children: e
3805
3769
  });
3806
3770
  }
3807
3771
  //#endregion
3808
3772
  //#region src/components/rich-text-field/components/bold-button.tsx
3809
- function ic({ ...e }) {
3810
- let { isBold: t, onBold: n } = tc();
3773
+ function oc({ ...e }) {
3774
+ let { isBold: t, onBold: n } = rc();
3811
3775
  return /* @__PURE__ */ H($, {
3812
3776
  "data-testid": "bold-button",
3813
3777
  "aria-label": "Format Bold",
3814
3778
  isActive: t,
3815
3779
  onClick: n,
3816
3780
  ...e,
3817
- children: /* @__PURE__ */ H(Dt, {})
3781
+ children: /* @__PURE__ */ H(jt, {})
3818
3782
  });
3819
3783
  }
3820
3784
  //#endregion
3821
3785
  //#region src/components/rich-text-field/components/clean-format-button.tsx
3822
- function ac({ ...e }) {
3786
+ function sc({ ...e }) {
3823
3787
  let t = Q(), n = F(() => {
3824
3788
  t.update(() => {
3825
3789
  let e = K();
3826
3790
  if (q(e)) {
3827
- Xs(() => Hs);
3828
- for (let t of e.extract()) J(t) && (t.setFormat(0), t.setStyle(""), cn(t).setFormat(""));
3791
+ Qs(() => Ws);
3792
+ for (let t of e.extract()) J(t) && (t.setFormat(0), t.setStyle(""), un(t).setFormat(""));
3829
3793
  }
3830
3794
  });
3831
3795
  }, [t]);
@@ -3834,47 +3798,47 @@ function ac({ ...e }) {
3834
3798
  "aria-label": "Reset Formatting",
3835
3799
  onClick: n,
3836
3800
  ...e,
3837
- children: /* @__PURE__ */ H(Ot, {})
3801
+ children: /* @__PURE__ */ H(Mt, {})
3838
3802
  });
3839
3803
  }
3840
3804
  //#endregion
3841
3805
  //#region src/components/rich-text-field/components/image-button.tsx
3842
- function oc({ ...e }) {
3806
+ function cc({ ...e }) {
3843
3807
  return /* @__PURE__ */ H($, {
3844
3808
  "data-testid": "image-button",
3845
3809
  "aria-label": "Add Image",
3846
3810
  ...e,
3847
- children: /* @__PURE__ */ H(Mt, {})
3811
+ children: /* @__PURE__ */ H(It, {})
3848
3812
  });
3849
3813
  }
3850
3814
  //#endregion
3851
3815
  //#region src/components/rich-text-field/components/italic-button.tsx
3852
- function sc({ ...e }) {
3853
- let { isItalic: t, onItalic: n } = tc();
3816
+ function lc({ ...e }) {
3817
+ let { isItalic: t, onItalic: n } = rc();
3854
3818
  return /* @__PURE__ */ H($, {
3855
3819
  "data-testid": "italic-button",
3856
3820
  "aria-label": "Format Italics",
3857
3821
  isActive: t,
3858
3822
  onClick: n,
3859
3823
  ...e,
3860
- children: /* @__PURE__ */ H(At, {})
3824
+ children: /* @__PURE__ */ H(Pt, {})
3861
3825
  });
3862
3826
  }
3863
3827
  //#endregion
3864
3828
  //#region src/components/rich-text-field/components/link-button.tsx
3865
- function cc({ isActive: e, ...t }) {
3829
+ function uc({ isActive: e, ...t }) {
3866
3830
  return /* @__PURE__ */ H($, {
3867
3831
  "data-testid": "link-button",
3868
3832
  "aria-label": "Add Link",
3869
3833
  ...t,
3870
- children: H(e ? Pt : Nt, {})
3834
+ children: H(e ? Rt : Lt, {})
3871
3835
  });
3872
3836
  }
3873
3837
  //#endregion
3874
3838
  //#region src/components/rich-text-field/components/size-select.tsx
3875
- function lc({ className: e }) {
3876
- let { fontSize: t, onFontSize: n } = tc(), r = z(() => [...Ns], []);
3877
- return /* @__PURE__ */ H(Is, {
3839
+ function dc({ className: e }) {
3840
+ let { fontSize: t, onFontSize: n } = rc(), r = z(() => [...Fs], []);
3841
+ return /* @__PURE__ */ H(Rs, {
3878
3842
  "data-testid": "size-select",
3879
3843
  options: r,
3880
3844
  value: t,
@@ -3884,8 +3848,8 @@ function lc({ className: e }) {
3884
3848
  }
3885
3849
  //#endregion
3886
3850
  //#region src/components/rich-text-field/components/text-color-button.tsx
3887
- function uc({ wrapperClassName: e, ...t }) {
3888
- let { textColor: n, onTextColor: r } = tc(), i = n === Fs;
3851
+ function fc({ wrapperClassName: e, ...t }) {
3852
+ let { textColor: n, onTextColor: r } = rc(), i = n === Ls;
3889
3853
  function a(e) {
3890
3854
  r(e.target.value);
3891
3855
  }
@@ -3898,7 +3862,7 @@ function uc({ wrapperClassName: e, ...t }) {
3898
3862
  ...t,
3899
3863
  children: /* @__PURE__ */ H("span", {
3900
3864
  style: i ? {} : { color: n },
3901
- children: /* @__PURE__ */ H(kt, {})
3865
+ children: /* @__PURE__ */ H(Nt, {})
3902
3866
  })
3903
3867
  }), /* @__PURE__ */ H("input", {
3904
3868
  type: "color",
@@ -3919,9 +3883,9 @@ function uc({ wrapperClassName: e, ...t }) {
3919
3883
  }
3920
3884
  //#endregion
3921
3885
  //#region src/components/rich-text-field/components/typography-select.tsx
3922
- function dc({ className: e }) {
3923
- let { fontFamily: t, onFontFamily: n } = tc(), r = z(() => [...js], []);
3924
- return /* @__PURE__ */ H(Is, {
3886
+ function pc({ className: e }) {
3887
+ let { fontFamily: t, onFontFamily: n } = rc(), r = z(() => [...Ns], []);
3888
+ return /* @__PURE__ */ H(Rs, {
3925
3889
  "data-testid": "typography-select",
3926
3890
  options: r,
3927
3891
  value: t,
@@ -3931,37 +3895,37 @@ function dc({ className: e }) {
3931
3895
  }
3932
3896
  //#endregion
3933
3897
  //#region src/components/rich-text-field/components/underline-button.tsx
3934
- function fc({ ...e }) {
3935
- let { isUnderline: t, onUnderline: n } = tc();
3898
+ function mc({ ...e }) {
3899
+ let { isUnderline: t, onUnderline: n } = rc();
3936
3900
  return /* @__PURE__ */ H($, {
3937
3901
  "data-testid": "underline-button",
3938
3902
  "aria-label": "Format Underline",
3939
3903
  isActive: t,
3940
3904
  onClick: n,
3941
3905
  ...e,
3942
- children: /* @__PURE__ */ H(jt, {})
3906
+ children: /* @__PURE__ */ H(Ft, {})
3943
3907
  });
3944
3908
  }
3945
3909
  //#endregion
3946
3910
  //#region src/components/rich-text-field/components/formatting-toolbar-plugin.tsx
3947
- var pc = ({ hasAttachments: e }) => /* @__PURE__ */ U(_e, { children: [
3911
+ var hc = ({ hasAttachments: e }) => /* @__PURE__ */ U(xe, { children: [
3912
+ /* @__PURE__ */ H(pc, {}),
3948
3913
  /* @__PURE__ */ H(dc, {}),
3914
+ /* @__PURE__ */ H(d, { orientation: "vertical" }),
3915
+ /* @__PURE__ */ H(oc, {}),
3949
3916
  /* @__PURE__ */ H(lc, {}),
3950
- /* @__PURE__ */ H(o, { orientation: "vertical" }),
3951
- /* @__PURE__ */ H(ic, {}),
3952
- /* @__PURE__ */ H(sc, {}),
3917
+ /* @__PURE__ */ H(mc, {}),
3953
3918
  /* @__PURE__ */ H(fc, {}),
3954
- /* @__PURE__ */ H(uc, {}),
3955
- /* @__PURE__ */ H(o, { orientation: "vertical" }),
3919
+ /* @__PURE__ */ H(d, { orientation: "vertical" }),
3920
+ /* @__PURE__ */ H(uc, { isDisabled: !0 }),
3921
+ /* @__PURE__ */ H(Hs, { isDisabled: !e }),
3956
3922
  /* @__PURE__ */ H(cc, { isDisabled: !0 }),
3957
- /* @__PURE__ */ H(Bs, { isDisabled: !e }),
3958
- /* @__PURE__ */ H(oc, { isDisabled: !0 }),
3959
- /* @__PURE__ */ H(o, { orientation: "vertical" }),
3960
- /* @__PURE__ */ H(zs, {}),
3961
- /* @__PURE__ */ H(o, { orientation: "vertical" }),
3962
- /* @__PURE__ */ H(ac, {})
3923
+ /* @__PURE__ */ H(d, { orientation: "vertical" }),
3924
+ /* @__PURE__ */ H(Vs, {}),
3925
+ /* @__PURE__ */ H(d, { orientation: "vertical" }),
3926
+ /* @__PURE__ */ H(sc, {})
3963
3927
  ] });
3964
- function mc({ className: e, children: t = pc, hasAttachments: n = !1 }) {
3928
+ function gc({ className: e, children: t = hc, hasAttachments: n = !1 }) {
3965
3929
  return /* @__PURE__ */ H("div", {
3966
3930
  "data-testid": "formatting-toolbar",
3967
3931
  "data-slot": "rich-text-field-toolbar",
@@ -3971,9 +3935,9 @@ function mc({ className: e, children: t = pc, hasAttachments: n = !1 }) {
3971
3935
  }
3972
3936
  //#endregion
3973
3937
  //#region src/components/rich-text-field/rich-text-field.tsx
3974
- var hc = P(({ 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) => {
3938
+ var _c = P(({ 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) => {
3975
3939
  let p = i === "top";
3976
- return /* @__PURE__ */ U(ks, {
3940
+ return /* @__PURE__ */ U(js, {
3977
3941
  ref: f,
3978
3942
  "data-testid": "rich-text-field",
3979
3943
  "data-slot": "rich-text-field",
@@ -3982,21 +3946,21 @@ var hc = P(({ children: e, className: t, placeholderClassName: n, containerClass
3982
3946
  containerClassName: M("h-rich-text-field-height", "rounded-rich-text-field-toolbar", p ? "pt-rich-text-field-toolbar-height" : "pb-rich-text-field-toolbar-height", r),
3983
3947
  className: M("p-rich-text-field-editor-padding", "bg-rich-text-field-background", "size-full", t),
3984
3948
  ...d,
3985
- children: [/* @__PURE__ */ H(rc, { children: /* @__PURE__ */ H(mc, {
3949
+ children: [/* @__PURE__ */ H(ac, { children: /* @__PURE__ */ H(gc, {
3986
3950
  hasAttachments: c,
3987
3951
  className: M("absolute right-0 w-full", p ? "top-0" : "bottom-0", o),
3988
3952
  children: a
3989
- }) }), /* @__PURE__ */ H(Ts, {
3953
+ }) }), /* @__PURE__ */ H(Ds, {
3990
3954
  acceptedFiles: l,
3991
3955
  onFileAttach: u,
3992
3956
  isMultiple: s
3993
3957
  })]
3994
3958
  });
3995
3959
  });
3996
- hc.displayName = "RichTextField";
3960
+ _c.displayName = "RichTextField";
3997
3961
  //#endregion
3998
3962
  //#region src/components/topmenu/topmenu.tsx
3999
- var gc = hn("flex shrink-0 items-center justify-end", {
3963
+ var vc = _n("flex shrink-0 items-center justify-end", {
4000
3964
  variants: {
4001
3965
  size: {
4002
3966
  md: ["px-[4px]", "rounded-overlay-tools-wrapper bg-overlay-tools-background-base"],
@@ -4021,7 +3985,7 @@ var gc = hn("flex shrink-0 items-center justify-end", {
4021
3985
  hasBorder: !0
4022
3986
  }
4023
3987
  });
4024
- function _c({ className: e, children: t, ...n }) {
3988
+ function yc({ className: e, children: t, ...n }) {
4025
3989
  return /* @__PURE__ */ H("div", {
4026
3990
  "data-slot": "topmenu",
4027
3991
  role: "group",
@@ -4030,11 +3994,11 @@ function _c({ className: e, children: t, ...n }) {
4030
3994
  children: t
4031
3995
  });
4032
3996
  }
4033
- function vc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
3997
+ function bc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
4034
3998
  return /* @__PURE__ */ H("div", {
4035
3999
  "data-slot": "topmenu-actions",
4036
4000
  "data-size": t ?? "lg",
4037
- className: M(gc({
4001
+ className: M(vc({
4038
4002
  size: t,
4039
4003
  hasBorder: n
4040
4004
  }), e),
@@ -4044,42 +4008,42 @@ function vc({ className: e, size: t, hasBorder: n, children: r, ...i }) {
4044
4008
  }
4045
4009
  //#endregion
4046
4010
  //#region src/domain/actions/constants.ts
4047
- var yc = "swisper";
4011
+ var xc = "swisper";
4048
4012
  //#endregion
4049
4013
  //#region src/domain/actions/utils/index.ts
4050
- function bc(e, t) {
4051
- let n = `${yc}://action/${e}`;
4014
+ function Sc(e, t) {
4015
+ let n = `${xc}://action/${e}`;
4052
4016
  return t ? `${n}?${new URLSearchParams(t).toString()}` : n;
4053
4017
  }
4054
- function xc({ action: e, label: t, params: n }) {
4055
- return `[${t}](${bc(e, n)})`;
4018
+ function Cc({ action: e, label: t, params: n }) {
4019
+ return `[${t}](${Sc(e, n)})`;
4056
4020
  }
4057
- function Sc(e) {
4021
+ function wc(e) {
4058
4022
  if (!e?.startsWith("swisper://")) return !1;
4059
4023
  let t = new URL(e);
4060
4024
  return t.protocol === "swisper:" && t.hostname === "action" && t.pathname.startsWith("/") && t.pathname.split("/").length === 2;
4061
4025
  }
4062
- function Cc(e) {
4026
+ function Tc(e) {
4063
4027
  let t;
4064
4028
  try {
4065
4029
  t = new URL(e);
4066
4030
  } catch {
4067
4031
  return null;
4068
4032
  }
4069
- return Sc(e) ? {
4033
+ return wc(e) ? {
4070
4034
  option: t.pathname.replace("/", ""),
4071
4035
  payload: Object.fromEntries(t.searchParams.entries())
4072
4036
  } : null;
4073
4037
  }
4074
- function wc(e) {
4038
+ function Ec(e) {
4075
4039
  for (let t of e) if (t.type === "text" && typeof t.value == "string") return t.value;
4076
4040
  return null;
4077
4041
  }
4078
- function Tc(e) {
4079
- let t = vn().use(_n).use(gn).parse(e), n = null;
4080
- return yn(t, (e) => {
4042
+ function Dc(e) {
4043
+ let t = bn().use(yn).use(vn).parse(e), n = null;
4044
+ return xn(t, (e) => {
4081
4045
  if (e.type !== "link") return;
4082
- let t = Cc(e.url), r = wc(e.children);
4046
+ let t = Tc(e.url), r = Ec(e.children);
4083
4047
  if (t && r) {
4084
4048
  n = {
4085
4049
  label: r,
@@ -4093,23 +4057,23 @@ function Tc(e) {
4093
4057
  }
4094
4058
  //#endregion
4095
4059
  //#region src/domain/actions/hooks/index.ts
4096
- function Ec(e) {
4097
- return z(() => e.map((e) => Tc(e) || { label: e }).filter((e) => e !== null), [e]);
4060
+ function Oc(e) {
4061
+ return z(() => e.map((e) => Dc(e) || { label: e }).filter((e) => e !== null), [e]);
4098
4062
  }
4099
4063
  //#endregion
4100
4064
  //#region src/hooks/use-chat-stream-message.ts
4101
- function Dc(e) {
4065
+ function kc(e) {
4102
4066
  return JSON.parse(e);
4103
4067
  }
4104
- function Oc(e) {
4068
+ function Ac(e) {
4105
4069
  return e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
4106
4070
  }
4107
- function kc(e, t) {
4071
+ function jc(e, t) {
4108
4072
  return e instanceof Error ? e : Error(t);
4109
4073
  }
4110
- function Ac() {
4074
+ function Mc() {
4111
4075
  return { streamMessage: F(async ({ stream: e, abortController: t, timeout: n = 2e4, tokenParser: r, onChunkReceived: i, onAbort: a, onFinish: o, onError: s }) => {
4112
- let c = r ?? Dc, l, u = !1, d = () => {
4076
+ let c = r ?? kc, l, u = !1, d = () => {
4113
4077
  l !== void 0 && (clearTimeout(l), l = void 0);
4114
4078
  }, f = (e) => {
4115
4079
  u || (u = !0, d(), a?.(e));
@@ -4120,7 +4084,7 @@ function Ac() {
4120
4084
  }, n));
4121
4085
  };
4122
4086
  try {
4123
- let n = "", r = new TextDecoder("utf-8"), a = bn({
4087
+ let n = "", r = new TextDecoder("utf-8"), a = Sn({
4124
4088
  onEvent(e) {
4125
4089
  try {
4126
4090
  n += e.data;
@@ -4136,7 +4100,7 @@ function Ac() {
4136
4100
  }
4137
4101
  });
4138
4102
  for (t?.signal.addEventListener("abort", () => {
4139
- let e = kc(t.signal.reason, "Stream aborted");
4103
+ let e = jc(t.signal.reason, "Stream aborted");
4140
4104
  f(e);
4141
4105
  }, { once: !0 }), p(); !u;) {
4142
4106
  let { value: t, done: n } = await e.read(), i = r.decode(t, { stream: !0 });
@@ -4145,8 +4109,8 @@ function Ac() {
4145
4109
  d(), !u && !t?.signal.aborted && o?.(n);
4146
4110
  } catch (e) {
4147
4111
  let n = e;
4148
- if (u || t?.signal.aborted || Oc(n)) {
4149
- u || f(kc(n, "Stream aborted"));
4112
+ if (u || t?.signal.aborted || Ac(n)) {
4113
+ u || f(jc(n, "Stream aborted"));
4150
4114
  return;
4151
4115
  }
4152
4116
  t?.abort(n), console.error("Error while reading stream:", n), s?.(n);
@@ -4155,7 +4119,7 @@ function Ac() {
4155
4119
  }
4156
4120
  //#endregion
4157
4121
  //#region src/hooks/use-on-chat-changed.ts
4158
- function jc(e) {
4122
+ function Nc(e) {
4159
4123
  let { chatId: t, isNewChat: n } = X(), r = B(n), i = B(t), a = B(e);
4160
4124
  a.current = e, r.current = n, L(() => {
4161
4125
  i.current !== t && (a.current({
@@ -4167,19 +4131,19 @@ function jc(e) {
4167
4131
  }
4168
4132
  //#endregion
4169
4133
  //#region src/hooks/use-current-chat-id.ts
4170
- function Mc() {
4134
+ function Pc() {
4171
4135
  let { chatId: e } = X();
4172
4136
  return e;
4173
4137
  }
4174
4138
  //#endregion
4175
4139
  //#region src/hooks/use-is-current-chat-new.ts
4176
- function Nc() {
4140
+ function Fc() {
4177
4141
  let { isNewChat: e } = X();
4178
4142
  return e;
4179
4143
  }
4180
4144
  //#endregion
4181
4145
  //#region src/hooks/use-loaded-chat-ids.ts
4182
- function Pc() {
4146
+ function Ic() {
4183
4147
  let { loadedChatIdsRef: e } = X();
4184
4148
  return {
4185
4149
  getIsChatLoaded: F((t) => e.current?.has(t) ?? !1, []),
@@ -4193,7 +4157,7 @@ function Pc() {
4193
4157
  }
4194
4158
  //#endregion
4195
4159
  //#region src/hooks/use-chat-prompt-placeholder.ts
4196
- function Fc() {
4160
+ function Lc() {
4197
4161
  let { promptPlaceholder: e, setPromptPlaceholder: t, clearPromptPlaceholder: n } = X();
4198
4162
  return {
4199
4163
  promptPlaceholder: e,
@@ -4202,6 +4166,6 @@ function Fc() {
4202
4166
  };
4203
4167
  }
4204
4168
  //#endregion
4205
- export { ss as $replaceEditorHTMLContent, cs as $replaceEditorSelectionHTMLContent, as as $setSelectionToEnd, zs as AlignmentSelect, Bs as AttachmentButton, ic as BoldButton, yc as CHAT_ACTION_PROTOCOL, io as CanvasShell, so as CanvasShellCloseTrigger, fo as CanvasShellContent, po as CanvasShellFooter, co as CanvasShellFullScreenTrigger, ao as CanvasShellHeader, lo as CanvasShellOptionsButton, oo as CanvasShellTitle, Qa as ChatArtifact, ro as ChatArtifactActions, no as ChatArtifactCaption, eo as ChatArtifactContent, $a as ChatArtifactIcon, to as ChatArtifactTitle, Wn as ChatCard, kn as ChatCardActionButton, On as ChatCardActions, Vn as ChatCardAttribute, Hn as ChatCardAttributeLabel, Un as ChatCardAttributeValue, Bn as ChatCardAttributes, Mn as ChatCardBody, An as ChatCardCollapsibleButton, Yn as ChatCardContainer, Nn as ChatCardContent, Fn as ChatCardFooter, Rn as ChatCardFooterActions, In as ChatCardFooterNotes, Ln as ChatCardFooterPrice, zn as ChatCardForm, Cn as ChatCardHeader, Tn as ChatCardHeaderContent, wn as ChatCardIcon, jn as ChatCardMedia, Pn as ChatCardPreview, Dn as ChatCardSubTitle, En as ChatCardTitle, tr as ChatContainer, rr as ChatContainerPrompt, ir as ChatContainerWelcome, li as ChatConversationProvider, Cr as ChatInput, Tr as ChatInputTextarea, Or as ChatList, Mr as ChatListEmptyState, Nr as ChatListError, Lr as ChatListItem, Ir as ChatListItems, Pr as ChatListLoadMore, jr as ChatListSkeleton, $r as ChatMessage, ti as ChatMessageActions, yi as ChatMessageAttachmentCard, Ci as ChatMessageAttachmentCardActions, bi as ChatMessageAttachmentCardContent, Ti as ChatMessageAttachmentCardIcon, Si as ChatMessageAttachmentCardPreview, xi as ChatMessageAttachmentCardTitle, ei as ChatMessageContent, gi as ChatMessageListGroup, Mi as ChatMessageResponse, Ni as ChatMessageToolbar, Fi as ChatMessageToolbarActionButton, Pi as ChatMessageToolbarActions, Ii as ChatMessageToolbarTimestamp, pi as ChatMessages, mi as ChatMessagesList, vi as ChatMessagesScrollButton, Gi as ChatNotificationCard, $i as ChatNotificationCardActions, ta as ChatNotificationCardButtons, aa as ChatNotificationCardCloseButton, oa as ChatNotificationCardContent, la as ChatNotificationCardContentActions, ca as ChatNotificationCardContentDescription, sa as ChatNotificationCardContentTitle, ia as ChatNotificationCardDeleteButton, fa as ChatNotificationCardDescription, ua as ChatNotificationCardExpandButton, Ki as ChatNotificationCardHead, qi as ChatNotificationCardHeader, Ji as ChatNotificationCardHeaderIcon, Qi as ChatNotificationCardHeaderStatus, Yi as ChatNotificationCardHeaderTitle, Xi as ChatNotificationCardHeaderTitleLabel, da as ChatNotificationCardIcon, na as ChatNotificationCardReadActionButton, ra as ChatNotificationCardSnoozeButton, pa as ChatNotificationCardTimeStamp, ea as ChatNotificationCardTimestamp, ma as ChatNotificationPopup, ga as ChatNotificationPopupContent, ha as ChatNotificationPopupTrigger, Gr as ChatPromptBox, Zr as ChatPromptBoxActionsLeft, Qr as ChatPromptBoxActionsRight, Yr as ChatPromptBoxContent, Xr as ChatPromptBoxInput, Jr as ChatPromptBoxToolbar, ii as ChatProvider, _a as ChatReplies, va as ChatReply, ya as ChatReplyLabel, ba as ChatReplyValue, wa as ChatSuggestion, Oa as ChatSuggestionAction, Da as ChatSuggestionActions, Ea as ChatSuggestionLabel, Ta as ChatSuggestionLabelIcon, Ca as ChatSuggestions, ho as ChatThinkingProcess, bo as ChatThinkingProcessContent, So as ChatThinkingProcessContentItem, go as ChatThinkingProcessTrigger, yo as ChatThinkingProcessTriggerArrow, _o as ChatThinkingProcessTriggerIcon, vo as ChatThinkingProcessTriggerLabel, Ga as ChatThread, Ya as ChatThreadAnswer, Za as ChatThreadErrorState, qa as ChatThreadGroup, Ua as ChatThreadProvider, Ja as ChatThreadQuestion, ac as CleanFormatButton, Jn as EditableChatCardContextProvider, Co as EmptyState, Do as EmptyStateActionRow, Eo as EmptyStateDescription, wo as EmptyStateIcon, To as EmptyStateTitle, mc as FormattingToolbarPlugin, Ss as HtmlPastePlugin, _s as INSERT_HTML_COMMAND, ys as INSERT_HTML_EVENT, fs as INSERT_IMAGE_COMMAND, ps as INSERT_IMAGE_EVENT_NAME, ms as ImageAddedEvent, oc as ImageButton, hs as ImageDropPlugin, xs as InsertHtmlEvent, sc as ItalicButton, cc as LinkButton, Ai as MarkdownViewer, mo as NewChatTrigger, gs as PASTE_HTML_COMMAND, vs as PASTE_HTML_EVENT, bs as PasteHtmlEvent, ks as RichTextArea, hc as RichTextField, lc as SizeSelect, uc as TextColorButton, $ as ToolbarButton, _c as TopMenu, vc as TopMenuActions, dc as TypographySelect, fc as UnderlineButton, uo as canvasShellContentPadding, xc as createChatActionLink, Tc as extractChatActionFromLink, Hi as formatSnoozeDate, Di as getAttachmentIcon, Li as getSnoozeUntilDate, Sc as isChatActionURL, is as scrollRichTextAreaToBottom, Ec as useChatActions, X as useChatContext, ci as useChatConversationContext, xr as useChatInputContext, Dr as useChatListContext, Pc as useChatLoadedIds, Wi as useChatNotificationCardContext, Fc as useChatPromptPlaceholder, Ac as useChatStreamMessage, Sa as useChatSuggestionContext, Ra as useChatThread, Zt as useChatThreadScrollable, Mc as useCurrentChatId, Gn as useEditChatCard, qn as useEditableChatCardContext, Nc as useIsCurrentChatNew, jc as useOnChatChanged, Q as useRichTextAreaEditor, ts as useRichTextAreaSelectedText };
4169
+ export { ls as $replaceEditorHTMLContent, us as $replaceEditorSelectionHTMLContent, ss as $setSelectionToEnd, Vs as AlignmentSelect, Hs as AttachmentButton, oc as BoldButton, xc as CHAT_ACTION_PROTOCOL, oo as CanvasShell, lo as CanvasShellCloseTrigger, mo as CanvasShellContent, ho as CanvasShellFooter, uo as CanvasShellFullScreenTrigger, so as CanvasShellHeader, fo as CanvasShellOptionsButton, co as CanvasShellTitle, eo as ChatArtifact, ao as ChatArtifactActions, io as ChatArtifactCaption, no as ChatArtifactContent, to as ChatArtifactIcon, ro as ChatArtifactTitle, Kn as ChatCard, jn as ChatCardActionButton, An as ChatCardActions, Un as ChatCardAttribute, Wn as ChatCardAttributeLabel, Gn as ChatCardAttributeValue, Hn as ChatCardAttributes, Pn as ChatCardBody, Mn as ChatCardCollapsibleButton, Zn as ChatCardContainer, Fn as ChatCardContent, Ln as ChatCardFooter, Bn as ChatCardFooterActions, Rn as ChatCardFooterNotes, zn as ChatCardFooterPrice, Vn as ChatCardForm, Tn as ChatCardHeader, Dn as ChatCardHeaderContent, En as ChatCardIcon, Nn as ChatCardMedia, In as ChatCardPreview, kn as ChatCardSubTitle, On as ChatCardTitle, rr as ChatContainer, ar as ChatContainerPrompt, or as ChatContainerWelcome, di as ChatConversationProvider, Tr as ChatInput, Dr as ChatInputTextarea, Ar as ChatList, Pr as ChatListEmptyState, Fr as ChatListError, zr as ChatListItem, Rr as ChatListItems, Ir as ChatListLoadMore, Nr as ChatListSkeleton, ti as ChatMessage, ri as ChatMessageActions, xi as ChatMessageAttachmentCard, Ti as ChatMessageAttachmentCardActions, Si as ChatMessageAttachmentCardContent, Di as ChatMessageAttachmentCardIcon, wi as ChatMessageAttachmentCardPreview, Ci as ChatMessageAttachmentCardTitle, ni as ChatMessageContent, vi as ChatMessageListGroup, Pi as ChatMessageResponse, Fi as ChatMessageToolbar, Li as ChatMessageToolbarActionButton, Ii as ChatMessageToolbarActions, Ri as ChatMessageToolbarTimestamp, hi as ChatMessages, gi as ChatMessagesList, bi as ChatMessagesScrollButton, qi as ChatNotificationCard, ta as ChatNotificationCardActions, ra as ChatNotificationCardButtons, sa as ChatNotificationCardCloseButton, ca as ChatNotificationCardContent, da as ChatNotificationCardContentActions, ua as ChatNotificationCardContentDescription, la as ChatNotificationCardContentTitle, oa as ChatNotificationCardDeleteButton, ma as ChatNotificationCardDescription, fa as ChatNotificationCardExpandButton, Ji as ChatNotificationCardHead, Yi as ChatNotificationCardHeader, Xi as ChatNotificationCardHeaderIcon, ea as ChatNotificationCardHeaderStatus, Zi as ChatNotificationCardHeaderTitle, Qi as ChatNotificationCardHeaderTitleLabel, pa as ChatNotificationCardIcon, ia as ChatNotificationCardReadActionButton, aa as ChatNotificationCardSnoozeButton, ha as ChatNotificationCardTimeStamp, na as ChatNotificationCardTimestamp, ga as ChatNotificationPopup, va as ChatNotificationPopupContent, _a as ChatNotificationPopupTrigger, qr as ChatPromptBox, $r as ChatPromptBoxActionsLeft, ei as ChatPromptBoxActionsRight, Zr as ChatPromptBoxContent, Qr as ChatPromptBoxInput, Xr as ChatPromptBoxToolbar, oi as ChatProvider, ya as ChatReplies, ba as ChatReply, xa as ChatReplyLabel, Sa as ChatReplyValue, Ea as ChatSuggestion, Aa as ChatSuggestionAction, ka as ChatSuggestionActions, Oa as ChatSuggestionLabel, Da as ChatSuggestionLabelIcon, Ta as ChatSuggestions, _o as ChatThinkingProcess, So as ChatThinkingProcessContent, Co as ChatThinkingProcessContentItem, wo as ChatThinkingProcessContentItemIcon, vo as ChatThinkingProcessTrigger, xo as ChatThinkingProcessTriggerArrow, yo as ChatThinkingProcessTriggerIcon, bo as ChatThinkingProcessTriggerLabel, qa as ChatThread, Za as ChatThreadAnswer, $a as ChatThreadErrorState, Ya as ChatThreadGroup, Ga as ChatThreadProvider, Xa as ChatThreadQuestion, sc as CleanFormatButton, Xn as EditableChatCardContextProvider, To as EmptyState, ko as EmptyStateActionRow, Oo as EmptyStateDescription, Eo as EmptyStateIcon, Do as EmptyStateTitle, gc as FormattingToolbarPlugin, ws as HtmlPastePlugin, ys as INSERT_HTML_COMMAND, xs as INSERT_HTML_EVENT, ms as INSERT_IMAGE_COMMAND, hs as INSERT_IMAGE_EVENT_NAME, gs as ImageAddedEvent, cc as ImageButton, _s as ImageDropPlugin, Cs as InsertHtmlEvent, lc as ItalicButton, uc as LinkButton, Mi as MarkdownViewer, go as NewChatTrigger, vs as PASTE_HTML_COMMAND, bs as PASTE_HTML_EVENT, Ss as PasteHtmlEvent, js as RichTextArea, _c as RichTextField, dc as SizeSelect, fc as TextColorButton, $ as ToolbarButton, yc as TopMenu, bc as TopMenuActions, pc as TypographySelect, mc as UnderlineButton, po as canvasShellContentPadding, Cc as createChatActionLink, Dc as extractChatActionFromLink, Wi as formatSnoozeDate, ki as getAttachmentIcon, zi as getSnoozeUntilDate, wc as isChatActionURL, os as scrollRichTextAreaToBottom, Oc as useChatActions, X as useChatContext, ui as useChatConversationContext, Cr as useChatInputContext, kr as useChatListContext, Ic as useChatLoadedIds, Ki as useChatNotificationCardContext, Lc as useChatPromptPlaceholder, Mc as useChatStreamMessage, wa as useChatSuggestionContext, Ba as useChatThread, tn as useChatThreadScrollable, Pc as useCurrentChatId, qn as useEditChatCard, Yn as useEditableChatCardContext, Fc as useIsCurrentChatNew, Nc as useOnChatChanged, Q as useRichTextAreaEditor, rs as useRichTextAreaSelectedText };
4206
4170
 
4207
4171
  //# sourceMappingURL=index.es.js.map