@devalok/shilp-sutra 0.49.0 → 0.49.2

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 (162) hide show
  1. package/dist/_chunks/badge-group.js +41 -41
  2. package/dist/_chunks/badge-group.js.map +1 -1
  3. package/dist/_chunks/block-shell.js +1 -1
  4. package/dist/_chunks/chart-container.js +1 -1
  5. package/dist/_chunks/chat.js +6 -15
  6. package/dist/_chunks/chat.js.map +1 -1
  7. package/dist/_chunks/colors.js +2 -2
  8. package/dist/_chunks/document-preview.js +4 -4
  9. package/dist/_chunks/emoji-suggestion.js +5 -5
  10. package/dist/_chunks/emoji-suggestion.js.map +1 -1
  11. package/dist/_chunks/emoji.js +1 -1
  12. package/dist/_chunks/field-state.js +1 -1
  13. package/dist/_chunks/grid-lines.js +1 -1
  14. package/dist/_chunks/image-preview.js +7 -7
  15. package/dist/_chunks/keybinding.js +1 -1
  16. package/dist/_chunks/link-context.js +1 -1
  17. package/dist/_chunks/mention-suggestion.js +2 -2
  18. package/dist/_chunks/mention.js +1 -1
  19. package/dist/_chunks/motion-provider.js +1 -1
  20. package/dist/_chunks/normalize-icon.js +1 -1
  21. package/dist/_chunks/oauth-button.js +2 -2
  22. package/dist/_chunks/popover.js +17 -17
  23. package/dist/_chunks/primitives.js +1 -1
  24. package/dist/_chunks/shared.js +5 -5
  25. package/dist/_chunks/success.js +5 -8
  26. package/dist/_chunks/success.js.map +1 -1
  27. package/dist/_chunks/tiptap.js +11 -11
  28. package/dist/_chunks/tooltip.js +1 -1
  29. package/dist/_chunks/tree-view.js +2 -2
  30. package/dist/_chunks/use-calendar.js +1 -1
  31. package/dist/_chunks/use-controllable-open.js +1 -1
  32. package/dist/_chunks/vendor-client.js +1 -1
  33. package/dist/_chunks/vendor-utils.js +1 -1
  34. package/dist/ai/block-renderer.js +8 -11
  35. package/dist/ai/block-renderer.js.map +1 -1
  36. package/dist/ai/blocks/error.js +1 -1
  37. package/dist/ai/blocks/index.js +2 -2
  38. package/dist/ai/blocks/text.js +1 -1
  39. package/dist/ai/command-bar.d.ts.map +1 -1
  40. package/dist/ai/command-bar.js +8 -39
  41. package/dist/ai/command-bar.js.map +1 -1
  42. package/dist/ai/conversation.js +4 -10
  43. package/dist/ai/conversation.js.map +1 -1
  44. package/dist/ai/devadoot-icon.d.ts.map +1 -1
  45. package/dist/ai/index.js +10 -41
  46. package/dist/ai/index.js.map +1 -1
  47. package/dist/composed/activity-feed.js +3 -3
  48. package/dist/composed/activity-feed.js.map +1 -1
  49. package/dist/composed/avatar-group.js +3 -3
  50. package/dist/composed/avatar-group.js.map +1 -1
  51. package/dist/composed/bulk-action-bar.js +1 -1
  52. package/dist/composed/command-palette.js +6 -6
  53. package/dist/composed/content-card.js +1 -1
  54. package/dist/composed/date-picker/index.js +10 -10
  55. package/dist/composed/emoji-picker.js +4 -4
  56. package/dist/composed/empty-state.d.ts.map +1 -1
  57. package/dist/composed/empty-state.js +23 -33
  58. package/dist/composed/empty-state.js.map +1 -1
  59. package/dist/composed/extensions/emoji-node.js +1 -1
  60. package/dist/composed/extensions/emoji-suggestion.js +1 -1
  61. package/dist/composed/file-preview.js +14 -14
  62. package/dist/composed/filter-bar.js +1 -1
  63. package/dist/composed/multi-select-popover.js +3 -3
  64. package/dist/composed/priority-indicator.js +1 -1
  65. package/dist/composed/responsive-modal.js +21 -21
  66. package/dist/composed/rich-chat-input.js +445 -445
  67. package/dist/composed/rich-chat-input.js.map +1 -1
  68. package/dist/composed/rich-text-editor.js +28 -28
  69. package/dist/composed/schedule-view.js +1 -1
  70. package/dist/composed/schedule-view.js.map +1 -1
  71. package/dist/composed/status-badge.js +1 -1
  72. package/dist/motion/index.js +2 -2
  73. package/dist/shell/bottom-navbar.js +3 -3
  74. package/dist/shell/bottom-navbar.js.map +1 -1
  75. package/dist/shell/index.js +2 -2
  76. package/dist/shell/link-context.js +2 -2
  77. package/dist/shell/notification-center.js +3 -3
  78. package/dist/shell/sidebar.js +2 -2
  79. package/dist/shell/top-bar.js +1 -1
  80. package/dist/ui/accordion.js +14 -14
  81. package/dist/ui/alert-dialog.js +31 -31
  82. package/dist/ui/alert.js +1 -1
  83. package/dist/ui/aspect-ratio.js +1 -1
  84. package/dist/ui/autocomplete.js +7 -7
  85. package/dist/ui/avatar.d.ts.map +1 -1
  86. package/dist/ui/avatar.js +52 -67
  87. package/dist/ui/avatar.js.map +1 -1
  88. package/dist/ui/badge-group.js +1 -1
  89. package/dist/ui/badge.d.ts +2 -0
  90. package/dist/ui/badge.d.ts.map +1 -1
  91. package/dist/ui/badge.js +1 -1
  92. package/dist/ui/banner.js +1 -1
  93. package/dist/ui/breadcrumb.js +1 -1
  94. package/dist/ui/button.js +9 -9
  95. package/dist/ui/button.js.map +1 -1
  96. package/dist/ui/card.js +1 -1
  97. package/dist/ui/charts/area-chart.js +6 -6
  98. package/dist/ui/charts/bar-chart.js +6 -6
  99. package/dist/ui/charts/chart-container.js +1 -1
  100. package/dist/ui/charts/gauge-chart.js +2 -2
  101. package/dist/ui/charts/index.js +2 -2
  102. package/dist/ui/charts/line-chart.js +6 -6
  103. package/dist/ui/charts/pie-chart.js +5 -5
  104. package/dist/ui/charts/radar-chart.js +5 -5
  105. package/dist/ui/charts/sparkline.js +2 -2
  106. package/dist/ui/chat/index.js +2 -2
  107. package/dist/ui/checkbox.js +5 -5
  108. package/dist/ui/collapsible.js +4 -4
  109. package/dist/ui/color-input.js +4 -4
  110. package/dist/ui/combobox.js +8 -8
  111. package/dist/ui/combobox.js.map +1 -1
  112. package/dist/ui/context-menu.js +41 -41
  113. package/dist/ui/dialog.js +25 -25
  114. package/dist/ui/dot.d.ts.map +1 -1
  115. package/dist/ui/dot.js +24 -32
  116. package/dist/ui/dot.js.map +1 -1
  117. package/dist/ui/dropdown-menu.js +51 -51
  118. package/dist/ui/hover-card.js +9 -9
  119. package/dist/ui/icon-button.js +1 -1
  120. package/dist/ui/index.js +6 -6
  121. package/dist/ui/input.js +2 -2
  122. package/dist/ui/label.js +1 -1
  123. package/dist/ui/lib/utils.js +4 -4
  124. package/dist/ui/link.js +1 -1
  125. package/dist/ui/menubar.js +53 -53
  126. package/dist/ui/navigation-menu.js +27 -27
  127. package/dist/ui/number-input.js +2 -2
  128. package/dist/ui/oauth-button/index.js +2 -2
  129. package/dist/ui/pagination.js +1 -1
  130. package/dist/ui/popover.js +2 -2
  131. package/dist/ui/progress.js +2 -2
  132. package/dist/ui/radio.js +2 -2
  133. package/dist/ui/segmented-control.js +1 -1
  134. package/dist/ui/select.js +35 -35
  135. package/dist/ui/separator.js +1 -1
  136. package/dist/ui/sheet.js +22 -22
  137. package/dist/ui/sidebar.js +2 -2
  138. package/dist/ui/skeleton.js +1 -1
  139. package/dist/ui/slider.js +8 -8
  140. package/dist/ui/slider.js.map +1 -1
  141. package/dist/ui/split-button.js +3 -3
  142. package/dist/ui/stat-card.d.ts +2 -0
  143. package/dist/ui/stat-card.d.ts.map +1 -1
  144. package/dist/ui/stat-card.js +94 -126
  145. package/dist/ui/stat-card.js.map +1 -1
  146. package/dist/ui/stat-flash.js +1 -1
  147. package/dist/ui/stepper.js +1 -1
  148. package/dist/ui/surface.js +2 -2
  149. package/dist/ui/switch.js +2 -2
  150. package/dist/ui/table-row-link.js +1 -1
  151. package/dist/ui/tabs.js +13 -13
  152. package/dist/ui/text.js +1 -1
  153. package/dist/ui/textarea.js +2 -2
  154. package/dist/ui/toggle-group.js +1 -1
  155. package/dist/ui/toggle.js +2 -2
  156. package/dist/ui/tooltip.js +16 -16
  157. package/dist/ui/tree-view/index.js +2 -2
  158. package/llms.txt +1 -1
  159. package/mcp-manifest.json +1 -1
  160. package/package.json +1 -1
  161. package/skill/SKILL.md +1 -1
  162. package/skill/references/components.md +1 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { cn as e, fn as t, ln as n, pn as r } from "../_chunks/primitives.js";
2
+ import { computePosition as e, flip$1 as t, offset$1 as n, shift$1 as r } from "../_chunks/primitives.js";
3
3
  import { durations as i } from "../ui/lib/motion.js";
4
4
  import { cn as a } from "../ui/lib/utils.js";
5
5
  import { Spinner as o } from "../ui/spinner.js";
@@ -10,22 +10,22 @@ import { Dialog as u, DialogContent as d, DialogFooter as f, DialogHeader as p,
10
10
  import { SplitButton as h } from "../ui/split-button.js";
11
11
  import { ToggleGroup as g, ToggleGroupItem as _ } from "../ui/toggle-group.js";
12
12
  import { TruncatedText as v } from "../ui/truncated-text.js";
13
- import { t as y } from "../_chunks/mention.js";
14
- import { a as b, c as x, d as ee, f as S, g as C, h as te, i as ne, l as w, m as re, n as ie, p as ae, u as oe, y as se } from "../_chunks/tiptap.js";
15
- import { EmojiNode as ce } from "./extensions/emoji-node.js";
16
- import { t as le } from "../_chunks/emoji-suggestion.js";
17
- import { n as ue, t as de } from "../_chunks/mention-suggestion.js";
18
- import { n as T, t as fe } from "../_chunks/use-calendar.js";
19
- import * as E from "react";
20
- import { useCallback as D, useEffect as pe, useRef as O, useState as k } from "react";
21
- import { Fragment as me, jsx as A, jsxs as j } from "react/jsx-runtime";
22
- import * as he from "react-dom";
23
- import { IconAt as M, IconBlockquote as ge, IconBold as _e, IconCalendarEvent as ve, IconChevronDown as ye, IconClock as be, IconCode as xe, IconFile as Se, IconHighlight as N, IconItalic as Ce, IconLink as we, IconList as Te, IconListNumbers as Ee, IconMicrophone as De, IconMoodSmile as Oe, IconPencil as ke, IconPlayerPause as P, IconPlayerPlay as F, IconPlus as Ae, IconSend as je, IconSlash as I, IconSquare as Me, IconStrikethrough as Ne, IconTextSize as Pe, IconTrash as Fe, IconUnderline as L, IconX as R } from "@tabler/icons-react";
24
- import { AnimatePresence as z, motion as B, useReducedMotion as V } from "framer-motion";
25
- import { createRoot as H } from "react-dom/client";
13
+ import { MENTION_TOKEN_CLASS as y } from "../_chunks/mention.js";
14
+ import { BubbleMenu as b, CharacterCount as x, EditorContent as ee, Extension as S, Placeholder as C, PluginKey as w, index_default$1 as te, index_default$2 as ne, index_default$3 as T, index_default$4 as re, index_default$5 as ie, useEditor as ae, useEditorState as E } from "../_chunks/tiptap.js";
15
+ import { EmojiNode as oe } from "./extensions/emoji-node.js";
16
+ import { createEmojiSuggestion as se } from "../_chunks/emoji-suggestion.js";
17
+ import { FileAttachment as ce, createSuggestionRenderer as le } from "../_chunks/mention-suggestion.js";
18
+ import { CalendarGrid as D, useCalendar as ue } from "../_chunks/use-calendar.js";
19
+ import * as O from "react";
20
+ import { useCallback as k, useEffect as de, useRef as A, useState as j } from "react";
21
+ import { Fragment as fe, jsx as M, jsxs as N } from "react/jsx-runtime";
22
+ import * as pe from "react-dom";
23
+ import { IconAt as P, IconBlockquote as me, IconBold as he, IconCalendarEvent as ge, IconChevronDown as _e, IconClock as ve, IconCode as ye, IconFile as be, IconHighlight as F, IconItalic as xe, IconLink as Se, IconList as Ce, IconListNumbers as we, IconMicrophone as Te, IconMoodSmile as Ee, IconPencil as De, IconPlayerPause as I, IconPlayerPlay as L, IconPlus as Oe, IconSend as ke, IconSlash as R, IconSquare as Ae, IconStrikethrough as je, IconTextSize as Me, IconTrash as Ne, IconUnderline as z, IconX as B } from "@tabler/icons-react";
24
+ import { AnimatePresence as Pe, motion as V, useReducedMotion as H } from "framer-motion";
25
+ import { createRoot as Fe } from "react-dom/client";
26
26
  //#region src/composed/extensions/slash-command.tsx
27
- var Ie = E.forwardRef(({ groups: e, query: t, command: n }, r) => {
28
- let [i, o] = E.useState(0), s = E.useMemo(() => {
27
+ var Ie = O.forwardRef(({ groups: e, query: t, command: n }, r) => {
28
+ let [i, o] = O.useState(0), s = O.useMemo(() => {
29
29
  let n = t.toLowerCase(), r = [];
30
30
  return e.forEach((e, t) => {
31
31
  e.commands.forEach((e) => {
@@ -36,7 +36,7 @@ var Ie = E.forwardRef(({ groups: e, query: t, command: n }, r) => {
36
36
  });
37
37
  }), r;
38
38
  }, [e, t]);
39
- if (E.useEffect(() => o(0), [s]), E.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (o((e) => (e + s.length - 1) % s.length), !0) : e.key === "ArrowDown" ? (o((e) => (e + 1) % s.length), !0) : e.key === "Enter" ? (s[i] && n(s[i].command), !0) : !1 })), !s.length) return null;
39
+ if (O.useEffect(() => o(0), [s]), O.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (o((e) => (e + s.length - 1) % s.length), !0) : e.key === "ArrowDown" ? (o((e) => (e + 1) % s.length), !0) : e.key === "Enter" ? (s[i] && n(s[i].command), !0) : !1 })), !s.length) return null;
40
40
  let c = [], l = 0;
41
41
  for (let t of s) {
42
42
  let n = e[t.groupIndex].label, r = c[c.length - 1];
@@ -48,36 +48,36 @@ var Ie = E.forwardRef(({ groups: e, query: t, command: n }, r) => {
48
48
  flatIndex: l
49
49
  }), l++;
50
50
  }
51
- return /* @__PURE__ */ A("div", {
51
+ return /* @__PURE__ */ M("div", {
52
52
  role: "listbox",
53
53
  "aria-label": "Slash commands",
54
54
  className: "z-popover max-h-[320px] min-w-[220px] overflow-x-hidden overflow-y-auto rounded-surface bg-surface-overlay p-ds-02 shadow-floating",
55
- children: c.map((e, t) => /* @__PURE__ */ j("div", {
55
+ children: c.map((e, t) => /* @__PURE__ */ N("div", {
56
56
  role: "group",
57
57
  "aria-label": e.label,
58
58
  children: [
59
- t > 0 && /* @__PURE__ */ A("div", { className: "my-ds-01 border-t border-surface-border" }),
60
- /* @__PURE__ */ A("div", {
59
+ t > 0 && /* @__PURE__ */ M("div", { className: "my-ds-01 border-t border-surface-border" }),
60
+ /* @__PURE__ */ M("div", {
61
61
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
62
62
  children: e.label
63
63
  }),
64
64
  e.items.map(({ command: e, flatIndex: t }) => {
65
65
  let r = e.icon;
66
- return /* @__PURE__ */ j("button", {
66
+ return /* @__PURE__ */ N("button", {
67
67
  type: "button",
68
68
  role: "option",
69
69
  "aria-selected": t === i,
70
70
  onClick: () => n(e),
71
71
  className: a("flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-raised-hover" : "hover:bg-surface-raised-hover"),
72
- children: [r && /* @__PURE__ */ A("span", {
72
+ children: [r && /* @__PURE__ */ M("span", {
73
73
  className: "flex h-4 w-4 shrink-0 items-center justify-center text-surface-fg-muted",
74
- children: /* @__PURE__ */ A(r, { className: "h-4 w-4" })
75
- }), /* @__PURE__ */ j("div", {
74
+ children: /* @__PURE__ */ M(r, { className: "h-4 w-4" })
75
+ }), /* @__PURE__ */ N("div", {
76
76
  className: "flex flex-col",
77
- children: [/* @__PURE__ */ A("span", {
77
+ children: [/* @__PURE__ */ M("span", {
78
78
  className: "text-ds-sm text-surface-fg",
79
79
  children: e.label
80
- }), e.description && /* @__PURE__ */ A("span", {
80
+ }), e.description && /* @__PURE__ */ M("span", {
81
81
  className: "text-ds-xs text-surface-fg-subtle",
82
82
  children: e.description
83
83
  })]
@@ -96,7 +96,7 @@ function Le(e) {
96
96
  onStart: (i) => {
97
97
  n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
98
98
  let a = i.clientRect?.();
99
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = H(n), t.render(/* @__PURE__ */ A(Ie, {
99
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = Fe(n), t.render(/* @__PURE__ */ M(Ie, {
100
100
  ref: (e) => {
101
101
  r = e;
102
102
  },
@@ -108,7 +108,7 @@ function Le(e) {
108
108
  onUpdate: (i) => {
109
109
  if (!t || !n) return;
110
110
  let a = i.clientRect?.();
111
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ A(Ie, {
111
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ M(Ie, {
112
112
  ref: (e) => {
113
113
  r = e;
114
114
  },
@@ -126,11 +126,11 @@ function Le(e) {
126
126
  }
127
127
  function Re(e) {
128
128
  let t = e.flatMap((e) => e.commands);
129
- return C.create({
129
+ return S.create({
130
130
  name: "slashCommand",
131
131
  addProseMirrorPlugins() {
132
- return [ae({
133
- pluginKey: new se("slashCommand"),
132
+ return [T({
133
+ pluginKey: new w("slashCommand"),
134
134
  editor: this.editor,
135
135
  char: "/",
136
136
  startOfLine: !0,
@@ -154,7 +154,7 @@ function ze(e) {
154
154
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
155
155
  }
156
156
  function Be({ attachments: e, onRemoveAttachment: t }) {
157
- return /* @__PURE__ */ A(B.div, {
157
+ return /* @__PURE__ */ M(V.div, {
158
158
  initial: {
159
159
  height: 0,
160
160
  opacity: 0
@@ -177,13 +177,13 @@ function Be({ attachments: e, onRemoveAttachment: t }) {
177
177
  ]
178
178
  },
179
179
  className: "overflow-hidden",
180
- children: /* @__PURE__ */ A("div", {
180
+ children: /* @__PURE__ */ M("div", {
181
181
  role: "list",
182
182
  "aria-label": "Attachments",
183
183
  className: "flex gap-ds-02 overflow-x-auto px-ds-04 py-ds-02b border-b border-surface-border",
184
- children: /* @__PURE__ */ A(z, {
184
+ children: /* @__PURE__ */ M(Pe, {
185
185
  initial: !1,
186
- children: e.map((e) => e.type === "image" ? /* @__PURE__ */ j(B.div, {
186
+ children: e.map((e) => e.type === "image" ? /* @__PURE__ */ N(V.div, {
187
187
  role: "listitem",
188
188
  "aria-label": `Image: ${e.name}`,
189
189
  layout: !0,
@@ -214,27 +214,27 @@ function Be({ attachments: e, onRemoveAttachment: t }) {
214
214
  },
215
215
  className: "relative h-12 w-12 shrink-0 group",
216
216
  children: [
217
- /* @__PURE__ */ A("img", {
217
+ /* @__PURE__ */ M("img", {
218
218
  src: e.url,
219
219
  alt: e.name,
220
220
  className: "h-full w-full rounded-control object-cover"
221
221
  }),
222
- /* @__PURE__ */ A("button", {
222
+ /* @__PURE__ */ M("button", {
223
223
  onClick: () => t(e.id),
224
224
  className: "absolute -top-1 -right-1 h-ico-sm w-ico-sm rounded-pill bg-error-9 text-error-fg flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
225
225
  "aria-label": `Remove ${e.name}`,
226
226
  title: "Remove",
227
- children: /* @__PURE__ */ A(s, {
228
- icon: R,
227
+ children: /* @__PURE__ */ M(s, {
228
+ icon: B,
229
229
  size: "xs"
230
230
  })
231
231
  }),
232
- e.uploading && /* @__PURE__ */ A("div", {
232
+ e.uploading && /* @__PURE__ */ M("div", {
233
233
  className: "absolute inset-0 rounded-control bg-surface-overlay/50 flex items-center justify-center",
234
- children: /* @__PURE__ */ A(o, { size: "sm" })
234
+ children: /* @__PURE__ */ M(o, { size: "sm" })
235
235
  })
236
236
  ]
237
- }, e.id) : /* @__PURE__ */ j(B.div, {
237
+ }, e.id) : /* @__PURE__ */ N(V.div, {
238
238
  role: "listitem",
239
239
  "aria-label": `File: ${e.name}, ${ze(e.size)}`,
240
240
  layout: !0,
@@ -265,27 +265,27 @@ function Be({ attachments: e, onRemoveAttachment: t }) {
265
265
  },
266
266
  className: "flex items-center gap-ds-02 shrink-0 rounded-control bg-surface-raised px-ds-03 py-ds-01 group",
267
267
  children: [
268
- /* @__PURE__ */ A(s, {
269
- icon: Se,
268
+ /* @__PURE__ */ M(s, {
269
+ icon: be,
270
270
  size: "xs",
271
271
  className: "text-surface-fg-muted"
272
272
  }),
273
- /* @__PURE__ */ A(v, {
273
+ /* @__PURE__ */ M(v, {
274
274
  mode: "middle",
275
275
  className: "max-w-[120px] text-ds-xs text-surface-fg-muted",
276
276
  children: e.name
277
277
  }),
278
- /* @__PURE__ */ A("span", {
278
+ /* @__PURE__ */ M("span", {
279
279
  className: "text-ds-xs text-surface-fg-subtle",
280
280
  children: ze(e.size)
281
281
  }),
282
- /* @__PURE__ */ A("button", {
282
+ /* @__PURE__ */ M("button", {
283
283
  onClick: () => t(e.id),
284
284
  className: "text-surface-fg-subtle hover:text-error-11 opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
285
285
  "aria-label": `Remove ${e.name}`,
286
286
  title: "Remove",
287
- children: /* @__PURE__ */ A(s, {
288
- icon: R,
287
+ children: /* @__PURE__ */ M(s, {
288
+ icon: B,
289
289
  size: "xs"
290
290
  })
291
291
  })
@@ -297,9 +297,9 @@ function Be({ attachments: e, onRemoveAttachment: t }) {
297
297
  }
298
298
  //#endregion
299
299
  //#region src/composed/rich-chat-input/audio-waveform.tsx
300
- var U = E.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: o = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
301
- let [f, p] = E.useState(() => Array(s).fill(.05)), m = E.useRef(0), h = E.useRef(f);
302
- E.useEffect(() => {
300
+ var U = O.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: o = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
301
+ let [f, p] = O.useState(() => Array(s).fill(.05)), m = O.useRef(0), h = O.useRef(f);
302
+ O.useEffect(() => {
303
303
  if (e !== "live" || !t) return;
304
304
  let n = new Uint8Array(t.frequencyBinCount), r = () => {
305
305
  t.getByteFrequencyData(n);
@@ -317,7 +317,7 @@ var U = E.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
317
317
  e,
318
318
  t,
319
319
  s
320
- ]), E.useEffect(() => {
320
+ ]), O.useEffect(() => {
321
321
  if (!(e !== "static" || !n)) if (n.length === s) p(n);
322
322
  else {
323
323
  let e = Array(s), t = n.length / s;
@@ -332,9 +332,9 @@ var U = E.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
332
332
  n,
333
333
  s
334
334
  ]);
335
- let g = s * (i + o) - o, _ = E.useMemo(() => f.map((t, n) => {
335
+ let g = s * (i + o) - o, _ = O.useMemo(() => f.map((t, n) => {
336
336
  let a = Math.max(2, t * c), l = n * (i + o), u = (c - a) / 2, d = e === "static" && r > 0 && n / s <= r;
337
- return /* @__PURE__ */ A("rect", {
337
+ return /* @__PURE__ */ M("rect", {
338
338
  x: l,
339
339
  y: u,
340
340
  width: i,
@@ -351,7 +351,7 @@ var U = E.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
351
351
  s,
352
352
  c
353
353
  ]);
354
- return /* @__PURE__ */ A("svg", {
354
+ return /* @__PURE__ */ M("svg", {
355
355
  ref: d,
356
356
  height: c,
357
357
  viewBox: `0 0 ${g} ${c}`,
@@ -373,15 +373,15 @@ var Ve = [
373
373
  function He(e) {
374
374
  return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
375
375
  }
376
- var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, o) {
377
- let s = E.useRef(null), c = E.useRef(null), [u, d] = E.useState(!1), [f, p] = E.useState(0), [m, h] = E.useState(0), [g, _] = E.useState(null), v = E.useMemo(() => {
376
+ var Ue = O.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, o) {
377
+ let s = O.useRef(null), c = O.useRef(null), [u, d] = O.useState(!1), [f, p] = O.useState(0), [m, h] = O.useState(0), [g, _] = O.useState(null), v = O.useMemo(() => {
378
378
  if (typeof e == "string") return e;
379
379
  let t = URL.createObjectURL(e);
380
380
  return _(t), t;
381
381
  }, [e]);
382
- E.useEffect(() => () => {
382
+ O.useEffect(() => () => {
383
383
  g && URL.revokeObjectURL(g);
384
- }, [g]), E.useEffect(() => {
384
+ }, [g]), O.useEffect(() => {
385
385
  let e = s.current;
386
386
  if (!e) return;
387
387
  let t = () => p(e.currentTime), n = () => {
@@ -391,33 +391,33 @@ var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className
391
391
  e.removeEventListener("timeupdate", t), e.removeEventListener("ended", n);
392
392
  };
393
393
  }, []);
394
- let y = E.useCallback(() => {
394
+ let y = O.useCallback(() => {
395
395
  let e = s.current;
396
396
  e && (u ? (e.pause(), d(!1)) : (e.play(), d(!0)));
397
- }, [u]), b = E.useCallback((e) => {
397
+ }, [u]), b = O.useCallback((e) => {
398
398
  (e.key === " " || e.key === "Enter") && (e.preventDefault(), y());
399
- }, [y]), x = E.useCallback((e) => {
399
+ }, [y]), x = O.useCallback((e) => {
400
400
  let n = s.current, r = c.current;
401
401
  if (!n || !r || t <= 0) return;
402
402
  let i = r.getBoundingClientRect(), a = e.clientX - i.left;
403
403
  n.currentTime = Math.max(0, Math.min(1, a / i.width)) * t, p(n.currentTime);
404
- }, [t]), ee = E.useCallback(() => {
404
+ }, [t]), ee = O.useCallback(() => {
405
405
  let e = (m + 1) % Ve.length;
406
406
  h(e), s.current && (s.current.playbackRate = Ve[e]);
407
407
  }, [m]), S = t > 0 ? f / t : 0, C = Ve[m];
408
- return /* @__PURE__ */ j("div", {
408
+ return /* @__PURE__ */ N("div", {
409
409
  ref: o,
410
410
  role: "group",
411
411
  "aria-label": "Voice message player",
412
412
  className: a("flex items-center gap-ds-03", r),
413
413
  ...i,
414
414
  children: [
415
- /* @__PURE__ */ A("audio", {
415
+ /* @__PURE__ */ M("audio", {
416
416
  ref: s,
417
417
  src: v,
418
418
  preload: "metadata"
419
419
  }),
420
- /* @__PURE__ */ A(l, {
420
+ /* @__PURE__ */ M(l, {
421
421
  type: "button",
422
422
  variant: "solid",
423
423
  shape: "pill",
@@ -426,13 +426,13 @@ var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className
426
426
  onKeyDown: b,
427
427
  "aria-label": u ? "Pause voice message" : "Play voice message",
428
428
  className: "shrink-0 active:scale-95",
429
- children: A(u ? P : F, {
429
+ children: M(u ? I : L, {
430
430
  size: 16,
431
431
  stroke: 2,
432
432
  "aria-hidden": "true"
433
433
  })
434
434
  }),
435
- /* @__PURE__ */ A(U, {
435
+ /* @__PURE__ */ M(U, {
436
436
  ref: c,
437
437
  mode: "static",
438
438
  data: n,
@@ -440,7 +440,7 @@ var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className
440
440
  className: "cursor-pointer",
441
441
  onClick: x
442
442
  }),
443
- /* @__PURE__ */ j("span", {
443
+ /* @__PURE__ */ N("span", {
444
444
  className: "text-ds-xs tabular-nums text-surface-fg-subtle whitespace-nowrap",
445
445
  children: [
446
446
  He(f),
@@ -448,7 +448,7 @@ var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className
448
448
  He(t)
449
449
  ]
450
450
  }),
451
- /* @__PURE__ */ j("button", {
451
+ /* @__PURE__ */ N("button", {
452
452
  type: "button",
453
453
  onClick: ee,
454
454
  "aria-label": `Playback speed ${C}x`,
@@ -461,15 +461,15 @@ var Ue = E.forwardRef(function({ src: e, duration: t, waveformData: n, className
461
461
  Ue.displayName = "AudioPlayer";
462
462
  //#endregion
463
463
  //#region src/composed/rich-chat-input/chat-toolbar.tsx
464
- var We = E.createContext(null);
464
+ var We = O.createContext(null);
465
465
  function W() {
466
- let e = E.useContext(We);
466
+ let e = O.useContext(We);
467
467
  if (!e) throw Error("Toolbar primitives must be used inside <ChatToolbar>");
468
468
  return e;
469
469
  }
470
470
  function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: o }) {
471
471
  let { disabled: s } = W();
472
- return /* @__PURE__ */ A("button", {
472
+ return /* @__PURE__ */ M("button", {
473
473
  type: "button",
474
474
  onClick: e,
475
475
  disabled: n ?? s,
@@ -481,239 +481,239 @@ function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, classN
481
481
  });
482
482
  }
483
483
  function K() {
484
- return /* @__PURE__ */ A("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
484
+ return /* @__PURE__ */ M("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
485
485
  }
486
486
  function q({ children: e, className: t }) {
487
- return /* @__PURE__ */ A("div", {
487
+ return /* @__PURE__ */ M("div", {
488
488
  className: a("flex items-center gap-ds-01", t),
489
489
  children: e
490
490
  });
491
491
  }
492
492
  function Ge() {
493
- let { editor: e } = W(), { isActive: t } = w({
493
+ let { editor: e } = W(), { isActive: t } = E({
494
494
  editor: e,
495
495
  selector: ({ editor: e }) => ({ isActive: e.isActive("bold") })
496
496
  });
497
- return /* @__PURE__ */ A(G, {
497
+ return /* @__PURE__ */ M(G, {
498
498
  onClick: () => e.chain().focus().toggleBold().run(),
499
499
  isActive: t,
500
500
  title: "Bold",
501
- children: /* @__PURE__ */ A(s, {
502
- icon: _e,
501
+ children: /* @__PURE__ */ M(s, {
502
+ icon: he,
503
503
  size: "xs"
504
504
  })
505
505
  });
506
506
  }
507
507
  function Ke() {
508
- let { editor: e } = W(), { isActive: t } = w({
508
+ let { editor: e } = W(), { isActive: t } = E({
509
509
  editor: e,
510
510
  selector: ({ editor: e }) => ({ isActive: e.isActive("italic") })
511
511
  });
512
- return /* @__PURE__ */ A(G, {
512
+ return /* @__PURE__ */ M(G, {
513
513
  onClick: () => e.chain().focus().toggleItalic().run(),
514
514
  isActive: t,
515
515
  title: "Italic",
516
- children: /* @__PURE__ */ A(s, {
517
- icon: Ce,
516
+ children: /* @__PURE__ */ M(s, {
517
+ icon: xe,
518
518
  size: "xs"
519
519
  })
520
520
  });
521
521
  }
522
522
  function qe() {
523
- let { editor: e } = W(), { isActive: t } = w({
523
+ let { editor: e } = W(), { isActive: t } = E({
524
524
  editor: e,
525
525
  selector: ({ editor: e }) => ({ isActive: e.isActive("underline") })
526
526
  });
527
- return /* @__PURE__ */ A(G, {
527
+ return /* @__PURE__ */ M(G, {
528
528
  onClick: () => e.chain().focus().toggleUnderline().run(),
529
529
  isActive: t,
530
530
  title: "Underline",
531
- children: /* @__PURE__ */ A(s, {
532
- icon: L,
531
+ children: /* @__PURE__ */ M(s, {
532
+ icon: z,
533
533
  size: "xs"
534
534
  })
535
535
  });
536
536
  }
537
537
  function Je() {
538
- let { editor: e } = W(), { isActive: t } = w({
538
+ let { editor: e } = W(), { isActive: t } = E({
539
539
  editor: e,
540
540
  selector: ({ editor: e }) => ({ isActive: e.isActive("strike") })
541
541
  });
542
- return /* @__PURE__ */ A(G, {
542
+ return /* @__PURE__ */ M(G, {
543
543
  onClick: () => e.chain().focus().toggleStrike().run(),
544
544
  isActive: t,
545
545
  title: "Strikethrough",
546
- children: /* @__PURE__ */ A(s, {
547
- icon: Ne,
546
+ children: /* @__PURE__ */ M(s, {
547
+ icon: je,
548
548
  size: "xs"
549
549
  })
550
550
  });
551
551
  }
552
552
  function Ye() {
553
- let { editor: e } = W(), { isActive: t } = w({
553
+ let { editor: e } = W(), { isActive: t } = E({
554
554
  editor: e,
555
555
  selector: ({ editor: e }) => ({ isActive: e.isActive("highlight") })
556
556
  });
557
- return /* @__PURE__ */ A(G, {
557
+ return /* @__PURE__ */ M(G, {
558
558
  onClick: () => e.chain().focus().toggleHighlight().run(),
559
559
  isActive: t,
560
560
  title: "Highlight",
561
- children: /* @__PURE__ */ A(s, {
562
- icon: N,
561
+ children: /* @__PURE__ */ M(s, {
562
+ icon: F,
563
563
  size: "xs"
564
564
  })
565
565
  });
566
566
  }
567
567
  function Xe() {
568
- let { editor: e } = W(), { isActive: t } = w({
568
+ let { editor: e } = W(), { isActive: t } = E({
569
569
  editor: e,
570
570
  selector: ({ editor: e }) => ({ isActive: e.isActive("code") })
571
571
  });
572
- return /* @__PURE__ */ A(G, {
572
+ return /* @__PURE__ */ M(G, {
573
573
  onClick: () => e.chain().focus().toggleCode().run(),
574
574
  isActive: t,
575
575
  title: "Inline code",
576
- children: /* @__PURE__ */ A(s, {
577
- icon: xe,
576
+ children: /* @__PURE__ */ M(s, {
577
+ icon: ye,
578
578
  size: "xs"
579
579
  })
580
580
  });
581
581
  }
582
582
  function Ze() {
583
- let { editor: e } = W(), { isActive: t } = w({
583
+ let { editor: e } = W(), { isActive: t } = E({
584
584
  editor: e,
585
585
  selector: ({ editor: e }) => ({ isActive: e.isActive("bulletList") })
586
586
  });
587
- return /* @__PURE__ */ A(G, {
587
+ return /* @__PURE__ */ M(G, {
588
588
  onClick: () => e.chain().focus().toggleBulletList().run(),
589
589
  isActive: t,
590
590
  title: "Bullet list",
591
- children: /* @__PURE__ */ A(s, {
592
- icon: Te,
591
+ children: /* @__PURE__ */ M(s, {
592
+ icon: Ce,
593
593
  size: "xs"
594
594
  })
595
595
  });
596
596
  }
597
597
  function Qe() {
598
- let { editor: e } = W(), { isActive: t } = w({
598
+ let { editor: e } = W(), { isActive: t } = E({
599
599
  editor: e,
600
600
  selector: ({ editor: e }) => ({ isActive: e.isActive("orderedList") })
601
601
  });
602
- return /* @__PURE__ */ A(G, {
602
+ return /* @__PURE__ */ M(G, {
603
603
  onClick: () => e.chain().focus().toggleOrderedList().run(),
604
604
  isActive: t,
605
605
  title: "Ordered list",
606
- children: /* @__PURE__ */ A(s, {
607
- icon: Ee,
606
+ children: /* @__PURE__ */ M(s, {
607
+ icon: we,
608
608
  size: "xs"
609
609
  })
610
610
  });
611
611
  }
612
612
  function $e() {
613
- let { editor: e } = W(), { isActive: t } = w({
613
+ let { editor: e } = W(), { isActive: t } = E({
614
614
  editor: e,
615
615
  selector: ({ editor: e }) => ({ isActive: e.isActive("blockquote") })
616
616
  });
617
- return /* @__PURE__ */ A(G, {
617
+ return /* @__PURE__ */ M(G, {
618
618
  onClick: () => e.chain().focus().toggleBlockquote().run(),
619
619
  isActive: t,
620
620
  title: "Quote",
621
- children: /* @__PURE__ */ A(s, {
622
- icon: ge,
621
+ children: /* @__PURE__ */ M(s, {
622
+ icon: me,
623
623
  size: "xs"
624
624
  })
625
625
  });
626
626
  }
627
627
  function et() {
628
- let { editor: e } = W(), { isActive: t } = w({
628
+ let { editor: e } = W(), { isActive: t } = E({
629
629
  editor: e,
630
630
  selector: ({ editor: e }) => ({ isActive: e.isActive("link") })
631
631
  });
632
- return /* @__PURE__ */ A(G, {
632
+ return /* @__PURE__ */ M(G, {
633
633
  onClick: () => {
634
634
  let t = window.prompt("URL");
635
635
  t && e.chain().focus().setLink({ href: t }).run();
636
636
  },
637
637
  isActive: t,
638
638
  title: "Link",
639
- children: /* @__PURE__ */ A(s, {
640
- icon: we,
639
+ children: /* @__PURE__ */ M(s, {
640
+ icon: Se,
641
641
  size: "xs"
642
642
  })
643
643
  });
644
644
  }
645
645
  function tt() {
646
646
  let { editor: e } = W();
647
- return /* @__PURE__ */ A(G, {
647
+ return /* @__PURE__ */ M(G, {
648
648
  onClick: () => e.chain().focus().insertContent("@").run(),
649
649
  title: "Mention",
650
- children: /* @__PURE__ */ A(s, {
651
- icon: M,
650
+ children: /* @__PURE__ */ M(s, {
651
+ icon: P,
652
652
  size: "xs"
653
653
  })
654
654
  });
655
655
  }
656
656
  function nt() {
657
657
  let { editor: e } = W();
658
- return /* @__PURE__ */ A(G, {
658
+ return /* @__PURE__ */ M(G, {
659
659
  onClick: () => e.chain().focus().insertContent(":").run(),
660
660
  title: "Emoji",
661
- children: /* @__PURE__ */ A(s, {
662
- icon: Oe,
661
+ children: /* @__PURE__ */ M(s, {
662
+ icon: Ee,
663
663
  size: "xs"
664
664
  })
665
665
  });
666
666
  }
667
667
  function J() {
668
668
  let { editor: e } = W();
669
- return /* @__PURE__ */ A(G, {
669
+ return /* @__PURE__ */ M(G, {
670
670
  onClick: () => e.chain().focus().insertContent("/").run(),
671
671
  title: "Slash command",
672
- children: /* @__PURE__ */ A(s, {
673
- icon: I,
672
+ children: /* @__PURE__ */ M(s, {
673
+ icon: R,
674
674
  size: "xs"
675
675
  })
676
676
  });
677
677
  }
678
678
  function rt({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
679
679
  let i = (t) => !e || e.includes(t);
680
- return /* @__PURE__ */ j(me, { children: [
681
- !t && /* @__PURE__ */ j(q, { children: [
682
- i("bold") && /* @__PURE__ */ A(Ge, {}),
683
- i("italic") && /* @__PURE__ */ A(Ke, {}),
684
- i("underline") && /* @__PURE__ */ A(qe, {}),
685
- i("strike") && /* @__PURE__ */ A(Je, {}),
686
- i("highlight") && /* @__PURE__ */ A(Ye, {})
680
+ return /* @__PURE__ */ N(fe, { children: [
681
+ !t && /* @__PURE__ */ N(q, { children: [
682
+ i("bold") && /* @__PURE__ */ M(Ge, {}),
683
+ i("italic") && /* @__PURE__ */ M(Ke, {}),
684
+ i("underline") && /* @__PURE__ */ M(qe, {}),
685
+ i("strike") && /* @__PURE__ */ M(Je, {}),
686
+ i("highlight") && /* @__PURE__ */ M(Ye, {})
687
687
  ] }),
688
- !t && /* @__PURE__ */ A(K, {}),
689
- !t && /* @__PURE__ */ j(q, { children: [i("bulletList") && /* @__PURE__ */ A(Ze, {}), i("orderedList") && /* @__PURE__ */ A(Qe, {})] }),
690
- !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ A(K, {}),
691
- !t && /* @__PURE__ */ j(q, { children: [
692
- i("blockquote") && /* @__PURE__ */ A($e, {}),
693
- i("link") && /* @__PURE__ */ A(et, {}),
694
- i("code") && /* @__PURE__ */ A(Xe, {})
688
+ !t && /* @__PURE__ */ M(K, {}),
689
+ !t && /* @__PURE__ */ N(q, { children: [i("bulletList") && /* @__PURE__ */ M(Ze, {}), i("orderedList") && /* @__PURE__ */ M(Qe, {})] }),
690
+ !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ M(K, {}),
691
+ !t && /* @__PURE__ */ N(q, { children: [
692
+ i("blockquote") && /* @__PURE__ */ M($e, {}),
693
+ i("link") && /* @__PURE__ */ M(et, {}),
694
+ i("code") && /* @__PURE__ */ M(Xe, {})
695
695
  ] }),
696
- !t && (n || r) && /* @__PURE__ */ A(K, {}),
697
- /* @__PURE__ */ j(q, { children: [
698
- n && i("mention") && /* @__PURE__ */ A(tt, {}),
699
- i("emoji") && /* @__PURE__ */ A(nt, {}),
700
- r && i("slash") && /* @__PURE__ */ A(J, {})
696
+ !t && (n || r) && /* @__PURE__ */ M(K, {}),
697
+ /* @__PURE__ */ N(q, { children: [
698
+ n && i("mention") && /* @__PURE__ */ M(tt, {}),
699
+ i("emoji") && /* @__PURE__ */ M(nt, {}),
700
+ r && i("slash") && /* @__PURE__ */ M(J, {})
701
701
  ] })
702
702
  ] });
703
703
  }
704
704
  function it({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
705
705
  if (t === !1) return null;
706
706
  let o = typeof t != "boolean" && !Array.isArray(t), s = Array.isArray(t) ? t : null;
707
- return /* @__PURE__ */ A(We.Provider, {
707
+ return /* @__PURE__ */ M(We.Provider, {
708
708
  value: {
709
709
  editor: e,
710
710
  disabled: a
711
711
  },
712
- children: /* @__PURE__ */ A("div", {
712
+ children: /* @__PURE__ */ M("div", {
713
713
  role: "toolbar",
714
714
  "aria-label": "Text formatting",
715
715
  className: "flex flex-wrap items-center gap-ds-01 border-t border-surface-border px-ds-04 py-ds-02b",
716
- children: o ? t : /* @__PURE__ */ A(rt, {
716
+ children: o ? t : /* @__PURE__ */ M(rt, {
717
717
  items: s,
718
718
  isMobile: n,
719
719
  hasMentions: r,
@@ -733,30 +733,30 @@ function Y(e) {
733
733
  };
734
734
  }
735
735
  function at({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
736
- let i = V();
737
- E.useEffect(() => {
736
+ let i = H();
737
+ O.useEffect(() => {
738
738
  let e = (e) => {
739
739
  e.key === "Escape" && r();
740
740
  };
741
741
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
742
742
  }, [r]);
743
743
  let o = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, c = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", l = Y(e), u = s ? "text-error-11" : o ? "text-warning-11" : "text-surface-fg";
744
- return /* @__PURE__ */ j("div", {
744
+ return /* @__PURE__ */ N("div", {
745
745
  role: "status",
746
746
  "aria-live": "polite",
747
747
  "aria-label": "Recording voice message",
748
748
  className: "absolute inset-0 flex items-center gap-ds-03 px-ds-04 py-ds-03 bg-surface-raised-hover rounded-surface z-10",
749
749
  children: [
750
- /* @__PURE__ */ A("span", {
750
+ /* @__PURE__ */ M("span", {
751
751
  className: a("w-ds-02b h-ds-02b shrink-0 rounded-pill bg-error-9", i ? "opacity-100" : c),
752
752
  "aria-hidden": "true"
753
753
  }),
754
- /* @__PURE__ */ j("span", {
754
+ /* @__PURE__ */ N("span", {
755
755
  className: a("text-ds-sm font-mono tabular-nums whitespace-nowrap", u),
756
756
  "aria-label": `${l.minutes} minutes ${l.secs} seconds`,
757
757
  children: [
758
758
  l.minutes,
759
- /* @__PURE__ */ A("span", {
759
+ /* @__PURE__ */ M("span", {
760
760
  className: i ? void 0 : "animate-[blink_1s_step-end_infinite]",
761
761
  "aria-hidden": "true",
762
762
  children: l.separator
@@ -764,9 +764,9 @@ function at({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
764
764
  l.secs
765
765
  ]
766
766
  }),
767
- /* @__PURE__ */ A("div", {
767
+ /* @__PURE__ */ M("div", {
768
768
  className: "flex-1 min-w-0 overflow-hidden",
769
- children: /* @__PURE__ */ A(U, {
769
+ children: /* @__PURE__ */ M(U, {
770
770
  mode: "live",
771
771
  analyserNode: t,
772
772
  height: 24,
@@ -781,7 +781,7 @@ at.displayName = "RecordingOverlay";
781
781
  //#endregion
782
782
  //#region src/composed/rich-chat-input/reply-banner.tsx
783
783
  function ot({ author: e, preview: t, onDismiss: n }) {
784
- return /* @__PURE__ */ A(B.div, {
784
+ return /* @__PURE__ */ M(V.div, {
785
785
  initial: {
786
786
  height: 0,
787
787
  opacity: 0
@@ -804,34 +804,34 @@ function ot({ author: e, preview: t, onDismiss: n }) {
804
804
  ]
805
805
  },
806
806
  className: "overflow-hidden",
807
- children: /* @__PURE__ */ j("div", {
807
+ children: /* @__PURE__ */ N("div", {
808
808
  role: "status",
809
809
  "aria-label": `Replying to ${e}`,
810
810
  className: "flex items-center gap-ds-03 border-b border-surface-border px-ds-04 py-ds-02b",
811
- children: [/* @__PURE__ */ j("div", {
811
+ children: [/* @__PURE__ */ N("div", {
812
812
  className: "flex-1 min-w-0",
813
813
  children: [
814
- /* @__PURE__ */ j("span", {
814
+ /* @__PURE__ */ N("span", {
815
815
  className: "text-ds-sm font-semibold text-surface-fg",
816
816
  children: ["Replying to ", e]
817
817
  }),
818
- /* @__PURE__ */ A("span", {
818
+ /* @__PURE__ */ M("span", {
819
819
  className: "mx-ds-02 text-surface-fg-subtle",
820
820
  children: "·"
821
821
  }),
822
- /* @__PURE__ */ A("span", {
822
+ /* @__PURE__ */ M("span", {
823
823
  className: "text-ds-sm text-surface-fg-muted truncate",
824
824
  children: t
825
825
  })
826
826
  ]
827
- }), /* @__PURE__ */ A("button", {
827
+ }), /* @__PURE__ */ M("button", {
828
828
  type: "button",
829
829
  onClick: n,
830
830
  className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", "transition-colors duration-fast-01 ease-productive-standard", "active:scale-95"),
831
831
  "aria-label": "Cancel reply",
832
832
  title: "Cancel reply",
833
- children: /* @__PURE__ */ A(s, {
834
- icon: R,
833
+ children: /* @__PURE__ */ M(s, {
834
+ icon: B,
835
835
  size: "xs"
836
836
  })
837
837
  })]
@@ -899,44 +899,44 @@ function ct({ value: e, onChange: t }) {
899
899
  let r = new Date(e), i = r.getHours();
900
900
  n && i < 12 ? r.setHours(i + 12) : !n && i >= 12 && r.setHours(i - 12), t(r);
901
901
  };
902
- return /* @__PURE__ */ j("div", {
902
+ return /* @__PURE__ */ N("div", {
903
903
  className: "flex items-center gap-ds-02",
904
904
  children: [
905
- /* @__PURE__ */ A("select", {
905
+ /* @__PURE__ */ M("select", {
906
906
  value: n,
907
907
  onChange: (e) => a(Number(e.target.value)),
908
908
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
909
909
  "aria-label": "Hour",
910
- children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ A("option", {
910
+ children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ M("option", {
911
911
  value: e,
912
912
  children: e
913
913
  }, e))
914
914
  }),
915
- /* @__PURE__ */ A("span", {
915
+ /* @__PURE__ */ M("span", {
916
916
  className: "text-ds-sm text-surface-fg-subtle font-medium",
917
917
  children: ":"
918
918
  }),
919
- /* @__PURE__ */ A("select", {
919
+ /* @__PURE__ */ M("select", {
920
920
  value: r - r % 5,
921
921
  onChange: (e) => o(Number(e.target.value)),
922
922
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
923
923
  "aria-label": "Minute",
924
- children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ A("option", {
924
+ children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ M("option", {
925
925
  value: e,
926
926
  children: String(e).padStart(2, "0")
927
927
  }, e))
928
928
  }),
929
- /* @__PURE__ */ j(g, {
929
+ /* @__PURE__ */ N(g, {
930
930
  type: "single",
931
931
  value: i ? "PM" : "AM",
932
932
  onValueChange: (e) => {
933
933
  e === "AM" ? s(!1) : e === "PM" && s(!0);
934
934
  },
935
935
  size: "sm",
936
- children: [/* @__PURE__ */ A(_, {
936
+ children: [/* @__PURE__ */ M(_, {
937
937
  value: "AM",
938
938
  children: "AM"
939
- }), /* @__PURE__ */ A(_, {
939
+ }), /* @__PURE__ */ M(_, {
940
940
  value: "PM",
941
941
  children: "PM"
942
942
  })]
@@ -954,26 +954,26 @@ function lt({ value: e, onChange: t, minDate: n }) {
954
954
  let r = new Date(i);
955
955
  r.setFullYear(Number(n[0]), Number(n[1]) - 1, Number(n[2])), t(r);
956
956
  }, s = n ? `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, "0")}-${String(n.getDate()).padStart(2, "0")}` : void 0;
957
- return /* @__PURE__ */ j("div", {
957
+ return /* @__PURE__ */ N("div", {
958
958
  className: "space-y-ds-03",
959
- children: [/* @__PURE__ */ j("div", {
959
+ children: [/* @__PURE__ */ N("div", {
960
960
  className: "flex items-center justify-between",
961
- children: [/* @__PURE__ */ A("span", {
961
+ children: [/* @__PURE__ */ M("span", {
962
962
  className: "text-ds-xs font-medium text-surface-fg-subtle",
963
963
  children: "Date"
964
- }), /* @__PURE__ */ A("input", {
964
+ }), /* @__PURE__ */ M("input", {
965
965
  type: "date",
966
966
  value: a,
967
967
  min: s,
968
968
  onChange: o,
969
969
  className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-03 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9"
970
970
  })]
971
- }), /* @__PURE__ */ j("div", {
971
+ }), /* @__PURE__ */ N("div", {
972
972
  className: "flex items-center justify-between",
973
- children: [/* @__PURE__ */ A("span", {
973
+ children: [/* @__PURE__ */ M("span", {
974
974
  className: "text-ds-xs font-medium text-surface-fg-subtle",
975
975
  children: "Time"
976
- }), /* @__PURE__ */ A(ct, {
976
+ }), /* @__PURE__ */ M(ct, {
977
977
  value: i,
978
978
  onChange: t
979
979
  })]
@@ -984,10 +984,10 @@ function X({ value: e, onChange: t, minDate: n }) {
984
984
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
985
985
  let e = new Date(r);
986
986
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
987
- })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = fe(i);
988
- return /* @__PURE__ */ j("div", {
987
+ })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = ue(i);
988
+ return /* @__PURE__ */ N("div", {
989
989
  className: "space-y-ds-03",
990
- children: [/* @__PURE__ */ A(T, {
990
+ children: [/* @__PURE__ */ M(D, {
991
991
  currentMonth: a,
992
992
  selected: i,
993
993
  onSelect: (e) => {
@@ -999,12 +999,12 @@ function X({ value: e, onChange: t, minDate: n }) {
999
999
  },
1000
1000
  minDate: n,
1001
1001
  className: "w-full"
1002
- }), /* @__PURE__ */ j("div", {
1002
+ }), /* @__PURE__ */ N("div", {
1003
1003
  className: "flex items-center justify-between border-t border-surface-border pt-ds-03",
1004
- children: [/* @__PURE__ */ A("span", {
1004
+ children: [/* @__PURE__ */ M("span", {
1005
1005
  className: "text-ds-xs font-medium text-surface-fg-subtle",
1006
1006
  children: "Time"
1007
- }), /* @__PURE__ */ A(ct, {
1007
+ }), /* @__PURE__ */ M(ct, {
1008
1008
  value: i,
1009
1009
  onChange: t
1010
1010
  })]
@@ -1012,37 +1012,37 @@ function X({ value: e, onChange: t, minDate: n }) {
1012
1012
  });
1013
1013
  }
1014
1014
  function ut({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1015
- let [r, i] = E.useState(!1), [a, o] = E.useState(null), c = E.useMemo(() => st(), []), u = (n) => {
1015
+ let [r, i] = O.useState(!1), [a, o] = O.useState(null), c = O.useMemo(() => st(), []), u = (n) => {
1016
1016
  e(n), t();
1017
1017
  };
1018
- return r ? /* @__PURE__ */ j("div", {
1018
+ return r ? /* @__PURE__ */ N("div", {
1019
1019
  className: "p-ds-04",
1020
1020
  style: { minWidth: 270 },
1021
1021
  children: [
1022
- /* @__PURE__ */ j("div", {
1022
+ /* @__PURE__ */ N("div", {
1023
1023
  className: "mb-ds-03 flex items-center justify-between",
1024
- children: [/* @__PURE__ */ A("p", {
1024
+ children: [/* @__PURE__ */ M("p", {
1025
1025
  className: "text-ds-sm font-medium text-surface-fg",
1026
1026
  children: "Pick date & time"
1027
- }), /* @__PURE__ */ A(l, {
1027
+ }), /* @__PURE__ */ M(l, {
1028
1028
  variant: "ghost",
1029
1029
  size: "icon-xs",
1030
1030
  onClick: () => i(!1),
1031
1031
  "aria-label": "Back to presets",
1032
- children: /* @__PURE__ */ A(s, {
1033
- icon: R,
1032
+ children: /* @__PURE__ */ M(s, {
1033
+ icon: B,
1034
1034
  size: "sm"
1035
1035
  })
1036
1036
  })]
1037
1037
  }),
1038
- /* @__PURE__ */ A(lt, {
1038
+ /* @__PURE__ */ M(lt, {
1039
1039
  value: a,
1040
1040
  onChange: o,
1041
1041
  minDate: /* @__PURE__ */ new Date()
1042
1042
  }),
1043
- /* @__PURE__ */ A("div", {
1043
+ /* @__PURE__ */ M("div", {
1044
1044
  className: "mt-ds-03 flex justify-end",
1045
- children: /* @__PURE__ */ A(l, {
1045
+ children: /* @__PURE__ */ M(l, {
1046
1046
  variant: "solid",
1047
1047
  size: "sm",
1048
1048
  onClick: () => {
@@ -1053,43 +1053,43 @@ function ut({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1053
1053
  })
1054
1054
  })
1055
1055
  ]
1056
- }) : /* @__PURE__ */ j("div", {
1056
+ }) : /* @__PURE__ */ N("div", {
1057
1057
  className: "p-ds-02",
1058
1058
  style: { minWidth: 260 },
1059
1059
  children: [
1060
- /* @__PURE__ */ A("p", {
1060
+ /* @__PURE__ */ M("p", {
1061
1061
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
1062
1062
  children: "Schedule send"
1063
1063
  }),
1064
- c.map((e, t) => /* @__PURE__ */ j(l, {
1064
+ c.map((e, t) => /* @__PURE__ */ N(l, {
1065
1065
  variant: "ghost",
1066
1066
  fullWidth: !0,
1067
1067
  onClick: () => u(e.date),
1068
- children: [/* @__PURE__ */ A(s, {
1069
- icon: be,
1068
+ children: [/* @__PURE__ */ M(s, {
1069
+ icon: ve,
1070
1070
  size: "sm",
1071
1071
  className: "shrink-0 text-surface-fg-muted"
1072
1072
  }), e.label]
1073
1073
  }, t)),
1074
- /* @__PURE__ */ A("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
1075
- /* @__PURE__ */ j(l, {
1074
+ /* @__PURE__ */ M("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
1075
+ /* @__PURE__ */ N(l, {
1076
1076
  variant: "ghost",
1077
1077
  fullWidth: !0,
1078
1078
  onClick: () => i(!0),
1079
- children: [/* @__PURE__ */ A(s, {
1080
- icon: ve,
1079
+ children: [/* @__PURE__ */ M(s, {
1080
+ icon: ge,
1081
1081
  size: "sm",
1082
1082
  className: "shrink-0 text-accent-11"
1083
1083
  }), "Pick date & time..."]
1084
1084
  }),
1085
- n && /* @__PURE__ */ j(l, {
1085
+ n && /* @__PURE__ */ N(l, {
1086
1086
  variant: "ghost",
1087
1087
  fullWidth: !0,
1088
1088
  onClick: () => {
1089
1089
  n(), t();
1090
1090
  },
1091
- children: [/* @__PURE__ */ A(s, {
1092
- icon: ve,
1091
+ children: [/* @__PURE__ */ M(s, {
1092
+ icon: ge,
1093
1093
  size: "sm",
1094
1094
  className: "shrink-0 text-surface-fg-muted"
1095
1095
  }), "Open full picker..."]
@@ -1098,28 +1098,28 @@ function ut({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1098
1098
  });
1099
1099
  }
1100
1100
  function dt({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1101
- let [i, a] = E.useState(r ?? null);
1102
- return E.useEffect(() => {
1101
+ let [i, a] = O.useState(r ?? null);
1102
+ return O.useEffect(() => {
1103
1103
  e && a(r ?? null);
1104
- }, [e, r]), /* @__PURE__ */ A(u, {
1104
+ }, [e, r]), /* @__PURE__ */ M(u, {
1105
1105
  open: e,
1106
1106
  onOpenChange: t,
1107
- children: /* @__PURE__ */ j(d, {
1107
+ children: /* @__PURE__ */ N(d, {
1108
1108
  className: "sm:max-w-[380px]",
1109
1109
  children: [
1110
- /* @__PURE__ */ A(p, { children: /* @__PURE__ */ A(m, { children: r ? "Reschedule message" : "Schedule send" }) }),
1111
- /* @__PURE__ */ A(X, {
1110
+ /* @__PURE__ */ M(p, { children: /* @__PURE__ */ M(m, { children: r ? "Reschedule message" : "Schedule send" }) }),
1111
+ /* @__PURE__ */ M(X, {
1112
1112
  value: i,
1113
1113
  onChange: a,
1114
1114
  minDate: /* @__PURE__ */ new Date()
1115
1115
  }),
1116
- /* @__PURE__ */ j(f, {
1116
+ /* @__PURE__ */ N(f, {
1117
1117
  className: "gap-ds-02",
1118
- children: [/* @__PURE__ */ A(l, {
1118
+ children: [/* @__PURE__ */ M(l, {
1119
1119
  variant: "soft",
1120
1120
  onClick: () => t(!1),
1121
1121
  children: "Cancel"
1122
- }), /* @__PURE__ */ A(l, {
1122
+ }), /* @__PURE__ */ M(l, {
1123
1123
  variant: "solid",
1124
1124
  onClick: () => {
1125
1125
  i && i > /* @__PURE__ */ new Date() && (n(i), t(!1));
@@ -1146,7 +1146,7 @@ function ft(e) {
1146
1146
  })} at ${a}`;
1147
1147
  }
1148
1148
  function pt({ date: e, onClear: t, onEdit: n }) {
1149
- return /* @__PURE__ */ A(B.div, {
1149
+ return /* @__PURE__ */ M(V.div, {
1150
1150
  initial: {
1151
1151
  height: 0,
1152
1152
  opacity: 0
@@ -1161,37 +1161,37 @@ function pt({ date: e, onClear: t, onEdit: n }) {
1161
1161
  },
1162
1162
  transition: { duration: i.moderate01 },
1163
1163
  className: "overflow-hidden",
1164
- children: /* @__PURE__ */ j("div", {
1164
+ children: /* @__PURE__ */ N("div", {
1165
1165
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b text-ds-xs text-accent-11 bg-accent-2 border-b border-accent-4",
1166
1166
  children: [
1167
- /* @__PURE__ */ A(s, {
1168
- icon: be,
1167
+ /* @__PURE__ */ M(s, {
1168
+ icon: ve,
1169
1169
  size: "xs",
1170
1170
  className: "shrink-0"
1171
1171
  }),
1172
- /* @__PURE__ */ j("span", {
1172
+ /* @__PURE__ */ N("span", {
1173
1173
  className: "min-w-0 flex-1 truncate",
1174
1174
  children: ["Scheduled for ", ft(e)]
1175
1175
  }),
1176
- n && /* @__PURE__ */ A(l, {
1176
+ n && /* @__PURE__ */ M(l, {
1177
1177
  variant: "soft",
1178
1178
  size: "icon-xs",
1179
1179
  className: "shrink-0",
1180
1180
  onClick: n,
1181
1181
  "aria-label": "Edit schedule",
1182
- children: /* @__PURE__ */ A(s, {
1183
- icon: ke,
1182
+ children: /* @__PURE__ */ M(s, {
1183
+ icon: De,
1184
1184
  size: "xs"
1185
1185
  })
1186
1186
  }),
1187
- /* @__PURE__ */ A(l, {
1187
+ /* @__PURE__ */ M(l, {
1188
1188
  variant: "soft",
1189
1189
  size: "icon-xs",
1190
1190
  className: "shrink-0",
1191
1191
  onClick: t,
1192
1192
  "aria-label": "Cancel schedule",
1193
- children: /* @__PURE__ */ A(s, {
1194
- icon: R,
1193
+ children: /* @__PURE__ */ M(s, {
1194
+ icon: B,
1195
1195
  size: "xs"
1196
1196
  })
1197
1197
  })
@@ -1205,11 +1205,11 @@ function Z() {
1205
1205
  return typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/mp4") ? "audio/mp4" : "";
1206
1206
  }
1207
1207
  function mt(e) {
1208
- let { maxDuration: t, onComplete: n } = e, [r, i] = k("idle"), [a, o] = k(0), [s, c] = k(null), [l, u] = k([]), d = O(null), f = O(null), p = O(null), m = O([]), h = O(null), g = O(null), _ = O(null), v = O(null), y = O(0), b = O([]), x = O(!1), ee = O(n);
1208
+ let { maxDuration: t, onComplete: n } = e, [r, i] = j("idle"), [a, o] = j(0), [s, c] = j(null), [l, u] = j([]), d = A(null), f = A(null), p = A(null), m = A([]), h = A(null), g = A(null), _ = A(null), v = A(null), y = A(0), b = A([]), x = A(!1), ee = A(n);
1209
1209
  ee.current = n;
1210
- let S = D(() => {
1210
+ let S = k(() => {
1211
1211
  h.current !== null && (clearInterval(h.current), h.current = null), g.current !== null && (clearInterval(g.current), g.current = null), _.current !== null && (clearTimeout(_.current), _.current = null), p.current &&= (p.current.getTracks().forEach((e) => e.stop()), null), f.current &&= (f.current.close().catch(() => {}), null), v.current = null, c(null), d.current = null, m.current = [];
1212
- }, []), C = D(async () => {
1212
+ }, []), C = k(async () => {
1213
1213
  if (typeof MediaRecorder > "u") throw Error("MediaRecorder is not supported in this browser. Voice recording requires a modern browser with MediaRecorder support.");
1214
1214
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
1215
1215
  p.current = e;
@@ -1241,13 +1241,13 @@ function mt(e) {
1241
1241
  }, 100), t !== void 0 && t > 0 && (_.current = setTimeout(() => {
1242
1242
  d.current && d.current.state !== "inactive" && d.current.stop();
1243
1243
  }, t * 1e3)), i("recording");
1244
- }, [t, S]), te = D(() => {
1244
+ }, [t, S]), w = k(() => {
1245
1245
  d.current && d.current.state !== "inactive" && (x.current = !1, d.current.stop());
1246
- }, []), ne = D(() => {
1246
+ }, []), te = k(() => {
1247
1247
  d.current && d.current.state !== "inactive" ? (x.current = !0, d.current.stop()) : (S(), i("idle"), o(0), u([]));
1248
- }, [S]), w = D(() => {
1248
+ }, [S]), ne = k(() => {
1249
1249
  d.current && d.current.state === "recording" && (d.current.pause(), h.current !== null && (clearInterval(h.current), h.current = null), g.current !== null && (clearInterval(g.current), g.current = null), i("paused"));
1250
- }, []), re = D(() => {
1250
+ }, []), T = k(() => {
1251
1251
  if (d.current && d.current.state === "paused") {
1252
1252
  d.current.resume(), h.current = setInterval(() => {
1253
1253
  y.current += 1, o((e) => e + 1);
@@ -1264,7 +1264,7 @@ function mt(e) {
1264
1264
  }, 100), i("recording");
1265
1265
  }
1266
1266
  }, []);
1267
- return pe(() => () => {
1267
+ return de(() => () => {
1268
1268
  h.current !== null && clearInterval(h.current), g.current !== null && clearInterval(g.current), _.current !== null && clearTimeout(_.current), d.current && d.current.state !== "inactive" && d.current.stop(), p.current && p.current.getTracks().forEach((e) => e.stop()), f.current && f.current.close().catch(() => {});
1269
1269
  }, []), {
1270
1270
  state: r,
@@ -1272,10 +1272,10 @@ function mt(e) {
1272
1272
  analyserNode: s,
1273
1273
  waveformData: l,
1274
1274
  start: C,
1275
- stop: te,
1276
- cancel: ne,
1277
- pause: w,
1278
- resume: re
1275
+ stop: w,
1276
+ cancel: te,
1277
+ pause: ne,
1278
+ resume: T
1279
1279
  };
1280
1280
  }
1281
1281
  //#endregion
@@ -1321,74 +1321,74 @@ var ht = {
1321
1321
  y
1322
1322
  ].join(" ");
1323
1323
  function _t({ options: e }) {
1324
- let [t, n] = E.useState(!1), r = E.useRef(null);
1325
- return E.useEffect(() => {
1324
+ let [t, n] = O.useState(!1), r = O.useRef(null);
1325
+ return O.useEffect(() => {
1326
1326
  if (!t) return;
1327
1327
  let e = (e) => {
1328
1328
  r.current && !r.current.contains(e.target) && n(!1);
1329
1329
  };
1330
1330
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1331
- }, [t]), /* @__PURE__ */ j("div", {
1331
+ }, [t]), /* @__PURE__ */ N("div", {
1332
1332
  ref: r,
1333
1333
  className: "relative",
1334
- children: [/* @__PURE__ */ A("button", {
1334
+ children: [/* @__PURE__ */ M("button", {
1335
1335
  type: "button",
1336
1336
  onClick: () => n((e) => !e),
1337
1337
  title: "More send options",
1338
1338
  "aria-label": "More send options",
1339
1339
  "aria-expanded": t,
1340
1340
  className: a("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg", "transition-colors duration-fast-01 ease-productive-standard", t && "bg-surface-raised-hover text-surface-fg"),
1341
- children: /* @__PURE__ */ A(s, {
1342
- icon: ye,
1341
+ children: /* @__PURE__ */ M(s, {
1342
+ icon: _e,
1343
1343
  size: "xs"
1344
1344
  })
1345
- }), t && /* @__PURE__ */ j("div", {
1345
+ }), t && /* @__PURE__ */ N("div", {
1346
1346
  className: "absolute bottom-full right-0 mb-ds-02 min-w-[200px] rounded-surface bg-surface-overlay p-ds-02 shadow-floating z-popover",
1347
- children: [/* @__PURE__ */ A("p", {
1347
+ children: [/* @__PURE__ */ M("p", {
1348
1348
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
1349
1349
  children: "Send options"
1350
- }), e.map((e, t) => /* @__PURE__ */ j("button", {
1350
+ }), e.map((e, t) => /* @__PURE__ */ N("button", {
1351
1351
  type: "button",
1352
1352
  onClick: () => {
1353
1353
  e.onSelect(), n(!1);
1354
1354
  },
1355
1355
  className: "flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
1356
- children: [e.icon && /* @__PURE__ */ A(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1356
+ children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1357
1357
  }, t))]
1358
1358
  })]
1359
1359
  });
1360
1360
  }
1361
- var vt = E.lazy(() => import("./emoji-picker.js").then((e) => ({ default: e.EmojiPicker })));
1361
+ var vt = O.lazy(() => import("./emoji-picker.js").then((e) => ({ default: e.EmojiPicker })));
1362
1362
  function yt({ onSelect: e, onClose: t }) {
1363
- let n = E.useRef(null);
1364
- E.useEffect(() => {
1363
+ let n = O.useRef(null);
1364
+ O.useEffect(() => {
1365
1365
  let e = (e) => {
1366
1366
  n.current && !n.current.contains(e.target) && t();
1367
1367
  };
1368
1368
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1369
- }, [t]), E.useEffect(() => {
1369
+ }, [t]), O.useEffect(() => {
1370
1370
  let e = (e) => {
1371
1371
  e.key === "Escape" && t();
1372
1372
  };
1373
1373
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1374
1374
  }, [t]);
1375
- let r = /* @__PURE__ */ A("div", {
1375
+ let r = /* @__PURE__ */ M("div", {
1376
1376
  className: "flex h-[435px] w-[352px] items-center justify-center rounded-surface bg-surface-overlay shadow-floating",
1377
- children: /* @__PURE__ */ A("span", {
1377
+ children: /* @__PURE__ */ M("span", {
1378
1378
  className: "text-ds-sm text-surface-fg-subtle",
1379
1379
  children: "Loading…"
1380
1380
  })
1381
1381
  });
1382
- return /* @__PURE__ */ A("div", {
1382
+ return /* @__PURE__ */ M("div", {
1383
1383
  ref: n,
1384
- children: /* @__PURE__ */ A(E.Suspense, {
1384
+ children: /* @__PURE__ */ M(O.Suspense, {
1385
1385
  fallback: r,
1386
- children: /* @__PURE__ */ A(vt, { onSelect: e })
1386
+ children: /* @__PURE__ */ M(vt, { onSelect: e })
1387
1387
  })
1388
1388
  });
1389
1389
  }
1390
1390
  function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1391
- return /* @__PURE__ */ A("button", {
1391
+ return /* @__PURE__ */ M("button", {
1392
1392
  type: "button",
1393
1393
  onClick: e,
1394
1394
  title: n,
@@ -1399,7 +1399,7 @@ function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1399
1399
  });
1400
1400
  }
1401
1401
  function bt({ editor: e }) {
1402
- let t = w({
1402
+ let t = E({
1403
1403
  editor: e,
1404
1404
  selector: ({ editor: e }) => ({
1405
1405
  isBold: e.isActive("bold"),
@@ -1410,77 +1410,77 @@ function bt({ editor: e }) {
1410
1410
  isCode: e.isActive("code")
1411
1411
  })
1412
1412
  });
1413
- return /* @__PURE__ */ j(ne, {
1413
+ return /* @__PURE__ */ N(b, {
1414
1414
  editor: e,
1415
1415
  className: "flex gap-ds-01 rounded-surface bg-surface-overlay p-ds-02 shadow-floating",
1416
1416
  children: [
1417
- /* @__PURE__ */ A(Q, {
1417
+ /* @__PURE__ */ M(Q, {
1418
1418
  onClick: () => e.chain().focus().toggleBold().run(),
1419
1419
  isActive: t.isBold,
1420
1420
  title: "Bold",
1421
- children: /* @__PURE__ */ A(s, {
1422
- icon: _e,
1421
+ children: /* @__PURE__ */ M(s, {
1422
+ icon: he,
1423
1423
  size: "xs"
1424
1424
  })
1425
1425
  }),
1426
- /* @__PURE__ */ A(Q, {
1426
+ /* @__PURE__ */ M(Q, {
1427
1427
  onClick: () => e.chain().focus().toggleItalic().run(),
1428
1428
  isActive: t.isItalic,
1429
1429
  title: "Italic",
1430
- children: /* @__PURE__ */ A(s, {
1431
- icon: Ce,
1430
+ children: /* @__PURE__ */ M(s, {
1431
+ icon: xe,
1432
1432
  size: "xs"
1433
1433
  })
1434
1434
  }),
1435
- /* @__PURE__ */ A(Q, {
1435
+ /* @__PURE__ */ M(Q, {
1436
1436
  onClick: () => e.chain().focus().toggleUnderline().run(),
1437
1437
  isActive: t.isUnderline,
1438
1438
  title: "Underline",
1439
- children: /* @__PURE__ */ A(s, {
1440
- icon: L,
1439
+ children: /* @__PURE__ */ M(s, {
1440
+ icon: z,
1441
1441
  size: "xs"
1442
1442
  })
1443
1443
  }),
1444
- /* @__PURE__ */ A(Q, {
1444
+ /* @__PURE__ */ M(Q, {
1445
1445
  onClick: () => e.chain().focus().toggleStrike().run(),
1446
1446
  isActive: t.isStrike,
1447
1447
  title: "Strikethrough",
1448
- children: /* @__PURE__ */ A(s, {
1449
- icon: Ne,
1448
+ children: /* @__PURE__ */ M(s, {
1449
+ icon: je,
1450
1450
  size: "xs"
1451
1451
  })
1452
1452
  }),
1453
- /* @__PURE__ */ A(Q, {
1453
+ /* @__PURE__ */ M(Q, {
1454
1454
  onClick: () => e.chain().focus().toggleHighlight().run(),
1455
1455
  isActive: t.isHighlight,
1456
1456
  title: "Highlight",
1457
- children: /* @__PURE__ */ A(s, {
1458
- icon: N,
1457
+ children: /* @__PURE__ */ M(s, {
1458
+ icon: F,
1459
1459
  size: "xs"
1460
1460
  })
1461
1461
  }),
1462
- /* @__PURE__ */ A(Q, {
1462
+ /* @__PURE__ */ M(Q, {
1463
1463
  onClick: () => e.chain().focus().toggleCode().run(),
1464
1464
  isActive: t.isCode,
1465
1465
  title: "Code",
1466
- children: /* @__PURE__ */ A(s, {
1467
- icon: xe,
1466
+ children: /* @__PURE__ */ M(s, {
1467
+ icon: ye,
1468
1468
  size: "xs"
1469
1469
  })
1470
1470
  })
1471
1471
  ]
1472
1472
  });
1473
1473
  }
1474
- var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message...", disabled: d = !1, content: f = "", variant: p = "compact", enterBehavior: m = "send", maxLength: g, charCountDisplay: _ = "near-limit", mentions: v, onMentionSearch: y, onMentionSelect: ne, onFileUpload: ae, onImageUpload: se, slashCommands: T, onVoiceRecord: fe, onTranscribe: D, maxDuration: pe, replyTo: O, onTyping: k, onEmpty: me, isStreaming: M = !1, onCancel: ge, leadingSlot: _e, trailingSlot: ve, disclaimer: ye, toolbar: xe = !0, sendOptions: Se, onSchedule: N, actionButton: Ce, emojiSet: we = "native", className: Te, ...Ee }, ke) {
1475
- let [P, F] = E.useState("idle"), [I, Ne] = E.useState(!1), [L, R] = E.useState(!1), [V, H] = E.useState(null), [Ie, Le] = E.useState(!1), [ze, U] = E.useState(!1), [Ve, He] = E.useState(0), We = E.useRef(null), W = E.useRef(null);
1476
- E.useEffect(() => {
1477
- if (!L || !We.current || !W.current) return;
1474
+ var xt = O.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message...", disabled: d = !1, content: f = "", variant: p = "compact", enterBehavior: m = "send", maxLength: g, charCountDisplay: _ = "near-limit", mentions: v, onMentionSearch: y, onMentionSelect: b, onFileUpload: w, onImageUpload: T, slashCommands: D, onVoiceRecord: ue, onTranscribe: k, maxDuration: de, replyTo: A, onTyping: j, onEmpty: fe, isStreaming: P = !1, onCancel: me, leadingSlot: he, trailingSlot: ge, disclaimer: _e, toolbar: ye = !0, sendOptions: be, onSchedule: F, actionButton: xe, emojiSet: Se = "native", className: Ce, ...we }, De) {
1475
+ let [I, L] = O.useState("idle"), [R, je] = O.useState(!1), [z, B] = O.useState(!1), [H, Fe] = O.useState(null), [Ie, Le] = O.useState(!1), [ze, U] = O.useState(!1), [Ve, He] = O.useState(0), We = O.useRef(null), W = O.useRef(null);
1476
+ O.useEffect(() => {
1477
+ if (!z || !We.current || !W.current) return;
1478
1478
  let i = We.current, a = W.current, o = () => {
1479
1479
  e(i, a, {
1480
1480
  placement: "top-end",
1481
1481
  middleware: [
1482
- t(8),
1483
- n(),
1482
+ n(8),
1483
+ t(),
1484
1484
  r({ padding: 8 })
1485
1485
  ]
1486
1486
  }).then(({ x: e, y: t }) => {
@@ -1493,22 +1493,22 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1493
1493
  return o(), window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
1494
1494
  window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
1495
1495
  };
1496
- }, [L]);
1497
- let [G, K] = E.useState([]), [q, Ge] = E.useState(null), [Ke, qe] = E.useState(!1), Je = E.useRef(null), Ye = E.useRef(null), Xe = E.useRef(void 0), Ze = E.useRef(void 0), Qe = E.useRef(m);
1496
+ }, [z]);
1497
+ let [G, K] = O.useState([]), [q, Ge] = O.useState(null), [Ke, qe] = O.useState(!1), Je = O.useRef(null), Ye = O.useRef(null), Xe = O.useRef(void 0), Ze = O.useRef(void 0), Qe = O.useRef(m);
1498
1498
  Qe.current = m;
1499
- let $e = E.useRef(ne);
1500
- $e.current = ne;
1501
- let et = E.useRef(v);
1499
+ let $e = O.useRef(b);
1500
+ $e.current = b;
1501
+ let et = O.useRef(v);
1502
1502
  et.current = v;
1503
- let tt = E.useRef(y);
1503
+ let tt = O.useRef(y);
1504
1504
  tt.current = y;
1505
1505
  let nt = c(), J = ht[p], rt = J.maxHeight, Y = mt({
1506
- maxDuration: pe,
1506
+ maxDuration: de,
1507
1507
  onComplete: async (e, t, n) => {
1508
- if (fe?.(e, t), D) {
1509
- let n = await D(e, t);
1508
+ if (ue?.(e, t), k) {
1509
+ let n = await k(e, t);
1510
1510
  if (n != null) {
1511
- X?.chain().focus().insertContent(n).run(), F("idle");
1511
+ X?.chain().focus().insertContent(n).run(), L("idle");
1512
1512
  return;
1513
1513
  }
1514
1514
  }
@@ -1516,19 +1516,19 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1516
1516
  blob: e,
1517
1517
  duration: t,
1518
1518
  waveformData: n
1519
- }), F("review");
1519
+ }), L("review");
1520
1520
  }
1521
- }), st = E.useCallback(() => {
1522
- Y.start(), F("recording");
1523
- }, [Y]), ct = E.useCallback(() => {
1521
+ }), st = O.useCallback(() => {
1522
+ Y.start(), L("recording");
1523
+ }, [Y]), ct = O.useCallback(() => {
1524
1524
  Y.stop();
1525
- }, [Y]), lt = E.useCallback(() => {
1526
- Y.cancel(), F("idle");
1527
- }, [Y]), X = x({
1525
+ }, [Y]), lt = O.useCallback(() => {
1526
+ Y.cancel(), L("idle");
1527
+ }, [Y]), X = ae({
1528
1528
  immediatelyRender: !1,
1529
- extensions: E.useMemo(() => {
1529
+ extensions: O.useMemo(() => {
1530
1530
  let e = [
1531
- ie.configure({
1531
+ te.configure({
1532
1532
  heading: !1,
1533
1533
  horizontalRule: !1,
1534
1534
  codeBlock: !1,
@@ -1538,14 +1538,14 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1538
1538
  HTMLAttributes: { class: "text-accent-11 underline" }
1539
1539
  }
1540
1540
  }),
1541
- ee.configure({ placeholder: u }),
1542
- te.configure({ multicolor: !1 }),
1541
+ C.configure({ placeholder: u }),
1542
+ ie.configure({ multicolor: !1 }),
1543
1543
  re,
1544
- oe.configure({ limit: g || void 0 }),
1545
- ue,
1544
+ x.configure({ limit: g || void 0 }),
1546
1545
  ce,
1547
- le(),
1548
- C.create({
1546
+ oe,
1547
+ se(),
1548
+ S.create({
1549
1549
  name: "enterToSend",
1550
1550
  addKeyboardShortcuts() {
1551
1551
  return {
@@ -1556,7 +1556,7 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1556
1556
  }
1557
1557
  })
1558
1558
  ];
1559
- return (v || y) && e.push(S.configure({
1559
+ return (v || y) && e.push(ne.configure({
1560
1560
  HTMLAttributes: { class: "mention" },
1561
1561
  suggestion: {
1562
1562
  items: async ({ query: e }) => {
@@ -1564,16 +1564,16 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1564
1564
  let t = et.current;
1565
1565
  return t ? t.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [];
1566
1566
  },
1567
- render: de((e) => $e.current?.(e))
1567
+ render: le((e) => $e.current?.(e))
1568
1568
  }
1569
- })), T && e.push(Re(T)), e;
1569
+ })), D && e.push(Re(D)), e;
1570
1570
  }, [
1571
1571
  u,
1572
1572
  g,
1573
- we,
1573
+ Se,
1574
1574
  !!v,
1575
1575
  !!y,
1576
- !!T
1576
+ !!D
1577
1577
  ]),
1578
1578
  content: f || void 0,
1579
1579
  editable: !d,
@@ -1584,10 +1584,10 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1584
1584
  return n.length > 0 ? (n.forEach(Z), !0) : !1;
1585
1585
  }
1586
1586
  }
1587
- }), ft = E.useCallback(() => {
1587
+ }), ft = O.useCallback(() => {
1588
1588
  if (!X) return;
1589
1589
  let e = !X.isEmpty, t = G.length > 0, n = !!q;
1590
- if (!e && !t && !n || M) return;
1590
+ if (!e && !t && !n || P) return;
1591
1591
  let r = {
1592
1592
  html: e ? X.getHTML() : "",
1593
1593
  plainText: e ? X.getText() : ""
@@ -1600,34 +1600,34 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1600
1600
  }))), n && (r.voiceNote = {
1601
1601
  blob: q.blob,
1602
1602
  duration: q.duration
1603
- }), V && N ? N(r, V) : o(r), X.commands.clearContent(), K([]), Ge(null), H(null), F("idle");
1603
+ }), H && F ? F(r, H) : o(r), X.commands.clearContent(), K([]), Ge(null), Fe(null), L("idle");
1604
1604
  }, [
1605
1605
  X,
1606
1606
  G,
1607
1607
  q,
1608
- M,
1608
+ P,
1609
1609
  o,
1610
- N,
1611
- V
1610
+ F,
1611
+ H
1612
1612
  ]);
1613
- Ze.current = ft, E.useEffect(() => {
1614
- if (!X || !k) return;
1613
+ Ze.current = ft, O.useEffect(() => {
1614
+ if (!X || !j) return;
1615
1615
  let e = () => {
1616
- k(!0), clearTimeout(Xe.current), Xe.current = setTimeout(() => k(!1), 2e3);
1616
+ j(!0), clearTimeout(Xe.current), Xe.current = setTimeout(() => j(!1), 2e3);
1617
1617
  };
1618
1618
  return X.on("update", e), () => {
1619
1619
  X.off("update", e), clearTimeout(Xe.current);
1620
1620
  };
1621
- }, [X, k]), E.useEffect(() => {
1622
- if (!X || !me) return;
1621
+ }, [X, j]), O.useEffect(() => {
1622
+ if (!X || !fe) return;
1623
1623
  let e = () => {
1624
- me(X.isEmpty);
1624
+ fe(X.isEmpty);
1625
1625
  };
1626
1626
  return X.on("update", e), e(), () => {
1627
1627
  X.off("update", e);
1628
1628
  };
1629
- }, [X, me]);
1630
- let Z = E.useCallback(async (e) => {
1629
+ }, [X, fe]);
1630
+ let Z = O.useCallback(async (e) => {
1631
1631
  let t = Math.random().toString(36).slice(2), n = e.type.startsWith("image/");
1632
1632
  K((r) => [...r, {
1633
1633
  id: t,
@@ -1637,15 +1637,15 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1637
1637
  uploading: !0
1638
1638
  }]);
1639
1639
  try {
1640
- if (n && se) {
1641
- let n = await se(e);
1640
+ if (n && T) {
1641
+ let n = await T(e);
1642
1642
  K((e) => e.map((e) => e.id === t ? {
1643
1643
  ...e,
1644
1644
  url: n,
1645
1645
  uploading: !1
1646
1646
  } : e));
1647
- } else if (ae) {
1648
- let n = await ae(e);
1647
+ } else if (w) {
1648
+ let n = await w(e);
1649
1649
  K((e) => e.map((e) => e.id === t ? {
1650
1650
  ...e,
1651
1651
  url: n.url,
@@ -1664,19 +1664,19 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1664
1664
  } catch {
1665
1665
  K((e) => e.filter((e) => e.id !== t));
1666
1666
  }
1667
- }, [ae, se]), vt = E.useCallback((e) => {
1667
+ }, [w, T]), vt = O.useCallback((e) => {
1668
1668
  K((t) => t.filter((t) => t.id !== e));
1669
- }, []), Q = E.useCallback((e) => {
1669
+ }, []), Q = O.useCallback((e) => {
1670
1670
  e.preventDefault(), qe(!1), Array.from(e.dataTransfer.files).forEach(Z);
1671
- }, [Z]), xt = E.useCallback((e) => {
1671
+ }, [Z]), xt = O.useCallback((e) => {
1672
1672
  Array.from(e.target.files || []).forEach(Z), e.target.value = "";
1673
- }, [Z]), St = E.useCallback(() => {
1674
- Ge(null), F("idle");
1675
- }, []), Ct = w({
1673
+ }, [Z]), St = O.useCallback(() => {
1674
+ Ge(null), L("idle");
1675
+ }, []), Ct = E({
1676
1676
  editor: X,
1677
1677
  selector: ({ editor: e }) => e ? { editorIsEmpty: e.isEmpty } : null
1678
1678
  })?.editorIsEmpty ?? !0;
1679
- E.useEffect(() => {
1679
+ O.useEffect(() => {
1680
1680
  if (!X) return;
1681
1681
  let e = () => {
1682
1682
  He(X.state.doc.textBetween(0, X.state.doc.content.size, void 0, " ").length);
@@ -1685,28 +1685,28 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1685
1685
  X.off("update", e);
1686
1686
  };
1687
1687
  }, [X]);
1688
- let wt = !Ct || G.length > 0 || !!q, Tt = I || P === "review" || p === "expanded", $ = "icon-md";
1689
- return /* @__PURE__ */ j("div", {
1690
- ref: ke,
1691
- className: a("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", Te),
1692
- ...Ee,
1688
+ let wt = !Ct || G.length > 0 || !!q, Tt = R || I === "review" || p === "expanded", $ = "icon-md";
1689
+ return /* @__PURE__ */ N("div", {
1690
+ ref: De,
1691
+ className: a("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", Ce),
1692
+ ...we,
1693
1693
  children: [
1694
- Ce !== !1 && (Ce ?? (ae || se ? /* @__PURE__ */ A(l, {
1694
+ xe !== !1 && (xe ?? (w || T ? /* @__PURE__ */ M(l, {
1695
1695
  variant: "solid",
1696
1696
  size: "icon-md",
1697
1697
  onClick: () => Je.current?.click(),
1698
1698
  title: "Attach",
1699
1699
  "aria-label": "Attach file",
1700
1700
  className: "shrink-0",
1701
- children: /* @__PURE__ */ A(s, {
1702
- icon: Ae,
1701
+ children: /* @__PURE__ */ M(s, {
1702
+ icon: Oe,
1703
1703
  size: "md"
1704
1704
  })
1705
1705
  }) : null)),
1706
- /* @__PURE__ */ j("div", {
1706
+ /* @__PURE__ */ N("div", {
1707
1707
  role: "region",
1708
1708
  "aria-label": "Message composer",
1709
- className: a("flex-1 min-w-0 overflow-hidden rounded-surface border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", P === "recording" && "border-error-7/30", Ke && "border-dashed border-accent-7 bg-accent-2", d && "opacity-action-disabled cursor-not-allowed"),
1709
+ className: a("flex-1 min-w-0 overflow-hidden rounded-surface border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", I === "recording" && "border-error-7/30", Ke && "border-dashed border-accent-7 bg-accent-2", d && "opacity-action-disabled cursor-not-allowed"),
1710
1710
  onFocus: () => U(!0),
1711
1711
  onBlur: (e) => {
1712
1712
  e.currentTarget.contains(e.relatedTarget) || U(!1);
@@ -1717,88 +1717,88 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1717
1717
  onDragLeave: () => qe(!1),
1718
1718
  onDrop: Q,
1719
1719
  children: [
1720
- _e,
1721
- /* @__PURE__ */ A(z, { children: O && /* @__PURE__ */ A(ot, {
1722
- author: O.author,
1723
- preview: O.preview,
1724
- onDismiss: O.onDismiss
1720
+ he,
1721
+ /* @__PURE__ */ M(Pe, { children: A && /* @__PURE__ */ M(ot, {
1722
+ author: A.author,
1723
+ preview: A.preview,
1724
+ onDismiss: A.onDismiss
1725
1725
  }, "reply") }),
1726
- /* @__PURE__ */ A(z, { children: V && /* @__PURE__ */ A(pt, {
1727
- date: V,
1726
+ /* @__PURE__ */ M(Pe, { children: H && /* @__PURE__ */ M(pt, {
1727
+ date: H,
1728
1728
  onEdit: () => Le(!0),
1729
- onClear: () => H(null)
1729
+ onClear: () => Fe(null)
1730
1730
  }, "schedule") }),
1731
- /* @__PURE__ */ A(z, { children: G.length > 0 && /* @__PURE__ */ A(Be, {
1731
+ /* @__PURE__ */ M(Pe, { children: G.length > 0 && /* @__PURE__ */ M(Be, {
1732
1732
  attachments: G,
1733
1733
  onRemoveAttachment: vt
1734
1734
  }, "attachments") }),
1735
- J.toolbarPosition === "top" && X && /* @__PURE__ */ A("div", {
1736
- className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", I ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1737
- children: /* @__PURE__ */ A("div", {
1735
+ J.toolbarPosition === "top" && X && /* @__PURE__ */ M("div", {
1736
+ className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", R ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1737
+ children: /* @__PURE__ */ M("div", {
1738
1738
  className: "overflow-hidden",
1739
- children: /* @__PURE__ */ A(it, {
1739
+ children: /* @__PURE__ */ M(it, {
1740
1740
  editor: X,
1741
- toolbar: xe,
1741
+ toolbar: ye,
1742
1742
  isMobile: !1,
1743
1743
  hasMentions: !!(v || y),
1744
- hasSlashCommands: !!T,
1744
+ hasSlashCommands: !!D,
1745
1745
  disabled: d
1746
1746
  })
1747
1747
  })
1748
1748
  }),
1749
- /* @__PURE__ */ j("div", {
1749
+ /* @__PURE__ */ N("div", {
1750
1750
  className: "relative",
1751
- children: [P === "recording" && /* @__PURE__ */ A(at, {
1751
+ children: [I === "recording" && /* @__PURE__ */ M(at, {
1752
1752
  duration: Y.duration,
1753
1753
  analyserNode: Y.analyserNode,
1754
- maxDuration: pe,
1754
+ maxDuration: de,
1755
1755
  onCancel: lt
1756
- }), /* @__PURE__ */ j("div", {
1756
+ }), /* @__PURE__ */ N("div", {
1757
1757
  ref: Ye,
1758
- className: a("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", P === "recording" && "invisible"),
1758
+ className: a("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", I === "recording" && "invisible"),
1759
1759
  style: {
1760
1760
  minHeight: J.minHeight,
1761
1761
  maxHeight: rt,
1762
1762
  overflowY: "auto"
1763
1763
  },
1764
1764
  onClick: () => X?.commands.focus(),
1765
- children: [/* @__PURE__ */ A("div", {
1765
+ children: [/* @__PURE__ */ M("div", {
1766
1766
  className: "flex-1 min-w-0",
1767
- children: /* @__PURE__ */ A(b, { editor: X })
1768
- }), X && P !== "recording" && /* @__PURE__ */ j("div", {
1767
+ children: /* @__PURE__ */ M(ee, { editor: X })
1768
+ }), X && I !== "recording" && /* @__PURE__ */ N("div", {
1769
1769
  className: "flex items-center gap-ds-01 shrink-0 ml-ds-03",
1770
- children: [/* @__PURE__ */ A("button", {
1770
+ children: [/* @__PURE__ */ M("button", {
1771
1771
  type: "button",
1772
- onClick: () => Ne((e) => !e),
1773
- title: I ? "Hide formatting" : "Show formatting",
1774
- "aria-label": I ? "Hide formatting" : "Show formatting",
1775
- "aria-pressed": I,
1776
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", I ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1777
- children: /* @__PURE__ */ A(s, {
1778
- icon: Pe,
1772
+ onClick: () => je((e) => !e),
1773
+ title: R ? "Hide formatting" : "Show formatting",
1774
+ "aria-label": R ? "Hide formatting" : "Show formatting",
1775
+ "aria-pressed": R,
1776
+ className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", R ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1777
+ children: /* @__PURE__ */ M(s, {
1778
+ icon: Me,
1779
1779
  size: "xs"
1780
1780
  })
1781
- }), /* @__PURE__ */ j("div", {
1781
+ }), /* @__PURE__ */ N("div", {
1782
1782
  className: "relative",
1783
- children: [/* @__PURE__ */ A("button", {
1783
+ children: [/* @__PURE__ */ M("button", {
1784
1784
  ref: We,
1785
1785
  type: "button",
1786
- onClick: () => R((e) => !e),
1786
+ onClick: () => B((e) => !e),
1787
1787
  title: "Emoji",
1788
1788
  "aria-label": "Emoji",
1789
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", L ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1790
- children: /* @__PURE__ */ A(s, {
1791
- icon: Oe,
1789
+ className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", z ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1790
+ children: /* @__PURE__ */ M(s, {
1791
+ icon: Ee,
1792
1792
  size: "xs"
1793
1793
  })
1794
- }), L && he.createPortal(/* @__PURE__ */ A("div", {
1794
+ }), z && pe.createPortal(/* @__PURE__ */ M("div", {
1795
1795
  ref: W,
1796
1796
  className: "absolute z-popover",
1797
1797
  style: {
1798
1798
  top: 0,
1799
1799
  left: 0
1800
1800
  },
1801
- children: /* @__PURE__ */ A(yt, {
1801
+ children: /* @__PURE__ */ M(yt, {
1802
1802
  onSelect: ({ id: e, native: t }) => {
1803
1803
  X.chain().focus().insertContent({
1804
1804
  type: "emojiNode",
@@ -1806,53 +1806,53 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1806
1806
  id: e,
1807
1807
  native: t
1808
1808
  }
1809
- }).run(), R(!1);
1809
+ }).run(), B(!1);
1810
1810
  },
1811
- onClose: () => R(!1)
1811
+ onClose: () => B(!1)
1812
1812
  })
1813
1813
  }), document.body)]
1814
1814
  })]
1815
1815
  })]
1816
1816
  })]
1817
1817
  }),
1818
- P === "review" && q && /* @__PURE__ */ j("div", {
1818
+ I === "review" && q && /* @__PURE__ */ N("div", {
1819
1819
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b border-b border-surface-border",
1820
- children: [/* @__PURE__ */ A(Ue, {
1820
+ children: [/* @__PURE__ */ M(Ue, {
1821
1821
  src: q.blob,
1822
1822
  duration: q.duration,
1823
1823
  waveformData: q.waveformData,
1824
1824
  className: "flex-1"
1825
- }), /* @__PURE__ */ A(l, {
1825
+ }), /* @__PURE__ */ M(l, {
1826
1826
  variant: "ghost",
1827
1827
  size: "icon-sm",
1828
1828
  onClick: St,
1829
1829
  "aria-label": "Discard voice note",
1830
1830
  title: "Discard voice note",
1831
1831
  className: "text-surface-fg-subtle hover:text-error-11",
1832
- children: /* @__PURE__ */ A(s, {
1833
- icon: Fe,
1832
+ children: /* @__PURE__ */ M(s, {
1833
+ icon: Ne,
1834
1834
  size: "sm"
1835
1835
  })
1836
1836
  })]
1837
1837
  }),
1838
- nt && X && !Ct && /* @__PURE__ */ A(bt, { editor: X }),
1839
- J.toolbarPosition === "bottom" && X && /* @__PURE__ */ A("div", {
1838
+ nt && X && !Ct && /* @__PURE__ */ M(bt, { editor: X }),
1839
+ J.toolbarPosition === "bottom" && X && /* @__PURE__ */ M("div", {
1840
1840
  className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", Tt ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1841
- children: /* @__PURE__ */ A("div", {
1841
+ children: /* @__PURE__ */ M("div", {
1842
1842
  className: "overflow-hidden",
1843
- children: /* @__PURE__ */ A(it, {
1843
+ children: /* @__PURE__ */ M(it, {
1844
1844
  editor: X,
1845
- toolbar: xe,
1845
+ toolbar: ye,
1846
1846
  isMobile: nt,
1847
1847
  hasMentions: !!(v || y),
1848
- hasSlashCommands: !!T,
1848
+ hasSlashCommands: !!D,
1849
1849
  disabled: d
1850
1850
  })
1851
1851
  })
1852
1852
  }),
1853
1853
  g && _ !== "hidden" && (() => {
1854
1854
  let e = Ve / g;
1855
- return _ === "always" || _ === "focus" && ze || (_ === "near-limit" || !_) && e >= .8 || e >= 1 ? /* @__PURE__ */ j("div", {
1855
+ return _ === "always" || _ === "focus" && ze || (_ === "near-limit" || !_) && e >= .8 || e >= 1 ? /* @__PURE__ */ N("div", {
1856
1856
  className: a("flex justify-end px-ds-04 pb-ds-02 text-ds-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1857
1857
  children: [
1858
1858
  Ve,
@@ -1861,8 +1861,8 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1861
1861
  ]
1862
1862
  }) : null;
1863
1863
  })(),
1864
- ve,
1865
- /* @__PURE__ */ A("input", {
1864
+ ge,
1865
+ /* @__PURE__ */ M("input", {
1866
1866
  ref: Je,
1867
1867
  type: "file",
1868
1868
  multiple: !0,
@@ -1871,13 +1871,13 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1871
1871
  })
1872
1872
  ]
1873
1873
  }),
1874
- /* @__PURE__ */ j("div", {
1874
+ /* @__PURE__ */ N("div", {
1875
1875
  className: "flex items-center gap-ds-02 shrink-0",
1876
- children: [Se && Se.length > 0 && P !== "recording" && /* @__PURE__ */ A(_t, { options: Se }), /* @__PURE__ */ j(z, {
1876
+ children: [be && be.length > 0 && I !== "recording" && /* @__PURE__ */ M(_t, { options: be }), /* @__PURE__ */ N(Pe, {
1877
1877
  mode: "popLayout",
1878
1878
  initial: !1,
1879
1879
  children: [
1880
- P === "recording" && /* @__PURE__ */ j(B.div, {
1880
+ I === "recording" && /* @__PURE__ */ N(V.div, {
1881
1881
  initial: {
1882
1882
  scale: .8,
1883
1883
  opacity: 0
@@ -1892,31 +1892,31 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1892
1892
  },
1893
1893
  transition: { duration: i.moderate01 },
1894
1894
  className: "flex items-center gap-ds-02",
1895
- children: [/* @__PURE__ */ A(l, {
1895
+ children: [/* @__PURE__ */ M(l, {
1896
1896
  variant: "soft",
1897
1897
  size: $,
1898
1898
  onClick: lt,
1899
1899
  "aria-label": "Cancel recording",
1900
1900
  title: "Cancel recording",
1901
1901
  className: "text-surface-fg-subtle hover:text-error-11",
1902
- children: /* @__PURE__ */ A(s, {
1903
- icon: Fe,
1902
+ children: /* @__PURE__ */ M(s, {
1903
+ icon: Ne,
1904
1904
  size: "md"
1905
1905
  })
1906
- }), /* @__PURE__ */ A(l, {
1906
+ }), /* @__PURE__ */ M(l, {
1907
1907
  variant: "solid",
1908
1908
  size: $,
1909
1909
  color: "error",
1910
1910
  onClick: ct,
1911
1911
  "aria-label": "Stop recording",
1912
1912
  title: "Stop recording",
1913
- children: /* @__PURE__ */ A(s, {
1914
- icon: Me,
1913
+ children: /* @__PURE__ */ M(s, {
1914
+ icon: Ae,
1915
1915
  size: "md"
1916
1916
  })
1917
1917
  })]
1918
1918
  }, "recording"),
1919
- M && P !== "recording" && /* @__PURE__ */ A(B.div, {
1919
+ P && I !== "recording" && /* @__PURE__ */ M(V.div, {
1920
1920
  initial: {
1921
1921
  scale: .8,
1922
1922
  opacity: 0
@@ -1930,20 +1930,20 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1930
1930
  opacity: 0
1931
1931
  },
1932
1932
  transition: { duration: i.moderate01 },
1933
- children: /* @__PURE__ */ A(l, {
1933
+ children: /* @__PURE__ */ M(l, {
1934
1934
  variant: "solid",
1935
1935
  size: $,
1936
1936
  color: "error",
1937
- onClick: ge,
1937
+ onClick: me,
1938
1938
  "aria-label": "Stop",
1939
1939
  title: "Stop",
1940
- children: /* @__PURE__ */ A(s, {
1941
- icon: Me,
1940
+ children: /* @__PURE__ */ M(s, {
1941
+ icon: Ae,
1942
1942
  size: "md"
1943
1943
  })
1944
1944
  })
1945
1945
  }, "streaming"),
1946
- !M && P !== "recording" && wt && N && /* @__PURE__ */ A(B.div, {
1946
+ !P && I !== "recording" && wt && F && /* @__PURE__ */ M(V.div, {
1947
1947
  initial: {
1948
1948
  scale: .8,
1949
1949
  opacity: 0
@@ -1957,23 +1957,23 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1957
1957
  opacity: 0
1958
1958
  },
1959
1959
  transition: { duration: i.moderate01 },
1960
- children: /* @__PURE__ */ A(h, {
1960
+ children: /* @__PURE__ */ M(h, {
1961
1961
  onClick: ft,
1962
1962
  disabled: d,
1963
- "aria-label": V ? "Schedule send" : "Send",
1963
+ "aria-label": H ? "Schedule send" : "Send",
1964
1964
  size: $,
1965
- dropdownContent: /* @__PURE__ */ A(ut, {
1966
- onSchedule: (e) => H(e),
1965
+ dropdownContent: /* @__PURE__ */ M(ut, {
1966
+ onSchedule: (e) => Fe(e),
1967
1967
  onClose: () => {},
1968
1968
  onOpenDialog: () => Le(!0)
1969
1969
  }),
1970
- children: /* @__PURE__ */ A(s, {
1971
- icon: V ? be : je,
1970
+ children: /* @__PURE__ */ M(s, {
1971
+ icon: H ? ve : ke,
1972
1972
  size: "md"
1973
1973
  })
1974
1974
  })
1975
1975
  }, "split-send"),
1976
- !M && P !== "recording" && wt && !N && /* @__PURE__ */ A(B.div, {
1976
+ !P && I !== "recording" && wt && !F && /* @__PURE__ */ M(V.div, {
1977
1977
  initial: {
1978
1978
  scale: .8,
1979
1979
  opacity: 0
@@ -1987,20 +1987,20 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1987
1987
  opacity: 0
1988
1988
  },
1989
1989
  transition: { duration: i.moderate01 },
1990
- children: /* @__PURE__ */ A(l, {
1990
+ children: /* @__PURE__ */ M(l, {
1991
1991
  variant: "solid",
1992
1992
  size: $,
1993
1993
  onClick: ft,
1994
1994
  disabled: d,
1995
1995
  "aria-label": "Send",
1996
1996
  title: "Send",
1997
- children: /* @__PURE__ */ A(s, {
1998
- icon: je,
1997
+ children: /* @__PURE__ */ M(s, {
1998
+ icon: ke,
1999
1999
  size: "md"
2000
2000
  })
2001
2001
  })
2002
2002
  }, "send"),
2003
- !M && P !== "recording" && !wt && fe && /* @__PURE__ */ A(B.div, {
2003
+ !P && I !== "recording" && !wt && ue && /* @__PURE__ */ M(V.div, {
2004
2004
  initial: {
2005
2005
  scale: .8,
2006
2006
  opacity: 0
@@ -2014,19 +2014,19 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2014
2014
  opacity: 0
2015
2015
  },
2016
2016
  transition: { duration: i.moderate01 },
2017
- children: /* @__PURE__ */ A(l, {
2017
+ children: /* @__PURE__ */ M(l, {
2018
2018
  variant: "soft",
2019
2019
  size: $,
2020
2020
  onClick: st,
2021
2021
  "aria-label": "Record voice message",
2022
2022
  title: "Record voice message",
2023
- children: /* @__PURE__ */ A(s, {
2024
- icon: De,
2023
+ children: /* @__PURE__ */ M(s, {
2024
+ icon: Te,
2025
2025
  size: "md"
2026
2026
  })
2027
2027
  })
2028
2028
  }, "mic"),
2029
- !M && P !== "recording" && !wt && !fe && /* @__PURE__ */ A(B.div, {
2029
+ !P && I !== "recording" && !wt && !ue && /* @__PURE__ */ M(V.div, {
2030
2030
  initial: {
2031
2031
  scale: .8,
2032
2032
  opacity: 0
@@ -2040,14 +2040,14 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2040
2040
  opacity: 0
2041
2041
  },
2042
2042
  transition: { duration: i.moderate01 },
2043
- children: /* @__PURE__ */ A(l, {
2043
+ children: /* @__PURE__ */ M(l, {
2044
2044
  variant: "solid",
2045
2045
  size: $,
2046
2046
  disabled: !0,
2047
2047
  "aria-label": "Send",
2048
2048
  title: "Send",
2049
- children: /* @__PURE__ */ A(s, {
2050
- icon: je,
2049
+ children: /* @__PURE__ */ M(s, {
2050
+ icon: ke,
2051
2051
  size: "md"
2052
2052
  })
2053
2053
  })
@@ -2055,15 +2055,15 @@ var xt = E.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2055
2055
  ]
2056
2056
  })]
2057
2057
  }),
2058
- ye && /* @__PURE__ */ A("p", {
2058
+ _e && /* @__PURE__ */ M("p", {
2059
2059
  className: "mt-ds-02 text-center text-ds-xs text-surface-fg-subtle/50",
2060
- children: ye
2060
+ children: _e
2061
2061
  }),
2062
- N && /* @__PURE__ */ A(dt, {
2062
+ F && /* @__PURE__ */ M(dt, {
2063
2063
  open: Ie,
2064
2064
  onOpenChange: Le,
2065
- onSchedule: (e) => H(e),
2066
- initialDate: V
2065
+ onSchedule: (e) => Fe(e),
2066
+ initialDate: H
2067
2067
  })
2068
2068
  ]
2069
2069
  });