reactjs-tiptap-editor 1.0.7 → 1.0.9

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 (160) hide show
  1. package/lib/{ActionMenuButton-fTe9ka2F.js → ActionMenuButton-C4aNFFa8.js} +2 -2
  2. package/lib/{ActionMenuButton-wU6jxKJv.cjs → ActionMenuButton-CmDopTWt.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +3 -3
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +3 -3
  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 +3 -3
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +3 -3
  15. package/lib/CodeBlock.cjs +39 -39
  16. package/lib/CodeBlock.js +945 -837
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +3 -3
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +8 -8
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +3 -3
  23. package/lib/{Drawer-BGSwHoka.cjs → Drawer-CTr2snNd.cjs} +1 -1
  24. package/lib/{Drawer-DmtILKW4.js → Drawer-DG0gPU_U.js} +14 -14
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +3 -3
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +15 -15
  29. package/lib/{Excalidraw-CrG8fW-7.js → Excalidraw-DpgdxOsc.js} +18 -18
  30. package/lib/{Excalidraw-BG2U9i30.cjs → Excalidraw-DtezFdjR.cjs} +1 -1
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +2 -2
  34. package/lib/ExportPdf.js +26 -26
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +3 -3
  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/Heading.cjs +1 -1
  42. package/lib/Heading.js +13 -13
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +8 -8
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +4 -4
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +3 -3
  49. package/lib/{Icon-CysGlJkv.js → Icon-C_buGjWy.js} +1 -1
  50. package/lib/{Icon-C3j4ls73.cjs → Icon-b6HQAURz.cjs} +1 -1
  51. package/lib/{Iframe-CXDghI6m.cjs → Iframe-CUrXCDxj.cjs} +1 -1
  52. package/lib/{Iframe-BmqguWbj.js → Iframe-De88TYvj.js} +11 -11
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +2 -2
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +46 -46
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +9 -9
  59. package/lib/ImportWord.cjs +2 -2
  60. package/lib/ImportWord.js +8 -8
  61. package/lib/{Indent-BhnGkEaY.js → Indent-Bensb2nf.js} +3 -3
  62. package/lib/{Indent-B1glTHHl.cjs → Indent-D_KtZNHW.cjs} +1 -1
  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 +3 -3
  67. package/lib/{Katex-D4eBjS34.js → Katex-C0dtqznb.js} +974 -941
  68. package/lib/Katex-NqelWRoi.cjs +4 -0
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +2 -2
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +13 -13
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DW17TyCA.cjs → LinkEditBlock-BSZ-vgNB.cjs} +2 -2
  76. package/lib/{LinkEditBlock-D1eSM0kn.js → LinkEditBlock-Bv12sKvW.js} +29 -29
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +138 -132
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +20 -20
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +12 -12
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +3 -3
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +20 -20
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +14 -14
  89. package/lib/Strike.cjs +1 -1
  90. package/lib/Strike.js +3 -3
  91. package/lib/{Table-BIZppoiY.js → Table-D9ckv6Tb.js} +5 -5
  92. package/lib/{Table-CIzgfvr9.cjs → Table-cy1mUM2X.cjs} +1 -1
  93. package/lib/Table.cjs +1 -1
  94. package/lib/Table.js +1 -1
  95. package/lib/TaskList.cjs +1 -1
  96. package/lib/TaskList.js +3 -3
  97. package/lib/TextAlign.cjs +1 -1
  98. package/lib/TextAlign.js +10 -10
  99. package/lib/TextDirection.cjs +1 -1
  100. package/lib/TextDirection.js +10 -10
  101. package/lib/TextUnderline.cjs +1 -1
  102. package/lib/TextUnderline.js +3 -3
  103. package/lib/Twitter-Bvs3sW8F.cjs +1 -0
  104. package/lib/{Twitter-DhczYjbR.js → Twitter-KUvyySA0.js} +566 -524
  105. package/lib/Twitter.cjs +1 -1
  106. package/lib/Twitter.js +2 -2
  107. package/lib/Video.cjs +1 -1
  108. package/lib/Video.js +22 -22
  109. package/lib/bubble.cjs +4 -4
  110. package/lib/bubble.js +1342 -1314
  111. package/lib/{button-C81t4pb1.js → button-D8SI-g7p.js} +1 -1
  112. package/lib/{button-B6ukqDUf.cjs → button-U6XpZt2X.cjs} +1 -1
  113. package/lib/{checkbox-ZdxysUFa.cjs → checkbox-DaIBNthL.cjs} +1 -1
  114. package/lib/{checkbox-CUE9ex4D.js → checkbox-xrY2c5yo.js} +1 -1
  115. package/lib/{dialog-Cfx8yjkr.cjs → dialog-DgnnVCfv.cjs} +1 -1
  116. package/lib/{dialog-DMJStzBb.js → dialog-DjnkASYP.js} +1 -1
  117. package/lib/{dropdown-menu-Busg3FNn.cjs → dropdown-menu-BvVMltdB.cjs} +1 -1
  118. package/lib/{dropdown-menu-B8iyTZcP.js → dropdown-menu-bI14Gyw4.js} +1 -1
  119. package/lib/extensions/Katex/Katex.d.ts +1 -1
  120. package/lib/extensions/Mention/Mention.d.ts +3 -1
  121. package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +7 -1
  122. package/lib/{index-DCJheRBq.cjs → index--nUS7Y66.cjs} +1 -1
  123. package/lib/{index--knBGB61.js → index-4pRt5Vqu.js} +680 -791
  124. package/lib/{index-DLqogznp.cjs → index-BBNITgNi.cjs} +7 -7
  125. package/lib/{index-ccgHvIfu.js → index-BQ6ZdLsu.js} +1 -1
  126. package/lib/{index-DylewabB.cjs → index-BZ6DfR2r.cjs} +1 -1
  127. package/lib/{index-Dwt9--mS.js → index-BimeTI7q.js} +1 -1
  128. package/lib/{index-TMqmkmT6.cjs → index-CApXPpjF.cjs} +1 -1
  129. package/lib/{index-BvYjBPF9.js → index-CbIQPoF6.js} +12 -11
  130. package/lib/index-DvvMf6Wu.cjs +7 -0
  131. package/lib/{index-RKufd2EL.js → index-EKFybgpP.js} +1 -1
  132. package/lib/index.cjs +1 -1
  133. package/lib/index.js +2 -2
  134. package/lib/{input-BxzQAIRv.cjs → input-BtDj0NeF.cjs} +1 -1
  135. package/lib/{input-DR_5pbuA.js → input-C5zU49Q1.js} +1 -1
  136. package/lib/{isNumber-1y3eeW-y.js → isNumber-8HKEgTkA.js} +1 -1
  137. package/lib/{isNumber-C2saEiG2.cjs → isNumber-Bv1Qhmw8.cjs} +1 -1
  138. package/lib/{label-D-0oXKCn.js → label-BEUVs-IA.js} +1 -1
  139. package/lib/{label-BfWfLggp.cjs → label-C8BonzOY.cjs} +1 -1
  140. package/lib/{popover-D3spkemr.js → popover-CPY5lMCj.js} +1 -1
  141. package/lib/{popover-sP8CwbV-.cjs → popover-DjL0De8d.cjs} +1 -1
  142. package/lib/{separator-rM48NeAo.js → separator-BlIlS7LP.js} +18 -18
  143. package/lib/{separator-yycaNdlI.cjs → separator-BzMkiI_c.cjs} +1 -1
  144. package/lib/{store-BajRl43v.cjs → store-BSCjQxMK.cjs} +1 -1
  145. package/lib/{store-NKeQOve_.js → store-D_GvIPxo.js} +1 -1
  146. package/lib/style.css +1 -1
  147. package/lib/{tabs-D2nCIOVL.cjs → tabs-CHy82_rs.cjs} +1 -1
  148. package/lib/{tabs-Cb6Bmpbb.js → tabs-tQpXIzfV.js} +1 -1
  149. package/lib/{textarea-Cbwi_h4h.cjs → textarea-B-qfanCT.cjs} +1 -1
  150. package/lib/{textarea-BYZu1lUC.js → textarea-CMDYVXYo.js} +1 -1
  151. package/lib/{throttle-CjwXmkIY.js → throttle-BIkZV3Y_.js} +1 -1
  152. package/lib/{throttle-DXN-aiH5.cjs → throttle-BM3Bmbf_.cjs} +1 -1
  153. package/lib/{updatePosition-BAGpT34H.js → updatePosition-GLTrgcib.js} +1 -1
  154. package/lib/{updatePosition-C17CDdjq.cjs → updatePosition-u2mTh3mG.cjs} +1 -1
  155. package/lib/{useButtonProps-TfmRCM9r.cjs → useButtonProps-BqBGuqoP.cjs} +1 -1
  156. package/lib/{useButtonProps-BIH_9bXT.js → useButtonProps-DTngjZge.js} +2 -2
  157. package/package.json +55 -55
  158. package/lib/Katex-BKL_6NWF.cjs +0 -4
  159. package/lib/Twitter-DwWVNAV5.cjs +0 -1
  160. package/lib/index-D42xFOzI.cjs +0 -7
@@ -1,4 +1,4 @@
1
- import { M as y, m as p, E as l } from "./index-BvYjBPF9.js";
1
+ import { M as y, m as p, E as l } from "./index-CbIQPoF6.js";
2
2
  var d = 20, u = (t, e = 0) => {
3
3
  const r = [];
4
4
  return !t.children.length || e > d || Array.from(t.children).forEach((o) => {
@@ -1 +1 @@
1
- "use strict";const i=require("./index-DLqogznp.cjs");var c=20,u=(t,e=0)=>{const r=[];return!t.children.length||e>c||Array.from(t.children).forEach(o=>{o.tagName==="SPAN"?r.push(o):o.children.length&&r.push(...u(o,e+1))}),r},f=t=>{if(!t.children.length)return;const e=u(t);e&&e.forEach(r=>{var o,n;const s=r.getAttribute("style"),l=(n=(o=r.parentElement)==null?void 0:o.closest("span"))==null?void 0:n.getAttribute("style");r.setAttribute("style",`${l};${s}`)})},m=i.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&f(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",i.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(r,o)=>{if(r.isTextblock)return!0;r.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(o,o+r.nodeSize,this.type)}),!0}}}}),g=i.Extension.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),y=i.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),p=i.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),h=i.Extension.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),d=i.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});i.Extension.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(g.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(y.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(p.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(h.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(d.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(m.configure(this.options.textStyle)),t}});exports.Color=y;exports.FontFamily=p;exports.LineHeight=d;
1
+ "use strict";const i=require("./index-BBNITgNi.cjs");var c=20,u=(t,e=0)=>{const r=[];return!t.children.length||e>c||Array.from(t.children).forEach(o=>{o.tagName==="SPAN"?r.push(o):o.children.length&&r.push(...u(o,e+1))}),r},f=t=>{if(!t.children.length)return;const e=u(t);e&&e.forEach(r=>{var o,n;const s=r.getAttribute("style"),l=(n=(o=r.parentElement)==null?void 0:o.closest("span"))==null?void 0:n.getAttribute("style");r.setAttribute("style",`${l};${s}`)})},m=i.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&f(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",i.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(r,o)=>{if(r.isTextblock)return!0;r.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(o,o+r.nodeSize,this.type)}),!0}}}}),g=i.Extension.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),y=i.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),p=i.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),h=i.Extension.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),d=i.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});i.Extension.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(g.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(y.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(p.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(h.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(d.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(m.configure(this.options.textStyle)),t}});exports.Color=y;exports.FontFamily=p;exports.LineHeight=d;
@@ -1,4 +1,4 @@
1
- import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-BvYjBPF9.js";
1
+ import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-CbIQPoF6.js";
2
2
  var V = Object.defineProperty, X = (t, e) => {
3
3
  for (var s in e)
4
4
  V(t, s, { get: e[s], enumerable: !0 });
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index-DLqogznp.cjs");var _=Object.defineProperty,R=(t,e)=>{for(var s in e)_(t,s,{get:e[s],enumerable:!0})},D="listItem",v="textStyle",I=/^\s*([-+*])\s$/,A=o.Node3.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
1
+ "use strict";const o=require("./index-BBNITgNi.cjs");var _=Object.defineProperty,R=(t,e)=>{for(var s in e)_(t,s,{get:e[s],enumerable:!0})},D="listItem",v="textStyle",I=/^\s*([-+*])\s$/,A=o.Node3.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
2
2
  `):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(D,this.editor.getAttributes(v)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=o.wrappingInputRule({find:I,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=o.wrappingInputRule({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(v),editor:this.editor})),[t]}}),B=o.Node3.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",o.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let s=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(r=>r.type==="paragraph"))s=e.parseChildren(t.tokens);else{const r=t.tokens[0];if(r&&r.type==="text"&&r.tokens&&r.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(r.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),a=e.parseChildren(l);s.push(...a)}}else s=e.parseChildren(t.tokens)}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,s)=>o.renderNestedMarkdownContent(t,e,n=>n.parentType==="bulletList"?"- ":n.parentType==="orderedList"?`${n.index+1}. `:"- ",s),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),j={};R(j,{findListItemPos:()=>k,getNextListDepth:()=>y,handleBackspace:()=>b,handleDelete:()=>g,hasListBefore:()=>w,hasListItemAfter:()=>K,hasListItemBefore:()=>C,listItemHasSubList:()=>N,nextListIsDeeper:()=>E,nextListIsHigher:()=>H});var k=(t,e)=>{const{$from:s}=e.selection,n=o.getNodeType(t,e.schema);let r=null,i=s.depth,l=s.pos,a=null;for(;i>0&&a===null;)r=s.node(i),r.type===n?a=i:(i-=1,l-=1);return a===null?null:{$pos:e.doc.resolve(l),depth:a}},y=(t,e)=>{const s=k(t,e);if(!s)return!1;const[,n]=o.getNodeAtPosition(e,t,s.$pos.pos+4);return n},w=(t,e,s)=>{const{$anchor:n}=t.selection,r=Math.max(0,n.pos-2),i=t.doc.resolve(r).node();return!(!i||!s.includes(i.type.name))},C=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-2);return!(r.index()===0||((s=r.nodeBefore)==null?void 0:s.type.name)!==t)},N=(t,e,s)=>{if(!s)return!1;const n=o.getNodeType(t,e.schema);let r=!1;return s.descendants(i=>{i.type===n&&(r=!0)}),r},b=(t,e,s)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!o.isNodeActive(t.state,e)&&w(t.state,e,s)){const{$anchor:a}=t.state.selection,h=t.state.doc.resolve(a.before()-1),m=[];h.node().descendants((c,p)=>{c.type.name===e&&m.push({node:c,pos:p})});const d=m.at(-1);if(!d)return!1;const u=t.state.doc.resolve(h.start()+d.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!o.isNodeActive(t.state,e)||!o.isAtStartOfNode(t.state))return!1;const n=k(e,t.state);if(!n)return!1;const i=t.state.doc.resolve(n.$pos.pos-2).node(n.depth),l=N(e,t.state,i);return C(e,t.state)&&!l?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},E=(t,e)=>{const s=y(t,e),n=k(t,e);return!n||!s?!1:s>n.depth},H=(t,e)=>{const s=y(t,e),n=k(t,e);return!n||!s?!1:s<n.depth},g=(t,e)=>{if(!o.isNodeActive(t.state,e)||!o.isAtEndOfNode(t.state,e))return!1;const{selection:s}=t.state,{$from:n,$to:r}=s;return!s.empty&&n.sameParent(r)?!1:E(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():H(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},K=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||((s=r.nodeAfter)==null?void 0:s.type.name)!==t)},V=o.Extension.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&g(t,s)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&g(t,s)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&b(t,s,n)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&b(t,s,n)&&(e=!0)}),e}}}}),T=/^(\s*)(\d+)\.\s+(.*)$/,X=/^\s/;function z(t){const e=[];let s=0,n=0;for(;s<t.length;){const r=t[s],i=r.match(T);if(!i)break;const[,l,a,h]=i,m=l.length;let d=h,u=s+1;const c=[r];for(;u<t.length;){const p=t[u];if(p.match(T))break;if(p.trim()==="")c.push(p),d+=`
3
3
  `,u+=1;else if(p.match(X))c.push(p),d+=`
4
4
  ${p.slice(m+2)}`,u+=1;else break}e.push({indent:m,number:parseInt(a,10),content:d.trim(),raw:c.join(`
@@ -6958,18 +6958,19 @@ var Ea = class extends L.Component {
6958
6958
  this.init();
6959
6959
  }
6960
6960
  init() {
6961
- const n = this.props.editor;
6962
- if (n && !n.isDestroyed && n.options.element) {
6963
- if (n.contentComponent)
6961
+ var n;
6962
+ const e = this.props.editor;
6963
+ if (e && !e.isDestroyed && ((n = e.view.dom) != null && n.parentNode)) {
6964
+ if (e.contentComponent)
6964
6965
  return;
6965
- const e = this.editorContentRef.current;
6966
- e.append(n.view.dom), n.setOptions({
6967
- element: e
6968
- }), n.contentComponent = ba(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = n.contentComponent.subscribe(() => {
6969
- this.setState((t) => t.hasContentComponentInitialized ? t : {
6966
+ const t = this.editorContentRef.current;
6967
+ t.append(...e.view.dom.parentNode.childNodes), e.setOptions({
6968
+ element: t
6969
+ }), e.contentComponent = ba(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = e.contentComponent.subscribe(() => {
6970
+ this.setState((r) => r.hasContentComponentInitialized ? r : {
6970
6971
  hasContentComponentInitialized: !0
6971
6972
  }), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
6972
- })), n.createNodeViews(), this.initialized = !0;
6973
+ })), e.createNodeViews(), this.initialized = !0;
6973
6974
  }
6974
6975
  }
6975
6976
  componentWillUnmount() {
@@ -6980,10 +6981,10 @@ var Ea = class extends L.Component {
6980
6981
  nodeViews: {}
6981
6982
  }), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent(), e.contentComponent = null;
6982
6983
  try {
6983
- if (!((n = e.view.dom) != null && n.firstChild))
6984
+ if (!((n = e.view.dom) != null && n.parentNode))
6984
6985
  return;
6985
6986
  const t = document.createElement("div");
6986
- t.append(e.view.dom), e.setOptions({
6987
+ t.append(...e.view.dom.parentNode.childNodes), e.setOptions({
6987
6988
  element: t
6988
6989
  });
6989
6990
  } catch {
@@ -0,0 +1,7 @@
1
+ "use strict";const i=require("react/jsx-runtime"),x=require("react"),qe=require("@radix-ui/react-slot"),ge=require("./index-FSRjMsxW.cjs"),pe=require("./theme.cjs"),k=require("./events.constant-DQYeJpu5.cjs"),De=require("@radix-ui/react-tooltip"),Xe=require("@radix-ui/react-toggle"),W=require("@radix-ui/react-icons"),c=require("lucide-react"),Ce=require("./index-BBNITgNi.cjs");function ee(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const je=ee(x),I=ee(De),Se=ee(Xe),te="-",Ke=e=>{const r=Ze(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{const s=a.split(te);return s[0]===""&&s.length!==1&&s.shift(),ke(s,r)||Qe(a)},getConflictingClassGroupIds:(a,s)=>{const h=t[a]||[];return s&&o[a]?[...h,...o[a]]:h}}},ke=(e,r)=>{var a;if(e.length===0)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),l=o?ke(e.slice(1),o):void 0;if(l)return l;if(r.validators.length===0)return;const n=e.join(te);return(a=r.validators.find(({validator:s})=>s(n)))==null?void 0:a.classGroupId},me=/^\[(.+)\]$/,Qe=e=>{if(me.test(e)){const r=me.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Ze=e=>{const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return Ye(Object.entries(e.classGroups),t).forEach(([n,a])=>{J(a,o,n,r)}),o},J=(e,r,t,o)=>{e.forEach(l=>{if(typeof l=="string"){const n=l===""?r:fe(r,l);n.classGroupId=t;return}if(typeof l=="function"){if(Je(l)){J(l(o),r,t,o);return}r.validators.push({validator:l,classGroupId:t});return}Object.entries(l).forEach(([n,a])=>{J(a,fe(r,n),t,o)})})},fe=(e,r)=>{let t=e;return r.split(te).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},Je=e=>e.isThemeGetter,Ye=(e,r)=>r?e.map(([t,o])=>{const l=o.map(n=>typeof n=="string"?r+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([a,s])=>[r+a,s])):n);return[t,l]}):e,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const l=(n,a)=>{t.set(n,a),r++,r>e&&(r=0,o=t,t=new Map)};return{get(n){let a=t.get(n);if(a!==void 0)return a;if((a=o.get(n))!==void 0)return l(n,a),a},set(n,a){t.has(n)?t.set(n,a):l(n,a)}}},ze="!",tt=e=>{const{separator:r,experimentalParseClassName:t}=e,o=r.length===1,l=r[0],n=r.length,a=s=>{const h=[];let u=0,p=0,m;for(let f=0;f<s.length;f++){let C=s[f];if(u===0){if(C===l&&(o||s.slice(f,f+n)===r)){h.push(s.slice(p,f)),p=f+n;continue}if(C==="/"){m=f;continue}}C==="["?u++:C==="]"&&u--}const d=h.length===0?s:s.substring(p),b=d.startsWith(ze),j=b?d.substring(1):d,v=m&&m>p?m-p:void 0;return{modifiers:h,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:v}};return t?s=>t({className:s,parseClassName:a}):a},rt=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(o=>{o[0]==="["?(r.push(...t.sort(),o),t=[]):t.push(o)}),r.push(...t.sort()),r},ot=e=>({cache:et(e.cacheSize),parseClassName:tt(e),...Ke(e)}),nt=/\s+/,st=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:l}=r,n=[],a=e.trim().split(nt);let s="";for(let h=a.length-1;h>=0;h-=1){const u=a[h],{modifiers:p,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:b}=t(u);let j=!!b,v=o(j?d.substring(0,b):d);if(!v){if(!j){s=u+(s.length>0?" "+s:s);continue}if(v=o(d),!v){s=u+(s.length>0?" "+s:s);continue}j=!1}const f=rt(p).join(":"),C=m?f+ze:f,S=C+v;if(n.includes(S))continue;n.push(S);const H=l(v,j);for(let T=0;T<H.length;++T){const B=H[T];n.push(C+B)}s=u+(s.length>0?" "+s:s)}return s};function it(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=Ee(r))&&(o&&(o+=" "),o+=t);return o}const Ee=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=Ee(e[o]))&&(t&&(t+=" "),t+=r);return t};function lt(e,...r){let t,o,l,n=a;function a(h){const u=r.reduce((p,m)=>m(p),e());return t=ot(u),o=t.cache.get,l=t.cache.set,n=s,s(h)}function s(h){const u=o(h);if(u)return u;const p=st(h,t);return l(h,p),p}return function(){return n(it.apply(null,arguments))}}const w=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Me=/^\[(?:([a-z-]+):)?(.+)\]$/i,ct=/^\d+\/\d+$/,at=new Set(["px","full","screen"]),dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ut=/\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$/,ht=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=e=>R(e)||at.has(e)||ct.test(e),M=e=>A(e,"length",Ct),R=e=>!!e&&!Number.isNaN(Number(e)),X=e=>A(e,"number",R),V=e=>!!e&&Number.isInteger(Number(e)),mt=e=>e.endsWith("%")&&R(e.slice(0,-1)),g=e=>Me.test(e),L=e=>dt.test(e),ft=new Set(["length","size","percentage"]),xt=e=>A(e,ft,Le),bt=e=>A(e,"position",Le),wt=new Set(["image","url"]),vt=e=>A(e,wt,St),yt=e=>A(e,"",jt),N=()=>!0,A=(e,r,t)=>{const o=Me.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},Ct=e=>ut.test(e)&&!ht.test(e),Le=()=>!1,jt=e=>gt.test(e),St=e=>pt.test(e),kt=()=>{const e=w("colors"),r=w("spacing"),t=w("blur"),o=w("brightness"),l=w("borderColor"),n=w("borderRadius"),a=w("borderSpacing"),s=w("borderWidth"),h=w("contrast"),u=w("grayscale"),p=w("hueRotate"),m=w("invert"),d=w("gap"),b=w("gradientColorStops"),j=w("gradientColorStopPositions"),v=w("inset"),f=w("margin"),C=w("opacity"),S=w("padding"),H=w("saturate"),T=w("scale"),B=w("sepia"),ie=w("skew"),le=w("space"),ce=w("translate"),$=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",g,r],y=()=>[g,r],ae=()=>["",E,M],G=()=>["auto",R,g],de=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",g],he=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[R,g];return{cacheSize:500,separator:":",theme:{colors:[N],spacing:[E,M],blur:["none","",L,g],brightness:z(),borderColor:[e],borderRadius:["none","","full",L,g],borderSpacing:y(),borderWidth:ae(),contrast:z(),grayscale:P(),hueRotate:z(),invert:P(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[mt,M],inset:q(),margin:q(),opacity:z(),padding:y(),saturate:z(),scale:z(),sepia:P(),skew:z(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[L]}],"break-after":[{"break-after":he()}],"break-before":[{"break-before":he()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...de(),g]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",V,g]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",V,g]}],"grid-cols":[{"grid-cols":[N]}],"col-start-end":[{col:["auto",{span:["full",V,g]},g]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[N]}],"row-start-end":[{row:["auto",{span:[V,g]},g]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,r]}],"min-w":[{"min-w":[g,r,"min","max","fit"]}],"max-w":[{"max-w":[g,r,"none","full","min","max","fit","prose",{screen:[L]},L]}],h:[{h:[g,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,r,"auto","min","max","fit"]}],"font-size":[{text:["base",L,M]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",X]}],"font-family":[{font:[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",g]}],"line-clamp":[{"line-clamp":["none",R,X]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",E,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",E,M]}],"underline-offset":[{"underline-offset":["auto",E,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...de(),bt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:O()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[E,g]}],"outline-w":[{outline:[E,M]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[E,M]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",L,yt]}],"shadow-color":[{shadow:[N]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",L,g]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[H]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[V,g]}],"translate-x":[{"translate-x":[ce]}],"translate-y":[{"translate-y":[ce]}],"skew-x":[{"skew-x":[ie]}],"skew-y":[{"skew-y":[ie]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{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",g]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",g]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[E,M,X]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zt=lt(kt);function U(...e){return zt(Ce.clsx(e))}let K;function Q(){return K===void 0&&(K=navigator.platform.includes("Mac")),K}function Te(e){return`${e}`.toLowerCase()==="mod"?Q()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Q()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Q()?"⇧":"Shift":e}function Re(e){return e.map(Te).join(" ")}const Et=x.forwardRef((e,r)=>{const{icon:t=void 0,tooltip:o=void 0,disabled:l=!1,customClass:n="",loading:a=void 0,shortcutKeys:s=void 0,tooltipOptions:h={},action:u=void 0,isActive:p=void 0,children:m,asChild:d=!1,upload:b=!1,initialDisplayedColor:j=void 0,dataState:v=!1,...f}=e,C=Ve[t],S=d?qe.Slot:re;return i.jsxs(Ie,{children:[i.jsx(Be,{asChild:!0,children:i.jsxs(S,{className:U("richtext-w-[32px] richtext-h-[32px]",n),"data-state":v?"on":"off",disabled:l,onClick:u,ref:r,size:"sm",...f,children:[C&&i.jsx(C,{className:"richtext-size-4"}),m]})}),o&&i.jsx(oe,{...h,className:"richtext-tooltip",children:i.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[i.jsx("div",{children:o}),!!(s!=null&&s.length)&&i.jsx("span",{children:Re(s)})]})})]})}),Z=typeof window>"u";function xe(e,r,t=window){const o=x.useRef(void 0);x.useEffect(()=>{o.current=r},[r]),x.useEffect(()=>{if(!(t&&t.addEventListener))return;const n=a=>{o.current&&o.current(a)};return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}},[e,t])}function _(e,r,t={}){const{initializeWithValue:o=!0}=t,l=x.useCallback(d=>t.serializer?t.serializer(d):JSON.stringify(d),[t]),n=x.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;const b=r instanceof Function?r():r;let j;try{j=JSON.parse(d)}catch(v){return console.error("Error parsing JSON:",v),b}return j},[t,r]),a=x.useCallback(()=>{const d=r instanceof Function?r():r;if(Z)return d;try{const b=window.localStorage.getItem(e);return b?n(b):d}catch(b){return console.warn(`Error reading localStorage key “${e}”:`,b),d}},[r,e,n]),[s,h]=x.useState(()=>o?a():r instanceof Function?r():r),u=x.useCallback(d=>{Z&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const b=d instanceof Function?d(a()):d;window.localStorage.setItem(e,l(b)),h(b),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(b){console.warn(`Error setting localStorage key “${e}”:`,b)}},[e,l,a]),p=x.useCallback(()=>{Z&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const d=r instanceof Function?r():r;window.localStorage.removeItem(e),h(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))},[e,r]);x.useEffect(()=>{h(a())},[e]);const m=x.useCallback(d=>{d.key&&d.key!==e||h(a())},[e,a]);return xe("storage",m),xe("local-storage",m),[s,u,p]}function Mt(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"})})}function Lt(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"})})}function Tt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",color:"currentColor"})})}function Rt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",color:"currentColor"})})}function At(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function Ht(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"})})}function Ae(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 48 48",...e,children:i.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Pt(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function Vt(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function Nt(e){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:i.jsx("path",{fill:"currentColor",d:"M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"})})}function It(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6l1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6l-1.4-1.4z"})})}function Bt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"})})}function Gt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"})})}function Ot(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"})})}function Wt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"})})}function He(){return i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[i.jsx("path",{fill:"currentColor",d:"M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"}),i.jsx("path",{fill:"currentColor",d:"M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"})]})}function Pe(){return i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[i.jsx("path",{fill:"currentColor",d:"M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"}),i.jsx("path",{fill:"currentColor",d:"m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"})]})}function _t(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[i.jsx("path",{d:"M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10"}),i.jsx("path",{d:"M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523"})]})})}function Ut(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:i.jsx("path",{fill:"currentColor",d:"M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"})})}function $t(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:i.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[i.jsx("circle",{cx:"10",cy:"24",r:"4"}),i.jsx("circle",{cx:"38",cy:"10",r:"4"}),i.jsx("circle",{cx:"38",cy:"24",r:"4"}),i.jsx("circle",{cx:"38",cy:"38",r:"4"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function Ft(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:i.jsx("path",{fill:"currentColor",d:"M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"})})}function qt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",color:"currentColor"})})}function Dt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function Xt(){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:i.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[i.jsx("path",{d:"M18 11c0-.818 0-1.57-.152-1.937s-.441-.657-1.02-1.235l-4.736-4.736c-.499-.499-.748-.748-1.058-.896a2 2 0 0 0-.197-.082C10.514 2 10.161 2 9.456 2c-3.245 0-4.868 0-5.967.886a4 4 0 0 0-.603.603C2 4.59 2 6.211 2 9.456V14c0 3.771 0 5.657 1.172 6.828S6.229 22 10 22h8M11 2.5V3c0 2.828 0 4.243.879 5.121C12.757 9 14.172 9 17 9h.5"}),i.jsx("path",{d:"M5 14v2.5M5 19v-2.5M8 14v2.5M8 19v-2.5m-3 0h3m2-2.5h1.25m1.25 0h-1.25m0 0v5m3.25 0v-5l1.75 2.5L18 14v5m2-5v5h2"})]})})}const Ve={Bold:c.Bold,LoaderCircle:c.LoaderCircle,Italic:c.Italic,Underline:c.Underline,Quote:c.Quote,TextQuote:Lt,Strikethrough:c.Strikethrough,Minus:c.Minus,Eraser:c.Eraser,PaintRoller:c.PaintRoller,Redo2:c.Redo2,Undo2:c.Undo2,AlignCenter:W.TextAlignCenterIcon,AlignJustify:W.TextAlignJustifyIcon,AlignLeft:W.TextAlignLeftIcon,AlignRight:W.TextAlignRightIcon,ChevronDown:c.ChevronDown,Subscript:c.Subscript,Superscript:c.Superscript,Code:c.Code,Code2:c.CodeXml,Type:c.Type,IndentIncrease:c.IndentIncrease,IndentDecrease:c.IndentDecrease,List:c.List,ListOrdered:c.ListOrdered,ListTodo:c.ListTodo,Link:c.Link,ImageUp:c.ImageUp,Video:c.Video,Maximize:c.Maximize,Minimize:c.Minimize,Table:c.Table,Sparkles:c.Sparkles,Pencil:c.Pencil,Unlink:c.Unlink,BetweenHorizonalEnd:c.BetweenHorizonalEnd,BetweenHorizonalStart:c.BetweenHorizonalStart,BetweenVerticalStart:c.BetweenVerticalStart,BetweenVerticalEnd:c.BetweenVerticalEnd,TableCellsMerge:c.TableCellsMerge,TableCellsSplit:c.TableCellsSplit,Trash2:c.Trash2,Trash:c.Trash,Replace:c.Replace,ChevronsUpDown:c.ChevronsUpDown,LineHeight:Ht,Word:At,Heading1:c.Heading1,Heading2:c.Heading2,Heading3:c.Heading3,Heading4:c.Heading4,Heading5:c.Heading5,Heading6:c.Heading6,Columns2:c.Columns2,Columns3:c.Columns3,Columns4:c.Columns4,Plus:c.Plus,Grip:c.GripVertical,Copy:c.Copy,Clipboard:c.Clipboard,PanelLeft:c.PanelLeft,PanelRight:c.PanelRight,Columns:c.Columns2,Iframe:c.Frame,MenuDown:Ae,SizeS:Nt,SizeM:Vt,SizeL:Pt,AspectRatio:Mt,Emoji:c.SmilePlus,DeleteColumn:Tt,DeleteRow:Rt,SearchAndReplace:c.Replace,EmojiIcon:c.SmilePlusIcon,KatexIcon:c.Sigma,ExportPdf:He,ExportWord:Pe,ImportWord:Dt,ColumnAddLeft:Bt,ColumnAddRight:Gt,BookMarked:c.BookMarked,Excalidraw:Wt,ZoomIn:c.ZoomIn,ZoomOut:c.ZoomOut,Settings:c.Settings,Eye:c.Eye,TextDirection:Ot,LeftToRight:Ut,RightToLeft:Ft,Attachment:c.Paperclip,GifIcon:_t,ChevronUp:c.ChevronUp,Crop:c.CropIcon,Mermaid:$t,Twitter:qt,CodeView:It,FlipX:c.FlipVertical,FlipY:c.FlipHorizontal,PencilRuler:c.PencilRuler,WrapText:c.WrapText,Loader:c.Loader2,X:c.X,Html:Xt,ExternalLink:c.ExternalLink},be=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,we=Ce.clsx,Ne=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return we(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:l,defaultVariants:n}=r,a=Object.keys(l).map(u=>{const p=t==null?void 0:t[u],m=n==null?void 0:n[u];if(p===null)return null;const d=be(p)||be(m);return l[u][d]}),s=t&&Object.entries(t).reduce((u,p)=>{let[m,d]=p;return d===void 0||(u[m]=d),u},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((u,p)=>{let{class:m,className:d,...b}=p;return Object.entries(b).every(j=>{let[v,f]=j;return Array.isArray(f)?f.includes({...n,...s}[v]):{...n,...s}[v]===f})?[...u,m,d]:u},[]);return we(e,a,h,t==null?void 0:t.class,t==null?void 0:t.className)},Kt=Ne("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",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),re=je.forwardRef(({className:e,variant:r,size:t,...o},l)=>i.jsx(Se.Root,{ref:l,className:U(Kt({variant:r,size:t,className:e})),...o}));re.displayName=Se.Root.displayName;const Qt=I.Provider,Ie=I.Root,Be=I.Trigger,oe=je.forwardRef(({className:e,sideOffset:r=4,...t},o)=>i.jsx(I.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:U("richtext-z-50 richtext-overflow-hidden richtext-rounded-md 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 !richtext-border-none",e),...t}));oe.displayName=I.Content.displayName;function ne(e){function r(){const n=x.useRef(e),a=x.useCallback(()=>n.current,[]),s=x.useRef(new Set),h=x.useCallback(p=>{n.current={...n.current,...p},s.current.forEach(m=>m())},[]),u=x.useCallback(p=>(s.current.add(p),()=>s.current.delete(p)),[]);return{get:a,set:h,subscribe:u}}const t=x.createContext(null);function o({children:n}){return i.jsx(t.Provider,{value:r(),children:n})}function l(n){const a=x.useContext(t);if(!a)throw new Error("Store not found");return[x.useSyncExternalStore(a.subscribe,()=>n(a.get()),()=>n(e)),a.set]}return{Provider:o,useStore:l}}ne({value:!1});ne({value:!1});const{Provider:Zt,useStore:Ge}=ne({value:!1});function Jt(){const[e]=Ge(r=>r.value);return e}const ve="data-rc-order",ye="data-rc-priority",Yt="rc-util-key",Y=new Map;function er(e,r){if(!e)return!1;if(e.contains)return e.contains(r);let t=r;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Oe({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Yt}function se(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function tr(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function We(e){return[...(Y.get(e)||e).children].filter(r=>r.tagName==="STYLE")}function _e(e,r={}){const{csp:t,prepend:o,priority:l=0}=r,n=tr(o),a=n==="prependQueue",s=document.createElement("style");s.setAttribute(ve,n),a&&l&&s.setAttribute(ye,`${l}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=e;const h=se(r),{firstChild:u}=h;if(o){if(a){const p=We(h).filter(m=>{if(!["prepend","prependQueue"].includes(m.getAttribute(ve)))return!1;const d=Number(m.getAttribute(ye)||0);return l>=d});if(p.length>0)return h.insertBefore(s,p.at(-1).nextSibling),s}u.before(s)}else h.append(s);return s}function Ue(e,r={}){const t=se(r);return We(t).find(o=>o.getAttribute(Oe(r))===e)}function $e(e,r={}){const t=Ue(e,r);t&&t.remove()}function rr(e,r){const t=Y.get(e);if(!t||!er(document,t)){const o=_e("",r),{parentNode:l}=o;Y.set(e,l),o.remove()}}function Fe(e,r,t={}){var a,s,h;const o=se(t);rr(o,t);const l=Ue(r,t);if(l)return(a=t.csp)!=null&&a.nonce&&l.nonce!==((s=t.csp)==null?void 0:s.nonce)&&(l.nonce=(h=t.csp)==null?void 0:h.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;const n=_e(e,t);return n.setAttribute(Oe(t),r),n}const or=x.memo(({editor:e,children:r})=>{const[,t]=Ge(l=>l.value);x.useEffect(()=>{t({value:e==null?void 0:e.isEditable})},[e==null?void 0:e.isEditable]);const o=()=>{t({value:e==null?void 0:e.isEditable})};return x.useEffect(()=>(e&&e.on("update",o),()=>{e&&e.off("update",o)}),[e]),i.jsx(i.Fragment,{children:r})});function nr(){const[,e]=ge.x(ge.atomLang),r=o=>{e(l=>({...l,currentLang:o.detail}))},t=o=>{const{lang:l,messages:n}=o.detail;e(a=>{if(a.message[l]){const s={...a.message[l],...n};return{currentLang:a.currentLang,message:{...a.message,[l]:s}}}else return{currentLang:a.currentLang,message:{...a.message,[l]:n}}})};return x.useEffect(()=>{const o=k.listenEvent(k.EVENTS.CHANGE_LANGUAGE,r),l=k.listenEvent(k.EVENTS.MODIFY_LANGUAGE,t);return()=>{o(),l()}},[]),i.jsx(i.Fragment,{})}function sr(){const[e,r]=_("richtext-theme","light"),[t,o]=_("richtext-color","default"),[l,n]=_("richtext-border-radius","0.65rem");x.useEffect(()=>{const u=e||"light",p=t||"default";let m=pe.THEME[u][p];if(!m){m=pe.THEME.light.default;return}return Fe(`
2
+ .reactjs-tiptap-editor, .reactjs-tiptap-editor *,
3
+ div[data-richtext-portal], div[data-richtext-portal] * {
4
+ ${Object.entries(m).map(([d,b])=>typeof l=="string"&&d==="radius"?`--${d}: ${l};`:`--${d}: ${b};`).join(`
5
+ `)}
6
+ }
7
+ `,"richtext-theme",{priority:50}),()=>{$e("richtext-theme")}},[e,t,l]);const a=u=>{r(u.detail)},s=u=>{o(u.detail)},h=u=>{n(u.detail)};return x.useEffect(()=>{const u=k.listenEvent(k.EVENTS.CHANGE_THEME,a),p=k.listenEvent(k.EVENTS.CHANGE_COLOR,s),m=k.listenEvent(k.EVENTS.CHANGE_BORDER_RADIUS,h);return()=>{u(),p(),m()}},[]),i.jsx(i.Fragment,{})}function ir({editor:e,children:r,id:t}){return i.jsxs(Zt,{children:[i.jsx(or,{editor:e,id:t,children:r}),i.jsx(nr,{}),i.jsx(sr,{})]})}exports.ActionButton=Et;exports.ExportPdf=He;exports.ExportWord=Pe;exports.MenuDown=Ae;exports.ProviderUniqueId=ir;exports.Toggle=re;exports.Tooltip=Ie;exports.TooltipContent=oe;exports.TooltipProvider=Qt;exports.TooltipTrigger=Be;exports.cn=U;exports.cva=Ne;exports.getShortcutKey=Te;exports.getShortcutKeys=Re;exports.icons=Ve;exports.removeCSS=$e;exports.updateCSS=Fe;exports.useEditableEditor=Jt;exports.useLocalStorage=_;
@@ -1,4 +1,4 @@
1
- import { T as D, v as m, S as Z, x as V, y as ft, D as Be, F, z as ut, A as dt } from "./index-BvYjBPF9.js";
1
+ import { T as D, v as m, S as Z, x as V, y as ft, D as Be, F, z as ut, A as dt } from "./index-CbIQPoF6.js";
2
2
  var $ = {
3
3
  8: "Backspace",
4
4
  9: "Tab",
package/lib/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),i=require("./index-D42xFOzI.cjs"),a=require("./index-DLqogznp.cjs"),s=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),i=require("./index-DvvMf6Wu.cjs"),a=require("./index-BBNITgNi.cjs"),s=`
2
2
  .reactjs-tiptap-editor {
3
3
  button,
4
4
  input:where([type=button]),
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, Fragment as n } from "react/jsx-runtime";
2
2
  import { useId as a, useEffect as r } from "react";
3
- import { u as s, r as p, P as l, e as h } from "./index--knBGB61.js";
4
- import { d } from "./index-BvYjBPF9.js";
3
+ import { u as s, r as p, P as l, e as h } from "./index-4pRt5Vqu.js";
4
+ import { d } from "./index-CbIQPoF6.js";
5
5
  const c = `
6
6
  .reactjs-tiptap-editor {
7
7
  button,
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-D42xFOzI.cjs");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const x=u(o),c=x.forwardRef(({className:t,type:r,...e},i)=>n.jsx("input",{ref:i,type:r,className:s.cn("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-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 ",t),...e}));c.displayName="Input";exports.Input=c;
1
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-DvvMf6Wu.cjs");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const x=u(o),c=x.forwardRef(({className:t,type:r,...e},i)=>n.jsx("input",{ref:i,type:r,className:s.cn("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-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 ",t),...e}));c.displayName="Input";exports.Input=c;
@@ -1,6 +1,6 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import { c as x } from "./index--knBGB61.js";
3
+ import { c as x } from "./index-4pRt5Vqu.js";
4
4
  const s = o.forwardRef(
5
5
  ({ className: t, type: e, ...r }, i) => /* @__PURE__ */ c(
6
6
  "input",
@@ -1,4 +1,4 @@
1
- import { t, i as d, b as a } from "./throttle-CjwXmkIY.js";
1
+ import { t, i as d, b as a } from "./throttle-BIkZV3Y_.js";
2
2
  function s(i, f, n) {
3
3
  return i === i && (n !== void 0 && (i = i <= n ? i : n), f !== void 0 && (i = i >= f ? i : f)), i;
4
4
  }
@@ -1 +1 @@
1
- "use strict";const n=require("./throttle-DXN-aiH5.cjs");function d(i,t,f){return i===i&&(f!==void 0&&(i=i<=f?i:f),t!==void 0&&(i=i>=t?i:t)),i}function c(i,t,f){return f===void 0&&(f=t,t=void 0),f!==void 0&&(f=n.toNumber(f),f=f===f?f:0),t!==void 0&&(t=n.toNumber(t),t=t===t?t:0),d(n.toNumber(i),t,f)}var s="[object Number]";function a(i){return typeof i=="number"||n.isObjectLike(i)&&n.baseGetTag(i)==s}exports.clamp=c;exports.isNumber=a;
1
+ "use strict";const n=require("./throttle-BM3Bmbf_.cjs");function d(i,t,f){return i===i&&(f!==void 0&&(i=i<=f?i:f),t!==void 0&&(i=i>=t?i:t)),i}function c(i,t,f){return f===void 0&&(f=t,t=void 0),f!==void 0&&(f=n.toNumber(f),f=f===f?f:0),t!==void 0&&(t=n.toNumber(t),t=t===t?t:0),d(n.toNumber(i),t,f)}var s="[object Number]";function a(i){return typeof i=="number"||n.isObjectLike(i)&&n.baseGetTag(i)==s}exports.clamp=c;exports.isNumber=a;
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import * as t from "@radix-ui/react-label";
4
- import { c as s, d as c } from "./index--knBGB61.js";
4
+ import { c as s, d as c } from "./index-4pRt5Vqu.js";
5
5
  const m = c(
6
6
  "richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
7
7
  ), d = i.forwardRef(({ className: e, ...r }, a) => /* @__PURE__ */ o(
@@ -1 +1 @@
1
- "use strict";const s=require("react/jsx-runtime"),l=require("react"),u=require("@radix-ui/react-label"),c=require("./index-D42xFOzI.cjs");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const d=i(l),n=i(u),m=c.cva("richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),o=d.forwardRef(({className:e,...r},t)=>s.jsx(n.Root,{className:c.cn(m(),e),ref:t,...r}));o.displayName=n.Root.displayName;exports.Label=o;
1
+ "use strict";const s=require("react/jsx-runtime"),l=require("react"),u=require("@radix-ui/react-label"),c=require("./index-DvvMf6Wu.cjs");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const d=i(l),n=i(u),m=c.cva("richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),o=d.forwardRef(({className:e,...r},t)=>s.jsx(n.Root,{className:c.cn(m(),e),ref:t,...r}));o.displayName=n.Root.displayName;exports.Label=o;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import * as t from "@radix-ui/react-popover";
4
- import { c as s } from "./index--knBGB61.js";
4
+ import { c as s } from "./index-4pRt5Vqu.js";
5
5
  const x = t.Root, p = t.Trigger, n = c.forwardRef(({ className: o, align: r = "center", sideOffset: i = 4, ...a }, d) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
6
6
  t.Content,
7
7
  {
@@ -1 +1 @@
1
- "use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-D42xFOzI.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none 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 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
1
+ "use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-DvvMf6Wu.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none 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 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
@@ -3,21 +3,21 @@ import * as P from "react";
3
3
  import { useState as f, useMemo as S, useCallback as M } from "react";
4
4
  import { Plus as R } from "lucide-react";
5
5
  import { HexColorPicker as O } from "react-colorful";
6
- import { j as B, c as _ } from "./index--knBGB61.js";
7
- import { B as $ } from "./button-C81t4pb1.js";
8
- import { I as j } from "./input-DR_5pbuA.js";
9
- import { P as v, a as b, b as g } from "./popover-D3spkemr.js";
10
- import * as C from "@radix-ui/react-separator";
11
- import { u as L, C as D } from "./index-0OnGZkVF.js";
6
+ import { j as B, c as _ } from "./index-4pRt5Vqu.js";
7
+ import { u as v, C as $ } from "./index-0OnGZkVF.js";
8
+ import { P as b, a as g, b as C } from "./popover-CPY5lMCj.js";
9
+ import { I as j } from "./input-C5zU49Q1.js";
10
+ import * as L from "@radix-ui/react-separator";
11
+ import { B as D } from "./button-D8SI-g7p.js";
12
12
  function I() {
13
13
  return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
14
14
  }
15
15
  function J(l) {
16
- const { t: h } = L(), {
16
+ const { t: h } = v(), {
17
17
  disabled: n = !1,
18
18
  value: a,
19
19
  onChange: i,
20
- colors: d = D,
20
+ colors: d = $,
21
21
  highlight: x
22
22
  } = l, [c, u] = f(!1), w = S(() => {
23
23
  const t = d, r = [];
@@ -36,14 +36,14 @@ function J(l) {
36
36
  /^#([\da-f]{3}){1,2}$/i.test(t) && (i == null || i(t), y(t), u(!1));
37
37
  }
38
38
  return /* @__PURE__ */ s(
39
- v,
39
+ b,
40
40
  {
41
41
  modal: !0,
42
42
  onOpenChange: u,
43
43
  open: c,
44
44
  children: [
45
45
  /* @__PURE__ */ e(
46
- b,
46
+ g,
47
47
  {
48
48
  asChild: !0,
49
49
  className: "!richtext-p-0",
@@ -52,7 +52,7 @@ function J(l) {
52
52
  }
53
53
  ),
54
54
  /* @__PURE__ */ e(
55
- g,
55
+ C,
56
56
  {
57
57
  align: "start",
58
58
  className: "richtext-size-full !richtext-p-2",
@@ -157,19 +157,19 @@ function J(l) {
157
157
  );
158
158
  }
159
159
  function Z({ setColor: l }) {
160
- const { t: h } = L(), [n, a] = f(!1), [i, d] = f("#000000"), x = M(
160
+ const { t: h } = v(), [n, a] = f(!1), [i, d] = f("#000000"), x = M(
161
161
  (c) => {
162
162
  d(c);
163
163
  },
164
164
  []
165
165
  );
166
166
  return /* @__PURE__ */ s(
167
- v,
167
+ b,
168
168
  {
169
169
  onOpenChange: a,
170
170
  open: n,
171
171
  children: [
172
- /* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ s(
172
+ /* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ s(
173
173
  "div",
174
174
  {
175
175
  className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",
@@ -179,7 +179,7 @@ function Z({ setColor: l }) {
179
179
  ]
180
180
  }
181
181
  ) }),
182
- /* @__PURE__ */ s(g, { children: [
182
+ /* @__PURE__ */ s(C, { children: [
183
183
  /* @__PURE__ */ s("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
184
184
  /* @__PURE__ */ e(
185
185
  O,
@@ -204,7 +204,7 @@ function Z({ setColor: l }) {
204
204
  ] }),
205
205
  /* @__PURE__ */ e(N, { className: "richtext-my-[10px]" }),
206
206
  /* @__PURE__ */ e(
207
- $,
207
+ D,
208
208
  {
209
209
  className: "richtext-w-full",
210
210
  onClick: (c) => {
@@ -220,7 +220,7 @@ function Z({ setColor: l }) {
220
220
  }
221
221
  const N = P.forwardRef(
222
222
  ({ className: l, orientation: h = "horizontal", decorative: n = !0, ...a }, i) => /* @__PURE__ */ e(
223
- C.Root,
223
+ L.Root,
224
224
  {
225
225
  ref: i,
226
226
  decorative: n,
@@ -234,7 +234,7 @@ const N = P.forwardRef(
234
234
  }
235
235
  )
236
236
  );
237
- N.displayName = C.Root.displayName;
237
+ N.displayName = L.Root.displayName;
238
238
  export {
239
239
  J as C,
240
240
  N as S
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-D42xFOzI.cjs"),S=require("./button-B6ukqDUf.cjs"),O=require("./input-BxzQAIRv.cjs"),h=require("./popover-sP8CwbV-.cjs"),z=require("@radix-ui/react-separator"),v=require("./index-FSRjMsxW.cjs");function g(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(o,n,x.get?x:{enumerable:!0,get:()=>r[n]})}}return o.default=r,Object.freeze(o)}const R=g(a),C=g(z);function q(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}function _(r){const{t:o}=v.useLocale(),{disabled:n=!1,value:x,onChange:i,colors:u=v.COLORS_LIST,highlight:d}=r,[s,m]=a.useState(!1),L=a.useMemo(()=>{const t=u,c=[];for(let l=0;l<t.length;l+=10)c.push(t.slice(l,l+10));return c},[u]),[p,N]=b.useLocalStorage(d?"richtext-recent-highlight":"richtext-recent-colors",[]),w=t=>{const c=[...p],l=c.indexOf(t);l!==-1&&c.splice(l,1),c.unshift(t),c.length>10&&c.pop(),N(c)};function f(t){if(t===void 0){i==null||i(t),m(!1);return}/^#([\da-f]{3}){1,2}$/i.test(t)&&(i==null||i(t),w(t),m(!1))}return e.jsxs(h.Popover,{modal:!0,onOpenChange:m,open:s,children:[e.jsx(h.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:n,children:r==null?void 0:r.children}),e.jsx(h.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{f(void 0)},children:[e.jsx(q,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:o(d?"editor.nofill":"editor.default")})]}),L.map((t,c)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:t.map((l,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>f(l),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:l},children:l===x?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${c}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:o("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:p==null?void 0:p.map((t,c)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>f(t),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:t},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${c}`))})]}),e.jsx(M,{setColor:f})]})})]})}function M({setColor:r}){const{t:o}=v.useLocale(),[n,x]=a.useState(!1),[i,u]=a.useState("#000000"),d=a.useCallback(s=>{u(s)},[]);return e.jsxs(h.Popover,{onOpenChange:x,open:n,children:[e.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[o("editor.color.more"),"..."]})}),e.jsxs(h.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:s=>{d(s)}}),e.jsx(O.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:s=>{s.preventDefault(),s.stopPropagation(),d(`#${s.target.value}`)}})]}),e.jsx(j,{className:"richtext-my-[10px]"}),e.jsx(S.Button,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),s.stopPropagation(),r(i),x(!1)},children:e.jsx(y.Plus,{size:16})})]})]})}const j=R.forwardRef(({className:r,orientation:o="horizontal",decorative:n=!0,...x},i)=>e.jsx(C.Root,{ref:i,decorative:n,orientation:o,className:b.cn("richtext-shrink-0 richtext-bg-border",o==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",r),...x}));j.displayName=C.Root.displayName;exports.ColorPicker=_;exports.Separator=j;
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-DvvMf6Wu.cjs"),v=require("./index-FSRjMsxW.cjs"),h=require("./popover-DjL0De8d.cjs"),S=require("./input-BtDj0NeF.cjs"),O=require("@radix-ui/react-separator"),z=require("./button-U6XpZt2X.cjs");function g(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(o,n,x.get?x:{enumerable:!0,get:()=>r[n]})}}return o.default=r,Object.freeze(o)}const R=g(a),C=g(O);function q(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}function _(r){const{t:o}=v.useLocale(),{disabled:n=!1,value:x,onChange:i,colors:u=v.COLORS_LIST,highlight:d}=r,[s,m]=a.useState(!1),L=a.useMemo(()=>{const t=u,c=[];for(let l=0;l<t.length;l+=10)c.push(t.slice(l,l+10));return c},[u]),[p,N]=b.useLocalStorage(d?"richtext-recent-highlight":"richtext-recent-colors",[]),w=t=>{const c=[...p],l=c.indexOf(t);l!==-1&&c.splice(l,1),c.unshift(t),c.length>10&&c.pop(),N(c)};function f(t){if(t===void 0){i==null||i(t),m(!1);return}/^#([\da-f]{3}){1,2}$/i.test(t)&&(i==null||i(t),w(t),m(!1))}return e.jsxs(h.Popover,{modal:!0,onOpenChange:m,open:s,children:[e.jsx(h.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:n,children:r==null?void 0:r.children}),e.jsx(h.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{f(void 0)},children:[e.jsx(q,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:o(d?"editor.nofill":"editor.default")})]}),L.map((t,c)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:t.map((l,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>f(l),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:l},children:l===x?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${c}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:o("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:p==null?void 0:p.map((t,c)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>f(t),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:t},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${c}`))})]}),e.jsx(M,{setColor:f})]})})]})}function M({setColor:r}){const{t:o}=v.useLocale(),[n,x]=a.useState(!1),[i,u]=a.useState("#000000"),d=a.useCallback(s=>{u(s)},[]);return e.jsxs(h.Popover,{onOpenChange:x,open:n,children:[e.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[o("editor.color.more"),"..."]})}),e.jsxs(h.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:s=>{d(s)}}),e.jsx(S.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:s=>{s.preventDefault(),s.stopPropagation(),d(`#${s.target.value}`)}})]}),e.jsx(j,{className:"richtext-my-[10px]"}),e.jsx(z.Button,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),s.stopPropagation(),r(i),x(!1)},children:e.jsx(y.Plus,{size:16})})]})]})}const j=R.forwardRef(({className:r,orientation:o="horizontal",decorative:n=!0,...x},i)=>e.jsx(C.Root,{ref:i,decorative:n,orientation:o,className:b.cn("richtext-shrink-0 richtext-bg-border",o==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",r),...x}));j.displayName=C.Root.displayName;exports.ColorPicker=_;exports.Separator=j;
@@ -1 +1 @@
1
- "use strict";require("./index-D42xFOzI.cjs");const e=require("./events.constant-DQYeJpu5.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
1
+ "use strict";require("./index-DvvMf6Wu.cjs");const e=require("./events.constant-DQYeJpu5.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
@@ -1,4 +1,4 @@
1
- import "./index--knBGB61.js";
1
+ import "./index-4pRt5Vqu.js";
2
2
  import { d as o, E as s } from "./events.constant-wrlJ_7JZ.js";
3
3
  const p = {
4
4
  setOpen: (a, t) => {