reactjs-tiptap-editor 1.0.24 → 1.0.26

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 (289) hide show
  1. package/lib/{ActionMenuButton-HYlhmRvw.js → ActionMenuButton-B4KDkZ0z.js} +1 -1
  2. package/lib/{ActionMenuButton-B8NhVw5m.cjs → ActionMenuButton-C3Cfeza9.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +25 -25
  5. package/lib/Blockquote.cjs +5 -5
  6. package/lib/Blockquote.js +1490 -53
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +3 -3
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +222 -8
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -2
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +56 -39
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +8 -4
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +2 -2
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +3 -3
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +2 -2
  25. package/lib/{Drawer-Was4hxYH.cjs → Drawer-D7E9kTca.cjs} +1 -1
  26. package/lib/{Drawer-CaXVhxo4.js → Drawer-DA0FLHs9.js} +20 -20
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +4 -4
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +1644 -148
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +10 -10
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +2 -2
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +2 -2
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +5 -5
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +5 -5
  41. package/lib/FormatPainter.cjs +1 -0
  42. package/lib/FormatPainter.js +133 -0
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +15 -11
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +38 -32
  47. package/lib/History.cjs +7 -1
  48. package/lib/History.js +519 -478
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +2 -2
  51. package/lib/{Iframe-Bp986fj0.js → Iframe-DZ3r3QzK.js} +7 -7
  52. package/lib/{Iframe-BI0sq6pd.cjs → Iframe-OMVd0xa_.cjs} +1 -1
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +3 -3
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +6 -6
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +35 -35
  59. package/lib/ImportWord.cjs +1 -1
  60. package/lib/ImportWord.js +15 -15
  61. package/lib/{Indent-FvM52kjA.cjs → Indent-QgCoonRk.cjs} +1 -1
  62. package/lib/{Indent-E6B8DkyN.js → Indent-kI4G-clX.js} +2 -2
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +2 -2
  67. package/lib/{Katex-pzwyyiFJ.js → Katex-BPbXjcZQ.js} +6 -7
  68. package/lib/Katex-CUofhjB5.cjs +4 -0
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +3 -3
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +4 -4
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-OjN4F2rM.js → LinkEditBlock-BYWwH2_x.js} +59 -32
  76. package/lib/{LinkEditBlock-Cmkmp2fW.cjs → LinkEditBlock-Z7RRurvx.cjs} +2 -2
  77. package/lib/MarkdownPaste.cjs +1 -1
  78. package/lib/MarkdownPaste.js +1 -1
  79. package/lib/Mention.cjs +1 -1
  80. package/lib/Mention.js +9 -5
  81. package/lib/Mermaid.cjs +2 -2
  82. package/lib/Mermaid.js +61 -62
  83. package/lib/MoreMark.cjs +1 -1
  84. package/lib/MoreMark.js +5 -5
  85. package/lib/OrderedList.cjs +1 -1
  86. package/lib/OrderedList.js +2 -2
  87. package/lib/SearchAndReplace.cjs +1 -1
  88. package/lib/SearchAndReplace.js +14 -14
  89. package/lib/SlashCommand.cjs +1 -1
  90. package/lib/SlashCommand.js +7 -7
  91. package/lib/{SlashCommandNodeView-o323V8li.js → SlashCommandNodeView-C0l3Fb_3.js} +10 -10
  92. package/lib/{SlashCommandNodeView-DarAytvt.cjs → SlashCommandNodeView-DPPmYEjC.cjs} +1 -1
  93. package/lib/Strike.cjs +1 -1
  94. package/lib/Strike.js +2 -2
  95. package/lib/{Table-Clnz-i4l.cjs → Table-D5G3rfwb.cjs} +5 -5
  96. package/lib/{Table-CC9uNHPL.js → Table-DwseaFSD.js} +115 -97
  97. package/lib/Table.cjs +1 -1
  98. package/lib/Table.js +1 -1
  99. package/lib/TaskList.cjs +1 -1
  100. package/lib/TaskList.js +2 -2
  101. package/lib/TextAlign.cjs +1 -1
  102. package/lib/TextAlign.js +11 -11
  103. package/lib/TextDirection.cjs +1 -1
  104. package/lib/TextDirection.js +3 -3
  105. package/lib/TextUnderline.cjs +1 -1
  106. package/lib/TextUnderline.js +2 -2
  107. package/lib/{Twitter-BVnXL8we.js → Twitter-DP26Lkn8.js} +195 -195
  108. package/lib/Twitter-q4ZGZL0i.cjs +1 -0
  109. package/lib/Twitter.cjs +1 -1
  110. package/lib/Twitter.js +3 -3
  111. package/lib/Video.cjs +1 -1
  112. package/lib/Video.js +5 -5
  113. package/lib/bubble.cjs +6 -6
  114. package/lib/bubble.js +2783 -2137
  115. package/lib/{clsx-D6gYQn3o.cjs → clsx-DRbkQ4T7.cjs} +1 -1
  116. package/lib/{clsx-0OU6n9va.js → clsx-_bq4MQQ7.js} +14 -4
  117. package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -1
  118. package/lib/components/Bubble/RichTextBubbleCodeBlock.d.ts +1 -1
  119. package/lib/components/Bubble/RichTextBubbleColumns.d.ts +1 -1
  120. package/lib/components/Bubble/RichTextBubbleDrawer.d.ts +1 -1
  121. package/lib/components/Bubble/RichTextBubbleExcalidraw.d.ts +1 -1
  122. package/lib/components/Bubble/RichTextBubbleIframe.d.ts +1 -1
  123. package/lib/components/Bubble/RichTextBubbleKatex.d.ts +2 -1
  124. package/lib/components/Bubble/RichTextBubbleLink.d.ts +1 -1
  125. package/lib/components/Bubble/RichTextBubbleMedia.d.ts +3 -3
  126. package/lib/components/Bubble/RichTextBubbleMenuDragHandle.d.ts +2 -1
  127. package/lib/components/Bubble/RichTextBubbleMermaid.d.ts +1 -1
  128. package/lib/components/Bubble/RichTextBubbleTable.d.ts +1 -1
  129. package/lib/components/Bubble/RichTextBubbleText.d.ts +1 -1
  130. package/lib/components/Bubble/RichTextBubbleTwitter.d.ts +1 -1
  131. package/lib/components/ColorPicker.d.ts +1 -1
  132. package/lib/components/ReactBus.d.ts +1 -1
  133. package/lib/components/RichTextProvider.d.ts +1 -1
  134. package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -1
  135. package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -1
  136. package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +2 -1
  137. package/lib/components/icons/Activity.d.ts +2 -1
  138. package/lib/components/icons/Animas.d.ts +2 -1
  139. package/lib/components/icons/AspectRatio.d.ts +1 -1
  140. package/lib/components/icons/Blockquote.d.ts +1 -1
  141. package/lib/components/icons/CodeView.d.ts +1 -1
  142. package/lib/components/icons/ColumnAddLeft.d.ts +1 -1
  143. package/lib/components/icons/ColumnAddRight.d.ts +1 -1
  144. package/lib/components/icons/DeleteColumn.d.ts +1 -1
  145. package/lib/components/icons/DeleteRow.d.ts +1 -1
  146. package/lib/components/icons/Direction.d.ts +1 -1
  147. package/lib/components/icons/Excalidraw.d.ts +1 -1
  148. package/lib/components/icons/ExportPdf.d.ts +1 -1
  149. package/lib/components/icons/ExportWord.d.ts +2 -1
  150. package/lib/components/icons/FileWordOutline.d.ts +1 -1
  151. package/lib/components/icons/Flag.d.ts +2 -1
  152. package/lib/components/icons/Food.d.ts +2 -1
  153. package/lib/components/icons/GIfIcon.d.ts +1 -1
  154. package/lib/components/icons/Html.d.ts +1 -1
  155. package/lib/components/icons/Icon.d.ts +1 -1
  156. package/lib/components/icons/IconColorFill.d.ts +1 -1
  157. package/lib/components/icons/IconHighlightFill.d.ts +1 -1
  158. package/lib/components/icons/ImportWord.d.ts +2 -1
  159. package/lib/components/icons/LeftToRight.d.ts +1 -1
  160. package/lib/components/icons/LineHeight.d.ts +1 -1
  161. package/lib/components/icons/MenuDown.d.ts +1 -1
  162. package/lib/components/icons/Mermaid.d.ts +1 -1
  163. package/lib/components/icons/NoFill.d.ts +1 -1
  164. package/lib/components/icons/Object.d.ts +2 -1
  165. package/lib/components/icons/RightToLeft.d.ts +1 -1
  166. package/lib/components/icons/SizeL.d.ts +1 -1
  167. package/lib/components/icons/SizeM.d.ts +1 -1
  168. package/lib/components/icons/SizeS.d.ts +1 -1
  169. package/lib/components/icons/Symbol.d.ts +2 -1
  170. package/lib/components/icons/Travel.d.ts +2 -1
  171. package/lib/components/icons/Twitter.d.ts +1 -1
  172. package/lib/components/ui/dialog.d.ts +2 -2
  173. package/lib/components/ui/dropdown-menu.d.ts +1 -1
  174. package/lib/components/ui/emoji-picker.d.ts +4 -4
  175. package/lib/components/ui/toaster.d.ts +1 -1
  176. package/lib/{dropdown-menu-BW2M6saA.js → dropdown-menu-BKSX4gvT.js} +1 -1
  177. package/lib/{dropdown-menu-BIGvxqiu.cjs → dropdown-menu-CURWpB9o.cjs} +1 -1
  178. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIcon.d.ts +1 -1
  179. package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -1
  180. package/lib/extensions/Attachment/components/RichTextAttachment.d.ts +1 -1
  181. package/lib/extensions/Blockquote/components/RichTextBlockquote.d.ts +1 -1
  182. package/lib/extensions/Bold/components/RichTextBold.d.ts +1 -1
  183. package/lib/extensions/BulletList/components/RichTextBulletList.d.ts +1 -1
  184. package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -1
  185. package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -1
  186. package/lib/extensions/Clear/components/RichTextClear.d.ts +1 -1
  187. package/lib/extensions/Code/components/RichTextCode.d.ts +1 -1
  188. package/lib/extensions/CodeBlock/components/RichTextCodeBlock.d.ts +2 -1
  189. package/lib/extensions/CodeView/components/RichTextCodeView.d.ts +1 -1
  190. package/lib/extensions/Color/components/RichTextColor.d.ts +1 -1
  191. package/lib/extensions/Column/components/RichTextColumn.d.ts +1 -1
  192. package/lib/extensions/Drawer/components/ControlDrawer/ControlDrawer.d.ts +2 -1
  193. package/lib/extensions/Drawer/components/ControlDrawer/icon.d.ts +27 -27
  194. package/lib/extensions/Drawer/components/EditDrawerBlock.d.ts +1 -1
  195. package/lib/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.d.ts +2 -1
  196. package/lib/extensions/Drawer/components/RichTextDrawer.d.ts +1 -1
  197. package/lib/extensions/Emoji/components/RichTextEmoji.d.ts +2 -1
  198. package/lib/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.d.ts +2 -1
  199. package/lib/extensions/Excalidraw/components/RichTextExcalidraw.d.ts +1 -1
  200. package/lib/extensions/ExportPdf/components/RichTextExportPdf.d.ts +1 -1
  201. package/lib/extensions/ExportWord/components/RichTextExportWord.d.ts +1 -1
  202. package/lib/extensions/FontFamily/components/RichTextFontFamily.d.ts +1 -1
  203. package/lib/extensions/FontSize/components/RichTextFontSize.d.ts +1 -1
  204. package/lib/extensions/FormatPainter/FormatPainter.d.ts +17 -0
  205. package/lib/extensions/FormatPainter/components/RichTextFormatPainter.d.ts +1 -0
  206. package/lib/extensions/FormatPainter/index.d.ts +1 -0
  207. package/lib/extensions/Heading/components/RichTextHeading.d.ts +1 -1
  208. package/lib/extensions/Highlight/components/RichTextHighlight.d.ts +2 -1
  209. package/lib/extensions/History/components/RichTextHistory.d.ts +3 -2
  210. package/lib/extensions/HorizontalRule/components/RichTextHorizontalRule.d.ts +1 -1
  211. package/lib/extensions/Iframe/components/IframeNodeView.d.ts +1 -1
  212. package/lib/extensions/Iframe/components/RichTextIframe.d.ts +1 -1
  213. package/lib/extensions/Image/components/ImageCropper.d.ts +2 -1
  214. package/lib/extensions/Image/components/ImageView.d.ts +2 -1
  215. package/lib/extensions/Image/components/RichTextImage.d.ts +1 -1
  216. package/lib/extensions/ImageGif/components/ImageGifView.d.ts +2 -1
  217. package/lib/extensions/ImageGif/components/RichTextImageGif.d.ts +2 -1
  218. package/lib/extensions/ImportWord/components/RichTextImportWord.d.ts +1 -1
  219. package/lib/extensions/Indent/components/RichTextIndent.d.ts +1 -1
  220. package/lib/extensions/Italic/components/RichTextItalic.d.ts +1 -1
  221. package/lib/extensions/Katex/components/KatexWrapper.d.ts +1 -1
  222. package/lib/extensions/Katex/components/RichTextKatex.d.ts +1 -1
  223. package/lib/extensions/LineHeight/components/RichTextLightHeight.d.ts +1 -1
  224. package/lib/extensions/Link/components/LinkEditBlock.d.ts +1 -1
  225. package/lib/extensions/Link/components/LinkViewBlock.d.ts +2 -1
  226. package/lib/extensions/Link/components/RichTextLink.d.ts +1 -1
  227. package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +2 -1
  228. package/lib/extensions/Mermaid/components/RichTextMermaid.d.ts +1 -1
  229. package/lib/extensions/MoreMark/components/RichTextMoreMark.d.ts +1 -1
  230. package/lib/extensions/OrderedList/components/RichTextOrderedList.d.ts +1 -1
  231. package/lib/extensions/SearchAndReplace/components/RichTextSearchAndReplace.d.ts +1 -1
  232. package/lib/extensions/SlashCommand/components/SlashCommandList.d.ts +1 -1
  233. package/lib/extensions/Strike/components/RichTextStrike.d.ts +1 -1
  234. package/lib/extensions/Table/components/CreateTablePopover.d.ts +2 -1
  235. package/lib/extensions/Table/components/RichTextTable.d.ts +2 -1
  236. package/lib/extensions/TaskList/components/RichTextTaskList.d.ts +1 -1
  237. package/lib/extensions/TextAlign/components/RichTextAlign.d.ts +1 -1
  238. package/lib/extensions/TextDirection/components/RichTextTextDirection.d.ts +1 -1
  239. package/lib/extensions/TextUnderline/components/RichTextUnderline.d.ts +1 -1
  240. package/lib/extensions/Twitter/components/FormEditLinkTwitter.d.ts +1 -1
  241. package/lib/extensions/Twitter/components/NodeViewTweet.d.ts +1 -1
  242. package/lib/extensions/Twitter/components/RichTextTwitter.d.ts +1 -1
  243. package/lib/extensions/Video/components/RichTextVideo.d.ts +1 -1
  244. package/lib/index-BGfIcDCQ.cjs +26 -0
  245. package/lib/index-BaR0Brts.js +1115 -0
  246. package/lib/index-BgNKVyMW.cjs +2 -0
  247. package/lib/index-BpLw6ebr.cjs +1 -0
  248. package/lib/{index-BrsJsbds.js → index-C52cuQ_Y.js} +1503 -1352
  249. package/lib/index-CDw4Eszh.cjs +12 -0
  250. package/lib/{index-CUvjYuRp.cjs → index-CHVV5iY-.cjs} +1 -1
  251. package/lib/{index-zw-Kd38i.js → index-CJMI7Fjf.js} +1 -1
  252. package/lib/{index-D-Ouz0vF.js → index-DQy9iBzV.js} +1 -1
  253. package/lib/index-Dbm_Mans.js +1756 -0
  254. package/lib/{index-oj858lQO.js → index-DtyAGMbq.js} +208 -208
  255. package/lib/{index-BblvcbTH.js → index-Dx-Dh7KS.js} +1464 -1348
  256. package/lib/{index-BAb_UADw.cjs → index-SEMQrdk2.cjs} +1 -1
  257. package/lib/index-aujjnfSJ.cjs +1 -0
  258. package/lib/index.cjs +1 -1
  259. package/lib/index.js +12 -12
  260. package/lib/{jsx-runtime-CT7Pcg-t.js → jsx-runtime-DE8oVoME.js} +3 -1
  261. package/lib/locale-bundle.cjs +1 -1
  262. package/lib/locale-bundle.js +1 -1
  263. package/lib/locales/index.d.ts +1 -1
  264. package/lib/{popover-BIVHT1W9.js → popover-BB-ZDnqk.js} +1 -1
  265. package/lib/{popover-DoSfJsFS.cjs → popover-CrywEkBR.cjs} +1 -1
  266. package/lib/{renderNodeView-D--fDFov.cjs → renderNodeView-5h3-p80E.cjs} +1 -1
  267. package/lib/{renderNodeView-CfWJK4rG.js → renderNodeView-DoKZ4GYy.js} +2 -2
  268. package/lib/{separator-SRbPfmGa.cjs → separator-BGO9AZp4.cjs} +1 -1
  269. package/lib/{separator-b-qOPJmp.js → separator-DuuOJRQd.js} +21 -21
  270. package/lib/store/EditorEditableReactive.d.ts +1 -1
  271. package/lib/store/ThemeColorReactive.d.ts +1 -1
  272. package/lib/style.css +1 -1
  273. package/lib/types.d.ts +2 -2
  274. package/lib/{updatePosition-DGPtRfWN.cjs → updatePosition-B1oRJE1x.cjs} +1 -1
  275. package/lib/{updatePosition-BwzAsiY0.js → updatePosition-CFTYKYNJ.js} +2 -2
  276. package/package.json +79 -66
  277. package/lib/Callout-B-S2f0Qo.cjs +0 -1
  278. package/lib/Callout-CF7Y9yJ7.js +0 -340
  279. package/lib/Katex-DP6EjdKz.cjs +0 -4
  280. package/lib/Twitter-0kmrijjL.cjs +0 -1
  281. package/lib/index-BF3EVCB1.cjs +0 -2
  282. package/lib/index-Bcj8cyOO.cjs +0 -24
  283. package/lib/index-CGjT-a9h.js +0 -1377
  284. package/lib/index-CPTpXLfX.cjs +0 -11
  285. package/lib/index-CWw4s87s.cjs +0 -1
  286. package/lib/index-Cal5SPfB.js +0 -779
  287. package/lib/index-deubsx3z.cjs +0 -1
  288. package/lib/textarea-CpxXPky_.js +0 -20
  289. package/lib/textarea-DbGw9oCU.cjs +0 -1
@@ -1,56 +1,57 @@
1
- import { jsxs as C, jsx as n, Fragment as Y } from "react/jsx-runtime";
2
- import * as U from "react";
3
- import Q, { useState as L, useMemo as B, useCallback as ce, useEffect as ze, useRef as xe } from "react";
4
- import { y as jt, b as _t, S as Ut } from "./index-BG0kQamI.js";
5
- import "./theme.js";
6
- import * as F from "@radix-ui/react-dialog";
7
- import { NotebookPen as Bt, ExternalLink as $t, X as lt, Loader2 as Ft, WrapText as Wt, PencilRuler as Gt, FlipHorizontal as Xt, FlipVertical as Yt, CropIcon as qt, ChevronUp as Zt, Paperclip as Kt, Eye as Jt, Settings as Qt, ZoomOut as er, ZoomIn as tr, BookMarked as rr, Sigma as ir, SmilePlusIcon as nr, Replace as qe, SmilePlus as or, Frame as ar, Columns2 as Ze, PanelRight as sr, PanelLeft as lr, Clipboard as cr, Copy as dr, GripVertical as ur, Plus as hr, Columns4 as fr, Columns3 as mr, Heading6 as gr, Heading5 as pr, Heading4 as xr, Heading3 as br, Heading2 as vr, Heading1 as wr, Pilcrow as yr, ChevronsUpDown as Cr, Trash as kr, Trash2 as Mr, TableCellsSplit as zr, TableCellsMerge as Tr, BetweenVerticalEnd as Ir, BetweenVerticalStart as Sr, BetweenHorizonalStart as Nr, BetweenHorizonalEnd as Ar, Unlink as Lr, Pencil as Er, Sparkles as Rr, Table as Vr, Minimize as Dr, Maximize as Hr, Video as Or, ImageUp as Pr, Link as jr, ListTodo as _r, ListOrdered as Ur, List as Br, IndentDecrease as $r, IndentIncrease as Fr, Type as Wr, CodeXml as Gr, Code as Xr, Superscript as Yr, Subscript as qr, ChevronDown as Zr, Undo2 as Kr, Redo2 as Jr, PaintRoller as Qr, Eraser as ei, Minus as ti, Strikethrough as ri, Quote as ii, Underline as ni, Italic as oi, LoaderCircle as ai, Bold as si, Check as li } from "lucide-react";
8
- import { c as ct, N as ci, u as di, b as ui, a as hi } from "./clsx-0OU6n9va.js";
9
- import { N as dt, n as fi, a9 as mi, m as ut } from "./index-BblvcbTH.js";
10
- import { I as Ke, j as Je, k as gi, u as ne, V as pi } from "./index-oj858lQO.js";
1
+ import { jsxs as C, jsx as n, Fragment as K } from "react/jsx-runtime";
2
+ import * as O from "react";
3
+ import q, { useState as R, useMemo as F, useCallback as ue, useEffect as Se, useRef as ve } from "react";
11
4
  import { Slot as ht } from "@radix-ui/react-slot";
12
- import * as be from "@radix-ui/react-tooltip";
13
- import * as ft from "@radix-ui/react-toggle";
14
- import { TextAlignRightIcon as xi, TextAlignLeftIcon as bi, TextAlignJustifyIcon as vi, TextAlignCenterIcon as wi } from "@radix-ui/react-icons";
15
- import * as re from "@radix-ui/react-tabs";
16
- import yi from "react-image-crop";
17
- import * as Oe from "@radix-ui/react-checkbox";
18
- import * as mt from "@radix-ui/react-label";
19
- const _e = "-", Ci = (e) => {
20
- const t = Mi(e), {
5
+ import { y as Xt, b as Yt, S as qt } from "./index-BG0kQamI.js";
6
+ import "./theme.js";
7
+ import { c as ft, N as Zt, u as Kt, b as Jt, a as Qt } from "./clsx-_bq4MQQ7.js";
8
+ import * as ne from "@radix-ui/react-tabs";
9
+ import * as B from "@radix-ui/react-select";
10
+ import { NotebookPen as er, ExternalLink as tr, X as mt, Loader2 as rr, WrapText as ir, PencilRuler as nr, FlipHorizontal as or, FlipVertical as ar, CropIcon as sr, ChevronUp as gt, Paperclip as lr, Eye as cr, Settings as dr, ZoomOut as ur, ZoomIn as hr, BookMarked as fr, Sigma as mr, SmilePlusIcon as gr, Replace as Qe, SmilePlus as pr, Frame as xr, Columns2 as et, PanelRight as br, PanelLeft as vr, Clipboard as wr, Copy as yr, GripVertical as Cr, Plus as kr, Columns4 as Mr, Columns3 as Nr, Heading6 as Sr, Heading5 as zr, Heading4 as Tr, Heading3 as Ir, Heading2 as Lr, Heading1 as Ar, Pilcrow as Er, ChevronsUpDown as Rr, Trash as Vr, Trash2 as Dr, TableCellsSplit as Hr, TableCellsMerge as Or, BetweenVerticalEnd as jr, BetweenVerticalStart as Pr, BetweenHorizonalStart as _r, BetweenHorizonalEnd as Ur, Unlink as Br, Pencil as $r, Sparkles as Fr, Table as Wr, Minimize as Gr, Maximize as Xr, Video as Yr, ImageUp as qr, Link as Zr, ListTodo as Kr, ListOrdered as Jr, List as Qr, IndentDecrease as ei, IndentIncrease as ti, Type as ri, CodeXml as ii, Code as ni, Superscript as oi, Subscript as ai, ChevronDown as $e, Undo2 as si, Redo2 as li, PaintRoller as ci, Eraser as di, Minus as ui, Strikethrough as hi, Quote as fi, Underline as mi, Italic as gi, LoaderCircle as pi, Bold as xi, Check as pt } from "lucide-react";
11
+ import * as X from "@radix-ui/react-dialog";
12
+ import { N as xt, n as bi, m as Pe, aa as vi } from "./index-Dx-Dh7KS.js";
13
+ import { I as tt, j as rt, k as wi, u as ae, V as yi } from "./index-DtyAGMbq.js";
14
+ import * as bt from "@radix-ui/react-toggle";
15
+ import * as we from "@radix-ui/react-tooltip";
16
+ import { TextAlignRightIcon as Ci, TextAlignLeftIcon as ki, TextAlignJustifyIcon as Mi, TextAlignCenterIcon as Ni } from "@radix-ui/react-icons";
17
+ import * as vt from "@radix-ui/react-label";
18
+ import * as _e from "@radix-ui/react-checkbox";
19
+ import Si from "react-image-crop";
20
+ const Fe = "-", zi = (e) => {
21
+ const t = Ii(e), {
21
22
  conflictingClassGroups: r,
22
23
  conflictingClassGroupModifiers: i
23
24
  } = e;
24
25
  return {
25
26
  getClassGroupId: (l) => {
26
- const s = l.split(_e);
27
- return s[0] === "" && s.length !== 1 && s.shift(), gt(s, t) || ki(l);
27
+ const s = l.split(Fe);
28
+ return s[0] === "" && s.length !== 1 && s.shift(), wt(s, t) || Ti(l);
28
29
  },
29
30
  getConflictingClassGroupIds: (l, s) => {
30
31
  const c = r[l] || [];
31
32
  return s && i[l] ? [...c, ...i[l]] : c;
32
33
  }
33
34
  };
34
- }, gt = (e, t) => {
35
+ }, wt = (e, t) => {
35
36
  var l;
36
37
  if (e.length === 0)
37
38
  return t.classGroupId;
38
- const r = e[0], i = t.nextPart.get(r), o = i ? gt(e.slice(1), i) : void 0;
39
+ const r = e[0], i = t.nextPart.get(r), o = i ? wt(e.slice(1), i) : void 0;
39
40
  if (o)
40
41
  return o;
41
42
  if (t.validators.length === 0)
42
43
  return;
43
- const a = e.join(_e);
44
+ const a = e.join(Fe);
44
45
  return (l = t.validators.find(({
45
46
  validator: s
46
47
  }) => s(a))) == null ? void 0 : l.classGroupId;
47
- }, Qe = /^\[(.+)\]$/, ki = (e) => {
48
- if (Qe.test(e)) {
49
- const t = Qe.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
48
+ }, it = /^\[(.+)\]$/, Ti = (e) => {
49
+ if (it.test(e)) {
50
+ const t = it.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
50
51
  if (r)
51
52
  return "arbitrary.." + r;
52
53
  }
53
- }, Mi = (e) => {
54
+ }, Ii = (e) => {
54
55
  const {
55
56
  theme: t,
56
57
  prefix: r
@@ -58,19 +59,19 @@ const _e = "-", Ci = (e) => {
58
59
  nextPart: /* @__PURE__ */ new Map(),
59
60
  validators: []
60
61
  };
61
- return Ti(Object.entries(e.classGroups), r).forEach(([a, l]) => {
62
- Pe(l, i, a, t);
62
+ return Ai(Object.entries(e.classGroups), r).forEach(([a, l]) => {
63
+ Ue(l, i, a, t);
63
64
  }), i;
64
- }, Pe = (e, t, r, i) => {
65
+ }, Ue = (e, t, r, i) => {
65
66
  e.forEach((o) => {
66
67
  if (typeof o == "string") {
67
- const a = o === "" ? t : et(t, o);
68
+ const a = o === "" ? t : nt(t, o);
68
69
  a.classGroupId = r;
69
70
  return;
70
71
  }
71
72
  if (typeof o == "function") {
72
- if (zi(o)) {
73
- Pe(o(i), t, r, i);
73
+ if (Li(o)) {
74
+ Ue(o(i), t, r, i);
74
75
  return;
75
76
  }
76
77
  t.validators.push({
@@ -80,21 +81,21 @@ const _e = "-", Ci = (e) => {
80
81
  return;
81
82
  }
82
83
  Object.entries(o).forEach(([a, l]) => {
83
- Pe(l, et(t, a), r, i);
84
+ Ue(l, nt(t, a), r, i);
84
85
  });
85
86
  });
86
- }, et = (e, t) => {
87
+ }, nt = (e, t) => {
87
88
  let r = e;
88
- return t.split(_e).forEach((i) => {
89
+ return t.split(Fe).forEach((i) => {
89
90
  r.nextPart.has(i) || r.nextPart.set(i, {
90
91
  nextPart: /* @__PURE__ */ new Map(),
91
92
  validators: []
92
93
  }), r = r.nextPart.get(i);
93
94
  }), r;
94
- }, zi = (e) => e.isThemeGetter, Ti = (e, t) => t ? e.map(([r, i]) => {
95
+ }, Li = (e) => e.isThemeGetter, Ai = (e, t) => t ? e.map(([r, i]) => {
95
96
  const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a);
96
97
  return [r, o];
97
- }) : e, Ii = (e) => {
98
+ }) : e, Ei = (e) => {
98
99
  if (e < 1)
99
100
  return {
100
101
  get: () => {
@@ -118,40 +119,40 @@ const _e = "-", Ci = (e) => {
118
119
  r.has(a) ? r.set(a, l) : o(a, l);
119
120
  }
120
121
  };
121
- }, pt = "!", Si = (e) => {
122
+ }, yt = "!", Ri = (e) => {
122
123
  const {
123
124
  separator: t,
124
125
  experimentalParseClassName: r
125
126
  } = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
126
127
  const c = [];
127
- let d = 0, g = 0, p;
128
- for (let f = 0; f < s.length; f++) {
129
- let x = s[f];
130
- if (d === 0) {
131
- if (x === o && (i || s.slice(f, f + a) === t)) {
132
- c.push(s.slice(g, f)), g = f + a;
128
+ let u = 0, f = 0, b;
129
+ for (let g = 0; g < s.length; g++) {
130
+ let y = s[g];
131
+ if (u === 0) {
132
+ if (y === o && (i || s.slice(g, g + a) === t)) {
133
+ c.push(s.slice(f, g)), f = g + a;
133
134
  continue;
134
135
  }
135
- if (x === "/") {
136
- p = f;
136
+ if (y === "/") {
137
+ b = g;
137
138
  continue;
138
139
  }
139
140
  }
140
- x === "[" ? d++ : x === "]" && d--;
141
+ y === "[" ? u++ : y === "]" && u--;
141
142
  }
142
- const u = c.length === 0 ? s : s.substring(g), k = u.startsWith(pt), b = k ? u.substring(1) : u, z = p && p > g ? p - g : void 0;
143
+ const d = c.length === 0 ? s : s.substring(f), w = d.startsWith(yt), m = w ? d.substring(1) : d, M = b && b > f ? b - f : void 0;
143
144
  return {
144
145
  modifiers: c,
145
- hasImportantModifier: k,
146
- baseClassName: b,
147
- maybePostfixModifierPosition: z
146
+ hasImportantModifier: w,
147
+ baseClassName: m,
148
+ maybePostfixModifierPosition: M
148
149
  };
149
150
  };
150
151
  return r ? (s) => r({
151
152
  className: s,
152
153
  parseClassName: l
153
154
  }) : l;
154
- }, Ni = (e) => {
155
+ }, Vi = (e) => {
155
156
  if (e.length <= 1)
156
157
  return e;
157
158
  const t = [];
@@ -159,122 +160,122 @@ const _e = "-", Ci = (e) => {
159
160
  return e.forEach((i) => {
160
161
  i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
161
162
  }), t.push(...r.sort()), t;
162
- }, Ai = (e) => ({
163
- cache: Ii(e.cacheSize),
164
- parseClassName: Si(e),
165
- ...Ci(e)
166
- }), Li = /\s+/, Ei = (e, t) => {
163
+ }, Di = (e) => ({
164
+ cache: Ei(e.cacheSize),
165
+ parseClassName: Ri(e),
166
+ ...zi(e)
167
+ }), Hi = /\s+/, Oi = (e, t) => {
167
168
  const {
168
169
  parseClassName: r,
169
170
  getClassGroupId: i,
170
171
  getConflictingClassGroupIds: o
171
- } = t, a = [], l = e.trim().split(Li);
172
+ } = t, a = [], l = e.trim().split(Hi);
172
173
  let s = "";
173
174
  for (let c = l.length - 1; c >= 0; c -= 1) {
174
- const d = l[c], {
175
- modifiers: g,
176
- hasImportantModifier: p,
177
- baseClassName: u,
178
- maybePostfixModifierPosition: k
179
- } = r(d);
180
- let b = !!k, z = i(b ? u.substring(0, k) : u);
181
- if (!z) {
182
- if (!b) {
183
- s = d + (s.length > 0 ? " " + s : s);
175
+ const u = l[c], {
176
+ modifiers: f,
177
+ hasImportantModifier: b,
178
+ baseClassName: d,
179
+ maybePostfixModifierPosition: w
180
+ } = r(u);
181
+ let m = !!w, M = i(m ? d.substring(0, w) : d);
182
+ if (!M) {
183
+ if (!m) {
184
+ s = u + (s.length > 0 ? " " + s : s);
184
185
  continue;
185
186
  }
186
- if (z = i(u), !z) {
187
- s = d + (s.length > 0 ? " " + s : s);
187
+ if (M = i(d), !M) {
188
+ s = u + (s.length > 0 ? " " + s : s);
188
189
  continue;
189
190
  }
190
- b = !1;
191
+ m = !1;
191
192
  }
192
- const f = Ni(g).join(":"), x = p ? f + pt : f, h = x + z;
193
- if (a.includes(h))
193
+ const g = Vi(f).join(":"), y = b ? g + yt : g, x = y + M;
194
+ if (a.includes(x))
194
195
  continue;
195
- a.push(h);
196
- const S = o(z, b);
197
- for (let m = 0; m < S.length; ++m) {
198
- const D = S[m];
199
- a.push(x + D);
196
+ a.push(x);
197
+ const L = o(M, m);
198
+ for (let p = 0; p < L.length; ++p) {
199
+ const I = L[p];
200
+ a.push(y + I);
200
201
  }
201
- s = d + (s.length > 0 ? " " + s : s);
202
+ s = u + (s.length > 0 ? " " + s : s);
202
203
  }
203
204
  return s;
204
205
  };
205
- function Ri() {
206
+ function ji() {
206
207
  let e = 0, t, r, i = "";
207
208
  for (; e < arguments.length; )
208
- (t = arguments[e++]) && (r = xt(t)) && (i && (i += " "), i += r);
209
+ (t = arguments[e++]) && (r = Ct(t)) && (i && (i += " "), i += r);
209
210
  return i;
210
211
  }
211
- const xt = (e) => {
212
+ const Ct = (e) => {
212
213
  if (typeof e == "string")
213
214
  return e;
214
215
  let t, r = "";
215
216
  for (let i = 0; i < e.length; i++)
216
- e[i] && (t = xt(e[i])) && (r && (r += " "), r += t);
217
+ e[i] && (t = Ct(e[i])) && (r && (r += " "), r += t);
217
218
  return r;
218
219
  };
219
- function Vi(e, ...t) {
220
+ function Pi(e, ...t) {
220
221
  let r, i, o, a = l;
221
222
  function l(c) {
222
- const d = t.reduce((g, p) => p(g), e());
223
- return r = Ai(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
223
+ const u = t.reduce((f, b) => b(f), e());
224
+ return r = Di(u), i = r.cache.get, o = r.cache.set, a = s, s(c);
224
225
  }
225
226
  function s(c) {
226
- const d = i(c);
227
- if (d)
228
- return d;
229
- const g = Ei(c, r);
230
- return o(c, g), g;
227
+ const u = i(c);
228
+ if (u)
229
+ return u;
230
+ const f = Oi(c, r);
231
+ return o(c, f), f;
231
232
  }
232
233
  return function() {
233
- return a(Ri.apply(null, arguments));
234
+ return a(ji.apply(null, arguments));
234
235
  };
235
236
  }
236
- const V = (e) => {
237
+ const H = (e) => {
237
238
  const t = (r) => r[e] || [];
238
239
  return t.isThemeGetter = !0, t;
239
- }, bt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Di = /^\d+\/\d+$/, Hi = /* @__PURE__ */ new Set(["px", "full", "screen"]), Oi = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Pi = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ji = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, _i = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ui = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => ie(e) || Hi.has(e) || Di.test(e), K = (e) => oe(e, "length", qi), ie = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => oe(e, "number", ie), de = (e) => !!e && Number.isInteger(Number(e)), Bi = (e) => e.endsWith("%") && ie(e.slice(0, -1)), T = (e) => bt.test(e), J = (e) => Oi.test(e), $i = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Fi = (e) => oe(e, $i, vt), Wi = (e) => oe(e, "position", vt), Gi = /* @__PURE__ */ new Set(["image", "url"]), Xi = (e) => oe(e, Gi, Ki), Yi = (e) => oe(e, "", Zi), ue = () => !0, oe = (e, t, r) => {
240
- const i = bt.exec(e);
240
+ }, kt = /^\[(?:([a-z-]+):)?(.+)\]$/i, _i = /^\d+\/\d+$/, Ui = /* @__PURE__ */ new Set(["px", "full", "screen"]), Bi = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, $i = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Fi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Wi = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Gi = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Z = (e) => oe(e) || Ui.has(e) || _i.test(e), ee = (e) => se(e, "length", en), oe = (e) => !!e && !Number.isNaN(Number(e)), Ee = (e) => se(e, "number", oe), he = (e) => !!e && Number.isInteger(Number(e)), Xi = (e) => e.endsWith("%") && oe(e.slice(0, -1)), N = (e) => kt.test(e), te = (e) => Bi.test(e), Yi = /* @__PURE__ */ new Set(["length", "size", "percentage"]), qi = (e) => se(e, Yi, Mt), Zi = (e) => se(e, "position", Mt), Ki = /* @__PURE__ */ new Set(["image", "url"]), Ji = (e) => se(e, Ki, rn), Qi = (e) => se(e, "", tn), fe = () => !0, se = (e, t, r) => {
241
+ const i = kt.exec(e);
241
242
  return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
242
- }, qi = (e) => (
243
+ }, en = (e) => (
243
244
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
244
245
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
245
246
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
246
- Pi.test(e) && !ji.test(e)
247
- ), vt = () => !1, Zi = (e) => _i.test(e), Ki = (e) => Ui.test(e), Ji = () => {
248
- const e = V("colors"), t = V("spacing"), r = V("blur"), i = V("brightness"), o = V("borderColor"), a = V("borderRadius"), l = V("borderSpacing"), s = V("borderWidth"), c = V("contrast"), d = V("grayscale"), g = V("hueRotate"), p = V("invert"), u = V("gap"), k = V("gradientColorStops"), b = V("gradientColorStopPositions"), z = V("inset"), f = V("margin"), x = V("opacity"), h = V("padding"), S = V("saturate"), m = V("scale"), D = V("sepia"), v = V("skew"), R = V("space"), N = V("translate"), P = () => ["auto", "contain", "none"], H = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", T, t], w = () => [T, t], y = () => ["", X, K], I = () => ["auto", ie, T], E = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], A = () => ["solid", "dashed", "dotted", "double", "none"], j = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], G = () => ["", "0", T], ye = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ie, T];
247
+ $i.test(e) && !Fi.test(e)
248
+ ), Mt = () => !1, tn = (e) => Wi.test(e), rn = (e) => Gi.test(e), nn = () => {
249
+ const e = H("colors"), t = H("spacing"), r = H("blur"), i = H("brightness"), o = H("borderColor"), a = H("borderRadius"), l = H("borderSpacing"), s = H("borderWidth"), c = H("contrast"), u = H("grayscale"), f = H("hueRotate"), b = H("invert"), d = H("gap"), w = H("gradientColorStops"), m = H("gradientColorStopPositions"), M = H("inset"), g = H("margin"), y = H("opacity"), x = H("padding"), L = H("saturate"), p = H("scale"), I = H("sepia"), v = H("skew"), U = H("space"), z = H("translate"), j = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", N, t], h = () => [N, t], D = () => ["", Z, ee], E = () => ["auto", oe, N], k = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], S = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], P = () => ["", "0", N], W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [oe, N];
249
250
  return {
250
251
  cacheSize: 500,
251
252
  separator: ":",
252
253
  theme: {
253
- colors: [ue],
254
- spacing: [X, K],
255
- blur: ["none", "", J, T],
256
- brightness: W(),
254
+ colors: [fe],
255
+ spacing: [Z, ee],
256
+ blur: ["none", "", te, N],
257
+ brightness: Y(),
257
258
  borderColor: [e],
258
- borderRadius: ["none", "", "full", J, T],
259
- borderSpacing: w(),
260
- borderWidth: y(),
261
- contrast: W(),
262
- grayscale: G(),
263
- hueRotate: W(),
264
- invert: G(),
265
- gap: w(),
259
+ borderRadius: ["none", "", "full", te, N],
260
+ borderSpacing: h(),
261
+ borderWidth: D(),
262
+ contrast: Y(),
263
+ grayscale: P(),
264
+ hueRotate: Y(),
265
+ invert: P(),
266
+ gap: h(),
266
267
  gradientColorStops: [e],
267
- gradientColorStopPositions: [Bi, K],
268
- inset: M(),
269
- margin: M(),
270
- opacity: W(),
271
- padding: w(),
272
- saturate: W(),
273
- scale: W(),
274
- sepia: G(),
275
- skew: W(),
276
- space: w(),
277
- translate: w()
268
+ gradientColorStopPositions: [Xi, ee],
269
+ inset: $(),
270
+ margin: $(),
271
+ opacity: Y(),
272
+ padding: h(),
273
+ saturate: Y(),
274
+ scale: Y(),
275
+ sepia: P(),
276
+ skew: Y(),
277
+ space: h(),
278
+ translate: h()
278
279
  },
279
280
  classGroups: {
280
281
  // Layout
@@ -283,7 +284,7 @@ const V = (e) => {
283
284
  * @see https://tailwindcss.com/docs/aspect-ratio
284
285
  */
285
286
  aspect: [{
286
- aspect: ["auto", "square", "video", T]
287
+ aspect: ["auto", "square", "video", N]
287
288
  }],
288
289
  /**
289
290
  * Container
@@ -295,21 +296,21 @@ const V = (e) => {
295
296
  * @see https://tailwindcss.com/docs/columns
296
297
  */
297
298
  columns: [{
298
- columns: [J]
299
+ columns: [te]
299
300
  }],
300
301
  /**
301
302
  * Break After
302
303
  * @see https://tailwindcss.com/docs/break-after
303
304
  */
304
305
  "break-after": [{
305
- "break-after": ye()
306
+ "break-after": W()
306
307
  }],
307
308
  /**
308
309
  * Break Before
309
310
  * @see https://tailwindcss.com/docs/break-before
310
311
  */
311
312
  "break-before": [{
312
- "break-before": ye()
313
+ "break-before": W()
313
314
  }],
314
315
  /**
315
316
  * Break Inside
@@ -368,49 +369,49 @@ const V = (e) => {
368
369
  * @see https://tailwindcss.com/docs/object-position
369
370
  */
370
371
  "object-position": [{
371
- object: [...E(), T]
372
+ object: [...k(), N]
372
373
  }],
373
374
  /**
374
375
  * Overflow
375
376
  * @see https://tailwindcss.com/docs/overflow
376
377
  */
377
378
  overflow: [{
378
- overflow: H()
379
+ overflow: A()
379
380
  }],
380
381
  /**
381
382
  * Overflow X
382
383
  * @see https://tailwindcss.com/docs/overflow
383
384
  */
384
385
  "overflow-x": [{
385
- "overflow-x": H()
386
+ "overflow-x": A()
386
387
  }],
387
388
  /**
388
389
  * Overflow Y
389
390
  * @see https://tailwindcss.com/docs/overflow
390
391
  */
391
392
  "overflow-y": [{
392
- "overflow-y": H()
393
+ "overflow-y": A()
393
394
  }],
394
395
  /**
395
396
  * Overscroll Behavior
396
397
  * @see https://tailwindcss.com/docs/overscroll-behavior
397
398
  */
398
399
  overscroll: [{
399
- overscroll: P()
400
+ overscroll: j()
400
401
  }],
401
402
  /**
402
403
  * Overscroll Behavior X
403
404
  * @see https://tailwindcss.com/docs/overscroll-behavior
404
405
  */
405
406
  "overscroll-x": [{
406
- "overscroll-x": P()
407
+ "overscroll-x": j()
407
408
  }],
408
409
  /**
409
410
  * Overscroll Behavior Y
410
411
  * @see https://tailwindcss.com/docs/overscroll-behavior
411
412
  */
412
413
  "overscroll-y": [{
413
- "overscroll-y": P()
414
+ "overscroll-y": j()
414
415
  }],
415
416
  /**
416
417
  * Position
@@ -422,63 +423,63 @@ const V = (e) => {
422
423
  * @see https://tailwindcss.com/docs/top-right-bottom-left
423
424
  */
424
425
  inset: [{
425
- inset: [z]
426
+ inset: [M]
426
427
  }],
427
428
  /**
428
429
  * Right / Left
429
430
  * @see https://tailwindcss.com/docs/top-right-bottom-left
430
431
  */
431
432
  "inset-x": [{
432
- "inset-x": [z]
433
+ "inset-x": [M]
433
434
  }],
434
435
  /**
435
436
  * Top / Bottom
436
437
  * @see https://tailwindcss.com/docs/top-right-bottom-left
437
438
  */
438
439
  "inset-y": [{
439
- "inset-y": [z]
440
+ "inset-y": [M]
440
441
  }],
441
442
  /**
442
443
  * Start
443
444
  * @see https://tailwindcss.com/docs/top-right-bottom-left
444
445
  */
445
446
  start: [{
446
- start: [z]
447
+ start: [M]
447
448
  }],
448
449
  /**
449
450
  * End
450
451
  * @see https://tailwindcss.com/docs/top-right-bottom-left
451
452
  */
452
453
  end: [{
453
- end: [z]
454
+ end: [M]
454
455
  }],
455
456
  /**
456
457
  * Top
457
458
  * @see https://tailwindcss.com/docs/top-right-bottom-left
458
459
  */
459
460
  top: [{
460
- top: [z]
461
+ top: [M]
461
462
  }],
462
463
  /**
463
464
  * Right
464
465
  * @see https://tailwindcss.com/docs/top-right-bottom-left
465
466
  */
466
467
  right: [{
467
- right: [z]
468
+ right: [M]
468
469
  }],
469
470
  /**
470
471
  * Bottom
471
472
  * @see https://tailwindcss.com/docs/top-right-bottom-left
472
473
  */
473
474
  bottom: [{
474
- bottom: [z]
475
+ bottom: [M]
475
476
  }],
476
477
  /**
477
478
  * Left
478
479
  * @see https://tailwindcss.com/docs/top-right-bottom-left
479
480
  */
480
481
  left: [{
481
- left: [z]
482
+ left: [M]
482
483
  }],
483
484
  /**
484
485
  * Visibility
@@ -490,7 +491,7 @@ const V = (e) => {
490
491
  * @see https://tailwindcss.com/docs/z-index
491
492
  */
492
493
  z: [{
493
- z: ["auto", de, T]
494
+ z: ["auto", he, N]
494
495
  }],
495
496
  // Flexbox and Grid
496
497
  /**
@@ -498,7 +499,7 @@ const V = (e) => {
498
499
  * @see https://tailwindcss.com/docs/flex-basis
499
500
  */
500
501
  basis: [{
501
- basis: M()
502
+ basis: $()
502
503
  }],
503
504
  /**
504
505
  * Flex Direction
@@ -519,35 +520,35 @@ const V = (e) => {
519
520
  * @see https://tailwindcss.com/docs/flex
520
521
  */
521
522
  flex: [{
522
- flex: ["1", "auto", "initial", "none", T]
523
+ flex: ["1", "auto", "initial", "none", N]
523
524
  }],
524
525
  /**
525
526
  * Flex Grow
526
527
  * @see https://tailwindcss.com/docs/flex-grow
527
528
  */
528
529
  grow: [{
529
- grow: G()
530
+ grow: P()
530
531
  }],
531
532
  /**
532
533
  * Flex Shrink
533
534
  * @see https://tailwindcss.com/docs/flex-shrink
534
535
  */
535
536
  shrink: [{
536
- shrink: G()
537
+ shrink: P()
537
538
  }],
538
539
  /**
539
540
  * Order
540
541
  * @see https://tailwindcss.com/docs/order
541
542
  */
542
543
  order: [{
543
- order: ["first", "last", "none", de, T]
544
+ order: ["first", "last", "none", he, N]
544
545
  }],
545
546
  /**
546
547
  * Grid Template Columns
547
548
  * @see https://tailwindcss.com/docs/grid-template-columns
548
549
  */
549
550
  "grid-cols": [{
550
- "grid-cols": [ue]
551
+ "grid-cols": [fe]
551
552
  }],
552
553
  /**
553
554
  * Grid Column Start / End
@@ -555,29 +556,29 @@ const V = (e) => {
555
556
  */
556
557
  "col-start-end": [{
557
558
  col: ["auto", {
558
- span: ["full", de, T]
559
- }, T]
559
+ span: ["full", he, N]
560
+ }, N]
560
561
  }],
561
562
  /**
562
563
  * Grid Column Start
563
564
  * @see https://tailwindcss.com/docs/grid-column
564
565
  */
565
566
  "col-start": [{
566
- "col-start": I()
567
+ "col-start": E()
567
568
  }],
568
569
  /**
569
570
  * Grid Column End
570
571
  * @see https://tailwindcss.com/docs/grid-column
571
572
  */
572
573
  "col-end": [{
573
- "col-end": I()
574
+ "col-end": E()
574
575
  }],
575
576
  /**
576
577
  * Grid Template Rows
577
578
  * @see https://tailwindcss.com/docs/grid-template-rows
578
579
  */
579
580
  "grid-rows": [{
580
- "grid-rows": [ue]
581
+ "grid-rows": [fe]
581
582
  }],
582
583
  /**
583
584
  * Grid Row Start / End
@@ -585,22 +586,22 @@ const V = (e) => {
585
586
  */
586
587
  "row-start-end": [{
587
588
  row: ["auto", {
588
- span: [de, T]
589
- }, T]
589
+ span: [he, N]
590
+ }, N]
590
591
  }],
591
592
  /**
592
593
  * Grid Row Start
593
594
  * @see https://tailwindcss.com/docs/grid-row
594
595
  */
595
596
  "row-start": [{
596
- "row-start": I()
597
+ "row-start": E()
597
598
  }],
598
599
  /**
599
600
  * Grid Row End
600
601
  * @see https://tailwindcss.com/docs/grid-row
601
602
  */
602
603
  "row-end": [{
603
- "row-end": I()
604
+ "row-end": E()
604
605
  }],
605
606
  /**
606
607
  * Grid Auto Flow
@@ -614,42 +615,42 @@ const V = (e) => {
614
615
  * @see https://tailwindcss.com/docs/grid-auto-columns
615
616
  */
616
617
  "auto-cols": [{
617
- "auto-cols": ["auto", "min", "max", "fr", T]
618
+ "auto-cols": ["auto", "min", "max", "fr", N]
618
619
  }],
619
620
  /**
620
621
  * Grid Auto Rows
621
622
  * @see https://tailwindcss.com/docs/grid-auto-rows
622
623
  */
623
624
  "auto-rows": [{
624
- "auto-rows": ["auto", "min", "max", "fr", T]
625
+ "auto-rows": ["auto", "min", "max", "fr", N]
625
626
  }],
626
627
  /**
627
628
  * Gap
628
629
  * @see https://tailwindcss.com/docs/gap
629
630
  */
630
631
  gap: [{
631
- gap: [u]
632
+ gap: [d]
632
633
  }],
633
634
  /**
634
635
  * Gap X
635
636
  * @see https://tailwindcss.com/docs/gap
636
637
  */
637
638
  "gap-x": [{
638
- "gap-x": [u]
639
+ "gap-x": [d]
639
640
  }],
640
641
  /**
641
642
  * Gap Y
642
643
  * @see https://tailwindcss.com/docs/gap
643
644
  */
644
645
  "gap-y": [{
645
- "gap-y": [u]
646
+ "gap-y": [d]
646
647
  }],
647
648
  /**
648
649
  * Justify Content
649
650
  * @see https://tailwindcss.com/docs/justify-content
650
651
  */
651
652
  "justify-content": [{
652
- justify: ["normal", ...O()]
653
+ justify: ["normal", ..._()]
653
654
  }],
654
655
  /**
655
656
  * Justify Items
@@ -670,7 +671,7 @@ const V = (e) => {
670
671
  * @see https://tailwindcss.com/docs/align-content
671
672
  */
672
673
  "align-content": [{
673
- content: ["normal", ...O(), "baseline"]
674
+ content: ["normal", ..._(), "baseline"]
674
675
  }],
675
676
  /**
676
677
  * Align Items
@@ -691,7 +692,7 @@ const V = (e) => {
691
692
  * @see https://tailwindcss.com/docs/place-content
692
693
  */
693
694
  "place-content": [{
694
- "place-content": [...O(), "baseline"]
695
+ "place-content": [..._(), "baseline"]
695
696
  }],
696
697
  /**
697
698
  * Place Items
@@ -713,133 +714,133 @@ const V = (e) => {
713
714
  * @see https://tailwindcss.com/docs/padding
714
715
  */
715
716
  p: [{
716
- p: [h]
717
+ p: [x]
717
718
  }],
718
719
  /**
719
720
  * Padding X
720
721
  * @see https://tailwindcss.com/docs/padding
721
722
  */
722
723
  px: [{
723
- px: [h]
724
+ px: [x]
724
725
  }],
725
726
  /**
726
727
  * Padding Y
727
728
  * @see https://tailwindcss.com/docs/padding
728
729
  */
729
730
  py: [{
730
- py: [h]
731
+ py: [x]
731
732
  }],
732
733
  /**
733
734
  * Padding Start
734
735
  * @see https://tailwindcss.com/docs/padding
735
736
  */
736
737
  ps: [{
737
- ps: [h]
738
+ ps: [x]
738
739
  }],
739
740
  /**
740
741
  * Padding End
741
742
  * @see https://tailwindcss.com/docs/padding
742
743
  */
743
744
  pe: [{
744
- pe: [h]
745
+ pe: [x]
745
746
  }],
746
747
  /**
747
748
  * Padding Top
748
749
  * @see https://tailwindcss.com/docs/padding
749
750
  */
750
751
  pt: [{
751
- pt: [h]
752
+ pt: [x]
752
753
  }],
753
754
  /**
754
755
  * Padding Right
755
756
  * @see https://tailwindcss.com/docs/padding
756
757
  */
757
758
  pr: [{
758
- pr: [h]
759
+ pr: [x]
759
760
  }],
760
761
  /**
761
762
  * Padding Bottom
762
763
  * @see https://tailwindcss.com/docs/padding
763
764
  */
764
765
  pb: [{
765
- pb: [h]
766
+ pb: [x]
766
767
  }],
767
768
  /**
768
769
  * Padding Left
769
770
  * @see https://tailwindcss.com/docs/padding
770
771
  */
771
772
  pl: [{
772
- pl: [h]
773
+ pl: [x]
773
774
  }],
774
775
  /**
775
776
  * Margin
776
777
  * @see https://tailwindcss.com/docs/margin
777
778
  */
778
779
  m: [{
779
- m: [f]
780
+ m: [g]
780
781
  }],
781
782
  /**
782
783
  * Margin X
783
784
  * @see https://tailwindcss.com/docs/margin
784
785
  */
785
786
  mx: [{
786
- mx: [f]
787
+ mx: [g]
787
788
  }],
788
789
  /**
789
790
  * Margin Y
790
791
  * @see https://tailwindcss.com/docs/margin
791
792
  */
792
793
  my: [{
793
- my: [f]
794
+ my: [g]
794
795
  }],
795
796
  /**
796
797
  * Margin Start
797
798
  * @see https://tailwindcss.com/docs/margin
798
799
  */
799
800
  ms: [{
800
- ms: [f]
801
+ ms: [g]
801
802
  }],
802
803
  /**
803
804
  * Margin End
804
805
  * @see https://tailwindcss.com/docs/margin
805
806
  */
806
807
  me: [{
807
- me: [f]
808
+ me: [g]
808
809
  }],
809
810
  /**
810
811
  * Margin Top
811
812
  * @see https://tailwindcss.com/docs/margin
812
813
  */
813
814
  mt: [{
814
- mt: [f]
815
+ mt: [g]
815
816
  }],
816
817
  /**
817
818
  * Margin Right
818
819
  * @see https://tailwindcss.com/docs/margin
819
820
  */
820
821
  mr: [{
821
- mr: [f]
822
+ mr: [g]
822
823
  }],
823
824
  /**
824
825
  * Margin Bottom
825
826
  * @see https://tailwindcss.com/docs/margin
826
827
  */
827
828
  mb: [{
828
- mb: [f]
829
+ mb: [g]
829
830
  }],
830
831
  /**
831
832
  * Margin Left
832
833
  * @see https://tailwindcss.com/docs/margin
833
834
  */
834
835
  ml: [{
835
- ml: [f]
836
+ ml: [g]
836
837
  }],
837
838
  /**
838
839
  * Space Between X
839
840
  * @see https://tailwindcss.com/docs/space
840
841
  */
841
842
  "space-x": [{
842
- "space-x": [R]
843
+ "space-x": [U]
843
844
  }],
844
845
  /**
845
846
  * Space Between X Reverse
@@ -851,7 +852,7 @@ const V = (e) => {
851
852
  * @see https://tailwindcss.com/docs/space
852
853
  */
853
854
  "space-y": [{
854
- "space-y": [R]
855
+ "space-y": [U]
855
856
  }],
856
857
  /**
857
858
  * Space Between Y Reverse
@@ -864,51 +865,51 @@ const V = (e) => {
864
865
  * @see https://tailwindcss.com/docs/width
865
866
  */
866
867
  w: [{
867
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", T, t]
868
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", N, t]
868
869
  }],
869
870
  /**
870
871
  * Min-Width
871
872
  * @see https://tailwindcss.com/docs/min-width
872
873
  */
873
874
  "min-w": [{
874
- "min-w": [T, t, "min", "max", "fit"]
875
+ "min-w": [N, t, "min", "max", "fit"]
875
876
  }],
876
877
  /**
877
878
  * Max-Width
878
879
  * @see https://tailwindcss.com/docs/max-width
879
880
  */
880
881
  "max-w": [{
881
- "max-w": [T, t, "none", "full", "min", "max", "fit", "prose", {
882
- screen: [J]
883
- }, J]
882
+ "max-w": [N, t, "none", "full", "min", "max", "fit", "prose", {
883
+ screen: [te]
884
+ }, te]
884
885
  }],
885
886
  /**
886
887
  * Height
887
888
  * @see https://tailwindcss.com/docs/height
888
889
  */
889
890
  h: [{
890
- h: [T, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
891
+ h: [N, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
891
892
  }],
892
893
  /**
893
894
  * Min-Height
894
895
  * @see https://tailwindcss.com/docs/min-height
895
896
  */
896
897
  "min-h": [{
897
- "min-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"]
898
+ "min-h": [N, t, "min", "max", "fit", "svh", "lvh", "dvh"]
898
899
  }],
899
900
  /**
900
901
  * Max-Height
901
902
  * @see https://tailwindcss.com/docs/max-height
902
903
  */
903
904
  "max-h": [{
904
- "max-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"]
905
+ "max-h": [N, t, "min", "max", "fit", "svh", "lvh", "dvh"]
905
906
  }],
906
907
  /**
907
908
  * Size
908
909
  * @see https://tailwindcss.com/docs/size
909
910
  */
910
911
  size: [{
911
- size: [T, t, "auto", "min", "max", "fit"]
912
+ size: [N, t, "auto", "min", "max", "fit"]
912
913
  }],
913
914
  // Typography
914
915
  /**
@@ -916,7 +917,7 @@ const V = (e) => {
916
917
  * @see https://tailwindcss.com/docs/font-size
917
918
  */
918
919
  "font-size": [{
919
- text: ["base", J, K]
920
+ text: ["base", te, ee]
920
921
  }],
921
922
  /**
922
923
  * Font Smoothing
@@ -933,14 +934,14 @@ const V = (e) => {
933
934
  * @see https://tailwindcss.com/docs/font-weight
934
935
  */
935
936
  "font-weight": [{
936
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Le]
937
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ee]
937
938
  }],
938
939
  /**
939
940
  * Font Family
940
941
  * @see https://tailwindcss.com/docs/font-family
941
942
  */
942
943
  "font-family": [{
943
- font: [ue]
944
+ font: [fe]
944
945
  }],
945
946
  /**
946
947
  * Font Variant Numeric
@@ -977,35 +978,35 @@ const V = (e) => {
977
978
  * @see https://tailwindcss.com/docs/letter-spacing
978
979
  */
979
980
  tracking: [{
980
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", T]
981
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", N]
981
982
  }],
982
983
  /**
983
984
  * Line Clamp
984
985
  * @see https://tailwindcss.com/docs/line-clamp
985
986
  */
986
987
  "line-clamp": [{
987
- "line-clamp": ["none", ie, Le]
988
+ "line-clamp": ["none", oe, Ee]
988
989
  }],
989
990
  /**
990
991
  * Line Height
991
992
  * @see https://tailwindcss.com/docs/line-height
992
993
  */
993
994
  leading: [{
994
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", X, T]
995
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Z, N]
995
996
  }],
996
997
  /**
997
998
  * List Style Image
998
999
  * @see https://tailwindcss.com/docs/list-style-image
999
1000
  */
1000
1001
  "list-image": [{
1001
- "list-image": ["none", T]
1002
+ "list-image": ["none", N]
1002
1003
  }],
1003
1004
  /**
1004
1005
  * List Style Type
1005
1006
  * @see https://tailwindcss.com/docs/list-style-type
1006
1007
  */
1007
1008
  "list-style-type": [{
1008
- list: ["none", "disc", "decimal", T]
1009
+ list: ["none", "disc", "decimal", N]
1009
1010
  }],
1010
1011
  /**
1011
1012
  * List Style Position
@@ -1027,7 +1028,7 @@ const V = (e) => {
1027
1028
  * @see https://tailwindcss.com/docs/placeholder-opacity
1028
1029
  */
1029
1030
  "placeholder-opacity": [{
1030
- "placeholder-opacity": [x]
1031
+ "placeholder-opacity": [y]
1031
1032
  }],
1032
1033
  /**
1033
1034
  * Text Alignment
@@ -1048,7 +1049,7 @@ const V = (e) => {
1048
1049
  * @see https://tailwindcss.com/docs/text-opacity
1049
1050
  */
1050
1051
  "text-opacity": [{
1051
- "text-opacity": [x]
1052
+ "text-opacity": [y]
1052
1053
  }],
1053
1054
  /**
1054
1055
  * Text Decoration
@@ -1060,21 +1061,21 @@ const V = (e) => {
1060
1061
  * @see https://tailwindcss.com/docs/text-decoration-style
1061
1062
  */
1062
1063
  "text-decoration-style": [{
1063
- decoration: [...A(), "wavy"]
1064
+ decoration: [...T(), "wavy"]
1064
1065
  }],
1065
1066
  /**
1066
1067
  * Text Decoration Thickness
1067
1068
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1068
1069
  */
1069
1070
  "text-decoration-thickness": [{
1070
- decoration: ["auto", "from-font", X, K]
1071
+ decoration: ["auto", "from-font", Z, ee]
1071
1072
  }],
1072
1073
  /**
1073
1074
  * Text Underline Offset
1074
1075
  * @see https://tailwindcss.com/docs/text-underline-offset
1075
1076
  */
1076
1077
  "underline-offset": [{
1077
- "underline-offset": ["auto", X, T]
1078
+ "underline-offset": ["auto", Z, N]
1078
1079
  }],
1079
1080
  /**
1080
1081
  * Text Decoration Color
@@ -1105,14 +1106,14 @@ const V = (e) => {
1105
1106
  * @see https://tailwindcss.com/docs/text-indent
1106
1107
  */
1107
1108
  indent: [{
1108
- indent: w()
1109
+ indent: h()
1109
1110
  }],
1110
1111
  /**
1111
1112
  * Vertical Alignment
1112
1113
  * @see https://tailwindcss.com/docs/vertical-align
1113
1114
  */
1114
1115
  "vertical-align": [{
1115
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", T]
1116
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", N]
1116
1117
  }],
1117
1118
  /**
1118
1119
  * Whitespace
@@ -1140,7 +1141,7 @@ const V = (e) => {
1140
1141
  * @see https://tailwindcss.com/docs/content
1141
1142
  */
1142
1143
  content: [{
1143
- content: ["none", T]
1144
+ content: ["none", N]
1144
1145
  }],
1145
1146
  // Backgrounds
1146
1147
  /**
@@ -1163,7 +1164,7 @@ const V = (e) => {
1163
1164
  * @see https://tailwindcss.com/docs/background-opacity
1164
1165
  */
1165
1166
  "bg-opacity": [{
1166
- "bg-opacity": [x]
1167
+ "bg-opacity": [y]
1167
1168
  }],
1168
1169
  /**
1169
1170
  * Background Origin
@@ -1177,7 +1178,7 @@ const V = (e) => {
1177
1178
  * @see https://tailwindcss.com/docs/background-position
1178
1179
  */
1179
1180
  "bg-position": [{
1180
- bg: [...E(), Wi]
1181
+ bg: [...k(), Zi]
1181
1182
  }],
1182
1183
  /**
1183
1184
  * Background Repeat
@@ -1193,7 +1194,7 @@ const V = (e) => {
1193
1194
  * @see https://tailwindcss.com/docs/background-size
1194
1195
  */
1195
1196
  "bg-size": [{
1196
- bg: ["auto", "cover", "contain", Fi]
1197
+ bg: ["auto", "cover", "contain", qi]
1197
1198
  }],
1198
1199
  /**
1199
1200
  * Background Image
@@ -1202,7 +1203,7 @@ const V = (e) => {
1202
1203
  "bg-image": [{
1203
1204
  bg: ["none", {
1204
1205
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1205
- }, Xi]
1206
+ }, Ji]
1206
1207
  }],
1207
1208
  /**
1208
1209
  * Background Color
@@ -1216,42 +1217,42 @@ const V = (e) => {
1216
1217
  * @see https://tailwindcss.com/docs/gradient-color-stops
1217
1218
  */
1218
1219
  "gradient-from-pos": [{
1219
- from: [b]
1220
+ from: [m]
1220
1221
  }],
1221
1222
  /**
1222
1223
  * Gradient Color Stops Via Position
1223
1224
  * @see https://tailwindcss.com/docs/gradient-color-stops
1224
1225
  */
1225
1226
  "gradient-via-pos": [{
1226
- via: [b]
1227
+ via: [m]
1227
1228
  }],
1228
1229
  /**
1229
1230
  * Gradient Color Stops To Position
1230
1231
  * @see https://tailwindcss.com/docs/gradient-color-stops
1231
1232
  */
1232
1233
  "gradient-to-pos": [{
1233
- to: [b]
1234
+ to: [m]
1234
1235
  }],
1235
1236
  /**
1236
1237
  * Gradient Color Stops From
1237
1238
  * @see https://tailwindcss.com/docs/gradient-color-stops
1238
1239
  */
1239
1240
  "gradient-from": [{
1240
- from: [k]
1241
+ from: [w]
1241
1242
  }],
1242
1243
  /**
1243
1244
  * Gradient Color Stops Via
1244
1245
  * @see https://tailwindcss.com/docs/gradient-color-stops
1245
1246
  */
1246
1247
  "gradient-via": [{
1247
- via: [k]
1248
+ via: [w]
1248
1249
  }],
1249
1250
  /**
1250
1251
  * Gradient Color Stops To
1251
1252
  * @see https://tailwindcss.com/docs/gradient-color-stops
1252
1253
  */
1253
1254
  "gradient-to": [{
1254
- to: [k]
1255
+ to: [w]
1255
1256
  }],
1256
1257
  // Borders
1257
1258
  /**
@@ -1427,14 +1428,14 @@ const V = (e) => {
1427
1428
  * @see https://tailwindcss.com/docs/border-opacity
1428
1429
  */
1429
1430
  "border-opacity": [{
1430
- "border-opacity": [x]
1431
+ "border-opacity": [y]
1431
1432
  }],
1432
1433
  /**
1433
1434
  * Border Style
1434
1435
  * @see https://tailwindcss.com/docs/border-style
1435
1436
  */
1436
1437
  "border-style": [{
1437
- border: [...A(), "hidden"]
1438
+ border: [...T(), "hidden"]
1438
1439
  }],
1439
1440
  /**
1440
1441
  * Divide Width X
@@ -1465,14 +1466,14 @@ const V = (e) => {
1465
1466
  * @see https://tailwindcss.com/docs/divide-opacity
1466
1467
  */
1467
1468
  "divide-opacity": [{
1468
- "divide-opacity": [x]
1469
+ "divide-opacity": [y]
1469
1470
  }],
1470
1471
  /**
1471
1472
  * Divide Style
1472
1473
  * @see https://tailwindcss.com/docs/divide-style
1473
1474
  */
1474
1475
  "divide-style": [{
1475
- divide: A()
1476
+ divide: T()
1476
1477
  }],
1477
1478
  /**
1478
1479
  * Border Color
@@ -1549,21 +1550,21 @@ const V = (e) => {
1549
1550
  * @see https://tailwindcss.com/docs/outline-style
1550
1551
  */
1551
1552
  "outline-style": [{
1552
- outline: ["", ...A()]
1553
+ outline: ["", ...T()]
1553
1554
  }],
1554
1555
  /**
1555
1556
  * Outline Offset
1556
1557
  * @see https://tailwindcss.com/docs/outline-offset
1557
1558
  */
1558
1559
  "outline-offset": [{
1559
- "outline-offset": [X, T]
1560
+ "outline-offset": [Z, N]
1560
1561
  }],
1561
1562
  /**
1562
1563
  * Outline Width
1563
1564
  * @see https://tailwindcss.com/docs/outline-width
1564
1565
  */
1565
1566
  "outline-w": [{
1566
- outline: [X, K]
1567
+ outline: [Z, ee]
1567
1568
  }],
1568
1569
  /**
1569
1570
  * Outline Color
@@ -1577,7 +1578,7 @@ const V = (e) => {
1577
1578
  * @see https://tailwindcss.com/docs/ring-width
1578
1579
  */
1579
1580
  "ring-w": [{
1580
- ring: y()
1581
+ ring: D()
1581
1582
  }],
1582
1583
  /**
1583
1584
  * Ring Width Inset
@@ -1596,14 +1597,14 @@ const V = (e) => {
1596
1597
  * @see https://tailwindcss.com/docs/ring-opacity
1597
1598
  */
1598
1599
  "ring-opacity": [{
1599
- "ring-opacity": [x]
1600
+ "ring-opacity": [y]
1600
1601
  }],
1601
1602
  /**
1602
1603
  * Ring Offset Width
1603
1604
  * @see https://tailwindcss.com/docs/ring-offset-width
1604
1605
  */
1605
1606
  "ring-offset-w": [{
1606
- "ring-offset": [X, K]
1607
+ "ring-offset": [Z, ee]
1607
1608
  }],
1608
1609
  /**
1609
1610
  * Ring Offset Color
@@ -1618,35 +1619,35 @@ const V = (e) => {
1618
1619
  * @see https://tailwindcss.com/docs/box-shadow
1619
1620
  */
1620
1621
  shadow: [{
1621
- shadow: ["", "inner", "none", J, Yi]
1622
+ shadow: ["", "inner", "none", te, Qi]
1622
1623
  }],
1623
1624
  /**
1624
1625
  * Box Shadow Color
1625
1626
  * @see https://tailwindcss.com/docs/box-shadow-color
1626
1627
  */
1627
1628
  "shadow-color": [{
1628
- shadow: [ue]
1629
+ shadow: [fe]
1629
1630
  }],
1630
1631
  /**
1631
1632
  * Opacity
1632
1633
  * @see https://tailwindcss.com/docs/opacity
1633
1634
  */
1634
1635
  opacity: [{
1635
- opacity: [x]
1636
+ opacity: [y]
1636
1637
  }],
1637
1638
  /**
1638
1639
  * Mix Blend Mode
1639
1640
  * @see https://tailwindcss.com/docs/mix-blend-mode
1640
1641
  */
1641
1642
  "mix-blend": [{
1642
- "mix-blend": [...j(), "plus-lighter", "plus-darker"]
1643
+ "mix-blend": [...S(), "plus-lighter", "plus-darker"]
1643
1644
  }],
1644
1645
  /**
1645
1646
  * Background Blend Mode
1646
1647
  * @see https://tailwindcss.com/docs/background-blend-mode
1647
1648
  */
1648
1649
  "bg-blend": [{
1649
- "bg-blend": j()
1650
+ "bg-blend": S()
1650
1651
  }],
1651
1652
  // Filters
1652
1653
  /**
@@ -1683,42 +1684,42 @@ const V = (e) => {
1683
1684
  * @see https://tailwindcss.com/docs/drop-shadow
1684
1685
  */
1685
1686
  "drop-shadow": [{
1686
- "drop-shadow": ["", "none", J, T]
1687
+ "drop-shadow": ["", "none", te, N]
1687
1688
  }],
1688
1689
  /**
1689
1690
  * Grayscale
1690
1691
  * @see https://tailwindcss.com/docs/grayscale
1691
1692
  */
1692
1693
  grayscale: [{
1693
- grayscale: [d]
1694
+ grayscale: [u]
1694
1695
  }],
1695
1696
  /**
1696
1697
  * Hue Rotate
1697
1698
  * @see https://tailwindcss.com/docs/hue-rotate
1698
1699
  */
1699
1700
  "hue-rotate": [{
1700
- "hue-rotate": [g]
1701
+ "hue-rotate": [f]
1701
1702
  }],
1702
1703
  /**
1703
1704
  * Invert
1704
1705
  * @see https://tailwindcss.com/docs/invert
1705
1706
  */
1706
1707
  invert: [{
1707
- invert: [p]
1708
+ invert: [b]
1708
1709
  }],
1709
1710
  /**
1710
1711
  * Saturate
1711
1712
  * @see https://tailwindcss.com/docs/saturate
1712
1713
  */
1713
1714
  saturate: [{
1714
- saturate: [S]
1715
+ saturate: [L]
1715
1716
  }],
1716
1717
  /**
1717
1718
  * Sepia
1718
1719
  * @see https://tailwindcss.com/docs/sepia
1719
1720
  */
1720
1721
  sepia: [{
1721
- sepia: [D]
1722
+ sepia: [I]
1722
1723
  }],
1723
1724
  /**
1724
1725
  * Backdrop Filter
@@ -1754,42 +1755,42 @@ const V = (e) => {
1754
1755
  * @see https://tailwindcss.com/docs/backdrop-grayscale
1755
1756
  */
1756
1757
  "backdrop-grayscale": [{
1757
- "backdrop-grayscale": [d]
1758
+ "backdrop-grayscale": [u]
1758
1759
  }],
1759
1760
  /**
1760
1761
  * Backdrop Hue Rotate
1761
1762
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1762
1763
  */
1763
1764
  "backdrop-hue-rotate": [{
1764
- "backdrop-hue-rotate": [g]
1765
+ "backdrop-hue-rotate": [f]
1765
1766
  }],
1766
1767
  /**
1767
1768
  * Backdrop Invert
1768
1769
  * @see https://tailwindcss.com/docs/backdrop-invert
1769
1770
  */
1770
1771
  "backdrop-invert": [{
1771
- "backdrop-invert": [p]
1772
+ "backdrop-invert": [b]
1772
1773
  }],
1773
1774
  /**
1774
1775
  * Backdrop Opacity
1775
1776
  * @see https://tailwindcss.com/docs/backdrop-opacity
1776
1777
  */
1777
1778
  "backdrop-opacity": [{
1778
- "backdrop-opacity": [x]
1779
+ "backdrop-opacity": [y]
1779
1780
  }],
1780
1781
  /**
1781
1782
  * Backdrop Saturate
1782
1783
  * @see https://tailwindcss.com/docs/backdrop-saturate
1783
1784
  */
1784
1785
  "backdrop-saturate": [{
1785
- "backdrop-saturate": [S]
1786
+ "backdrop-saturate": [L]
1786
1787
  }],
1787
1788
  /**
1788
1789
  * Backdrop Sepia
1789
1790
  * @see https://tailwindcss.com/docs/backdrop-sepia
1790
1791
  */
1791
1792
  "backdrop-sepia": [{
1792
- "backdrop-sepia": [D]
1793
+ "backdrop-sepia": [I]
1793
1794
  }],
1794
1795
  // Tables
1795
1796
  /**
@@ -1840,35 +1841,35 @@ const V = (e) => {
1840
1841
  * @see https://tailwindcss.com/docs/transition-property
1841
1842
  */
1842
1843
  transition: [{
1843
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", T]
1844
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", N]
1844
1845
  }],
1845
1846
  /**
1846
1847
  * Transition Duration
1847
1848
  * @see https://tailwindcss.com/docs/transition-duration
1848
1849
  */
1849
1850
  duration: [{
1850
- duration: W()
1851
+ duration: Y()
1851
1852
  }],
1852
1853
  /**
1853
1854
  * Transition Timing Function
1854
1855
  * @see https://tailwindcss.com/docs/transition-timing-function
1855
1856
  */
1856
1857
  ease: [{
1857
- ease: ["linear", "in", "out", "in-out", T]
1858
+ ease: ["linear", "in", "out", "in-out", N]
1858
1859
  }],
1859
1860
  /**
1860
1861
  * Transition Delay
1861
1862
  * @see https://tailwindcss.com/docs/transition-delay
1862
1863
  */
1863
1864
  delay: [{
1864
- delay: W()
1865
+ delay: Y()
1865
1866
  }],
1866
1867
  /**
1867
1868
  * Animation
1868
1869
  * @see https://tailwindcss.com/docs/animation
1869
1870
  */
1870
1871
  animate: [{
1871
- animate: ["none", "spin", "ping", "pulse", "bounce", T]
1872
+ animate: ["none", "spin", "ping", "pulse", "bounce", N]
1872
1873
  }],
1873
1874
  // Transforms
1874
1875
  /**
@@ -1883,42 +1884,42 @@ const V = (e) => {
1883
1884
  * @see https://tailwindcss.com/docs/scale
1884
1885
  */
1885
1886
  scale: [{
1886
- scale: [m]
1887
+ scale: [p]
1887
1888
  }],
1888
1889
  /**
1889
1890
  * Scale X
1890
1891
  * @see https://tailwindcss.com/docs/scale
1891
1892
  */
1892
1893
  "scale-x": [{
1893
- "scale-x": [m]
1894
+ "scale-x": [p]
1894
1895
  }],
1895
1896
  /**
1896
1897
  * Scale Y
1897
1898
  * @see https://tailwindcss.com/docs/scale
1898
1899
  */
1899
1900
  "scale-y": [{
1900
- "scale-y": [m]
1901
+ "scale-y": [p]
1901
1902
  }],
1902
1903
  /**
1903
1904
  * Rotate
1904
1905
  * @see https://tailwindcss.com/docs/rotate
1905
1906
  */
1906
1907
  rotate: [{
1907
- rotate: [de, T]
1908
+ rotate: [he, N]
1908
1909
  }],
1909
1910
  /**
1910
1911
  * Translate X
1911
1912
  * @see https://tailwindcss.com/docs/translate
1912
1913
  */
1913
1914
  "translate-x": [{
1914
- "translate-x": [N]
1915
+ "translate-x": [z]
1915
1916
  }],
1916
1917
  /**
1917
1918
  * Translate Y
1918
1919
  * @see https://tailwindcss.com/docs/translate
1919
1920
  */
1920
1921
  "translate-y": [{
1921
- "translate-y": [N]
1922
+ "translate-y": [z]
1922
1923
  }],
1923
1924
  /**
1924
1925
  * Skew X
@@ -1939,7 +1940,7 @@ const V = (e) => {
1939
1940
  * @see https://tailwindcss.com/docs/transform-origin
1940
1941
  */
1941
1942
  "transform-origin": [{
1942
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", T]
1943
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", N]
1943
1944
  }],
1944
1945
  // Interactivity
1945
1946
  /**
@@ -1961,7 +1962,7 @@ const V = (e) => {
1961
1962
  * @see https://tailwindcss.com/docs/cursor
1962
1963
  */
1963
1964
  cursor: [{
1964
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", T]
1965
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", N]
1965
1966
  }],
1966
1967
  /**
1967
1968
  * Caret Color
@@ -1996,126 +1997,126 @@ const V = (e) => {
1996
1997
  * @see https://tailwindcss.com/docs/scroll-margin
1997
1998
  */
1998
1999
  "scroll-m": [{
1999
- "scroll-m": w()
2000
+ "scroll-m": h()
2000
2001
  }],
2001
2002
  /**
2002
2003
  * Scroll Margin X
2003
2004
  * @see https://tailwindcss.com/docs/scroll-margin
2004
2005
  */
2005
2006
  "scroll-mx": [{
2006
- "scroll-mx": w()
2007
+ "scroll-mx": h()
2007
2008
  }],
2008
2009
  /**
2009
2010
  * Scroll Margin Y
2010
2011
  * @see https://tailwindcss.com/docs/scroll-margin
2011
2012
  */
2012
2013
  "scroll-my": [{
2013
- "scroll-my": w()
2014
+ "scroll-my": h()
2014
2015
  }],
2015
2016
  /**
2016
2017
  * Scroll Margin Start
2017
2018
  * @see https://tailwindcss.com/docs/scroll-margin
2018
2019
  */
2019
2020
  "scroll-ms": [{
2020
- "scroll-ms": w()
2021
+ "scroll-ms": h()
2021
2022
  }],
2022
2023
  /**
2023
2024
  * Scroll Margin End
2024
2025
  * @see https://tailwindcss.com/docs/scroll-margin
2025
2026
  */
2026
2027
  "scroll-me": [{
2027
- "scroll-me": w()
2028
+ "scroll-me": h()
2028
2029
  }],
2029
2030
  /**
2030
2031
  * Scroll Margin Top
2031
2032
  * @see https://tailwindcss.com/docs/scroll-margin
2032
2033
  */
2033
2034
  "scroll-mt": [{
2034
- "scroll-mt": w()
2035
+ "scroll-mt": h()
2035
2036
  }],
2036
2037
  /**
2037
2038
  * Scroll Margin Right
2038
2039
  * @see https://tailwindcss.com/docs/scroll-margin
2039
2040
  */
2040
2041
  "scroll-mr": [{
2041
- "scroll-mr": w()
2042
+ "scroll-mr": h()
2042
2043
  }],
2043
2044
  /**
2044
2045
  * Scroll Margin Bottom
2045
2046
  * @see https://tailwindcss.com/docs/scroll-margin
2046
2047
  */
2047
2048
  "scroll-mb": [{
2048
- "scroll-mb": w()
2049
+ "scroll-mb": h()
2049
2050
  }],
2050
2051
  /**
2051
2052
  * Scroll Margin Left
2052
2053
  * @see https://tailwindcss.com/docs/scroll-margin
2053
2054
  */
2054
2055
  "scroll-ml": [{
2055
- "scroll-ml": w()
2056
+ "scroll-ml": h()
2056
2057
  }],
2057
2058
  /**
2058
2059
  * Scroll Padding
2059
2060
  * @see https://tailwindcss.com/docs/scroll-padding
2060
2061
  */
2061
2062
  "scroll-p": [{
2062
- "scroll-p": w()
2063
+ "scroll-p": h()
2063
2064
  }],
2064
2065
  /**
2065
2066
  * Scroll Padding X
2066
2067
  * @see https://tailwindcss.com/docs/scroll-padding
2067
2068
  */
2068
2069
  "scroll-px": [{
2069
- "scroll-px": w()
2070
+ "scroll-px": h()
2070
2071
  }],
2071
2072
  /**
2072
2073
  * Scroll Padding Y
2073
2074
  * @see https://tailwindcss.com/docs/scroll-padding
2074
2075
  */
2075
2076
  "scroll-py": [{
2076
- "scroll-py": w()
2077
+ "scroll-py": h()
2077
2078
  }],
2078
2079
  /**
2079
2080
  * Scroll Padding Start
2080
2081
  * @see https://tailwindcss.com/docs/scroll-padding
2081
2082
  */
2082
2083
  "scroll-ps": [{
2083
- "scroll-ps": w()
2084
+ "scroll-ps": h()
2084
2085
  }],
2085
2086
  /**
2086
2087
  * Scroll Padding End
2087
2088
  * @see https://tailwindcss.com/docs/scroll-padding
2088
2089
  */
2089
2090
  "scroll-pe": [{
2090
- "scroll-pe": w()
2091
+ "scroll-pe": h()
2091
2092
  }],
2092
2093
  /**
2093
2094
  * Scroll Padding Top
2094
2095
  * @see https://tailwindcss.com/docs/scroll-padding
2095
2096
  */
2096
2097
  "scroll-pt": [{
2097
- "scroll-pt": w()
2098
+ "scroll-pt": h()
2098
2099
  }],
2099
2100
  /**
2100
2101
  * Scroll Padding Right
2101
2102
  * @see https://tailwindcss.com/docs/scroll-padding
2102
2103
  */
2103
2104
  "scroll-pr": [{
2104
- "scroll-pr": w()
2105
+ "scroll-pr": h()
2105
2106
  }],
2106
2107
  /**
2107
2108
  * Scroll Padding Bottom
2108
2109
  * @see https://tailwindcss.com/docs/scroll-padding
2109
2110
  */
2110
2111
  "scroll-pb": [{
2111
- "scroll-pb": w()
2112
+ "scroll-pb": h()
2112
2113
  }],
2113
2114
  /**
2114
2115
  * Scroll Padding Left
2115
2116
  * @see https://tailwindcss.com/docs/scroll-padding
2116
2117
  */
2117
2118
  "scroll-pl": [{
2118
- "scroll-pl": w()
2119
+ "scroll-pl": h()
2119
2120
  }],
2120
2121
  /**
2121
2122
  * Scroll Snap Align
@@ -2183,7 +2184,7 @@ const V = (e) => {
2183
2184
  * @see https://tailwindcss.com/docs/will-change
2184
2185
  */
2185
2186
  "will-change": [{
2186
- "will-change": ["auto", "scroll", "contents", "transform", T]
2187
+ "will-change": ["auto", "scroll", "contents", "transform", N]
2187
2188
  }],
2188
2189
  // SVG
2189
2190
  /**
@@ -2198,7 +2199,7 @@ const V = (e) => {
2198
2199
  * @see https://tailwindcss.com/docs/stroke-width
2199
2200
  */
2200
2201
  "stroke-w": [{
2201
- stroke: [X, K, Le]
2202
+ stroke: [Z, ee, Ee]
2202
2203
  }],
2203
2204
  /**
2204
2205
  * Stroke
@@ -2273,21 +2274,21 @@ const V = (e) => {
2273
2274
  "font-size": ["leading"]
2274
2275
  }
2275
2276
  };
2276
- }, Qi = /* @__PURE__ */ Vi(Ji);
2277
- function _(...e) {
2278
- return Qi(ct(e));
2277
+ }, on = /* @__PURE__ */ Pi(nn);
2278
+ function V(...e) {
2279
+ return on(ft(e));
2279
2280
  }
2280
- let Ee;
2281
- function Re() {
2282
- return Ee === void 0 && (Ee = navigator.platform.includes("Mac")), Ee;
2281
+ let Re;
2282
+ function Ve() {
2283
+ return Re === void 0 && (Re = navigator.platform.includes("Mac")), Re;
2283
2284
  }
2284
- function en(e) {
2285
- return `${e}`.toLowerCase() === "mod" ? Re() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Re() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Re() ? "⇧" : "Shift" : e;
2285
+ function an(e) {
2286
+ return `${e}`.toLowerCase() === "mod" ? Ve() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Ve() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Ve() ? "⇧" : "Shift" : e;
2286
2287
  }
2287
- function tn(e) {
2288
- return e.map(en).join(" ");
2288
+ function sn(e) {
2289
+ return e.map(an).join(" ");
2289
2290
  }
2290
- const wt = Q.forwardRef(
2291
+ const Nt = q.forwardRef(
2291
2292
  (e, t) => {
2292
2293
  const {
2293
2294
  icon: r = void 0,
@@ -2299,46 +2300,46 @@ const wt = Q.forwardRef(
2299
2300
  loading: l = void 0,
2300
2301
  shortcutKeys: s = void 0,
2301
2302
  tooltipOptions: c = {},
2302
- action: d = void 0,
2303
- isActive: g = void 0,
2304
- children: p,
2305
- asChild: u = !1,
2306
- upload: k = !1,
2307
- initialDisplayedColor: b = void 0,
2308
- dataState: z = !1,
2309
- ...f
2310
- } = e, x = yt[r], h = u ? ht : Ct, S = (m) => {
2303
+ action: u = void 0,
2304
+ isActive: f = void 0,
2305
+ children: b,
2306
+ asChild: d = !1,
2307
+ upload: w = !1,
2308
+ initialDisplayedColor: m = void 0,
2309
+ dataState: M = !1,
2310
+ ...g
2311
+ } = e, y = St[r], x = d ? ht : zt, L = (p) => {
2311
2312
  if (o) {
2312
- m.preventDefault();
2313
+ p.preventDefault();
2313
2314
  return;
2314
2315
  }
2315
- d == null || d(m);
2316
+ u == null || u(p);
2316
2317
  };
2317
- return /* @__PURE__ */ C(An, { children: [
2318
- /* @__PURE__ */ n(Ln, { asChild: !0, children: /* @__PURE__ */ C(
2319
- h,
2318
+ return /* @__PURE__ */ C(Hn, { children: [
2319
+ /* @__PURE__ */ n(On, { asChild: !0, children: /* @__PURE__ */ C(
2320
+ x,
2320
2321
  {
2321
- className: _("richtext-h-[32px] richtext-w-[32px]", a),
2322
- "data-state": z ? "on" : "off",
2322
+ className: V("richtext-h-[32px] richtext-w-[32px]", a),
2323
+ "data-state": M ? "on" : "off",
2323
2324
  disabled: o,
2324
- onClick: S,
2325
+ onClick: L,
2325
2326
  ref: t,
2326
2327
  size: "sm",
2327
- ...f,
2328
+ ...g,
2328
2329
  children: [
2329
- x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
2330
- p
2330
+ y && /* @__PURE__ */ n(y, { className: "richtext-size-4" }),
2331
+ b
2331
2332
  ]
2332
2333
  }
2333
2334
  ) }),
2334
- i && /* @__PURE__ */ n(kt, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2335
+ i && /* @__PURE__ */ n(Tt, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2335
2336
  /* @__PURE__ */ n("div", { children: i }),
2336
- !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: tn(s) })
2337
+ !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: sn(s) })
2337
2338
  ] }) })
2338
2339
  ] });
2339
2340
  }
2340
2341
  );
2341
- function rn(e) {
2342
+ function ln(e) {
2342
2343
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2343
2344
  "path",
2344
2345
  {
@@ -2347,7 +2348,7 @@ function rn(e) {
2347
2348
  }
2348
2349
  ) });
2349
2350
  }
2350
- function nn(e) {
2351
+ function cn(e) {
2351
2352
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2352
2353
  "path",
2353
2354
  {
@@ -2360,7 +2361,7 @@ function nn(e) {
2360
2361
  }
2361
2362
  ) });
2362
2363
  }
2363
- function on() {
2364
+ function dn() {
2364
2365
  return /* @__PURE__ */ n(
2365
2366
  "svg",
2366
2367
  {
@@ -2387,7 +2388,7 @@ function on() {
2387
2388
  }
2388
2389
  );
2389
2390
  }
2390
- function an() {
2391
+ function un() {
2391
2392
  return /* @__PURE__ */ n(
2392
2393
  "svg",
2393
2394
  {
@@ -2414,7 +2415,7 @@ function an() {
2414
2415
  }
2415
2416
  );
2416
2417
  }
2417
- function sn(e) {
2418
+ function hn(e) {
2418
2419
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2419
2420
  "path",
2420
2421
  {
@@ -2423,8 +2424,8 @@ function sn(e) {
2423
2424
  }
2424
2425
  ) });
2425
2426
  }
2426
- function fe(e) {
2427
- const t = yt[e.name];
2427
+ function ge(e) {
2428
+ const t = St[e.name];
2428
2429
  return t ? /* @__PURE__ */ n(
2429
2430
  t,
2430
2431
  {
@@ -2433,7 +2434,7 @@ function fe(e) {
2433
2434
  }
2434
2435
  ) : null;
2435
2436
  }
2436
- function ln(e) {
2437
+ function fn(e) {
2437
2438
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2438
2439
  "path",
2439
2440
  {
@@ -2442,7 +2443,7 @@ function ln(e) {
2442
2443
  }
2443
2444
  ) });
2444
2445
  }
2445
- function cn(e) {
2446
+ function mn(e) {
2446
2447
  return /* @__PURE__ */ n(
2447
2448
  "svg",
2448
2449
  {
@@ -2467,10 +2468,10 @@ function cn(e) {
2467
2468
  }
2468
2469
  );
2469
2470
  }
2470
- function dn(e) {
2471
+ function gn(e) {
2471
2472
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
2472
2473
  }
2473
- function un(e) {
2474
+ function pn(e) {
2474
2475
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2475
2476
  "path",
2476
2477
  {
@@ -2479,7 +2480,7 @@ function un(e) {
2479
2480
  }
2480
2481
  ) });
2481
2482
  }
2482
- function hn(e) {
2483
+ function xn(e) {
2483
2484
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2484
2485
  "path",
2485
2486
  {
@@ -2488,7 +2489,7 @@ function hn(e) {
2488
2489
  }
2489
2490
  ) });
2490
2491
  }
2491
- function fn() {
2492
+ function bn() {
2492
2493
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2493
2494
  "path",
2494
2495
  {
@@ -2497,7 +2498,7 @@ function fn() {
2497
2498
  }
2498
2499
  ) });
2499
2500
  }
2500
- function mn() {
2501
+ function vn() {
2501
2502
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2502
2503
  "path",
2503
2504
  {
@@ -2510,7 +2511,7 @@ function mn() {
2510
2511
  }
2511
2512
  ) });
2512
2513
  }
2513
- function gn() {
2514
+ function wn() {
2514
2515
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2515
2516
  "path",
2516
2517
  {
@@ -2523,7 +2524,7 @@ function gn() {
2523
2524
  }
2524
2525
  ) });
2525
2526
  }
2526
- function pn() {
2527
+ function yn() {
2527
2528
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2528
2529
  "path",
2529
2530
  {
@@ -2536,7 +2537,7 @@ function pn() {
2536
2537
  }
2537
2538
  ) });
2538
2539
  }
2539
- function xn() {
2540
+ function Cn() {
2540
2541
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2541
2542
  "path",
2542
2543
  {
@@ -2545,7 +2546,7 @@ function xn() {
2545
2546
  }
2546
2547
  ) });
2547
2548
  }
2548
- function bn() {
2549
+ function kn() {
2549
2550
  return /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2550
2551
  /* @__PURE__ */ n(
2551
2552
  "path",
@@ -2563,7 +2564,7 @@ function bn() {
2563
2564
  )
2564
2565
  ] });
2565
2566
  }
2566
- function vn() {
2567
+ function Mn() {
2567
2568
  return /* @__PURE__ */ C(
2568
2569
  "svg",
2569
2570
  {
@@ -2591,7 +2592,7 @@ function vn() {
2591
2592
  }
2592
2593
  );
2593
2594
  }
2594
- function wn() {
2595
+ function Nn() {
2595
2596
  return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
2596
2597
  "path",
2597
2598
  {
@@ -2600,7 +2601,7 @@ function wn() {
2600
2601
  }
2601
2602
  ) });
2602
2603
  }
2603
- function yn() {
2604
+ function Sn() {
2604
2605
  return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
2605
2606
  "g",
2606
2607
  {
@@ -2616,7 +2617,7 @@ function yn() {
2616
2617
  }
2617
2618
  ) });
2618
2619
  }
2619
- function Cn() {
2620
+ function zn() {
2620
2621
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2621
2622
  "path",
2622
2623
  {
@@ -2625,7 +2626,7 @@ function Cn() {
2625
2626
  }
2626
2627
  ) });
2627
2628
  }
2628
- function kn() {
2629
+ function Tn() {
2629
2630
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ C("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
2630
2631
  /* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
2631
2632
  /* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
@@ -2634,7 +2635,7 @@ function kn() {
2634
2635
  /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
2635
2636
  ] }) });
2636
2637
  }
2637
- function Mn() {
2638
+ function In() {
2638
2639
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2639
2640
  "path",
2640
2641
  {
@@ -2643,7 +2644,7 @@ function Mn() {
2643
2644
  }
2644
2645
  ) });
2645
2646
  }
2646
- function zn() {
2647
+ function Ln() {
2647
2648
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2648
2649
  "path",
2649
2650
  {
@@ -2657,7 +2658,7 @@ function zn() {
2657
2658
  }
2658
2659
  ) });
2659
2660
  }
2660
- function Tn() {
2661
+ function An() {
2661
2662
  return /* @__PURE__ */ n(
2662
2663
  "svg",
2663
2664
  {
@@ -2678,144 +2679,144 @@ function Tn() {
2678
2679
  }
2679
2680
  );
2680
2681
  }
2681
- const yt = {
2682
- Bold: si,
2683
- LoaderCircle: ai,
2684
- Italic: oi,
2685
- Underline: ni,
2686
- Quote: ii,
2687
- TextQuote: nn,
2688
- Strikethrough: ri,
2689
- Minus: ti,
2690
- Eraser: ei,
2691
- PaintRoller: Qr,
2692
- Redo2: Jr,
2693
- Undo2: Kr,
2694
- AlignCenter: wi,
2695
- AlignJustify: vi,
2696
- AlignLeft: bi,
2697
- AlignRight: xi,
2698
- ChevronDown: Zr,
2699
- Subscript: qr,
2700
- Superscript: Yr,
2701
- Code: Xr,
2702
- Code2: Gr,
2703
- Type: Wr,
2704
- IndentIncrease: Fr,
2705
- IndentDecrease: $r,
2706
- List: Br,
2707
- ListOrdered: Ur,
2708
- ListTodo: _r,
2709
- Link: jr,
2710
- ImageUp: Pr,
2711
- Video: Or,
2712
- Maximize: Hr,
2713
- Minimize: Dr,
2714
- Table: Vr,
2715
- Sparkles: Rr,
2716
- Pencil: Er,
2717
- Unlink: Lr,
2718
- BetweenHorizonalEnd: Ar,
2719
- BetweenHorizonalStart: Nr,
2720
- BetweenVerticalStart: Sr,
2721
- BetweenVerticalEnd: Ir,
2722
- TableCellsMerge: Tr,
2723
- TableCellsSplit: zr,
2724
- Trash2: Mr,
2725
- Trash: kr,
2726
- Replace: qe,
2727
- ChevronsUpDown: Cr,
2728
- LineHeight: ln,
2729
- Word: sn,
2730
- HeadingParagraph: yr,
2731
- Heading1: wr,
2732
- Heading2: vr,
2733
- Heading3: br,
2734
- Heading4: xr,
2735
- Heading5: pr,
2736
- Heading6: gr,
2737
- Columns2: Ze,
2738
- Columns3: mr,
2739
- Columns4: fr,
2740
- Plus: hr,
2741
- Grip: ur,
2742
- Copy: dr,
2743
- Clipboard: cr,
2744
- PanelLeft: lr,
2745
- PanelRight: sr,
2746
- Columns: Ze,
2747
- Iframe: ar,
2748
- MenuDown: cn,
2749
- SizeS: hn,
2750
- SizeM: un,
2751
- SizeL: dn,
2752
- AspectRatio: rn,
2753
- Emoji: or,
2754
- DeleteColumn: on,
2755
- DeleteRow: an,
2756
- SearchAndReplace: qe,
2757
- EmojiIcon: nr,
2758
- KatexIcon: ir,
2759
- ExportPdf: bn,
2760
- ExportWord: vn,
2761
- ImportWord: Tn,
2762
- ColumnAddLeft: mn,
2763
- ColumnAddRight: gn,
2764
- BookMarked: rr,
2765
- Excalidraw: xn,
2766
- ZoomIn: tr,
2767
- ZoomOut: er,
2768
- Settings: Qt,
2769
- Eye: Jt,
2770
- TextDirection: pn,
2771
- LeftToRight: Cn,
2772
- RightToLeft: Mn,
2773
- Attachment: Kt,
2774
- GifIcon: wn,
2775
- ChevronUp: Zt,
2776
- Crop: qt,
2777
- Mermaid: kn,
2778
- Twitter: zn,
2779
- CodeView: fn,
2780
- FlipX: Yt,
2781
- FlipY: Xt,
2782
- PencilRuler: Gt,
2783
- WrapText: Wt,
2784
- Loader: Ft,
2785
- X: lt,
2786
- Html: yn,
2787
- ExternalLink: $t,
2788
- Callout: Bt
2789
- }, tt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, rt = ct, Ue = (e, t) => (r) => {
2682
+ const St = {
2683
+ Bold: xi,
2684
+ LoaderCircle: pi,
2685
+ Italic: gi,
2686
+ Underline: mi,
2687
+ Quote: fi,
2688
+ TextQuote: cn,
2689
+ Strikethrough: hi,
2690
+ Minus: ui,
2691
+ Eraser: di,
2692
+ PaintRoller: ci,
2693
+ Redo2: li,
2694
+ Undo2: si,
2695
+ AlignCenter: Ni,
2696
+ AlignJustify: Mi,
2697
+ AlignLeft: ki,
2698
+ AlignRight: Ci,
2699
+ ChevronDown: $e,
2700
+ Subscript: ai,
2701
+ Superscript: oi,
2702
+ Code: ni,
2703
+ Code2: ii,
2704
+ Type: ri,
2705
+ IndentIncrease: ti,
2706
+ IndentDecrease: ei,
2707
+ List: Qr,
2708
+ ListOrdered: Jr,
2709
+ ListTodo: Kr,
2710
+ Link: Zr,
2711
+ ImageUp: qr,
2712
+ Video: Yr,
2713
+ Maximize: Xr,
2714
+ Minimize: Gr,
2715
+ Table: Wr,
2716
+ Sparkles: Fr,
2717
+ Pencil: $r,
2718
+ Unlink: Br,
2719
+ BetweenHorizonalEnd: Ur,
2720
+ BetweenHorizonalStart: _r,
2721
+ BetweenVerticalStart: Pr,
2722
+ BetweenVerticalEnd: jr,
2723
+ TableCellsMerge: Or,
2724
+ TableCellsSplit: Hr,
2725
+ Trash2: Dr,
2726
+ Trash: Vr,
2727
+ Replace: Qe,
2728
+ ChevronsUpDown: Rr,
2729
+ LineHeight: fn,
2730
+ Word: hn,
2731
+ HeadingParagraph: Er,
2732
+ Heading1: Ar,
2733
+ Heading2: Lr,
2734
+ Heading3: Ir,
2735
+ Heading4: Tr,
2736
+ Heading5: zr,
2737
+ Heading6: Sr,
2738
+ Columns2: et,
2739
+ Columns3: Nr,
2740
+ Columns4: Mr,
2741
+ Plus: kr,
2742
+ Grip: Cr,
2743
+ Copy: yr,
2744
+ Clipboard: wr,
2745
+ PanelLeft: vr,
2746
+ PanelRight: br,
2747
+ Columns: et,
2748
+ Iframe: xr,
2749
+ MenuDown: mn,
2750
+ SizeS: xn,
2751
+ SizeM: pn,
2752
+ SizeL: gn,
2753
+ AspectRatio: ln,
2754
+ Emoji: pr,
2755
+ DeleteColumn: dn,
2756
+ DeleteRow: un,
2757
+ SearchAndReplace: Qe,
2758
+ EmojiIcon: gr,
2759
+ KatexIcon: mr,
2760
+ ExportPdf: kn,
2761
+ ExportWord: Mn,
2762
+ ImportWord: An,
2763
+ ColumnAddLeft: vn,
2764
+ ColumnAddRight: wn,
2765
+ BookMarked: fr,
2766
+ Excalidraw: Cn,
2767
+ ZoomIn: hr,
2768
+ ZoomOut: ur,
2769
+ Settings: dr,
2770
+ Eye: cr,
2771
+ TextDirection: yn,
2772
+ LeftToRight: zn,
2773
+ RightToLeft: In,
2774
+ Attachment: lr,
2775
+ GifIcon: Nn,
2776
+ ChevronUp: gt,
2777
+ Crop: sr,
2778
+ Mermaid: Tn,
2779
+ Twitter: Ln,
2780
+ CodeView: bn,
2781
+ FlipX: ar,
2782
+ FlipY: or,
2783
+ PencilRuler: nr,
2784
+ WrapText: ir,
2785
+ Loader: rr,
2786
+ X: mt,
2787
+ Html: Sn,
2788
+ ExternalLink: tr,
2789
+ Callout: er
2790
+ }, ot = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, at = ft, We = (e, t) => (r) => {
2790
2791
  var i;
2791
- if ((t == null ? void 0 : t.variants) == null) return rt(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2792
- const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
2793
- const g = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
2794
- if (g === null) return null;
2795
- const u = tt(g) || tt(p);
2796
- return o[d][u];
2797
- }), s = r && Object.entries(r).reduce((d, g) => {
2798
- let [p, u] = g;
2799
- return u === void 0 || (d[p] = u), d;
2800
- }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, g) => {
2801
- let { class: p, className: u, ...k } = g;
2802
- return Object.entries(k).every((b) => {
2803
- let [z, f] = b;
2804
- return Array.isArray(f) ? f.includes({
2792
+ if ((t == null ? void 0 : t.variants) == null) return at(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2793
+ const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((u) => {
2794
+ const f = r == null ? void 0 : r[u], b = a == null ? void 0 : a[u];
2795
+ if (f === null) return null;
2796
+ const d = ot(f) || ot(b);
2797
+ return o[u][d];
2798
+ }), s = r && Object.entries(r).reduce((u, f) => {
2799
+ let [b, d] = f;
2800
+ return d === void 0 || (u[b] = d), u;
2801
+ }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((u, f) => {
2802
+ let { class: b, className: d, ...w } = f;
2803
+ return Object.entries(w).every((m) => {
2804
+ let [M, g] = m;
2805
+ return Array.isArray(g) ? g.includes({
2805
2806
  ...a,
2806
2807
  ...s
2807
- }[z]) : {
2808
+ }[M]) : {
2808
2809
  ...a,
2809
2810
  ...s
2810
- }[z] === f;
2811
+ }[M] === g;
2811
2812
  }) ? [
2812
- ...d,
2813
- p,
2814
- u
2815
- ] : d;
2813
+ ...u,
2814
+ b,
2815
+ d
2816
+ ] : u;
2816
2817
  }, []);
2817
- return rt(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2818
- }, In = Ue(
2818
+ return at(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2819
+ }, En = We(
2819
2820
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
2820
2821
  {
2821
2822
  variants: {
@@ -2839,17 +2840,17 @@ const yt = {
2839
2840
  size: "default"
2840
2841
  }
2841
2842
  }
2842
- ), $ = U.forwardRef(
2843
- ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ht : "button", { className: _(In({ variant: t, size: r, className: e })), ref: a, ...o })
2843
+ ), G = O.forwardRef(
2844
+ ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ht : "button", { className: V(En({ variant: t, size: r, className: e })), ref: a, ...o })
2844
2845
  );
2845
- $.displayName = "Button";
2846
- const te = U.forwardRef(
2846
+ G.displayName = "Button";
2847
+ const ie = O.forwardRef(
2847
2848
  ({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
2848
2849
  "input",
2849
2850
  {
2850
2851
  ref: i,
2851
2852
  type: t,
2852
- className: _(
2853
+ className: V(
2853
2854
  "richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
2854
2855
  e
2855
2856
  ),
@@ -2857,48 +2858,62 @@ const te = U.forwardRef(
2857
2858
  }
2858
2859
  )
2859
2860
  );
2860
- te.displayName = "Input";
2861
- const Sn = Ue(
2861
+ ie.displayName = "Input";
2862
+ const Rn = We(
2862
2863
  "richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
2863
- ), pe = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(mt.Root, { className: _(Sn(), e), ref: r, ...t }));
2864
- pe.displayName = mt.Root.displayName;
2865
- const Ne = re.Root, ve = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2866
- re.List,
2864
+ ), be = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(vt.Root, { className: V(Rn(), e), ref: r, ...t }));
2865
+ be.displayName = vt.Root.displayName;
2866
+ const Le = ne.Root, ye = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2867
+ ne.List,
2867
2868
  {
2868
2869
  ref: r,
2869
- className: _(
2870
+ className: V(
2870
2871
  "richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",
2871
2872
  e
2872
2873
  ),
2873
2874
  ...t
2874
2875
  }
2875
2876
  ));
2876
- ve.displayName = re.List.displayName;
2877
- const q = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2878
- re.Trigger,
2877
+ ye.displayName = ne.List.displayName;
2878
+ const J = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2879
+ ne.Trigger,
2879
2880
  {
2880
2881
  ref: r,
2881
- className: _(
2882
+ className: V(
2882
2883
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",
2883
2884
  e
2884
2885
  ),
2885
2886
  ...t
2886
2887
  }
2887
2888
  ));
2888
- q.displayName = re.Trigger.displayName;
2889
- const Z = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2890
- re.Content,
2889
+ J.displayName = ne.Trigger.displayName;
2890
+ const Q = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2891
+ ne.Content,
2891
2892
  {
2892
2893
  ref: r,
2893
- className: _(
2894
+ className: V(
2894
2895
  "richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",
2895
2896
  e
2896
2897
  ),
2897
2898
  ...t
2898
2899
  }
2899
2900
  ));
2900
- Z.displayName = re.Content.displayName;
2901
- const Nn = Ue(
2901
+ Q.displayName = ne.Content.displayName;
2902
+ const Vn = O.forwardRef(
2903
+ ({ className: e, ...t }, r) => /* @__PURE__ */ n(
2904
+ "textarea",
2905
+ {
2906
+ ref: r,
2907
+ className: V(
2908
+ "richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
2909
+ e
2910
+ ),
2911
+ ...t
2912
+ }
2913
+ )
2914
+ );
2915
+ Vn.displayName = "Textarea";
2916
+ const Dn = We(
2902
2917
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
2903
2918
  {
2904
2919
  variants: {
@@ -2917,52 +2932,160 @@ const Nn = Ue(
2917
2932
  size: "default"
2918
2933
  }
2919
2934
  }
2920
- ), Ct = U.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2921
- ft.Root,
2935
+ ), zt = O.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2936
+ bt.Root,
2922
2937
  {
2923
2938
  ref: o,
2924
- className: _(Nn({ variant: t, size: r, className: e })),
2939
+ className: V(Dn({ variant: t, size: r, className: e })),
2925
2940
  ...i
2926
2941
  }
2927
2942
  ));
2928
- Ct.displayName = ft.Root.displayName;
2929
- const Fo = be.Provider, An = be.Root, Ln = be.Trigger, kt = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2930
- be.Content,
2943
+ zt.displayName = bt.Root.displayName;
2944
+ const ra = we.Provider, Hn = we.Root, On = we.Trigger, Tt = O.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2945
+ we.Content,
2931
2946
  {
2932
2947
  "data-richtext-portal": !0,
2933
2948
  ref: i,
2934
2949
  sideOffset: t,
2935
- className: _(
2950
+ className: V(
2936
2951
  "richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
2937
2952
  e
2938
2953
  ),
2939
2954
  ...r
2940
2955
  }
2941
2956
  ));
2942
- kt.displayName = be.Content.displayName;
2943
- const En = 1, Rn = 1e6;
2944
- let Ve = 0;
2945
- function Vn() {
2946
- return Ve = (Ve + 1) % Number.MAX_SAFE_INTEGER, Ve.toString();
2957
+ Tt.displayName = we.Content.displayName;
2958
+ const ia = B.Root, na = B.Value, jn = O.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(
2959
+ B.Trigger,
2960
+ {
2961
+ ref: i,
2962
+ className: V(
2963
+ "richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",
2964
+ e
2965
+ ),
2966
+ ...r,
2967
+ children: [
2968
+ t,
2969
+ /* @__PURE__ */ n(B.Icon, { asChild: !0, children: /* @__PURE__ */ n($e, { className: "richtext-size-4 richtext-opacity-50" }) })
2970
+ ]
2971
+ }
2972
+ ));
2973
+ jn.displayName = B.Trigger.displayName;
2974
+ const It = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2975
+ B.ScrollUpButton,
2976
+ {
2977
+ ref: r,
2978
+ className: V(
2979
+ "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
2980
+ e
2981
+ ),
2982
+ ...t,
2983
+ children: /* @__PURE__ */ n(gt, { className: "richtext-size-4" })
2984
+ }
2985
+ ));
2986
+ It.displayName = B.ScrollUpButton.displayName;
2987
+ const Lt = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2988
+ B.ScrollDownButton,
2989
+ {
2990
+ ref: r,
2991
+ className: V(
2992
+ "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
2993
+ e
2994
+ ),
2995
+ ...t,
2996
+ children: /* @__PURE__ */ n($e, { className: "richtext-size-4" })
2997
+ }
2998
+ ));
2999
+ Lt.displayName = B.ScrollDownButton.displayName;
3000
+ const Pn = O.forwardRef(({ className: e, children: t, position: r = "popper", ...i }, o) => /* @__PURE__ */ n(B.Portal, { children: /* @__PURE__ */ C(
3001
+ B.Content,
3002
+ {
3003
+ "data-richtext-portal": !0,
3004
+ position: r,
3005
+ ref: o,
3006
+ className: V(
3007
+ "richtext-relative richtext-z-50 richtext-max-h-60 richtext-min-w-[8rem] richtext-overflow-hidden richtext-overflow-y-auto richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
3008
+ r === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
3009
+ e
3010
+ ),
3011
+ ...i,
3012
+ children: [
3013
+ /* @__PURE__ */ n(It, {}),
3014
+ /* @__PURE__ */ n(
3015
+ B.Viewport,
3016
+ {
3017
+ className: V(
3018
+ "richtext-p-1",
3019
+ r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
3020
+ ),
3021
+ children: t
3022
+ }
3023
+ ),
3024
+ /* @__PURE__ */ n(Lt, {})
3025
+ ]
3026
+ }
3027
+ ) }));
3028
+ Pn.displayName = B.Content.displayName;
3029
+ const _n = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3030
+ B.Label,
3031
+ {
3032
+ className: V(
3033
+ "richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",
3034
+ e
3035
+ ),
3036
+ ref: r,
3037
+ ...t
3038
+ }
3039
+ ));
3040
+ _n.displayName = B.Label.displayName;
3041
+ const Un = O.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(
3042
+ B.Item,
3043
+ {
3044
+ ref: i,
3045
+ className: V(
3046
+ "richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
3047
+ e
3048
+ ),
3049
+ ...r,
3050
+ children: [
3051
+ /* @__PURE__ */ n("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ n(B.ItemIndicator, { children: /* @__PURE__ */ n(pt, { className: "richtext-size-4" }) }) }),
3052
+ /* @__PURE__ */ n(B.ItemText, { children: t })
3053
+ ]
3054
+ }
3055
+ ));
3056
+ Un.displayName = B.Item.displayName;
3057
+ const Bn = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3058
+ B.Separator,
3059
+ {
3060
+ className: V("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
3061
+ ref: r,
3062
+ ...t
3063
+ }
3064
+ ));
3065
+ Bn.displayName = B.Separator.displayName;
3066
+ const $n = 1, Fn = 1e6;
3067
+ let De = 0;
3068
+ function Wn() {
3069
+ return De = (De + 1) % Number.MAX_SAFE_INTEGER, De.toString();
2947
3070
  }
2948
- const De = /* @__PURE__ */ new Map();
2949
- function it(e) {
2950
- if (De.has(e))
3071
+ const He = /* @__PURE__ */ new Map();
3072
+ function st(e) {
3073
+ if (He.has(e))
2951
3074
  return;
2952
3075
  const t = setTimeout(() => {
2953
- De.delete(e), me({
3076
+ He.delete(e), pe({
2954
3077
  type: "REMOVE_TOAST",
2955
3078
  toastId: e
2956
3079
  });
2957
- }, Rn);
2958
- De.set(e, t);
3080
+ }, Fn);
3081
+ He.set(e, t);
2959
3082
  }
2960
- function Dn(e, t) {
3083
+ function Gn(e, t) {
2961
3084
  switch (t.type) {
2962
3085
  case "ADD_TOAST":
2963
3086
  return {
2964
3087
  ...e,
2965
- toasts: [t.toast, ...e.toasts].slice(0, En)
3088
+ toasts: [t.toast, ...e.toasts].slice(0, $n)
2966
3089
  };
2967
3090
  case "UPDATE_TOAST":
2968
3091
  return {
@@ -2971,8 +3094,8 @@ function Dn(e, t) {
2971
3094
  };
2972
3095
  case "DISMISS_TOAST": {
2973
3096
  const { toastId: r } = t;
2974
- return r ? it(r) : e.toasts.forEach((i) => {
2975
- it(i.id);
3097
+ return r ? st(r) : e.toasts.forEach((i) => {
3098
+ st(i.id);
2976
3099
  }), {
2977
3100
  ...e,
2978
3101
  toasts: e.toasts.map(
@@ -2993,19 +3116,19 @@ function Dn(e, t) {
2993
3116
  };
2994
3117
  }
2995
3118
  }
2996
- const ke = [];
2997
- let Me = { toasts: [] };
2998
- function me(e) {
2999
- Me = Dn(Me, e), ke.forEach((t) => {
3000
- t(Me);
3119
+ const Me = [];
3120
+ let Ne = { toasts: [] };
3121
+ function pe(e) {
3122
+ Ne = Gn(Ne, e), Me.forEach((t) => {
3123
+ t(Ne);
3001
3124
  });
3002
3125
  }
3003
- function Hn({ ...e }) {
3004
- const t = Vn(), r = (o) => me({
3126
+ function Xn({ ...e }) {
3127
+ const t = Wn(), r = (o) => pe({
3005
3128
  type: "UPDATE_TOAST",
3006
3129
  toast: { ...o, id: t }
3007
- }), i = () => me({ type: "DISMISS_TOAST", toastId: t });
3008
- return me({
3130
+ }), i = () => pe({ type: "DISMISS_TOAST", toastId: t });
3131
+ return pe({
3009
3132
  type: "ADD_TOAST",
3010
3133
  toast: {
3011
3134
  ...e,
@@ -3021,39 +3144,39 @@ function Hn({ ...e }) {
3021
3144
  update: r
3022
3145
  };
3023
3146
  }
3024
- function Be() {
3025
- const [e, t] = U.useState(Me);
3026
- return U.useEffect(() => (ke.push(t), () => {
3027
- const r = ke.indexOf(t);
3028
- r > -1 && ke.splice(r, 1);
3147
+ function Ge() {
3148
+ const [e, t] = O.useState(Ne);
3149
+ return O.useEffect(() => (Me.push(t), () => {
3150
+ const r = Me.indexOf(t);
3151
+ r > -1 && Me.splice(r, 1);
3029
3152
  }), [e]), {
3030
3153
  ...e,
3031
- toast: Hn,
3032
- dismiss: (r) => me({ type: "DISMISS_TOAST", toastId: r })
3154
+ toast: Xn,
3155
+ dismiss: (r) => pe({ type: "DISMISS_TOAST", toastId: r })
3033
3156
  };
3034
3157
  }
3035
- const $e = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3036
- Oe.Root,
3158
+ const Xe = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3159
+ _e.Root,
3037
3160
  {
3038
3161
  ref: r,
3039
- className: _(
3162
+ className: V(
3040
3163
  "!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
3041
3164
  e
3042
3165
  ),
3043
3166
  ...t,
3044
3167
  children: /* @__PURE__ */ n(
3045
- Oe.Indicator,
3168
+ _e.Indicator,
3046
3169
  {
3047
- className: _(
3170
+ className: V(
3048
3171
  "!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
3049
3172
  ),
3050
- children: /* @__PURE__ */ n(li, { className: "!richtext-h-4 !richtext-w-4" })
3173
+ children: /* @__PURE__ */ n(pt, { className: "!richtext-h-4 !richtext-w-4" })
3051
3174
  }
3052
3175
  )
3053
3176
  }
3054
3177
  ));
3055
- $e.displayName = Oe.Root.displayName;
3056
- function On(e) {
3178
+ Xe.displayName = _e.Root.displayName;
3179
+ function Yn(e) {
3057
3180
  return e = e || /* @__PURE__ */ new Map(), {
3058
3181
  /**
3059
3182
  * A Map of event names to registered handler functions.
@@ -3100,57 +3223,57 @@ function On(e) {
3100
3223
  }
3101
3224
  };
3102
3225
  }
3103
- const Fe = On(), Mt = Q.createContext(Fe), Pn = () => Q.useContext(Mt);
3104
- function zt(e, t) {
3105
- const r = Pn();
3106
- Q.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3226
+ const Ye = Yn(), At = q.createContext(Ye), qn = () => q.useContext(At);
3227
+ function Et(e, t) {
3228
+ const r = qn();
3229
+ q.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3107
3230
  t.map((i) => r.off(i, e));
3108
3231
  }), [r, t, e]);
3109
3232
  }
3110
- const Wo = Fe.emit;
3111
- function Go({ children: e }) {
3112
- return /* @__PURE__ */ n(Mt.Provider, { value: Fe, children: e });
3233
+ const oa = Ye.emit;
3234
+ function aa({ children: e }) {
3235
+ return /* @__PURE__ */ n(At.Provider, { value: Ye, children: e });
3113
3236
  }
3114
- const we = F.Root, We = F.Trigger, jn = F.Portal, Tt = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3115
- F.Overlay,
3237
+ const Ce = X.Root, qe = X.Trigger, Zn = X.Portal, Rt = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3238
+ X.Overlay,
3116
3239
  {
3117
3240
  ref: r,
3118
- className: _(
3241
+ className: V(
3119
3242
  "richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
3120
3243
  e
3121
3244
  ),
3122
3245
  ...t
3123
3246
  }
3124
3247
  ));
3125
- Tt.displayName = F.Overlay.displayName;
3126
- const ae = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(jn, { "data-richtext-portal": !0, children: [
3127
- /* @__PURE__ */ n(Tt, {}),
3248
+ Rt.displayName = X.Overlay.displayName;
3249
+ const le = O.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(Zn, { "data-richtext-portal": !0, children: [
3250
+ /* @__PURE__ */ n(Rt, {}),
3128
3251
  /* @__PURE__ */ C(
3129
- F.Content,
3252
+ X.Content,
3130
3253
  {
3131
3254
  "data-richtext-portal": !0,
3132
3255
  ref: i,
3133
- className: _(
3256
+ className: V(
3134
3257
  "richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
3135
3258
  e
3136
3259
  ),
3137
3260
  ...r,
3138
3261
  children: [
3139
3262
  t,
3140
- /* @__PURE__ */ C(F.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
3141
- /* @__PURE__ */ n(lt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3263
+ /* @__PURE__ */ C(X.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
3264
+ /* @__PURE__ */ n(mt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3142
3265
  /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3143
3266
  ] })
3144
3267
  ]
3145
3268
  }
3146
3269
  )
3147
3270
  ] }));
3148
- ae.displayName = F.Content.displayName;
3149
- function _n({ className: e, ...t }) {
3271
+ le.displayName = X.Content.displayName;
3272
+ function Kn({ className: e, ...t }) {
3150
3273
  return /* @__PURE__ */ n(
3151
3274
  "div",
3152
3275
  {
3153
- className: _(
3276
+ className: V(
3154
3277
  "richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
3155
3278
  e
3156
3279
  ),
@@ -3158,12 +3281,12 @@ function _n({ className: e, ...t }) {
3158
3281
  }
3159
3282
  );
3160
3283
  }
3161
- _n.displayName = "DialogHeader";
3162
- function It({ className: e, ...t }) {
3284
+ Kn.displayName = "DialogHeader";
3285
+ function Vt({ className: e, ...t }) {
3163
3286
  return /* @__PURE__ */ n(
3164
3287
  "div",
3165
3288
  {
3166
- className: _(
3289
+ className: V(
3167
3290
  "richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
3168
3291
  e
3169
3292
  ),
@@ -3171,29 +3294,29 @@ function It({ className: e, ...t }) {
3171
3294
  }
3172
3295
  );
3173
3296
  }
3174
- It.displayName = "DialogFooter";
3175
- const se = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3176
- F.Title,
3297
+ Vt.displayName = "DialogFooter";
3298
+ const ce = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3299
+ X.Title,
3177
3300
  {
3178
3301
  ref: r,
3179
- className: _(
3302
+ className: V(
3180
3303
  "richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
3181
3304
  e
3182
3305
  ),
3183
3306
  ...t
3184
3307
  }
3185
3308
  ));
3186
- se.displayName = F.Title.displayName;
3187
- const Un = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3188
- F.Description,
3309
+ ce.displayName = X.Title.displayName;
3310
+ const Jn = O.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3311
+ X.Description,
3189
3312
  {
3190
- className: _("richtext-text-sm richtext-text-muted-foreground", e),
3313
+ className: V("richtext-text-sm richtext-text-muted-foreground", e),
3191
3314
  ref: r,
3192
3315
  ...t
3193
3316
  }
3194
3317
  ));
3195
- Un.displayName = F.Description.displayName;
3196
- var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.create({
3318
+ Jn.displayName = X.Description.displayName;
3319
+ var Qn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, eo = xt.create({
3197
3320
  name: "image",
3198
3321
  addOptions() {
3199
3322
  return {
@@ -3237,7 +3360,7 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3237
3360
  ];
3238
3361
  },
3239
3362
  renderHTML({ HTMLAttributes: e }) {
3240
- return ["img", ut(this.options.HTMLAttributes, e)];
3363
+ return ["img", Pe(this.options.HTMLAttributes, e)];
3241
3364
  },
3242
3365
  parseMarkdown: (e, t) => t.createNode("image", {
3243
3366
  src: e.href,
@@ -3246,8 +3369,8 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3246
3369
  }),
3247
3370
  renderMarkdown: (e) => {
3248
3371
  var t, r, i, o, a, l;
3249
- const s = (r = (t = e.attrs) == null ? void 0 : t.src) != null ? r : "", c = (o = (i = e.attrs) == null ? void 0 : i.alt) != null ? o : "", d = (l = (a = e.attrs) == null ? void 0 : a.title) != null ? l : "";
3250
- return d ? `![${c}](${s} "${d}")` : `![${c}](${s})`;
3372
+ const s = (r = (t = e.attrs) == null ? void 0 : t.src) != null ? r : "", c = (o = (i = e.attrs) == null ? void 0 : i.alt) != null ? o : "", u = (l = (a = e.attrs) == null ? void 0 : a.title) != null ? l : "";
3373
+ return u ? `![${c}](${s} "${u}")` : `![${c}](${s})`;
3251
3374
  },
3252
3375
  addNodeView() {
3253
3376
  if (!this.options.resize || !this.options.resize.enabled || typeof document > "u")
@@ -3255,33 +3378,35 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3255
3378
  const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
3256
3379
  return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
3257
3380
  const c = document.createElement("img");
3258
- Object.entries(l).forEach(([p, u]) => {
3259
- if (u != null)
3260
- switch (p) {
3381
+ c.draggable = !1;
3382
+ const u = Pe(this.options.HTMLAttributes, l);
3383
+ Object.entries(u).forEach(([d, w]) => {
3384
+ if (w != null)
3385
+ switch (d) {
3261
3386
  case "width":
3262
3387
  case "height":
3263
3388
  break;
3264
3389
  default:
3265
- c.setAttribute(p, u);
3390
+ c.setAttribute(d, w);
3266
3391
  break;
3267
3392
  }
3268
- }), c.src = l.src;
3269
- const d = new mi({
3393
+ }), u.src !== null && (c.src = u.src);
3394
+ const f = new vi({
3270
3395
  element: c,
3271
3396
  editor: s,
3272
3397
  node: o,
3273
3398
  getPos: a,
3274
- onResize: (p, u) => {
3275
- c.style.width = `${p}px`, c.style.height = `${u}px`;
3399
+ onResize: (d, w) => {
3400
+ c.style.width = `${d}px`, c.style.height = `${w}px`;
3276
3401
  },
3277
- onCommit: (p, u) => {
3278
- const k = a();
3279
- k !== void 0 && this.editor.chain().setNodeSelection(k).updateAttributes(this.name, {
3280
- width: p,
3281
- height: u
3402
+ onCommit: (d, w) => {
3403
+ const m = a();
3404
+ m !== void 0 && this.editor.chain().setNodeSelection(m).updateAttributes(this.name, {
3405
+ width: d,
3406
+ height: w
3282
3407
  }).run();
3283
3408
  },
3284
- onUpdate: (p, u, k) => p.type === o.type,
3409
+ onUpdate: (d, w, m) => d.type === o.type,
3285
3410
  options: {
3286
3411
  directions: e,
3287
3412
  min: {
@@ -3290,10 +3415,10 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3290
3415
  },
3291
3416
  preserveAspectRatio: i === !0
3292
3417
  }
3293
- }), g = d.dom;
3294
- return g.style.visibility = "hidden", g.style.pointerEvents = "none", c.onload = () => {
3295
- g.style.visibility = "", g.style.pointerEvents = "";
3296
- }, d;
3418
+ }), b = f.dom;
3419
+ return b.style.visibility = "hidden", b.style.pointerEvents = "none", c.onload = () => {
3420
+ b.style.visibility = "", b.style.pointerEvents = "";
3421
+ }, f;
3297
3422
  };
3298
3423
  },
3299
3424
  addCommands() {
@@ -3306,8 +3431,8 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3306
3431
  },
3307
3432
  addInputRules() {
3308
3433
  return [
3309
- fi({
3310
- find: Bn,
3434
+ bi({
3435
+ find: Qn,
3311
3436
  type: this.type,
3312
3437
  getAttributes: (e) => {
3313
3438
  const [, , t, r, i] = e;
@@ -3316,285 +3441,285 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3316
3441
  })
3317
3442
  ];
3318
3443
  }
3319
- }), Fn = $n, Wn = typeof global == "object" && global && global.Object === Object && global, Gn = typeof self == "object" && self && self.Object === Object && self, St = Wn || Gn || Function("return this")(), Te = St.Symbol, Nt = Object.prototype, Xn = Nt.hasOwnProperty, Yn = Nt.toString, he = Te ? Te.toStringTag : void 0;
3320
- function qn(e) {
3321
- var t = Xn.call(e, he), r = e[he];
3444
+ }), to = eo, ro = typeof global == "object" && global && global.Object === Object && global, io = typeof self == "object" && self && self.Object === Object && self, Dt = ro || io || Function("return this")(), ze = Dt.Symbol, Ht = Object.prototype, no = Ht.hasOwnProperty, oo = Ht.toString, me = ze ? ze.toStringTag : void 0;
3445
+ function ao(e) {
3446
+ var t = no.call(e, me), r = e[me];
3322
3447
  try {
3323
- e[he] = void 0;
3448
+ e[me] = void 0;
3324
3449
  var i = !0;
3325
3450
  } catch {
3326
3451
  }
3327
- var o = Yn.call(e);
3328
- return i && (t ? e[he] = r : delete e[he]), o;
3452
+ var o = oo.call(e);
3453
+ return i && (t ? e[me] = r : delete e[me]), o;
3329
3454
  }
3330
- var Zn = Object.prototype, Kn = Zn.toString;
3331
- function Jn(e) {
3332
- return Kn.call(e);
3455
+ var so = Object.prototype, lo = so.toString;
3456
+ function co(e) {
3457
+ return lo.call(e);
3333
3458
  }
3334
- var Qn = "[object Null]", eo = "[object Undefined]", nt = Te ? Te.toStringTag : void 0;
3335
- function At(e) {
3336
- return e == null ? e === void 0 ? eo : Qn : nt && nt in Object(e) ? qn(e) : Jn(e);
3459
+ var uo = "[object Null]", ho = "[object Undefined]", lt = ze ? ze.toStringTag : void 0;
3460
+ function Ot(e) {
3461
+ return e == null ? e === void 0 ? ho : uo : lt && lt in Object(e) ? ao(e) : co(e);
3337
3462
  }
3338
- function Lt(e) {
3463
+ function jt(e) {
3339
3464
  return e != null && typeof e == "object";
3340
3465
  }
3341
- var to = "[object Symbol]";
3342
- function ro(e) {
3343
- return typeof e == "symbol" || Lt(e) && At(e) == to;
3466
+ var fo = "[object Symbol]";
3467
+ function mo(e) {
3468
+ return typeof e == "symbol" || jt(e) && Ot(e) == fo;
3344
3469
  }
3345
- var io = /\s/;
3346
- function no(e) {
3347
- for (var t = e.length; t-- && io.test(e.charAt(t)); )
3470
+ var go = /\s/;
3471
+ function po(e) {
3472
+ for (var t = e.length; t-- && go.test(e.charAt(t)); )
3348
3473
  ;
3349
3474
  return t;
3350
3475
  }
3351
- var oo = /^\s+/;
3352
- function ao(e) {
3353
- return e && e.slice(0, no(e) + 1).replace(oo, "");
3476
+ var xo = /^\s+/;
3477
+ function bo(e) {
3478
+ return e && e.slice(0, po(e) + 1).replace(xo, "");
3354
3479
  }
3355
- function Ie(e) {
3480
+ function Te(e) {
3356
3481
  var t = typeof e;
3357
3482
  return e != null && (t == "object" || t == "function");
3358
3483
  }
3359
- var ot = NaN, so = /^[-+]0x[0-9a-f]+$/i, lo = /^0b[01]+$/i, co = /^0o[0-7]+$/i, uo = parseInt;
3360
- function ge(e) {
3484
+ var ct = NaN, vo = /^[-+]0x[0-9a-f]+$/i, wo = /^0b[01]+$/i, yo = /^0o[0-7]+$/i, Co = parseInt;
3485
+ function xe(e) {
3361
3486
  if (typeof e == "number")
3362
3487
  return e;
3363
- if (ro(e))
3364
- return ot;
3365
- if (Ie(e)) {
3488
+ if (mo(e))
3489
+ return ct;
3490
+ if (Te(e)) {
3366
3491
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
3367
- e = Ie(t) ? t + "" : t;
3492
+ e = Te(t) ? t + "" : t;
3368
3493
  }
3369
3494
  if (typeof e != "string")
3370
3495
  return e === 0 ? e : +e;
3371
- e = ao(e);
3372
- var r = lo.test(e);
3373
- return r || co.test(e) ? uo(e.slice(2), r ? 2 : 8) : so.test(e) ? ot : +e;
3496
+ e = bo(e);
3497
+ var r = wo.test(e);
3498
+ return r || yo.test(e) ? Co(e.slice(2), r ? 2 : 8) : vo.test(e) ? ct : +e;
3374
3499
  }
3375
- function ho(e, t, r) {
3500
+ function ko(e, t, r) {
3376
3501
  return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
3377
3502
  }
3378
- function fo(e, t, r) {
3379
- return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = ge(r), r = r === r ? r : 0), t !== void 0 && (t = ge(t), t = t === t ? t : 0), ho(ge(e), t, r);
3503
+ function Mo(e, t, r) {
3504
+ return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = xe(r), r = r === r ? r : 0), t !== void 0 && (t = xe(t), t = t === t ? t : 0), ko(xe(e), t, r);
3380
3505
  }
3381
- var He = function() {
3382
- return St.Date.now();
3383
- }, mo = "Expected a function", go = Math.max, po = Math.min;
3384
- function xo(e, t, r) {
3385
- var i, o, a, l, s, c, d = 0, g = !1, p = !1, u = !0;
3506
+ var Oe = function() {
3507
+ return Dt.Date.now();
3508
+ }, No = "Expected a function", So = Math.max, zo = Math.min;
3509
+ function To(e, t, r) {
3510
+ var i, o, a, l, s, c, u = 0, f = !1, b = !1, d = !0;
3386
3511
  if (typeof e != "function")
3387
- throw new TypeError(mo);
3388
- t = ge(t) || 0, Ie(r) && (g = !!r.leading, p = "maxWait" in r, a = p ? go(ge(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
3389
- function k(v) {
3390
- var R = i, N = o;
3391
- return i = o = void 0, d = v, l = e.apply(N, R), l;
3512
+ throw new TypeError(No);
3513
+ t = xe(t) || 0, Te(r) && (f = !!r.leading, b = "maxWait" in r, a = b ? So(xe(r.maxWait) || 0, t) : a, d = "trailing" in r ? !!r.trailing : d);
3514
+ function w(v) {
3515
+ var U = i, z = o;
3516
+ return i = o = void 0, u = v, l = e.apply(z, U), l;
3392
3517
  }
3393
- function b(v) {
3394
- return d = v, s = setTimeout(x, t), g ? k(v) : l;
3518
+ function m(v) {
3519
+ return u = v, s = setTimeout(y, t), f ? w(v) : l;
3395
3520
  }
3396
- function z(v) {
3397
- var R = v - c, N = v - d, P = t - R;
3398
- return p ? po(P, a - N) : P;
3521
+ function M(v) {
3522
+ var U = v - c, z = v - u, j = t - U;
3523
+ return b ? zo(j, a - z) : j;
3399
3524
  }
3400
- function f(v) {
3401
- var R = v - c, N = v - d;
3402
- return c === void 0 || R >= t || R < 0 || p && N >= a;
3525
+ function g(v) {
3526
+ var U = v - c, z = v - u;
3527
+ return c === void 0 || U >= t || U < 0 || b && z >= a;
3403
3528
  }
3404
- function x() {
3405
- var v = He();
3406
- if (f(v))
3407
- return h(v);
3408
- s = setTimeout(x, z(v));
3529
+ function y() {
3530
+ var v = Oe();
3531
+ if (g(v))
3532
+ return x(v);
3533
+ s = setTimeout(y, M(v));
3409
3534
  }
3410
- function h(v) {
3411
- return s = void 0, u && i ? k(v) : (i = o = void 0, l);
3535
+ function x(v) {
3536
+ return s = void 0, d && i ? w(v) : (i = o = void 0, l);
3412
3537
  }
3413
- function S() {
3414
- s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
3538
+ function L() {
3539
+ s !== void 0 && clearTimeout(s), u = 0, i = c = o = s = void 0;
3415
3540
  }
3416
- function m() {
3417
- return s === void 0 ? l : h(He());
3541
+ function p() {
3542
+ return s === void 0 ? l : x(Oe());
3418
3543
  }
3419
- function D() {
3420
- var v = He(), R = f(v);
3421
- if (i = arguments, o = this, c = v, R) {
3544
+ function I() {
3545
+ var v = Oe(), U = g(v);
3546
+ if (i = arguments, o = this, c = v, U) {
3422
3547
  if (s === void 0)
3423
- return b(c);
3424
- if (p)
3425
- return clearTimeout(s), s = setTimeout(x, t), k(c);
3548
+ return m(c);
3549
+ if (b)
3550
+ return clearTimeout(s), s = setTimeout(y, t), w(c);
3426
3551
  }
3427
- return s === void 0 && (s = setTimeout(x, t)), l;
3552
+ return s === void 0 && (s = setTimeout(y, t)), l;
3428
3553
  }
3429
- return D.cancel = S, D.flush = m, D;
3554
+ return I.cancel = L, I.flush = p, I;
3430
3555
  }
3431
- var bo = "[object Number]";
3432
- function at(e) {
3433
- return typeof e == "number" || Lt(e) && At(e) == bo;
3556
+ var Io = "[object Number]";
3557
+ function dt(e) {
3558
+ return typeof e == "number" || jt(e) && Ot(e) == Io;
3434
3559
  }
3435
- var vo = "Expected a function";
3436
- function st(e, t, r) {
3560
+ var Lo = "Expected a function";
3561
+ function ut(e, t, r) {
3437
3562
  var i = !0, o = !0;
3438
3563
  if (typeof e != "function")
3439
- throw new TypeError(vo);
3440
- return Ie(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), xo(e, t, {
3564
+ throw new TypeError(Lo);
3565
+ return Te(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), To(e, t, {
3441
3566
  leading: i,
3442
3567
  maxWait: t,
3443
3568
  trailing: o
3444
3569
  });
3445
3570
  }
3446
- const Ce = {
3571
+ const ke = {
3447
3572
  TOP_LEFT: "tl",
3448
3573
  TOP_RIGHT: "tr",
3449
3574
  BOTTOM_LEFT: "bl",
3450
3575
  BOTTOM_RIGHT: "br"
3451
3576
  };
3452
- function wo(e) {
3453
- var N, P, H;
3454
- const [t, r] = L({
3455
- width: Ke,
3456
- height: Ke
3457
- }), [i, o] = L({
3577
+ function Ao(e) {
3578
+ var j, A, $;
3579
+ const [t, r] = R({
3580
+ width: tt,
3581
+ height: tt
3582
+ }), [i, o] = R({
3458
3583
  width: 0,
3459
3584
  height: 0
3460
- }), [a] = L([
3461
- Ce.TOP_LEFT,
3462
- Ce.TOP_RIGHT,
3463
- Ce.BOTTOM_LEFT,
3464
- Ce.BOTTOM_RIGHT
3465
- ]), [l, s] = L(!1), [c, d] = L({
3585
+ }), [a] = R([
3586
+ ke.TOP_LEFT,
3587
+ ke.TOP_RIGHT,
3588
+ ke.BOTTOM_LEFT,
3589
+ ke.BOTTOM_RIGHT
3590
+ ]), [l, s] = R(!1), [c, u] = R({
3466
3591
  x: 0,
3467
3592
  y: 0,
3468
3593
  w: 0,
3469
3594
  h: 0,
3470
3595
  dir: ""
3471
- }), { align: g, inline: p } = (N = e == null ? void 0 : e.node) == null ? void 0 : N.attrs, u = p && (g === "left" || g === "right"), k = B(() => {
3472
- var Ye;
3473
- const { src: M, alt: w, width: y, height: I, flipX: E, flipY: A } = (Ye = e == null ? void 0 : e.node) == null ? void 0 : Ye.attrs, j = at(y) ? `${y}px` : y, O = at(I) ? `${I}px` : I, G = [];
3474
- E && G.push("rotateX(180deg)"), A && G.push("rotateY(180deg)");
3475
- const ye = G.join(" ");
3596
+ }), { align: f, inline: b } = (j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs, d = b === !0 || b === "true", w = d && (f === "left" || f === "right"), m = F(() => {
3597
+ var Je;
3598
+ const { src: h, alt: D, width: E, height: k, flipX: T, flipY: S } = (Je = e == null ? void 0 : e.node) == null ? void 0 : Je.attrs, _ = dt(E) ? `${E}px` : E, P = dt(k) ? `${k}px` : k, W = [];
3599
+ T && W.push("rotateX(180deg)"), S && W.push("rotateY(180deg)");
3600
+ const Y = W.join(" ");
3476
3601
  return {
3477
- src: M || void 0,
3478
- alt: w || void 0,
3602
+ src: h || void 0,
3603
+ alt: D || void 0,
3479
3604
  style: {
3480
- width: j || void 0,
3481
- height: O || void 0,
3482
- transform: ye || "none",
3483
- ...u ? { float: g } : {}
3605
+ width: _ || void 0,
3606
+ height: P || void 0,
3607
+ transform: Y || "none",
3608
+ ...w ? { float: f } : {}
3484
3609
  }
3485
3610
  };
3486
- }, [(P = e == null ? void 0 : e.node) == null ? void 0 : P.attrs]), b = B(() => {
3611
+ }, [(A = e == null ? void 0 : e.node) == null ? void 0 : A.attrs, w, f]), M = F(() => {
3487
3612
  const {
3488
- style: { width: M }
3489
- } = k;
3490
- return { width: M === "100%" ? M : void 0 };
3491
- }, [k]);
3492
- function z(M) {
3613
+ style: { width: h }
3614
+ } = m;
3615
+ return { width: h === "100%" ? h : void 0 };
3616
+ }, [m]);
3617
+ function g(h) {
3493
3618
  o({
3494
- width: M.target.width,
3495
- height: M.target.height
3619
+ width: h.target.width,
3620
+ height: h.target.height
3496
3621
  });
3497
3622
  }
3498
- function f() {
3499
- const { editor: M, getPos: w } = e;
3500
- M.commands.setNodeSelection(w());
3623
+ function y() {
3624
+ const { editor: h, getPos: D } = e;
3625
+ h.commands.setNodeSelection(D());
3501
3626
  }
3502
- const x = ce(
3503
- st(() => {
3504
- const { editor: M } = e, { width: w } = getComputedStyle(M.view.dom);
3505
- r((y) => ({
3506
- ...y,
3507
- width: Number.parseInt(w, 10)
3627
+ const x = ue(
3628
+ ut(() => {
3629
+ const { editor: h } = e, { width: D } = getComputedStyle(h.view.dom);
3630
+ r((E) => ({
3631
+ ...E,
3632
+ width: Number.parseInt(D, 10)
3508
3633
  }));
3509
- }, Je),
3634
+ }, rt),
3510
3635
  [e == null ? void 0 : e.editor]
3511
3636
  );
3512
- function h(M, w) {
3513
- M.preventDefault(), M.stopPropagation();
3514
- const y = i.width, I = i.height, E = y / I;
3515
- let A = Number(e.node.attrs.width), j = Number(e.node.attrs.height);
3516
- const O = t.width;
3517
- A && !j ? (A = A > O ? O : A, j = Math.round(A / E)) : j && !A ? (A = Math.round(j * E), A = A > O ? O : A) : !A && !j ? (A = y > O ? O : y, j = Math.round(A / E)) : A = A > O ? O : A, s(!0), d({
3518
- x: M.clientX,
3519
- y: M.clientY,
3520
- w: A,
3521
- h: j,
3522
- dir: w
3637
+ function L(h, D) {
3638
+ h.preventDefault(), h.stopPropagation();
3639
+ const E = i.width, k = i.height, T = E / k;
3640
+ let S = Number(e.node.attrs.width), _ = Number(e.node.attrs.height);
3641
+ const P = t.width;
3642
+ S && !_ ? (S = S > P ? P : S, _ = Math.round(S / T)) : _ && !S ? (S = Math.round(_ * T), S = S > P ? P : S) : !S && !_ ? (S = E > P ? P : E, _ = Math.round(S / T)) : S = S > P ? P : S, s(!0), u({
3643
+ x: h.clientX,
3644
+ y: h.clientY,
3645
+ w: S,
3646
+ h: _,
3647
+ dir: D
3523
3648
  });
3524
3649
  }
3525
- const S = ce(
3526
- st((M) => {
3527
- if (M.preventDefault(), M.stopPropagation(), !l)
3650
+ const p = ue(
3651
+ ut((h) => {
3652
+ if (h.preventDefault(), h.stopPropagation(), !l)
3528
3653
  return;
3529
- const { x: w, w: y, dir: I } = c, E = (M.clientX - w) * (/l/.test(I) ? -1 : 1), A = fo(y + E, gi, t.width);
3654
+ const { x: D, w: E, dir: k } = c, T = (h.clientX - D) * (/l/.test(k) ? -1 : 1), S = Mo(E + T, wi, t.width);
3530
3655
  e.updateAttributes({
3531
- width: A,
3656
+ width: S,
3532
3657
  height: null
3533
3658
  });
3534
- }, Je),
3659
+ }, rt),
3535
3660
  [l, c, t, e.updateAttributes]
3536
- ), m = ce(
3537
- (M) => {
3538
- M.preventDefault(), M.stopPropagation(), l && (d({
3661
+ ), I = ue(
3662
+ (h) => {
3663
+ h.preventDefault(), h.stopPropagation(), l && (u({
3539
3664
  x: 0,
3540
3665
  y: 0,
3541
3666
  w: 0,
3542
3667
  h: 0,
3543
3668
  dir: ""
3544
- }), s(!1), f());
3669
+ }), s(!1), y());
3545
3670
  },
3546
- [l, f]
3547
- ), D = ce(() => {
3548
- document == null || document.addEventListener("mousemove", S, !0), document == null || document.addEventListener("mouseup", m, !0);
3549
- }, [S, m]), v = ce(() => {
3550
- document == null || document.removeEventListener("mousemove", S, !0), document == null || document.removeEventListener("mouseup", m, !0);
3551
- }, [S, m]);
3552
- ze(() => (l ? D() : v(), () => {
3553
- v();
3554
- }), [l, D, v]);
3555
- const R = B(() => new ResizeObserver(() => x()), [x]);
3556
- return ze(() => (R.observe(e.editor.view.dom), () => {
3557
- R.disconnect();
3558
- }), [e.editor.view.dom, R]), /* @__PURE__ */ n(
3559
- ci,
3671
+ [l, y]
3672
+ ), v = ue(() => {
3673
+ document == null || document.addEventListener("mousemove", p, !0), document == null || document.addEventListener("mouseup", I, !0);
3674
+ }, [p, I]), U = ue(() => {
3675
+ document == null || document.removeEventListener("mousemove", p, !0), document == null || document.removeEventListener("mouseup", I, !0);
3676
+ }, [p, I]);
3677
+ Se(() => (l ? v() : U(), () => {
3678
+ U();
3679
+ }), [l, v, U]);
3680
+ const z = F(() => new ResizeObserver(() => x()), [x]);
3681
+ return Se(() => (z.observe(e.editor.view.dom), () => {
3682
+ z.disconnect();
3683
+ }), [e.editor.view.dom, z]), /* @__PURE__ */ n(
3684
+ Zt,
3560
3685
  {
3561
- as: p ? "span" : "div",
3686
+ as: "span",
3562
3687
  className: "image-view",
3563
3688
  style: {
3564
- float: u ? g : void 0,
3565
- margin: u ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3566
- display: p ? "inline" : "block",
3567
- textAlign: u ? void 0 : g,
3568
- width: ((H = k.style) == null ? void 0 : H.width) ?? "auto",
3569
- ...u ? {} : b
3689
+ float: w ? f : void 0,
3690
+ margin: w ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3691
+ display: d ? "inline" : "block",
3692
+ textAlign: w ? void 0 : f,
3693
+ width: (($ = m.style) == null ? void 0 : $.width) ?? "auto",
3694
+ ...w ? {} : M
3570
3695
  },
3571
3696
  children: /* @__PURE__ */ C(
3572
- "div",
3697
+ "span",
3573
3698
  {
3574
3699
  "data-drag-handle": !0,
3575
3700
  draggable: "true",
3576
- style: b,
3701
+ style: M,
3577
3702
  className: `image-view__body ${e != null && e.selected ? "image-view__body--focused" : ""} ${l ? "image-view__body--resizing" : ""}`,
3578
3703
  children: [
3579
3704
  /* @__PURE__ */ n(
3580
3705
  "img",
3581
3706
  {
3582
- alt: k.alt,
3707
+ alt: m.alt,
3583
3708
  className: "image-view__body__image block",
3584
3709
  height: "auto",
3585
- onClick: f,
3586
- onLoad: z,
3587
- src: k.src,
3588
- style: k.style
3710
+ onClick: y,
3711
+ onLoad: g,
3712
+ src: m.src,
3713
+ style: m.style
3589
3714
  }
3590
3715
  ),
3591
- (e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((M) => /* @__PURE__ */ n(
3716
+ (e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("span", { className: "image-resizer", children: a == null ? void 0 : a.map((h) => /* @__PURE__ */ n(
3592
3717
  "span",
3593
3718
  {
3594
- className: `image-resizer__handler image-resizer__handler--${M}`,
3595
- onMouseDown: (w) => h(w, M)
3719
+ className: `image-resizer__handler image-resizer__handler--${h}`,
3720
+ onMouseDown: (D) => L(D, h)
3596
3721
  },
3597
- `image-dir-${M}`
3722
+ `image-dir-${h}`
3598
3723
  )) })
3599
3724
  ]
3600
3725
  }
@@ -3602,12 +3727,12 @@ function wo(e) {
3602
3727
  }
3603
3728
  );
3604
3729
  }
3605
- function yo(e) {
3606
- const { editor: t } = di(), r = U.useMemo(
3730
+ function Eo(e) {
3731
+ const { editor: t } = Kt(), r = O.useMemo(
3607
3732
  () => t,
3608
3733
  [e, t]
3609
3734
  );
3610
- return ui({
3735
+ return Jt({
3611
3736
  editor: r,
3612
3737
  selector(o) {
3613
3738
  return o.editor ? {
@@ -3622,23 +3747,23 @@ function yo(e) {
3622
3747
  }
3623
3748
  }) || { editor: null };
3624
3749
  }
3625
- function ee() {
3626
- return yo().editor;
3750
+ function re() {
3751
+ return Eo().editor;
3627
3752
  }
3628
- const Et = jt(!1);
3629
- function Rt() {
3630
- return _t(Et);
3753
+ const Pt = Xt(!1);
3754
+ function _t() {
3755
+ return Yt(Pt);
3631
3756
  }
3632
- function Xo() {
3633
- return Ut(Et);
3757
+ function sa() {
3758
+ return qt(Pt);
3634
3759
  }
3635
- const Vt = () => !1;
3636
- function Yo(e = Vt) {
3637
- const t = Rt(), [r, i] = L(() => {
3760
+ const Ut = () => !1;
3761
+ function la(e = Ut) {
3762
+ const t = _t(), [r, i] = R(() => {
3638
3763
  const s = e();
3639
3764
  return typeof s == "boolean" ? !s : s;
3640
- }), o = ee();
3641
- ze(() => {
3765
+ }), o = re();
3766
+ Se(() => {
3642
3767
  if (!o || !e) return;
3643
3768
  const s = () => {
3644
3769
  const c = e();
@@ -3648,7 +3773,7 @@ function Yo(e = Vt) {
3648
3773
  o.off("selectionUpdate", s), o.off("transaction", s);
3649
3774
  };
3650
3775
  }, [o, e]);
3651
- const a = B(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = B(() => !t || !o, [t, o]);
3776
+ const a = F(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = F(() => !t || !o, [t, o]);
3652
3777
  return {
3653
3778
  disabled: a,
3654
3779
  // can not action, opacity < 1
@@ -3657,18 +3782,18 @@ function Yo(e = Vt) {
3657
3782
  editorDisabled: l
3658
3783
  };
3659
3784
  }
3660
- function Ae(e = Vt) {
3661
- const t = Rt(), [r, i] = L({}), [o, a] = L(e()), l = ee();
3662
- ze(() => {
3785
+ function Ae(e = Ut) {
3786
+ const t = _t(), [r, i] = R({}), [o, a] = R(e()), l = re();
3787
+ Se(() => {
3663
3788
  if (!l || !e) return;
3664
- const d = () => {
3789
+ const u = () => {
3665
3790
  a(e());
3666
3791
  };
3667
- return d(), l.on("selectionUpdate", d), () => {
3668
- l.off("selectionUpdate", d);
3792
+ return u(), l.on("selectionUpdate", u), () => {
3793
+ l.off("selectionUpdate", u);
3669
3794
  };
3670
3795
  }, [r, l, e]);
3671
- const s = B(() => !t || !l, [t, l]), c = B(() => !t || !l, [t, l]);
3796
+ const s = F(() => !t || !l, [t, l]), c = F(() => !t || !l, [t, l]);
3672
3797
  return {
3673
3798
  disabled: s,
3674
3799
  // can not action, opacity < 1
@@ -3679,44 +3804,44 @@ function Ae(e = Vt) {
3679
3804
  // force update
3680
3805
  };
3681
3806
  }
3682
- function le(e) {
3683
- const t = ee();
3684
- return B(() => t ? t.extensionManager.extensions.find(
3807
+ function de(e) {
3808
+ const t = re();
3809
+ return F(() => t ? t.extensionManager.extensions.find(
3685
3810
  (i) => i.name === e
3686
3811
  ) : null, [t, e]);
3687
3812
  }
3688
- function qo(e, t, r) {
3813
+ function ca(e, t, r) {
3689
3814
  return e < t ? t : e > r ? r : e;
3690
3815
  }
3691
- const Co = (e) => typeof e == "number", ko = (e) => typeof e == "string", Mo = (e) => typeof e == "function";
3692
- function zo(e, t = "px") {
3816
+ const Ro = (e) => typeof e == "number", Vo = (e) => typeof e == "string", Do = (e) => typeof e == "function";
3817
+ function Ho(e, t = "px") {
3693
3818
  if (!e) return e;
3694
- const r = Co(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3819
+ const r = Ro(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3695
3820
  return Number.isNaN(i) ? e : i + a;
3696
3821
  }
3697
- function Zo(e, t) {
3822
+ function da(e, t) {
3698
3823
  if (!e)
3699
3824
  return !1;
3700
3825
  const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3701
3826
  return !!r.find((o) => o.name === t);
3702
3827
  }
3703
- function Ko(e) {
3704
- return e.map((t) => ko(t) ? { value: t, name: t } : t);
3828
+ function ua(e) {
3829
+ return e.map((t) => Vo(t) ? { value: t, name: t } : t);
3705
3830
  }
3706
- function Dt(e) {
3707
- const t = ee(), r = le(e), { t: i } = ne();
3708
- return B(() => {
3831
+ function Bt(e) {
3832
+ const t = re(), r = de(e), { t: i } = ae();
3833
+ return F(() => {
3709
3834
  if (!t || !r || !i)
3710
3835
  return null;
3711
3836
  const { button: o } = r.options;
3712
- return !o || !Mo(o) ? null : o({
3837
+ return !o || !Do(o) ? null : o({
3713
3838
  editor: t,
3714
3839
  extension: r,
3715
3840
  t: i
3716
3841
  });
3717
3842
  }, [t, r, i]);
3718
3843
  }
3719
- function To(e, t) {
3844
+ function Oo(e, t) {
3720
3845
  const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
3721
3846
  if (!o) return !1;
3722
3847
  const l = r || {
@@ -3739,10 +3864,10 @@ function To(e, t) {
3739
3864
  return l === s;
3740
3865
  });
3741
3866
  }
3742
- function Ge(e, t) {
3867
+ function Ze(e, t) {
3743
3868
  const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
3744
3869
  return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
3745
- if (!To(c, r)) {
3870
+ if (!Oo(c, r)) {
3746
3871
  t.onError ? t.onError({
3747
3872
  type: "type",
3748
3873
  message: o("editor.upload.fileTypeNotSupported", {
@@ -3758,19 +3883,19 @@ function Ge(e, t) {
3758
3883
  return;
3759
3884
  }
3760
3885
  if (c.size > i) {
3761
- const d = (i / 1024 / 1024).toFixed(2);
3886
+ const u = (i / 1024 / 1024).toFixed(2);
3762
3887
  t.onError ? t.onError({
3763
3888
  type: "size",
3764
3889
  message: o("editor.upload.fileSizeTooBig", {
3765
3890
  fileName: c.name,
3766
- size: d
3891
+ size: u
3767
3892
  }),
3768
3893
  file: c
3769
3894
  }) : a({
3770
3895
  variant: "default",
3771
3896
  title: o("editor.upload.fileSizeTooBig", {
3772
3897
  fileName: c.name,
3773
- size: d
3898
+ size: u
3774
3899
  })
3775
3900
  });
3776
3901
  return;
@@ -3778,44 +3903,44 @@ function Ge(e, t) {
3778
3903
  l.push(c);
3779
3904
  }), l;
3780
3905
  }
3781
- function Jo() {
3782
- const { t: e } = ne(), { toast: t } = Be(), r = ee(), i = Dt(Se.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = L(!1), [d, g] = L(!1), p = le(Se.name), [u, k] = L(""), [b, z] = L(""), f = xe(null), x = (p == null ? void 0 : p.options.defaultInline) || !1, [h, S] = L(x), m = B(() => (p == null ? void 0 : p.options) || Xe, [p]);
3783
- async function D(N) {
3784
- var M;
3785
- const P = (M = N == null ? void 0 : N.target) == null ? void 0 : M.files;
3786
- if (!r || r.isDestroyed || P.length === 0 || d) {
3787
- N.target.value = "";
3906
+ function ha() {
3907
+ const { t: e } = ae(), { toast: t } = Ge(), r = re(), i = Bt(Ie.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = R(!1), [u, f] = R(!1), [b, d] = R(!1), w = de(Ie.name), [m, M] = R(""), [g, y] = R(""), x = ve(null), L = (w == null ? void 0 : w.options.defaultInline) || !1, [p, I] = R(L), v = F(() => (w == null ? void 0 : w.options) || Ke, [w]);
3908
+ async function U(A) {
3909
+ var D;
3910
+ const $ = (D = A == null ? void 0 : A.target) == null ? void 0 : D.files;
3911
+ if (!r || r.isDestroyed || $.length === 0 || b) {
3912
+ A.target.value = "";
3788
3913
  return;
3789
3914
  }
3790
- const H = Ge(P, {
3791
- acceptMimes: m == null ? void 0 : m.acceptMimes,
3792
- maxSize: m == null ? void 0 : m.maxSize,
3915
+ const h = Ze($, {
3916
+ acceptMimes: v == null ? void 0 : v.acceptMimes,
3917
+ maxSize: v == null ? void 0 : v.maxSize,
3793
3918
  t: e,
3794
3919
  toast: t,
3795
- onError: m.onError
3920
+ onError: v.onError
3796
3921
  });
3797
- if (H.length <= 0) {
3798
- N.target.value = "";
3922
+ if (h.length <= 0) {
3923
+ A.target.value = "";
3799
3924
  return;
3800
3925
  }
3801
- g(!0);
3926
+ d(!0);
3802
3927
  try {
3803
- if (m != null && m.multiple) {
3804
- const w = H.map(async (I) => {
3805
- let E = "";
3806
- return m.upload ? E = await m.upload(I) : E = URL.createObjectURL(I), E;
3928
+ if (v != null && v.multiple) {
3929
+ const E = h.map(async (T) => {
3930
+ let S = "";
3931
+ return v.upload ? S = await v.upload(T) : S = URL.createObjectURL(T), S;
3807
3932
  });
3808
- (await Promise.all(w)).forEach((I) => {
3809
- r.chain().focus().setImageInline({ src: I, inline: h, alt: b }).run();
3933
+ (await Promise.all(E)).forEach((T) => {
3934
+ r.chain().focus().setImageInline({ src: T, inline: p, alt: g }).run();
3810
3935
  });
3811
3936
  } else {
3812
- const w = H[0];
3813
- let y = "";
3814
- m.upload ? y = await m.upload(w) : y = URL.createObjectURL(w), r.chain().focus().setImageInline({ src: y, inline: h, alt: b }).run();
3937
+ const E = h[0];
3938
+ let k = "";
3939
+ v.upload ? k = await v.upload(E) : k = URL.createObjectURL(E), r.chain().focus().setImageInline({ src: k, inline: p, alt: g }).run();
3815
3940
  }
3816
- c(!1), z(""), S(x);
3817
- } catch (w) {
3818
- console.error("Error uploading image", w), m.onError ? m.onError({
3941
+ c(!1), y(""), I(L);
3942
+ } catch (E) {
3943
+ console.error("Error uploading image", E), v.onError ? v.onError({
3819
3944
  type: "upload",
3820
3945
  message: e("editor.upload.error")
3821
3946
  }) : t({
@@ -3823,117 +3948,127 @@ function Jo() {
3823
3948
  title: e("editor.upload.error")
3824
3949
  });
3825
3950
  } finally {
3826
- g(!1), N.target.value = "";
3951
+ d(!1), A.target.value = "";
3827
3952
  }
3828
3953
  }
3829
- function v(N) {
3830
- N.preventDefault(), N.stopPropagation(), r.chain().focus().setImageInline({ src: u, inline: h, alt: b }).run(), c(!1), S(x), k(""), z("");
3954
+ function z(A) {
3955
+ A.preventDefault(), A.stopPropagation(), r.chain().focus().setImageInline({ src: m, inline: p, alt: g }).run(), c(!1), I(L), M(""), y("");
3831
3956
  }
3832
- function R(N) {
3833
- var P;
3834
- N.preventDefault(), (P = f.current) == null || P.click();
3957
+ function j(A) {
3958
+ var $;
3959
+ A.preventDefault(), ($ = x.current) == null || $.click();
3835
3960
  }
3836
- return i ? /* @__PURE__ */ C(we, { onOpenChange: c, open: s, children: [
3837
- /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
3838
- wt,
3839
- {
3840
- disabled: l,
3841
- icon: o,
3842
- tooltip: a,
3843
- action: () => {
3844
- l || c(!0);
3845
- }
3846
- }
3847
- ) }),
3848
- /* @__PURE__ */ C(ae, { children: [
3849
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
3850
- /* @__PURE__ */ C(
3851
- Ne,
3852
- {
3853
- activationMode: "manual",
3854
- defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
3855
- children: [
3856
- m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3857
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3858
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
3859
- ] }),
3860
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3861
- /* @__PURE__ */ n(
3862
- $e,
3863
- {
3864
- checked: h,
3865
- onCheckedChange: (N) => {
3866
- S(N);
3867
- }
3868
- }
3869
- ),
3870
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
3871
- ] }),
3872
- m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
3873
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
3874
- /* @__PURE__ */ n(te, { onChange: (N) => z(N.target.value), required: !0, type: "text", value: b })
3875
- ] }),
3876
- /* @__PURE__ */ C(Z, { value: "upload", children: [
3877
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3878
- /* @__PURE__ */ n(
3879
- $,
3880
- {
3881
- className: "richtext-mt-1 richtext-w-full",
3882
- disabled: d,
3883
- onClick: R,
3884
- size: "sm",
3885
- children: d ? /* @__PURE__ */ C(Y, { children: [
3886
- e("editor.imageUpload.uploading"),
3887
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
3888
- ] }) : e("editor.image.dialog.tab.upload")
3889
- }
3890
- ),
3891
- /* @__PURE__ */ n(
3892
- Ht,
3893
- {
3894
- alt: b,
3895
- disabled: d,
3896
- editor: r,
3897
- imageInline: h,
3898
- onClose: () => {
3899
- z("");
3961
+ return i ? /* @__PURE__ */ C(
3962
+ Ce,
3963
+ {
3964
+ onOpenChange: (A) => {
3965
+ c(A), A || f(!1);
3966
+ },
3967
+ open: s,
3968
+ children: [
3969
+ /* @__PURE__ */ n(qe, { asChild: !0, children: /* @__PURE__ */ n(
3970
+ Nt,
3971
+ {
3972
+ disabled: l,
3973
+ icon: o,
3974
+ tooltip: a,
3975
+ action: () => {
3976
+ l || c(!0);
3977
+ }
3978
+ }
3979
+ ) }),
3980
+ /* @__PURE__ */ C(le, { className: u ? "richtext-hidden" : void 0, children: [
3981
+ /* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
3982
+ /* @__PURE__ */ C(
3983
+ Le,
3984
+ {
3985
+ activationMode: "manual",
3986
+ defaultValue: v.resourceImage === "both" || v.resourceImage === "upload" ? "upload" : "link",
3987
+ children: [
3988
+ v.resourceImage === "both" && /* @__PURE__ */ C(ye, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3989
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3990
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
3991
+ ] }),
3992
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3993
+ /* @__PURE__ */ n(
3994
+ Xe,
3995
+ {
3996
+ checked: p,
3997
+ onCheckedChange: (A) => {
3998
+ I(A);
3999
+ }
3900
4000
  }
3901
- }
3902
- )
3903
- ] }),
3904
- /* @__PURE__ */ n(
3905
- "input",
3906
- {
3907
- accept: m.acceptMimes.join(",") || "image/*",
3908
- multiple: m.multiple,
3909
- onChange: D,
3910
- ref: f,
3911
- style: { display: "none" },
3912
- type: "file"
3913
- }
3914
- )
3915
- ] }),
3916
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
3917
- /* @__PURE__ */ n(
3918
- te,
3919
- {
3920
- autoFocus: !0,
3921
- onChange: (N) => k(N.target.value),
3922
- placeholder: e("editor.image.dialog.placeholder"),
3923
- required: !0,
3924
- type: "url",
3925
- value: u
3926
- }
3927
- ),
3928
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
3929
- ] }) }) })
3930
- ]
3931
- }
3932
- )
3933
- ] })
3934
- ] }) : /* @__PURE__ */ n(Y, {});
4001
+ ),
4002
+ /* @__PURE__ */ n(be, { children: e("editor.link.dialog.inline") })
4003
+ ] }),
4004
+ v.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4005
+ /* @__PURE__ */ n(be, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4006
+ /* @__PURE__ */ n(ie, { onChange: (A) => y(A.target.value), required: !0, type: "text", value: g })
4007
+ ] }),
4008
+ /* @__PURE__ */ C(Q, { value: "upload", children: [
4009
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4010
+ /* @__PURE__ */ n(
4011
+ G,
4012
+ {
4013
+ className: "richtext-mt-1 richtext-w-full",
4014
+ disabled: b,
4015
+ onClick: j,
4016
+ size: "sm",
4017
+ children: b ? /* @__PURE__ */ C(K, { children: [
4018
+ e("editor.imageUpload.uploading"),
4019
+ /* @__PURE__ */ n(ge, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4020
+ ] }) : e("editor.image.dialog.tab.upload")
4021
+ }
4022
+ ),
4023
+ /* @__PURE__ */ n(
4024
+ Ft,
4025
+ {
4026
+ alt: g,
4027
+ disabled: b,
4028
+ editor: r,
4029
+ imageInline: p,
4030
+ onClose: () => {
4031
+ c(!1), f(!1), y(""), I(L);
4032
+ },
4033
+ onOpenChange: f
4034
+ }
4035
+ )
4036
+ ] }),
4037
+ /* @__PURE__ */ n(
4038
+ "input",
4039
+ {
4040
+ accept: v.acceptMimes.join(",") || "image/*",
4041
+ multiple: v.multiple,
4042
+ onChange: U,
4043
+ ref: x,
4044
+ style: { display: "none" },
4045
+ type: "file"
4046
+ }
4047
+ )
4048
+ ] }),
4049
+ /* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: z, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4050
+ /* @__PURE__ */ n(
4051
+ ie,
4052
+ {
4053
+ autoFocus: !0,
4054
+ onChange: (A) => M(A.target.value),
4055
+ placeholder: e("editor.image.dialog.placeholder"),
4056
+ required: !0,
4057
+ type: "url",
4058
+ value: m
4059
+ }
4060
+ ),
4061
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
4062
+ ] }) }) })
4063
+ ]
4064
+ }
4065
+ )
4066
+ ] })
4067
+ ]
4068
+ }
4069
+ ) : /* @__PURE__ */ n(K, {});
3935
4070
  }
3936
- const Xe = {
4071
+ const Ke = {
3937
4072
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
3938
4073
  maxSize: 1024 * 1024 * 5,
3939
4074
  // 5MB
@@ -3941,7 +4076,14 @@ const Xe = {
3941
4076
  resourceImage: "both",
3942
4077
  defaultInline: !1,
3943
4078
  enableAlt: !0
3944
- }, Se = /* @__PURE__ */ Fn.extend({
4079
+ };
4080
+ function $t(e) {
4081
+ return e == null ? null : e === !0 || e === "" || e === "true";
4082
+ }
4083
+ function je(e) {
4084
+ return $t(e) ?? !1;
4085
+ }
4086
+ const Ie = /* @__PURE__ */ to.extend({
3945
4087
  group: "inline",
3946
4088
  inline: !0,
3947
4089
  defining: !0,
@@ -3950,7 +4092,7 @@ const Xe = {
3950
4092
  addOptions() {
3951
4093
  var e;
3952
4094
  return {
3953
- ...Xe,
4095
+ ...Ke,
3954
4096
  ...(e = this.parent) == null ? void 0 : e.call(this),
3955
4097
  upload: () => Promise.reject("Image Upload Function"),
3956
4098
  button: ({
@@ -4001,9 +4143,9 @@ const Xe = {
4001
4143
  },
4002
4144
  inline: {
4003
4145
  default: !1,
4004
- parseHTML: (t) => !!t.getAttribute("inline"),
4146
+ parseHTML: (t) => $t(t.getAttribute("inline")),
4005
4147
  renderHTML: (t) => ({
4006
- inline: t.inline
4148
+ inline: t.inline ? "true" : null
4007
4149
  })
4008
4150
  },
4009
4151
  alt: {
@@ -4016,7 +4158,7 @@ const Xe = {
4016
4158
  };
4017
4159
  },
4018
4160
  addNodeView() {
4019
- return hi(wo);
4161
+ return Qt(Ao);
4020
4162
  },
4021
4163
  addCommands() {
4022
4164
  var e;
@@ -4034,22 +4176,24 @@ const Xe = {
4034
4176
  };
4035
4177
  },
4036
4178
  renderHTML({ HTMLAttributes: e }) {
4037
- const { flipX: t, flipY: r, align: i, inline: o } = e, a = o && (i === "left" || i === "right"), l = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", s = a ? "" : `text-align: ${i};`, g = `${a ? `float: ${i};` : ""}${a ? i === "left" ? "margin: 1em 1em 1em 0;" : "margin: 1em 0 1em 1em;" : ""}${l}`;
4179
+ const { flipX: t, flipY: r, align: i, inline: o } = e, a = je(o), l = a && (i === "left" || i === "right"), s = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", c = !a && i === "center" ? "margin: 0 auto;" : !a && i === "right" ? "margin-left: auto;" : a ? "" : "margin-right: auto;", u = a ? "" : "display: block;", f = l ? `float: ${i};` : "", d = `${u}${c}${f}${l ? i === "left" ? "margin: 1em 1em 1em 0;" : "margin: 1em 0 1em 1em;" : ""}${s}`, w = {
4180
+ ...e,
4181
+ inline: a ? "true" : null
4182
+ };
4038
4183
  return [
4039
- o ? "span" : "div",
4184
+ "span",
4040
4185
  {
4041
- style: s,
4042
4186
  class: "image"
4043
4187
  },
4044
4188
  [
4045
4189
  "img",
4046
- ut(
4190
+ Pe(
4047
4191
  {
4048
4192
  height: "auto",
4049
- style: g
4193
+ style: d || null
4050
4194
  },
4051
4195
  this.options.HTMLAttributes,
4052
- e
4196
+ w
4053
4197
  )
4054
4198
  ]
4055
4199
  ];
@@ -4057,17 +4201,16 @@ const Xe = {
4057
4201
  parseHTML() {
4058
4202
  return [
4059
4203
  {
4060
- tag: "span.image img",
4204
+ tag: "span.image",
4061
4205
  getAttrs: (e) => {
4062
- var a;
4063
- const t = e == null ? void 0 : e.parentElement, r = e == null ? void 0 : e.getAttribute("width"), i = (e == null ? void 0 : e.getAttribute("flipx")) || !1, o = (e == null ? void 0 : e.getAttribute("flipy")) || !1;
4206
+ const t = e.querySelector("img"), r = t == null ? void 0 : t.getAttribute("width"), i = (t == null ? void 0 : t.getAttribute("flipx")) || !1, o = (t == null ? void 0 : t.getAttribute("flipy")) || !1;
4064
4207
  return {
4065
- src: e == null ? void 0 : e.getAttribute("src"),
4066
- alt: e == null ? void 0 : e.getAttribute("alt"),
4067
- caption: e == null ? void 0 : e.getAttribute("caption"),
4208
+ src: t == null ? void 0 : t.getAttribute("src"),
4209
+ alt: t == null ? void 0 : t.getAttribute("alt"),
4210
+ caption: t == null ? void 0 : t.getAttribute("caption"),
4068
4211
  width: r ? Number.parseInt(r, 10) : null,
4069
- align: (e == null ? void 0 : e.getAttribute("align")) || ((a = t == null ? void 0 : t.style) == null ? void 0 : a.textAlign) || null,
4070
- inline: (e == null ? void 0 : e.getAttribute("inline")) || !1,
4212
+ align: (t == null ? void 0 : t.getAttribute("align")) || e.style.textAlign || null,
4213
+ inline: je(t == null ? void 0 : t.getAttribute("inline")),
4071
4214
  flipX: i === "true",
4072
4215
  flipY: o === "true"
4073
4216
  };
@@ -4083,7 +4226,7 @@ const Xe = {
4083
4226
  caption: t == null ? void 0 : t.getAttribute("caption"),
4084
4227
  width: r ? Number.parseInt(r, 10) : null,
4085
4228
  align: (t == null ? void 0 : t.getAttribute("align")) || e.style.textAlign || null,
4086
- inline: (t == null ? void 0 : t.getAttribute("inline")) || !1,
4229
+ inline: je(t == null ? void 0 : t.getAttribute("inline")),
4087
4230
  flipX: i === "true",
4088
4231
  flipY: o === "true"
4089
4232
  };
@@ -4150,19 +4293,19 @@ const Xe = {
4150
4293
  // ];
4151
4294
  // },
4152
4295
  });
4153
- function Qo(e) {
4296
+ function fa(e) {
4154
4297
  return e.replace(/^.*\/|\..+$/g, "");
4155
4298
  }
4156
- function ea(e) {
4299
+ function ma(e) {
4157
4300
  return e.split(".").pop();
4158
4301
  }
4159
- function ta(e) {
4302
+ function ga(e) {
4160
4303
  return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
4161
4304
  }
4162
- function ra(e) {
4305
+ function pa(e) {
4163
4306
  return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
4164
4307
  }
4165
- function Io(e) {
4308
+ function jo(e) {
4166
4309
  return new Promise((t) => {
4167
4310
  const r = new FileReader();
4168
4311
  r.addEventListener(
@@ -4177,7 +4320,7 @@ function Io(e) {
4177
4320
  ), r.readAsDataURL(e);
4178
4321
  });
4179
4322
  }
4180
- function So(e, t) {
4323
+ function Po(e, t) {
4181
4324
  const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
4182
4325
  let a = o.length;
4183
4326
  const l = new Uint8Array(a);
@@ -4185,209 +4328,201 @@ function So(e, t) {
4185
4328
  l[a] = o.charCodeAt(a);
4186
4329
  return new File([l], t, { type: i });
4187
4330
  }
4188
- function Ht({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4189
- var M, w;
4190
- const { t: a } = ne(), { toast: l } = Be(), [s, c] = L(!1), [d, g] = L(!1), p = Q.useRef(null), [u, k] = Q.useState(), [b, z] = Q.useState(""), f = xe(null), [x, h] = L({
4331
+ function Ft({ editor: e, imageInline: t, onClose: r, onOpenChange: i, disabled: o, alt: a }) {
4332
+ var D, E;
4333
+ const { t: l } = ae(), { toast: s } = Ge(), [c, u] = R(!1), [f, b] = R(!1), d = q.useRef(null), [w, m] = q.useState(), [M, g] = q.useState(""), y = ve(null), [x, L] = R({
4191
4334
  src: "",
4192
4335
  file: null
4193
- }), S = le(Se.name), m = B(() => (S == null ? void 0 : S.options) ?? {}, [S]);
4194
- function D(y) {
4195
- if (p.current && y.width && y.height) {
4196
- const I = v(p.current, y);
4197
- z(I);
4336
+ }), p = de(Ie.name), I = F(() => (p == null ? void 0 : p.options) ?? {}, [p]);
4337
+ function v(k) {
4338
+ if (d.current && k.width && k.height) {
4339
+ const T = U(d.current, k);
4340
+ g(T);
4198
4341
  }
4199
4342
  }
4200
- function v(y, I) {
4201
- const E = document.createElement("canvas"), A = y.naturalWidth / y.width, j = y.naturalHeight / y.height;
4202
- E.width = I.width * A, E.height = I.height * j;
4203
- const O = E.getContext("2d");
4204
- return O && (O.imageSmoothingEnabled = !1, O.drawImage(
4205
- y,
4206
- I.x * A,
4207
- I.y * j,
4208
- I.width * A,
4209
- I.height * j,
4343
+ function U(k, T) {
4344
+ const S = document.createElement("canvas"), _ = k.naturalWidth / k.width, P = k.naturalHeight / k.height;
4345
+ S.width = T.width * _, S.height = T.height * P;
4346
+ const W = S.getContext("2d");
4347
+ return W && (W.imageSmoothingEnabled = !1, W.drawImage(
4348
+ k,
4349
+ T.x * _,
4350
+ T.y * P,
4351
+ T.width * _,
4352
+ T.height * P,
4210
4353
  0,
4211
4354
  0,
4212
- I.width * A,
4213
- I.height * j
4214
- )), E.toDataURL("image/png", 1);
4355
+ T.width * _,
4356
+ T.height * P
4357
+ )), S.toDataURL("image/png", 1);
4215
4358
  }
4216
- const R = Q.useCallback(async () => {
4217
- var y;
4218
- if (!d) {
4219
- g(!0);
4359
+ const z = q.useCallback(() => {
4360
+ y.current && (y.current.value = "");
4361
+ }, []), j = q.useCallback(
4362
+ (k) => {
4363
+ u(k), i == null || i(k), k || (m(void 0), g(""), L({ src: "", file: null }), z());
4364
+ },
4365
+ [i, z]
4366
+ ), A = q.useCallback(async () => {
4367
+ var k;
4368
+ if (!f) {
4369
+ b(!0);
4220
4370
  try {
4221
- const I = So(b, ((y = x == null ? void 0 : x.file) == null ? void 0 : y.name) || "image.png");
4222
- let E = "";
4223
- m.upload ? E = await m.upload(I) : E = URL.createObjectURL(I), e.chain().focus().setImageInline({ src: E, inline: t, alt: o }).run(), c(!1), h({
4224
- src: "",
4225
- file: null
4226
- }), H(), r();
4227
- } catch (I) {
4228
- console.error("Error cropping image", I);
4371
+ const T = Po(M, ((k = x == null ? void 0 : x.file) == null ? void 0 : k.name) || "image.png");
4372
+ let S = "";
4373
+ I.upload ? S = await I.upload(T) : S = URL.createObjectURL(T), e.chain().focus().setImageInline({ src: S, inline: t, alt: a }).run(), j(!1), r();
4374
+ } catch (T) {
4375
+ console.error("Error cropping image", T);
4229
4376
  } finally {
4230
- g(!1);
4377
+ b(!1);
4231
4378
  }
4232
4379
  }
4233
4380
  }, [
4234
- b,
4381
+ a,
4382
+ M,
4235
4383
  e,
4384
+ j,
4236
4385
  t,
4237
- d,
4386
+ f,
4238
4387
  r,
4239
- (M = x == null ? void 0 : x.file) == null ? void 0 : M.name,
4240
- m
4388
+ (D = x == null ? void 0 : x.file) == null ? void 0 : D.name,
4389
+ I
4241
4390
  ]);
4242
- function N(y) {
4243
- var I;
4244
- y.preventDefault(), (I = f.current) == null || I.click();
4391
+ function $(k) {
4392
+ var T;
4393
+ k.preventDefault(), (T = y.current) == null || T.click();
4245
4394
  }
4246
- const P = async (y) => {
4247
- var O;
4248
- const I = (O = y == null ? void 0 : y.target) == null ? void 0 : O.files;
4249
- if (!e || e.isDestroyed || I.length === 0) {
4250
- y.target.value = "";
4395
+ const h = async (k) => {
4396
+ var W;
4397
+ const T = (W = k == null ? void 0 : k.target) == null ? void 0 : W.files;
4398
+ if (!e || e.isDestroyed || T.length === 0) {
4399
+ k.target.value = "";
4251
4400
  return;
4252
4401
  }
4253
- const E = Ge(I, {
4254
- acceptMimes: m == null ? void 0 : m.acceptMimes,
4255
- maxSize: m == null ? void 0 : m.maxSize,
4256
- t: a,
4257
- toast: l,
4258
- onError: m.onError
4402
+ const S = Ze(T, {
4403
+ acceptMimes: I == null ? void 0 : I.acceptMimes,
4404
+ maxSize: I == null ? void 0 : I.maxSize,
4405
+ t: l,
4406
+ toast: s,
4407
+ onError: I.onError
4259
4408
  });
4260
- if (E.length <= 0) {
4261
- y.target.value = "";
4409
+ if (S.length <= 0) {
4410
+ k.target.value = "";
4262
4411
  return;
4263
4412
  }
4264
- const A = E[0], j = await Io(A);
4265
- c(!0), h({
4266
- src: j.src,
4267
- file: A
4413
+ const _ = S[0], P = await jo(_);
4414
+ j(!0), L({
4415
+ src: P.src,
4416
+ file: _
4268
4417
  });
4269
- }, H = () => {
4270
- f.current && (f.current.value = "");
4271
4418
  };
4272
- return /* @__PURE__ */ C(Y, { children: [
4419
+ return /* @__PURE__ */ C(K, { children: [
4273
4420
  /* @__PURE__ */ n(
4274
- $,
4421
+ G,
4275
4422
  {
4276
4423
  className: "richtext-mt-1 richtext-w-full",
4277
- disabled: i,
4278
- onClick: N,
4424
+ disabled: o,
4425
+ onClick: $,
4279
4426
  size: "sm",
4280
- children: a("editor.image.dialog.tab.uploadCrop")
4281
- }
4282
- ),
4283
- /* @__PURE__ */ C(
4284
- we,
4285
- {
4286
- open: s,
4287
- onOpenChange: (y) => {
4288
- c(y), y || (h({ src: "", file: null }), H());
4289
- },
4290
- children: [
4291
- /* @__PURE__ */ n(We, {}),
4292
- /* @__PURE__ */ C(ae, { children: [
4293
- /* @__PURE__ */ n(se, { children: a("editor.image.dialog.tab.uploadCrop") }),
4294
- /* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
4295
- yi,
4296
- {
4297
- className: "richtext-w-full",
4298
- crop: u,
4299
- onChange: (y) => k(y),
4300
- onComplete: (y) => D(y),
4301
- children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: x.src })
4302
- }
4303
- ) }),
4304
- /* @__PURE__ */ C(It, { children: [
4305
- /* @__PURE__ */ C(
4306
- $,
4307
- {
4308
- disabled: d,
4309
- onClick: () => {
4310
- c(!1), h({
4311
- src: "",
4312
- file: null
4313
- }), H();
4314
- },
4315
- children: [
4316
- a("editor.imageUpload.cancel"),
4317
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Trash2" })
4318
- ]
4319
- }
4320
- ),
4321
- /* @__PURE__ */ n($, { className: "richtext-w-fit", disabled: d || !u, onClick: R, children: d ? /* @__PURE__ */ C(Y, { children: [
4322
- a("editor.imageUpload.uploading"),
4323
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4324
- ] }) : /* @__PURE__ */ C(Y, { children: [
4325
- a("editor.imageUpload.crop"),
4326
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Crop" })
4327
- ] }) })
4328
- ] })
4329
- ] })
4330
- ]
4427
+ children: l("editor.image.dialog.tab.uploadCrop")
4331
4428
  }
4332
4429
  ),
4430
+ /* @__PURE__ */ C(Ce, { open: c, onOpenChange: j, children: [
4431
+ /* @__PURE__ */ n(qe, {}),
4432
+ /* @__PURE__ */ C(le, { children: [
4433
+ /* @__PURE__ */ n(ce, { children: l("editor.image.dialog.tab.uploadCrop") }),
4434
+ /* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
4435
+ Si,
4436
+ {
4437
+ className: "richtext-w-full",
4438
+ crop: w,
4439
+ onChange: (k) => m(k),
4440
+ onComplete: (k) => v(k),
4441
+ children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: d, src: x.src })
4442
+ }
4443
+ ) }),
4444
+ /* @__PURE__ */ C(Vt, { children: [
4445
+ /* @__PURE__ */ C(
4446
+ G,
4447
+ {
4448
+ disabled: f,
4449
+ onClick: () => {
4450
+ j(!1);
4451
+ },
4452
+ children: [
4453
+ l("editor.imageUpload.cancel"),
4454
+ /* @__PURE__ */ n(ge, { className: "richtext-ml-1", name: "Trash2" })
4455
+ ]
4456
+ }
4457
+ ),
4458
+ /* @__PURE__ */ n(G, { className: "richtext-w-fit", disabled: f || !w, onClick: A, children: f ? /* @__PURE__ */ C(K, { children: [
4459
+ l("editor.imageUpload.uploading"),
4460
+ /* @__PURE__ */ n(ge, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4461
+ ] }) : /* @__PURE__ */ C(K, { children: [
4462
+ l("editor.imageUpload.crop"),
4463
+ /* @__PURE__ */ n(ge, { className: "richtext-ml-1", name: "Crop" })
4464
+ ] }) })
4465
+ ] })
4466
+ ] })
4467
+ ] }),
4333
4468
  /* @__PURE__ */ n(
4334
4469
  "input",
4335
4470
  {
4336
- accept: ((w = m == null ? void 0 : m.acceptMimes) == null ? void 0 : w.join(",")) || "image/*",
4471
+ accept: ((E = I == null ? void 0 : I.acceptMimes) == null ? void 0 : E.join(",")) || "image/*",
4337
4472
  multiple: !1,
4338
- onChange: P,
4339
- ref: f,
4473
+ onChange: h,
4474
+ ref: y,
4340
4475
  style: { display: "none" },
4341
4476
  type: "file"
4342
4477
  }
4343
4478
  )
4344
4479
  ] });
4345
4480
  }
4346
- const Ot = {
4481
+ const Wt = {
4347
4482
  UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
4348
4483
  UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
4349
4484
  EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
4350
4485
  };
4351
- function No() {
4352
- const { t: e } = ne(), { toast: t } = Be(), r = ee(), { editorDisabled: i } = Ae(), [o, a] = L(!1), l = Ot.UPLOAD_IMAGE(r.id);
4353
- zt(a, [l]);
4354
- const [s, c] = L(!1), d = le(Se.name), [g, p] = L(""), [u, k] = L(""), b = xe(null), z = (d == null ? void 0 : d.options.defaultInline) || !1, [f, x] = L(z), h = B(() => (d == null ? void 0 : d.options) || Xe, [d]);
4355
- async function S(v) {
4356
- var P;
4357
- const R = (P = v == null ? void 0 : v.target) == null ? void 0 : P.files;
4358
- if (!r || r.isDestroyed || R.length === 0 || s) {
4359
- v.target.value = "";
4486
+ function _o() {
4487
+ const { t: e } = ae(), { toast: t } = Ge(), r = re(), { editorDisabled: i } = Ae(), [o, a] = R(!1), [l, s] = R(!1), c = Wt.UPLOAD_IMAGE(r.id);
4488
+ Et(a, [c]);
4489
+ const [u, f] = R(!1), b = de(Ie.name), [d, w] = R(""), [m, M] = R(""), g = ve(null), y = (b == null ? void 0 : b.options.defaultInline) || !1, [x, L] = R(y), p = F(() => (b == null ? void 0 : b.options) || Ke, [b]);
4490
+ async function I(z) {
4491
+ var $;
4492
+ const j = ($ = z == null ? void 0 : z.target) == null ? void 0 : $.files;
4493
+ if (!r || r.isDestroyed || j.length === 0 || u) {
4494
+ z.target.value = "";
4360
4495
  return;
4361
4496
  }
4362
- const N = Ge(R, {
4363
- acceptMimes: h == null ? void 0 : h.acceptMimes,
4364
- maxSize: h == null ? void 0 : h.maxSize,
4497
+ const A = Ze(j, {
4498
+ acceptMimes: p == null ? void 0 : p.acceptMimes,
4499
+ maxSize: p == null ? void 0 : p.maxSize,
4365
4500
  t: e,
4366
4501
  toast: t,
4367
- onError: h.onError
4502
+ onError: p.onError
4368
4503
  });
4369
- if (N.length <= 0) {
4370
- v.target.value = "";
4504
+ if (A.length <= 0) {
4505
+ z.target.value = "";
4371
4506
  return;
4372
4507
  }
4373
- c(!0);
4508
+ f(!0);
4374
4509
  try {
4375
- if (h != null && h.multiple) {
4376
- const H = N.map(async (w) => {
4377
- let y = "";
4378
- return h.upload ? y = await h.upload(w) : y = URL.createObjectURL(w), y;
4510
+ if (p != null && p.multiple) {
4511
+ const h = A.map(async (E) => {
4512
+ let k = "";
4513
+ return p.upload ? k = await p.upload(E) : k = URL.createObjectURL(E), k;
4379
4514
  });
4380
- (await Promise.all(H)).forEach((w) => {
4381
- r.chain().focus().setImageInline({ src: w, inline: f, alt: u }).run();
4515
+ (await Promise.all(h)).forEach((E) => {
4516
+ r.chain().focus().setImageInline({ src: E, inline: x, alt: m }).run();
4382
4517
  });
4383
4518
  } else {
4384
- const H = N[0];
4385
- let M = "";
4386
- h.upload ? M = await h.upload(H) : M = URL.createObjectURL(H), r.chain().focus().setImageInline({ src: M, inline: f, alt: u }).run();
4519
+ const h = A[0];
4520
+ let D = "";
4521
+ p.upload ? D = await p.upload(h) : D = URL.createObjectURL(h), r.chain().focus().setImageInline({ src: D, inline: x, alt: m }).run();
4387
4522
  }
4388
- a(!1), k(""), x(z);
4389
- } catch (H) {
4390
- console.error("Error uploading image", H), h.onError ? h.onError({
4523
+ a(!1), M(""), L(y);
4524
+ } catch (h) {
4525
+ console.error("Error uploading image", h), p.onError ? p.onError({
4391
4526
  type: "upload",
4392
4527
  message: e("editor.upload.error")
4393
4528
  }) : t({
@@ -4395,104 +4530,114 @@ function No() {
4395
4530
  title: e("editor.upload.error")
4396
4531
  });
4397
4532
  } finally {
4398
- c(!1), v.target.value = "";
4533
+ f(!1), z.target.value = "";
4399
4534
  }
4400
4535
  }
4401
- function m(v) {
4402
- v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: g, inline: f, alt: u }).run(), a(!1), x(z), p(""), k("");
4536
+ function v(z) {
4537
+ z.preventDefault(), z.stopPropagation(), r.chain().focus().setImageInline({ src: d, inline: x, alt: m }).run(), a(!1), L(y), w(""), M("");
4403
4538
  }
4404
- function D(v) {
4405
- var R;
4406
- v.preventDefault(), (R = b.current) == null || R.click();
4539
+ function U(z) {
4540
+ var j;
4541
+ z.preventDefault(), (j = g.current) == null || j.click();
4407
4542
  }
4408
- return i ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ C(ae, { children: [
4409
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
4410
- /* @__PURE__ */ C(
4411
- Ne,
4412
- {
4413
- activationMode: "manual",
4414
- defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
4415
- children: [
4416
- h.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4417
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4418
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4419
- ] }),
4420
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4421
- /* @__PURE__ */ n(
4422
- $e,
4423
- {
4424
- checked: f,
4425
- onCheckedChange: (v) => {
4426
- x(v);
4427
- }
4428
- }
4429
- ),
4430
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4431
- ] }),
4432
- h.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4433
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4434
- /* @__PURE__ */ n(te, { onChange: (v) => k(v.target.value), required: !0, type: "text", value: u })
4435
- ] }),
4436
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4437
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4438
- /* @__PURE__ */ n(
4439
- $,
4440
- {
4441
- className: "richtext-mt-1 richtext-w-full",
4442
- disabled: s,
4443
- onClick: D,
4444
- size: "sm",
4445
- children: s ? /* @__PURE__ */ C(Y, { children: [
4446
- e("editor.imageUpload.uploading"),
4447
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4448
- ] }) : e("editor.image.dialog.tab.upload")
4449
- }
4450
- ),
4451
- /* @__PURE__ */ n(
4452
- Ht,
4453
- {
4454
- alt: u,
4455
- disabled: s,
4456
- editor: r,
4457
- imageInline: f,
4458
- onClose: () => {
4459
- k("");
4543
+ return i ? /* @__PURE__ */ n(K, {}) : /* @__PURE__ */ n(
4544
+ Ce,
4545
+ {
4546
+ onOpenChange: (z) => {
4547
+ a(z), z || s(!1);
4548
+ },
4549
+ open: o,
4550
+ children: /* @__PURE__ */ C(le, { className: l ? "richtext-hidden" : void 0, children: [
4551
+ /* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
4552
+ /* @__PURE__ */ C(
4553
+ Le,
4554
+ {
4555
+ activationMode: "manual",
4556
+ defaultValue: p.resourceImage === "both" || p.resourceImage === "upload" ? "upload" : "link",
4557
+ children: [
4558
+ p.resourceImage === "both" && /* @__PURE__ */ C(ye, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4559
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4560
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
4561
+ ] }),
4562
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4563
+ /* @__PURE__ */ n(
4564
+ Xe,
4565
+ {
4566
+ checked: x,
4567
+ onCheckedChange: (z) => {
4568
+ L(z);
4569
+ }
4460
4570
  }
4461
- }
4462
- )
4463
- ] }),
4464
- /* @__PURE__ */ n(
4465
- "input",
4466
- {
4467
- accept: h.acceptMimes.join(",") || "image/*",
4468
- multiple: h.multiple,
4469
- onChange: S,
4470
- ref: b,
4471
- style: { display: "none" },
4472
- type: "file"
4473
- }
4474
- )
4475
- ] }),
4476
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4477
- /* @__PURE__ */ n(
4478
- te,
4479
- {
4480
- autoFocus: !0,
4481
- onChange: (v) => p(v.target.value),
4482
- placeholder: e("editor.image.dialog.placeholder"),
4483
- required: !0,
4484
- type: "url",
4485
- value: g
4486
- }
4487
- ),
4488
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
4489
- ] }) }) })
4490
- ]
4491
- }
4492
- )
4493
- ] }) });
4571
+ ),
4572
+ /* @__PURE__ */ n(be, { children: e("editor.link.dialog.inline") })
4573
+ ] }),
4574
+ p.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4575
+ /* @__PURE__ */ n(be, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4576
+ /* @__PURE__ */ n(ie, { onChange: (z) => M(z.target.value), required: !0, type: "text", value: m })
4577
+ ] }),
4578
+ /* @__PURE__ */ C(Q, { value: "upload", children: [
4579
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4580
+ /* @__PURE__ */ n(
4581
+ G,
4582
+ {
4583
+ className: "richtext-mt-1 richtext-w-full",
4584
+ disabled: u,
4585
+ onClick: U,
4586
+ size: "sm",
4587
+ children: u ? /* @__PURE__ */ C(K, { children: [
4588
+ e("editor.imageUpload.uploading"),
4589
+ /* @__PURE__ */ n(ge, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4590
+ ] }) : e("editor.image.dialog.tab.upload")
4591
+ }
4592
+ ),
4593
+ /* @__PURE__ */ n(
4594
+ Ft,
4595
+ {
4596
+ alt: m,
4597
+ disabled: u,
4598
+ editor: r,
4599
+ imageInline: x,
4600
+ onClose: () => {
4601
+ a(!1), s(!1), M(""), L(y);
4602
+ },
4603
+ onOpenChange: s
4604
+ }
4605
+ )
4606
+ ] }),
4607
+ /* @__PURE__ */ n(
4608
+ "input",
4609
+ {
4610
+ accept: p.acceptMimes.join(",") || "image/*",
4611
+ multiple: p.multiple,
4612
+ onChange: I,
4613
+ ref: g,
4614
+ style: { display: "none" },
4615
+ type: "file"
4616
+ }
4617
+ )
4618
+ ] }),
4619
+ /* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4620
+ /* @__PURE__ */ n(
4621
+ ie,
4622
+ {
4623
+ autoFocus: !0,
4624
+ onChange: (z) => w(z.target.value),
4625
+ placeholder: e("editor.image.dialog.placeholder"),
4626
+ required: !0,
4627
+ type: "url",
4628
+ value: d
4629
+ }
4630
+ ),
4631
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
4632
+ ] }) }) })
4633
+ ]
4634
+ }
4635
+ )
4636
+ ] })
4637
+ }
4638
+ );
4494
4639
  }
4495
- function Pt(e, t) {
4640
+ function Gt(e, t) {
4496
4641
  let r;
4497
4642
  try {
4498
4643
  r = new URL(e);
@@ -4507,62 +4652,62 @@ function Pt(e, t) {
4507
4652
  return r.hostname.includes(i);
4508
4653
  });
4509
4654
  }
4510
- function ia() {
4511
- const { t: e } = ne(), t = ee(), r = Dt(je.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = L(""), c = xe(null), [d, g] = L(""), [p, u] = L(!1), k = le(je.name), b = B(() => (k == null ? void 0 : k.options) ?? {}, [k]);
4512
- async function z(h) {
4655
+ function xa() {
4656
+ const { t: e } = ae(), t = re(), r = Bt(Be.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = R(""), c = ve(null), [u, f] = R(""), [b, d] = R(!1), w = de(Be.name), m = F(() => (w == null ? void 0 : w.options) ?? {}, [w]);
4657
+ async function M(x) {
4513
4658
  var v;
4514
- const S = (v = h == null ? void 0 : h.target) == null ? void 0 : v.files;
4515
- if (!t || t.isDestroyed || S.length === 0)
4659
+ const L = (v = x == null ? void 0 : x.target) == null ? void 0 : v.files;
4660
+ if (!t || t.isDestroyed || L.length === 0)
4516
4661
  return;
4517
- const m = S[0];
4518
- let D = "";
4519
- b.upload ? D = await b.upload(m) : D = URL.createObjectURL(m), t.chain().focus().setVideo({
4520
- src: D,
4662
+ const p = L[0];
4663
+ let I = "";
4664
+ m.upload ? I = await m.upload(p) : I = URL.createObjectURL(p), t.chain().focus().setVideo({
4665
+ src: I,
4521
4666
  width: "100%"
4522
- }).run(), u(!1);
4667
+ }).run(), d(!1);
4523
4668
  }
4524
- function f(h) {
4525
- h.preventDefault(), h.stopPropagation(), l && (t.chain().focus().setVideo({
4669
+ function g(x) {
4670
+ x.preventDefault(), x.stopPropagation(), l && (t.chain().focus().setVideo({
4526
4671
  src: l,
4527
4672
  width: "100%"
4528
- }).run(), u(!1), s(""));
4673
+ }).run(), d(!1), s(""));
4529
4674
  }
4530
- function x(h) {
4531
- var S;
4532
- h.preventDefault(), (S = c.current) == null || S.click();
4675
+ function y(x) {
4676
+ var L;
4677
+ x.preventDefault(), (L = c.current) == null || L.click();
4533
4678
  }
4534
- return /* @__PURE__ */ C(we, { onOpenChange: u, open: p, children: [
4535
- /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
4536
- wt,
4679
+ return /* @__PURE__ */ C(Ce, { onOpenChange: d, open: b, children: [
4680
+ /* @__PURE__ */ n(qe, { asChild: !0, children: /* @__PURE__ */ n(
4681
+ Nt,
4537
4682
  {
4538
4683
  disabled: a,
4539
4684
  icon: i,
4540
4685
  tooltip: o,
4541
4686
  action: () => {
4542
- a || u(!0);
4687
+ a || d(!0);
4543
4688
  }
4544
4689
  }
4545
4690
  ) }),
4546
- /* @__PURE__ */ C(ae, { children: [
4547
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4691
+ /* @__PURE__ */ C(le, { children: [
4692
+ /* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
4548
4693
  /* @__PURE__ */ C(
4549
- Ne,
4694
+ Le,
4550
4695
  {
4551
4696
  activationMode: "manual",
4552
- defaultValue: (b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload" ? "upload" : "link",
4697
+ defaultValue: (m == null ? void 0 : m.resourceVideo) === "both" || (m == null ? void 0 : m.resourceVideo) === "upload" ? "upload" : "link",
4553
4698
  children: [
4554
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4555
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4556
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4699
+ /* @__PURE__ */ C(ye, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4700
+ ((m == null ? void 0 : m.resourceVideo) === "both" || (m == null ? void 0 : m.resourceVideo) === "upload") && /* @__PURE__ */ n(J, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4701
+ ((m == null ? void 0 : m.resourceVideo) === "both" || (m == null ? void 0 : m.resourceVideo) === "link") && /* @__PURE__ */ n(J, { value: "link", children: e("editor.video.dialog.link") })
4557
4702
  ] }),
4558
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4559
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4703
+ /* @__PURE__ */ C(Q, { value: "upload", children: [
4704
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: y, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4560
4705
  /* @__PURE__ */ n(
4561
4706
  "input",
4562
4707
  {
4563
4708
  accept: "video/*",
4564
4709
  multiple: !0,
4565
- onChange: z,
4710
+ onChange: M,
4566
4711
  ref: c,
4567
4712
  type: "file",
4568
4713
  style: {
@@ -4571,28 +4716,28 @@ function ia() {
4571
4716
  }
4572
4717
  )
4573
4718
  ] }),
4574
- /* @__PURE__ */ C(Z, { value: "link", children: [
4719
+ /* @__PURE__ */ C(Q, { value: "link", children: [
4575
4720
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4576
4721
  /* @__PURE__ */ n(
4577
- te,
4722
+ ie,
4578
4723
  {
4579
4724
  autoFocus: !0,
4580
4725
  placeholder: e("editor.video.dialog.placeholder"),
4581
4726
  required: !0,
4582
4727
  type: "url",
4583
4728
  value: l,
4584
- onBlur: (h) => {
4585
- const S = h.target.value, m = b.videoProviders || ["."];
4586
- S && !Pt(S, m) ? g("Invalid video URL") : g("");
4729
+ onBlur: (x) => {
4730
+ const L = x.target.value, p = m.videoProviders || ["."];
4731
+ L && !Gt(L, p) ? f("Invalid video URL") : f("");
4587
4732
  },
4588
- onChange: (h) => {
4589
- s(h.target.value);
4733
+ onChange: (x) => {
4734
+ s(x.target.value);
4590
4735
  }
4591
4736
  }
4592
4737
  ),
4593
- /* @__PURE__ */ n($, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
4738
+ /* @__PURE__ */ n(G, { onClick: g, type: "button", children: e("editor.video.dialog.button.apply") })
4594
4739
  ] }) }),
4595
- d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
4740
+ u && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: u })
4596
4741
  ] })
4597
4742
  ]
4598
4743
  }
@@ -4600,7 +4745,7 @@ function ia() {
4600
4745
  ] })
4601
4746
  ] });
4602
4747
  }
4603
- function Ao(e) {
4748
+ function Uo(e) {
4604
4749
  e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
4605
4750
  const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
4606
4751
  t && (e = `https://www.youtube.com/embed/${t[1]}`);
@@ -4611,7 +4756,7 @@ function Ao(e) {
4611
4756
  }
4612
4757
  return /^https?:\/\/www.bilibili.com\/video\/.*/i.test(e) && (e = e.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), e.includes("drive.google.com") && (e = e.replace("/view", "/preview")), e;
4613
4758
  }
4614
- const je = /* @__PURE__ */ dt.create({
4759
+ const Be = /* @__PURE__ */ xt.create({
4615
4760
  name: "video",
4616
4761
  group: "block",
4617
4762
  atom: !0,
@@ -4625,7 +4770,7 @@ const je = /* @__PURE__ */ dt.create({
4625
4770
  upload: void 0,
4626
4771
  frameborder: !1,
4627
4772
  resourceVideo: "both",
4628
- width: pi["size-medium"],
4773
+ width: yi["size-medium"],
4629
4774
  HTMLAttributes: {
4630
4775
  class: "iframe-wrapper"
4631
4776
  // style: 'display: flex;justify-content: center;',
@@ -4653,13 +4798,13 @@ const je = /* @__PURE__ */ dt.create({
4653
4798
  src: {
4654
4799
  default: null,
4655
4800
  renderHTML: ({ src: e }) => ({
4656
- src: e ? Ao(e) : null
4801
+ src: e ? Uo(e) : null
4657
4802
  })
4658
4803
  },
4659
4804
  width: {
4660
4805
  default: this.options.width,
4661
4806
  renderHTML: ({ width: e }) => ({
4662
- width: zo(e)
4807
+ width: Ho(e)
4663
4808
  })
4664
4809
  },
4665
4810
  frameborder: {
@@ -4691,12 +4836,12 @@ const je = /* @__PURE__ */ dt.create({
4691
4836
  ...e,
4692
4837
  width: "100%",
4693
4838
  height: "100%"
4694
- }, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`, g = ["div", { style: `display: flex; justify-content: ${r};` }, ["div", { style: o }, ["div", { style: a }], ["iframe", i]]];
4839
+ }, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`, f = ["div", { style: `display: flex; justify-content: ${r};` }, ["div", { style: o }, ["div", { style: a }], ["iframe", i]]];
4695
4840
  return ["div", {
4696
4841
  ...this.options.HTMLAttributes,
4697
4842
  class: "iframe-wrapper",
4698
4843
  "data-video": ""
4699
- }, g];
4844
+ }, f];
4700
4845
  },
4701
4846
  addCommands() {
4702
4847
  return {
@@ -4708,52 +4853,52 @@ const je = /* @__PURE__ */ dt.create({
4708
4853
  };
4709
4854
  }
4710
4855
  });
4711
- function Lo() {
4712
- const { t: e } = ne(), t = ee(), { editorDisabled: r } = Ae(), [i, o] = L(""), a = xe(null), [l, s] = L(""), [c, d] = L(!1), g = le(je.name), p = Ot.UPLOAD_VIDEO(t.id);
4713
- zt(d, [p]);
4714
- const u = B(() => (g == null ? void 0 : g.options) ?? {}, [g]);
4715
- async function k(f) {
4716
- var m;
4717
- const x = (m = f == null ? void 0 : f.target) == null ? void 0 : m.files;
4718
- if (!t || t.isDestroyed || x.length === 0)
4856
+ function Bo() {
4857
+ const { t: e } = ae(), t = re(), { editorDisabled: r } = Ae(), [i, o] = R(""), a = ve(null), [l, s] = R(""), [c, u] = R(!1), f = de(Be.name), b = Wt.UPLOAD_VIDEO(t.id);
4858
+ Et(u, [b]);
4859
+ const d = F(() => (f == null ? void 0 : f.options) ?? {}, [f]);
4860
+ async function w(g) {
4861
+ var p;
4862
+ const y = (p = g == null ? void 0 : g.target) == null ? void 0 : p.files;
4863
+ if (!t || t.isDestroyed || y.length === 0)
4719
4864
  return;
4720
- const h = x[0];
4721
- let S = "";
4722
- u.upload ? S = await u.upload(h) : S = URL.createObjectURL(h), t.chain().focus().setVideo({
4723
- src: S,
4865
+ const x = y[0];
4866
+ let L = "";
4867
+ d.upload ? L = await d.upload(x) : L = URL.createObjectURL(x), t.chain().focus().setVideo({
4868
+ src: L,
4724
4869
  width: "100%"
4725
- }).run(), d(!1);
4870
+ }).run(), u(!1);
4726
4871
  }
4727
- function b(f) {
4728
- f.preventDefault(), f.stopPropagation(), i && (t.chain().focus().setVideo({
4872
+ function m(g) {
4873
+ g.preventDefault(), g.stopPropagation(), i && (t.chain().focus().setVideo({
4729
4874
  src: i,
4730
4875
  width: "100%"
4731
- }).run(), d(!1), o(""));
4876
+ }).run(), u(!1), o(""));
4732
4877
  }
4733
- function z(f) {
4734
- var x;
4735
- f.preventDefault(), (x = a.current) == null || x.click();
4878
+ function M(g) {
4879
+ var y;
4880
+ g.preventDefault(), (y = a.current) == null || y.click();
4736
4881
  }
4737
- return r ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ C(ae, { children: [
4738
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4882
+ return r ? /* @__PURE__ */ n(K, {}) : /* @__PURE__ */ n(Ce, { onOpenChange: u, open: c, children: /* @__PURE__ */ C(le, { children: [
4883
+ /* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
4739
4884
  /* @__PURE__ */ C(
4740
- Ne,
4885
+ Le,
4741
4886
  {
4742
4887
  activationMode: "manual",
4743
- defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
4888
+ defaultValue: (d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "upload" ? "upload" : "link",
4744
4889
  children: [
4745
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4746
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4747
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4890
+ /* @__PURE__ */ C(ye, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4891
+ ((d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "upload") && /* @__PURE__ */ n(J, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4892
+ ((d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "link") && /* @__PURE__ */ n(J, { value: "link", children: e("editor.video.dialog.link") })
4748
4893
  ] }),
4749
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4750
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: z, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4894
+ /* @__PURE__ */ C(Q, { value: "upload", children: [
4895
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: M, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4751
4896
  /* @__PURE__ */ n(
4752
4897
  "input",
4753
4898
  {
4754
4899
  accept: "video/*",
4755
4900
  multiple: !0,
4756
- onChange: k,
4901
+ onChange: w,
4757
4902
  ref: a,
4758
4903
  type: "file",
4759
4904
  style: {
@@ -4762,26 +4907,26 @@ function Lo() {
4762
4907
  }
4763
4908
  )
4764
4909
  ] }),
4765
- /* @__PURE__ */ C(Z, { value: "link", children: [
4910
+ /* @__PURE__ */ C(Q, { value: "link", children: [
4766
4911
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4767
4912
  /* @__PURE__ */ n(
4768
- te,
4913
+ ie,
4769
4914
  {
4770
4915
  autoFocus: !0,
4771
4916
  placeholder: e("editor.video.dialog.placeholder"),
4772
4917
  required: !0,
4773
4918
  type: "url",
4774
4919
  value: i,
4775
- onBlur: (f) => {
4776
- const x = f.target.value, h = u.videoProviders || ["."];
4777
- x && !Pt(x, h) ? s("Invalid video URL") : s("");
4920
+ onBlur: (g) => {
4921
+ const y = g.target.value, x = d.videoProviders || ["."];
4922
+ y && !Gt(y, x) ? s("Invalid video URL") : s("");
4778
4923
  },
4779
- onChange: (f) => {
4780
- o(f.target.value);
4924
+ onChange: (g) => {
4925
+ o(g.target.value);
4781
4926
  }
4782
4927
  }
4783
4928
  ),
4784
- /* @__PURE__ */ n($, { onClick: b, type: "button", children: e("editor.video.dialog.button.apply") })
4929
+ /* @__PURE__ */ n(G, { onClick: m, type: "button", children: e("editor.video.dialog.button.apply") })
4785
4930
  ] }) }),
4786
4931
  l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
4787
4932
  ] })
@@ -4790,67 +4935,73 @@ function Lo() {
4790
4935
  )
4791
4936
  ] }) });
4792
4937
  }
4793
- function Eo() {
4794
- return /* @__PURE__ */ C(Y, { children: [
4795
- /* @__PURE__ */ n(No, {}),
4796
- /* @__PURE__ */ n(Lo, {})
4938
+ function $o() {
4939
+ return /* @__PURE__ */ C(K, { children: [
4940
+ /* @__PURE__ */ n(_o, {}),
4941
+ /* @__PURE__ */ n(Bo, {})
4797
4942
  ] });
4798
4943
  }
4799
- process.env.NODE_ENV !== "production" && (Eo.displayName = "SlashDialogTrigger");
4944
+ process.env.NODE_ENV !== "production" && ($o.displayName = "SlashDialogTrigger");
4800
4945
  export {
4801
- Jo as $,
4802
- wt as A,
4803
- $ as B,
4804
- $e as C,
4805
- we as D,
4806
- Ot as E,
4807
- Rt as F,
4808
- zt as G,
4809
- at as H,
4810
- fe as I,
4811
- fo as J,
4812
- xo as K,
4813
- pe as L,
4814
- cn as M,
4815
- Xo as N,
4816
- Fo as O,
4817
- ra as P,
4818
- vn as Q,
4819
- Go as R,
4820
- Eo as S,
4821
- An as T,
4822
- bn as U,
4823
- ea as V,
4824
- Qo as W,
4825
- ta as X,
4826
- _n as Y,
4827
- je as Z,
4828
- Xe as _,
4829
- Ln as a,
4830
- ia as a0,
4831
- kt as b,
4832
- _ as c,
4946
+ ma as $,
4947
+ Nt as A,
4948
+ G as B,
4949
+ Xe as C,
4950
+ Ce as D,
4951
+ ut as E,
4952
+ ca as F,
4953
+ Vn as G,
4954
+ Po as H,
4955
+ ge as I,
4956
+ to as J,
4957
+ Wt as K,
4958
+ be as L,
4959
+ oa as M,
4960
+ Et as N,
4961
+ dt as O,
4962
+ Mo as P,
4963
+ To as Q,
4964
+ mn as R,
4965
+ ia as S,
4966
+ Hn as T,
4967
+ sa as U,
4968
+ aa as V,
4969
+ ra as W,
4970
+ $o as X,
4971
+ pa as Y,
4972
+ Mn as Z,
4973
+ kn as _,
4974
+ On as a,
4975
+ fa as a0,
4976
+ ga as a1,
4977
+ Kn as a2,
4978
+ Be as a3,
4979
+ Ke as a4,
4980
+ ha as a5,
4981
+ xa as a6,
4982
+ Tt as b,
4983
+ V as c,
4833
4984
  Ae as d,
4834
- Yo as e,
4835
- Ko as f,
4836
- tn as g,
4837
- ee as h,
4838
- yt as i,
4839
- te as j,
4840
- Ct as k,
4841
- en as l,
4842
- le as m,
4843
- Be as n,
4844
- Zo as o,
4845
- Se as p,
4846
- qo as q,
4847
- We as r,
4848
- ae as s,
4849
- st as t,
4850
- Dt as u,
4851
- se as v,
4852
- It as w,
4853
- So as x,
4854
- Fn as y,
4855
- Wo as z
4985
+ la as e,
4986
+ ua as f,
4987
+ sn as g,
4988
+ re as h,
4989
+ St as i,
4990
+ _t as j,
4991
+ ie as k,
4992
+ zt as l,
4993
+ an as m,
4994
+ qe as n,
4995
+ le as o,
4996
+ ce as p,
4997
+ jn as q,
4998
+ na as r,
4999
+ Pn as s,
5000
+ Un as t,
5001
+ Bt as u,
5002
+ Vt as v,
5003
+ de as w,
5004
+ Ge as x,
5005
+ da as y,
5006
+ Ie as z
4856
5007
  };