eddyter 1.3.32 → 1.3.34

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 (234) hide show
  1. package/README.md +444 -446
  2. package/dist/App.d.ts +3 -2
  3. package/dist/Provider/EditorProvider.d.ts +27 -26
  4. package/dist/Provider/LexicalProvider.d.ts +6 -5
  5. package/dist/api/ai/index.d.ts +31 -31
  6. package/dist/api/auth.d.ts +108 -108
  7. package/dist/api/config/axios.d.ts +2 -1
  8. package/dist/api/config/endpoints.d.ts +22 -21
  9. package/dist/api/featureSuggestion.d.ts +23 -23
  10. package/dist/api/linkPreview.d.ts +15 -15
  11. package/dist/api/transcript/index.d.ts +21 -1
  12. package/dist/assets/style.css +5354 -5359
  13. package/dist/{babel-d3085146.js → babel-d155920e.js} +3278 -3551
  14. package/dist/babel-d155920e.js.map +1 -0
  15. package/dist/components/AiPlugin/index.d.ts +6 -6
  16. package/dist/components/AlignMenu/AlignMenu.d.ts +9 -8
  17. package/dist/components/AlignMenu/AlignMenuDrop.d.ts +3 -2
  18. package/dist/components/AlignMenu/index.d.ts +1 -1
  19. package/dist/components/AutoExpandingDemo.d.ts +6 -5
  20. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +3 -2
  21. package/dist/components/BlockFormatMenu/constants.d.ts +14 -14
  22. package/dist/components/BlockFormatMenu/index.d.ts +1 -1
  23. package/dist/components/ChartEditDialog.d.ts +9 -8
  24. package/dist/components/ChartInsertDialog.d.ts +8 -7
  25. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -6
  26. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +9 -8
  27. package/dist/components/CodeActionMenuPlugin/index.d.ts +5 -4
  28. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
  29. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -2
  30. package/dist/components/ColorPicker/index.d.ts +1 -1
  31. package/dist/components/CommentSidebar/CommentSidebar.d.ts +8 -7
  32. package/dist/components/CommentSidebar/index.d.ts +1 -1
  33. package/dist/components/CommentToggle/CommentToggle.d.ts +8 -7
  34. package/dist/components/CommentToggle/index.d.ts +1 -1
  35. package/dist/components/CommentView/CommentView.d.ts +9 -8
  36. package/dist/components/CommentView/index.d.ts +1 -1
  37. package/dist/components/ConfigurableEditorWithAuth.d.ts +23 -22
  38. package/dist/components/DatePicker/DatePickerWidget.d.ts +7 -6
  39. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +3 -2
  40. package/dist/components/EmojiPickerWidget/index.d.ts +1 -1
  41. package/dist/components/FeatureSuggestionDialog/index.d.ts +6 -6
  42. package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -7
  43. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +5 -4
  44. package/dist/components/FileView/index.d.ts +9 -8
  45. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +7 -6
  46. package/dist/components/FontSizePicker/FontSizeControl.d.ts +3 -2
  47. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +3 -2
  48. package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +3 -2
  49. package/dist/components/FormatTextMenu/index.d.ts +1 -1
  50. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +7 -6
  51. package/dist/components/HtmlViewDisplay.d.ts +3 -2
  52. package/dist/components/ImageComparisonDialog/index.d.ts +11 -10
  53. package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +11 -10
  54. package/dist/components/ImageGenerationDialog/index.d.ts +11 -10
  55. package/dist/components/ImageInsertTest.d.ts +3 -2
  56. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +9 -8
  57. package/dist/components/ImageView/ImageDialog/index.d.ts +6 -5
  58. package/dist/components/ImageView/ImageResizer.d.ts +16 -15
  59. package/dist/components/ImageView/index.d.ts +17 -16
  60. package/dist/components/InsertMenu/InsertMenu.d.ts +9 -8
  61. package/dist/components/InsertMenu/InsertMenuDrop.d.ts +9 -8
  62. package/dist/components/InsertMenu/index.d.ts +1 -1
  63. package/dist/components/LanguageSelectorDialog/index.d.ts +8 -7
  64. package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +6 -5
  65. package/dist/components/NotePanelMenu/index.d.ts +1 -1
  66. package/dist/components/NotePanelView/NotePanelView.d.ts +9 -8
  67. package/dist/components/NotePanelView/index.d.ts +1 -1
  68. package/dist/components/Placeholder/Placeholder.d.ts +3 -2
  69. package/dist/components/Placeholder/index.d.ts +1 -1
  70. package/dist/components/Placeholder/styles.d.ts +1 -1
  71. package/dist/components/ScopedEditor.d.ts +8 -8
  72. package/dist/components/SignatureCaption/index.d.ts +6 -5
  73. package/dist/components/TableColorPicker/index.d.ts +8 -7
  74. package/dist/components/TableModal/TableModal.d.ts +10 -9
  75. package/dist/components/TextEnhanceDialog/index.d.ts +10 -9
  76. package/dist/components/ToneAdjustDialog/index.d.ts +8 -7
  77. package/dist/components/Toolbar/Toolbar.d.ts +3 -2
  78. package/dist/components/Toolbar/index.d.ts +1 -1
  79. package/dist/components/Toolbar/styles.d.ts +6 -6
  80. package/dist/components/VoiceTranscriptIcon/VoiceTranscriptIcon.d.ts +2 -1
  81. package/dist/components/VoiceTranscriptIcon/index.d.ts +1 -1
  82. package/dist/components/ui/avatar.d.ts +6 -6
  83. package/dist/components/ui/badge.d.ts +9 -8
  84. package/dist/components/ui/button.d.ts +11 -10
  85. package/dist/components/ui/calendar.d.ts +8 -7
  86. package/dist/components/ui/card.d.ts +8 -8
  87. package/dist/components/ui/checkbox.d.ts +4 -4
  88. package/dist/components/ui/dialog.d.ts +19 -19
  89. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  90. package/dist/components/ui/input.d.ts +3 -3
  91. package/dist/components/ui/label.d.ts +4 -4
  92. package/dist/components/ui/popover.d.ts +7 -7
  93. package/dist/components/ui/select.d.ts +13 -13
  94. package/dist/components/ui/separator.d.ts +4 -4
  95. package/dist/components/ui/sheet.d.ts +24 -24
  96. package/dist/components/ui/skeleton.d.ts +3 -3
  97. package/dist/components/ui/tabs.d.ts +7 -7
  98. package/dist/components/ui/textarea.d.ts +3 -3
  99. package/dist/components/ui/tooltip.d.ts +7 -7
  100. package/dist/constants.d.ts +22 -21
  101. package/dist/context/CommentContext.d.ts +43 -42
  102. package/dist/context/HtmlViewContext.d.ts +17 -16
  103. package/dist/context/ToolbarContext.d.ts +56 -55
  104. package/dist/editorConfig.d.ts +48 -48
  105. package/dist/{estree-164983f6.js → estree-b1fff53b.js} +1778 -1763
  106. package/dist/estree-b1fff53b.js.map +1 -0
  107. package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
  108. package/dist/hooks/useBlockFormat.d.ts +17 -16
  109. package/dist/hooks/useColorPicker.d.ts +6 -6
  110. package/dist/hooks/useCustomCommands.d.ts +3 -2
  111. package/dist/hooks/useDebounce.d.ts +1 -1
  112. package/dist/hooks/useEditorToolbar.d.ts +10 -9
  113. package/dist/hooks/useInsertMenu.d.ts +9 -9
  114. package/dist/hooks/useModal.d.ts +5 -5
  115. package/dist/hooks/useReactNativeBridge.d.ts +54 -54
  116. package/dist/hooks/useS3Uploader.d.ts +11 -11
  117. package/dist/hooks/useVoiceToText.d.ts +20 -15
  118. package/dist/{html-5586dbf6.js → html-f95ee5dc.js} +656 -701
  119. package/dist/html-f95ee5dc.js.map +1 -0
  120. package/dist/{html2pdf.bundle-8d3a50b2.js → html2pdf.bundle-3478ea73.js} +2 -2
  121. package/dist/html2pdf.bundle-3478ea73.js.map +1 -0
  122. package/dist/{html2pdf.bundle.min-d80d5aa7.js → html2pdf.bundle.min-ae547e03.js} +2 -2
  123. package/dist/html2pdf.bundle.min-ae547e03.js.map +1 -0
  124. package/dist/{index-68349a2f.js → index-b749f5db.js} +2 -2
  125. package/dist/index-b749f5db.js.map +1 -0
  126. package/dist/{index-e6dfde84.js → index-c32880a3.js} +844 -966
  127. package/dist/index-c32880a3.js.map +1 -0
  128. package/dist/{index-e7705f79.js → index-f66d9237.js} +2 -2
  129. package/dist/index-f66d9237.js.map +1 -0
  130. package/dist/index.d.ts +10 -10
  131. package/dist/index.js +1 -1
  132. package/dist/lib/utils.d.ts +2 -1
  133. package/dist/main.d.ts +1 -0
  134. package/dist/{markdown-d513479b.js → markdown-1d9e6c3f.js} +1789 -1836
  135. package/dist/markdown-1d9e6c3f.js.map +1 -0
  136. package/dist/nodes/ChartNode.d.ts +41 -40
  137. package/dist/nodes/CommentNode.d.ts +34 -33
  138. package/dist/nodes/CommentedTextNode.d.ts +29 -28
  139. package/dist/nodes/EmbedNode.d.ts +32 -31
  140. package/dist/nodes/FileNode.d.ts +32 -31
  141. package/dist/nodes/ImageNode.d.ts +65 -64
  142. package/dist/nodes/MentionNode.d.ts +75 -74
  143. package/dist/nodes/NotePanelNode.d.ts +31 -30
  144. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +25 -24
  145. package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
  146. package/dist/pages/NotFound.d.ts +2 -2
  147. package/dist/pages/RichTextEditor.d.ts +6 -6
  148. package/dist/pages/TextareaEditor.d.ts +6 -6
  149. package/dist/pages/styles.d.ts +5 -5
  150. package/dist/plugins/AIChatPlugin.d.ts +11 -10
  151. package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
  152. package/dist/plugins/AutocompletePlugin.d.ts +22 -22
  153. package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
  154. package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
  155. package/dist/plugins/CodeHighlightPlugin.d.ts +3 -2
  156. package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +21 -20
  157. package/dist/plugins/CommentBubblePlugin.d.ts +3 -2
  158. package/dist/plugins/CommentPlugin.d.ts +7 -6
  159. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +29 -28
  160. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
  161. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +7 -6
  162. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
  163. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
  164. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +4 -3
  165. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +6 -5
  166. package/dist/plugins/FilePlugin.d.ts +8 -7
  167. package/dist/plugins/FloatingEnhanceButton/index.d.ts +4 -3
  168. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +6 -5
  169. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +27 -26
  170. package/dist/plugins/GrammarCheckPlugin.d.ts +2 -1
  171. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
  172. package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
  173. package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
  174. package/dist/plugins/ImagePlugin.d.ts +7 -6
  175. package/dist/plugins/LinkPlugin/index.d.ts +6 -5
  176. package/dist/plugins/LinkPreviewPlugin/index.d.ts +4 -4
  177. package/dist/plugins/LocalStoragePlugin.d.ts +7 -6
  178. package/dist/plugins/MarkdownShortcutsPlugin/index.d.ts +20 -20
  179. package/dist/plugins/MentionsPlugin/index.d.ts +7 -6
  180. package/dist/plugins/NotePanelPlugin.d.ts +7 -6
  181. package/dist/plugins/PasteOptionsPlugin/index.d.ts +17 -17
  182. package/dist/plugins/RichTextPastePlugin/index.d.ts +6 -5
  183. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +6 -5
  184. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
  185. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
  186. package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
  187. package/dist/plugins/TableActionMenuPlugin/index.d.ts +6 -5
  188. package/dist/plugins/TableCellResizer/index.d.ts +2 -1
  189. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
  190. package/dist/plugins/TablePlugin.d.ts +5 -4
  191. package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
  192. package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
  193. package/dist/plugins/TreeViewPlugin.d.ts +3 -2
  194. package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
  195. package/dist/plugins/VoiceTranscriptPlugin.d.ts +22 -21
  196. package/dist/plugins/WordCountPlugin.d.ts +3 -2
  197. package/dist/{postcss-f084f74d.js → postcss-c2592f3f.js} +1357 -1378
  198. package/dist/postcss-c2592f3f.js.map +1 -0
  199. package/dist/standalone-bcc7f37a.js +2649 -0
  200. package/dist/standalone-bcc7f37a.js.map +1 -0
  201. package/dist/styles/PlaygroundEditorTheme.d.ts +3 -2
  202. package/dist/types.d.ts +150 -149
  203. package/dist/typescript-48c10f50.js +13601 -0
  204. package/dist/typescript-48c10f50.js.map +1 -0
  205. package/dist/ui/ColorPicker.d.ts +14 -13
  206. package/dist/ui/Icons.d.ts +48 -48
  207. package/dist/ui/TextInput.d.ts +11 -10
  208. package/dist/utils/dateFormats.d.ts +33 -33
  209. package/dist/utils/debounce.d.ts +6 -5
  210. package/dist/utils/editorStyleConverter.d.ts +17 -16
  211. package/dist/utils/export.d.ts +2 -1
  212. package/dist/utils/getDOMRangeRect.d.ts +13 -13
  213. package/dist/utils/getSelectedNode.d.ts +3 -2
  214. package/dist/utils/helper.d.ts +3 -3
  215. package/dist/utils/index.d.ts +4 -3
  216. package/dist/utils/invarient.d.ts +1 -1
  217. package/dist/utils/setFloatingElemPosition.d.ts +8 -8
  218. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
  219. package/dist/utils/url.d.ts +9 -9
  220. package/package.json +149 -149
  221. package/dist/babel-d3085146.js.map +0 -1
  222. package/dist/estree-164983f6.js.map +0 -1
  223. package/dist/html-5586dbf6.js.map +0 -1
  224. package/dist/html2pdf.bundle-8d3a50b2.js.map +0 -1
  225. package/dist/html2pdf.bundle.min-d80d5aa7.js.map +0 -1
  226. package/dist/index-68349a2f.js.map +0 -1
  227. package/dist/index-e6dfde84.js.map +0 -1
  228. package/dist/index-e7705f79.js.map +0 -1
  229. package/dist/markdown-d513479b.js.map +0 -1
  230. package/dist/postcss-f084f74d.js.map +0 -1
  231. package/dist/standalone-5a8c6b7e.js +0 -2518
  232. package/dist/standalone-5a8c6b7e.js.map +0 -1
  233. package/dist/typescript-b1005db4.js +0 -13705
  234. package/dist/typescript-b1005db4.js.map +0 -1
@@ -76,7 +76,7 @@ const HtmlViewProvider = ({
76
76
  }
77
77
  );
78
78
  };
79
- const DEFAULT_API_ENDPOINT = "https://api.cteditor.com/api/license/validate";
79
+ const DEFAULT_API_ENDPOINT = "http://localhost:3000/api/license/validate";
80
80
  const getApiEndpoint = () => {
81
81
  return DEFAULT_API_ENDPOINT;
82
82
  };
@@ -199,7 +199,7 @@ const EditorTheme = "";
199
199
  const PlaygroundEditorTheme = "";
200
200
  const AIChatPlugin$1 = "";
201
201
  const backendInstance = axios.create({
202
- baseURL: "https://api.cteditor.com/",
202
+ baseURL: "http://localhost:3000/",
203
203
  headers: {
204
204
  "Content-Type": "application/json"
205
205
  }
@@ -1516,7 +1516,8 @@ const apiEndpoints = {
1516
1516
  fileUpload: "/api/files/upload"
1517
1517
  },
1518
1518
  transcript: {
1519
- voiceTranscript: "/api/transcript/get-assemblyai-token"
1519
+ voiceTranscript: "/api/transcript/get-assemblyai-token",
1520
+ endSession: "/api/transcript/end-session"
1520
1521
  },
1521
1522
  linkPreview: {
1522
1523
  getPreview: "/api/link-preview"
@@ -1603,7 +1604,7 @@ const AiTextTransform = async ({ content, apiKey }) => {
1603
1604
  const AI_ACTION_COMMAND = createCommand(
1604
1605
  "AI_ACTION_COMMAND"
1605
1606
  );
1606
- const ImageView = React__default.lazy(() => import("./index-68349a2f.js"));
1607
+ const ImageView = React__default.lazy(() => import("./index-b749f5db.js"));
1607
1608
  function isGoogleDocCheckboxImg(img) {
1608
1609
  return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
1609
1610
  }
@@ -1906,18 +1907,18 @@ const ImagePlugin = ({
1906
1907
  }, [captionsEnabled, editor]);
1907
1908
  return null;
1908
1909
  };
1909
- function setRef(ref, value) {
1910
+ function setRef$1(ref, value) {
1910
1911
  if (typeof ref === "function") {
1911
1912
  return ref(value);
1912
1913
  } else if (ref !== null && ref !== void 0) {
1913
1914
  ref.current = value;
1914
1915
  }
1915
1916
  }
1916
- function composeRefs(...refs) {
1917
+ function composeRefs$1(...refs) {
1917
1918
  return (node) => {
1918
1919
  let hasCleanup = false;
1919
1920
  const cleanups = refs.map((ref) => {
1920
- const cleanup = setRef(ref, node);
1921
+ const cleanup = setRef$1(ref, node);
1921
1922
  if (!hasCleanup && typeof cleanup == "function") {
1922
1923
  hasCleanup = true;
1923
1924
  }
@@ -1930,34 +1931,31 @@ function composeRefs(...refs) {
1930
1931
  if (typeof cleanup == "function") {
1931
1932
  cleanup();
1932
1933
  } else {
1933
- setRef(refs[i2], null);
1934
+ setRef$1(refs[i2], null);
1934
1935
  }
1935
1936
  }
1936
1937
  };
1937
1938
  }
1938
1939
  };
1939
1940
  }
1940
- function useComposedRefs(...refs) {
1941
- return React$1.useCallback(composeRefs(...refs), refs);
1942
- }
1943
- var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
1944
- var use$3 = React$1[" use ".trim().toString()];
1945
- function isPromiseLike$3(value) {
1941
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1942
+ var use = React$1[" use ".trim().toString()];
1943
+ function isPromiseLike(value) {
1946
1944
  return typeof value === "object" && value !== null && "then" in value;
1947
1945
  }
1948
- function isLazyComponent$3(element) {
1949
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
1946
+ function isLazyComponent(element) {
1947
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
1950
1948
  }
1951
1949
  // @__NO_SIDE_EFFECTS__
1952
- function createSlot$4(ownerName) {
1953
- const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
1950
+ function createSlot$1(ownerName) {
1951
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
1954
1952
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
1955
1953
  let { children, ...slotProps } = props;
1956
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
1957
- children = use$3(children._payload);
1954
+ if (isLazyComponent(children) && typeof use === "function") {
1955
+ children = use(children._payload);
1958
1956
  }
1959
1957
  const childrenArray = React$1.Children.toArray(children);
1960
- const slottable = childrenArray.find(isSlottable$4);
1958
+ const slottable = childrenArray.find(isSlottable$1);
1961
1959
  if (slottable) {
1962
1960
  const newElement = slottable.props.children;
1963
1961
  const newChildren = childrenArray.map((child) => {
@@ -1976,19 +1974,19 @@ function createSlot$4(ownerName) {
1976
1974
  Slot2.displayName = `${ownerName}.Slot`;
1977
1975
  return Slot2;
1978
1976
  }
1979
- var Slot$4 = /* @__PURE__ */ createSlot$4("Slot");
1977
+ var Slot$4 = /* @__PURE__ */ createSlot$1("Slot");
1980
1978
  // @__NO_SIDE_EFFECTS__
1981
- function createSlotClone$4(ownerName) {
1979
+ function createSlotClone$1(ownerName) {
1982
1980
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
1983
1981
  let { children, ...slotProps } = props;
1984
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
1985
- children = use$3(children._payload);
1982
+ if (isLazyComponent(children) && typeof use === "function") {
1983
+ children = use(children._payload);
1986
1984
  }
1987
1985
  if (React$1.isValidElement(children)) {
1988
- const childrenRef = getElementRef$5(children);
1989
- const props2 = mergeProps$4(slotProps, children.props);
1986
+ const childrenRef = getElementRef$2(children);
1987
+ const props2 = mergeProps$1(slotProps, children.props);
1990
1988
  if (children.type !== React$1.Fragment) {
1991
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
1989
+ props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
1992
1990
  }
1993
1991
  return React$1.cloneElement(children, props2);
1994
1992
  }
@@ -1997,11 +1995,11 @@ function createSlotClone$4(ownerName) {
1997
1995
  SlotClone.displayName = `${ownerName}.SlotClone`;
1998
1996
  return SlotClone;
1999
1997
  }
2000
- var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
2001
- function isSlottable$4(child) {
2002
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
1998
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
1999
+ function isSlottable$1(child) {
2000
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
2003
2001
  }
2004
- function mergeProps$4(slotProps, childProps) {
2002
+ function mergeProps$1(slotProps, childProps) {
2005
2003
  const overrideProps = { ...childProps };
2006
2004
  for (const propName in childProps) {
2007
2005
  const slotPropValue = slotProps[propName];
@@ -2025,7 +2023,7 @@ function mergeProps$4(slotProps, childProps) {
2025
2023
  }
2026
2024
  return { ...slotProps, ...overrideProps };
2027
2025
  }
2028
- function getElementRef$5(element) {
2026
+ function getElementRef$2(element) {
2029
2027
  var _a, _b;
2030
2028
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
2031
2029
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -2100,28 +2098,7 @@ const cva = (base, config) => (props) => {
2100
2098
  }, []);
2101
2099
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2102
2100
  };
2103
- const concatArrays = (array1, array2) => {
2104
- const combinedArray = new Array(array1.length + array2.length);
2105
- for (let i2 = 0; i2 < array1.length; i2++) {
2106
- combinedArray[i2] = array1[i2];
2107
- }
2108
- for (let i2 = 0; i2 < array2.length; i2++) {
2109
- combinedArray[array1.length + i2] = array2[i2];
2110
- }
2111
- return combinedArray;
2112
- };
2113
- const createClassValidatorObject = (classGroupId, validator) => ({
2114
- classGroupId,
2115
- validator
2116
- });
2117
- const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
2118
- nextPart,
2119
- validators,
2120
- classGroupId
2121
- });
2122
2101
  const CLASS_PART_SEPARATOR = "-";
2123
- const EMPTY_CONFLICTS = [];
2124
- const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
2125
2102
  const createClassGroupUtils = (config) => {
2126
2103
  const classMap = createClassMap(config);
2127
2104
  const {
@@ -2129,135 +2106,104 @@ const createClassGroupUtils = (config) => {
2129
2106
  conflictingClassGroupModifiers
2130
2107
  } = config;
2131
2108
  const getClassGroupId = (className) => {
2132
- if (className.startsWith("[") && className.endsWith("]")) {
2133
- return getGroupIdForArbitraryProperty(className);
2134
- }
2135
2109
  const classParts = className.split(CLASS_PART_SEPARATOR);
2136
- const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
2137
- return getGroupRecursive(classParts, startIndex, classMap);
2110
+ if (classParts[0] === "" && classParts.length !== 1) {
2111
+ classParts.shift();
2112
+ }
2113
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
2138
2114
  };
2139
2115
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
2140
- if (hasPostfixModifier) {
2141
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
2142
- const baseConflicts = conflictingClassGroups[classGroupId];
2143
- if (modifierConflicts) {
2144
- if (baseConflicts) {
2145
- return concatArrays(baseConflicts, modifierConflicts);
2146
- }
2147
- return modifierConflicts;
2148
- }
2149
- return baseConflicts || EMPTY_CONFLICTS;
2116
+ const conflicts = conflictingClassGroups[classGroupId] || [];
2117
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
2118
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
2150
2119
  }
2151
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
2120
+ return conflicts;
2152
2121
  };
2153
2122
  return {
2154
2123
  getClassGroupId,
2155
2124
  getConflictingClassGroupIds
2156
2125
  };
2157
2126
  };
2158
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
2159
- const classPathsLength = classParts.length - startIndex;
2160
- if (classPathsLength === 0) {
2127
+ const getGroupRecursive = (classParts, classPartObject) => {
2128
+ var _a;
2129
+ if (classParts.length === 0) {
2161
2130
  return classPartObject.classGroupId;
2162
2131
  }
2163
- const currentClassPart = classParts[startIndex];
2132
+ const currentClassPart = classParts[0];
2164
2133
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
2165
- if (nextClassPartObject) {
2166
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
2167
- if (result)
2168
- return result;
2134
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
2135
+ if (classGroupFromNextClassPart) {
2136
+ return classGroupFromNextClassPart;
2169
2137
  }
2170
- const validators = classPartObject.validators;
2171
- if (validators === null) {
2138
+ if (classPartObject.validators.length === 0) {
2172
2139
  return void 0;
2173
2140
  }
2174
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
2175
- const validatorsLength = validators.length;
2176
- for (let i2 = 0; i2 < validatorsLength; i2++) {
2177
- const validatorObj = validators[i2];
2178
- if (validatorObj.validator(classRest)) {
2179
- return validatorObj.classGroupId;
2141
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
2142
+ return (_a = classPartObject.validators.find(({
2143
+ validator
2144
+ }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
2145
+ };
2146
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
2147
+ const getGroupIdForArbitraryProperty = (className) => {
2148
+ if (arbitraryPropertyRegex.test(className)) {
2149
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
2150
+ const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
2151
+ if (property) {
2152
+ return "arbitrary.." + property;
2180
2153
  }
2181
2154
  }
2182
- return void 0;
2183
2155
  };
2184
- const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
2185
- const content = className.slice(1, -1);
2186
- const colonIndex = content.indexOf(":");
2187
- const property = content.slice(0, colonIndex);
2188
- return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
2189
- })();
2190
2156
  const createClassMap = (config) => {
2191
2157
  const {
2192
2158
  theme: theme2,
2193
2159
  classGroups
2194
2160
  } = config;
2195
- return processClassGroups(classGroups, theme2);
2196
- };
2197
- const processClassGroups = (classGroups, theme2) => {
2198
- const classMap = createClassPartObject();
2161
+ const classMap = {
2162
+ nextPart: /* @__PURE__ */ new Map(),
2163
+ validators: []
2164
+ };
2199
2165
  for (const classGroupId in classGroups) {
2200
- const group = classGroups[classGroupId];
2201
- processClassesRecursively(group, classMap, classGroupId, theme2);
2166
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme2);
2202
2167
  }
2203
2168
  return classMap;
2204
2169
  };
2205
2170
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme2) => {
2206
- const len = classGroup.length;
2207
- for (let i2 = 0; i2 < len; i2++) {
2208
- const classDefinition = classGroup[i2];
2209
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme2);
2210
- }
2211
- };
2212
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2213
- if (typeof classDefinition === "string") {
2214
- processStringDefinition(classDefinition, classPartObject, classGroupId);
2215
- return;
2216
- }
2217
- if (typeof classDefinition === "function") {
2218
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme2);
2219
- return;
2220
- }
2221
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme2);
2222
- };
2223
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
2224
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2225
- classPartObjectToEdit.classGroupId = classGroupId;
2226
- };
2227
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2228
- if (isThemeGetter(classDefinition)) {
2229
- processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2230
- return;
2231
- }
2232
- if (classPartObject.validators === null) {
2233
- classPartObject.validators = [];
2234
- }
2235
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
2236
- };
2237
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2238
- const entries = Object.entries(classDefinition);
2239
- const len = entries.length;
2240
- for (let i2 = 0; i2 < len; i2++) {
2241
- const [key, value] = entries[i2];
2242
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme2);
2243
- }
2171
+ classGroup.forEach((classDefinition) => {
2172
+ if (typeof classDefinition === "string") {
2173
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2174
+ classPartObjectToEdit.classGroupId = classGroupId;
2175
+ return;
2176
+ }
2177
+ if (typeof classDefinition === "function") {
2178
+ if (isThemeGetter(classDefinition)) {
2179
+ processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2180
+ return;
2181
+ }
2182
+ classPartObject.validators.push({
2183
+ validator: classDefinition,
2184
+ classGroupId
2185
+ });
2186
+ return;
2187
+ }
2188
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
2189
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme2);
2190
+ });
2191
+ });
2244
2192
  };
2245
2193
  const getPart = (classPartObject, path) => {
2246
- let current = classPartObject;
2247
- const parts = path.split(CLASS_PART_SEPARATOR);
2248
- const len = parts.length;
2249
- for (let i2 = 0; i2 < len; i2++) {
2250
- const part = parts[i2];
2251
- let next = current.nextPart.get(part);
2252
- if (!next) {
2253
- next = createClassPartObject();
2254
- current.nextPart.set(part, next);
2194
+ let currentClassPartObject = classPartObject;
2195
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
2196
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
2197
+ currentClassPartObject.nextPart.set(pathPart, {
2198
+ nextPart: /* @__PURE__ */ new Map(),
2199
+ validators: []
2200
+ });
2255
2201
  }
2256
- current = next;
2257
- }
2258
- return current;
2202
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
2203
+ });
2204
+ return currentClassPartObject;
2259
2205
  };
2260
- const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
2206
+ const isThemeGetter = (func) => func.isThemeGetter;
2261
2207
  const createLruCache = (maxCacheSize) => {
2262
2208
  if (maxCacheSize < 1) {
2263
2209
  return {
@@ -2267,31 +2213,31 @@ const createLruCache = (maxCacheSize) => {
2267
2213
  };
2268
2214
  }
2269
2215
  let cacheSize = 0;
2270
- let cache2 = /* @__PURE__ */ Object.create(null);
2271
- let previousCache = /* @__PURE__ */ Object.create(null);
2216
+ let cache2 = /* @__PURE__ */ new Map();
2217
+ let previousCache = /* @__PURE__ */ new Map();
2272
2218
  const update = (key, value) => {
2273
- cache2[key] = value;
2219
+ cache2.set(key, value);
2274
2220
  cacheSize++;
2275
2221
  if (cacheSize > maxCacheSize) {
2276
2222
  cacheSize = 0;
2277
2223
  previousCache = cache2;
2278
- cache2 = /* @__PURE__ */ Object.create(null);
2224
+ cache2 = /* @__PURE__ */ new Map();
2279
2225
  }
2280
2226
  };
2281
2227
  return {
2282
2228
  get(key) {
2283
- let value = cache2[key];
2229
+ let value = cache2.get(key);
2284
2230
  if (value !== void 0) {
2285
2231
  return value;
2286
2232
  }
2287
- if ((value = previousCache[key]) !== void 0) {
2233
+ if ((value = previousCache.get(key)) !== void 0) {
2288
2234
  update(key, value);
2289
2235
  return value;
2290
2236
  }
2291
2237
  },
2292
2238
  set(key, value) {
2293
- if (key in cache2) {
2294
- cache2[key] = value;
2239
+ if (cache2.has(key)) {
2240
+ cache2.set(key, value);
2295
2241
  } else {
2296
2242
  update(key, value);
2297
2243
  }
@@ -2300,14 +2246,7 @@ const createLruCache = (maxCacheSize) => {
2300
2246
  };
2301
2247
  const IMPORTANT_MODIFIER = "!";
2302
2248
  const MODIFIER_SEPARATOR = ":";
2303
- const EMPTY_MODIFIERS = [];
2304
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
2305
- modifiers,
2306
- hasImportantModifier,
2307
- baseClassName,
2308
- maybePostfixModifierPosition,
2309
- isExternal
2310
- });
2249
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
2311
2250
  const createParseClassName = (config) => {
2312
2251
  const {
2313
2252
  prefix,
@@ -2319,13 +2258,12 @@ const createParseClassName = (config) => {
2319
2258
  let parenDepth = 0;
2320
2259
  let modifierStart = 0;
2321
2260
  let postfixModifierPosition;
2322
- const len = className.length;
2323
- for (let index2 = 0; index2 < len; index2++) {
2324
- const currentCharacter = className[index2];
2261
+ for (let index2 = 0; index2 < className.length; index2++) {
2262
+ let currentCharacter = className[index2];
2325
2263
  if (bracketDepth === 0 && parenDepth === 0) {
2326
2264
  if (currentCharacter === MODIFIER_SEPARATOR) {
2327
2265
  modifiers.push(className.slice(modifierStart, index2));
2328
- modifierStart = index2 + 1;
2266
+ modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
2329
2267
  continue;
2330
2268
  }
2331
2269
  if (currentCharacter === "/") {
@@ -2333,38 +2271,37 @@ const createParseClassName = (config) => {
2333
2271
  continue;
2334
2272
  }
2335
2273
  }
2336
- if (currentCharacter === "[")
2274
+ if (currentCharacter === "[") {
2337
2275
  bracketDepth++;
2338
- else if (currentCharacter === "]")
2276
+ } else if (currentCharacter === "]") {
2339
2277
  bracketDepth--;
2340
- else if (currentCharacter === "(")
2278
+ } else if (currentCharacter === "(") {
2341
2279
  parenDepth++;
2342
- else if (currentCharacter === ")")
2280
+ } else if (currentCharacter === ")") {
2343
2281
  parenDepth--;
2282
+ }
2344
2283
  }
2345
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2346
- let baseClassName = baseClassNameWithImportantModifier;
2347
- let hasImportantModifier = false;
2348
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2349
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2350
- hasImportantModifier = true;
2351
- } else if (
2352
- /**
2353
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
2354
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
2355
- */
2356
- baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
2357
- ) {
2358
- baseClassName = baseClassNameWithImportantModifier.slice(1);
2359
- hasImportantModifier = true;
2360
- }
2284
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
2285
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
2286
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
2361
2287
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
2362
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2288
+ return {
2289
+ modifiers,
2290
+ hasImportantModifier,
2291
+ baseClassName,
2292
+ maybePostfixModifierPosition
2293
+ };
2363
2294
  };
2364
2295
  if (prefix) {
2365
2296
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
2366
2297
  const parseClassNameOriginal = parseClassName;
2367
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
2298
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
2299
+ isExternal: true,
2300
+ modifiers: [],
2301
+ hasImportantModifier: false,
2302
+ baseClassName: className,
2303
+ maybePostfixModifierPosition: void 0
2304
+ };
2368
2305
  }
2369
2306
  if (experimentalParseClassName) {
2370
2307
  const parseClassNameOriginal = parseClassName;
@@ -2375,35 +2312,36 @@ const createParseClassName = (config) => {
2375
2312
  }
2376
2313
  return parseClassName;
2377
2314
  };
2315
+ const stripImportantModifier = (baseClassName) => {
2316
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
2317
+ return baseClassName.substring(0, baseClassName.length - 1);
2318
+ }
2319
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
2320
+ return baseClassName.substring(1);
2321
+ }
2322
+ return baseClassName;
2323
+ };
2378
2324
  const createSortModifiers = (config) => {
2379
- const modifierWeights = /* @__PURE__ */ new Map();
2380
- config.orderSensitiveModifiers.forEach((mod, index2) => {
2381
- modifierWeights.set(mod, 1e6 + index2);
2382
- });
2383
- return (modifiers) => {
2384
- const result = [];
2385
- let currentSegment = [];
2386
- for (let i2 = 0; i2 < modifiers.length; i2++) {
2387
- const modifier = modifiers[i2];
2388
- const isArbitrary = modifier[0] === "[";
2389
- const isOrderSensitive = modifierWeights.has(modifier);
2390
- if (isArbitrary || isOrderSensitive) {
2391
- if (currentSegment.length > 0) {
2392
- currentSegment.sort();
2393
- result.push(...currentSegment);
2394
- currentSegment = [];
2395
- }
2396
- result.push(modifier);
2325
+ const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
2326
+ const sortModifiers = (modifiers) => {
2327
+ if (modifiers.length <= 1) {
2328
+ return modifiers;
2329
+ }
2330
+ const sortedModifiers = [];
2331
+ let unsortedModifiers = [];
2332
+ modifiers.forEach((modifier) => {
2333
+ const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
2334
+ if (isPositionSensitive) {
2335
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
2336
+ unsortedModifiers = [];
2397
2337
  } else {
2398
- currentSegment.push(modifier);
2338
+ unsortedModifiers.push(modifier);
2399
2339
  }
2400
- }
2401
- if (currentSegment.length > 0) {
2402
- currentSegment.sort();
2403
- result.push(...currentSegment);
2404
- }
2405
- return result;
2340
+ });
2341
+ sortedModifiers.push(...unsortedModifiers.sort());
2342
+ return sortedModifiers;
2406
2343
  };
2344
+ return sortModifiers;
2407
2345
  };
2408
2346
  const createConfigUtils = (config) => ({
2409
2347
  cache: createLruCache(config.cacheSize),
@@ -2449,10 +2387,10 @@ const mergeClassList = (classList, configUtils) => {
2449
2387
  }
2450
2388
  hasPostfixModifier = false;
2451
2389
  }
2452
- const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
2390
+ const variantModifier = sortModifiers(modifiers).join(":");
2453
2391
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2454
2392
  const classId = modifierId + classGroupId;
2455
- if (classGroupsInConflict.indexOf(classId) > -1) {
2393
+ if (classGroupsInConflict.includes(classId)) {
2456
2394
  continue;
2457
2395
  }
2458
2396
  classGroupsInConflict.push(classId);
@@ -2465,13 +2403,13 @@ const mergeClassList = (classList, configUtils) => {
2465
2403
  }
2466
2404
  return result;
2467
2405
  };
2468
- const twJoin = (...classLists) => {
2406
+ function twJoin() {
2469
2407
  let index2 = 0;
2470
2408
  let argument;
2471
2409
  let resolvedValue;
2472
2410
  let string = "";
2473
- while (index2 < classLists.length) {
2474
- if (argument = classLists[index2++]) {
2411
+ while (index2 < arguments.length) {
2412
+ if (argument = arguments[index2++]) {
2475
2413
  if (resolvedValue = toValue(argument)) {
2476
2414
  string && (string += " ");
2477
2415
  string += resolvedValue;
@@ -2479,7 +2417,7 @@ const twJoin = (...classLists) => {
2479
2417
  }
2480
2418
  }
2481
2419
  return string;
2482
- };
2420
+ }
2483
2421
  const toValue = (mix) => {
2484
2422
  if (typeof mix === "string") {
2485
2423
  return mix;
@@ -2496,20 +2434,20 @@ const toValue = (mix) => {
2496
2434
  }
2497
2435
  return string;
2498
2436
  };
2499
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2437
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2500
2438
  let configUtils;
2501
2439
  let cacheGet;
2502
2440
  let cacheSet;
2503
- let functionToCall;
2504
- const initTailwindMerge = (classList) => {
2441
+ let functionToCall = initTailwindMerge;
2442
+ function initTailwindMerge(classList) {
2505
2443
  const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2506
2444
  configUtils = createConfigUtils(config);
2507
2445
  cacheGet = configUtils.cache.get;
2508
2446
  cacheSet = configUtils.cache.set;
2509
2447
  functionToCall = tailwindMerge;
2510
2448
  return tailwindMerge(classList);
2511
- };
2512
- const tailwindMerge = (classList) => {
2449
+ }
2450
+ function tailwindMerge(classList) {
2513
2451
  const cachedResult = cacheGet(classList);
2514
2452
  if (cachedResult) {
2515
2453
  return cachedResult;
@@ -2517,13 +2455,13 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2517
2455
  const result = mergeClassList(classList, configUtils);
2518
2456
  cacheSet(classList, result);
2519
2457
  return result;
2458
+ }
2459
+ return function callTailwindMerge() {
2460
+ return functionToCall(twJoin.apply(null, arguments));
2520
2461
  };
2521
- functionToCall = initTailwindMerge;
2522
- return (...args) => functionToCall(twJoin(...args));
2523
- };
2524
- const fallbackThemeArr = [];
2462
+ }
2525
2463
  const fromTheme = (key) => {
2526
- const themeGetter = (theme2) => theme2[key] || fallbackThemeArr;
2464
+ const themeGetter = (theme2) => theme2[key] || [];
2527
2465
  themeGetter.isThemeGetter = true;
2528
2466
  return themeGetter;
2529
2467
  };
@@ -5165,6 +5103,40 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
5165
5103
  }
5166
5104
  };
5167
5105
  }
5106
+ function setRef(ref, value) {
5107
+ if (typeof ref === "function") {
5108
+ return ref(value);
5109
+ } else if (ref !== null && ref !== void 0) {
5110
+ ref.current = value;
5111
+ }
5112
+ }
5113
+ function composeRefs(...refs) {
5114
+ return (node) => {
5115
+ let hasCleanup = false;
5116
+ const cleanups = refs.map((ref) => {
5117
+ const cleanup = setRef(ref, node);
5118
+ if (!hasCleanup && typeof cleanup == "function") {
5119
+ hasCleanup = true;
5120
+ }
5121
+ return cleanup;
5122
+ });
5123
+ if (hasCleanup) {
5124
+ return () => {
5125
+ for (let i2 = 0; i2 < cleanups.length; i2++) {
5126
+ const cleanup = cleanups[i2];
5127
+ if (typeof cleanup == "function") {
5128
+ cleanup();
5129
+ } else {
5130
+ setRef(refs[i2], null);
5131
+ }
5132
+ }
5133
+ };
5134
+ }
5135
+ };
5136
+ }
5137
+ function useComposedRefs(...refs) {
5138
+ return React$1.useCallback(composeRefs(...refs), refs);
5139
+ }
5168
5140
  function createContext2(rootComponentName, defaultContext) {
5169
5141
  const Context2 = React$1.createContext(defaultContext);
5170
5142
  const Provider2 = (props) => {
@@ -5183,7 +5155,7 @@ function createContext2(rootComponentName, defaultContext) {
5183
5155
  }
5184
5156
  return [Provider2, useContext2];
5185
5157
  }
5186
- function createContextScope$1(scopeName, createContextScopeDeps = []) {
5158
+ function createContextScope(scopeName, createContextScopeDeps = []) {
5187
5159
  let defaultContexts = [];
5188
5160
  function createContext3(rootComponentName, defaultContext) {
5189
5161
  const BaseContext = React$1.createContext(defaultContext);
@@ -5222,9 +5194,9 @@ function createContextScope$1(scopeName, createContextScopeDeps = []) {
5222
5194
  };
5223
5195
  };
5224
5196
  createScope.scopeName = scopeName;
5225
- return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
5197
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
5226
5198
  }
5227
- function composeContextScopes$1(...scopes) {
5199
+ function composeContextScopes(...scopes) {
5228
5200
  const baseScope = scopes[0];
5229
5201
  if (scopes.length === 1)
5230
5202
  return baseScope;
@@ -5324,12 +5296,12 @@ function isFunction(value) {
5324
5296
  return typeof value === "function";
5325
5297
  }
5326
5298
  // @__NO_SIDE_EFFECTS__
5327
- function createSlot$3(ownerName) {
5328
- const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
5299
+ function createSlot(ownerName) {
5300
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
5329
5301
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
5330
5302
  const { children, ...slotProps } = props;
5331
5303
  const childrenArray = React$1.Children.toArray(children);
5332
- const slottable = childrenArray.find(isSlottable$3);
5304
+ const slottable = childrenArray.find(isSlottable);
5333
5305
  if (slottable) {
5334
5306
  const newElement = slottable.props.children;
5335
5307
  const newChildren = childrenArray.map((child) => {
@@ -5349,12 +5321,12 @@ function createSlot$3(ownerName) {
5349
5321
  return Slot2;
5350
5322
  }
5351
5323
  // @__NO_SIDE_EFFECTS__
5352
- function createSlotClone$3(ownerName) {
5324
+ function createSlotClone(ownerName) {
5353
5325
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
5354
5326
  const { children, ...slotProps } = props;
5355
5327
  if (React$1.isValidElement(children)) {
5356
- const childrenRef = getElementRef$4(children);
5357
- const props2 = mergeProps$3(slotProps, children.props);
5328
+ const childrenRef = getElementRef$1(children);
5329
+ const props2 = mergeProps(slotProps, children.props);
5358
5330
  if (children.type !== React$1.Fragment) {
5359
5331
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
5360
5332
  }
@@ -5365,20 +5337,20 @@ function createSlotClone$3(ownerName) {
5365
5337
  SlotClone.displayName = `${ownerName}.SlotClone`;
5366
5338
  return SlotClone;
5367
5339
  }
5368
- var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
5340
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
5369
5341
  // @__NO_SIDE_EFFECTS__
5370
5342
  function createSlottable(ownerName) {
5371
5343
  const Slottable2 = ({ children }) => {
5372
5344
  return /* @__PURE__ */ jsx(Fragment, { children });
5373
5345
  };
5374
5346
  Slottable2.displayName = `${ownerName}.Slottable`;
5375
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER$3;
5347
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
5376
5348
  return Slottable2;
5377
5349
  }
5378
- function isSlottable$3(child) {
5379
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
5350
+ function isSlottable(child) {
5351
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
5380
5352
  }
5381
- function mergeProps$3(slotProps, childProps) {
5353
+ function mergeProps(slotProps, childProps) {
5382
5354
  const overrideProps = { ...childProps };
5383
5355
  for (const propName in childProps) {
5384
5356
  const slotPropValue = slotProps[propName];
@@ -5402,7 +5374,7 @@ function mergeProps$3(slotProps, childProps) {
5402
5374
  }
5403
5375
  return { ...slotProps, ...overrideProps };
5404
5376
  }
5405
- function getElementRef$4(element) {
5377
+ function getElementRef$1(element) {
5406
5378
  var _a, _b;
5407
5379
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
5408
5380
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -5416,7 +5388,7 @@ function getElementRef$4(element) {
5416
5388
  }
5417
5389
  return element.props.ref || element.ref;
5418
5390
  }
5419
- var NODES$3 = [
5391
+ var NODES = [
5420
5392
  "a",
5421
5393
  "button",
5422
5394
  "div",
@@ -5435,8 +5407,8 @@ var NODES$3 = [
5435
5407
  "svg",
5436
5408
  "ul"
5437
5409
  ];
5438
- var Primitive$3 = NODES$3.reduce((primitive, node) => {
5439
- const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
5410
+ var Primitive = NODES.reduce((primitive, node) => {
5411
+ const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
5440
5412
  const Node2 = React$1.forwardRef((props, forwardedRef) => {
5441
5413
  const { asChild, ...primitiveProps } = props;
5442
5414
  const Comp = asChild ? Slot2 : node;
@@ -5569,7 +5541,7 @@ var DismissableLayer = React$1.forwardRef(
5569
5541
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
5570
5542
  }, []);
5571
5543
  return /* @__PURE__ */ jsx(
5572
- Primitive$3.div,
5544
+ Primitive.div,
5573
5545
  {
5574
5546
  ...layerProps,
5575
5547
  ref: composedRefs,
@@ -5602,7 +5574,7 @@ var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
5602
5574
  };
5603
5575
  }
5604
5576
  }, [context.branches]);
5605
- return /* @__PURE__ */ jsx(Primitive$3.div, { ...props, ref: composedRefs });
5577
+ return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
5606
5578
  });
5607
5579
  DismissableLayerBranch.displayName = BRANCH_NAME;
5608
5580
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -5811,7 +5783,7 @@ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
5811
5783
  },
5812
5784
  [loop, trapped, focusScope.paused]
5813
5785
  );
5814
- return /* @__PURE__ */ jsx(Primitive$3.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5786
+ return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5815
5787
  });
5816
5788
  FocusScope.displayName = FOCUS_SCOPE_NAME;
5817
5789
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -5908,7 +5880,7 @@ var Portal$5 = React$1.forwardRef((props, forwardedRef) => {
5908
5880
  const [mounted, setMounted] = React$1.useState(false);
5909
5881
  useLayoutEffect2(() => setMounted(true), []);
5910
5882
  const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
5911
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : null;
5883
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
5912
5884
  });
5913
5885
  Portal$5.displayName = PORTAL_NAME$6;
5914
5886
  function useStateMachine(initialState, machine) {
@@ -5921,7 +5893,7 @@ var Presence = (props) => {
5921
5893
  const { present, children } = props;
5922
5894
  const presence = usePresence(present);
5923
5895
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React$1.Children.only(children);
5924
- const ref = useComposedRefs(presence.ref, getElementRef$3(child));
5896
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
5925
5897
  const forceMount = typeof children === "function";
5926
5898
  return forceMount || presence.isPresent ? React$1.cloneElement(child, { ref }) : null;
5927
5899
  };
@@ -6020,7 +5992,7 @@ function usePresence(present) {
6020
5992
  function getAnimationName(styles) {
6021
5993
  return (styles == null ? void 0 : styles.animationName) || "none";
6022
5994
  }
6023
- function getElementRef$3(element) {
5995
+ function getElementRef(element) {
6024
5996
  var _a, _b;
6025
5997
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
6026
5998
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -6843,7 +6815,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
6843
6815
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
6844
6816
  };
6845
6817
  var DIALOG_NAME = "Dialog";
6846
- var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
6818
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
6847
6819
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
6848
6820
  var Dialog$1 = (props) => {
6849
6821
  const {
@@ -6887,7 +6859,7 @@ var DialogTrigger = React$1.forwardRef(
6887
6859
  const context = useDialogContext(TRIGGER_NAME$5, __scopeDialog);
6888
6860
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
6889
6861
  return /* @__PURE__ */ jsx(
6890
- Primitive$3.button,
6862
+ Primitive.button,
6891
6863
  {
6892
6864
  type: "button",
6893
6865
  "aria-haspopup": "dialog",
@@ -6922,7 +6894,7 @@ var DialogOverlay$1 = React$1.forwardRef(
6922
6894
  }
6923
6895
  );
6924
6896
  DialogOverlay$1.displayName = OVERLAY_NAME;
6925
- var Slot$3 = /* @__PURE__ */ createSlot$3("DialogOverlay.RemoveScroll");
6897
+ var Slot$3 = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll");
6926
6898
  var DialogOverlayImpl = React$1.forwardRef(
6927
6899
  (props, forwardedRef) => {
6928
6900
  const { __scopeDialog, ...overlayProps } = props;
@@ -6931,7 +6903,7 @@ var DialogOverlayImpl = React$1.forwardRef(
6931
6903
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
6932
6904
  // ie. when `Overlay` and `Content` are siblings
6933
6905
  /* @__PURE__ */ jsx(RemoveScroll, { as: Slot$3, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
6934
- Primitive$3.div,
6906
+ Primitive.div,
6935
6907
  {
6936
6908
  "data-state": getState$1(context.open),
6937
6909
  ...overlayProps,
@@ -7076,7 +7048,7 @@ var DialogTitle$1 = React$1.forwardRef(
7076
7048
  (props, forwardedRef) => {
7077
7049
  const { __scopeDialog, ...titleProps } = props;
7078
7050
  const context = useDialogContext(TITLE_NAME, __scopeDialog);
7079
- return /* @__PURE__ */ jsx(Primitive$3.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
7051
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
7080
7052
  }
7081
7053
  );
7082
7054
  DialogTitle$1.displayName = TITLE_NAME;
@@ -7085,7 +7057,7 @@ var DialogDescription$1 = React$1.forwardRef(
7085
7057
  (props, forwardedRef) => {
7086
7058
  const { __scopeDialog, ...descriptionProps } = props;
7087
7059
  const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
7088
- return /* @__PURE__ */ jsx(Primitive$3.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
7060
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
7089
7061
  }
7090
7062
  );
7091
7063
  DialogDescription$1.displayName = DESCRIPTION_NAME;
@@ -7095,7 +7067,7 @@ var DialogClose = React$1.forwardRef(
7095
7067
  const { __scopeDialog, ...closeProps } = props;
7096
7068
  const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
7097
7069
  return /* @__PURE__ */ jsx(
7098
- Primitive$3.button,
7070
+ Primitive.button,
7099
7071
  {
7100
7072
  type: "button",
7101
7073
  ...closeProps,
@@ -8125,7 +8097,7 @@ const DialogContent = React$1.forwardRef(({ className, children, ...props }, ref
8125
8097
  /* @__PURE__ */ jsxs(
8126
8098
  Close,
8127
8099
  {
8128
- className: "closeDialog cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\n",
8100
+ className: "closeDialog cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\r\n",
8129
8101
  children: [
8130
8102
  /* @__PURE__ */ jsx(X$1, { className: "cteditor-h-4 cteditor-w-4" }),
8131
8103
  /* @__PURE__ */ jsx("span", { className: "!cteditor-sr-only", children: "Close" })
@@ -8203,140 +8175,10 @@ const Input$1 = React$1.forwardRef(
8203
8175
  }
8204
8176
  );
8205
8177
  Input$1.displayName = "Input";
8206
- var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
8207
- var use$2 = React$1[" use ".trim().toString()];
8208
- function isPromiseLike$2(value) {
8209
- return typeof value === "object" && value !== null && "then" in value;
8210
- }
8211
- function isLazyComponent$2(element) {
8212
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
8213
- }
8214
- // @__NO_SIDE_EFFECTS__
8215
- function createSlot$2(ownerName) {
8216
- const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
8217
- const Slot2 = React$1.forwardRef((props, forwardedRef) => {
8218
- let { children, ...slotProps } = props;
8219
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
8220
- children = use$2(children._payload);
8221
- }
8222
- const childrenArray = React$1.Children.toArray(children);
8223
- const slottable = childrenArray.find(isSlottable$2);
8224
- if (slottable) {
8225
- const newElement = slottable.props.children;
8226
- const newChildren = childrenArray.map((child) => {
8227
- if (child === slottable) {
8228
- if (React$1.Children.count(newElement) > 1)
8229
- return React$1.Children.only(null);
8230
- return React$1.isValidElement(newElement) ? newElement.props.children : null;
8231
- } else {
8232
- return child;
8233
- }
8234
- });
8235
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
8236
- }
8237
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
8238
- });
8239
- Slot2.displayName = `${ownerName}.Slot`;
8240
- return Slot2;
8241
- }
8242
- // @__NO_SIDE_EFFECTS__
8243
- function createSlotClone$2(ownerName) {
8244
- const SlotClone = React$1.forwardRef((props, forwardedRef) => {
8245
- let { children, ...slotProps } = props;
8246
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
8247
- children = use$2(children._payload);
8248
- }
8249
- if (React$1.isValidElement(children)) {
8250
- const childrenRef = getElementRef$2(children);
8251
- const props2 = mergeProps$2(slotProps, children.props);
8252
- if (children.type !== React$1.Fragment) {
8253
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
8254
- }
8255
- return React$1.cloneElement(children, props2);
8256
- }
8257
- return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
8258
- });
8259
- SlotClone.displayName = `${ownerName}.SlotClone`;
8260
- return SlotClone;
8261
- }
8262
- var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
8263
- function isSlottable$2(child) {
8264
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
8265
- }
8266
- function mergeProps$2(slotProps, childProps) {
8267
- const overrideProps = { ...childProps };
8268
- for (const propName in childProps) {
8269
- const slotPropValue = slotProps[propName];
8270
- const childPropValue = childProps[propName];
8271
- const isHandler = /^on[A-Z]/.test(propName);
8272
- if (isHandler) {
8273
- if (slotPropValue && childPropValue) {
8274
- overrideProps[propName] = (...args) => {
8275
- const result = childPropValue(...args);
8276
- slotPropValue(...args);
8277
- return result;
8278
- };
8279
- } else if (slotPropValue) {
8280
- overrideProps[propName] = slotPropValue;
8281
- }
8282
- } else if (propName === "style") {
8283
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
8284
- } else if (propName === "className") {
8285
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
8286
- }
8287
- }
8288
- return { ...slotProps, ...overrideProps };
8289
- }
8290
- function getElementRef$2(element) {
8291
- var _a, _b;
8292
- let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
8293
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8294
- if (mayWarn) {
8295
- return element.ref;
8296
- }
8297
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
8298
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8299
- if (mayWarn) {
8300
- return element.props.ref;
8301
- }
8302
- return element.props.ref || element.ref;
8303
- }
8304
- var NODES$2 = [
8305
- "a",
8306
- "button",
8307
- "div",
8308
- "form",
8309
- "h2",
8310
- "h3",
8311
- "img",
8312
- "input",
8313
- "label",
8314
- "li",
8315
- "nav",
8316
- "ol",
8317
- "p",
8318
- "select",
8319
- "span",
8320
- "svg",
8321
- "ul"
8322
- ];
8323
- var Primitive$2 = NODES$2.reduce((primitive, node) => {
8324
- const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
8325
- const Node2 = React$1.forwardRef((props, forwardedRef) => {
8326
- const { asChild, ...primitiveProps } = props;
8327
- const Comp = asChild ? Slot2 : node;
8328
- if (typeof window !== "undefined") {
8329
- window[Symbol.for("radix-ui")] = true;
8330
- }
8331
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
8332
- });
8333
- Node2.displayName = `Primitive.${node}`;
8334
- return { ...primitive, [node]: Node2 };
8335
- }, {});
8336
8178
  var NAME$4 = "Label";
8337
8179
  var Label$3 = React$1.forwardRef((props, forwardedRef) => {
8338
8180
  return /* @__PURE__ */ jsx(
8339
- Primitive$2.label,
8181
+ Primitive.label,
8340
8182
  {
8341
8183
  ...props,
8342
8184
  ref: forwardedRef,
@@ -9410,16 +9252,16 @@ function CopyButton({ editor, getCodeDOMNode }) {
9410
9252
  }
9411
9253
  const index$7 = "";
9412
9254
  const PRETTIER_PARSER_MODULES = {
9413
- css: [() => import("./postcss-f084f74d.js")],
9414
- html: [() => import("./html-5586dbf6.js")],
9255
+ css: [() => import("./postcss-c2592f3f.js")],
9256
+ html: [() => import("./html-f95ee5dc.js")],
9415
9257
  js: [
9416
- () => import("./babel-d3085146.js"),
9417
- () => import("./estree-164983f6.js")
9258
+ () => import("./babel-d155920e.js"),
9259
+ () => import("./estree-b1fff53b.js")
9418
9260
  ],
9419
- markdown: [() => import("./markdown-d513479b.js")],
9261
+ markdown: [() => import("./markdown-1d9e6c3f.js")],
9420
9262
  typescript: [
9421
- () => import("./typescript-b1005db4.js"),
9422
- () => import("./estree-164983f6.js")
9263
+ () => import("./typescript-48c10f50.js"),
9264
+ () => import("./estree-b1fff53b.js")
9423
9265
  ]
9424
9266
  };
9425
9267
  async function loadPrettierParserByLang(lang) {
@@ -9430,7 +9272,7 @@ async function loadPrettierParserByLang(lang) {
9430
9272
  return modules;
9431
9273
  }
9432
9274
  async function loadPrettierFormat() {
9433
- const { format } = await import("./standalone-5a8c6b7e.js");
9275
+ const { format } = await import("./standalone-bcc7f37a.js");
9434
9276
  return format;
9435
9277
  }
9436
9278
  const PRETTIER_OPTIONS_BY_LANG = {
@@ -9907,199 +9749,6 @@ function $createCommentedTextNode(text, commentId, commentText, commentAuthor, c
9907
9749
  function $isCommentedTextNode(node) {
9908
9750
  return node instanceof CommentedTextNode;
9909
9751
  }
9910
- function createContextScope(scopeName, createContextScopeDeps = []) {
9911
- let defaultContexts = [];
9912
- function createContext3(rootComponentName, defaultContext) {
9913
- const BaseContext = React$1.createContext(defaultContext);
9914
- BaseContext.displayName = rootComponentName + "Context";
9915
- const index2 = defaultContexts.length;
9916
- defaultContexts = [...defaultContexts, defaultContext];
9917
- const Provider2 = (props) => {
9918
- var _a;
9919
- const { scope, children, ...context } = props;
9920
- const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9921
- const value = React$1.useMemo(() => context, Object.values(context));
9922
- return /* @__PURE__ */ jsx(Context2.Provider, { value, children });
9923
- };
9924
- Provider2.displayName = rootComponentName + "Provider";
9925
- function useContext2(consumerName, scope) {
9926
- var _a;
9927
- const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9928
- const context = React$1.useContext(Context2);
9929
- if (context)
9930
- return context;
9931
- if (defaultContext !== void 0)
9932
- return defaultContext;
9933
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
9934
- }
9935
- return [Provider2, useContext2];
9936
- }
9937
- const createScope = () => {
9938
- const scopeContexts = defaultContexts.map((defaultContext) => {
9939
- return React$1.createContext(defaultContext);
9940
- });
9941
- return function useScope(scope) {
9942
- const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
9943
- return React$1.useMemo(
9944
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
9945
- [scope, contexts]
9946
- );
9947
- };
9948
- };
9949
- createScope.scopeName = scopeName;
9950
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
9951
- }
9952
- function composeContextScopes(...scopes) {
9953
- const baseScope = scopes[0];
9954
- if (scopes.length === 1)
9955
- return baseScope;
9956
- const createScope = () => {
9957
- const scopeHooks = scopes.map((createScope2) => ({
9958
- useScope: createScope2(),
9959
- scopeName: createScope2.scopeName
9960
- }));
9961
- return function useComposedScopes(overrideScopes) {
9962
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
9963
- const scopeProps = useScope(overrideScopes);
9964
- const currentScope = scopeProps[`__scope${scopeName}`];
9965
- return { ...nextScopes2, ...currentScope };
9966
- }, {});
9967
- return React$1.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
9968
- };
9969
- };
9970
- createScope.scopeName = baseScope.scopeName;
9971
- return createScope;
9972
- }
9973
- var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
9974
- var use$1 = React$1[" use ".trim().toString()];
9975
- function isPromiseLike$1(value) {
9976
- return typeof value === "object" && value !== null && "then" in value;
9977
- }
9978
- function isLazyComponent$1(element) {
9979
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
9980
- }
9981
- // @__NO_SIDE_EFFECTS__
9982
- function createSlot$1(ownerName) {
9983
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
9984
- const Slot2 = React$1.forwardRef((props, forwardedRef) => {
9985
- let { children, ...slotProps } = props;
9986
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
9987
- children = use$1(children._payload);
9988
- }
9989
- const childrenArray = React$1.Children.toArray(children);
9990
- const slottable = childrenArray.find(isSlottable$1);
9991
- if (slottable) {
9992
- const newElement = slottable.props.children;
9993
- const newChildren = childrenArray.map((child) => {
9994
- if (child === slottable) {
9995
- if (React$1.Children.count(newElement) > 1)
9996
- return React$1.Children.only(null);
9997
- return React$1.isValidElement(newElement) ? newElement.props.children : null;
9998
- } else {
9999
- return child;
10000
- }
10001
- });
10002
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
10003
- }
10004
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
10005
- });
10006
- Slot2.displayName = `${ownerName}.Slot`;
10007
- return Slot2;
10008
- }
10009
- // @__NO_SIDE_EFFECTS__
10010
- function createSlotClone$1(ownerName) {
10011
- const SlotClone = React$1.forwardRef((props, forwardedRef) => {
10012
- let { children, ...slotProps } = props;
10013
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
10014
- children = use$1(children._payload);
10015
- }
10016
- if (React$1.isValidElement(children)) {
10017
- const childrenRef = getElementRef$1(children);
10018
- const props2 = mergeProps$1(slotProps, children.props);
10019
- if (children.type !== React$1.Fragment) {
10020
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10021
- }
10022
- return React$1.cloneElement(children, props2);
10023
- }
10024
- return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
10025
- });
10026
- SlotClone.displayName = `${ownerName}.SlotClone`;
10027
- return SlotClone;
10028
- }
10029
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
10030
- function isSlottable$1(child) {
10031
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
10032
- }
10033
- function mergeProps$1(slotProps, childProps) {
10034
- const overrideProps = { ...childProps };
10035
- for (const propName in childProps) {
10036
- const slotPropValue = slotProps[propName];
10037
- const childPropValue = childProps[propName];
10038
- const isHandler = /^on[A-Z]/.test(propName);
10039
- if (isHandler) {
10040
- if (slotPropValue && childPropValue) {
10041
- overrideProps[propName] = (...args) => {
10042
- const result = childPropValue(...args);
10043
- slotPropValue(...args);
10044
- return result;
10045
- };
10046
- } else if (slotPropValue) {
10047
- overrideProps[propName] = slotPropValue;
10048
- }
10049
- } else if (propName === "style") {
10050
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10051
- } else if (propName === "className") {
10052
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10053
- }
10054
- }
10055
- return { ...slotProps, ...overrideProps };
10056
- }
10057
- function getElementRef$1(element) {
10058
- var _a, _b;
10059
- let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
10060
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10061
- if (mayWarn) {
10062
- return element.ref;
10063
- }
10064
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
10065
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10066
- if (mayWarn) {
10067
- return element.props.ref;
10068
- }
10069
- return element.props.ref || element.ref;
10070
- }
10071
- var NODES$1 = [
10072
- "a",
10073
- "button",
10074
- "div",
10075
- "form",
10076
- "h2",
10077
- "h3",
10078
- "img",
10079
- "input",
10080
- "label",
10081
- "li",
10082
- "nav",
10083
- "ol",
10084
- "p",
10085
- "select",
10086
- "span",
10087
- "svg",
10088
- "ul"
10089
- ];
10090
- var Primitive$1 = NODES$1.reduce((primitive, node) => {
10091
- const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
10092
- const Node2 = React$1.forwardRef((props, forwardedRef) => {
10093
- const { asChild, ...primitiveProps } = props;
10094
- const Comp = asChild ? Slot2 : node;
10095
- if (typeof window !== "undefined") {
10096
- window[Symbol.for("radix-ui")] = true;
10097
- }
10098
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
10099
- });
10100
- Node2.displayName = `Primitive.${node}`;
10101
- return { ...primitive, [node]: Node2 };
10102
- }, {});
10103
9752
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
10104
9753
  function getDefaultExportFromCjs(x2) {
10105
9754
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -10185,7 +9834,7 @@ var Avatar$1 = React$1.forwardRef(
10185
9834
  scope: __scopeAvatar,
10186
9835
  imageLoadingStatus,
10187
9836
  onImageLoadingStatusChange: setImageLoadingStatus,
10188
- children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
9837
+ children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
10189
9838
  }
10190
9839
  );
10191
9840
  }
@@ -10207,7 +9856,7 @@ var AvatarImage$1 = React$1.forwardRef(
10207
9856
  handleLoadingStatusChange(imageLoadingStatus);
10208
9857
  }
10209
9858
  }, [imageLoadingStatus, handleLoadingStatusChange]);
10210
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
9859
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
10211
9860
  }
10212
9861
  );
10213
9862
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -10223,7 +9872,7 @@ var AvatarFallback$1 = React$1.forwardRef(
10223
9872
  return () => window.clearTimeout(timerId);
10224
9873
  }
10225
9874
  }, [delayMs]);
10226
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
9875
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
10227
9876
  }
10228
9877
  );
10229
9878
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -10368,136 +10017,6 @@ const CardFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PU
10368
10017
  }
10369
10018
  ));
10370
10019
  CardFooter.displayName = "CardFooter";
10371
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
10372
- var use = React$1[" use ".trim().toString()];
10373
- function isPromiseLike(value) {
10374
- return typeof value === "object" && value !== null && "then" in value;
10375
- }
10376
- function isLazyComponent(element) {
10377
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
10378
- }
10379
- // @__NO_SIDE_EFFECTS__
10380
- function createSlot(ownerName) {
10381
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
10382
- const Slot2 = React$1.forwardRef((props, forwardedRef) => {
10383
- let { children, ...slotProps } = props;
10384
- if (isLazyComponent(children) && typeof use === "function") {
10385
- children = use(children._payload);
10386
- }
10387
- const childrenArray = React$1.Children.toArray(children);
10388
- const slottable = childrenArray.find(isSlottable);
10389
- if (slottable) {
10390
- const newElement = slottable.props.children;
10391
- const newChildren = childrenArray.map((child) => {
10392
- if (child === slottable) {
10393
- if (React$1.Children.count(newElement) > 1)
10394
- return React$1.Children.only(null);
10395
- return React$1.isValidElement(newElement) ? newElement.props.children : null;
10396
- } else {
10397
- return child;
10398
- }
10399
- });
10400
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
10401
- }
10402
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
10403
- });
10404
- Slot2.displayName = `${ownerName}.Slot`;
10405
- return Slot2;
10406
- }
10407
- // @__NO_SIDE_EFFECTS__
10408
- function createSlotClone(ownerName) {
10409
- const SlotClone = React$1.forwardRef((props, forwardedRef) => {
10410
- let { children, ...slotProps } = props;
10411
- if (isLazyComponent(children) && typeof use === "function") {
10412
- children = use(children._payload);
10413
- }
10414
- if (React$1.isValidElement(children)) {
10415
- const childrenRef = getElementRef(children);
10416
- const props2 = mergeProps(slotProps, children.props);
10417
- if (children.type !== React$1.Fragment) {
10418
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10419
- }
10420
- return React$1.cloneElement(children, props2);
10421
- }
10422
- return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
10423
- });
10424
- SlotClone.displayName = `${ownerName}.SlotClone`;
10425
- return SlotClone;
10426
- }
10427
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
10428
- function isSlottable(child) {
10429
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
10430
- }
10431
- function mergeProps(slotProps, childProps) {
10432
- const overrideProps = { ...childProps };
10433
- for (const propName in childProps) {
10434
- const slotPropValue = slotProps[propName];
10435
- const childPropValue = childProps[propName];
10436
- const isHandler = /^on[A-Z]/.test(propName);
10437
- if (isHandler) {
10438
- if (slotPropValue && childPropValue) {
10439
- overrideProps[propName] = (...args) => {
10440
- const result = childPropValue(...args);
10441
- slotPropValue(...args);
10442
- return result;
10443
- };
10444
- } else if (slotPropValue) {
10445
- overrideProps[propName] = slotPropValue;
10446
- }
10447
- } else if (propName === "style") {
10448
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10449
- } else if (propName === "className") {
10450
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10451
- }
10452
- }
10453
- return { ...slotProps, ...overrideProps };
10454
- }
10455
- function getElementRef(element) {
10456
- var _a, _b;
10457
- let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
10458
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10459
- if (mayWarn) {
10460
- return element.ref;
10461
- }
10462
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
10463
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10464
- if (mayWarn) {
10465
- return element.props.ref;
10466
- }
10467
- return element.props.ref || element.ref;
10468
- }
10469
- var NODES = [
10470
- "a",
10471
- "button",
10472
- "div",
10473
- "form",
10474
- "h2",
10475
- "h3",
10476
- "img",
10477
- "input",
10478
- "label",
10479
- "li",
10480
- "nav",
10481
- "ol",
10482
- "p",
10483
- "select",
10484
- "span",
10485
- "svg",
10486
- "ul"
10487
- ];
10488
- var Primitive = NODES.reduce((primitive, node) => {
10489
- const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
10490
- const Node2 = React$1.forwardRef((props, forwardedRef) => {
10491
- const { asChild, ...primitiveProps } = props;
10492
- const Comp = asChild ? Slot2 : node;
10493
- if (typeof window !== "undefined") {
10494
- window[Symbol.for("radix-ui")] = true;
10495
- }
10496
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
10497
- });
10498
- Node2.displayName = `Primitive.${node}`;
10499
- return { ...primitive, [node]: Node2 };
10500
- }, {});
10501
10020
  var NAME$3 = "Separator";
10502
10021
  var DEFAULT_ORIENTATION = "horizontal";
10503
10022
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -10624,7 +10143,7 @@ const SheetDescription = React$1.forwardRef(({ className, ...props }, ref) => /*
10624
10143
  SheetDescription.displayName = Description.displayName;
10625
10144
  function createCollection(name) {
10626
10145
  const PROVIDER_NAME2 = name + "CollectionProvider";
10627
- const [createCollectionContext, createCollectionScope2] = createContextScope$1(PROVIDER_NAME2);
10146
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
10628
10147
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
10629
10148
  PROVIDER_NAME2,
10630
10149
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -10637,7 +10156,7 @@ function createCollection(name) {
10637
10156
  };
10638
10157
  CollectionProvider.displayName = PROVIDER_NAME2;
10639
10158
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
10640
- const CollectionSlotImpl = /* @__PURE__ */ createSlot$3(COLLECTION_SLOT_NAME);
10159
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
10641
10160
  const CollectionSlot = React__default.forwardRef(
10642
10161
  (props, forwardedRef) => {
10643
10162
  const { scope, children } = props;
@@ -10649,7 +10168,7 @@ function createCollection(name) {
10649
10168
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
10650
10169
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
10651
10170
  const ITEM_DATA_ATTR = "data-radix-collection-item";
10652
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$3(ITEM_SLOT_NAME);
10171
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
10653
10172
  const CollectionItemSlot = React__default.forwardRef(
10654
10173
  (props, forwardedRef) => {
10655
10174
  const { scope, children, ...itemData } = props;
@@ -10694,7 +10213,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
10694
10213
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
10695
10214
  var GROUP_NAME$3 = "RovingFocusGroup";
10696
10215
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(GROUP_NAME$3);
10697
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
10216
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
10698
10217
  GROUP_NAME$3,
10699
10218
  [createCollectionScope$2]
10700
10219
  );
@@ -10761,7 +10280,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((props, forwardedRef) => {
10761
10280
  []
10762
10281
  ),
10763
10282
  children: /* @__PURE__ */ jsx(
10764
- Primitive$3.div,
10283
+ Primitive.div,
10765
10284
  {
10766
10285
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
10767
10286
  "data-orientation": orientation,
@@ -10826,7 +10345,7 @@ var RovingFocusGroupItem = React$1.forwardRef(
10826
10345
  focusable,
10827
10346
  active,
10828
10347
  children: /* @__PURE__ */ jsx(
10829
- Primitive$3.span,
10348
+ Primitive.span,
10830
10349
  {
10831
10350
  tabIndex: isCurrentTabStop ? 0 : -1,
10832
10351
  "data-orientation": context.orientation,
@@ -10911,7 +10430,7 @@ function wrapArray$2(array, startIndex) {
10911
10430
  var Root$2 = RovingFocusGroup;
10912
10431
  var Item$1 = RovingFocusGroupItem;
10913
10432
  var TABS_NAME = "Tabs";
10914
- var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
10433
+ var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
10915
10434
  createRovingFocusGroupScope
10916
10435
  ]);
10917
10436
  var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
@@ -10946,7 +10465,7 @@ var Tabs$1 = React$1.forwardRef(
10946
10465
  dir: direction,
10947
10466
  activationMode,
10948
10467
  children: /* @__PURE__ */ jsx(
10949
- Primitive$3.div,
10468
+ Primitive.div,
10950
10469
  {
10951
10470
  dir: direction,
10952
10471
  "data-orientation": orientation,
@@ -10974,7 +10493,7 @@ var TabsList$1 = React$1.forwardRef(
10974
10493
  dir: context.dir,
10975
10494
  loop,
10976
10495
  children: /* @__PURE__ */ jsx(
10977
- Primitive$3.div,
10496
+ Primitive.div,
10978
10497
  {
10979
10498
  role: "tablist",
10980
10499
  "aria-orientation": context.orientation,
@@ -11004,7 +10523,7 @@ var TabsTrigger$1 = React$1.forwardRef(
11004
10523
  focusable: !disabled,
11005
10524
  active: isSelected,
11006
10525
  children: /* @__PURE__ */ jsx(
11007
- Primitive$3.button,
10526
+ Primitive.button,
11008
10527
  {
11009
10528
  type: "button",
11010
10529
  role: "tab",
@@ -11054,7 +10573,7 @@ var TabsContent$1 = React$1.forwardRef(
11054
10573
  return () => cancelAnimationFrame(rAF);
11055
10574
  }, []);
11056
10575
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
11057
- Primitive$3.div,
10576
+ Primitive.div,
11058
10577
  {
11059
10578
  "data-state": isSelected ? "active" : "inactive",
11060
10579
  "data-orientation": context.orientation,
@@ -13476,7 +12995,7 @@ var NAME$2 = "Arrow";
13476
12995
  var Arrow$1 = React$1.forwardRef((props, forwardedRef) => {
13477
12996
  const { children, width = 10, height = 5, ...arrowProps } = props;
13478
12997
  return /* @__PURE__ */ jsx(
13479
- Primitive$3.svg,
12998
+ Primitive.svg,
13480
12999
  {
13481
13000
  ...arrowProps,
13482
13001
  ref: forwardedRef,
@@ -13525,7 +13044,7 @@ function useSize(element) {
13525
13044
  return size2;
13526
13045
  }
13527
13046
  var POPPER_NAME = "Popper";
13528
- var [createPopperContext, createPopperScope] = createContextScope$1(POPPER_NAME);
13047
+ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
13529
13048
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
13530
13049
  var Popper = (props) => {
13531
13050
  const { __scopePopper, children } = props;
@@ -13548,7 +13067,7 @@ var PopperAnchor = React$1.forwardRef(
13548
13067
  context.onAnchorChange(anchorRef.current);
13549
13068
  }
13550
13069
  });
13551
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$3.div, { ...anchorProps, ref: composedRefs });
13070
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
13552
13071
  }
13553
13072
  );
13554
13073
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -13677,7 +13196,7 @@ var PopperContent = React$1.forwardRef(
13677
13196
  arrowY,
13678
13197
  shouldHideArrow: cannotCenterArrow,
13679
13198
  children: /* @__PURE__ */ jsx(
13680
- Primitive$3.div,
13199
+ Primitive.div,
13681
13200
  {
13682
13201
  "data-side": placedSide,
13683
13202
  "data-align": placedAlign,
@@ -13813,7 +13332,7 @@ var NAME$1 = "VisuallyHidden";
13813
13332
  var VisuallyHidden = React$1.forwardRef(
13814
13333
  (props, forwardedRef) => {
13815
13334
  return /* @__PURE__ */ jsx(
13816
- Primitive$3.span,
13335
+ Primitive.span,
13817
13336
  {
13818
13337
  ...props,
13819
13338
  ref: forwardedRef,
@@ -13824,7 +13343,7 @@ var VisuallyHidden = React$1.forwardRef(
13824
13343
  );
13825
13344
  VisuallyHidden.displayName = NAME$1;
13826
13345
  var Root = VisuallyHidden;
13827
- var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
13346
+ var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
13828
13347
  createPopperScope
13829
13348
  ]);
13830
13349
  var usePopperScope$3 = createPopperScope();
@@ -13985,7 +13504,7 @@ var TooltipTrigger$1 = React$1.forwardRef(
13985
13504
  return () => document.removeEventListener("pointerup", handlePointerUp);
13986
13505
  }, [handlePointerUp]);
13987
13506
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
13988
- Primitive$3.button,
13507
+ Primitive.button,
13989
13508
  {
13990
13509
  "aria-describedby": context.open ? context.contentId : void 0,
13991
13510
  "data-state": context.stateAttribute,
@@ -14337,7 +13856,7 @@ const CommentToggle = ({
14337
13856
  return /* @__PURE__ */ jsx(
14338
13857
  "div",
14339
13858
  {
14340
- className: "cteditor-flex cteditor-bg-background cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-h-11 cteditor-items-center cteditor-justify-center cteditor-ml-2 max-md:cteditor-hidden\n",
13859
+ className: "cteditor-flex dark:cteditor-bg-background cteditor-bg-foreground/5 cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-h-11 cteditor-items-center cteditor-justify-center cteditor-ml-2 max-md:cteditor-hidden",
14341
13860
  children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
14342
13861
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
14343
13862
  Button,
@@ -14608,7 +14127,7 @@ const HtmlViewDisplay = () => {
14608
14127
  onBlur: handleTextareaBlur,
14609
14128
  onClick: handleTextareaClick,
14610
14129
  onKeyDown: handleTextareaKeyDown,
14611
- className: " cteditor-w-full cteditor-flex-1\n cteditor-font-mono cteditor-text-[13px] \n cteditor-p-3 \n cteditor-border cteditor-rounded-lg \n cteditor-resize-y cteditor-leading-[1.4] \n cteditor-outline-none cteditor-transition-colors cteditor-duration-200 \n cteditor-whitespace-pre-wrap cteditor-break-words\n dark:cteditor-text-background\n cteditor-text-foreground\n cteditor-bg-foreground/5\n",
14130
+ className: " cteditor-w-full cteditor-flex-1\r\n cteditor-font-mono cteditor-text-[13px] \r\n cteditor-p-3 \r\n cteditor-border cteditor-rounded-lg \r\n cteditor-resize-y cteditor-leading-[1.4] \r\n cteditor-outline-none cteditor-transition-colors cteditor-duration-200 \r\n cteditor-whitespace-pre-wrap cteditor-break-words\r\n dark:cteditor-text-background\r\n cteditor-text-foreground\r\n cteditor-bg-foreground/5\r\n",
14612
14131
  placeholder: "HTML content will appear here... Edit and click 'Sync to Editor' to apply changes."
14613
14132
  }
14614
14133
  )
@@ -15814,7 +15333,7 @@ const EmbedComponent = ({ url, displayType, alignment, width: initialWidth, heig
15814
15333
  }
15815
15334
  );
15816
15335
  };
15817
- const FileComponent = React$1.lazy(() => import("./index-e7705f79.js"));
15336
+ const FileComponent = React$1.lazy(() => import("./index-f66d9237.js"));
15818
15337
  function convertFileElement(domNode) {
15819
15338
  if (domNode instanceof HTMLDivElement) {
15820
15339
  const dataUrl = domNode.getAttribute("data-lexical-file-src");
@@ -16297,7 +15816,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
16297
15816
  var SELECTION_KEYS$1 = [" ", "Enter"];
16298
15817
  var SELECT_NAME = "Select";
16299
15818
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(SELECT_NAME);
16300
- var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
15819
+ var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
16301
15820
  createCollectionScope$1,
16302
15821
  createPopperScope
16303
15822
  ]);
@@ -16434,7 +15953,7 @@ var SelectTrigger$1 = React$1.forwardRef(
16434
15953
  }
16435
15954
  };
16436
15955
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
16437
- Primitive$3.button,
15956
+ Primitive.button,
16438
15957
  {
16439
15958
  type: "button",
16440
15959
  role: "combobox",
@@ -16495,7 +16014,7 @@ var SelectValue$1 = React$1.forwardRef(
16495
16014
  onValueNodeHasChildrenChange(hasChildren);
16496
16015
  }, [onValueNodeHasChildrenChange, hasChildren]);
16497
16016
  return /* @__PURE__ */ jsx(
16498
- Primitive$3.span,
16017
+ Primitive.span,
16499
16018
  {
16500
16019
  ...valueProps,
16501
16020
  ref: composedRefs,
@@ -16510,7 +16029,7 @@ var ICON_NAME = "SelectIcon";
16510
16029
  var SelectIcon = React$1.forwardRef(
16511
16030
  (props, forwardedRef) => {
16512
16031
  const { __scopeSelect, children, ...iconProps } = props;
16513
- return /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
16032
+ return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
16514
16033
  }
16515
16034
  );
16516
16035
  SelectIcon.displayName = ICON_NAME;
@@ -16541,7 +16060,7 @@ SelectContent$1.displayName = CONTENT_NAME$3;
16541
16060
  var CONTENT_MARGIN = 10;
16542
16061
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$3);
16543
16062
  var CONTENT_IMPL_NAME = "SelectContentImpl";
16544
- var Slot$2 = /* @__PURE__ */ createSlot$3("SelectContent.RemoveScroll");
16063
+ var Slot$2 = /* @__PURE__ */ createSlot("SelectContent.RemoveScroll");
16545
16064
  var SelectContentImpl = React$1.forwardRef(
16546
16065
  (props, forwardedRef) => {
16547
16066
  const {
@@ -16930,7 +16449,7 @@ var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
16930
16449
  zIndex: contentZIndex
16931
16450
  },
16932
16451
  children: /* @__PURE__ */ jsx(
16933
- Primitive$3.div,
16452
+ Primitive.div,
16934
16453
  {
16935
16454
  ...popperProps,
16936
16455
  ref: composedRefs,
@@ -17004,7 +16523,7 @@ var SelectViewport = React$1.forwardRef(
17004
16523
  }
17005
16524
  ),
17006
16525
  /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
17007
- Primitive$3.div,
16526
+ Primitive.div,
17008
16527
  {
17009
16528
  "data-radix-select-viewport": "",
17010
16529
  role: "presentation",
@@ -17059,7 +16578,7 @@ var SelectGroup = React$1.forwardRef(
17059
16578
  (props, forwardedRef) => {
17060
16579
  const { __scopeSelect, ...groupProps } = props;
17061
16580
  const groupId = useId();
17062
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
16581
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
17063
16582
  }
17064
16583
  );
17065
16584
  SelectGroup.displayName = GROUP_NAME$2;
@@ -17068,7 +16587,7 @@ var SelectLabel$1 = React$1.forwardRef(
17068
16587
  (props, forwardedRef) => {
17069
16588
  const { __scopeSelect, ...labelProps } = props;
17070
16589
  const groupContext = useSelectGroupContext(LABEL_NAME$2, __scopeSelect);
17071
- return /* @__PURE__ */ jsx(Primitive$3.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
16590
+ return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
17072
16591
  }
17073
16592
  );
17074
16593
  SelectLabel$1.displayName = LABEL_NAME$2;
@@ -17127,7 +16646,7 @@ var SelectItem$1 = React$1.forwardRef(
17127
16646
  disabled,
17128
16647
  textValue,
17129
16648
  children: /* @__PURE__ */ jsx(
17130
- Primitive$3.div,
16649
+ Primitive.div,
17131
16650
  {
17132
16651
  role: "option",
17133
16652
  "aria-labelledby": textId,
@@ -17215,7 +16734,7 @@ var SelectItemText = React$1.forwardRef(
17215
16734
  return () => onNativeOptionRemove(nativeOption);
17216
16735
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
17217
16736
  return /* @__PURE__ */ jsxs(Fragment, { children: [
17218
- /* @__PURE__ */ jsx(Primitive$3.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
16737
+ /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
17219
16738
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
17220
16739
  ] });
17221
16740
  }
@@ -17226,7 +16745,7 @@ var SelectItemIndicator = React$1.forwardRef(
17226
16745
  (props, forwardedRef) => {
17227
16746
  const { __scopeSelect, ...itemIndicatorProps } = props;
17228
16747
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
17229
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
16748
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
17230
16749
  }
17231
16750
  );
17232
16751
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -17317,7 +16836,7 @@ var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
17317
16836
  (_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
17318
16837
  }, [getItems]);
17319
16838
  return /* @__PURE__ */ jsx(
17320
- Primitive$3.div,
16839
+ Primitive.div,
17321
16840
  {
17322
16841
  "aria-hidden": true,
17323
16842
  ...scrollIndicatorProps,
@@ -17345,7 +16864,7 @@ var SEPARATOR_NAME$2 = "SelectSeparator";
17345
16864
  var SelectSeparator$1 = React$1.forwardRef(
17346
16865
  (props, forwardedRef) => {
17347
16866
  const { __scopeSelect, ...separatorProps } = props;
17348
- return /* @__PURE__ */ jsx(Primitive$3.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
16867
+ return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
17349
16868
  }
17350
16869
  );
17351
16870
  SelectSeparator$1.displayName = SEPARATOR_NAME$2;
@@ -17383,7 +16902,7 @@ var SelectBubbleInput = React$1.forwardRef(
17383
16902
  }
17384
16903
  }, [prevValue, value]);
17385
16904
  return /* @__PURE__ */ jsx(
17386
- Primitive$3.select,
16905
+ Primitive.select,
17387
16906
  {
17388
16907
  ...props,
17389
16908
  style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
@@ -17584,57 +17103,123 @@ const UnderlineIcon = () => /* @__PURE__ */ jsx(
17584
17103
  )
17585
17104
  }
17586
17105
  );
17587
- const ItalicIcon = () => /* @__PURE__ */ jsx(
17106
+ const ItalicIcon = () => /* @__PURE__ */ jsxs(
17588
17107
  "svg",
17589
17108
  {
17590
- width: "24",
17591
- height: "24",
17592
- viewBox: "0 0 24 24",
17109
+ width: "28",
17110
+ height: "28",
17111
+ viewBox: "0 0 28 28",
17593
17112
  fill: "none",
17594
17113
  xmlns: "http://www.w3.org/2000/svg",
17595
- children: /* @__PURE__ */ jsx(
17596
- "path",
17597
- {
17598
- d: "M14 6H16.6666M14 6H11.3333M14 6L9.99998 18M9.99998 18H12.6666M9.99998 18H7.33331",
17599
- stroke: "currentColor",
17600
- strokeLinecap: "round",
17601
- strokeLinejoin: "round"
17602
- }
17603
- )
17114
+ children: [
17115
+ /* @__PURE__ */ jsx(
17116
+ "path",
17117
+ {
17118
+ d: "M18.6666 8.66663H12.6666",
17119
+ stroke: "currentColor",
17120
+ strokeWidth: "1.33333",
17121
+ strokeLinecap: "round",
17122
+ strokeLinejoin: "round"
17123
+ }
17124
+ ),
17125
+ /* @__PURE__ */ jsx(
17126
+ "path",
17127
+ {
17128
+ d: "M15.3334 19.3334H9.33337",
17129
+ stroke: "currentColor",
17130
+ strokeWidth: "1.33333",
17131
+ strokeLinecap: "round",
17132
+ strokeLinejoin: "round"
17133
+ }
17134
+ ),
17135
+ /* @__PURE__ */ jsx(
17136
+ "path",
17137
+ {
17138
+ d: "M16 8.66663L12 19.3333",
17139
+ stroke: "currentColor",
17140
+ strokeWidth: "1.33333",
17141
+ strokeLinecap: "round",
17142
+ strokeLinejoin: "round"
17143
+ }
17144
+ )
17145
+ ]
17604
17146
  }
17605
17147
  );
17606
- const StrikethroughIcon = () => /* @__PURE__ */ jsx(
17148
+ const StrikethroughIcon = () => /* @__PURE__ */ jsxs(
17607
17149
  "svg",
17608
17150
  {
17609
- width: "24",
17610
- height: "24",
17611
- viewBox: "0 0 24 24",
17151
+ width: "28",
17152
+ height: "28",
17153
+ viewBox: "0 0 28 28",
17612
17154
  fill: "none",
17613
17155
  xmlns: "http://www.w3.org/2000/svg",
17614
- children: /* @__PURE__ */ jsx(
17615
- "path",
17616
- {
17617
- d: "M19.1828 12.4156H13.1708C12.9051 12.3442 12.6381 12.2773 12.37 12.2151C10.6892 11.8177 9.73872 11.5268 9.73872 10.1662C9.72514 9.93138 9.75995 9.69624 9.84098 9.47539C9.92201 9.25454 10.0475 9.05268 10.2098 8.88233C10.7185 8.46472 11.3551 8.2344 12.0132 8.22991C13.7072 8.18801 14.4883 8.76262 15.1269 9.63652L16.0936 8.93022C15.6412 8.28026 15.0244 7.7621 14.3061 7.42873C13.5878 7.09535 12.7939 6.95871 12.0055 7.03279C11.037 7.03882 10.1027 7.39152 9.3718 8.027C9.09485 8.30808 8.87837 8.64288 8.73569 9.01079C8.59302 9.3787 8.52717 9.77192 8.5422 10.1662C8.51585 10.5977 8.59686 11.0291 8.77798 11.4216C8.9591 11.8141 9.23469 12.1557 9.5801 12.4156H4.81738V13.6127H12.9889C14.1662 13.9539 14.8701 14.398 14.8881 15.6227C14.9075 15.8843 14.8716 16.147 14.7827 16.3938C14.6938 16.6406 14.5539 16.8659 14.3721 17.055C13.7389 17.5545 12.9519 17.8187 12.1455 17.8026C11.5436 17.7854 10.9536 17.6314 10.42 17.3523C9.88648 17.0733 9.42343 16.6764 9.06594 16.1919L8.14835 16.9605C8.61339 17.5799 9.21328 18.0854 9.90258 18.4387C10.5919 18.792 11.3525 18.9839 12.127 18.9997H12.1868C13.2922 19.0124 14.3651 18.6258 15.2083 17.911C15.5075 17.6092 15.7402 17.248 15.8912 16.8508C16.0422 16.4536 16.1083 16.0291 16.0852 15.6047C16.1077 14.8788 15.8627 14.1699 15.3969 13.6127H19.1828V12.4156Z",
17618
- fill: "currentColor"
17619
- }
17620
- )
17156
+ children: [
17157
+ /* @__PURE__ */ jsx(
17158
+ "path",
17159
+ {
17160
+ d: "M16.6666 8.66663H12C11.6799 8.66646 11.3645 8.7431 11.0802 8.89012C10.7959 9.03713 10.5511 9.25023 10.3662 9.5115C10.1814 9.77277 10.0619 10.0746 10.0179 10.3916C9.97389 10.7086 10.0066 11.0315 10.1133 11.3333",
17161
+ stroke: "#D1D5DC",
17162
+ strokeWidth: "1.33333",
17163
+ strokeLinecap: "round",
17164
+ strokeLinejoin: "round"
17165
+ }
17166
+ ),
17167
+ /* @__PURE__ */ jsx(
17168
+ "path",
17169
+ {
17170
+ d: "M15.3333 14C16.0406 14 16.7189 14.281 17.219 14.781C17.719 15.2811 18 15.9594 18 16.6667C18 17.3739 17.719 18.0522 17.219 18.5523C16.7189 19.0524 16.0406 19.3333 15.3333 19.3333H10",
17171
+ stroke: "#D1D5DC",
17172
+ strokeWidth: "1.33333",
17173
+ strokeLinecap: "round",
17174
+ strokeLinejoin: "round"
17175
+ }
17176
+ ),
17177
+ /* @__PURE__ */ jsx(
17178
+ "path",
17179
+ {
17180
+ d: "M8.66663 14H19.3333",
17181
+ stroke: "currentColor",
17182
+ strokeWidth: "1.33333",
17183
+ strokeLinecap: "round",
17184
+ strokeLinejoin: "round"
17185
+ }
17186
+ )
17187
+ ]
17621
17188
  }
17622
17189
  );
17623
- const CodeIcon = () => /* @__PURE__ */ jsx(
17190
+ const CodeIcon = () => /* @__PURE__ */ jsxs(
17624
17191
  "svg",
17625
17192
  {
17626
- width: "25",
17627
- height: "24",
17628
- viewBox: "0 0 25 24",
17193
+ width: "28",
17194
+ height: "28",
17195
+ viewBox: "0 0 28 28",
17629
17196
  fill: "none",
17630
17197
  xmlns: "http://www.w3.org/2000/svg",
17631
- children: /* @__PURE__ */ jsx(
17632
- "path",
17633
- {
17634
- d: "M14.4333 6.85056C14.5614 6.88479 14.6707 6.96849 14.7371 7.08325C14.8034 7.19802 14.8215 7.33446 14.7873 7.46256L12.1387 17.3492C12.1043 17.4774 12.0204 17.5867 11.9054 17.653C11.7904 17.7193 11.6538 17.7373 11.5257 17.7029C11.3975 17.6685 11.2882 17.5846 11.2219 17.4696C11.1555 17.3547 11.1376 17.2181 11.172 17.0899L13.8213 7.20322C13.8383 7.13979 13.8677 7.08033 13.9077 7.02823C13.9477 6.97614 13.9976 6.93244 14.0545 6.89963C14.1114 6.86682 14.1742 6.84554 14.2393 6.837C14.3044 6.82847 14.3706 6.83285 14.434 6.84989M15.942 8.88522C16.0307 8.78667 16.1549 8.72737 16.2873 8.72037C16.4197 8.71337 16.5494 8.75924 16.648 8.84789L17.806 9.89056C18.2973 10.3319 18.704 10.6986 18.984 11.0306C19.2773 11.3806 19.4867 11.7559 19.4867 12.2199C19.4867 12.6832 19.278 13.0586 18.984 13.4079C18.704 13.7406 18.2973 14.1072 17.806 14.5486L16.648 15.5912C16.5494 15.68 16.4196 15.7259 16.2872 15.719C16.1547 15.7121 16.0304 15.6528 15.9417 15.5542C15.8529 15.4557 15.8069 15.3259 15.8139 15.1934C15.8208 15.0609 15.8801 14.9366 15.9787 14.8479L17.11 13.8299C17.6353 13.3572 17.9893 13.0366 18.2187 12.7646C18.4387 12.5026 18.4867 12.3499 18.4867 12.2192C18.4867 12.0886 18.4387 11.9366 18.2187 11.6746C17.9893 11.4019 17.6353 11.0812 17.11 10.6092L15.9787 9.59122C15.9298 9.5473 15.89 9.49417 15.8617 9.43487C15.8333 9.37557 15.8169 9.31126 15.8135 9.24563C15.81 9.18 15.8195 9.11432 15.8415 9.05236C15.8634 8.99041 15.8973 8.93338 15.9413 8.88456M9.98133 9.59122C10.0799 9.50246 10.1392 9.37818 10.1461 9.24572C10.1531 9.11326 10.1071 8.98346 10.0183 8.88489C9.92957 8.78632 9.80529 8.72704 9.67282 8.7201C9.54036 8.71316 9.41057 8.75913 9.31199 8.84789L8.15399 9.89056C7.66266 10.3319 7.25599 10.6986 6.97599 11.0306C6.68266 11.3806 6.47333 11.7559 6.47333 12.2199C6.47333 12.6832 6.68199 13.0586 6.97599 13.4079C7.25599 13.7406 7.66266 14.1072 8.15399 14.5486L9.31199 15.5912C9.41057 15.68 9.54036 15.7259 9.67282 15.719C9.80529 15.7121 9.92957 15.6528 10.0183 15.5542C10.1071 15.4557 10.1531 15.3259 10.1461 15.1934C10.1392 15.0609 10.0799 14.9366 9.98133 14.8479L8.84999 13.8299C8.32466 13.3572 7.97066 13.0366 7.74133 12.7646C7.52133 12.5026 7.47333 12.3499 7.47333 12.2192C7.47333 12.0886 7.52133 11.9366 7.74133 11.6746C7.97066 11.4019 8.32466 11.0812 8.84999 10.6092L9.98133 9.59122Z",
17635
- fill: "currentColor"
17636
- }
17637
- )
17198
+ children: [
17199
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_3553_901)", children: [
17200
+ /* @__PURE__ */ jsx(
17201
+ "path",
17202
+ {
17203
+ d: "M16.6667 18L20.6667 14L16.6667 10",
17204
+ stroke: "currentColor",
17205
+ strokeWidth: "1.33333",
17206
+ strokeLinecap: "round",
17207
+ strokeLinejoin: "round"
17208
+ }
17209
+ ),
17210
+ /* @__PURE__ */ jsx(
17211
+ "path",
17212
+ {
17213
+ d: "M11.3333 10L7.33331 14L11.3333 18",
17214
+ stroke: "currentColor",
17215
+ strokeWidth: "1.33333",
17216
+ strokeLinecap: "round",
17217
+ strokeLinejoin: "round"
17218
+ }
17219
+ )
17220
+ ] }),
17221
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_3553_901", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(6 6)" }) }) })
17222
+ ]
17638
17223
  }
17639
17224
  );
17640
17225
  const LinkIcon = () => /* @__PURE__ */ jsx(
@@ -17722,7 +17307,23 @@ const TodoIcon = () => /* @__PURE__ */ jsxs(
17722
17307
  ]
17723
17308
  }
17724
17309
  );
17725
- const NoteIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M19.6402 9.02826L14.9718 4.36058C14.8575 4.24627 14.7218 4.15558 14.5725 4.09371C14.4231 4.03184 14.2631 4 14.1014 4C13.9398 4 13.7797 4.03184 13.6304 4.09371C13.481 4.15558 13.3453 4.24627 13.231 4.36058L9.10566 8.49903C8.28566 8.24211 6.41336 7.93211 4.45951 9.5098C4.32484 9.61809 4.21448 9.75353 4.13562 9.9073C4.05676 10.0611 4.01117 10.2297 4.00181 10.4023C3.99245 10.5748 4.01953 10.7474 4.08129 10.9088C4.14306 11.0702 4.23812 11.2168 4.36028 11.339L8.0772 15.0544L4.79567 18.3336C4.6802 18.4491 4.61533 18.6057 4.61533 18.769C4.61533 18.9323 4.6802 19.0889 4.79567 19.2044C4.91114 19.3199 5.06775 19.3847 5.23105 19.3847C5.39435 19.3847 5.55096 19.3199 5.66643 19.2044L8.94566 15.9229L12.6603 19.6375C12.7745 19.7521 12.9101 19.8432 13.0596 19.9053C13.209 19.9675 13.3692 19.9996 13.531 19.9998H13.618C13.7934 19.9876 13.9642 19.9378 14.1187 19.8538C14.2732 19.7698 14.4078 19.6535 14.5133 19.5129C16.0241 17.5052 15.8787 15.8729 15.5279 14.8975L19.641 10.769C19.7553 10.6547 19.8459 10.519 19.9077 10.3696C19.9695 10.2202 20.0013 10.0601 20.0012 9.89849C20.0011 9.73684 19.9692 9.57678 19.9073 9.42747C19.8454 9.27815 19.7546 9.1425 19.6402 9.02826ZM18.7695 9.89903L14.3641 14.319C14.2731 14.4103 14.2131 14.5279 14.1926 14.6552C14.172 14.7824 14.1919 14.9129 14.2495 15.0282C14.9772 16.4844 14.111 17.9967 13.531 18.7682L5.23105 10.4675C6.16028 9.71826 7.04951 9.52057 7.72951 9.52057C8.16099 9.51461 8.58893 9.59926 8.98566 9.76903C9.1014 9.82696 9.23247 9.84692 9.36022 9.82606C9.48796 9.80521 9.60588 9.74461 9.69719 9.65288L14.1018 5.23058L18.7695 9.89826V9.89903Z", fill: "currentColor" }) });
17310
+ const NoteIcon = () => /* @__PURE__ */ jsx(
17311
+ "svg",
17312
+ {
17313
+ xmlns: "http://www.w3.org/2000/svg",
17314
+ width: "24",
17315
+ height: "24",
17316
+ viewBox: "0 0 24 24",
17317
+ fill: "none",
17318
+ children: /* @__PURE__ */ jsx(
17319
+ "path",
17320
+ {
17321
+ d: "M19.6402 9.02826L14.9718 4.36058C14.8575 4.24627 14.7218 4.15558 14.5725 4.09371C14.4231 4.03184 14.2631 4 14.1014 4C13.9398 4 13.7797 4.03184 13.6304 4.09371C13.481 4.15558 13.3453 4.24627 13.231 4.36058L9.10566 8.49903C8.28566 8.24211 6.41336 7.93211 4.45951 9.5098C4.32484 9.61809 4.21448 9.75353 4.13562 9.9073C4.05676 10.0611 4.01117 10.2297 4.00181 10.4023C3.99245 10.5748 4.01953 10.7474 4.08129 10.9088C4.14306 11.0702 4.23812 11.2168 4.36028 11.339L8.0772 15.0544L4.79567 18.3336C4.6802 18.4491 4.61533 18.6057 4.61533 18.769C4.61533 18.9323 4.6802 19.0889 4.79567 19.2044C4.91114 19.3199 5.06775 19.3847 5.23105 19.3847C5.39435 19.3847 5.55096 19.3199 5.66643 19.2044L8.94566 15.9229L12.6603 19.6375C12.7745 19.7521 12.9101 19.8432 13.0596 19.9053C13.209 19.9675 13.3692 19.9996 13.531 19.9998H13.618C13.7934 19.9876 13.9642 19.9378 14.1187 19.8538C14.2732 19.7698 14.4078 19.6535 14.5133 19.5129C16.0241 17.5052 15.8787 15.8729 15.5279 14.8975L19.641 10.769C19.7553 10.6547 19.8459 10.519 19.9077 10.3696C19.9695 10.2202 20.0013 10.0601 20.0012 9.89849C20.0011 9.73684 19.9692 9.57678 19.9073 9.42747C19.8454 9.27815 19.7546 9.1425 19.6402 9.02826ZM18.7695 9.89903L14.3641 14.319C14.2731 14.4103 14.2131 14.5279 14.1926 14.6552C14.172 14.7824 14.1919 14.9129 14.2495 15.0282C14.9772 16.4844 14.111 17.9967 13.531 18.7682L5.23105 10.4675C6.16028 9.71826 7.04951 9.52057 7.72951 9.52057C8.16099 9.51461 8.58893 9.59926 8.98566 9.76903C9.1014 9.82696 9.23247 9.84692 9.36022 9.82606C9.48796 9.80521 9.60588 9.74461 9.69719 9.65288L14.1018 5.23058L18.7695 9.89826V9.89903Z",
17322
+ fill: "currentColor"
17323
+ }
17324
+ )
17325
+ }
17326
+ );
17726
17327
  const FaceSmileIcon = () => /* @__PURE__ */ jsx(
17727
17328
  "svg",
17728
17329
  {
@@ -17740,24 +17341,43 @@ const FaceSmileIcon = () => /* @__PURE__ */ jsx(
17740
17341
  )
17741
17342
  }
17742
17343
  );
17743
- const MagicoonIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M19.4777 11.5301C19.374 11.2782 19.1825 11.0913 18.8792 10.9613L16.8124 10.36C15.1366 9.88058 13.7959 8.52361 13.325 6.81725L12.7346 4.72086C12.6388 4.3877 12.3914 4.13582 12.0642 4.03831C11.8089 3.96518 11.5455 3.99769 11.3221 4.12769C11.0907 4.2577 10.931 4.46896 10.8592 4.72086L10.2687 6.81725C9.79788 8.52361 8.45722 9.88058 6.77343 10.36L4.70661 10.9613C4.37943 11.0507 4.12405 11.3188 4.03626 11.6438C3.89262 12.172 4.18791 12.7245 4.70661 12.8708L6.77343 13.4721C8.44923 13.9515 9.78989 15.3085 10.2607 17.0149L10.8513 19.1112C10.971 19.5337 11.354 19.8344 11.7849 19.8344C12.2159 19.8344 12.5989 19.5419 12.7266 19.1112L13.3171 17.0067C13.7879 15.3003 15.1286 13.9433 16.8124 13.4558L18.9351 12.8383C19.1824 12.7408 19.3819 12.5376 19.4777 12.2857C19.5815 12.0338 19.5734 11.7576 19.4777 11.5138V11.5301ZM16.4852 12.302C14.4104 12.8951 12.7585 14.5772 12.168 16.6898L11.7929 18.0387L11.4098 16.6898C10.8193 14.5772 9.16746 12.8951 7.09265 12.302L5.76793 11.9201L7.09265 11.5382C9.16746 10.945 10.8193 9.26304 11.4098 7.15039L11.7929 5.80155L12.168 7.15039C12.7585 9.26304 14.4104 10.945 16.4852 11.5382L17.8099 11.9201L16.4852 12.302ZM8.89615 16.9905C8.92009 17.0554 8.89614 17.1204 8.8323 17.1448L8.20988 17.3236C7.64329 17.4861 7.19638 17.933 7.03678 18.5099L6.86124 19.1437C6.86124 19.1437 6.82131 19.2086 6.78141 19.225C6.71757 19.2412 6.65374 19.2088 6.63777 19.1437L6.46224 18.5099C6.30263 17.933 5.85573 17.4861 5.28914 17.3236L4.66673 17.1448C4.66673 17.1448 4.60285 17.1042 4.58689 17.0636C4.57093 16.9985 4.60288 16.9416 4.66673 16.9172L5.28914 16.7385C5.85573 16.576 6.30263 16.1291 6.46224 15.5523L6.63777 14.9185C6.63777 14.9185 6.67766 14.8534 6.71755 14.8372C6.7814 14.821 6.84529 14.8534 6.86124 14.9185L7.03678 15.5523C7.19638 16.1291 7.64329 16.576 8.20988 16.7385L8.8323 16.9172C8.8323 16.9172 8.88019 16.9498 8.89615 16.9823V16.9905ZM16.142 6.1347C16.142 6.1347 16.1021 6.11033 16.0941 6.08595C16.0862 6.04533 16.1021 6.00469 16.142 5.98844L16.557 5.86656C16.9321 5.76093 17.2273 5.46028 17.339 5.07838L17.4588 4.65585C17.4588 4.65585 17.4827 4.61522 17.5067 4.60709C17.5465 4.59898 17.5864 4.61522 17.6024 4.65585L17.7221 5.07838C17.8258 5.46028 18.1211 5.76093 18.5041 5.86656L18.9192 5.98844C18.9192 5.98844 18.951 6.01282 18.959 6.02907C18.9749 6.06969 18.959 6.11846 18.9192 6.1347L18.5041 6.25659C18.1291 6.36221 17.8338 6.66286 17.7221 7.04476L17.6024 7.46729C17.6024 7.46729 17.5785 7.50791 17.5546 7.51604C17.5146 7.52417 17.4747 7.50793 17.4588 7.46729L17.339 7.04476C17.2353 6.66286 16.94 6.36221 16.557 6.25659L16.142 6.1347Z", fill: "currentColor" }) });
17744
- const BoldIcon = () => /* @__PURE__ */ jsx(
17344
+ const MagicoonIcon = () => /* @__PURE__ */ jsx(
17745
17345
  "svg",
17746
17346
  {
17347
+ xmlns: "http://www.w3.org/2000/svg",
17747
17348
  width: "24",
17748
17349
  height: "24",
17749
17350
  viewBox: "0 0 24 24",
17750
17351
  fill: "none",
17751
- xmlns: "http://www.w3.org/2000/svg",
17752
17352
  children: /* @__PURE__ */ jsx(
17753
17353
  "path",
17754
17354
  {
17755
- d: "M8.0215 17C7.90417 17 7.80817 16.9627 7.7335 16.888C7.65883 16.8133 7.6215 16.7173 7.6215 16.6V6.2C7.6215 6.08267 7.65883 5.98667 7.7335 5.912C7.80817 5.83733 7.90417 5.8 8.0215 5.8H12.7735C13.6588 5.8 14.3842 5.928 14.9495 6.184C15.5148 6.44 15.9308 6.80267 16.1975 7.272C16.4748 7.74133 16.6135 8.29067 16.6135 8.92C16.6135 9.31467 16.5388 9.66133 16.3895 9.96C16.2508 10.2587 16.0748 10.504 15.8615 10.696C15.6588 10.888 15.4615 11.032 15.2695 11.128C15.6855 11.32 16.0482 11.64 16.3575 12.088C16.6775 12.5253 16.8375 13.048 16.8375 13.656C16.8375 14.328 16.6882 14.9147 16.3895 15.416C16.0908 15.9173 15.6482 16.3067 15.0615 16.584C14.4748 16.8613 13.7602 17 12.9175 17H8.0215ZM10.1655 15.128H12.6135C13.1362 15.128 13.5308 14.984 13.7975 14.696C14.0642 14.3973 14.1975 14.0453 14.1975 13.64C14.1975 13.224 14.0588 12.8773 13.7815 12.6C13.5148 12.312 13.1255 12.168 12.6135 12.168H10.1655V15.128ZM10.1655 10.328H12.4695C12.9708 10.328 13.3442 10.2053 13.5895 9.96C13.8455 9.704 13.9735 9.37867 13.9735 8.984C13.9735 8.58933 13.8455 8.27467 13.5895 8.04C13.3442 7.79467 12.9708 7.672 12.4695 7.672H10.1655V10.328Z",
17355
+ d: "M19.4777 11.5301C19.374 11.2782 19.1825 11.0913 18.8792 10.9613L16.8124 10.36C15.1366 9.88058 13.7959 8.52361 13.325 6.81725L12.7346 4.72086C12.6388 4.3877 12.3914 4.13582 12.0642 4.03831C11.8089 3.96518 11.5455 3.99769 11.3221 4.12769C11.0907 4.2577 10.931 4.46896 10.8592 4.72086L10.2687 6.81725C9.79788 8.52361 8.45722 9.88058 6.77343 10.36L4.70661 10.9613C4.37943 11.0507 4.12405 11.3188 4.03626 11.6438C3.89262 12.172 4.18791 12.7245 4.70661 12.8708L6.77343 13.4721C8.44923 13.9515 9.78989 15.3085 10.2607 17.0149L10.8513 19.1112C10.971 19.5337 11.354 19.8344 11.7849 19.8344C12.2159 19.8344 12.5989 19.5419 12.7266 19.1112L13.3171 17.0067C13.7879 15.3003 15.1286 13.9433 16.8124 13.4558L18.9351 12.8383C19.1824 12.7408 19.3819 12.5376 19.4777 12.2857C19.5815 12.0338 19.5734 11.7576 19.4777 11.5138V11.5301ZM16.4852 12.302C14.4104 12.8951 12.7585 14.5772 12.168 16.6898L11.7929 18.0387L11.4098 16.6898C10.8193 14.5772 9.16746 12.8951 7.09265 12.302L5.76793 11.9201L7.09265 11.5382C9.16746 10.945 10.8193 9.26304 11.4098 7.15039L11.7929 5.80155L12.168 7.15039C12.7585 9.26304 14.4104 10.945 16.4852 11.5382L17.8099 11.9201L16.4852 12.302ZM8.89615 16.9905C8.92009 17.0554 8.89614 17.1204 8.8323 17.1448L8.20988 17.3236C7.64329 17.4861 7.19638 17.933 7.03678 18.5099L6.86124 19.1437C6.86124 19.1437 6.82131 19.2086 6.78141 19.225C6.71757 19.2412 6.65374 19.2088 6.63777 19.1437L6.46224 18.5099C6.30263 17.933 5.85573 17.4861 5.28914 17.3236L4.66673 17.1448C4.66673 17.1448 4.60285 17.1042 4.58689 17.0636C4.57093 16.9985 4.60288 16.9416 4.66673 16.9172L5.28914 16.7385C5.85573 16.576 6.30263 16.1291 6.46224 15.5523L6.63777 14.9185C6.63777 14.9185 6.67766 14.8534 6.71755 14.8372C6.7814 14.821 6.84529 14.8534 6.86124 14.9185L7.03678 15.5523C7.19638 16.1291 7.64329 16.576 8.20988 16.7385L8.8323 16.9172C8.8323 16.9172 8.88019 16.9498 8.89615 16.9823V16.9905ZM16.142 6.1347C16.142 6.1347 16.1021 6.11033 16.0941 6.08595C16.0862 6.04533 16.1021 6.00469 16.142 5.98844L16.557 5.86656C16.9321 5.76093 17.2273 5.46028 17.339 5.07838L17.4588 4.65585C17.4588 4.65585 17.4827 4.61522 17.5067 4.60709C17.5465 4.59898 17.5864 4.61522 17.6024 4.65585L17.7221 5.07838C17.8258 5.46028 18.1211 5.76093 18.5041 5.86656L18.9192 5.98844C18.9192 5.98844 18.951 6.01282 18.959 6.02907C18.9749 6.06969 18.959 6.11846 18.9192 6.1347L18.5041 6.25659C18.1291 6.36221 17.8338 6.66286 17.7221 7.04476L17.6024 7.46729C17.6024 7.46729 17.5785 7.50791 17.5546 7.51604C17.5146 7.52417 17.4747 7.50793 17.4588 7.46729L17.339 7.04476C17.2353 6.66286 16.94 6.36221 16.557 6.25659L16.142 6.1347Z",
17756
17356
  fill: "currentColor"
17757
17357
  }
17758
17358
  )
17759
17359
  }
17760
17360
  );
17361
+ const BoldIcon = () => /* @__PURE__ */ jsx(
17362
+ "svg",
17363
+ {
17364
+ width: "28",
17365
+ height: "28",
17366
+ viewBox: "0 0 28 28",
17367
+ fill: "none",
17368
+ xmlns: "http://www.w3.org/2000/svg",
17369
+ children: /* @__PURE__ */ jsx(
17370
+ "path",
17371
+ {
17372
+ d: "M10 14H16C16.7072 14 17.3855 14.2809 17.8856 14.781C18.3857 15.2811 18.6667 15.9594 18.6667 16.6666C18.6667 17.3739 18.3857 18.0521 17.8856 18.5522C17.3855 19.0523 16.7072 19.3333 16 19.3333H10.6667C10.4899 19.3333 10.3203 19.2631 10.1953 19.138C10.0702 19.013 10 18.8434 10 18.6666V9.33329C10 9.15648 10.0702 8.98691 10.1953 8.86189C10.3203 8.73686 10.4899 8.66663 10.6667 8.66663H15.3333C16.0406 8.66663 16.7189 8.94758 17.219 9.44767C17.719 9.94777 18 10.626 18 11.3333C18 12.0405 17.719 12.7188 17.219 13.2189C16.7189 13.719 16.0406 14 15.3333 14",
17373
+ stroke: "currentColor",
17374
+ strokeWidth: "1.33333",
17375
+ strokeLinecap: "round",
17376
+ strokeLinejoin: "round"
17377
+ }
17378
+ )
17379
+ }
17380
+ );
17761
17381
  const ChevronDownIcon = () => /* @__PURE__ */ jsx(
17762
17382
  "svg",
17763
17383
  {
@@ -17773,7 +17393,23 @@ const ChevronDownIcon = () => /* @__PURE__ */ jsx(
17773
17393
  children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
17774
17394
  }
17775
17395
  );
17776
- const MessageEditIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M17.7211 4H8.02885C6.07585 4 5 5.07585 5 7.02885V19.1442C5 19.389 5.14772 19.6103 5.37387 19.704C5.44899 19.7355 5.52742 19.75 5.60577 19.75C5.76327 19.75 5.91837 19.6886 6.03387 19.5723L8.27928 17.3269H17.7211C19.6741 17.3269 20.75 16.2511 20.75 14.2981V7.02885C20.75 5.07585 19.6741 4 17.7211 4ZM19.5384 14.2981C19.5384 15.5718 18.9949 16.1154 17.7211 16.1154H8.02885C7.86812 16.1154 7.71382 16.1792 7.60075 16.2931L6.21154 17.6822V7.02885C6.21154 5.75512 6.75512 5.21154 8.02885 5.21154H17.7211C18.9949 5.21154 19.5384 5.75512 19.5384 7.02885V14.2981ZM15.5235 7.2146C15.2731 6.96421 14.9411 6.82692 14.5882 6.82692H14.5856C14.2318 6.82692 13.8991 6.96589 13.6504 7.21628L9.21535 11.6715C9.10146 11.7853 9.03846 11.9388 9.03846 12.0987V13.8934C9.03846 14.2278 9.30985 14.4992 9.64423 14.4992H11.4396C11.5996 14.4992 11.7539 14.4354 11.867 14.3231L16.3223 9.88811C16.5735 9.63853 16.7107 9.30652 16.7115 8.95194C16.7123 8.59737 16.5742 8.2638 16.3238 8.01341L15.5235 7.2146ZM14.5874 8.03846C14.6084 8.03846 14.639 8.04413 14.6673 8.07159L15.4669 8.8712C15.4943 8.89866 15.5 8.93015 15.5 8.95115C15.5 8.97215 15.4943 9.00289 15.4669 9.02954L14.9532 9.54154L13.9976 8.58606L14.5097 8.07159C14.5363 8.04413 14.5672 8.03846 14.5874 8.03846ZM11.1894 13.2885H10.25V12.3491L13.1424 9.44384L14.0939 10.396L11.1894 13.2885Z", fill: "currentColor" }) });
17396
+ const MessageEditIcon = () => /* @__PURE__ */ jsx(
17397
+ "svg",
17398
+ {
17399
+ xmlns: "http://www.w3.org/2000/svg",
17400
+ width: "25",
17401
+ height: "24",
17402
+ viewBox: "0 0 25 24",
17403
+ fill: "none",
17404
+ children: /* @__PURE__ */ jsx(
17405
+ "path",
17406
+ {
17407
+ d: "M17.7211 4H8.02885C6.07585 4 5 5.07585 5 7.02885V19.1442C5 19.389 5.14772 19.6103 5.37387 19.704C5.44899 19.7355 5.52742 19.75 5.60577 19.75C5.76327 19.75 5.91837 19.6886 6.03387 19.5723L8.27928 17.3269H17.7211C19.6741 17.3269 20.75 16.2511 20.75 14.2981V7.02885C20.75 5.07585 19.6741 4 17.7211 4ZM19.5384 14.2981C19.5384 15.5718 18.9949 16.1154 17.7211 16.1154H8.02885C7.86812 16.1154 7.71382 16.1792 7.60075 16.2931L6.21154 17.6822V7.02885C6.21154 5.75512 6.75512 5.21154 8.02885 5.21154H17.7211C18.9949 5.21154 19.5384 5.75512 19.5384 7.02885V14.2981ZM15.5235 7.2146C15.2731 6.96421 14.9411 6.82692 14.5882 6.82692H14.5856C14.2318 6.82692 13.8991 6.96589 13.6504 7.21628L9.21535 11.6715C9.10146 11.7853 9.03846 11.9388 9.03846 12.0987V13.8934C9.03846 14.2278 9.30985 14.4992 9.64423 14.4992H11.4396C11.5996 14.4992 11.7539 14.4354 11.867 14.3231L16.3223 9.88811C16.5735 9.63853 16.7107 9.30652 16.7115 8.95194C16.7123 8.59737 16.5742 8.2638 16.3238 8.01341L15.5235 7.2146ZM14.5874 8.03846C14.6084 8.03846 14.639 8.04413 14.6673 8.07159L15.4669 8.8712C15.4943 8.89866 15.5 8.93015 15.5 8.95115C15.5 8.97215 15.4943 9.00289 15.4669 9.02954L14.9532 9.54154L13.9976 8.58606L14.5097 8.07159C14.5363 8.04413 14.5672 8.03846 14.5874 8.03846ZM11.1894 13.2885H10.25V12.3491L13.1424 9.44384L14.0939 10.396L11.1894 13.2885Z",
17408
+ fill: "currentColor"
17409
+ }
17410
+ )
17411
+ }
17412
+ );
17777
17413
  const UploadIcon = () => /* @__PURE__ */ jsxs(
17778
17414
  "svg",
17779
17415
  {
@@ -18105,14 +17741,91 @@ const ImageIcon = () => /* @__PURE__ */ jsx(
18105
17741
  )
18106
17742
  }
18107
17743
  );
18108
- const AddCommentIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M19 14.3333C19 14.7459 18.8361 15.1416 18.5444 15.4333C18.2527 15.725 17.857 15.8889 17.4444 15.8889H8.11111L5 19V6.55556C5 6.143 5.16389 5.74733 5.45561 5.45561C5.74733 5.16389 6.143 5 6.55556 5H17.4444C17.857 5 18.2527 5.16389 18.5444 5.45561C18.8361 5.74733 19 6.143 19 6.55556V14.3333Z", stroke: "currentColor", strokeWidth: "1.33333", strokeLinecap: "round", strokeLinejoin: "round" }) });
18109
- const QuoteIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
18110
- /* @__PURE__ */ jsx("path", { d: "M4.75 19C7 19 10 18.2222 10 12.7779V6.55575C10 5.58354 9.433 4.98699 8.5 5.00022H5.5C4.5625 5.00022 4 5.58354 4 6.53397V11.2223C4 12.1945 4.5625 12.7779 5.5 12.7779C6.25 12.7779 6.25 12.7779 6.25 13.5556V14.3334C6.25 15.1112 5.5 15.8889 4.75 15.8889C4 15.8889 4 15.8952 4 16.6908V18.2222C4 19 4 19 4.75 19Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
18111
- /* @__PURE__ */ jsx("path", { d: "M14.75 19C17 19 20 18.2222 20 12.7779V6.55575C20 5.58354 19.4323 4.98699 18.5 5.00022H15.5C14.5625 5.00022 14 5.58354 14 6.53397V11.2223C14 12.1945 14.5625 12.7779 15.5 12.7779H16.0625C16.0625 14.5278 16.25 15.8889 14 15.8889V18.2222C14 19 14 19 14.75 19Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
18112
- ] });
18113
- const StopCircleIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", viewBox: "0 0 256 256", children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm32,132a4,4,0,0,1-4,4H100a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h56a4,4,0,0,1,4,4Z" }) });
18114
- const PauseCircleIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", viewBox: "0 0 256 256", children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM112,160a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z" }) });
18115
- const PlayCircleIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", viewBox: "0 0 256 256", children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm40.55,110.58-52,36A8,8,0,0,1,104,164V92a8,8,0,0,1,12.55-6.58l52,36a8,8,0,0,1,0,13.16Z" }) });
17744
+ const AddCommentIcon = () => /* @__PURE__ */ jsx(
17745
+ "svg",
17746
+ {
17747
+ xmlns: "http://www.w3.org/2000/svg",
17748
+ width: "24",
17749
+ height: "24",
17750
+ viewBox: "0 0 24 24",
17751
+ fill: "none",
17752
+ children: /* @__PURE__ */ jsx(
17753
+ "path",
17754
+ {
17755
+ d: "M19 14.3333C19 14.7459 18.8361 15.1416 18.5444 15.4333C18.2527 15.725 17.857 15.8889 17.4444 15.8889H8.11111L5 19V6.55556C5 6.143 5.16389 5.74733 5.45561 5.45561C5.74733 5.16389 6.143 5 6.55556 5H17.4444C17.857 5 18.2527 5.16389 18.5444 5.45561C18.8361 5.74733 19 6.143 19 6.55556V14.3333Z",
17756
+ stroke: "currentColor",
17757
+ strokeWidth: "1.33333",
17758
+ strokeLinecap: "round",
17759
+ strokeLinejoin: "round"
17760
+ }
17761
+ )
17762
+ }
17763
+ );
17764
+ const QuoteIcon = () => /* @__PURE__ */ jsxs(
17765
+ "svg",
17766
+ {
17767
+ xmlns: "http://www.w3.org/2000/svg",
17768
+ width: "24",
17769
+ height: "24",
17770
+ viewBox: "0 0 24 24",
17771
+ fill: "none",
17772
+ children: [
17773
+ /* @__PURE__ */ jsx(
17774
+ "path",
17775
+ {
17776
+ d: "M4.75 19C7 19 10 18.2222 10 12.7779V6.55575C10 5.58354 9.433 4.98699 8.5 5.00022H5.5C4.5625 5.00022 4 5.58354 4 6.53397V11.2223C4 12.1945 4.5625 12.7779 5.5 12.7779C6.25 12.7779 6.25 12.7779 6.25 13.5556V14.3334C6.25 15.1112 5.5 15.8889 4.75 15.8889C4 15.8889 4 15.8952 4 16.6908V18.2222C4 19 4 19 4.75 19Z",
17777
+ stroke: "currentColor",
17778
+ strokeWidth: "1.5",
17779
+ strokeLinecap: "round",
17780
+ strokeLinejoin: "round"
17781
+ }
17782
+ ),
17783
+ /* @__PURE__ */ jsx(
17784
+ "path",
17785
+ {
17786
+ d: "M14.75 19C17 19 20 18.2222 20 12.7779V6.55575C20 5.58354 19.4323 4.98699 18.5 5.00022H15.5C14.5625 5.00022 14 5.58354 14 6.53397V11.2223C14 12.1945 14.5625 12.7779 15.5 12.7779H16.0625C16.0625 14.5278 16.25 15.8889 14 15.8889V18.2222C14 19 14 19 14.75 19Z",
17787
+ stroke: "currentColor",
17788
+ strokeWidth: "1.5",
17789
+ strokeLinecap: "round",
17790
+ strokeLinejoin: "round"
17791
+ }
17792
+ )
17793
+ ]
17794
+ }
17795
+ );
17796
+ const StopCircleIcon = () => /* @__PURE__ */ jsx(
17797
+ "svg",
17798
+ {
17799
+ xmlns: "http://www.w3.org/2000/svg",
17800
+ width: "32",
17801
+ height: "32",
17802
+ fill: "currentColor",
17803
+ viewBox: "0 0 256 256",
17804
+ children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm32,132a4,4,0,0,1-4,4H100a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h56a4,4,0,0,1,4,4Z" })
17805
+ }
17806
+ );
17807
+ const PauseCircleIcon = () => /* @__PURE__ */ jsx(
17808
+ "svg",
17809
+ {
17810
+ xmlns: "http://www.w3.org/2000/svg",
17811
+ width: "32",
17812
+ height: "32",
17813
+ fill: "currentColor",
17814
+ viewBox: "0 0 256 256",
17815
+ children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM112,160a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z" })
17816
+ }
17817
+ );
17818
+ const PlayCircleIcon = () => /* @__PURE__ */ jsx(
17819
+ "svg",
17820
+ {
17821
+ xmlns: "http://www.w3.org/2000/svg",
17822
+ width: "32",
17823
+ height: "32",
17824
+ fill: "currentColor",
17825
+ viewBox: "0 0 256 256",
17826
+ children: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm40.55,110.58-52,36A8,8,0,0,1,104,164V92a8,8,0,0,1,12.55-6.58l52,36a8,8,0,0,1,0,13.16Z" })
17827
+ }
17828
+ );
18116
17829
  const ChartBarIcon = () => /* @__PURE__ */ jsx(
18117
17830
  "svg",
18118
17831
  {
@@ -18133,7 +17846,26 @@ const ChartBarIcon = () => /* @__PURE__ */ jsx(
18133
17846
  )
18134
17847
  }
18135
17848
  );
18136
- const ParagraphIcon = () => /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M19 7H16.4286M16.4286 7H12.1429M16.4286 7V19M12.1429 7V15.5714M12.1429 7H11.2857C9.85686 7 7 7.85714 7 11.2857C7 14.7143 9.85686 15.5714 11.2857 15.5714H12.1429M12.1429 15.5714V19", stroke: "currentColor", "stroke-width": "1.28571", "stroke-linecap": "round", "stroke-linejoin": "round" }) });
17849
+ const ParagraphIcon = () => /* @__PURE__ */ jsx(
17850
+ "svg",
17851
+ {
17852
+ width: "24",
17853
+ height: "24",
17854
+ viewBox: "0 0 24 24",
17855
+ fill: "none",
17856
+ xmlns: "http://www.w3.org/2000/svg",
17857
+ children: /* @__PURE__ */ jsx(
17858
+ "path",
17859
+ {
17860
+ d: "M19 7H16.4286M16.4286 7H12.1429M16.4286 7V19M12.1429 7V15.5714M12.1429 7H11.2857C9.85686 7 7 7.85714 7 11.2857C7 14.7143 9.85686 15.5714 11.2857 15.5714H12.1429M12.1429 15.5714V19",
17861
+ stroke: "currentColor",
17862
+ strokeWidth: "1.28571",
17863
+ strokeLinecap: "round",
17864
+ strokeLinejoin: "round"
17865
+ }
17866
+ )
17867
+ }
17868
+ );
18137
17869
  const CHART_TYPES$1 = [
18138
17870
  { value: "bar", label: "Bar Chart" },
18139
17871
  { value: "horizontal-bar", label: "Horizontal Bar" },
@@ -18370,7 +18102,7 @@ function ChartComponent({
18370
18102
  setIsLoading(true);
18371
18103
  const toastId = toast.loading("Updating chart...");
18372
18104
  try {
18373
- const backendUrl = "https://api.cteditor.com/".replace(/\/$/, "");
18105
+ const backendUrl = "http://localhost:3000/".replace(/\/$/, "");
18374
18106
  const apiKey = localStorage.getItem("apiKey") || "";
18375
18107
  const response = await fetch(`${backendUrl}/api/chat/regenerate`, {
18376
18108
  method: "POST",
@@ -19341,17 +19073,93 @@ const useEditorToolbar = () => {
19341
19073
  clearFormatting
19342
19074
  };
19343
19075
  };
19344
- const getAssemblyAIToken = async () => {
19076
+ class ApiKeyRequiredError extends Error {
19077
+ constructor(message, code) {
19078
+ super(message);
19079
+ __publicField(this, "code");
19080
+ this.name = "ApiKeyRequiredError";
19081
+ this.code = code;
19082
+ }
19083
+ }
19084
+ const getAssemblyAIToken = async (apiKey) => {
19085
+ var _a;
19345
19086
  try {
19346
- const res = await backendAPI.get(apiEndpoints.transcript.voiceTranscript);
19087
+ const res = await backendAPI.get(apiEndpoints.transcript.voiceTranscript, {
19088
+ headers: {
19089
+ ...apiKey && { "x-api-key": apiKey }
19090
+ }
19091
+ });
19347
19092
  console.log(res, "voice response");
19348
19093
  return res.data.data;
19349
19094
  } catch (error) {
19350
- console.error("Error in AiEditorAction:", error);
19095
+ console.error("Error in getAssemblyAIToken:", error);
19096
+ const responseData = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data;
19097
+ if (responseData) {
19098
+ const { code, message } = responseData;
19099
+ if (code === "API_KEYS_REQUIRED" || code === "ASSEMBLYAI_KEY_REQUIRED" || code === "NO_API_KEYS_CONFIGURED") {
19100
+ throw new ApiKeyRequiredError(message || "API key configuration required", code);
19101
+ }
19102
+ if (code === "INSUFFICIENT_CREDITS") {
19103
+ throw new Error("Insufficient credits for voice transcription. Please purchase more credits.");
19104
+ }
19105
+ if (code === "NO_ACTIVE_SUBSCRIPTION") {
19106
+ throw new Error("No active subscription. Please subscribe to use voice transcription.");
19107
+ }
19108
+ if (code === "SUBSCRIPTION_EXPIRED") {
19109
+ throw new Error("Your subscription has expired. Please renew to continue.");
19110
+ }
19111
+ if (message) {
19112
+ throw new Error(message);
19113
+ }
19114
+ }
19351
19115
  throw error;
19352
19116
  }
19353
19117
  };
19354
- const useVoiceToText = ({ onTranscriptUpdate }) => {
19118
+ class CreditError extends Error {
19119
+ constructor(message, code) {
19120
+ super(message);
19121
+ __publicField(this, "code");
19122
+ this.name = "CreditError";
19123
+ this.code = code;
19124
+ }
19125
+ }
19126
+ const endVoiceSession = async (durationSeconds, apiKey) => {
19127
+ var _a;
19128
+ try {
19129
+ const res = await backendAPI.post(apiEndpoints.transcript.endSession, {
19130
+ durationSeconds
19131
+ }, {
19132
+ headers: {
19133
+ ...apiKey && { "x-api-key": apiKey }
19134
+ }
19135
+ });
19136
+ const data = res.data;
19137
+ if (data.credits && !data.credits.success) {
19138
+ throw new CreditError(
19139
+ data.message || "Credit deduction failed",
19140
+ data.code || data.credits.error || "CREDIT_DEDUCTION_FAILED"
19141
+ );
19142
+ }
19143
+ return data;
19144
+ } catch (error) {
19145
+ console.error("Error in endVoiceSession:", error);
19146
+ const responseData = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data;
19147
+ if (responseData) {
19148
+ const { code, message } = responseData;
19149
+ if (code === "INSUFFICIENT_CREDITS") {
19150
+ throw new CreditError("Insufficient credits. Please purchase more credits.", code);
19151
+ }
19152
+ if (code === "CREDIT_DEDUCTION_FAILED") {
19153
+ throw new CreditError(message || "Failed to deduct credits", code);
19154
+ }
19155
+ if (message) {
19156
+ throw new Error(message);
19157
+ }
19158
+ }
19159
+ throw error;
19160
+ }
19161
+ };
19162
+ const useVoiceToText = ({ onTranscriptUpdate, onSessionEnd, apiKey }) => {
19355
19163
  const [isRecording, setIsRecording] = useState$1(false);
19356
19164
  const [isPaused, setIsPaused] = useState$1(false);
19357
19165
  const [isLoading, setIsLoading] = useState$1(false);
@@ -19402,7 +19210,7 @@ const useVoiceToText = ({ onTranscriptUpdate }) => {
19402
19210
  startTimeRef.current = 0;
19403
19211
  pausedTimeRef.current = 0;
19404
19212
  setIsPaused(false);
19405
- const data = await getAssemblyAIToken();
19213
+ const data = await getAssemblyAIToken(apiKey);
19406
19214
  if (!data.token) {
19407
19215
  throw new Error(data.error || "Failed to get token");
19408
19216
  }
@@ -19488,13 +19296,24 @@ const useVoiceToText = ({ onTranscriptUpdate }) => {
19488
19296
  }
19489
19297
  setIsRecording(true);
19490
19298
  } catch (err) {
19491
- setError(
19492
- "Error starting recording: " + (err && err.message ? err.message : "Unknown error")
19493
- );
19299
+ if (err instanceof ApiKeyRequiredError) {
19300
+ toast.error("API Key Required", {
19301
+ description: "Please upload your AssemblyAI key in License Section > Manage API keys > API Keys to configure your keys.",
19302
+ duration: 5e3
19303
+ });
19304
+ setError(err.message);
19305
+ } else {
19306
+ const errorMessage = err && err.message ? err.message : "Unknown error";
19307
+ toast.error("Voice Recording Error", {
19308
+ description: errorMessage,
19309
+ duration: 5e3
19310
+ });
19311
+ setError("Error starting recording: " + errorMessage);
19312
+ }
19494
19313
  setIsLoading(false);
19495
19314
  setIsRecording(false);
19496
19315
  }
19497
- }, [onTranscriptUpdate]);
19316
+ }, [onTranscriptUpdate, apiKey]);
19498
19317
  const fallbackScriptProcessor = (audioContext, source, ws) => {
19499
19318
  const processor = audioContext.createScriptProcessor(1024, 1, 1);
19500
19319
  processorRef.current = processor;
@@ -19545,8 +19364,9 @@ const useVoiceToText = ({ onTranscriptUpdate }) => {
19545
19364
  audioContextRef.current.resume();
19546
19365
  }
19547
19366
  }, [isRecording, isPaused]);
19548
- const stopRecording = useCallback(() => {
19367
+ const stopRecording = useCallback(async () => {
19549
19368
  isManualStopRef.current = true;
19369
+ const finalElapsedTime = elapsedTime;
19550
19370
  setIsRecording(false);
19551
19371
  setIsPaused(false);
19552
19372
  setElapsedTime(0);
@@ -19569,11 +19389,32 @@ const useVoiceToText = ({ onTranscriptUpdate }) => {
19569
19389
  streamRef.current = null;
19570
19390
  }
19571
19391
  if (wsRef.current) {
19572
- wsRef.current.close();
19392
+ if (wsRef.current.readyState === WebSocket.OPEN) {
19393
+ wsRef.current.close(1e3, "Recording stopped");
19394
+ }
19573
19395
  wsRef.current = null;
19574
19396
  }
19575
19397
  setIsConnected(false);
19576
- }, []);
19398
+ if (finalElapsedTime > 0) {
19399
+ try {
19400
+ const result = await endVoiceSession(finalElapsedTime, apiKey);
19401
+ if (onSessionEnd && result.credits) {
19402
+ onSessionEnd({
19403
+ creditsUsed: result.credits.creditsUsed,
19404
+ totalCredits: result.credits.totalCredits
19405
+ });
19406
+ }
19407
+ } catch (error2) {
19408
+ console.error("Failed to end voice session:", error2);
19409
+ if (error2 instanceof CreditError) {
19410
+ toast.error("Credit Error", {
19411
+ description: error2.message,
19412
+ duration: 5e3
19413
+ });
19414
+ }
19415
+ }
19416
+ }
19417
+ }, [elapsedTime, onSessionEnd, apiKey]);
19577
19418
  const toggleRecording = useCallback(() => {
19578
19419
  if (isRecording) {
19579
19420
  stopRecording();
@@ -19633,7 +19474,8 @@ function AIChatDialog({
19633
19474
  } = useVoiceToText({
19634
19475
  onTranscriptUpdate: (text) => {
19635
19476
  setInputValue(text);
19636
- }
19477
+ },
19478
+ apiKey
19637
19479
  });
19638
19480
  const formatTime = (seconds) => {
19639
19481
  const mins = Math.floor(seconds / 60);
@@ -19939,25 +19781,27 @@ Text to transform:
19939
19781
  ] }) })
19940
19782
  ] }),
19941
19783
  /* @__PURE__ */ jsxs(DialogFooter, { className: "cteditor-space-x-0 cteditor-gap-2", children: [
19942
- /* @__PURE__ */ jsxs(
19943
- Button,
19944
- {
19945
- variant: "outline",
19946
- onClick: () => {
19947
- if (onShowInEditor) {
19948
- onShowInEditor(provider, selectedTextForInline);
19949
- handleClose();
19950
- }
19951
- },
19952
- disabled: isLoading,
19953
- title: "Show AI prompt in the editor text area",
19954
- className: "md:cteditor-mr-auto",
19955
- children: [
19956
- /* @__PURE__ */ jsx(PanelBottomOpen, { className: "!cteditor-size-4" }),
19957
- "Show in Editor"
19958
- ]
19959
- }
19960
- ),
19784
+ /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
19785
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
19786
+ Button,
19787
+ {
19788
+ variant: "outline",
19789
+ onClick: () => {
19790
+ if (onShowInEditor) {
19791
+ onShowInEditor(provider, selectedTextForInline);
19792
+ handleClose();
19793
+ }
19794
+ },
19795
+ disabled: isLoading,
19796
+ className: "md:cteditor-mr-auto",
19797
+ children: [
19798
+ /* @__PURE__ */ jsx(PanelBottomOpen, { className: "!cteditor-size-4" }),
19799
+ "Show in Editor"
19800
+ ]
19801
+ }
19802
+ ) }),
19803
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Show AI prompt in the editor text area" }) })
19804
+ ] }) }),
19961
19805
  /* @__PURE__ */ jsx(
19962
19806
  Button,
19963
19807
  {
@@ -20579,7 +20423,7 @@ const TextCursorIcon = ({ isRecording, editor }) => {
20579
20423
  }
20580
20424
  );
20581
20425
  };
20582
- const useVoiceRecording = () => {
20426
+ const useVoiceRecording = (apiKey) => {
20583
20427
  const [isRecording, setIsRecording] = useState$1(false);
20584
20428
  const [isPaused, setIsPaused] = useState$1(false);
20585
20429
  const [isLoading, setIsLoading] = useState$1(false);
@@ -20597,6 +20441,10 @@ const useVoiceRecording = () => {
20597
20441
  const timerIntervalRef = useRef(null);
20598
20442
  const startTimeRef = useRef(0);
20599
20443
  const pausedTimeRef = useRef(0);
20444
+ const apiKeyRef = useRef(apiKey);
20445
+ useEffect$1(() => {
20446
+ apiKeyRef.current = apiKey;
20447
+ }, [apiKey]);
20600
20448
  const setEditor = useCallback((editor) => {
20601
20449
  editorRef.current = editor;
20602
20450
  }, []);
@@ -20646,7 +20494,7 @@ const useVoiceRecording = () => {
20646
20494
  if (editorRef.current) {
20647
20495
  editorRef.current.focus();
20648
20496
  }
20649
- const data = await getAssemblyAIToken();
20497
+ const data = await getAssemblyAIToken(apiKey);
20650
20498
  console.log(data, "data", data.token);
20651
20499
  if (!data.token) {
20652
20500
  throw new Error(data.error || "Failed to get token");
@@ -20774,14 +20622,25 @@ const useVoiceRecording = () => {
20774
20622
  setIsRecording(true);
20775
20623
  updateCursorStyle(true);
20776
20624
  } catch (err) {
20777
- setError(
20778
- "Error starting recording: " + (err && err.message ? err.message : "Unknown error")
20779
- );
20625
+ if (err instanceof ApiKeyRequiredError) {
20626
+ toast.error("API Key Required", {
20627
+ description: "Please upload your AssemblyAI key in License Section > Manage API keys > API Keys to configure your keys.",
20628
+ duration: 5e3
20629
+ });
20630
+ setError(err.message);
20631
+ } else {
20632
+ const errorMessage = err && err.message ? err.message : "Unknown error";
20633
+ toast.error("Voice Recording Error", {
20634
+ description: errorMessage,
20635
+ duration: 5e3
20636
+ });
20637
+ setError("Error starting recording: " + errorMessage);
20638
+ }
20780
20639
  setIsLoading(false);
20781
20640
  setIsRecording(false);
20782
20641
  updateCursorStyle(false);
20783
20642
  }
20784
- }, [updateCursorStyle]);
20643
+ }, [updateCursorStyle, apiKey]);
20785
20644
  const fallbackScriptProcessor = (audioContext, source, ws) => {
20786
20645
  const processor = audioContext.createScriptProcessor(1024, 1, 1);
20787
20646
  processorRef.current = processor;
@@ -20832,7 +20691,8 @@ const useVoiceRecording = () => {
20832
20691
  audioContextRef.current.resume();
20833
20692
  }
20834
20693
  }, [isRecording, isPaused]);
20835
- const stopRecording = useCallback(() => {
20694
+ const stopRecording = useCallback(async () => {
20695
+ const finalElapsedTime = startTimeRef.current > 0 ? Math.floor((Date.now() - startTimeRef.current) / 1e3) : 0;
20836
20696
  setIsRecording(false);
20837
20697
  setIsPaused(false);
20838
20698
  setElapsedTime(0);
@@ -20862,10 +20722,23 @@ const useVoiceRecording = () => {
20862
20722
  wsRef.current = null;
20863
20723
  }
20864
20724
  setIsConnected(false);
20725
+ if (finalElapsedTime > 0) {
20726
+ try {
20727
+ await endVoiceSession(finalElapsedTime, apiKeyRef.current);
20728
+ } catch (error2) {
20729
+ console.error("Failed to end voice session:", error2);
20730
+ if (error2 instanceof CreditError) {
20731
+ toast.error("Credit Error", {
20732
+ description: error2.message,
20733
+ duration: 5e3
20734
+ });
20735
+ }
20736
+ }
20737
+ }
20865
20738
  }, [updateCursorStyle]);
20866
20739
  const toggleRecording = useCallback(async () => {
20867
20740
  if (isRecording) {
20868
- stopRecording();
20741
+ await stopRecording();
20869
20742
  } else {
20870
20743
  await startRecording();
20871
20744
  }
@@ -20888,7 +20761,7 @@ const useVoiceRecording = () => {
20888
20761
  setEditor
20889
20762
  };
20890
20763
  };
20891
- const VoiceTranscriptButton = ({ editor }) => {
20764
+ const VoiceTranscriptButton = ({ editor, apiKey }) => {
20892
20765
  const {
20893
20766
  isRecording,
20894
20767
  isPaused,
@@ -20898,7 +20771,7 @@ const VoiceTranscriptButton = ({ editor }) => {
20898
20771
  pauseRecording,
20899
20772
  resumeRecording,
20900
20773
  setEditor
20901
- } = useVoiceRecording();
20774
+ } = useVoiceRecording(apiKey);
20902
20775
  useEffect$1(() => {
20903
20776
  setEditor(editor);
20904
20777
  }, [editor, setEditor]);
@@ -20919,50 +20792,55 @@ const VoiceTranscriptButton = ({ editor }) => {
20919
20792
  children: formatTime(elapsedTime)
20920
20793
  }
20921
20794
  ),
20922
- /* @__PURE__ */ jsx(
20795
+ /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
20796
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
20797
+ Button,
20798
+ {
20799
+ variant: "ghost",
20800
+ size: "icon-sm",
20801
+ onClick: isPaused ? resumeRecording : pauseRecording,
20802
+ disabled: isLoading,
20803
+ className: cn(
20804
+ "[&>svg]:!cteditor-size-4",
20805
+ isPaused ? "" : ""
20806
+ ),
20807
+ children: isPaused ? /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
20808
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
20809
+ /* @__PURE__ */ jsx("line", { x1: "10", x2: "10", y1: "15", y2: "9" }),
20810
+ /* @__PURE__ */ jsx("line", { x1: "14", x2: "14", y1: "15", y2: "9" })
20811
+ ] }) : /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
20812
+ /* @__PURE__ */ jsx("path", { d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" }),
20813
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" })
20814
+ ] })
20815
+ }
20816
+ ) }),
20817
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: isPaused ? "Resume recording" : "Pause recording" }) })
20818
+ ] }) })
20819
+ ] }),
20820
+ /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
20821
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
20923
20822
  Button,
20924
20823
  {
20925
20824
  variant: "ghost",
20926
20825
  size: "icon-sm",
20927
- onClick: isPaused ? resumeRecording : pauseRecording,
20928
- disabled: isLoading,
20826
+ onClick: toggleRecording,
20827
+ disabled: isLoading || !editor,
20929
20828
  className: cn(
20829
+ isRecording && "cteditor-bg-foreground/20",
20930
20830
  "[&>svg]:!cteditor-size-4",
20931
- isPaused ? "" : ""
20831
+ isRecording && !isPaused && "cteditor-animate-pulse"
20932
20832
  ),
20933
- title: isPaused ? "Resume recording" : "Pause recording",
20934
- children: isPaused ? /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
20935
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
20936
- /* @__PURE__ */ jsx("line", { x1: "10", x2: "10", y1: "15", y2: "9" }),
20937
- /* @__PURE__ */ jsx("line", { x1: "14", x2: "14", y1: "15", y2: "9" })
20938
- ] }) : /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
20939
- /* @__PURE__ */ jsx("path", { d: "M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" }),
20940
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" })
20941
- ] })
20833
+ style: {
20834
+ color: isRecording ? isPaused ? "#f59e0b" : "#ef4444" : "currentColor"
20835
+ },
20836
+ children: isLoading ? /* @__PURE__ */ jsxs("svg", { className: "cteditor-w-[18px] cteditor-h-[18px] cteditor-animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
20837
+ /* @__PURE__ */ jsx("circle", { className: "cteditor-opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
20838
+ /* @__PURE__ */ jsx("path", { className: "cteditor-opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
20839
+ ] }) : isRecording ? /* @__PURE__ */ jsx(Disc2, {}) : /* @__PURE__ */ jsx(Mic, {})
20942
20840
  }
20943
- )
20944
- ] }),
20945
- /* @__PURE__ */ jsx(
20946
- Button,
20947
- {
20948
- variant: "ghost",
20949
- size: "icon-sm",
20950
- onClick: toggleRecording,
20951
- disabled: isLoading || !editor,
20952
- className: cn(
20953
- isRecording && "cteditor-bg-foreground/20",
20954
- "[&>svg]:!cteditor-size-4",
20955
- isRecording && !isPaused && "cteditor-animate-pulse"
20956
- ),
20957
- style: {
20958
- color: isRecording ? isPaused ? "#f59e0b" : "#ef4444" : "currentColor"
20959
- },
20960
- children: isLoading ? /* @__PURE__ */ jsxs("svg", { className: "cteditor-w-[18px] cteditor-h-[18px] cteditor-animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
20961
- /* @__PURE__ */ jsx("circle", { className: "cteditor-opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
20962
- /* @__PURE__ */ jsx("path", { className: "cteditor-opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
20963
- ] }) : isRecording ? /* @__PURE__ */ jsx(Disc2, {}) : /* @__PURE__ */ jsx(Mic, {})
20964
- }
20965
- ),
20841
+ ) }),
20842
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: isLoading ? "Starting recording..." : isRecording ? "Stop recording" : "Start voice recording" }) })
20843
+ ] }) }),
20966
20844
  /* @__PURE__ */ jsx(TextCursorIcon, { isRecording: isRecording && !isPaused, editor })
20967
20845
  ] });
20968
20846
  };
@@ -20988,10 +20866,10 @@ const PDF_CONFIG = {
20988
20866
  };
20989
20867
  const loadHtml2Pdf = async () => {
20990
20868
  try {
20991
- const mod = await import("./html2pdf.bundle.min-d80d5aa7.js").then((n) => n.h);
20869
+ const mod = await import("./html2pdf.bundle.min-ae547e03.js").then((n) => n.h);
20992
20870
  return (mod == null ? void 0 : mod.default) || mod;
20993
20871
  } catch {
20994
- const mod2 = await import("./html2pdf.bundle-8d3a50b2.js").then((n) => n.h);
20872
+ const mod2 = await import("./html2pdf.bundle-3478ea73.js").then((n) => n.h);
20995
20873
  return (mod2 == null ? void 0 : mod2.default) || mod2;
20996
20874
  }
20997
20875
  };
@@ -21743,7 +21621,7 @@ var SUB_CLOSE_KEYS = {
21743
21621
  };
21744
21622
  var MENU_NAME = "Menu";
21745
21623
  var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
21746
- var [createMenuContext, createMenuScope] = createContextScope$1(MENU_NAME, [
21624
+ var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
21747
21625
  createCollectionScope,
21748
21626
  createPopperScope,
21749
21627
  createRovingFocusGroupScope
@@ -21868,7 +21746,7 @@ var MenuRootContentNonModal = React$1.forwardRef((props, forwardedRef) => {
21868
21746
  }
21869
21747
  );
21870
21748
  });
21871
- var Slot$1 = /* @__PURE__ */ createSlot$3("MenuContent.ScrollLock");
21749
+ var Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock");
21872
21750
  var MenuContentImpl = React$1.forwardRef(
21873
21751
  (props, forwardedRef) => {
21874
21752
  const {
@@ -22070,7 +21948,7 @@ var GROUP_NAME$1 = "MenuGroup";
22070
21948
  var MenuGroup = React$1.forwardRef(
22071
21949
  (props, forwardedRef) => {
22072
21950
  const { __scopeMenu, ...groupProps } = props;
22073
- return /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", ...groupProps, ref: forwardedRef });
21951
+ return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
22074
21952
  }
22075
21953
  );
22076
21954
  MenuGroup.displayName = GROUP_NAME$1;
@@ -22078,7 +21956,7 @@ var LABEL_NAME$1 = "MenuLabel";
22078
21956
  var MenuLabel = React$1.forwardRef(
22079
21957
  (props, forwardedRef) => {
22080
21958
  const { __scopeMenu, ...labelProps } = props;
22081
- return /* @__PURE__ */ jsx(Primitive$3.div, { ...labelProps, ref: forwardedRef });
21959
+ return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
22082
21960
  }
22083
21961
  );
22084
21962
  MenuLabel.displayName = LABEL_NAME$1;
@@ -22158,7 +22036,7 @@ var MenuItemImpl = React$1.forwardRef(
22158
22036
  disabled,
22159
22037
  textValue: textValue ?? textContent,
22160
22038
  children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
22161
- Primitive$3.div,
22039
+ Primitive.div,
22162
22040
  {
22163
22041
  role: "menuitem",
22164
22042
  "data-highlighted": isFocused ? "" : void 0,
@@ -22269,7 +22147,7 @@ var MenuItemIndicator = React$1.forwardRef(
22269
22147
  {
22270
22148
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
22271
22149
  children: /* @__PURE__ */ jsx(
22272
- Primitive$3.span,
22150
+ Primitive.span,
22273
22151
  {
22274
22152
  ...itemIndicatorProps,
22275
22153
  ref: forwardedRef,
@@ -22286,7 +22164,7 @@ var MenuSeparator = React$1.forwardRef(
22286
22164
  (props, forwardedRef) => {
22287
22165
  const { __scopeMenu, ...separatorProps } = props;
22288
22166
  return /* @__PURE__ */ jsx(
22289
- Primitive$3.div,
22167
+ Primitive.div,
22290
22168
  {
22291
22169
  role: "separator",
22292
22170
  "aria-orientation": "horizontal",
@@ -22546,7 +22424,7 @@ var Arrow2 = MenuArrow;
22546
22424
  var SubTrigger = MenuSubTrigger;
22547
22425
  var SubContent = MenuSubContent;
22548
22426
  var DROPDOWN_MENU_NAME = "DropdownMenu";
22549
- var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
22427
+ var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
22550
22428
  DROPDOWN_MENU_NAME,
22551
22429
  [createMenuScope]
22552
22430
  );
@@ -22593,7 +22471,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
22593
22471
  const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
22594
22472
  const menuScope = useMenuScope(__scopeDropdownMenu);
22595
22473
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
22596
- Primitive$3.button,
22474
+ Primitive.button,
22597
22475
  {
22598
22476
  type: "button",
22599
22477
  id: context.triggerId,
@@ -22932,13 +22810,13 @@ const AlignMenu = () => {
22932
22810
  {
22933
22811
  variant: "ghost",
22934
22812
  size: "sm",
22935
- className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\n",
22813
+ className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\r\n",
22936
22814
  children: [
22937
22815
  /* @__PURE__ */ jsx(AlignLeft, { className: "!cteditor-size-4" }),
22938
22816
  /* @__PURE__ */ jsx(
22939
22817
  ChevronDown,
22940
22818
  {
22941
- className: "!cteditor-size-4 cteditor-opacity-50\n"
22819
+ className: "!cteditor-size-4 cteditor-opacity-50\r\n"
22942
22820
  }
22943
22821
  )
22944
22822
  ]
@@ -23146,7 +23024,7 @@ const BlockFormatMenu = ({ blockType }) => {
23146
23024
  onClick: handleClickIconButton,
23147
23025
  variant: "ghost",
23148
23026
  className: cn(
23149
- "cteditor-flex cteditor-items-center !cteditor-gap-1 cteditor-whitespace-nowrap",
23027
+ "cteditor-flex cteditor-items-center !cteditor-gap-1 cteditor-whitespace-nowrap ",
23150
23028
  open && "cteditor-bg-slate-100/5"
23151
23029
  ),
23152
23030
  size: "sm",
@@ -23441,7 +23319,7 @@ var V = "undefined" != typeof window ? useLayoutEffect$1 : useEffect$1, $ = func
23441
23319
  return React__default.createElement(U, u({}, r2, { colorModel: W }));
23442
23320
  };
23443
23321
  var POPOVER_NAME = "Popover";
23444
- var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
23322
+ var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
23445
23323
  createPopperScope
23446
23324
  ]);
23447
23325
  var usePopperScope = createPopperScope();
@@ -23505,7 +23383,7 @@ var PopoverTrigger$1 = React$1.forwardRef(
23505
23383
  const popperScope = usePopperScope(__scopePopover);
23506
23384
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
23507
23385
  const trigger = /* @__PURE__ */ jsx(
23508
- Primitive$3.button,
23386
+ Primitive.button,
23509
23387
  {
23510
23388
  type: "button",
23511
23389
  "aria-haspopup": "dialog",
@@ -23541,7 +23419,7 @@ var PopoverContent$1 = React$1.forwardRef(
23541
23419
  }
23542
23420
  );
23543
23421
  PopoverContent$1.displayName = CONTENT_NAME;
23544
- var Slot = /* @__PURE__ */ createSlot$3("PopoverContent.RemoveScroll");
23422
+ var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
23545
23423
  var PopoverContentModal = React$1.forwardRef(
23546
23424
  (props, forwardedRef) => {
23547
23425
  const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
@@ -23698,7 +23576,7 @@ var PopoverClose = React$1.forwardRef(
23698
23576
  const { __scopePopover, ...closeProps } = props;
23699
23577
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
23700
23578
  return /* @__PURE__ */ jsx(
23701
- Primitive$3.button,
23579
+ Primitive.button,
23702
23580
  {
23703
23581
  type: "button",
23704
23582
  ...closeProps,
@@ -23913,7 +23791,7 @@ const ColorPicker$2 = ({
23913
23791
  {
23914
23792
  onMouseDown: (e) => e.preventDefault(),
23915
23793
  onClick: () => setShowAdvanced(!showAdvanced),
23916
- className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\n",
23794
+ className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\r\n",
23917
23795
  children: [
23918
23796
  /* @__PURE__ */ jsx("span", { className: "cteditor-text-xs", children: showAdvanced ? "▼" : "▶" }),
23919
23797
  showAdvanced ? "Hide Advanced" : "Show Advanced"
@@ -24124,7 +24002,7 @@ function FeatureSuggestionDialog({
24124
24002
  errors.title && /* @__PURE__ */ jsx("p", { className: "cteditor-text-sm cteditor-text-red-500", children: errors.title })
24125
24003
  ] }),
24126
24004
  /* @__PURE__ */ jsxs("div", { className: "cteditor-grid cteditor-gap-2", children: [
24127
- /* @__PURE__ */ jsx(Label$2, { htmlFor: "description", children: "Description *" }),
24005
+ /* @__PURE__ */ jsx(Label$2, { htmlFor: "description", children: "Description * dss" }),
24128
24006
  /* @__PURE__ */ jsx(
24129
24007
  "textarea",
24130
24008
  {
@@ -24137,7 +24015,7 @@ function FeatureSuggestionDialog({
24137
24015
  setErrors({ ...errors, description: void 0 });
24138
24016
  }
24139
24017
  },
24140
- className: `cteditor-flex text-sm cteditor-min-h-[120px] cteditor-w-full cteditor-rounded-md cteditor-border cteditor-border-input cteditor-bg-transparent cteditor-px-3 cteditor-py-2 cteditor-shadow-sm placeholder:cteditor-text-muted-foreground focus-visible:cteditor-outline-none focus-visible:cteditor-ring-1 focus-visible:cteditor-ring-ring disabled:cteditor-cursor-not-allowed disabled:cteditor-opacity-50 ${errors.description ? "cteditor-border-red-500 focus-visible:cteditor-ring-red-500" : ""}`
24018
+ className: `cteditor-flex cteditor-text-sm cteditor-min-h-[120px] cteditor-w-full cteditor-rounded-md cteditor-border cteditor-border-input cteditor-bg-transparent cteditor-px-3 cteditor-py-2 cteditor-shadow-sm placeholder:cteditor-text-muted-foreground focus-visible:cteditor-outline-none focus-visible:cteditor-ring-1 focus-visible:cteditor-ring-ring disabled:cteditor-cursor-not-allowed disabled:cteditor-opacity-50 ${errors.description ? "cteditor-border-red-500 focus-visible:cteditor-ring-red-500" : ""}`
24141
24019
  }
24142
24020
  ),
24143
24021
  errors.description && /* @__PURE__ */ jsx("p", { className: "cteditor-text-sm cteditor-text-red-500", children: errors.description })
@@ -26998,7 +26876,7 @@ const Toolbar = ({
26998
26876
  async (metadata) => {
26999
26877
  const toastId = toast.loading("Generating chart...");
27000
26878
  try {
27001
- const backendUrl = "https://api.cteditor.com/".replace(/\/$/, "");
26879
+ const backendUrl = "http://localhost:3000/".replace(/\/$/, "");
27002
26880
  const response = await fetch(`${backendUrl}/api/chat/regenerate`, {
27003
26881
  method: "POST",
27004
26882
  headers: {
@@ -27115,16 +26993,16 @@ const Toolbar = ({
27115
26993
  "div",
27116
26994
  {
27117
26995
  ref: toolbarRef,
27118
- className: "cteditor-flex cteditor-bg-background cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-items-center cteditor-gap-1.5 cteditor-relative cteditor-w-full cteditor-min-h-11 cteditor-overflow-hidden ",
26996
+ className: "cteditor-flex dark:cteditor-bg-background cteditor-bg-foreground/5 cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-items-center cteditor-gap-1.5 cteditor-relative cteditor-w-full cteditor-min-h-11 cteditor-overflow-hidden ",
27119
26997
  children: [
27120
26998
  /* @__PURE__ */ jsxs(
27121
26999
  "div",
27122
27000
  {
27123
27001
  "data-toolbar-item": "voiceTranscript",
27124
- className: "cteditor-flex cteditor-items-center cteditor-gap-1.5 md:cteditor-hidden",
27002
+ className: "cteditor-flex cteditor-items-center md:cteditor-hidden",
27125
27003
  children: [
27126
- /* @__PURE__ */ jsx(VoiceTranscriptButton, { editor: activeEditor }),
27127
- /* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7" })
27004
+ /* @__PURE__ */ jsx(VoiceTranscriptButton, { editor: activeEditor, apiKey: apiKey ?? void 0 }),
27005
+ /* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7 cteditor-ml-1.5" })
27128
27006
  ]
27129
27007
  }
27130
27008
  ),
@@ -27174,7 +27052,7 @@ const Toolbar = ({
27174
27052
  {
27175
27053
  "data-toolbar-item": "voiceTranscript",
27176
27054
  className: "cteditor-flex cteditor-items-center max-md:cteditor-hidden",
27177
- children: /* @__PURE__ */ jsx(VoiceTranscriptButton, { editor: activeEditor })
27055
+ children: /* @__PURE__ */ jsx(VoiceTranscriptButton, { editor: activeEditor, apiKey: apiKey ?? void 0 })
27178
27056
  }
27179
27057
  ),
27180
27058
  /* @__PURE__ */ jsx(VoiceTranscriptPlugin, {}),
@@ -27743,7 +27621,7 @@ const Toolbar = ({
27743
27621
  }
27744
27622
  },
27745
27623
  children: [
27746
- /* @__PURE__ */ jsxs("div", { className: "cteditor-sticky cteditor-top-0 cteditor-z-10", children: [
27624
+ /* @__PURE__ */ jsxs("div", { className: "cteditor-sticky cteditor-top-0 cteditor-z-10 cteditor-bg-popover ", children: [
27747
27625
  /* @__PURE__ */ jsxs("div", { className: "cteditor-relative", children: [
27748
27626
  /* @__PURE__ */ jsx(Search, { className: "cteditor-absolute cteditor-left-2.5 cteditor-top-1/2 cteditor-transform -cteditor-translate-y-1/2 cteditor-size-3.5 cteditor-text-muted-foreground/60" }),
27749
27627
  /* @__PURE__ */ jsx(
@@ -27769,53 +27647,53 @@ const Toolbar = ({
27769
27647
  ] }),
27770
27648
  moreMenuSearch && /* @__PURE__ */ jsx("p", { className: "cteditor-text-[10px] cteditor-text-muted-foreground/60 cteditor-mt-1.5 cteditor-px-0.5", children: hasMatchingItems ? "Showing matching tools" : "No tools found" })
27771
27649
  ] }),
27772
- /* @__PURE__ */ jsxs("div", { className: "md:cteditor-hidden", children: [
27773
- /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: () => setIsFeatureSuggestionDialogOpen(true), children: [
27774
- /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Lightbulb, {}) }),
27775
- /* @__PURE__ */ jsx("span", { children: "Suggest a Feature" })
27776
- ] }),
27777
- /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: clearFormatting, children: [
27778
- /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(RemoveFormatting, {}) }),
27779
- /* @__PURE__ */ jsx("span", { children: "Clear formatting" })
27780
- ] }),
27781
- /* @__PURE__ */ jsxs(
27782
- DropdownMenuItem$1,
27783
- {
27784
- onClick: handleClearEditorContent,
27785
- disabled: isEditorEmpty,
27786
- children: [
27787
- /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(X$1, {}) }),
27788
- /* @__PURE__ */ jsx("span", { children: "Clear editor" })
27789
- ]
27790
- }
27791
- ),
27792
- enableUndoRedo && /* @__PURE__ */ jsxs(Fragment, { children: [
27650
+ /* @__PURE__ */ jsxs("div", { children: [
27651
+ /* @__PURE__ */ jsxs("div", { className: "md:cteditor-hidden", children: [
27652
+ /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: () => setIsFeatureSuggestionDialogOpen(true), children: [
27653
+ /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Lightbulb, {}) }),
27654
+ /* @__PURE__ */ jsx("span", { children: "Suggest a Feature" })
27655
+ ] }),
27656
+ /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: clearFormatting, children: [
27657
+ /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(RemoveFormatting, {}) }),
27658
+ /* @__PURE__ */ jsx("span", { children: "Clear formatting" })
27659
+ ] }),
27793
27660
  /* @__PURE__ */ jsxs(
27794
27661
  DropdownMenuItem$1,
27795
27662
  {
27796
- onClick: () => activeEditor.dispatchCommand(UNDO_COMMAND, void 0),
27797
- disabled: disableMap["undo"],
27663
+ onClick: handleClearEditorContent,
27664
+ disabled: isEditorEmpty,
27798
27665
  children: [
27799
- /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Undo, {}) }),
27800
- /* @__PURE__ */ jsx("span", { children: "Undo (Ctrl + Z)" })
27666
+ /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(X$1, {}) }),
27667
+ /* @__PURE__ */ jsx("span", { children: "Clear editor" })
27801
27668
  ]
27802
27669
  }
27803
27670
  ),
27804
- /* @__PURE__ */ jsxs(
27805
- DropdownMenuItem$1,
27806
- {
27807
- onClick: () => activeEditor.dispatchCommand(REDO_COMMAND, void 0),
27808
- disabled: disableMap["redo"],
27809
- children: [
27810
- /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Redo, {}) }),
27811
- /* @__PURE__ */ jsx("span", { children: "Redo (Ctrl + Y)" })
27812
- ]
27813
- }
27814
- )
27671
+ enableUndoRedo && /* @__PURE__ */ jsxs(Fragment, { children: [
27672
+ /* @__PURE__ */ jsxs(
27673
+ DropdownMenuItem$1,
27674
+ {
27675
+ onClick: () => activeEditor.dispatchCommand(UNDO_COMMAND, void 0),
27676
+ disabled: disableMap["undo"],
27677
+ children: [
27678
+ /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Undo, {}) }),
27679
+ /* @__PURE__ */ jsx("span", { children: "Undo (Ctrl + Z)" })
27680
+ ]
27681
+ }
27682
+ ),
27683
+ /* @__PURE__ */ jsxs(
27684
+ DropdownMenuItem$1,
27685
+ {
27686
+ onClick: () => activeEditor.dispatchCommand(REDO_COMMAND, void 0),
27687
+ disabled: disableMap["redo"],
27688
+ children: [
27689
+ /* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(Redo, {}) }),
27690
+ /* @__PURE__ */ jsx("span", { children: "Redo (Ctrl + Y)" })
27691
+ ]
27692
+ }
27693
+ )
27694
+ ] }),
27695
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" })
27815
27696
  ] }),
27816
- /* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" })
27817
- ] }),
27818
- /* @__PURE__ */ jsxs("div", { className: "cteditor-overflow-y-auto cteditor-flex-1 cteditor-py-1", children: [
27819
27697
  !hasMatchingItems && moreMenuSearch && /* @__PURE__ */ jsxs("div", { className: "cteditor-py-8 cteditor-text-center cteditor-text-muted-foreground/60", children: [
27820
27698
  /* @__PURE__ */ jsx(Search, { className: "cteditor-size-8 cteditor-mx-auto cteditor-mb-2 cteditor-opacity-40" }),
27821
27699
  /* @__PURE__ */ jsx("p", { className: "cteditor-text-sm", children: "No tools found" }),
@@ -28607,7 +28485,7 @@ class GrammarAIService {
28607
28485
  __publicField(this, "apiEndpoint");
28608
28486
  __publicField(this, "requestTimeout", REQUEST_TIMEOUT);
28609
28487
  __publicField(this, "sentenceCache", /* @__PURE__ */ new Map());
28610
- this.apiEndpoint = "https://api.cteditor.com/" + apiEndpoint;
28488
+ this.apiEndpoint = "http://localhost:3000/" + apiEndpoint;
28611
28489
  }
28612
28490
  isSentenceCached(text) {
28613
28491
  const hash = generateSentenceHash(text);
@@ -37038,7 +36916,7 @@ function TableActionMenu({
37038
36916
  /* @__PURE__ */ jsxs(
37039
36917
  "div",
37040
36918
  {
37041
- className: "dropdown table-drop cteditor-z-[100]\n cteditor-flex\n cteditor-flex-col\n cteditor-fixed\n cteditor-min-h-[40px]\n cteditor-min-w-[200px]\n cteditor-p-[6px]\n cteditor-overflow-y-auto\n cteditor-overflow-x-hidden \n cteditor-shadow-xl\n cteditor-rounded-lg\n cteditor-border\n cteditor-border-border\n cteditor-bg-background \n cteditor-backdrop-blur-md\n cteditor-space-y-0.5\n ",
36919
+ className: "dropdown table-drop cteditor-z-[100]\r\n cteditor-flex\r\n cteditor-flex-col\r\n cteditor-fixed\r\n cteditor-min-h-[40px]\r\n cteditor-min-w-[200px]\r\n cteditor-p-[6px]\r\n cteditor-overflow-y-auto\r\n cteditor-overflow-x-hidden \r\n cteditor-shadow-xl\r\n cteditor-rounded-lg\r\n cteditor-border\r\n cteditor-border-border\r\n cteditor-bg-background \r\n cteditor-backdrop-blur-md\r\n cteditor-space-y-0.5\r\n ",
37042
36920
  ref: dropDownRef,
37043
36921
  onClick: (e) => {
37044
36922
  e.stopPropagation();
@@ -40400,7 +40278,7 @@ const useStyles = () => ({
40400
40278
  contentEditable: cn(
40401
40279
  "cteditor-relative cteditor-min-h-[300px] cteditor-rounded-lg cteditor-p-3 !cteditor-h-auto cteditor-resize-none cteditor-outline-0 cteditor-content cteditor-pb-12",
40402
40280
  // Ensure strong contrast in both themes
40403
- "cteditor-text-foreground cteditor-bg-background",
40281
+ "cteditor-text-foreground dark:cteditor-bg-background cteditor-bg-foreground/5",
40404
40282
  // Default font: Arial 16px to match toolbar defaults and ensure WYSIWYG output
40405
40283
  "cteditor-font-arial cteditor-text-base",
40406
40284
  // Caret and spacing
@@ -41185,4 +41063,4 @@ export {
41185
41063
  useReactNativeBridge as w,
41186
41064
  editorConfig as x
41187
41065
  };
41188
- //# sourceMappingURL=index-e6dfde84.js.map
41066
+ //# sourceMappingURL=index-c32880a3.js.map