ct-rich-text-editor 1.3.23 → 1.3.25

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 (228) hide show
  1. package/README.md +233 -233
  2. package/dist/App.d.ts +2 -3
  3. package/dist/Provider/EditorProvider.d.ts +26 -27
  4. package/dist/Provider/LexicalProvider.d.ts +5 -6
  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 +1 -2
  8. package/dist/api/config/endpoints.d.ts +18 -18
  9. package/dist/api/featureSuggestion.d.ts +23 -23
  10. package/dist/api/transcript/index.d.ts +1 -1
  11. package/dist/assets/style.css +5205 -5192
  12. package/dist/{babel-d155920e.js → babel-d3085146.js} +3565 -3292
  13. package/dist/babel-d3085146.js.map +1 -0
  14. package/dist/components/AiPlugin/index.d.ts +6 -6
  15. package/dist/components/AlignMenu/AlignMenu.d.ts +8 -9
  16. package/dist/components/AlignMenu/AlignMenuDrop.d.ts +2 -3
  17. package/dist/components/AlignMenu/index.d.ts +1 -1
  18. package/dist/components/AutoExpandingDemo.d.ts +5 -6
  19. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +2 -3
  20. package/dist/components/BlockFormatMenu/constants.d.ts +14 -14
  21. package/dist/components/BlockFormatMenu/index.d.ts +1 -1
  22. package/dist/components/ChartEditDialog.d.ts +8 -9
  23. package/dist/components/ChartInsertDialog.d.ts +7 -8
  24. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +6 -7
  25. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +8 -9
  26. package/dist/components/CodeActionMenuPlugin/index.d.ts +4 -5
  27. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
  28. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -3
  29. package/dist/components/ColorPicker/index.d.ts +1 -1
  30. package/dist/components/CommentSidebar/CommentSidebar.d.ts +7 -8
  31. package/dist/components/CommentSidebar/index.d.ts +1 -1
  32. package/dist/components/CommentToggle/CommentToggle.d.ts +7 -8
  33. package/dist/components/CommentToggle/index.d.ts +1 -1
  34. package/dist/components/CommentView/CommentView.d.ts +8 -9
  35. package/dist/components/CommentView/index.d.ts +1 -1
  36. package/dist/components/ConfigurableEditorWithAuth.d.ts +12 -13
  37. package/dist/components/DatePicker/DatePickerWidget.d.ts +6 -7
  38. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +2 -3
  39. package/dist/components/EmojiPickerWidget/index.d.ts +1 -1
  40. package/dist/components/FeatureSuggestionDialog/index.d.ts +6 -6
  41. package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -7
  42. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +4 -5
  43. package/dist/components/FileView/index.d.ts +8 -9
  44. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +6 -7
  45. package/dist/components/FontSizePicker/FontSizeControl.d.ts +2 -3
  46. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +2 -3
  47. package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +2 -3
  48. package/dist/components/FormatTextMenu/index.d.ts +1 -1
  49. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +6 -7
  50. package/dist/components/HtmlViewDisplay.d.ts +2 -3
  51. package/dist/components/ImageComparisonDialog/index.d.ts +10 -11
  52. package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +10 -11
  53. package/dist/components/ImageGenerationDialog/index.d.ts +10 -11
  54. package/dist/components/ImageInsertTest.d.ts +2 -3
  55. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +8 -9
  56. package/dist/components/ImageView/ImageDialog/index.d.ts +5 -6
  57. package/dist/components/ImageView/ImageResizer.d.ts +15 -16
  58. package/dist/components/ImageView/index.d.ts +15 -16
  59. package/dist/components/InsertMenu/InsertMenu.d.ts +8 -9
  60. package/dist/components/InsertMenu/InsertMenuDrop.d.ts +8 -9
  61. package/dist/components/InsertMenu/index.d.ts +1 -1
  62. package/dist/components/LanguageSelectorDialog/index.d.ts +7 -8
  63. package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +5 -6
  64. package/dist/components/NotePanelMenu/index.d.ts +1 -1
  65. package/dist/components/NotePanelView/NotePanelView.d.ts +8 -9
  66. package/dist/components/NotePanelView/index.d.ts +1 -1
  67. package/dist/components/Placeholder/Placeholder.d.ts +2 -3
  68. package/dist/components/Placeholder/index.d.ts +1 -1
  69. package/dist/components/Placeholder/styles.d.ts +1 -1
  70. package/dist/components/ScopedEditor.d.ts +8 -8
  71. package/dist/components/SignatureCaption/index.d.ts +5 -6
  72. package/dist/components/TableColorPicker/index.d.ts +7 -8
  73. package/dist/components/TableModal/TableModal.d.ts +9 -10
  74. package/dist/components/TextEnhanceDialog/index.d.ts +9 -10
  75. package/dist/components/ToneAdjustDialog/index.d.ts +7 -8
  76. package/dist/components/Toolbar/Toolbar.d.ts +2 -3
  77. package/dist/components/Toolbar/index.d.ts +1 -1
  78. package/dist/components/Toolbar/styles.d.ts +6 -6
  79. package/dist/components/ui/avatar.d.ts +6 -6
  80. package/dist/components/ui/badge.d.ts +8 -9
  81. package/dist/components/ui/button.d.ts +10 -11
  82. package/dist/components/ui/calendar.d.ts +7 -8
  83. package/dist/components/ui/card.d.ts +8 -8
  84. package/dist/components/ui/checkbox.d.ts +4 -4
  85. package/dist/components/ui/dialog.d.ts +19 -19
  86. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  87. package/dist/components/ui/input.d.ts +3 -3
  88. package/dist/components/ui/label.d.ts +4 -4
  89. package/dist/components/ui/popover.d.ts +7 -7
  90. package/dist/components/ui/select.d.ts +13 -13
  91. package/dist/components/ui/separator.d.ts +4 -4
  92. package/dist/components/ui/sheet.d.ts +24 -24
  93. package/dist/components/ui/skeleton.d.ts +3 -3
  94. package/dist/components/ui/tabs.d.ts +7 -7
  95. package/dist/components/ui/textarea.d.ts +3 -3
  96. package/dist/components/ui/tooltip.d.ts +7 -7
  97. package/dist/constants.d.ts +21 -22
  98. package/dist/context/CommentContext.d.ts +42 -43
  99. package/dist/context/HtmlViewContext.d.ts +16 -17
  100. package/dist/context/ToolbarContext.d.ts +55 -56
  101. package/dist/editorConfig.d.ts +48 -48
  102. package/dist/{estree-b1fff53b.js → estree-164983f6.js} +1763 -1778
  103. package/dist/estree-164983f6.js.map +1 -0
  104. package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
  105. package/dist/hooks/useBlockFormat.d.ts +16 -17
  106. package/dist/hooks/useColorPicker.d.ts +6 -6
  107. package/dist/hooks/useCustomCommands.d.ts +2 -3
  108. package/dist/hooks/useDebounce.d.ts +1 -1
  109. package/dist/hooks/useEditorToolbar.d.ts +9 -10
  110. package/dist/hooks/useInsertMenu.d.ts +9 -9
  111. package/dist/hooks/useModal.d.ts +5 -5
  112. package/dist/hooks/useS3Uploader.d.ts +11 -11
  113. package/dist/hooks/useVoiceToText.d.ts +15 -15
  114. package/dist/{html-f95ee5dc.js → html-5586dbf6.js} +701 -656
  115. package/dist/html-5586dbf6.js.map +1 -0
  116. package/dist/{html2pdf.bundle-026397bd.js → html2pdf.bundle-915945f4.js} +2 -2
  117. package/dist/html2pdf.bundle-915945f4.js.map +1 -0
  118. package/dist/{html2pdf.bundle.min-49ff1939.js → html2pdf.bundle.min-53a200a1.js} +2 -2
  119. package/dist/html2pdf.bundle.min-53a200a1.js.map +1 -0
  120. package/dist/{index-cea164e5.js → index-8daaa42a.js} +246 -204
  121. package/dist/index-8daaa42a.js.map +1 -0
  122. package/dist/{index-b9ad2974.js → index-d46a32ad.js} +940 -518
  123. package/dist/index-d46a32ad.js.map +1 -0
  124. package/dist/{index-b8db2529.js → index-f8c2acae.js} +2 -2
  125. package/dist/index-f8c2acae.js.map +1 -0
  126. package/dist/index.d.ts +8 -8
  127. package/dist/index.js +1 -1
  128. package/dist/lib/utils.d.ts +1 -2
  129. package/dist/main.d.ts +0 -1
  130. package/dist/{markdown-1d9e6c3f.js → markdown-d513479b.js} +1836 -1789
  131. package/dist/markdown-d513479b.js.map +1 -0
  132. package/dist/nodes/ChartNode.d.ts +40 -41
  133. package/dist/nodes/CommentNode.d.ts +33 -34
  134. package/dist/nodes/CommentedTextNode.d.ts +28 -29
  135. package/dist/nodes/EmbedNode.d.ts +25 -26
  136. package/dist/nodes/FileNode.d.ts +31 -32
  137. package/dist/nodes/ImageNode.d.ts +58 -59
  138. package/dist/nodes/MentionNode.d.ts +74 -75
  139. package/dist/nodes/NotePanelNode.d.ts +30 -31
  140. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +24 -25
  141. package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
  142. package/dist/pages/NotFound.d.ts +2 -2
  143. package/dist/pages/RichTextEditor.d.ts +6 -6
  144. package/dist/pages/TextareaEditor.d.ts +6 -6
  145. package/dist/pages/styles.d.ts +5 -5
  146. package/dist/plugins/AIChatPlugin.d.ts +10 -11
  147. package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
  148. package/dist/plugins/AutocompletePlugin.d.ts +22 -22
  149. package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
  150. package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
  151. package/dist/plugins/CodeHighlightPlugin.d.ts +2 -3
  152. package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +20 -21
  153. package/dist/plugins/CommentBubblePlugin.d.ts +2 -3
  154. package/dist/plugins/CommentPlugin.d.ts +6 -7
  155. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +28 -29
  156. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
  157. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +6 -7
  158. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
  159. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
  160. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +3 -4
  161. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +5 -6
  162. package/dist/plugins/FilePlugin.d.ts +7 -8
  163. package/dist/plugins/FloatingEnhanceButton/index.d.ts +3 -4
  164. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +5 -6
  165. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +25 -26
  166. package/dist/plugins/GrammarCheckPlugin.d.ts +1 -2
  167. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
  168. package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
  169. package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
  170. package/dist/plugins/ImagePlugin.d.ts +6 -7
  171. package/dist/plugins/LinkPlugin/index.d.ts +5 -6
  172. package/dist/plugins/LinkPreviewPlugin/index.d.ts +2 -2
  173. package/dist/plugins/LocalStoragePlugin.d.ts +6 -7
  174. package/dist/plugins/MentionsPlugin/index.d.ts +6 -7
  175. package/dist/plugins/NotePanelPlugin.d.ts +6 -7
  176. package/dist/plugins/RichTextPastePlugin/index.d.ts +15 -15
  177. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +5 -6
  178. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
  179. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
  180. package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
  181. package/dist/plugins/TableActionMenuPlugin/index.d.ts +5 -6
  182. package/dist/plugins/TableCellResizer/index.d.ts +1 -2
  183. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
  184. package/dist/plugins/TablePlugin.d.ts +2 -3
  185. package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
  186. package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
  187. package/dist/plugins/TreeViewPlugin.d.ts +2 -3
  188. package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
  189. package/dist/plugins/VoiceTranscriptPlugin.d.ts +21 -21
  190. package/dist/plugins/WordCountPlugin.d.ts +2 -3
  191. package/dist/{postcss-c2592f3f.js → postcss-f084f74d.js} +1378 -1357
  192. package/dist/postcss-f084f74d.js.map +1 -0
  193. package/dist/standalone-5a8c6b7e.js +2518 -0
  194. package/dist/standalone-5a8c6b7e.js.map +1 -0
  195. package/dist/styles/PlaygroundEditorTheme.d.ts +2 -3
  196. package/dist/types.d.ts +147 -148
  197. package/dist/typescript-b1005db4.js +13705 -0
  198. package/dist/typescript-b1005db4.js.map +1 -0
  199. package/dist/ui/ColorPicker.d.ts +13 -14
  200. package/dist/ui/Icons.d.ts +47 -47
  201. package/dist/ui/TextInput.d.ts +10 -11
  202. package/dist/utils/dateFormats.d.ts +33 -33
  203. package/dist/utils/debounce.d.ts +5 -6
  204. package/dist/utils/editorStyleConverter.d.ts +16 -17
  205. package/dist/utils/export.d.ts +1 -2
  206. package/dist/utils/getDOMRangeRect.d.ts +13 -13
  207. package/dist/utils/getSelectedNode.d.ts +2 -3
  208. package/dist/utils/helper.d.ts +3 -3
  209. package/dist/utils/index.d.ts +3 -4
  210. package/dist/utils/invarient.d.ts +1 -1
  211. package/dist/utils/setFloatingElemPosition.d.ts +8 -8
  212. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
  213. package/dist/utils/url.d.ts +9 -9
  214. package/package.json +127 -127
  215. package/dist/babel-d155920e.js.map +0 -1
  216. package/dist/estree-b1fff53b.js.map +0 -1
  217. package/dist/html-f95ee5dc.js.map +0 -1
  218. package/dist/html2pdf.bundle-026397bd.js.map +0 -1
  219. package/dist/html2pdf.bundle.min-49ff1939.js.map +0 -1
  220. package/dist/index-b8db2529.js.map +0 -1
  221. package/dist/index-b9ad2974.js.map +0 -1
  222. package/dist/index-cea164e5.js.map +0 -1
  223. package/dist/markdown-1d9e6c3f.js.map +0 -1
  224. package/dist/postcss-c2592f3f.js.map +0 -1
  225. package/dist/standalone-bcc7f37a.js +0 -2649
  226. package/dist/standalone-bcc7f37a.js.map +0 -1
  227. package/dist/typescript-48c10f50.js +0 -13601
  228. package/dist/typescript-48c10f50.js.map +0 -1
@@ -1478,7 +1478,7 @@ const AiTextTransform = async ({ content, apiKey }) => {
1478
1478
  const AI_ACTION_COMMAND = createCommand(
1479
1479
  "AI_ACTION_COMMAND"
1480
1480
  );
1481
- const ImageView = React__default.lazy(() => import("./index-cea164e5.js"));
1481
+ const ImageView = React__default.lazy(() => import("./index-8daaa42a.js"));
1482
1482
  function isGoogleDocCheckboxImg(img) {
1483
1483
  return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
1484
1484
  }
@@ -1750,18 +1750,18 @@ const ImagePlugin = ({
1750
1750
  }, [captionsEnabled, editor]);
1751
1751
  return null;
1752
1752
  };
1753
- function setRef$1(ref, value) {
1753
+ function setRef(ref, value) {
1754
1754
  if (typeof ref === "function") {
1755
1755
  return ref(value);
1756
1756
  } else if (ref !== null && ref !== void 0) {
1757
1757
  ref.current = value;
1758
1758
  }
1759
1759
  }
1760
- function composeRefs$1(...refs) {
1760
+ function composeRefs(...refs) {
1761
1761
  return (node) => {
1762
1762
  let hasCleanup = false;
1763
1763
  const cleanups = refs.map((ref) => {
1764
- const cleanup = setRef$1(ref, node);
1764
+ const cleanup = setRef(ref, node);
1765
1765
  if (!hasCleanup && typeof cleanup == "function") {
1766
1766
  hasCleanup = true;
1767
1767
  }
@@ -1774,31 +1774,34 @@ function composeRefs$1(...refs) {
1774
1774
  if (typeof cleanup == "function") {
1775
1775
  cleanup();
1776
1776
  } else {
1777
- setRef$1(refs[i2], null);
1777
+ setRef(refs[i2], null);
1778
1778
  }
1779
1779
  }
1780
1780
  };
1781
1781
  }
1782
1782
  };
1783
1783
  }
1784
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1785
- var use = React$1[" use ".trim().toString()];
1786
- function isPromiseLike(value) {
1784
+ function useComposedRefs(...refs) {
1785
+ return React$1.useCallback(composeRefs(...refs), refs);
1786
+ }
1787
+ var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
1788
+ var use$3 = React$1[" use ".trim().toString()];
1789
+ function isPromiseLike$3(value) {
1787
1790
  return typeof value === "object" && value !== null && "then" in value;
1788
1791
  }
1789
- function isLazyComponent(element) {
1790
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
1792
+ function isLazyComponent$3(element) {
1793
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
1791
1794
  }
1792
1795
  // @__NO_SIDE_EFFECTS__
1793
- function createSlot$1(ownerName) {
1794
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
1796
+ function createSlot$4(ownerName) {
1797
+ const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
1795
1798
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
1796
1799
  let { children, ...slotProps } = props;
1797
- if (isLazyComponent(children) && typeof use === "function") {
1798
- children = use(children._payload);
1800
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
1801
+ children = use$3(children._payload);
1799
1802
  }
1800
1803
  const childrenArray = React$1.Children.toArray(children);
1801
- const slottable = childrenArray.find(isSlottable$1);
1804
+ const slottable = childrenArray.find(isSlottable$4);
1802
1805
  if (slottable) {
1803
1806
  const newElement = slottable.props.children;
1804
1807
  const newChildren = childrenArray.map((child) => {
@@ -1817,19 +1820,19 @@ function createSlot$1(ownerName) {
1817
1820
  Slot2.displayName = `${ownerName}.Slot`;
1818
1821
  return Slot2;
1819
1822
  }
1820
- var Slot$4 = /* @__PURE__ */ createSlot$1("Slot");
1823
+ var Slot$4 = /* @__PURE__ */ createSlot$4("Slot");
1821
1824
  // @__NO_SIDE_EFFECTS__
1822
- function createSlotClone$1(ownerName) {
1825
+ function createSlotClone$4(ownerName) {
1823
1826
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
1824
1827
  let { children, ...slotProps } = props;
1825
- if (isLazyComponent(children) && typeof use === "function") {
1826
- children = use(children._payload);
1828
+ if (isLazyComponent$3(children) && typeof use$3 === "function") {
1829
+ children = use$3(children._payload);
1827
1830
  }
1828
1831
  if (React$1.isValidElement(children)) {
1829
- const childrenRef = getElementRef$2(children);
1830
- const props2 = mergeProps$1(slotProps, children.props);
1832
+ const childrenRef = getElementRef$5(children);
1833
+ const props2 = mergeProps$4(slotProps, children.props);
1831
1834
  if (children.type !== React$1.Fragment) {
1832
- props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
1835
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
1833
1836
  }
1834
1837
  return React$1.cloneElement(children, props2);
1835
1838
  }
@@ -1838,11 +1841,11 @@ function createSlotClone$1(ownerName) {
1838
1841
  SlotClone.displayName = `${ownerName}.SlotClone`;
1839
1842
  return SlotClone;
1840
1843
  }
1841
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
1842
- function isSlottable$1(child) {
1843
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
1844
+ var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
1845
+ function isSlottable$4(child) {
1846
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
1844
1847
  }
1845
- function mergeProps$1(slotProps, childProps) {
1848
+ function mergeProps$4(slotProps, childProps) {
1846
1849
  const overrideProps = { ...childProps };
1847
1850
  for (const propName in childProps) {
1848
1851
  const slotPropValue = slotProps[propName];
@@ -1866,7 +1869,7 @@ function mergeProps$1(slotProps, childProps) {
1866
1869
  }
1867
1870
  return { ...slotProps, ...overrideProps };
1868
1871
  }
1869
- function getElementRef$2(element) {
1872
+ function getElementRef$5(element) {
1870
1873
  var _a, _b;
1871
1874
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
1872
1875
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -1941,7 +1944,28 @@ const cva = (base, config) => (props) => {
1941
1944
  }, []);
1942
1945
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
1943
1946
  };
1947
+ const concatArrays = (array1, array2) => {
1948
+ const combinedArray = new Array(array1.length + array2.length);
1949
+ for (let i2 = 0; i2 < array1.length; i2++) {
1950
+ combinedArray[i2] = array1[i2];
1951
+ }
1952
+ for (let i2 = 0; i2 < array2.length; i2++) {
1953
+ combinedArray[array1.length + i2] = array2[i2];
1954
+ }
1955
+ return combinedArray;
1956
+ };
1957
+ const createClassValidatorObject = (classGroupId, validator) => ({
1958
+ classGroupId,
1959
+ validator
1960
+ });
1961
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
1962
+ nextPart,
1963
+ validators,
1964
+ classGroupId
1965
+ });
1944
1966
  const CLASS_PART_SEPARATOR = "-";
1967
+ const EMPTY_CONFLICTS = [];
1968
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
1945
1969
  const createClassGroupUtils = (config) => {
1946
1970
  const classMap = createClassMap(config);
1947
1971
  const {
@@ -1949,104 +1973,135 @@ const createClassGroupUtils = (config) => {
1949
1973
  conflictingClassGroupModifiers
1950
1974
  } = config;
1951
1975
  const getClassGroupId = (className) => {
1952
- const classParts = className.split(CLASS_PART_SEPARATOR);
1953
- if (classParts[0] === "" && classParts.length !== 1) {
1954
- classParts.shift();
1976
+ if (className.startsWith("[") && className.endsWith("]")) {
1977
+ return getGroupIdForArbitraryProperty(className);
1955
1978
  }
1956
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
1979
+ const classParts = className.split(CLASS_PART_SEPARATOR);
1980
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
1981
+ return getGroupRecursive(classParts, startIndex, classMap);
1957
1982
  };
1958
1983
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
1959
- const conflicts = conflictingClassGroups[classGroupId] || [];
1960
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
1961
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
1984
+ if (hasPostfixModifier) {
1985
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
1986
+ const baseConflicts = conflictingClassGroups[classGroupId];
1987
+ if (modifierConflicts) {
1988
+ if (baseConflicts) {
1989
+ return concatArrays(baseConflicts, modifierConflicts);
1990
+ }
1991
+ return modifierConflicts;
1992
+ }
1993
+ return baseConflicts || EMPTY_CONFLICTS;
1962
1994
  }
1963
- return conflicts;
1995
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
1964
1996
  };
1965
1997
  return {
1966
1998
  getClassGroupId,
1967
1999
  getConflictingClassGroupIds
1968
2000
  };
1969
2001
  };
1970
- const getGroupRecursive = (classParts, classPartObject) => {
1971
- var _a;
1972
- if (classParts.length === 0) {
2002
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
2003
+ const classPathsLength = classParts.length - startIndex;
2004
+ if (classPathsLength === 0) {
1973
2005
  return classPartObject.classGroupId;
1974
2006
  }
1975
- const currentClassPart = classParts[0];
2007
+ const currentClassPart = classParts[startIndex];
1976
2008
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
1977
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
1978
- if (classGroupFromNextClassPart) {
1979
- return classGroupFromNextClassPart;
2009
+ if (nextClassPartObject) {
2010
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
2011
+ if (result)
2012
+ return result;
1980
2013
  }
1981
- if (classPartObject.validators.length === 0) {
2014
+ const validators = classPartObject.validators;
2015
+ if (validators === null) {
1982
2016
  return void 0;
1983
2017
  }
1984
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
1985
- return (_a = classPartObject.validators.find(({
1986
- validator
1987
- }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
1988
- };
1989
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
1990
- const getGroupIdForArbitraryProperty = (className) => {
1991
- if (arbitraryPropertyRegex.test(className)) {
1992
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
1993
- const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
1994
- if (property) {
1995
- return "arbitrary.." + property;
2018
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
2019
+ const validatorsLength = validators.length;
2020
+ for (let i2 = 0; i2 < validatorsLength; i2++) {
2021
+ const validatorObj = validators[i2];
2022
+ if (validatorObj.validator(classRest)) {
2023
+ return validatorObj.classGroupId;
1996
2024
  }
1997
2025
  }
2026
+ return void 0;
1998
2027
  };
2028
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
2029
+ const content = className.slice(1, -1);
2030
+ const colonIndex = content.indexOf(":");
2031
+ const property = content.slice(0, colonIndex);
2032
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
2033
+ })();
1999
2034
  const createClassMap = (config) => {
2000
2035
  const {
2001
2036
  theme: theme2,
2002
2037
  classGroups
2003
2038
  } = config;
2004
- const classMap = {
2005
- nextPart: /* @__PURE__ */ new Map(),
2006
- validators: []
2007
- };
2039
+ return processClassGroups(classGroups, theme2);
2040
+ };
2041
+ const processClassGroups = (classGroups, theme2) => {
2042
+ const classMap = createClassPartObject();
2008
2043
  for (const classGroupId in classGroups) {
2009
- processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme2);
2044
+ const group = classGroups[classGroupId];
2045
+ processClassesRecursively(group, classMap, classGroupId, theme2);
2010
2046
  }
2011
2047
  return classMap;
2012
2048
  };
2013
2049
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme2) => {
2014
- classGroup.forEach((classDefinition) => {
2015
- if (typeof classDefinition === "string") {
2016
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2017
- classPartObjectToEdit.classGroupId = classGroupId;
2018
- return;
2019
- }
2020
- if (typeof classDefinition === "function") {
2021
- if (isThemeGetter(classDefinition)) {
2022
- processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2023
- return;
2024
- }
2025
- classPartObject.validators.push({
2026
- validator: classDefinition,
2027
- classGroupId
2028
- });
2029
- return;
2030
- }
2031
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
2032
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme2);
2033
- });
2034
- });
2050
+ const len = classGroup.length;
2051
+ for (let i2 = 0; i2 < len; i2++) {
2052
+ const classDefinition = classGroup[i2];
2053
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme2);
2054
+ }
2055
+ };
2056
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2057
+ if (typeof classDefinition === "string") {
2058
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
2059
+ return;
2060
+ }
2061
+ if (typeof classDefinition === "function") {
2062
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme2);
2063
+ return;
2064
+ }
2065
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme2);
2066
+ };
2067
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
2068
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2069
+ classPartObjectToEdit.classGroupId = classGroupId;
2070
+ };
2071
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2072
+ if (isThemeGetter(classDefinition)) {
2073
+ processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
2074
+ return;
2075
+ }
2076
+ if (classPartObject.validators === null) {
2077
+ classPartObject.validators = [];
2078
+ }
2079
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
2080
+ };
2081
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
2082
+ const entries = Object.entries(classDefinition);
2083
+ const len = entries.length;
2084
+ for (let i2 = 0; i2 < len; i2++) {
2085
+ const [key, value] = entries[i2];
2086
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme2);
2087
+ }
2035
2088
  };
2036
2089
  const getPart = (classPartObject, path) => {
2037
- let currentClassPartObject = classPartObject;
2038
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
2039
- if (!currentClassPartObject.nextPart.has(pathPart)) {
2040
- currentClassPartObject.nextPart.set(pathPart, {
2041
- nextPart: /* @__PURE__ */ new Map(),
2042
- validators: []
2043
- });
2090
+ let current = classPartObject;
2091
+ const parts = path.split(CLASS_PART_SEPARATOR);
2092
+ const len = parts.length;
2093
+ for (let i2 = 0; i2 < len; i2++) {
2094
+ const part = parts[i2];
2095
+ let next = current.nextPart.get(part);
2096
+ if (!next) {
2097
+ next = createClassPartObject();
2098
+ current.nextPart.set(part, next);
2044
2099
  }
2045
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
2046
- });
2047
- return currentClassPartObject;
2100
+ current = next;
2101
+ }
2102
+ return current;
2048
2103
  };
2049
- const isThemeGetter = (func) => func.isThemeGetter;
2104
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
2050
2105
  const createLruCache = (maxCacheSize) => {
2051
2106
  if (maxCacheSize < 1) {
2052
2107
  return {
@@ -2056,31 +2111,31 @@ const createLruCache = (maxCacheSize) => {
2056
2111
  };
2057
2112
  }
2058
2113
  let cacheSize = 0;
2059
- let cache = /* @__PURE__ */ new Map();
2060
- let previousCache = /* @__PURE__ */ new Map();
2114
+ let cache = /* @__PURE__ */ Object.create(null);
2115
+ let previousCache = /* @__PURE__ */ Object.create(null);
2061
2116
  const update = (key, value) => {
2062
- cache.set(key, value);
2117
+ cache[key] = value;
2063
2118
  cacheSize++;
2064
2119
  if (cacheSize > maxCacheSize) {
2065
2120
  cacheSize = 0;
2066
2121
  previousCache = cache;
2067
- cache = /* @__PURE__ */ new Map();
2122
+ cache = /* @__PURE__ */ Object.create(null);
2068
2123
  }
2069
2124
  };
2070
2125
  return {
2071
2126
  get(key) {
2072
- let value = cache.get(key);
2127
+ let value = cache[key];
2073
2128
  if (value !== void 0) {
2074
2129
  return value;
2075
2130
  }
2076
- if ((value = previousCache.get(key)) !== void 0) {
2131
+ if ((value = previousCache[key]) !== void 0) {
2077
2132
  update(key, value);
2078
2133
  return value;
2079
2134
  }
2080
2135
  },
2081
2136
  set(key, value) {
2082
- if (cache.has(key)) {
2083
- cache.set(key, value);
2137
+ if (key in cache) {
2138
+ cache[key] = value;
2084
2139
  } else {
2085
2140
  update(key, value);
2086
2141
  }
@@ -2089,7 +2144,14 @@ const createLruCache = (maxCacheSize) => {
2089
2144
  };
2090
2145
  const IMPORTANT_MODIFIER = "!";
2091
2146
  const MODIFIER_SEPARATOR = ":";
2092
- const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
2147
+ const EMPTY_MODIFIERS = [];
2148
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
2149
+ modifiers,
2150
+ hasImportantModifier,
2151
+ baseClassName,
2152
+ maybePostfixModifierPosition,
2153
+ isExternal
2154
+ });
2093
2155
  const createParseClassName = (config) => {
2094
2156
  const {
2095
2157
  prefix,
@@ -2101,12 +2163,13 @@ const createParseClassName = (config) => {
2101
2163
  let parenDepth = 0;
2102
2164
  let modifierStart = 0;
2103
2165
  let postfixModifierPosition;
2104
- for (let index2 = 0; index2 < className.length; index2++) {
2105
- let currentCharacter = className[index2];
2166
+ const len = className.length;
2167
+ for (let index2 = 0; index2 < len; index2++) {
2168
+ const currentCharacter = className[index2];
2106
2169
  if (bracketDepth === 0 && parenDepth === 0) {
2107
2170
  if (currentCharacter === MODIFIER_SEPARATOR) {
2108
2171
  modifiers.push(className.slice(modifierStart, index2));
2109
- modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
2172
+ modifierStart = index2 + 1;
2110
2173
  continue;
2111
2174
  }
2112
2175
  if (currentCharacter === "/") {
@@ -2114,37 +2177,38 @@ const createParseClassName = (config) => {
2114
2177
  continue;
2115
2178
  }
2116
2179
  }
2117
- if (currentCharacter === "[") {
2180
+ if (currentCharacter === "[")
2118
2181
  bracketDepth++;
2119
- } else if (currentCharacter === "]") {
2182
+ else if (currentCharacter === "]")
2120
2183
  bracketDepth--;
2121
- } else if (currentCharacter === "(") {
2184
+ else if (currentCharacter === "(")
2122
2185
  parenDepth++;
2123
- } else if (currentCharacter === ")") {
2186
+ else if (currentCharacter === ")")
2124
2187
  parenDepth--;
2125
- }
2126
2188
  }
2127
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
2128
- const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
2129
- const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
2189
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2190
+ let baseClassName = baseClassNameWithImportantModifier;
2191
+ let hasImportantModifier = false;
2192
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2193
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2194
+ hasImportantModifier = true;
2195
+ } else if (
2196
+ /**
2197
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
2198
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
2199
+ */
2200
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
2201
+ ) {
2202
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
2203
+ hasImportantModifier = true;
2204
+ }
2130
2205
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
2131
- return {
2132
- modifiers,
2133
- hasImportantModifier,
2134
- baseClassName,
2135
- maybePostfixModifierPosition
2136
- };
2206
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2137
2207
  };
2138
2208
  if (prefix) {
2139
2209
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
2140
2210
  const parseClassNameOriginal = parseClassName;
2141
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
2142
- isExternal: true,
2143
- modifiers: [],
2144
- hasImportantModifier: false,
2145
- baseClassName: className,
2146
- maybePostfixModifierPosition: void 0
2147
- };
2211
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
2148
2212
  }
2149
2213
  if (experimentalParseClassName) {
2150
2214
  const parseClassNameOriginal = parseClassName;
@@ -2155,36 +2219,35 @@ const createParseClassName = (config) => {
2155
2219
  }
2156
2220
  return parseClassName;
2157
2221
  };
2158
- const stripImportantModifier = (baseClassName) => {
2159
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
2160
- return baseClassName.substring(0, baseClassName.length - 1);
2161
- }
2162
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
2163
- return baseClassName.substring(1);
2164
- }
2165
- return baseClassName;
2166
- };
2167
2222
  const createSortModifiers = (config) => {
2168
- const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
2169
- const sortModifiers = (modifiers) => {
2170
- if (modifiers.length <= 1) {
2171
- return modifiers;
2172
- }
2173
- const sortedModifiers = [];
2174
- let unsortedModifiers = [];
2175
- modifiers.forEach((modifier) => {
2176
- const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
2177
- if (isPositionSensitive) {
2178
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
2179
- unsortedModifiers = [];
2223
+ const modifierWeights = /* @__PURE__ */ new Map();
2224
+ config.orderSensitiveModifiers.forEach((mod, index2) => {
2225
+ modifierWeights.set(mod, 1e6 + index2);
2226
+ });
2227
+ return (modifiers) => {
2228
+ const result = [];
2229
+ let currentSegment = [];
2230
+ for (let i2 = 0; i2 < modifiers.length; i2++) {
2231
+ const modifier = modifiers[i2];
2232
+ const isArbitrary = modifier[0] === "[";
2233
+ const isOrderSensitive = modifierWeights.has(modifier);
2234
+ if (isArbitrary || isOrderSensitive) {
2235
+ if (currentSegment.length > 0) {
2236
+ currentSegment.sort();
2237
+ result.push(...currentSegment);
2238
+ currentSegment = [];
2239
+ }
2240
+ result.push(modifier);
2180
2241
  } else {
2181
- unsortedModifiers.push(modifier);
2242
+ currentSegment.push(modifier);
2182
2243
  }
2183
- });
2184
- sortedModifiers.push(...unsortedModifiers.sort());
2185
- return sortedModifiers;
2244
+ }
2245
+ if (currentSegment.length > 0) {
2246
+ currentSegment.sort();
2247
+ result.push(...currentSegment);
2248
+ }
2249
+ return result;
2186
2250
  };
2187
- return sortModifiers;
2188
2251
  };
2189
2252
  const createConfigUtils = (config) => ({
2190
2253
  cache: createLruCache(config.cacheSize),
@@ -2230,10 +2293,10 @@ const mergeClassList = (classList, configUtils) => {
2230
2293
  }
2231
2294
  hasPostfixModifier = false;
2232
2295
  }
2233
- const variantModifier = sortModifiers(modifiers).join(":");
2296
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
2234
2297
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2235
2298
  const classId = modifierId + classGroupId;
2236
- if (classGroupsInConflict.includes(classId)) {
2299
+ if (classGroupsInConflict.indexOf(classId) > -1) {
2237
2300
  continue;
2238
2301
  }
2239
2302
  classGroupsInConflict.push(classId);
@@ -2246,13 +2309,13 @@ const mergeClassList = (classList, configUtils) => {
2246
2309
  }
2247
2310
  return result;
2248
2311
  };
2249
- function twJoin() {
2312
+ const twJoin = (...classLists) => {
2250
2313
  let index2 = 0;
2251
2314
  let argument;
2252
2315
  let resolvedValue;
2253
2316
  let string = "";
2254
- while (index2 < arguments.length) {
2255
- if (argument = arguments[index2++]) {
2317
+ while (index2 < classLists.length) {
2318
+ if (argument = classLists[index2++]) {
2256
2319
  if (resolvedValue = toValue(argument)) {
2257
2320
  string && (string += " ");
2258
2321
  string += resolvedValue;
@@ -2260,7 +2323,7 @@ function twJoin() {
2260
2323
  }
2261
2324
  }
2262
2325
  return string;
2263
- }
2326
+ };
2264
2327
  const toValue = (mix) => {
2265
2328
  if (typeof mix === "string") {
2266
2329
  return mix;
@@ -2277,20 +2340,20 @@ const toValue = (mix) => {
2277
2340
  }
2278
2341
  return string;
2279
2342
  };
2280
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2343
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2281
2344
  let configUtils;
2282
2345
  let cacheGet;
2283
2346
  let cacheSet;
2284
- let functionToCall = initTailwindMerge;
2285
- function initTailwindMerge(classList) {
2347
+ let functionToCall;
2348
+ const initTailwindMerge = (classList) => {
2286
2349
  const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2287
2350
  configUtils = createConfigUtils(config);
2288
2351
  cacheGet = configUtils.cache.get;
2289
2352
  cacheSet = configUtils.cache.set;
2290
2353
  functionToCall = tailwindMerge;
2291
2354
  return tailwindMerge(classList);
2292
- }
2293
- function tailwindMerge(classList) {
2355
+ };
2356
+ const tailwindMerge = (classList) => {
2294
2357
  const cachedResult = cacheGet(classList);
2295
2358
  if (cachedResult) {
2296
2359
  return cachedResult;
@@ -2298,13 +2361,13 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2298
2361
  const result = mergeClassList(classList, configUtils);
2299
2362
  cacheSet(classList, result);
2300
2363
  return result;
2301
- }
2302
- return function callTailwindMerge() {
2303
- return functionToCall(twJoin.apply(null, arguments));
2304
2364
  };
2305
- }
2365
+ functionToCall = initTailwindMerge;
2366
+ return (...args) => functionToCall(twJoin(...args));
2367
+ };
2368
+ const fallbackThemeArr = [];
2306
2369
  const fromTheme = (key) => {
2307
- const themeGetter = (theme2) => theme2[key] || [];
2370
+ const themeGetter = (theme2) => theme2[key] || fallbackThemeArr;
2308
2371
  themeGetter.isThemeGetter = true;
2309
2372
  return themeGetter;
2310
2373
  };
@@ -4946,40 +5009,6 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
4946
5009
  }
4947
5010
  };
4948
5011
  }
4949
- function setRef(ref, value) {
4950
- if (typeof ref === "function") {
4951
- return ref(value);
4952
- } else if (ref !== null && ref !== void 0) {
4953
- ref.current = value;
4954
- }
4955
- }
4956
- function composeRefs(...refs) {
4957
- return (node) => {
4958
- let hasCleanup = false;
4959
- const cleanups = refs.map((ref) => {
4960
- const cleanup = setRef(ref, node);
4961
- if (!hasCleanup && typeof cleanup == "function") {
4962
- hasCleanup = true;
4963
- }
4964
- return cleanup;
4965
- });
4966
- if (hasCleanup) {
4967
- return () => {
4968
- for (let i2 = 0; i2 < cleanups.length; i2++) {
4969
- const cleanup = cleanups[i2];
4970
- if (typeof cleanup == "function") {
4971
- cleanup();
4972
- } else {
4973
- setRef(refs[i2], null);
4974
- }
4975
- }
4976
- };
4977
- }
4978
- };
4979
- }
4980
- function useComposedRefs(...refs) {
4981
- return React$1.useCallback(composeRefs(...refs), refs);
4982
- }
4983
5012
  function createContext2(rootComponentName, defaultContext) {
4984
5013
  const Context2 = React$1.createContext(defaultContext);
4985
5014
  const Provider2 = (props) => {
@@ -4998,7 +5027,7 @@ function createContext2(rootComponentName, defaultContext) {
4998
5027
  }
4999
5028
  return [Provider2, useContext2];
5000
5029
  }
5001
- function createContextScope(scopeName, createContextScopeDeps = []) {
5030
+ function createContextScope$1(scopeName, createContextScopeDeps = []) {
5002
5031
  let defaultContexts = [];
5003
5032
  function createContext3(rootComponentName, defaultContext) {
5004
5033
  const BaseContext = React$1.createContext(defaultContext);
@@ -5037,9 +5066,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
5037
5066
  };
5038
5067
  };
5039
5068
  createScope.scopeName = scopeName;
5040
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
5069
+ return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
5041
5070
  }
5042
- function composeContextScopes(...scopes) {
5071
+ function composeContextScopes$1(...scopes) {
5043
5072
  const baseScope = scopes[0];
5044
5073
  if (scopes.length === 1)
5045
5074
  return baseScope;
@@ -5139,12 +5168,12 @@ function isFunction(value) {
5139
5168
  return typeof value === "function";
5140
5169
  }
5141
5170
  // @__NO_SIDE_EFFECTS__
5142
- function createSlot(ownerName) {
5143
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
5171
+ function createSlot$3(ownerName) {
5172
+ const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
5144
5173
  const Slot2 = React$1.forwardRef((props, forwardedRef) => {
5145
5174
  const { children, ...slotProps } = props;
5146
5175
  const childrenArray = React$1.Children.toArray(children);
5147
- const slottable = childrenArray.find(isSlottable);
5176
+ const slottable = childrenArray.find(isSlottable$3);
5148
5177
  if (slottable) {
5149
5178
  const newElement = slottable.props.children;
5150
5179
  const newChildren = childrenArray.map((child) => {
@@ -5164,12 +5193,12 @@ function createSlot(ownerName) {
5164
5193
  return Slot2;
5165
5194
  }
5166
5195
  // @__NO_SIDE_EFFECTS__
5167
- function createSlotClone(ownerName) {
5196
+ function createSlotClone$3(ownerName) {
5168
5197
  const SlotClone = React$1.forwardRef((props, forwardedRef) => {
5169
5198
  const { children, ...slotProps } = props;
5170
5199
  if (React$1.isValidElement(children)) {
5171
- const childrenRef = getElementRef$1(children);
5172
- const props2 = mergeProps(slotProps, children.props);
5200
+ const childrenRef = getElementRef$4(children);
5201
+ const props2 = mergeProps$3(slotProps, children.props);
5173
5202
  if (children.type !== React$1.Fragment) {
5174
5203
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
5175
5204
  }
@@ -5180,20 +5209,20 @@ function createSlotClone(ownerName) {
5180
5209
  SlotClone.displayName = `${ownerName}.SlotClone`;
5181
5210
  return SlotClone;
5182
5211
  }
5183
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
5212
+ var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
5184
5213
  // @__NO_SIDE_EFFECTS__
5185
5214
  function createSlottable(ownerName) {
5186
5215
  const Slottable2 = ({ children }) => {
5187
5216
  return /* @__PURE__ */ jsx(Fragment, { children });
5188
5217
  };
5189
5218
  Slottable2.displayName = `${ownerName}.Slottable`;
5190
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
5219
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER$3;
5191
5220
  return Slottable2;
5192
5221
  }
5193
- function isSlottable(child) {
5194
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
5222
+ function isSlottable$3(child) {
5223
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
5195
5224
  }
5196
- function mergeProps(slotProps, childProps) {
5225
+ function mergeProps$3(slotProps, childProps) {
5197
5226
  const overrideProps = { ...childProps };
5198
5227
  for (const propName in childProps) {
5199
5228
  const slotPropValue = slotProps[propName];
@@ -5217,7 +5246,7 @@ function mergeProps(slotProps, childProps) {
5217
5246
  }
5218
5247
  return { ...slotProps, ...overrideProps };
5219
5248
  }
5220
- function getElementRef$1(element) {
5249
+ function getElementRef$4(element) {
5221
5250
  var _a, _b;
5222
5251
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
5223
5252
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -5231,7 +5260,7 @@ function getElementRef$1(element) {
5231
5260
  }
5232
5261
  return element.props.ref || element.ref;
5233
5262
  }
5234
- var NODES = [
5263
+ var NODES$3 = [
5235
5264
  "a",
5236
5265
  "button",
5237
5266
  "div",
@@ -5250,8 +5279,8 @@ var NODES = [
5250
5279
  "svg",
5251
5280
  "ul"
5252
5281
  ];
5253
- var Primitive = NODES.reduce((primitive, node) => {
5254
- const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
5282
+ var Primitive$3 = NODES$3.reduce((primitive, node) => {
5283
+ const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
5255
5284
  const Node2 = React$1.forwardRef((props, forwardedRef) => {
5256
5285
  const { asChild, ...primitiveProps } = props;
5257
5286
  const Comp = asChild ? Slot2 : node;
@@ -5384,7 +5413,7 @@ var DismissableLayer = React$1.forwardRef(
5384
5413
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
5385
5414
  }, []);
5386
5415
  return /* @__PURE__ */ jsx(
5387
- Primitive.div,
5416
+ Primitive$3.div,
5388
5417
  {
5389
5418
  ...layerProps,
5390
5419
  ref: composedRefs,
@@ -5417,7 +5446,7 @@ var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
5417
5446
  };
5418
5447
  }
5419
5448
  }, [context.branches]);
5420
- return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
5449
+ return /* @__PURE__ */ jsx(Primitive$3.div, { ...props, ref: composedRefs });
5421
5450
  });
5422
5451
  DismissableLayerBranch.displayName = BRANCH_NAME;
5423
5452
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -5626,7 +5655,7 @@ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
5626
5655
  },
5627
5656
  [loop, trapped, focusScope.paused]
5628
5657
  );
5629
- return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5658
+ return /* @__PURE__ */ jsx(Primitive$3.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
5630
5659
  });
5631
5660
  FocusScope.displayName = FOCUS_SCOPE_NAME;
5632
5661
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -5723,7 +5752,7 @@ var Portal$5 = React$1.forwardRef((props, forwardedRef) => {
5723
5752
  const [mounted, setMounted] = React$1.useState(false);
5724
5753
  useLayoutEffect2(() => setMounted(true), []);
5725
5754
  const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
5726
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
5755
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : null;
5727
5756
  });
5728
5757
  Portal$5.displayName = PORTAL_NAME$6;
5729
5758
  function useStateMachine(initialState, machine) {
@@ -5736,7 +5765,7 @@ var Presence = (props) => {
5736
5765
  const { present, children } = props;
5737
5766
  const presence = usePresence(present);
5738
5767
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React$1.Children.only(children);
5739
- const ref = useComposedRefs(presence.ref, getElementRef(child));
5768
+ const ref = useComposedRefs(presence.ref, getElementRef$3(child));
5740
5769
  const forceMount = typeof children === "function";
5741
5770
  return forceMount || presence.isPresent ? React$1.cloneElement(child, { ref }) : null;
5742
5771
  };
@@ -5835,7 +5864,7 @@ function usePresence(present) {
5835
5864
  function getAnimationName(styles) {
5836
5865
  return (styles == null ? void 0 : styles.animationName) || "none";
5837
5866
  }
5838
- function getElementRef(element) {
5867
+ function getElementRef$3(element) {
5839
5868
  var _a, _b;
5840
5869
  let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
5841
5870
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -6658,7 +6687,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
6658
6687
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
6659
6688
  };
6660
6689
  var DIALOG_NAME = "Dialog";
6661
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
6690
+ var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
6662
6691
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
6663
6692
  var Dialog$1 = (props) => {
6664
6693
  const {
@@ -6702,7 +6731,7 @@ var DialogTrigger = React$1.forwardRef(
6702
6731
  const context = useDialogContext(TRIGGER_NAME$5, __scopeDialog);
6703
6732
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
6704
6733
  return /* @__PURE__ */ jsx(
6705
- Primitive.button,
6734
+ Primitive$3.button,
6706
6735
  {
6707
6736
  type: "button",
6708
6737
  "aria-haspopup": "dialog",
@@ -6737,7 +6766,7 @@ var DialogOverlay$1 = React$1.forwardRef(
6737
6766
  }
6738
6767
  );
6739
6768
  DialogOverlay$1.displayName = OVERLAY_NAME;
6740
- var Slot$3 = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll");
6769
+ var Slot$3 = /* @__PURE__ */ createSlot$3("DialogOverlay.RemoveScroll");
6741
6770
  var DialogOverlayImpl = React$1.forwardRef(
6742
6771
  (props, forwardedRef) => {
6743
6772
  const { __scopeDialog, ...overlayProps } = props;
@@ -6746,7 +6775,7 @@ var DialogOverlayImpl = React$1.forwardRef(
6746
6775
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
6747
6776
  // ie. when `Overlay` and `Content` are siblings
6748
6777
  /* @__PURE__ */ jsx(RemoveScroll, { as: Slot$3, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
6749
- Primitive.div,
6778
+ Primitive$3.div,
6750
6779
  {
6751
6780
  "data-state": getState$1(context.open),
6752
6781
  ...overlayProps,
@@ -6891,7 +6920,7 @@ var DialogTitle$1 = React$1.forwardRef(
6891
6920
  (props, forwardedRef) => {
6892
6921
  const { __scopeDialog, ...titleProps } = props;
6893
6922
  const context = useDialogContext(TITLE_NAME, __scopeDialog);
6894
- return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
6923
+ return /* @__PURE__ */ jsx(Primitive$3.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
6895
6924
  }
6896
6925
  );
6897
6926
  DialogTitle$1.displayName = TITLE_NAME;
@@ -6900,7 +6929,7 @@ var DialogDescription$1 = React$1.forwardRef(
6900
6929
  (props, forwardedRef) => {
6901
6930
  const { __scopeDialog, ...descriptionProps } = props;
6902
6931
  const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
6903
- return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
6932
+ return /* @__PURE__ */ jsx(Primitive$3.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
6904
6933
  }
6905
6934
  );
6906
6935
  DialogDescription$1.displayName = DESCRIPTION_NAME;
@@ -6910,7 +6939,7 @@ var DialogClose = React$1.forwardRef(
6910
6939
  const { __scopeDialog, ...closeProps } = props;
6911
6940
  const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
6912
6941
  return /* @__PURE__ */ jsx(
6913
- Primitive.button,
6942
+ Primitive$3.button,
6914
6943
  {
6915
6944
  type: "button",
6916
6945
  ...closeProps,
@@ -7906,7 +7935,7 @@ const DialogContent = React$1.forwardRef(({ className, children, ...props }, ref
7906
7935
  /* @__PURE__ */ jsxs(
7907
7936
  Close,
7908
7937
  {
7909
- 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",
7938
+ 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",
7910
7939
  children: [
7911
7940
  /* @__PURE__ */ jsx(X$1, { className: "cteditor-h-4 cteditor-w-4" }),
7912
7941
  /* @__PURE__ */ jsx("span", { className: "!cteditor-sr-only", children: "Close" })
@@ -7984,10 +8013,140 @@ const Input$1 = React$1.forwardRef(
7984
8013
  }
7985
8014
  );
7986
8015
  Input$1.displayName = "Input";
8016
+ var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
8017
+ var use$2 = React$1[" use ".trim().toString()];
8018
+ function isPromiseLike$2(value) {
8019
+ return typeof value === "object" && value !== null && "then" in value;
8020
+ }
8021
+ function isLazyComponent$2(element) {
8022
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
8023
+ }
8024
+ // @__NO_SIDE_EFFECTS__
8025
+ function createSlot$2(ownerName) {
8026
+ const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
8027
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
8028
+ let { children, ...slotProps } = props;
8029
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
8030
+ children = use$2(children._payload);
8031
+ }
8032
+ const childrenArray = React$1.Children.toArray(children);
8033
+ const slottable = childrenArray.find(isSlottable$2);
8034
+ if (slottable) {
8035
+ const newElement = slottable.props.children;
8036
+ const newChildren = childrenArray.map((child) => {
8037
+ if (child === slottable) {
8038
+ if (React$1.Children.count(newElement) > 1)
8039
+ return React$1.Children.only(null);
8040
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
8041
+ } else {
8042
+ return child;
8043
+ }
8044
+ });
8045
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
8046
+ }
8047
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
8048
+ });
8049
+ Slot2.displayName = `${ownerName}.Slot`;
8050
+ return Slot2;
8051
+ }
8052
+ // @__NO_SIDE_EFFECTS__
8053
+ function createSlotClone$2(ownerName) {
8054
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
8055
+ let { children, ...slotProps } = props;
8056
+ if (isLazyComponent$2(children) && typeof use$2 === "function") {
8057
+ children = use$2(children._payload);
8058
+ }
8059
+ if (React$1.isValidElement(children)) {
8060
+ const childrenRef = getElementRef$2(children);
8061
+ const props2 = mergeProps$2(slotProps, children.props);
8062
+ if (children.type !== React$1.Fragment) {
8063
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
8064
+ }
8065
+ return React$1.cloneElement(children, props2);
8066
+ }
8067
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
8068
+ });
8069
+ SlotClone.displayName = `${ownerName}.SlotClone`;
8070
+ return SlotClone;
8071
+ }
8072
+ var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
8073
+ function isSlottable$2(child) {
8074
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
8075
+ }
8076
+ function mergeProps$2(slotProps, childProps) {
8077
+ const overrideProps = { ...childProps };
8078
+ for (const propName in childProps) {
8079
+ const slotPropValue = slotProps[propName];
8080
+ const childPropValue = childProps[propName];
8081
+ const isHandler = /^on[A-Z]/.test(propName);
8082
+ if (isHandler) {
8083
+ if (slotPropValue && childPropValue) {
8084
+ overrideProps[propName] = (...args) => {
8085
+ const result = childPropValue(...args);
8086
+ slotPropValue(...args);
8087
+ return result;
8088
+ };
8089
+ } else if (slotPropValue) {
8090
+ overrideProps[propName] = slotPropValue;
8091
+ }
8092
+ } else if (propName === "style") {
8093
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
8094
+ } else if (propName === "className") {
8095
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
8096
+ }
8097
+ }
8098
+ return { ...slotProps, ...overrideProps };
8099
+ }
8100
+ function getElementRef$2(element) {
8101
+ var _a, _b;
8102
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
8103
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8104
+ if (mayWarn) {
8105
+ return element.ref;
8106
+ }
8107
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
8108
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
8109
+ if (mayWarn) {
8110
+ return element.props.ref;
8111
+ }
8112
+ return element.props.ref || element.ref;
8113
+ }
8114
+ var NODES$2 = [
8115
+ "a",
8116
+ "button",
8117
+ "div",
8118
+ "form",
8119
+ "h2",
8120
+ "h3",
8121
+ "img",
8122
+ "input",
8123
+ "label",
8124
+ "li",
8125
+ "nav",
8126
+ "ol",
8127
+ "p",
8128
+ "select",
8129
+ "span",
8130
+ "svg",
8131
+ "ul"
8132
+ ];
8133
+ var Primitive$2 = NODES$2.reduce((primitive, node) => {
8134
+ const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
8135
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
8136
+ const { asChild, ...primitiveProps } = props;
8137
+ const Comp = asChild ? Slot2 : node;
8138
+ if (typeof window !== "undefined") {
8139
+ window[Symbol.for("radix-ui")] = true;
8140
+ }
8141
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
8142
+ });
8143
+ Node2.displayName = `Primitive.${node}`;
8144
+ return { ...primitive, [node]: Node2 };
8145
+ }, {});
7987
8146
  var NAME$4 = "Label";
7988
8147
  var Label$3 = React$1.forwardRef((props, forwardedRef) => {
7989
8148
  return /* @__PURE__ */ jsx(
7990
- Primitive.label,
8149
+ Primitive$2.label,
7991
8150
  {
7992
8151
  ...props,
7993
8152
  ref: forwardedRef,
@@ -9061,16 +9220,16 @@ function CopyButton({ editor, getCodeDOMNode }) {
9061
9220
  }
9062
9221
  const index$7 = "";
9063
9222
  const PRETTIER_PARSER_MODULES = {
9064
- css: [() => import("./postcss-c2592f3f.js")],
9065
- html: [() => import("./html-f95ee5dc.js")],
9223
+ css: [() => import("./postcss-f084f74d.js")],
9224
+ html: [() => import("./html-5586dbf6.js")],
9066
9225
  js: [
9067
- () => import("./babel-d155920e.js"),
9068
- () => import("./estree-b1fff53b.js")
9226
+ () => import("./babel-d3085146.js"),
9227
+ () => import("./estree-164983f6.js")
9069
9228
  ],
9070
- markdown: [() => import("./markdown-1d9e6c3f.js")],
9229
+ markdown: [() => import("./markdown-d513479b.js")],
9071
9230
  typescript: [
9072
- () => import("./typescript-48c10f50.js"),
9073
- () => import("./estree-b1fff53b.js")
9231
+ () => import("./typescript-b1005db4.js"),
9232
+ () => import("./estree-164983f6.js")
9074
9233
  ]
9075
9234
  };
9076
9235
  async function loadPrettierParserByLang(lang) {
@@ -9081,7 +9240,7 @@ async function loadPrettierParserByLang(lang) {
9081
9240
  return modules;
9082
9241
  }
9083
9242
  async function loadPrettierFormat() {
9084
- const { format } = await import("./standalone-bcc7f37a.js");
9243
+ const { format } = await import("./standalone-5a8c6b7e.js");
9085
9244
  return format;
9086
9245
  }
9087
9246
  const PRETTIER_OPTIONS_BY_LANG = {
@@ -9558,6 +9717,199 @@ function $createCommentedTextNode(text, commentId, commentText, commentAuthor, c
9558
9717
  function $isCommentedTextNode(node) {
9559
9718
  return node instanceof CommentedTextNode;
9560
9719
  }
9720
+ function createContextScope(scopeName, createContextScopeDeps = []) {
9721
+ let defaultContexts = [];
9722
+ function createContext3(rootComponentName, defaultContext) {
9723
+ const BaseContext = React$1.createContext(defaultContext);
9724
+ BaseContext.displayName = rootComponentName + "Context";
9725
+ const index2 = defaultContexts.length;
9726
+ defaultContexts = [...defaultContexts, defaultContext];
9727
+ const Provider2 = (props) => {
9728
+ var _a;
9729
+ const { scope, children, ...context } = props;
9730
+ const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9731
+ const value = React$1.useMemo(() => context, Object.values(context));
9732
+ return /* @__PURE__ */ jsx(Context2.Provider, { value, children });
9733
+ };
9734
+ Provider2.displayName = rootComponentName + "Provider";
9735
+ function useContext2(consumerName, scope) {
9736
+ var _a;
9737
+ const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
9738
+ const context = React$1.useContext(Context2);
9739
+ if (context)
9740
+ return context;
9741
+ if (defaultContext !== void 0)
9742
+ return defaultContext;
9743
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
9744
+ }
9745
+ return [Provider2, useContext2];
9746
+ }
9747
+ const createScope = () => {
9748
+ const scopeContexts = defaultContexts.map((defaultContext) => {
9749
+ return React$1.createContext(defaultContext);
9750
+ });
9751
+ return function useScope(scope) {
9752
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
9753
+ return React$1.useMemo(
9754
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
9755
+ [scope, contexts]
9756
+ );
9757
+ };
9758
+ };
9759
+ createScope.scopeName = scopeName;
9760
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
9761
+ }
9762
+ function composeContextScopes(...scopes) {
9763
+ const baseScope = scopes[0];
9764
+ if (scopes.length === 1)
9765
+ return baseScope;
9766
+ const createScope = () => {
9767
+ const scopeHooks = scopes.map((createScope2) => ({
9768
+ useScope: createScope2(),
9769
+ scopeName: createScope2.scopeName
9770
+ }));
9771
+ return function useComposedScopes(overrideScopes) {
9772
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
9773
+ const scopeProps = useScope(overrideScopes);
9774
+ const currentScope = scopeProps[`__scope${scopeName}`];
9775
+ return { ...nextScopes2, ...currentScope };
9776
+ }, {});
9777
+ return React$1.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
9778
+ };
9779
+ };
9780
+ createScope.scopeName = baseScope.scopeName;
9781
+ return createScope;
9782
+ }
9783
+ var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
9784
+ var use$1 = React$1[" use ".trim().toString()];
9785
+ function isPromiseLike$1(value) {
9786
+ return typeof value === "object" && value !== null && "then" in value;
9787
+ }
9788
+ function isLazyComponent$1(element) {
9789
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
9790
+ }
9791
+ // @__NO_SIDE_EFFECTS__
9792
+ function createSlot$1(ownerName) {
9793
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
9794
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
9795
+ let { children, ...slotProps } = props;
9796
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
9797
+ children = use$1(children._payload);
9798
+ }
9799
+ const childrenArray = React$1.Children.toArray(children);
9800
+ const slottable = childrenArray.find(isSlottable$1);
9801
+ if (slottable) {
9802
+ const newElement = slottable.props.children;
9803
+ const newChildren = childrenArray.map((child) => {
9804
+ if (child === slottable) {
9805
+ if (React$1.Children.count(newElement) > 1)
9806
+ return React$1.Children.only(null);
9807
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
9808
+ } else {
9809
+ return child;
9810
+ }
9811
+ });
9812
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
9813
+ }
9814
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
9815
+ });
9816
+ Slot2.displayName = `${ownerName}.Slot`;
9817
+ return Slot2;
9818
+ }
9819
+ // @__NO_SIDE_EFFECTS__
9820
+ function createSlotClone$1(ownerName) {
9821
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
9822
+ let { children, ...slotProps } = props;
9823
+ if (isLazyComponent$1(children) && typeof use$1 === "function") {
9824
+ children = use$1(children._payload);
9825
+ }
9826
+ if (React$1.isValidElement(children)) {
9827
+ const childrenRef = getElementRef$1(children);
9828
+ const props2 = mergeProps$1(slotProps, children.props);
9829
+ if (children.type !== React$1.Fragment) {
9830
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
9831
+ }
9832
+ return React$1.cloneElement(children, props2);
9833
+ }
9834
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
9835
+ });
9836
+ SlotClone.displayName = `${ownerName}.SlotClone`;
9837
+ return SlotClone;
9838
+ }
9839
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
9840
+ function isSlottable$1(child) {
9841
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
9842
+ }
9843
+ function mergeProps$1(slotProps, childProps) {
9844
+ const overrideProps = { ...childProps };
9845
+ for (const propName in childProps) {
9846
+ const slotPropValue = slotProps[propName];
9847
+ const childPropValue = childProps[propName];
9848
+ const isHandler = /^on[A-Z]/.test(propName);
9849
+ if (isHandler) {
9850
+ if (slotPropValue && childPropValue) {
9851
+ overrideProps[propName] = (...args) => {
9852
+ const result = childPropValue(...args);
9853
+ slotPropValue(...args);
9854
+ return result;
9855
+ };
9856
+ } else if (slotPropValue) {
9857
+ overrideProps[propName] = slotPropValue;
9858
+ }
9859
+ } else if (propName === "style") {
9860
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
9861
+ } else if (propName === "className") {
9862
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
9863
+ }
9864
+ }
9865
+ return { ...slotProps, ...overrideProps };
9866
+ }
9867
+ function getElementRef$1(element) {
9868
+ var _a, _b;
9869
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
9870
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9871
+ if (mayWarn) {
9872
+ return element.ref;
9873
+ }
9874
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
9875
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9876
+ if (mayWarn) {
9877
+ return element.props.ref;
9878
+ }
9879
+ return element.props.ref || element.ref;
9880
+ }
9881
+ var NODES$1 = [
9882
+ "a",
9883
+ "button",
9884
+ "div",
9885
+ "form",
9886
+ "h2",
9887
+ "h3",
9888
+ "img",
9889
+ "input",
9890
+ "label",
9891
+ "li",
9892
+ "nav",
9893
+ "ol",
9894
+ "p",
9895
+ "select",
9896
+ "span",
9897
+ "svg",
9898
+ "ul"
9899
+ ];
9900
+ var Primitive$1 = NODES$1.reduce((primitive, node) => {
9901
+ const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
9902
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
9903
+ const { asChild, ...primitiveProps } = props;
9904
+ const Comp = asChild ? Slot2 : node;
9905
+ if (typeof window !== "undefined") {
9906
+ window[Symbol.for("radix-ui")] = true;
9907
+ }
9908
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
9909
+ });
9910
+ Node2.displayName = `Primitive.${node}`;
9911
+ return { ...primitive, [node]: Node2 };
9912
+ }, {});
9561
9913
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9562
9914
  function getDefaultExportFromCjs(x2) {
9563
9915
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -9643,7 +9995,7 @@ var Avatar$1 = React$1.forwardRef(
9643
9995
  scope: __scopeAvatar,
9644
9996
  imageLoadingStatus,
9645
9997
  onImageLoadingStatusChange: setImageLoadingStatus,
9646
- children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
9998
+ children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
9647
9999
  }
9648
10000
  );
9649
10001
  }
@@ -9665,7 +10017,7 @@ var AvatarImage$1 = React$1.forwardRef(
9665
10017
  handleLoadingStatusChange(imageLoadingStatus);
9666
10018
  }
9667
10019
  }, [imageLoadingStatus, handleLoadingStatusChange]);
9668
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
10020
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
9669
10021
  }
9670
10022
  );
9671
10023
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -9681,7 +10033,7 @@ var AvatarFallback$1 = React$1.forwardRef(
9681
10033
  return () => window.clearTimeout(timerId);
9682
10034
  }
9683
10035
  }, [delayMs]);
9684
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
10036
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
9685
10037
  }
9686
10038
  );
9687
10039
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -9826,6 +10178,136 @@ const CardFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PU
9826
10178
  }
9827
10179
  ));
9828
10180
  CardFooter.displayName = "CardFooter";
10181
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
10182
+ var use = React$1[" use ".trim().toString()];
10183
+ function isPromiseLike(value) {
10184
+ return typeof value === "object" && value !== null && "then" in value;
10185
+ }
10186
+ function isLazyComponent(element) {
10187
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
10188
+ }
10189
+ // @__NO_SIDE_EFFECTS__
10190
+ function createSlot(ownerName) {
10191
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
10192
+ const Slot2 = React$1.forwardRef((props, forwardedRef) => {
10193
+ let { children, ...slotProps } = props;
10194
+ if (isLazyComponent(children) && typeof use === "function") {
10195
+ children = use(children._payload);
10196
+ }
10197
+ const childrenArray = React$1.Children.toArray(children);
10198
+ const slottable = childrenArray.find(isSlottable);
10199
+ if (slottable) {
10200
+ const newElement = slottable.props.children;
10201
+ const newChildren = childrenArray.map((child) => {
10202
+ if (child === slottable) {
10203
+ if (React$1.Children.count(newElement) > 1)
10204
+ return React$1.Children.only(null);
10205
+ return React$1.isValidElement(newElement) ? newElement.props.children : null;
10206
+ } else {
10207
+ return child;
10208
+ }
10209
+ });
10210
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
10211
+ }
10212
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
10213
+ });
10214
+ Slot2.displayName = `${ownerName}.Slot`;
10215
+ return Slot2;
10216
+ }
10217
+ // @__NO_SIDE_EFFECTS__
10218
+ function createSlotClone(ownerName) {
10219
+ const SlotClone = React$1.forwardRef((props, forwardedRef) => {
10220
+ let { children, ...slotProps } = props;
10221
+ if (isLazyComponent(children) && typeof use === "function") {
10222
+ children = use(children._payload);
10223
+ }
10224
+ if (React$1.isValidElement(children)) {
10225
+ const childrenRef = getElementRef(children);
10226
+ const props2 = mergeProps(slotProps, children.props);
10227
+ if (children.type !== React$1.Fragment) {
10228
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
10229
+ }
10230
+ return React$1.cloneElement(children, props2);
10231
+ }
10232
+ return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
10233
+ });
10234
+ SlotClone.displayName = `${ownerName}.SlotClone`;
10235
+ return SlotClone;
10236
+ }
10237
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
10238
+ function isSlottable(child) {
10239
+ return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
10240
+ }
10241
+ function mergeProps(slotProps, childProps) {
10242
+ const overrideProps = { ...childProps };
10243
+ for (const propName in childProps) {
10244
+ const slotPropValue = slotProps[propName];
10245
+ const childPropValue = childProps[propName];
10246
+ const isHandler = /^on[A-Z]/.test(propName);
10247
+ if (isHandler) {
10248
+ if (slotPropValue && childPropValue) {
10249
+ overrideProps[propName] = (...args) => {
10250
+ const result = childPropValue(...args);
10251
+ slotPropValue(...args);
10252
+ return result;
10253
+ };
10254
+ } else if (slotPropValue) {
10255
+ overrideProps[propName] = slotPropValue;
10256
+ }
10257
+ } else if (propName === "style") {
10258
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
10259
+ } else if (propName === "className") {
10260
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
10261
+ }
10262
+ }
10263
+ return { ...slotProps, ...overrideProps };
10264
+ }
10265
+ function getElementRef(element) {
10266
+ var _a, _b;
10267
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
10268
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10269
+ if (mayWarn) {
10270
+ return element.ref;
10271
+ }
10272
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
10273
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
10274
+ if (mayWarn) {
10275
+ return element.props.ref;
10276
+ }
10277
+ return element.props.ref || element.ref;
10278
+ }
10279
+ var NODES = [
10280
+ "a",
10281
+ "button",
10282
+ "div",
10283
+ "form",
10284
+ "h2",
10285
+ "h3",
10286
+ "img",
10287
+ "input",
10288
+ "label",
10289
+ "li",
10290
+ "nav",
10291
+ "ol",
10292
+ "p",
10293
+ "select",
10294
+ "span",
10295
+ "svg",
10296
+ "ul"
10297
+ ];
10298
+ var Primitive = NODES.reduce((primitive, node) => {
10299
+ const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
10300
+ const Node2 = React$1.forwardRef((props, forwardedRef) => {
10301
+ const { asChild, ...primitiveProps } = props;
10302
+ const Comp = asChild ? Slot2 : node;
10303
+ if (typeof window !== "undefined") {
10304
+ window[Symbol.for("radix-ui")] = true;
10305
+ }
10306
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
10307
+ });
10308
+ Node2.displayName = `Primitive.${node}`;
10309
+ return { ...primitive, [node]: Node2 };
10310
+ }, {});
9829
10311
  var NAME$3 = "Separator";
9830
10312
  var DEFAULT_ORIENTATION = "horizontal";
9831
10313
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -9952,7 +10434,7 @@ const SheetDescription = React$1.forwardRef(({ className, ...props }, ref) => /*
9952
10434
  SheetDescription.displayName = Description.displayName;
9953
10435
  function createCollection(name) {
9954
10436
  const PROVIDER_NAME2 = name + "CollectionProvider";
9955
- const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
10437
+ const [createCollectionContext, createCollectionScope2] = createContextScope$1(PROVIDER_NAME2);
9956
10438
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
9957
10439
  PROVIDER_NAME2,
9958
10440
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -9965,7 +10447,7 @@ function createCollection(name) {
9965
10447
  };
9966
10448
  CollectionProvider.displayName = PROVIDER_NAME2;
9967
10449
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
9968
- const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
10450
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot$3(COLLECTION_SLOT_NAME);
9969
10451
  const CollectionSlot = React__default.forwardRef(
9970
10452
  (props, forwardedRef) => {
9971
10453
  const { scope, children } = props;
@@ -9977,7 +10459,7 @@ function createCollection(name) {
9977
10459
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
9978
10460
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
9979
10461
  const ITEM_DATA_ATTR = "data-radix-collection-item";
9980
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
10462
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$3(ITEM_SLOT_NAME);
9981
10463
  const CollectionItemSlot = React__default.forwardRef(
9982
10464
  (props, forwardedRef) => {
9983
10465
  const { scope, children, ...itemData } = props;
@@ -10022,7 +10504,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
10022
10504
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
10023
10505
  var GROUP_NAME$3 = "RovingFocusGroup";
10024
10506
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(GROUP_NAME$3);
10025
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
10507
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
10026
10508
  GROUP_NAME$3,
10027
10509
  [createCollectionScope$2]
10028
10510
  );
@@ -10089,7 +10571,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((props, forwardedRef) => {
10089
10571
  []
10090
10572
  ),
10091
10573
  children: /* @__PURE__ */ jsx(
10092
- Primitive.div,
10574
+ Primitive$3.div,
10093
10575
  {
10094
10576
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
10095
10577
  "data-orientation": orientation,
@@ -10154,7 +10636,7 @@ var RovingFocusGroupItem = React$1.forwardRef(
10154
10636
  focusable,
10155
10637
  active,
10156
10638
  children: /* @__PURE__ */ jsx(
10157
- Primitive.span,
10639
+ Primitive$3.span,
10158
10640
  {
10159
10641
  tabIndex: isCurrentTabStop ? 0 : -1,
10160
10642
  "data-orientation": context.orientation,
@@ -10239,7 +10721,7 @@ function wrapArray$2(array, startIndex) {
10239
10721
  var Root$2 = RovingFocusGroup;
10240
10722
  var Item$1 = RovingFocusGroupItem;
10241
10723
  var TABS_NAME = "Tabs";
10242
- var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
10724
+ var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
10243
10725
  createRovingFocusGroupScope
10244
10726
  ]);
10245
10727
  var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
@@ -10274,7 +10756,7 @@ var Tabs$1 = React$1.forwardRef(
10274
10756
  dir: direction,
10275
10757
  activationMode,
10276
10758
  children: /* @__PURE__ */ jsx(
10277
- Primitive.div,
10759
+ Primitive$3.div,
10278
10760
  {
10279
10761
  dir: direction,
10280
10762
  "data-orientation": orientation,
@@ -10302,7 +10784,7 @@ var TabsList$1 = React$1.forwardRef(
10302
10784
  dir: context.dir,
10303
10785
  loop,
10304
10786
  children: /* @__PURE__ */ jsx(
10305
- Primitive.div,
10787
+ Primitive$3.div,
10306
10788
  {
10307
10789
  role: "tablist",
10308
10790
  "aria-orientation": context.orientation,
@@ -10332,7 +10814,7 @@ var TabsTrigger$1 = React$1.forwardRef(
10332
10814
  focusable: !disabled,
10333
10815
  active: isSelected,
10334
10816
  children: /* @__PURE__ */ jsx(
10335
- Primitive.button,
10817
+ Primitive$3.button,
10336
10818
  {
10337
10819
  type: "button",
10338
10820
  role: "tab",
@@ -10382,7 +10864,7 @@ var TabsContent$1 = React$1.forwardRef(
10382
10864
  return () => cancelAnimationFrame(rAF);
10383
10865
  }, []);
10384
10866
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
10385
- Primitive.div,
10867
+ Primitive$3.div,
10386
10868
  {
10387
10869
  "data-state": isSelected ? "active" : "inactive",
10388
10870
  "data-orientation": context.orientation,
@@ -12804,7 +13286,7 @@ var NAME$2 = "Arrow";
12804
13286
  var Arrow$1 = React$1.forwardRef((props, forwardedRef) => {
12805
13287
  const { children, width = 10, height = 5, ...arrowProps } = props;
12806
13288
  return /* @__PURE__ */ jsx(
12807
- Primitive.svg,
13289
+ Primitive$3.svg,
12808
13290
  {
12809
13291
  ...arrowProps,
12810
13292
  ref: forwardedRef,
@@ -12853,7 +13335,7 @@ function useSize(element) {
12853
13335
  return size2;
12854
13336
  }
12855
13337
  var POPPER_NAME = "Popper";
12856
- var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
13338
+ var [createPopperContext, createPopperScope] = createContextScope$1(POPPER_NAME);
12857
13339
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
12858
13340
  var Popper = (props) => {
12859
13341
  const { __scopePopper, children } = props;
@@ -12876,7 +13358,7 @@ var PopperAnchor = React$1.forwardRef(
12876
13358
  context.onAnchorChange(anchorRef.current);
12877
13359
  }
12878
13360
  });
12879
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
13361
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$3.div, { ...anchorProps, ref: composedRefs });
12880
13362
  }
12881
13363
  );
12882
13364
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -13005,7 +13487,7 @@ var PopperContent = React$1.forwardRef(
13005
13487
  arrowY,
13006
13488
  shouldHideArrow: cannotCenterArrow,
13007
13489
  children: /* @__PURE__ */ jsx(
13008
- Primitive.div,
13490
+ Primitive$3.div,
13009
13491
  {
13010
13492
  "data-side": placedSide,
13011
13493
  "data-align": placedAlign,
@@ -13141,7 +13623,7 @@ var NAME$1 = "VisuallyHidden";
13141
13623
  var VisuallyHidden = React$1.forwardRef(
13142
13624
  (props, forwardedRef) => {
13143
13625
  return /* @__PURE__ */ jsx(
13144
- Primitive.span,
13626
+ Primitive$3.span,
13145
13627
  {
13146
13628
  ...props,
13147
13629
  ref: forwardedRef,
@@ -13152,7 +13634,7 @@ var VisuallyHidden = React$1.forwardRef(
13152
13634
  );
13153
13635
  VisuallyHidden.displayName = NAME$1;
13154
13636
  var Root = VisuallyHidden;
13155
- var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
13637
+ var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
13156
13638
  createPopperScope
13157
13639
  ]);
13158
13640
  var usePopperScope$3 = createPopperScope();
@@ -13313,7 +13795,7 @@ var TooltipTrigger$1 = React$1.forwardRef(
13313
13795
  return () => document.removeEventListener("pointerup", handlePointerUp);
13314
13796
  }, [handlePointerUp]);
13315
13797
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
13316
- Primitive.button,
13798
+ Primitive$3.button,
13317
13799
  {
13318
13800
  "aria-describedby": context.open ? context.contentId : void 0,
13319
13801
  "data-state": context.stateAttribute,
@@ -13665,7 +14147,7 @@ const CommentToggle = ({
13665
14147
  return /* @__PURE__ */ jsx(
13666
14148
  "div",
13667
14149
  {
13668
- 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\r\n",
14150
+ 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\n",
13669
14151
  children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
13670
14152
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
13671
14153
  Button,
@@ -13936,7 +14418,7 @@ const HtmlViewDisplay = () => {
13936
14418
  onBlur: handleTextareaBlur,
13937
14419
  onClick: handleTextareaClick,
13938
14420
  onKeyDown: handleTextareaKeyDown,
13939
- 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",
14421
+ 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",
13940
14422
  placeholder: "HTML content will appear here... Edit and click 'Sync to Editor' to apply changes."
13941
14423
  }
13942
14424
  )
@@ -14888,7 +15370,7 @@ const EmbedComponent = ({ url, displayType, alignment, nodeKey }) => {
14888
15370
  }
14889
15371
  );
14890
15372
  };
14891
- const FileComponent = React$1.lazy(() => import("./index-b8db2529.js"));
15373
+ const FileComponent = React$1.lazy(() => import("./index-f8c2acae.js"));
14892
15374
  function convertFileElement(domNode) {
14893
15375
  if (domNode instanceof HTMLDivElement) {
14894
15376
  const dataUrl = domNode.getAttribute("data-lexical-file-src");
@@ -15371,7 +15853,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
15371
15853
  var SELECTION_KEYS$1 = [" ", "Enter"];
15372
15854
  var SELECT_NAME = "Select";
15373
15855
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(SELECT_NAME);
15374
- var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
15856
+ var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
15375
15857
  createCollectionScope$1,
15376
15858
  createPopperScope
15377
15859
  ]);
@@ -15508,7 +15990,7 @@ var SelectTrigger$1 = React$1.forwardRef(
15508
15990
  }
15509
15991
  };
15510
15992
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
15511
- Primitive.button,
15993
+ Primitive$3.button,
15512
15994
  {
15513
15995
  type: "button",
15514
15996
  role: "combobox",
@@ -15569,7 +16051,7 @@ var SelectValue$1 = React$1.forwardRef(
15569
16051
  onValueNodeHasChildrenChange(hasChildren);
15570
16052
  }, [onValueNodeHasChildrenChange, hasChildren]);
15571
16053
  return /* @__PURE__ */ jsx(
15572
- Primitive.span,
16054
+ Primitive$3.span,
15573
16055
  {
15574
16056
  ...valueProps,
15575
16057
  ref: composedRefs,
@@ -15584,7 +16066,7 @@ var ICON_NAME = "SelectIcon";
15584
16066
  var SelectIcon = React$1.forwardRef(
15585
16067
  (props, forwardedRef) => {
15586
16068
  const { __scopeSelect, children, ...iconProps } = props;
15587
- return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
16069
+ return /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
15588
16070
  }
15589
16071
  );
15590
16072
  SelectIcon.displayName = ICON_NAME;
@@ -15615,7 +16097,7 @@ SelectContent$1.displayName = CONTENT_NAME$3;
15615
16097
  var CONTENT_MARGIN = 10;
15616
16098
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$3);
15617
16099
  var CONTENT_IMPL_NAME = "SelectContentImpl";
15618
- var Slot$2 = /* @__PURE__ */ createSlot("SelectContent.RemoveScroll");
16100
+ var Slot$2 = /* @__PURE__ */ createSlot$3("SelectContent.RemoveScroll");
15619
16101
  var SelectContentImpl = React$1.forwardRef(
15620
16102
  (props, forwardedRef) => {
15621
16103
  const {
@@ -16004,7 +16486,7 @@ var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
16004
16486
  zIndex: contentZIndex
16005
16487
  },
16006
16488
  children: /* @__PURE__ */ jsx(
16007
- Primitive.div,
16489
+ Primitive$3.div,
16008
16490
  {
16009
16491
  ...popperProps,
16010
16492
  ref: composedRefs,
@@ -16078,7 +16560,7 @@ var SelectViewport = React$1.forwardRef(
16078
16560
  }
16079
16561
  ),
16080
16562
  /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
16081
- Primitive.div,
16563
+ Primitive$3.div,
16082
16564
  {
16083
16565
  "data-radix-select-viewport": "",
16084
16566
  role: "presentation",
@@ -16133,7 +16615,7 @@ var SelectGroup = React$1.forwardRef(
16133
16615
  (props, forwardedRef) => {
16134
16616
  const { __scopeSelect, ...groupProps } = props;
16135
16617
  const groupId = useId();
16136
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
16618
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
16137
16619
  }
16138
16620
  );
16139
16621
  SelectGroup.displayName = GROUP_NAME$2;
@@ -16142,7 +16624,7 @@ var SelectLabel$1 = React$1.forwardRef(
16142
16624
  (props, forwardedRef) => {
16143
16625
  const { __scopeSelect, ...labelProps } = props;
16144
16626
  const groupContext = useSelectGroupContext(LABEL_NAME$2, __scopeSelect);
16145
- return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
16627
+ return /* @__PURE__ */ jsx(Primitive$3.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
16146
16628
  }
16147
16629
  );
16148
16630
  SelectLabel$1.displayName = LABEL_NAME$2;
@@ -16201,7 +16683,7 @@ var SelectItem$1 = React$1.forwardRef(
16201
16683
  disabled,
16202
16684
  textValue,
16203
16685
  children: /* @__PURE__ */ jsx(
16204
- Primitive.div,
16686
+ Primitive$3.div,
16205
16687
  {
16206
16688
  role: "option",
16207
16689
  "aria-labelledby": textId,
@@ -16289,7 +16771,7 @@ var SelectItemText = React$1.forwardRef(
16289
16771
  return () => onNativeOptionRemove(nativeOption);
16290
16772
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
16291
16773
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16292
- /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
16774
+ /* @__PURE__ */ jsx(Primitive$3.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
16293
16775
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
16294
16776
  ] });
16295
16777
  }
@@ -16300,7 +16782,7 @@ var SelectItemIndicator = React$1.forwardRef(
16300
16782
  (props, forwardedRef) => {
16301
16783
  const { __scopeSelect, ...itemIndicatorProps } = props;
16302
16784
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
16303
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
16785
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$3.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
16304
16786
  }
16305
16787
  );
16306
16788
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -16391,7 +16873,7 @@ var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
16391
16873
  (_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
16392
16874
  }, [getItems]);
16393
16875
  return /* @__PURE__ */ jsx(
16394
- Primitive.div,
16876
+ Primitive$3.div,
16395
16877
  {
16396
16878
  "aria-hidden": true,
16397
16879
  ...scrollIndicatorProps,
@@ -16419,7 +16901,7 @@ var SEPARATOR_NAME$2 = "SelectSeparator";
16419
16901
  var SelectSeparator$1 = React$1.forwardRef(
16420
16902
  (props, forwardedRef) => {
16421
16903
  const { __scopeSelect, ...separatorProps } = props;
16422
- return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
16904
+ return /* @__PURE__ */ jsx(Primitive$3.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
16423
16905
  }
16424
16906
  );
16425
16907
  SelectSeparator$1.displayName = SEPARATOR_NAME$2;
@@ -16457,7 +16939,7 @@ var SelectBubbleInput = React$1.forwardRef(
16457
16939
  }
16458
16940
  }, [prevValue, value]);
16459
16941
  return /* @__PURE__ */ jsx(
16460
- Primitive.select,
16942
+ Primitive$3.select,
16461
16943
  {
16462
16944
  ...props,
16463
16945
  style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
@@ -20004,10 +20486,10 @@ const PDF_CONFIG = {
20004
20486
  };
20005
20487
  const loadHtml2Pdf = async () => {
20006
20488
  try {
20007
- const mod = await import("./html2pdf.bundle.min-49ff1939.js").then((n) => n.h);
20489
+ const mod = await import("./html2pdf.bundle.min-53a200a1.js").then((n) => n.h);
20008
20490
  return (mod == null ? void 0 : mod.default) || mod;
20009
20491
  } catch {
20010
- const mod2 = await import("./html2pdf.bundle-026397bd.js").then((n) => n.h);
20492
+ const mod2 = await import("./html2pdf.bundle-915945f4.js").then((n) => n.h);
20011
20493
  return (mod2 == null ? void 0 : mod2.default) || mod2;
20012
20494
  }
20013
20495
  };
@@ -20759,7 +21241,7 @@ var SUB_CLOSE_KEYS = {
20759
21241
  };
20760
21242
  var MENU_NAME = "Menu";
20761
21243
  var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
20762
- var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
21244
+ var [createMenuContext, createMenuScope] = createContextScope$1(MENU_NAME, [
20763
21245
  createCollectionScope,
20764
21246
  createPopperScope,
20765
21247
  createRovingFocusGroupScope
@@ -20884,7 +21366,7 @@ var MenuRootContentNonModal = React$1.forwardRef((props, forwardedRef) => {
20884
21366
  }
20885
21367
  );
20886
21368
  });
20887
- var Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock");
21369
+ var Slot$1 = /* @__PURE__ */ createSlot$3("MenuContent.ScrollLock");
20888
21370
  var MenuContentImpl = React$1.forwardRef(
20889
21371
  (props, forwardedRef) => {
20890
21372
  const {
@@ -21086,7 +21568,7 @@ var GROUP_NAME$1 = "MenuGroup";
21086
21568
  var MenuGroup = React$1.forwardRef(
21087
21569
  (props, forwardedRef) => {
21088
21570
  const { __scopeMenu, ...groupProps } = props;
21089
- return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
21571
+ return /* @__PURE__ */ jsx(Primitive$3.div, { role: "group", ...groupProps, ref: forwardedRef });
21090
21572
  }
21091
21573
  );
21092
21574
  MenuGroup.displayName = GROUP_NAME$1;
@@ -21094,7 +21576,7 @@ var LABEL_NAME$1 = "MenuLabel";
21094
21576
  var MenuLabel = React$1.forwardRef(
21095
21577
  (props, forwardedRef) => {
21096
21578
  const { __scopeMenu, ...labelProps } = props;
21097
- return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
21579
+ return /* @__PURE__ */ jsx(Primitive$3.div, { ...labelProps, ref: forwardedRef });
21098
21580
  }
21099
21581
  );
21100
21582
  MenuLabel.displayName = LABEL_NAME$1;
@@ -21174,7 +21656,7 @@ var MenuItemImpl = React$1.forwardRef(
21174
21656
  disabled,
21175
21657
  textValue: textValue ?? textContent,
21176
21658
  children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
21177
- Primitive.div,
21659
+ Primitive$3.div,
21178
21660
  {
21179
21661
  role: "menuitem",
21180
21662
  "data-highlighted": isFocused ? "" : void 0,
@@ -21285,7 +21767,7 @@ var MenuItemIndicator = React$1.forwardRef(
21285
21767
  {
21286
21768
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
21287
21769
  children: /* @__PURE__ */ jsx(
21288
- Primitive.span,
21770
+ Primitive$3.span,
21289
21771
  {
21290
21772
  ...itemIndicatorProps,
21291
21773
  ref: forwardedRef,
@@ -21302,7 +21784,7 @@ var MenuSeparator = React$1.forwardRef(
21302
21784
  (props, forwardedRef) => {
21303
21785
  const { __scopeMenu, ...separatorProps } = props;
21304
21786
  return /* @__PURE__ */ jsx(
21305
- Primitive.div,
21787
+ Primitive$3.div,
21306
21788
  {
21307
21789
  role: "separator",
21308
21790
  "aria-orientation": "horizontal",
@@ -21562,7 +22044,7 @@ var Arrow2 = MenuArrow;
21562
22044
  var SubTrigger = MenuSubTrigger;
21563
22045
  var SubContent = MenuSubContent;
21564
22046
  var DROPDOWN_MENU_NAME = "DropdownMenu";
21565
- var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
22047
+ var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
21566
22048
  DROPDOWN_MENU_NAME,
21567
22049
  [createMenuScope]
21568
22050
  );
@@ -21609,7 +22091,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
21609
22091
  const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
21610
22092
  const menuScope = useMenuScope(__scopeDropdownMenu);
21611
22093
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
21612
- Primitive.button,
22094
+ Primitive$3.button,
21613
22095
  {
21614
22096
  type: "button",
21615
22097
  id: context.triggerId,
@@ -21946,13 +22428,13 @@ const AlignMenu = () => {
21946
22428
  {
21947
22429
  variant: "ghost",
21948
22430
  size: "sm",
21949
- className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\r\n",
22431
+ className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\n",
21950
22432
  children: [
21951
22433
  /* @__PURE__ */ jsx(AlignLeft, { className: "!cteditor-size-4" }),
21952
22434
  /* @__PURE__ */ jsx(
21953
22435
  ChevronDown,
21954
22436
  {
21955
- className: "!cteditor-size-4 cteditor-opacity-50\r\n"
22437
+ className: "!cteditor-size-4 cteditor-opacity-50\n"
21956
22438
  }
21957
22439
  )
21958
22440
  ]
@@ -22447,7 +22929,7 @@ var V = "undefined" != typeof window ? useLayoutEffect$1 : useEffect$1, $ = func
22447
22929
  return React__default.createElement(U, u({}, r2, { colorModel: W }));
22448
22930
  };
22449
22931
  var POPOVER_NAME = "Popover";
22450
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
22932
+ var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
22451
22933
  createPopperScope
22452
22934
  ]);
22453
22935
  var usePopperScope = createPopperScope();
@@ -22511,7 +22993,7 @@ var PopoverTrigger$1 = React$1.forwardRef(
22511
22993
  const popperScope = usePopperScope(__scopePopover);
22512
22994
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
22513
22995
  const trigger = /* @__PURE__ */ jsx(
22514
- Primitive.button,
22996
+ Primitive$3.button,
22515
22997
  {
22516
22998
  type: "button",
22517
22999
  "aria-haspopup": "dialog",
@@ -22547,7 +23029,7 @@ var PopoverContent$1 = React$1.forwardRef(
22547
23029
  }
22548
23030
  );
22549
23031
  PopoverContent$1.displayName = CONTENT_NAME;
22550
- var Slot = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
23032
+ var Slot = /* @__PURE__ */ createSlot$3("PopoverContent.RemoveScroll");
22551
23033
  var PopoverContentModal = React$1.forwardRef(
22552
23034
  (props, forwardedRef) => {
22553
23035
  const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
@@ -22704,7 +23186,7 @@ var PopoverClose = React$1.forwardRef(
22704
23186
  const { __scopePopover, ...closeProps } = props;
22705
23187
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
22706
23188
  return /* @__PURE__ */ jsx(
22707
- Primitive.button,
23189
+ Primitive$3.button,
22708
23190
  {
22709
23191
  type: "button",
22710
23192
  ...closeProps,
@@ -22940,7 +23422,7 @@ const ColorPicker$2 = ({
22940
23422
  "button",
22941
23423
  {
22942
23424
  onClick: () => setShowAdvanced(!showAdvanced),
22943
- 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",
23425
+ className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\n",
22944
23426
  children: [
22945
23427
  /* @__PURE__ */ jsx("span", { className: "cteditor-text-xs", children: showAdvanced ? "▼" : "▶" }),
22946
23428
  showAdvanced ? "Hide Advanced" : "Show Advanced"
@@ -28709,49 +29191,15 @@ const fileToDataURL = (file) => {
28709
29191
  function DragDropPaste() {
28710
29192
  const [editor] = useLexicalComposerContext();
28711
29193
  const [isDragging, setIsDragging] = useState$1(false);
29194
+ const processedFilesRef = useRef(/* @__PURE__ */ new Set());
28712
29195
  const { apiKey } = useEditor();
28713
29196
  const { uploadFileToS3 } = useS3Uploader(apiKey || void 0);
28714
29197
  useEffect$1(() => {
28715
- const handlePaste = async (e) => {
28716
- const clipboardData = e.clipboardData;
28717
- if (!clipboardData)
28718
- return;
28719
- const files = clipboardData.files;
28720
- if (files && files.length > 0) {
28721
- const imageFiles = Array.from(files).filter(
28722
- (file) => ACCEPTABLE_IMAGE_TYPES.some((type) => file.type.startsWith(type.replace("/", "")) || file.type === type)
28723
- );
28724
- if (imageFiles.length > 0) {
28725
- e.preventDefault();
28726
- for (const file of imageFiles) {
28727
- let fileUrl;
28728
- try {
28729
- if (apiKey) {
28730
- fileUrl = await uploadFileToS3(file);
28731
- } else {
28732
- fileUrl = await fileToDataURL(file);
28733
- }
28734
- } catch (error) {
28735
- console.error("Upload failed for pasted image:", error);
28736
- fileUrl = await fileToDataURL(file);
28737
- }
28738
- editor.dispatchCommand(INSERT_IMAGE_COMMAND, {
28739
- altText: file.name || "Pasted image",
28740
- src: fileUrl
28741
- });
28742
- }
28743
- return;
28744
- }
28745
- }
28746
- };
28747
- const editorElement = editor.getRootElement();
28748
- if (editorElement) {
28749
- editorElement.addEventListener("paste", handlePaste);
28750
- return () => {
28751
- editorElement.removeEventListener("paste", handlePaste);
28752
- };
28753
- }
28754
- }, [editor, apiKey, uploadFileToS3]);
29198
+ const cleanup = setInterval(() => {
29199
+ processedFilesRef.current.clear();
29200
+ }, 1e3);
29201
+ return () => clearInterval(cleanup);
29202
+ }, []);
28755
29203
  useEffect$1(() => {
28756
29204
  const handleDragEnter = (e) => {
28757
29205
  var _a, _b;
@@ -28859,14 +29307,18 @@ function DragDropPaste() {
28859
29307
  ...ACCEPTABLE_APPLICATION_TYPES
28860
29308
  ]);
28861
29309
  for (const { file, result } of filesResult) {
29310
+ const fileKey = `${file.name}-${file.size}-${file.type}-${file.lastModified}`;
29311
+ if (processedFilesRef.current.has(fileKey)) {
29312
+ console.log("Skipping duplicate file:", file.name);
29313
+ continue;
29314
+ }
29315
+ processedFilesRef.current.add(fileKey);
28862
29316
  let fileUrl;
28863
29317
  try {
28864
29318
  if (apiKey) {
28865
29319
  fileUrl = await uploadFileToS3(file);
28866
- console.log("File uploaded to S3:", fileUrl);
28867
29320
  } else {
28868
29321
  fileUrl = await fileToDataURL(file);
28869
- console.log("Using local data URL (no S3 upload)");
28870
29322
  }
28871
29323
  } catch (error) {
28872
29324
  console.error("Upload failed, using local data URL:", error);
@@ -28874,7 +29326,7 @@ function DragDropPaste() {
28874
29326
  }
28875
29327
  if (isMimeType(file, ACCEPTABLE_IMAGE_TYPES)) {
28876
29328
  editor.dispatchCommand(INSERT_IMAGE_COMMAND, {
28877
- altText: file.name,
29329
+ altText: file.name || "Pasted image",
28878
29330
  src: fileUrl
28879
29331
  });
28880
29332
  } else if (isMimeType(file, ACCEPTABLE_APPLICATION_TYPES)) {
@@ -34121,7 +34573,7 @@ function TableActionMenu({
34121
34573
  /* @__PURE__ */ jsxs(
34122
34574
  "div",
34123
34575
  {
34124
- 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 ",
34576
+ 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 ",
34125
34577
  ref: dropDownRef,
34126
34578
  onClick: (e) => {
34127
34579
  e.stopPropagation();
@@ -36573,38 +37025,10 @@ const WordCountPlugin = () => {
36573
37025
  }
36574
37026
  );
36575
37027
  };
36576
- function getEditorColors(rootElement) {
36577
- try {
36578
- const computedStyle = window.getComputedStyle(rootElement);
36579
- let bgColor = computedStyle.backgroundColor;
36580
- let textColor = computedStyle.color;
36581
- if (bgColor === "transparent" || bgColor === "rgba(0, 0, 0, 0)") {
36582
- let parent = rootElement.parentElement;
36583
- while (parent) {
36584
- const parentBg = window.getComputedStyle(parent).backgroundColor;
36585
- if (parentBg && parentBg !== "transparent" && parentBg !== "rgba(0, 0, 0, 0)") {
36586
- bgColor = parentBg;
36587
- break;
36588
- }
36589
- parent = parent.parentElement;
36590
- }
36591
- if (bgColor === "transparent" || bgColor === "rgba(0, 0, 0, 0)") {
36592
- bgColor = "rgb(255, 255, 255)";
36593
- }
36594
- }
36595
- if (!textColor || textColor === "rgba(0, 0, 0, 0)") {
36596
- textColor = "rgb(0, 0, 0)";
36597
- }
36598
- return { bgColor, textColor };
36599
- } catch {
36600
- return { bgColor: "rgb(255, 255, 255)", textColor: "rgb(0, 0, 0)" };
36601
- }
36602
- }
36603
37028
  function exportEditorWithInlineStyle(editor) {
36604
37029
  const rootElement = editor.getRootElement();
36605
37030
  if (!rootElement)
36606
37031
  return "";
36607
- const { bgColor, textColor } = getEditorColors(rootElement);
36608
37032
  const tableStyleMap = /* @__PURE__ */ new Map();
36609
37033
  const codeBlockStyles = {
36610
37034
  backgroundColor: "",
@@ -36672,9 +37096,9 @@ function exportEditorWithInlineStyle(editor) {
36672
37096
  const headerBgColors = [];
36673
37097
  headerCells.forEach((th) => {
36674
37098
  const computed = window.getComputedStyle(th);
36675
- const bgColor2 = computed.backgroundColor;
36676
- if (bgColor2 && bgColor2 !== "rgba(0, 0, 0, 0)") {
36677
- headerBgColors.push(bgColor2);
37099
+ const bgColor = computed.backgroundColor;
37100
+ if (bgColor && bgColor !== "rgba(0, 0, 0, 0)") {
37101
+ headerBgColors.push(bgColor);
36678
37102
  } else {
36679
37103
  headerBgColors.push("");
36680
37104
  }
@@ -36709,7 +37133,7 @@ function exportEditorWithInlineStyle(editor) {
36709
37133
  editor.getEditorState().read(() => {
36710
37134
  htmlString = $generateHtmlFromNodes(editor, null);
36711
37135
  });
36712
- return processHtmlForExport(htmlString, tableStyleMap, bgColor, textColor, codeBlockStyles);
37136
+ return processHtmlForExport(htmlString, tableStyleMap, codeBlockStyles);
36713
37137
  }
36714
37138
  function normalizeColorForComparison(color) {
36715
37139
  if (!color)
@@ -36759,7 +37183,7 @@ function detectTableColorsFromVariables(table) {
36759
37183
  }
36760
37184
  return null;
36761
37185
  }
36762
- function processHtmlForExport(html, tableStyleMap, bgColor, textColor, codeBlockStyles) {
37186
+ function processHtmlForExport(html, tableStyleMap, codeBlockStyles) {
36763
37187
  const parser = new DOMParser();
36764
37188
  const doc = parser.parseFromString(html, "text/html");
36765
37189
  const tables = doc.querySelectorAll("table");
@@ -36769,14 +37193,14 @@ function processHtmlForExport(html, tableStyleMap, bgColor, textColor, codeBlock
36769
37193
  return;
36770
37194
  const headerCells = table.querySelectorAll("th");
36771
37195
  headerCells.forEach((th, cellIndex) => {
36772
- const bgColor2 = styleInfo.headerBgColors[cellIndex];
36773
- if (bgColor2) {
37196
+ const bgColor = styleInfo.headerBgColors[cellIndex];
37197
+ if (bgColor) {
36774
37198
  const el = th;
36775
- el.style.setProperty("background-color", bgColor2, "important");
36776
- const textColor2 = getContrastColor(bgColor2);
36777
- el.style.color = textColor2;
37199
+ el.style.setProperty("background-color", bgColor, "important");
37200
+ const textColor = getContrastColor(bgColor);
37201
+ el.style.color = textColor;
36778
37202
  el.querySelectorAll("*").forEach((nested) => {
36779
- nested.style.color = textColor2;
37203
+ nested.style.color = textColor;
36780
37204
  });
36781
37205
  }
36782
37206
  });
@@ -36791,18 +37215,18 @@ function processHtmlForExport(html, tableStyleMap, bgColor, textColor, codeBlock
36791
37215
  const el = cell;
36792
37216
  const explicitColor = styleInfo.explicitCellColors.get(`${rowIndex}-${cellIndex}`);
36793
37217
  if (explicitColor) {
36794
- const textColor2 = getContrastColor(explicitColor);
37218
+ const textColor = getContrastColor(explicitColor);
36795
37219
  el.style.setProperty("background-color", explicitColor, "important");
36796
- el.style.color = textColor2;
37220
+ el.style.color = textColor;
36797
37221
  el.querySelectorAll("*").forEach((nested) => {
36798
- nested.style.color = textColor2;
37222
+ nested.style.color = textColor;
36799
37223
  });
36800
37224
  } else if (stripingColor) {
36801
- const textColor2 = getContrastColor(stripingColor);
37225
+ const textColor = getContrastColor(stripingColor);
36802
37226
  el.style.setProperty("background-color", stripingColor, "important");
36803
- el.style.color = textColor2;
37227
+ el.style.color = textColor;
36804
37228
  el.querySelectorAll("*").forEach((nested) => {
36805
- nested.style.color = textColor2;
37229
+ nested.style.color = textColor;
36806
37230
  });
36807
37231
  }
36808
37232
  });
@@ -36814,8 +37238,6 @@ function processHtmlForExport(html, tableStyleMap, bgColor, textColor, codeBlock
36814
37238
  applyGenericSafeStyles(doc.body, codeBlockStyles);
36815
37239
  cleanupClasses(doc.body);
36816
37240
  const wrapper = doc.createElement("div");
36817
- wrapper.style.backgroundColor = bgColor;
36818
- wrapper.style.color = textColor;
36819
37241
  wrapper.style.padding = "1em";
36820
37242
  wrapper.style.minHeight = "100%";
36821
37243
  while (doc.body.firstChild) {
@@ -37901,138 +38323,141 @@ const ConfigurableEditor = ({
37901
38323
  const editorInitialConfig = {
37902
38324
  ...initialConfig
37903
38325
  };
37904
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(CommentProvider, { currentUser, children: /* @__PURE__ */ jsxs(LexicalComposer, { initialConfig: editorInitialConfig, children: [
37905
- /* @__PURE__ */ jsx(HtmlViewProvider, { children: /* @__PURE__ */ jsxs(ToolbarContext, { children: [
37906
- /* @__PURE__ */ jsxs(Stack, { children: [
37907
- config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-2 cteditor-sticky cteditor-top-2 cteditor-z-50", children: [
38326
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
38327
+ /* @__PURE__ */ jsx("h3", { style: { color: "red" }, children: "Dev playground Craxinno technologies 1®" }),
38328
+ /* @__PURE__ */ jsx(CommentProvider, { currentUser, children: /* @__PURE__ */ jsxs(LexicalComposer, { initialConfig: editorInitialConfig, children: [
38329
+ /* @__PURE__ */ jsx(HtmlViewProvider, { children: /* @__PURE__ */ jsxs(ToolbarContext, { children: [
38330
+ /* @__PURE__ */ jsxs(Stack, { children: [
38331
+ config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-2 cteditor-sticky cteditor-top-2 cteditor-z-50", children: [
38332
+ /* @__PURE__ */ jsx(
38333
+ ToolbarWithEditor,
38334
+ {
38335
+ editable: true,
38336
+ ...config.toolbarOptions,
38337
+ fonts: defaultFontFamilies
38338
+ }
38339
+ ),
38340
+ /* @__PURE__ */ jsx(
38341
+ CommentToggle,
38342
+ {
38343
+ isOpen: isCommentSidebarOpen,
38344
+ onClick: () => setIsCommentSidebarOpen(!isCommentSidebarOpen),
38345
+ commentCount
38346
+ }
38347
+ )
38348
+ ] }),
38349
+ " ",
38350
+ /* @__PURE__ */ jsx(NewMentionsPlugin, { userList: mentionUserList }),
38351
+ /* @__PURE__ */ jsx(NotePanelPlugin, {}),
38352
+ /* @__PURE__ */ jsx(CommentPlugin, {}),
38353
+ /* @__PURE__ */ jsx(CommentBubblePlugin, {}),
38354
+ /* @__PURE__ */ jsx(CellBackgroundPersistencePlugin, {}),
38355
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
38356
+ /* @__PURE__ */ jsx(
38357
+ RichTextPlugin,
38358
+ {
38359
+ contentEditable: /* @__PURE__ */ jsx("div", { className: "editor-scroller ", children: /* @__PURE__ */ jsx("div", { ref: onRef, children: /* @__PURE__ */ jsx(
38360
+ ContentEditable,
38361
+ {
38362
+ ref: contentRef,
38363
+ className: classes.contentEditable,
38364
+ style: {
38365
+ tabSize: 1,
38366
+ ...autoHeightStyle
38367
+ }
38368
+ }
38369
+ ) }) }),
38370
+ placeholder: /* @__PURE__ */ jsx(Placeholder, { className: classes.placeholder, children: "Start writing and for quick commands use /" }),
38371
+ ErrorBoundary: LexicalErrorBoundary
38372
+ }
38373
+ ),
38374
+ /* @__PURE__ */ jsx(WordCountPlugin, {}),
38375
+ /* @__PURE__ */ jsx(UsageTrackingPlugin, { licenseKey: apiKey })
38376
+ ] }),
38377
+ /* @__PURE__ */ jsx(HtmlViewDisplay, {}),
38378
+ /* @__PURE__ */ jsx(AIRephrasePlugin, {}),
38379
+ /* @__PURE__ */ jsx(AIChatPlugin, { apiKey }),
38380
+ /* @__PURE__ */ jsx(TextEnhancePlugin, { apiKey }),
38381
+ /* @__PURE__ */ jsx(HtmlSyncPlugin, {}),
38382
+ /* @__PURE__ */ jsx(AndroidKeyboardFixPlugin, {}),
38383
+ /* @__PURE__ */ jsx(CodeHighlightPlugin, {}),
38384
+ /* @__PURE__ */ jsx(CodeBlockNormalizerPlugin, {}),
38385
+ /* @__PURE__ */ jsx(CodeBlockSelectAllPlugin, {}),
38386
+ /* @__PURE__ */ jsx(SlashCommandPlugin, {}),
38387
+ /* @__PURE__ */ jsx(CombinedPluginWrapper, {}),
38388
+ /* @__PURE__ */ jsx(OnChangeWrapper, { onChange }),
38389
+ /* @__PURE__ */ jsx(InitialContentPlugin, { initialContent }),
38390
+ /* @__PURE__ */ jsx(HistoryPlugin, {}),
38391
+ /* @__PURE__ */ jsx(LocalStoragePlugin$1, { namespace: initialConfig.namespace }),
38392
+ /* @__PURE__ */ jsx(ListPlugin, {}),
38393
+ /* @__PURE__ */ jsx(LinkPlugin, { hasLinkAttributes: false }),
38394
+ /* @__PURE__ */ jsx(LinkPreviewPlugin, {}),
38395
+ /* @__PURE__ */ jsx(DragDropPaste, {}),
38396
+ /* @__PURE__ */ jsx(RichTextPastePlugin, {}),
38397
+ /* @__PURE__ */ jsx(FilePlugin, {}),
38398
+ /* @__PURE__ */ jsx(HorizontalRulePlugin, {}),
38399
+ /* @__PURE__ */ jsx(CustomHorizontalRulePlugin, {}),
38400
+ /* @__PURE__ */ jsx(CheckListPlugin, {}),
38401
+ /* @__PURE__ */ jsx(ImagePlugin, {}),
38402
+ /* @__PURE__ */ jsx(SignatureCanvasPlugin, {}),
37908
38403
  /* @__PURE__ */ jsx(
37909
- ToolbarWithEditor,
38404
+ TablePlugin,
37910
38405
  {
37911
- editable: true,
37912
- ...config.toolbarOptions,
37913
- fonts: defaultFontFamilies
38406
+ hasCellMerge: true,
38407
+ hasCellBackgroundColor: true,
38408
+ hasHorizontalScroll: true
37914
38409
  }
37915
38410
  ),
38411
+ /* @__PURE__ */ jsx(TableImageAutoResizePlugin, {}),
38412
+ /* @__PURE__ */ jsx(TableCellResizerPlugin, {}),
38413
+ /* @__PURE__ */ jsx(EmbedPreviewPlugin, {}),
38414
+ config.htmlViewOption && !config.toolbarOptions.enableHtmlViewToggle && /* @__PURE__ */ jsx(HtmlViewTogglePlugin, {})
38415
+ ] }),
38416
+ floatingAnchorElem && /* @__PURE__ */ jsxs(Fragment, { children: [
37916
38417
  /* @__PURE__ */ jsx(
37917
- CommentToggle,
38418
+ TableActionMenuPlugin,
37918
38419
  {
37919
- isOpen: isCommentSidebarOpen,
37920
- onClick: () => setIsCommentSidebarOpen(!isCommentSidebarOpen),
37921
- commentCount
38420
+ anchorElem: floatingAnchorElem,
38421
+ cellMerge: true,
38422
+ isSmallWidthViewport
37922
38423
  }
37923
- )
37924
- ] }),
37925
- " ",
37926
- /* @__PURE__ */ jsx(NewMentionsPlugin, { userList: mentionUserList }),
37927
- /* @__PURE__ */ jsx(NotePanelPlugin, {}),
37928
- /* @__PURE__ */ jsx(CommentPlugin, {}),
37929
- /* @__PURE__ */ jsx(CommentBubblePlugin, {}),
37930
- /* @__PURE__ */ jsx(CellBackgroundPersistencePlugin, {}),
37931
- /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
38424
+ ),
38425
+ /* @__PURE__ */ jsx(TableHoverActionsPlugin, { anchorElem: floatingAnchorElem }),
38426
+ /* @__PURE__ */ jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem }),
37932
38427
  /* @__PURE__ */ jsx(
37933
- RichTextPlugin,
38428
+ FloatingLinkEditorPlugin,
37934
38429
  {
37935
- contentEditable: /* @__PURE__ */ jsx("div", { className: "editor-scroller ", children: /* @__PURE__ */ jsx("div", { ref: onRef, children: /* @__PURE__ */ jsx(
37936
- ContentEditable,
37937
- {
37938
- ref: contentRef,
37939
- className: classes.contentEditable,
37940
- style: {
37941
- tabSize: 1,
37942
- ...autoHeightStyle
37943
- }
37944
- }
37945
- ) }) }),
37946
- placeholder: /* @__PURE__ */ jsx(Placeholder, { className: classes.placeholder, children: "Start writing and for quick commands use /" }),
37947
- ErrorBoundary: LexicalErrorBoundary
38430
+ anchorElem: floatingAnchorElem,
38431
+ isLinkEditMode,
38432
+ setIsLinkEditMode
37948
38433
  }
37949
38434
  ),
37950
- /* @__PURE__ */ jsx(WordCountPlugin, {}),
37951
- /* @__PURE__ */ jsx(UsageTrackingPlugin, { licenseKey: apiKey })
37952
- ] }),
37953
- /* @__PURE__ */ jsx(HtmlViewDisplay, {}),
37954
- /* @__PURE__ */ jsx(AIRephrasePlugin, {}),
37955
- /* @__PURE__ */ jsx(AIChatPlugin, { apiKey }),
37956
- /* @__PURE__ */ jsx(TextEnhancePlugin, { apiKey }),
37957
- /* @__PURE__ */ jsx(HtmlSyncPlugin, {}),
37958
- /* @__PURE__ */ jsx(AndroidKeyboardFixPlugin, {}),
37959
- /* @__PURE__ */ jsx(CodeHighlightPlugin, {}),
37960
- /* @__PURE__ */ jsx(CodeBlockNormalizerPlugin, {}),
37961
- /* @__PURE__ */ jsx(CodeBlockSelectAllPlugin, {}),
37962
- /* @__PURE__ */ jsx(SlashCommandPlugin, {}),
37963
- /* @__PURE__ */ jsx(CombinedPluginWrapper, {}),
37964
- /* @__PURE__ */ jsx(OnChangeWrapper, { onChange }),
37965
- /* @__PURE__ */ jsx(InitialContentPlugin, { initialContent }),
37966
- /* @__PURE__ */ jsx(HistoryPlugin, {}),
37967
- /* @__PURE__ */ jsx(LocalStoragePlugin$1, { namespace: initialConfig.namespace }),
37968
- /* @__PURE__ */ jsx(ListPlugin, {}),
37969
- /* @__PURE__ */ jsx(LinkPlugin, { hasLinkAttributes: false }),
37970
- /* @__PURE__ */ jsx(LinkPreviewPlugin, {}),
37971
- /* @__PURE__ */ jsx(DragDropPaste, {}),
37972
- /* @__PURE__ */ jsx(RichTextPastePlugin, {}),
37973
- /* @__PURE__ */ jsx(FilePlugin, {}),
37974
- /* @__PURE__ */ jsx(HorizontalRulePlugin, {}),
37975
- /* @__PURE__ */ jsx(CustomHorizontalRulePlugin, {}),
37976
- /* @__PURE__ */ jsx(CheckListPlugin, {}),
37977
- /* @__PURE__ */ jsx(ImagePlugin, {}),
37978
- /* @__PURE__ */ jsx(SignatureCanvasPlugin, {}),
37979
- /* @__PURE__ */ jsx(
37980
- TablePlugin,
37981
- {
37982
- hasCellMerge: true,
37983
- hasCellBackgroundColor: true,
37984
- hasHorizontalScroll: true
37985
- }
37986
- ),
37987
- /* @__PURE__ */ jsx(TableImageAutoResizePlugin, {}),
37988
- /* @__PURE__ */ jsx(TableCellResizerPlugin, {}),
37989
- /* @__PURE__ */ jsx(EmbedPreviewPlugin, {}),
37990
- config.htmlViewOption && !config.toolbarOptions.enableHtmlViewToggle && /* @__PURE__ */ jsx(HtmlViewTogglePlugin, {})
37991
- ] }),
37992
- floatingAnchorElem && /* @__PURE__ */ jsxs(Fragment, { children: [
37993
- /* @__PURE__ */ jsx(
37994
- TableActionMenuPlugin,
37995
- {
37996
- anchorElem: floatingAnchorElem,
37997
- cellMerge: true,
37998
- isSmallWidthViewport
37999
- }
38000
- ),
38001
- /* @__PURE__ */ jsx(TableHoverActionsPlugin, { anchorElem: floatingAnchorElem }),
38002
- /* @__PURE__ */ jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem }),
38003
- /* @__PURE__ */ jsx(
38004
- FloatingLinkEditorPlugin,
38005
- {
38006
- anchorElem: floatingAnchorElem,
38007
- isLinkEditMode,
38008
- setIsLinkEditMode
38009
- }
38010
- ),
38011
- config.enableFloatingMenu && /* @__PURE__ */ jsx(
38012
- FloatingTextFormatToolbarPlugin,
38013
- {
38014
- anchorElem: floatingAnchorElem,
38015
- setIsLinkEditMode,
38016
- features: config.floatingMenuOptions
38017
- }
38018
- ),
38019
- /* @__PURE__ */ jsx(
38020
- FloatingEnhanceButtonPlugin,
38021
- {
38022
- anchorElem: floatingAnchorElem
38023
- }
38024
- )
38025
- ] })
38026
- ] }) }),
38027
- /* @__PURE__ */ jsx(
38028
- CommentSidebar,
38029
- {
38030
- isOpen: isCommentSidebarOpen,
38031
- onClose: () => setIsCommentSidebarOpen(false),
38032
- onCommentCountChange: setCommentCount
38033
- }
38034
- )
38035
- ] }) }) });
38435
+ config.enableFloatingMenu && /* @__PURE__ */ jsx(
38436
+ FloatingTextFormatToolbarPlugin,
38437
+ {
38438
+ anchorElem: floatingAnchorElem,
38439
+ setIsLinkEditMode,
38440
+ features: config.floatingMenuOptions
38441
+ }
38442
+ ),
38443
+ /* @__PURE__ */ jsx(
38444
+ FloatingEnhanceButtonPlugin,
38445
+ {
38446
+ anchorElem: floatingAnchorElem
38447
+ }
38448
+ )
38449
+ ] })
38450
+ ] }) }),
38451
+ /* @__PURE__ */ jsx(
38452
+ CommentSidebar,
38453
+ {
38454
+ isOpen: isCommentSidebarOpen,
38455
+ onClose: () => setIsCommentSidebarOpen(false),
38456
+ onCommentCountChange: setCommentCount
38457
+ }
38458
+ )
38459
+ ] }) })
38460
+ ] });
38036
38461
  };
38037
38462
  const ScopedEditorWrapper = ({
38038
38463
  children,
@@ -38135,10 +38560,7 @@ const ConfigurableEditorWithAuth = ({
38135
38560
  return /* @__PURE__ */ jsx(ScopedEditorWrapper, { children: /* @__PURE__ */ jsx(LoadingMessage, { children: /* @__PURE__ */ jsx("span", { children: "Loading editor..." }) }) });
38136
38561
  }
38137
38562
  if (error) {
38138
- return /* @__PURE__ */ jsx(ScopedEditorWrapper, { children: /* @__PURE__ */ jsx(ErrorMessage, { children: /* @__PURE__ */ jsxs("span", { children: [
38139
- "Error: ",
38140
- error
38141
- ] }) }) });
38563
+ return /* @__PURE__ */ jsx(ScopedEditorWrapper, { children: /* @__PURE__ */ jsx(ErrorMessage, { children: /* @__PURE__ */ jsx("span", { children: error }) }) });
38142
38564
  }
38143
38565
  if (!isAuthenticated || !editorConfig2) {
38144
38566
  return /* @__PURE__ */ jsx(ScopedEditorWrapper, { children: /* @__PURE__ */ jsx(AuthMessage, { children: /* @__PURE__ */ jsx("span", { children: "Please provide a valid API key to access the editor" }) }) });
@@ -38178,8 +38600,8 @@ export {
38178
38600
  DialogTitle as f,
38179
38601
  getDefaultExportFromCjs as g,
38180
38602
  DialogDescription as h,
38181
- initialConfig as i,
38182
- DialogFooter as j,
38603
+ DialogFooter as i,
38604
+ initialConfig as j,
38183
38605
  $isImageNode as k,
38184
38606
  EditorProvider as l,
38185
38607
  useEditor as m,
@@ -38189,4 +38611,4 @@ export {
38189
38611
  useHtmlView as u,
38190
38612
  verifyApiKey as v
38191
38613
  };
38192
- //# sourceMappingURL=index-b9ad2974.js.map
38614
+ //# sourceMappingURL=index-d46a32ad.js.map