reactjs-tiptap-editor 1.0.9 → 1.0.10

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 (159) hide show
  1. package/lib/{ActionMenuButton-CmDopTWt.cjs → ActionMenuButton-BPdRqzDX.cjs} +1 -1
  2. package/lib/{ActionMenuButton-C4aNFFa8.js → ActionMenuButton-CKTxYtl7.js} +2 -2
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +7 -7
  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 +6 -6
  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 +6 -6
  15. package/lib/CodeBlock.cjs +39 -39
  16. package/lib/CodeBlock.js +837 -945
  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 +5 -5
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +8 -8
  23. package/lib/{Drawer-DG0gPU_U.js → Drawer-Cfx115up.js} +14 -14
  24. package/lib/{Drawer-CTr2snNd.cjs → Drawer-hHj4Opkg.cjs} +1 -1
  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 +16 -15
  29. package/lib/{Excalidraw-DtezFdjR.cjs → Excalidraw-8pWJ17Ye.cjs} +1 -1
  30. package/lib/{Excalidraw-DpgdxOsc.js → Excalidraw-CO93Tsmb.js} +19 -19
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +3 -3
  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 +5 -5
  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-C_buGjWy.js → Icon-D7GJZzoa.js} +1 -1
  50. package/lib/{Icon-b6HQAURz.cjs → Icon-gtc3g-VK.cjs} +1 -1
  51. package/lib/{Iframe-CUrXCDxj.cjs → Iframe-BmXO2c65.cjs} +1 -1
  52. package/lib/{Iframe-De88TYvj.js → Iframe-DwhclppJ.js} +13 -13
  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 +16 -16
  59. package/lib/ImportWord.cjs +2 -2
  60. package/lib/ImportWord.js +8 -8
  61. package/lib/{Indent-Bensb2nf.js → Indent-BOsymiZ7.js} +5 -5
  62. package/lib/{Indent-D_KtZNHW.cjs → Indent-DPkMWfcv.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-NqelWRoi.cjs → Katex-B1XbT8-X.cjs} +2 -2
  68. package/lib/{Katex-C0dtqznb.js → Katex-BYK-b9X2.js} +23 -23
  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 +12 -12
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-BSZ-vgNB.cjs → LinkEditBlock-4-iRXH7m.cjs} +2 -2
  76. package/lib/{LinkEditBlock-Bv12sKvW.js → LinkEditBlock-DgrLUMsJ.js} +52 -52
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +23 -22
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +38 -38
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +11 -11
  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 +16 -16
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +39 -266
  89. package/lib/SlashCommandNodeView-BpNNU7Sm.js +254 -0
  90. package/lib/SlashCommandNodeView-CQvMTXys.cjs +1 -0
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +3 -3
  93. package/lib/{Table-D9ckv6Tb.js → Table-CT9R9Sdq.js} +5 -5
  94. package/lib/{Table-cy1mUM2X.cjs → Table-LnWGm2m8.cjs} +1 -1
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +3 -3
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +10 -10
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +10 -10
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +3 -3
  105. package/lib/{Twitter-Bvs3sW8F.cjs → Twitter-Bo4JkBTL.cjs} +1 -1
  106. package/lib/{Twitter-KUvyySA0.js → Twitter-mowilxRd.js} +55 -55
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +2 -2
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +22 -22
  111. package/lib/bubble.cjs +4 -4
  112. package/lib/bubble.js +1604 -1506
  113. package/lib/{button-D8SI-g7p.js → button-CBO-WDXK.js} +1 -1
  114. package/lib/{button-U6XpZt2X.cjs → button-wt49IYwP.cjs} +1 -1
  115. package/lib/{checkbox-xrY2c5yo.js → checkbox-D1h32VWM.js} +1 -1
  116. package/lib/{checkbox-DaIBNthL.cjs → checkbox-DUcLSGZD.cjs} +1 -1
  117. package/lib/{dialog-DjnkASYP.js → dialog-DSvgtlDI.js} +1 -1
  118. package/lib/{dialog-DgnnVCfv.cjs → dialog-DY868Uji.cjs} +1 -1
  119. package/lib/{dropdown-menu-bI14Gyw4.js → dropdown-menu-B88Qn2KR.js} +3 -2
  120. package/lib/dropdown-menu-BripAeGB.cjs +1 -0
  121. package/lib/extensions/SlashCommand/types.d.ts +1 -0
  122. package/lib/index-9A6-kVBM.js +1351 -0
  123. package/lib/{index-4pRt5Vqu.js → index-BIqaogQg.js} +775 -662
  124. package/lib/index-BvIJKpX1.cjs +8 -0
  125. package/lib/index-Cv9Z6dyV.cjs +1 -0
  126. package/lib/{index-EKFybgpP.js → index-DKt5wfAc.js} +1 -1
  127. package/lib/{index-BimeTI7q.js → index-DRHrDScg.js} +1 -1
  128. package/lib/{index-BQ6ZdLsu.js → index-DmPwbBqm.js} +1 -1
  129. package/lib/{index-CbIQPoF6.js → index-sVScpCFG.js} +20 -20
  130. package/lib/index.cjs +1 -1
  131. package/lib/index.js +5 -5
  132. package/lib/{input-BtDj0NeF.cjs → input-BeD5GdMv.cjs} +1 -1
  133. package/lib/{input-C5zU49Q1.js → input-Bx4uo4gO.js} +1 -1
  134. package/lib/{isNumber-8HKEgTkA.js → isNumber-DF0fU3ob.js} +1 -1
  135. package/lib/{label-C8BonzOY.cjs → label--161UPH6.cjs} +1 -1
  136. package/lib/{label-BEUVs-IA.js → label-uKG7RzFU.js} +1 -1
  137. package/lib/{popover-CPY5lMCj.js → popover-BVX8otO9.js} +1 -1
  138. package/lib/{popover-DjL0De8d.cjs → popover-Csk538NC.cjs} +1 -1
  139. package/lib/{separator-BzMkiI_c.cjs → separator-DLRVddHS.cjs} +1 -1
  140. package/lib/{separator-BlIlS7LP.js → separator-DtrEdjAF.js} +18 -18
  141. package/lib/{store-BSCjQxMK.cjs → store-B8IkVz1J.cjs} +1 -1
  142. package/lib/{store-D_GvIPxo.js → store-CsIFDUKR.js} +1 -1
  143. package/lib/style.css +1 -1
  144. package/lib/{tabs-tQpXIzfV.js → tabs-BKpr0QQB.js} +1 -1
  145. package/lib/{tabs-CHy82_rs.cjs → tabs-DOasUMDU.cjs} +1 -1
  146. package/lib/{textarea-CMDYVXYo.js → textarea-Ba9OOzba.js} +1 -1
  147. package/lib/{textarea-B-qfanCT.cjs → textarea-D9egO4qC.cjs} +1 -1
  148. package/lib/{throttle-BIkZV3Y_.js → throttle-DsowOft0.js} +1 -1
  149. package/lib/updatePosition-Bbd8ETMv.js +16 -0
  150. package/lib/updatePosition-M2IyqkI1.cjs +1 -0
  151. package/lib/{useButtonProps-DTngjZge.js → useButtonProps-C_bqxmHi.js} +14 -14
  152. package/lib/{useButtonProps-BqBGuqoP.cjs → useButtonProps-DEtmDVPr.cjs} +1 -1
  153. package/package.json +1 -1
  154. package/lib/dropdown-menu-BvVMltdB.cjs +0 -1
  155. package/lib/floating-ui.dom-U1vPFQ5f.js +0 -1151
  156. package/lib/floating-ui.dom-VCrc58uF.cjs +0 -1
  157. package/lib/index-DvvMf6Wu.cjs +0 -7
  158. package/lib/updatePosition-GLTrgcib.js +0 -215
  159. package/lib/updatePosition-u2mTh3mG.cjs +0 -1
@@ -0,0 +1,8 @@
1
+ "use strict";const n=require("react/jsx-runtime"),x=require("react"),Je=require("@radix-ui/react-slot"),ge=require("./index-FSRjMsxW.cjs"),fe=require("./theme.cjs"),E=require("./events.constant-DQYeJpu5.cjs"),Ye=require("@radix-ui/react-toggle"),et=require("@radix-ui/react-tooltip"),tt=require("@radix-ui/react-select"),s=require("lucide-react"),$=require("@radix-ui/react-icons"),Se=require("./index-BBNITgNi.cjs");function q(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 N=q(x),ke=q(Ye),O=q(et),C=q(tt),oe="-",rt=e=>{const r=nt(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const a=l.split(oe);return a[0]===""&&a.length!==1&&a.shift(),ze(a,r)||ot(l)},getConflictingClassGroupIds:(l,a)=>{const h=t[l]||[];return a&&o[l]?[...h,...o[l]]:h}}},ze=(e,r)=>{var l;if(e.length===0)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),c=o?ze(e.slice(1),o):void 0;if(c)return c;if(r.validators.length===0)return;const i=e.join(oe);return(l=r.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},xe=/^\[(.+)\]$/,ot=e=>{if(xe.test(e)){const r=xe.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},nt=e=>{const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return st(Object.entries(e.classGroups),t).forEach(([i,l])=>{te(l,o,i,r)}),o},te=(e,r,t,o)=>{e.forEach(c=>{if(typeof c=="string"){const i=c===""?r:be(r,c);i.classGroupId=t;return}if(typeof c=="function"){if(it(c)){te(c(o),r,t,o);return}r.validators.push({validator:c,classGroupId:t});return}Object.entries(c).forEach(([i,l])=>{te(l,be(r,i),t,o)})})},be=(e,r)=>{let t=e;return r.split(oe).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},it=e=>e.isThemeGetter,st=(e,r)=>r?e.map(([t,o])=>{const c=o.map(i=>typeof i=="string"?r+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[r+l,a])):i);return[t,c]}):e,ct=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const c=(i,l)=>{t.set(i,l),r++,r>e&&(r=0,o=t,t=new Map)};return{get(i){let l=t.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return c(i,l),l},set(i,l){t.has(i)?t.set(i,l):c(i,l)}}},Ee="!",at=e=>{const{separator:r,experimentalParseClassName:t}=e,o=r.length===1,c=r[0],i=r.length,l=a=>{const h=[];let u=0,m=0,g;for(let f=0;f<a.length;f++){let j=a[f];if(u===0){if(j===c&&(o||a.slice(f,f+i)===r)){h.push(a.slice(m,f)),m=f+i;continue}if(j==="/"){g=f;continue}}j==="["?u++:j==="]"&&u--}const d=h.length===0?a:a.substring(m),b=d.startsWith(Ee),S=b?d.substring(1):d,v=g&&g>m?g-m:void 0;return{modifiers:h,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:v}};return t?a=>t({className:a,parseClassName:l}):l},lt=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},dt=e=>({cache:ct(e.cacheSize),parseClassName:at(e),...rt(e)}),ut=/\s+/,ht=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:c}=r,i=[],l=e.trim().split(ut);let a="";for(let h=l.length-1;h>=0;h-=1){const u=l[h],{modifiers:m,hasImportantModifier:g,baseClassName:d,maybePostfixModifierPosition:b}=t(u);let S=!!b,v=o(S?d.substring(0,b):d);if(!v){if(!S){a=u+(a.length>0?" "+a:a);continue}if(v=o(d),!v){a=u+(a.length>0?" "+a:a);continue}S=!1}const f=lt(m).join(":"),j=g?f+Ee:f,k=j+v;if(i.includes(k))continue;i.push(k);const I=c(v,S);for(let A=0;A<I.length;++A){const W=I[A];i.push(j+W)}a=u+(a.length>0?" "+a:a)}return a};function pt(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=Me(r))&&(o&&(o+=" "),o+=t);return o}const Me=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=Me(e[o]))&&(t&&(t+=" "),t+=r);return t};function mt(e,...r){let t,o,c,i=l;function l(h){const u=r.reduce((m,g)=>g(m),e());return t=dt(u),o=t.cache.get,c=t.cache.set,i=a,a(h)}function a(h){const u=o(h);if(u)return u;const m=ht(h,t);return c(h,m),m}return function(){return i(pt.apply(null,arguments))}}const w=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,gt=/^\d+\/\d+$/,ft=new Set(["px","full","screen"]),xt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bt=/\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$/,wt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,L=e=>P(e)||ft.has(e)||gt.test(e),T=e=>V(e,"length",Lt),P=e=>!!e&&!Number.isNaN(Number(e)),Z=e=>V(e,"number",P),B=e=>!!e&&Number.isInteger(Number(e)),Ct=e=>e.endsWith("%")&&P(e.slice(0,-1)),p=e=>Le.test(e),R=e=>xt.test(e),jt=new Set(["length","size","percentage"]),St=e=>V(e,jt,Ne),kt=e=>V(e,"position",Ne),zt=new Set(["image","url"]),Et=e=>V(e,zt,Tt),Mt=e=>V(e,"",Nt),G=()=>!0,V=(e,r,t)=>{const o=Le.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},Lt=e=>bt.test(e)&&!wt.test(e),Ne=()=>!1,Nt=e=>vt.test(e),Tt=e=>yt.test(e),Rt=()=>{const e=w("colors"),r=w("spacing"),t=w("blur"),o=w("brightness"),c=w("borderColor"),i=w("borderRadius"),l=w("borderSpacing"),a=w("borderWidth"),h=w("contrast"),u=w("grayscale"),m=w("hueRotate"),g=w("invert"),d=w("gap"),b=w("gradientColorStops"),S=w("gradientColorStopPositions"),v=w("inset"),f=w("margin"),j=w("opacity"),k=w("padding"),I=w("saturate"),A=w("scale"),W=w("sepia"),ae=w("skew"),le=w("space"),de=w("translate"),D=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",p,r],y=()=>[p,r],ue=()=>["",L,T],_=()=>["auto",P,p],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",p],me=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[P,p];return{cacheSize:500,separator:":",theme:{colors:[G],spacing:[L,T],blur:["none","",R,p],brightness:M(),borderColor:[e],borderRadius:["none","","full",R,p],borderSpacing:y(),borderWidth:ue(),contrast:M(),grayscale:H(),hueRotate:M(),invert:H(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[Ct,T],inset:K(),margin:K(),opacity:M(),padding:y(),saturate:M(),scale:M(),sepia:H(),skew:M(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[R]}],"break-after":[{"break-after":me()}],"break-before":[{"break-before":me()}],"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:[...he(),p]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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",B,p]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",B,p]}],"grid-cols":[{"grid-cols":[G]}],"col-start-end":[{col:["auto",{span:["full",B,p]},p]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[G]}],"row-start-end":[{row:["auto",{span:[B,p]},p]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],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",p,r]}],"min-w":[{"min-w":[p,r,"min","max","fit"]}],"max-w":[{"max-w":[p,r,"none","full","min","max","fit","prose",{screen:[R]},R]}],h:[{h:[p,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[p,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[p,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[p,r,"auto","min","max","fit"]}],"font-size":[{text:["base",R,T]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Z]}],"font-family":[{font:[G]}],"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",p]}],"line-clamp":[{"line-clamp":["none",P,Z]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",L,p]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",L,T]}],"underline-offset":[{"underline-offset":["auto",L,p]}],"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",p]}],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",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),kt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",St]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Et]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:U()}],"border-color":[{border:[c]}],"border-color-x":[{"border-x":[c]}],"border-color-y":[{"border-y":[c]}],"border-color-s":[{"border-s":[c]}],"border-color-e":[{"border-e":[c]}],"border-color-t":[{"border-t":[c]}],"border-color-r":[{"border-r":[c]}],"border-color-b":[{"border-b":[c]}],"border-color-l":[{"border-l":[c]}],"divide-color":[{divide:[c]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[L,p]}],"outline-w":[{outline:[L,T]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[L,T]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",R,Mt]}],"shadow-color":[{shadow:[G]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",R,p]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[I]}],sepia:[{sepia:[W]}],"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":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[B,p]}],"translate-x":[{"translate-x":[de]}],"translate-y":[{"translate-y":[de]}],"skew-x":[{"skew-x":[ae]}],"skew-y":[{"skew-y":[ae]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],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",p]}],"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",p]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[L,T,Z]}],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"]}}},At=mt(Rt);function z(...e){return At(Se.clsx(e))}let J;function Y(){return J===void 0&&(J=navigator.platform.includes("Mac")),J}function Te(e){return`${e}`.toLowerCase()==="mod"?Y()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Y()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Y()?"⇧":"Shift":e}function Re(e){return e.map(Te).join(" ")}const Pt=x.forwardRef((e,r)=>{const{icon:t=void 0,tooltip:o=void 0,disabled:c=!1,customClass:i="",loading:l=void 0,shortcutKeys:a=void 0,tooltipOptions:h={},action:u=void 0,isActive:m=void 0,children:g,asChild:d=!1,upload:b=!1,initialDisplayedColor:S=void 0,dataState:v=!1,...f}=e,j=Ie[t],k=d?Je.Slot:ne;return n.jsxs(Be,{children:[n.jsx(Ge,{asChild:!0,children:n.jsxs(k,{className:z("richtext-w-[32px] richtext-h-[32px]",i),"data-state":v?"on":"off",disabled:c,onClick:u,ref:r,size:"sm",...f,children:[j&&n.jsx(j,{className:"richtext-size-4"}),g]})}),o&&n.jsx(ie,{...h,className:"richtext-tooltip",children:n.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[n.jsx("div",{children:o}),!!(a!=null&&a.length)&&n.jsx("span",{children:Re(a)})]})})]})}),ee=typeof window>"u";function we(e,r,t=window){const o=x.useRef(void 0);x.useEffect(()=>{o.current=r},[r]),x.useEffect(()=>{if(!(t&&t.addEventListener))return;const i=l=>{o.current&&o.current(l)};return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}},[e,t])}function F(e,r,t={}){const{initializeWithValue:o=!0}=t,c=x.useCallback(d=>t.serializer?t.serializer(d):JSON.stringify(d),[t]),i=x.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;const b=r instanceof Function?r():r;let S;try{S=JSON.parse(d)}catch(v){return console.error("Error parsing JSON:",v),b}return S},[t,r]),l=x.useCallback(()=>{const d=r instanceof Function?r():r;if(ee)return d;try{const b=window.localStorage.getItem(e);return b?i(b):d}catch(b){return console.warn(`Error reading localStorage key “${e}”:`,b),d}},[r,e,i]),[a,h]=x.useState(()=>o?l():r instanceof Function?r():r),u=x.useCallback(d=>{ee&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const b=d instanceof Function?d(l()):d;window.localStorage.setItem(e,c(b)),h(b),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(b){console.warn(`Error setting localStorage key “${e}”:`,b)}},[e,c,l]),m=x.useCallback(()=>{ee&&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(l())},[e]);const g=x.useCallback(d=>{d.key&&d.key!==e||h(l())},[e,l]);return we("storage",g),we("local-storage",g),[a,u,m]}function Vt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.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 It(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.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 Ht(){return n.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:n.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 Bt(){return n.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:n.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 Gt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.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 Ot(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.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 n.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:n.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Wt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function _t(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function Ut(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.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 $t(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 Ft(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 qt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 Dt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 Xt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 Pe(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[n.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"}),n.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 Ve(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[n.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"}),n.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 Kt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[n.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"}),n.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 Qt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.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"}),n.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"})]})})}function Zt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:n.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 Jt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[n.jsx("circle",{cx:"10",cy:"24",r:"4"}),n.jsx("circle",{cx:"38",cy:"10",r:"4"}),n.jsx("circle",{cx:"38",cy:"24",r:"4"}),n.jsx("circle",{cx:"38",cy:"38",r:"4"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function Yt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:n.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 er(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.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 tr(){return n.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:n.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"})})}const Ie={Bold:s.Bold,LoaderCircle:s.LoaderCircle,Italic:s.Italic,Underline:s.Underline,Quote:s.Quote,TextQuote:It,Strikethrough:s.Strikethrough,Minus:s.Minus,Eraser:s.Eraser,PaintRoller:s.PaintRoller,Redo2:s.Redo2,Undo2:s.Undo2,AlignCenter:$.TextAlignCenterIcon,AlignJustify:$.TextAlignJustifyIcon,AlignLeft:$.TextAlignLeftIcon,AlignRight:$.TextAlignRightIcon,ChevronDown:s.ChevronDown,Subscript:s.Subscript,Superscript:s.Superscript,Code:s.Code,Code2:s.CodeXml,Type:s.Type,IndentIncrease:s.IndentIncrease,IndentDecrease:s.IndentDecrease,List:s.List,ListOrdered:s.ListOrdered,ListTodo:s.ListTodo,Link:s.Link,ImageUp:s.ImageUp,Video:s.Video,Maximize:s.Maximize,Minimize:s.Minimize,Table:s.Table,Sparkles:s.Sparkles,Pencil:s.Pencil,Unlink:s.Unlink,BetweenHorizonalEnd:s.BetweenHorizonalEnd,BetweenHorizonalStart:s.BetweenHorizonalStart,BetweenVerticalStart:s.BetweenVerticalStart,BetweenVerticalEnd:s.BetweenVerticalEnd,TableCellsMerge:s.TableCellsMerge,TableCellsSplit:s.TableCellsSplit,Trash2:s.Trash2,Trash:s.Trash,Replace:s.Replace,ChevronsUpDown:s.ChevronsUpDown,LineHeight:Ot,Word:Gt,HeadingParagraph:s.Pilcrow,Heading1:s.Heading1,Heading2:s.Heading2,Heading3:s.Heading3,Heading4:s.Heading4,Heading5:s.Heading5,Heading6:s.Heading6,Columns2:s.Columns2,Columns3:s.Columns3,Columns4:s.Columns4,Plus:s.Plus,Grip:s.GripVertical,Copy:s.Copy,Clipboard:s.Clipboard,PanelLeft:s.PanelLeft,PanelRight:s.PanelRight,Columns:s.Columns2,Iframe:s.Frame,MenuDown:Ae,SizeS:Ut,SizeM:_t,SizeL:Wt,AspectRatio:Vt,Emoji:s.SmilePlus,DeleteColumn:Ht,DeleteRow:Bt,SearchAndReplace:s.Replace,EmojiIcon:s.SmilePlusIcon,KatexIcon:s.Sigma,ExportPdf:Pe,ExportWord:Ve,ImportWord:tr,ColumnAddLeft:Ft,ColumnAddRight:qt,BookMarked:s.BookMarked,Excalidraw:Xt,ZoomIn:s.ZoomIn,ZoomOut:s.ZoomOut,Settings:s.Settings,Eye:s.Eye,TextDirection:Dt,LeftToRight:Zt,RightToLeft:Yt,Attachment:s.Paperclip,GifIcon:Kt,ChevronUp:s.ChevronUp,Crop:s.CropIcon,Mermaid:Jt,Twitter:er,CodeView:$t,FlipX:s.FlipVertical,FlipY:s.FlipHorizontal,PencilRuler:s.PencilRuler,WrapText:s.WrapText,Loader:s.Loader2,X:s.X,Html:Qt,ExternalLink:s.ExternalLink},ve=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ye=Se.clsx,He=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return ye(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:c,defaultVariants:i}=r,l=Object.keys(c).map(u=>{const m=t==null?void 0:t[u],g=i==null?void 0:i[u];if(m===null)return null;const d=ve(m)||ve(g);return c[u][d]}),a=t&&Object.entries(t).reduce((u,m)=>{let[g,d]=m;return d===void 0||(u[g]=d),u},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((u,m)=>{let{class:g,className:d,...b}=m;return Object.entries(b).every(S=>{let[v,f]=S;return Array.isArray(f)?f.includes({...i,...a}[v]):{...i,...a}[v]===f})?[...u,g,d]:u},[]);return ye(e,l,h,t==null?void 0:t.class,t==null?void 0:t.className)},rr=He("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"}}),ne=N.forwardRef(({className:e,variant:r,size:t,...o},c)=>n.jsx(ke.Root,{ref:c,className:z(rr({variant:r,size:t,className:e})),...o}));ne.displayName=ke.Root.displayName;const or=O.Provider,Be=O.Root,Ge=O.Trigger,ie=N.forwardRef(({className:e,sideOffset:r=4,...t},o)=>n.jsx(O.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:z("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}));ie.displayName=O.Content.displayName;const nr=C.Root,ir=C.Value,Oe=N.forwardRef(({className:e,children:r,...t},o)=>n.jsxs(C.Trigger,{ref:o,className:z("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",e),...t,children:[r,n.jsx(C.Icon,{asChild:!0,children:n.jsx(s.ChevronDown,{className:"richtext-size-4 richtext-opacity-50"})})]}));Oe.displayName=C.Trigger.displayName;const We=N.forwardRef(({className:e,...r},t)=>n.jsx(C.ScrollUpButton,{ref:t,className:z("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...r,children:n.jsx(s.ChevronUp,{className:"richtext-size-4"})}));We.displayName=C.ScrollUpButton.displayName;const _e=N.forwardRef(({className:e,...r},t)=>n.jsx(C.ScrollDownButton,{ref:t,className:z("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...r,children:n.jsx(s.ChevronDown,{className:"richtext-size-4"})}));_e.displayName=C.ScrollDownButton.displayName;const Ue=N.forwardRef(({className:e,children:r,position:t="popper",...o},c)=>n.jsx(C.Portal,{children:n.jsxs(C.Content,{"data-richtext-portal":!0,position:t,ref:c,className:z("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",e),...o,children:[n.jsx(We,{}),n.jsx(C.Viewport,{className:z("richtext-p-1",t==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:r}),n.jsx(_e,{})]})}));Ue.displayName=C.Content.displayName;const sr=N.forwardRef(({className:e,...r},t)=>n.jsx(C.Label,{className:z("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",e),ref:t,...r}));sr.displayName=C.Label.displayName;const $e=N.forwardRef(({className:e,children:r,...t},o)=>n.jsxs(C.Item,{ref:o,className:z("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...t,children:[n.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:n.jsx(C.ItemIndicator,{children:n.jsx(s.Check,{className:"richtext-size-4"})})}),n.jsx(C.ItemText,{children:r})]}));$e.displayName=C.Item.displayName;const cr=N.forwardRef(({className:e,...r},t)=>n.jsx(C.Separator,{className:z("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),ref:t,...r}));cr.displayName=C.Separator.displayName;function se(e){function r(){const i=x.useRef(e),l=x.useCallback(()=>i.current,[]),a=x.useRef(new Set),h=x.useCallback(m=>{i.current={...i.current,...m},a.current.forEach(g=>g())},[]),u=x.useCallback(m=>(a.current.add(m),()=>a.current.delete(m)),[]);return{get:l,set:h,subscribe:u}}const t=x.createContext(null);function o({children:i}){return n.jsx(t.Provider,{value:r(),children:i})}function c(i){const l=x.useContext(t);if(!l)throw new Error("Store not found");return[x.useSyncExternalStore(l.subscribe,()=>i(l.get()),()=>i(e)),l.set]}return{Provider:o,useStore:c}}se({value:!1});se({value:!1});const{Provider:ar,useStore:Fe}=se({value:!1});function lr(){const[e]=Fe(r=>r.value);return e}const Ce="data-rc-order",je="data-rc-priority",dr="rc-util-key",re=new Map;function ur(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 qe({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:dr}function ce(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function hr(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function De(e){return[...(re.get(e)||e).children].filter(r=>r.tagName==="STYLE")}function Xe(e,r={}){const{csp:t,prepend:o,priority:c=0}=r,i=hr(o),l=i==="prependQueue",a=document.createElement("style");a.setAttribute(Ce,i),l&&c&&a.setAttribute(je,`${c}`),t!=null&&t.nonce&&(a.nonce=t==null?void 0:t.nonce),a.innerHTML=e;const h=ce(r),{firstChild:u}=h;if(o){if(l){const m=De(h).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(Ce)))return!1;const d=Number(g.getAttribute(je)||0);return c>=d});if(m.length>0)return h.insertBefore(a,m.at(-1).nextSibling),a}u.before(a)}else h.append(a);return a}function Ke(e,r={}){const t=ce(r);return De(t).find(o=>o.getAttribute(qe(r))===e)}function Qe(e,r={}){const t=Ke(e,r);t&&t.remove()}function pr(e,r){const t=re.get(e);if(!t||!ur(document,t)){const o=Xe("",r),{parentNode:c}=o;re.set(e,c),o.remove()}}function Ze(e,r,t={}){var l,a,h;const o=ce(t);pr(o,t);const c=Ke(r,t);if(c)return(l=t.csp)!=null&&l.nonce&&c.nonce!==((a=t.csp)==null?void 0:a.nonce)&&(c.nonce=(h=t.csp)==null?void 0:h.nonce),c.innerHTML!==e&&(c.innerHTML=e),c;const i=Xe(e,t);return i.setAttribute(qe(t),r),i}const mr=x.memo(({editor:e,children:r})=>{const[,t]=Fe(c=>c.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]),n.jsx(n.Fragment,{children:r})});function gr(){const[,e]=ge.x(ge.atomLang),r=o=>{e(c=>({...c,currentLang:o.detail}))},t=o=>{const{lang:c,messages:i}=o.detail;e(l=>{if(l.message[c]){const a={...l.message[c],...i};return{currentLang:l.currentLang,message:{...l.message,[c]:a}}}else return{currentLang:l.currentLang,message:{...l.message,[c]:i}}})};return x.useEffect(()=>{const o=E.listenEvent(E.EVENTS.CHANGE_LANGUAGE,r),c=E.listenEvent(E.EVENTS.MODIFY_LANGUAGE,t);return()=>{o(),c()}},[]),n.jsx(n.Fragment,{})}function fr(){const[e,r]=F("richtext-theme","light"),[t,o]=F("richtext-color","default"),[c,i]=F("richtext-border-radius","0.65rem");x.useEffect(()=>{const u=e||"light",m=t||"default";let g=fe.THEME[u][m];if(!g){g=fe.THEME.light.default;return}return Ze(`
2
+ .reactjs-tiptap-editor, .reactjs-tiptap-editor *,
3
+ .reactjs-tiptap-editor-theme, .reactjs-tiptap-editor-theme *,
4
+ div[data-richtext-portal], div[data-richtext-portal] * {
5
+ ${Object.entries(g).map(([d,b])=>typeof c=="string"&&d==="radius"?`--${d}: ${c};`:`--${d}: ${b};`).join(`
6
+ `)}
7
+ }
8
+ `,"richtext-theme",{priority:50}),()=>{Qe("richtext-theme")}},[e,t,c]);const l=u=>{r(u.detail)},a=u=>{o(u.detail)},h=u=>{i(u.detail)};return x.useEffect(()=>{const u=E.listenEvent(E.EVENTS.CHANGE_THEME,l),m=E.listenEvent(E.EVENTS.CHANGE_COLOR,a),g=E.listenEvent(E.EVENTS.CHANGE_BORDER_RADIUS,h);return()=>{u(),m(),g()}},[]),n.jsx(n.Fragment,{})}function xr({editor:e,children:r,id:t}){return n.jsxs(ar,{children:[n.jsx(mr,{editor:e,id:t,children:r}),n.jsx(gr,{}),n.jsx(fr,{})]})}exports.ActionButton=Pt;exports.ExportPdf=Pe;exports.ExportWord=Ve;exports.MenuDown=Ae;exports.ProviderUniqueId=xr;exports.Select=nr;exports.SelectContent=Ue;exports.SelectItem=$e;exports.SelectTrigger=Oe;exports.SelectValue=ir;exports.Toggle=ne;exports.Tooltip=Be;exports.TooltipContent=ie;exports.TooltipProvider=or;exports.TooltipTrigger=Ge;exports.cn=z;exports.cva=He;exports.getShortcutKey=Te;exports.getShortcutKeys=Re;exports.icons=Ie;exports.removeCSS=Qe;exports.updateCSS=Ze;exports.useEditableEditor=lr;exports.useLocalStorage=F;
@@ -0,0 +1 @@
1
+ "use strict";const Mt=require("@tiptap/pm/state"),Rt=require("@tiptap/pm/view"),Jt=require("./index-BBNITgNi.cjs"),_t=["top","right","bottom","left"],At=["start","end"],Ot=_t.reduce((t,e)=>t.concat(e,e+"-"+At[0],e+"-"+At[1]),[]),j=Math.min,M=Math.max,rt=Math.round,H=t=>({x:t,y:t}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function ht(t,e,o){return M(t,j(e,o))}function Y(t,e){return typeof t=="function"?t(e):t}function F(t){return t.split("-")[0]}function q(t){return t.split("-")[1]}function Nt(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}const te=new Set(["top","bottom"]);function V(t){return te.has(F(t))?"y":"x"}function xt(t){return Nt(V(t))}function Ft(t,e,o){o===void 0&&(o=!1);const n=q(t),i=xt(t),s=wt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=lt(r)),[r,lt(r)]}function ee(t){const e=lt(t);return[ct(t),e,ct(e)]}function ct(t){return t.replace(/start|end/g,e=>Zt[e])}const Ct=["left","right"],Pt=["right","left"],ne=["top","bottom"],oe=["bottom","top"];function ie(t,e,o){switch(t){case"top":case"bottom":return o?e?Pt:Ct:e?Ct:Pt;case"left":case"right":return e?ne:oe;default:return[]}}function se(t,e,o,n){const i=q(t);let s=ie(F(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ct)))),s}function lt(t){return t.replace(/left|right|bottom|top/g,e=>Qt[e])}function re(t){return{top:0,right:0,bottom:0,left:0,...t}}function yt(t){return typeof t!="number"?re(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Et(t,e,o){let{reference:n,floating:i}=t;const s=V(e),r=xt(e),c=wt(r),f=F(e),a=s==="y",u=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,w=n[c]/2-i[c]/2;let g;switch(f){case"top":g={x:u,y:n.y-i.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:l};break;case"left":g={x:n.x-i.width,y:l};break;default:g={x:n.x,y:n.y}}switch(q(e)){case"start":g[r]-=w*(o&&a?-1:1);break;case"end":g[r]+=w*(o&&a?-1:1);break}return g}const ce=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=Et(a,n,f),w=n,g={},p=0;for(let v=0;v<c.length;v++){const{name:d,fn:m}=c[v],{x:S,y:A,data:E,reset:O}=await m({x:u,y:l,initialPlacement:n,placement:w,strategy:i,middlewareData:g,rects:a,platform:r,elements:{reference:t,floating:e}});u=S??u,l=A??l,g={...g,[d]:{...g[d],...E}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(w=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:u,y:l}=Et(a,w,f)),v=-1)}return{x:u,y:l,placement:w,strategy:i,middlewareData:g}};async function Z(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:w=!1,padding:g=0}=Y(e,t),p=yt(g),d=c[w?l==="floating"?"reference":"floating":l],m=Q(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(d)))==null||o?d:d.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),S=l==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),E=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},O=Q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:A,strategy:f}):S);return{top:(m.top-O.top+p.top)/E.y,bottom:(O.bottom-m.bottom+p.bottom)/E.y,left:(m.left-O.left+p.left)/E.x,right:(O.right-m.right+p.right)/E.x}}const le=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:a,padding:u=0}=Y(t,e)||{};if(a==null)return{};const l=yt(u),w={x:o,y:n},g=xt(i),p=wt(g),v=await r.getDimensions(a),d=g==="y",m=d?"top":"left",S=d?"bottom":"right",A=d?"clientHeight":"clientWidth",E=s.reference[p]+s.reference[g]-w[g]-s.floating[p],O=w[g]-s.reference[g],y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let b=y?y[A]:0;(!b||!await(r.isElement==null?void 0:r.isElement(y)))&&(b=c.floating[A]||s.floating[p]);const C=E/2-O/2,P=b/2-v[p]/2-1,h=j(l[m],P),R=j(l[S],P),D=h,k=b-v[p]-R,L=b/2-v[p]/2+C,x=ht(D,L,k),$=!f.arrow&&q(i)!=null&&L!==x&&s.reference[p]/2-(L<D?h:R)-v[p]/2<0,T=$?L<D?L-D:L-k:0;return{[g]:w[g]+T,data:{[g]:x,centerOffset:L-x-T,...$&&{alignmentOffset:T}},reset:$}}});function ae(t,e,o){return(t?[...o.filter(i=>q(i)===t),...o.filter(i=>q(i)!==t)]:o.filter(i=>F(i)===i)).filter(i=>t?q(i)===t||(e?ct(i)!==i:!1):!0)}const fe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:a}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:w=Ot,autoAlignment:g=!0,...p}=Y(t,e),v=l!==void 0||w===Ot?ae(l||null,g,w):w,d=await Z(e,p),m=((o=r.autoPlacement)==null?void 0:o.index)||0,S=v[m];if(S==null)return{};const A=Ft(S,s,await(f.isRTL==null?void 0:f.isRTL(a.floating)));if(c!==S)return{reset:{placement:v[0]}};const E=[d[F(S)],d[A[0]],d[A[1]]],O=[...((n=r.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:E}],y=v[m+1];if(y)return{data:{index:m+1,overflows:O},reset:{placement:y}};const b=O.map(h=>{const R=q(h.placement);return[h.placement,R&&u?h.overflows.slice(0,2).reduce((D,k)=>D+k,0):h.overflows[0],h.overflows]}).sort((h,R)=>h[1]-R[1]),P=((i=b.filter(h=>h[2].slice(0,q(h[0])?2:3).every(R=>R<=0))[0])==null?void 0:i[0])||b[0][0];return P!==c?{data:{index:m+1,overflows:O},reset:{placement:P}}:{}}}},ue=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:w,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...d}=Y(t,e);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const m=F(i),S=V(c),A=F(c)===c,E=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=w||(A||!v?[lt(c)]:ee(c)),y=p!=="none";!w&&y&&O.push(...se(c,v,p,E));const b=[c,...O],C=await Z(e,d),P=[];let h=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&P.push(C[m]),l){const L=Ft(i,r,E);P.push(C[L[0]],C[L[1]])}if(h=[...h,{placement:i,overflows:P}],!P.every(L=>L<=0)){var R,D;const L=(((R=s.flip)==null?void 0:R.index)||0)+1,x=b[L];if(x&&(!(l==="alignment"?S!==V(x):!1)||h.every(B=>V(B.placement)===S?B.overflows[0]>0:!0)))return{data:{index:L,overflows:h},reset:{placement:x}};let $=(D=h.filter(T=>T.overflows[0]<=0).sort((T,B)=>T.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(g){case"bestFit":{var k;const T=(k=h.filter(B=>{if(y){const _=V(B.placement);return _===S||_==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((B,_)=>B[1]-_[1])[0])==null?void 0:k[0];T&&($=T);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Dt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Tt(t){return _t.some(e=>t[e]>=0)}const de=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:o}=e,{strategy:n="referenceHidden",...i}=Y(t,e);switch(n){case"referenceHidden":{const s=await Z(e,{...i,elementContext:"reference"}),r=Dt(s,o.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Tt(r)}}}case"escaped":{const s=await Z(e,{...i,altBoundary:!0}),r=Dt(s,o.floating);return{data:{escapedOffsets:r,escaped:Tt(r)}}}default:return{}}}}};function qt(t){const e=j(...t.map(s=>s.left)),o=j(...t.map(s=>s.top)),n=M(...t.map(s=>s.right)),i=M(...t.map(s=>s.bottom));return{x:e,y:o,width:n-e,height:i-o}}function me(t){const e=t.slice().sort((i,s)=>i.y-s.y),o=[];let n=null;for(let i=0;i<e.length;i++){const s=e[i];!n||s.y-n.y>n.height/2?o.push([s]):o[o.length-1].push(s),n=s}return o.map(i=>Q(qt(i)))}const ge=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:o,elements:n,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:f,y:a}=Y(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),l=me(u),w=Q(qt(u)),g=yt(c);function p(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&a!=null)return l.find(d=>f>d.left-g.left&&f<d.right+g.right&&a>d.top-g.top&&a<d.bottom+g.bottom)||w;if(l.length>=2){if(V(o)==="y"){const h=l[0],R=l[l.length-1],D=F(o)==="top",k=h.top,L=R.bottom,x=D?h.left:R.left,$=D?h.right:R.right,T=$-x,B=L-k;return{top:k,bottom:L,left:x,right:$,width:T,height:B,x,y:k}}const d=F(o)==="left",m=M(...l.map(h=>h.right)),S=j(...l.map(h=>h.left)),A=l.filter(h=>d?h.left===S:h.right===m),E=A[0].top,O=A[A.length-1].bottom,y=S,b=m,C=b-y,P=O-E;return{top:E,bottom:O,left:y,right:b,width:C,height:P,x:y,y:E}}return w}const v=await s.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:r});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},he=new Set(["left","top"]);async function pe(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=F(o),c=q(o),f=V(o)==="y",a=he.has(r)?-1:1,u=s&&f?-1:1,l=Y(e,t);let{mainAxis:w,crossAxis:g,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof p=="number"&&(g=c==="end"?p*-1:p),f?{x:g*u,y:w*a}:{x:w*a,y:g*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,f=await pe(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:r}}}}},xe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:d=>{let{x:m,y:S}=d;return{x:m,y:S}}},...f}=Y(t,e),a={x:o,y:n},u=await Z(e,f),l=V(F(i)),w=Nt(l);let g=a[w],p=a[l];if(s){const d=w==="y"?"top":"left",m=w==="y"?"bottom":"right",S=g+u[d],A=g-u[m];g=ht(S,g,A)}if(r){const d=l==="y"?"top":"left",m=l==="y"?"bottom":"right",S=p+u[d],A=p-u[m];p=ht(S,p,A)}const v=c.fn({...e,[w]:g,[l]:p});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[w]:s,[l]:r}}}}}},ye=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:f=()=>{},...a}=Y(t,e),u=await Z(e,a),l=F(i),w=q(i),g=V(i)==="y",{width:p,height:v}=s.floating;let d,m;l==="top"||l==="bottom"?(d=l,m=w===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(m=l,d=w==="end"?"top":"bottom");const S=v-u.top-u.bottom,A=p-u.left-u.right,E=j(v-u[d],S),O=j(p-u[m],A),y=!e.middlewareData.shift;let b=E,C=O;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(C=A),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(b=S),y&&!w){const h=M(u.left,0),R=M(u.right,0),D=M(u.top,0),k=M(u.bottom,0);g?C=p-2*(h!==0||R!==0?h+R:M(u.left,u.right)):b=v-2*(D!==0||k!==0?D+k:M(u.top,u.bottom))}await f({...e,availableWidth:C,availableHeight:b});const P=await r.getDimensions(c.floating);return p!==P.width||v!==P.height?{reset:{rects:!0}}:{}}}};function at(){return typeof window<"u"}function et(t){return It(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function z(t){var e;return(e=(It(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function It(t){return at()?t instanceof Node||t instanceof N(t).Node:!1}function I(t){return at()?t instanceof Element||t instanceof N(t).Element:!1}function X(t){return at()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function Lt(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}const ve=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!ve.has(i)}const be=new Set(["table","td","th"]);function Se(t){return be.has(et(t))}const Re=[":popover-open",":modal"];function ft(t){return Re.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Oe=["transform","translate","scale","rotate","perspective","filter"],Ce=["paint","layout","strict","content"];function vt(t){const e=bt(),o=I(t)?W(t):t;return Ae.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||Oe.some(n=>(o.willChange||"").includes(n))||Ce.some(n=>(o.contain||"").includes(n))}function Pe(t){let e=K(t);for(;X(e)&&!tt(e);){if(vt(e))return e;if(ft(e))return null;e=K(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function tt(t){return Ee.has(et(t))}function W(t){return N(t).getComputedStyle(t)}function ut(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||z(t);return Lt(e)?e.host:e}function Wt(t){const e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&it(e)?e:Wt(e)}function Vt(t,e,o){var n;e===void 0&&(e=[]);const i=Wt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=N(i);return s?(pt(r),e.concat(r,r.visualViewport||[],it(i)?i:[],[])):e.concat(i,Vt(i,[]))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ht(t){const e=W(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=X(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=rt(o)!==s||rt(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function jt(t){return I(t)?t:t.contextElement}function J(t){const e=jt(t);if(!X(e))return H(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Ht(e);let r=(s?rt(o.width):o.width)/n,c=(s?rt(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const De=H(0);function Xt(t){const e=N(t);return!bt()||!e.visualViewport?De:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Te(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==N(t)?!1:e}function ot(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=jt(t);let r=H(1);e&&(n?I(n)&&(r=J(n)):r=J(t));const c=Te(s,o,n)?Xt(s):H(0);let f=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const w=N(s),g=n&&I(n)?N(n):n;let p=w,v=pt(p);for(;v&&n&&g!==p;){const d=J(v),m=v.getBoundingClientRect(),S=W(v),A=m.left+(v.clientLeft+parseFloat(S.paddingLeft))*d.x,E=m.top+(v.clientTop+parseFloat(S.paddingTop))*d.y;f*=d.x,a*=d.y,u*=d.x,l*=d.y,f+=A,a+=E,p=N(v),v=pt(p)}}return Q({width:u,height:l,x:f,y:a})}function dt(t,e){const o=ut(t).scrollLeft;return e?e.left+o:ot(z(t)).left+o}function Yt(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-dt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Le(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=z(n),c=e?ft(e.floating):!1;if(n===r||c&&s)return o;let f={scrollLeft:0,scrollTop:0},a=H(1);const u=H(0),l=X(n);if((l||!l&&!s)&&((et(n)!=="body"||it(r))&&(f=ut(n)),X(n))){const g=ot(n);a=J(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const w=r&&!l&&!s?Yt(r,f):H(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-f.scrollLeft*a.x+u.x+w.x,y:o.y*a.y-f.scrollTop*a.y+u.y+w.y}}function $e(t){return Array.from(t.getClientRects())}function ke(t){const e=z(t),o=ut(t),n=t.ownerDocument.body,i=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+dt(t);const c=-o.scrollTop;return W(n).direction==="rtl"&&(r+=M(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const $t=25;function Be(t,e){const o=N(t),n=z(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const u=bt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const a=dt(n);if(a<=0){const u=n.ownerDocument,l=u.body,w=getComputedStyle(l),g=u.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,p=Math.abs(n.clientWidth-l.clientWidth-g);p<=$t&&(s-=p)}else a<=$t&&(s+=a);return{width:s,height:r,x:c,y:f}}const Me=new Set(["absolute","fixed"]);function _e(t,e){const o=ot(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=X(t)?J(t):H(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,a=n*s.y;return{width:r,height:c,x:f,y:a}}function kt(t,e,o){let n;if(e==="viewport")n=Be(t,o);else if(e==="document")n=ke(z(t));else if(I(e))n=_e(e,o);else{const i=Xt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function zt(t,e){const o=K(t);return o===e||!I(o)||tt(o)?!1:W(o).position==="fixed"||zt(o,e)}function Ne(t,e){const o=e.get(t);if(o)return o;let n=Vt(t,[]).filter(c=>I(c)&&et(c)!=="body"),i=null;const s=W(t).position==="fixed";let r=s?K(t):t;for(;I(r)&&!tt(r);){const c=W(r),f=vt(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&Me.has(i.position)||it(r)&&!f&&zt(t,r))?n=n.filter(u=>u!==r):i=c,r=K(r)}return e.set(t,n),n}function Fe(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?ft(e)?[]:Ne(e,this._c):[].concat(o),n],c=r[0],f=r.reduce((a,u)=>{const l=kt(e,u,i);return a.top=M(l.top,a.top),a.right=j(l.right,a.right),a.bottom=j(l.bottom,a.bottom),a.left=M(l.left,a.left),a},kt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function qe(t){const{width:e,height:o}=Ht(t);return{width:e,height:o}}function Ie(t,e,o){const n=X(e),i=z(e),s=o==="fixed",r=ot(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=H(0);function a(){f.x=dt(i)}if(n||!n&&!s)if((et(e)!=="body"||it(i))&&(c=ut(e)),n){const g=ot(e,!0,s,e);f.x=g.x+e.clientLeft,f.y=g.y+e.clientTop}else i&&a();s&&!n&&i&&a();const u=i&&!n&&!s?Yt(i,c):H(0),l=r.left+c.scrollLeft-f.x-u.x,w=r.top+c.scrollTop-f.y-u.y;return{x:l,y:w,width:r.width,height:r.height}}function gt(t){return W(t).position==="static"}function Bt(t,e){if(!X(t)||W(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return z(t)===o&&(o=o.ownerDocument.body),o}function Kt(t,e){const o=N(t);if(ft(t))return o;if(!X(t)){let i=K(t);for(;i&&!tt(i);){if(I(i)&&!gt(i))return i;i=K(i)}return o}let n=Bt(t,e);for(;n&&Se(n)&&gt(n);)n=Bt(n,e);return n&&tt(n)&&gt(n)&&!vt(n)?o:n||Pe(t)||o}const We=async function(t){const e=this.getOffsetParent||Kt,o=this.getDimensions,n=await o(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ve(t){return W(t).direction==="rtl"}const He={convertOffsetParentRelativeRectToViewportRelativeRect:Le,getDocumentElement:z,getClippingRect:Fe,getOffsetParent:Kt,getElementRects:We,getClientRects:$e,getDimensions:qe,getScale:J,isElement:I,isRTL:Ve},je=we,Xe=fe,Ye=xe,ze=ue,Ke=ye,Ue=de,Ge=le,Je=ge,Qe=(t,e,o)=>{const n=new Map,i={platform:He,...o},s={...i.platform,_c:n};return ce(t,e,{...i,platform:s})};function Ze(t){var e;const{char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:c}=t,f=n&&!i,a=Jt.escapeForRegEx(o),u=new RegExp(`\\s${a}$`),l=r?"^":"",w=i?"":a,g=f?new RegExp(`${l}${a}.*?(?=\\s${w}|$)`,"gm"):new RegExp(`${l}(?:^)?${a}[^\\s${w}]*`,"gm"),p=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!p)return null;const v=c.pos-p.length,d=Array.from(p.matchAll(g)).pop();if(!d||d.input===void 0||d.index===void 0)return null;const m=d.input.slice(Math.max(0,d.index-1),d.index),S=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(m);if(s!==null&&!S)return null;const A=v+d.index;let E=A+d[0].length;return f&&u.test(p.slice(E-1,E+1))&&(d[0]+=" ",E+=1),A<c.pos&&E>=c.pos?{range:{from:A,to:E},query:d[0].slice(o.length),text:d[0]}:null}var tn=new Mt.PluginKey("suggestion");function Ut({pluginKey:t=tn,editor:e,char:o="@",allowSpaces:n=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:f="suggestion",decorationContent:a="",decorationEmptyClass:u="is-empty",command:l=()=>null,items:w=()=>[],render:g=()=>({}),allow:p=()=>!0,findSuggestionMatch:v=Ze}){let d;const m=g==null?void 0:g(),S=()=>{const y=e.state.selection.$anchor.pos,b=e.view.coordsAtPos(y),{top:C,right:P,bottom:h,left:R}=b;try{return new DOMRect(R,C,P-R,h-C)}catch{return null}},A=(y,b)=>b?()=>{const C=t.getState(e.state),P=C==null?void 0:C.decorationId,h=y.dom.querySelector(`[data-decoration-id="${P}"]`);return(h==null?void 0:h.getBoundingClientRect())||null}:S;function E(y,b){var C;try{const h=t.getState(y.state),R=h!=null&&h.decorationId?y.dom.querySelector(`[data-decoration-id="${h.decorationId}"]`):null,D={editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},query:(h==null?void 0:h.query)||null,text:(h==null?void 0:h.text)||null,items:[],command:k=>l({editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},props:k}),decorationNode:R,clientRect:A(y,R)};(C=m==null?void 0:m.onExit)==null||C.call(m,D)}catch{}const P=y.state.tr.setMeta(b,{exit:!0});y.dispatch(P)}const O=new Mt.Plugin({key:t,view(){return{update:async(y,b)=>{var C,P,h,R,D,k,L;const x=(C=this.key)==null?void 0:C.getState(b),$=(P=this.key)==null?void 0:P.getState(y.state),T=x.active&&$.active&&x.range.from!==$.range.from,B=!x.active&&$.active,_=x.active&&!$.active,U=!B&&!_&&x.query!==$.query,nt=B||T&&U,st=U||T,mt=_||T&&U;if(!nt&&!st&&!mt)return;const G=mt&&!nt?x:$,St=y.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);d={editor:e,range:G.range,query:G.query,text:G.text,items:[],command:Gt=>l({editor:e,range:G.range,props:Gt}),decorationNode:St,clientRect:A(y,St)},nt&&((h=m==null?void 0:m.onBeforeStart)==null||h.call(m,d)),st&&((R=m==null?void 0:m.onBeforeUpdate)==null||R.call(m,d)),(st||nt)&&(d.items=await w({editor:e,query:G.query})),mt&&((D=m==null?void 0:m.onExit)==null||D.call(m,d)),st&&((k=m==null?void 0:m.onUpdate)==null||k.call(m,d)),nt&&((L=m==null?void 0:m.onStart)==null||L.call(m,d))},destroy:()=>{var y;d&&((y=m==null?void 0:m.onExit)==null||y.call(m,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,b,C,P){const{isEditable:h}=e,{composing:R}=e.view,{selection:D}=y,{empty:k,from:L}=D,x={...b},$=y.getMeta(t);if($&&$.exit)return x.active=!1,x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null,x;if(x.composing=R,h&&(k||e.view.composing)){(L<b.range.from||L>b.range.to)&&!R&&!b.composing&&(x.active=!1);const T=v({char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:D.$from}),B=`id_${Math.floor(Math.random()*4294967295)}`;T&&p({editor:e,state:P,range:T.range,isActive:b.active})?(x.active=!0,x.decorationId=b.decorationId?b.decorationId:B,x.range=T.range,x.query=T.query,x.text=T.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(y,b){var C,P,h,R;const{active:D,range:k}=O.getState(y.state);if(!D)return!1;if(b.key==="Escape"||b.key==="Esc"){const x=O.getState(y.state),$=(C=d==null?void 0:d.decorationNode)!=null?C:null,T=$??(x!=null&&x.decorationId?y.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`):null);if(((P=m==null?void 0:m.onKeyDown)==null?void 0:P.call(m,{view:y,event:b,range:x.range}))||!1)return!0;const _={editor:e,range:x.range,query:x.query,text:x.text,items:[],command:U=>l({editor:e,range:x.range,props:U}),decorationNode:T,clientRect:T?()=>T.getBoundingClientRect()||null:null};return(h=m==null?void 0:m.onExit)==null||h.call(m,_),E(y,t),!0}return((R=m==null?void 0:m.onKeyDown)==null?void 0:R.call(m,{view:y,event:b,range:k}))||!1},decorations(y){const{active:b,range:C,decorationId:P,query:h}=O.getState(y);if(!b)return null;const R=!(h!=null&&h.length),D=[f];return R&&D.push(u),Rt.DecorationSet.create(y.doc,[Rt.Decoration.inline(C.from,C.to,{nodeName:c,class:D.join(" "),"data-decoration-id":P,"data-decoration-content":a})])}}});return O}var en=Ut;exports.Suggestion=Ut;exports.arrow=Ge;exports.autoPlacement=Xe;exports.computePosition=Qe;exports.flip=ze;exports.hide=Ue;exports.index_default=en;exports.inline=Je;exports.offset=je;exports.shift=Ye;exports.size=Ke;
@@ -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-CbIQPoF6.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-sVScpCFG.js";
2
2
  var $ = {
3
3
  8: "Backspace",
4
4
  9: "Tab",
@@ -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-CbIQPoF6.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-sVScpCFG.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
- import { M as y, m as p, E as l } from "./index-CbIQPoF6.js";
1
+ import { M as y, m as p, E as l } from "./index-sVScpCFG.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) => {
@@ -7329,18 +7329,18 @@ export {
7329
7329
  vn as D,
7330
7330
  j as E,
7331
7331
  v as F,
7332
- Ia as G,
7333
- hl as H,
7334
- dl as I,
7335
- zs as J,
7336
- Ws as K,
7337
- Va as L,
7332
+ hl as G,
7333
+ dl as H,
7334
+ zs as I,
7335
+ Ws as J,
7336
+ Va as K,
7337
+ tr as L,
7338
7338
  el as M,
7339
7339
  cl as N,
7340
- tr as O,
7341
- Ha as P,
7340
+ Ha as O,
7341
+ ll as P,
7342
7342
  ja as Q,
7343
- ml as R,
7343
+ Ia as R,
7344
7344
  A as S,
7345
7345
  $ as T,
7346
7346
  Wa as U,
@@ -7365,24 +7365,24 @@ export {
7365
7365
  fl as ab,
7366
7366
  Ga as b,
7367
7367
  Ua as c,
7368
- fr as d,
7369
- ll as e,
7370
- Qa as f,
7368
+ Qa as d,
7369
+ fr as e,
7370
+ ul as f,
7371
7371
  I as g,
7372
- ul as h,
7372
+ nl as h,
7373
7373
  we as i,
7374
- nl as j,
7375
- Fe as k,
7376
- al as l,
7374
+ Fe as j,
7375
+ al as k,
7376
+ Ya as l,
7377
7377
  Bs as m,
7378
7378
  rl as n,
7379
- Ya as o,
7379
+ Ht as o,
7380
7380
  Io as p,
7381
- Ht as q,
7381
+ pl as q,
7382
7382
  zo as r,
7383
- pl as s,
7383
+ tl as s,
7384
7384
  il as t,
7385
- tl as u,
7385
+ ml as u,
7386
7386
  C as v,
7387
7387
  sl as w,
7388
7388
  w as x,
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-DvvMf6Wu.cjs"),a=require("./index-BBNITgNi.cjs"),s=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),i=require("./index-BvIJKpX1.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,8 +1,8 @@
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-4pRt5Vqu.js";
4
- import { d } from "./index-CbIQPoF6.js";
5
- const c = `
3
+ import { u as s, r as p, P as l, e as h } from "./index-BIqaogQg.js";
4
+ import { e as c } from "./index-sVScpCFG.js";
5
+ const d = `
6
6
  .reactjs-tiptap-editor {
7
7
  button,
8
8
  input:where([type=button]),
@@ -112,11 +112,11 @@ const c = `
112
112
  `;
113
113
  function g({ editor: t, children: o }) {
114
114
  const i = a();
115
- return r(() => (s(c, "react-tiptap-reset"), () => {
115
+ return r(() => (s(d, "react-tiptap-reset"), () => {
116
116
  p("react-tiptap-reset");
117
117
  }), []), r(() => {
118
118
  t && (t.id = i);
119
- }, [i, t]), t ? /* @__PURE__ */ e("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ e(d.Provider, { value: { editor: t }, children: /* @__PURE__ */ e(
119
+ }, [i, t]), t ? /* @__PURE__ */ e("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ e(c.Provider, { value: { editor: t }, children: /* @__PURE__ */ e(
120
120
  l,
121
121
  {
122
122
  editor: t,
@@ -1 +1 @@
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
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-BvIJKpX1.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-4pRt5Vqu.js";
3
+ import { c as x } from "./index-BIqaogQg.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-BIkZV3Y_.js";
1
+ import { t, i as d, b as a } from "./throttle-DsowOft0.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 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
+ "use strict";const s=require("react/jsx-runtime"),l=require("react"),u=require("@radix-ui/react-label"),c=require("./index-BvIJKpX1.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 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-4pRt5Vqu.js";
4
+ import { c as s, d as c } from "./index-BIqaogQg.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,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-4pRt5Vqu.js";
4
+ import { c as s } from "./index-BIqaogQg.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-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;
1
+ "use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-BvIJKpX1.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 +1 @@
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
+ "use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-BvIJKpX1.cjs"),S=require("./button-wt49IYwP.cjs"),O=require("./input-BeD5GdMv.cjs"),h=require("./popover-Csk538NC.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;
@@ -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-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";
6
+ import { j as B, c as _ } from "./index-BIqaogQg.js";
7
+ import { B as $ } from "./button-CBO-WDXK.js";
8
+ import { I as j } from "./input-Bx4uo4gO.js";
9
+ import { P as v, a as b, b as g } from "./popover-BVX8otO9.js";
10
+ import * as C from "@radix-ui/react-separator";
11
+ import { u as L, C as D } from "./index-0OnGZkVF.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 } = v(), {
16
+ const { t: h } = L(), {
17
17
  disabled: n = !1,
18
18
  value: a,
19
19
  onChange: i,
20
- colors: d = $,
20
+ colors: d = 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
- b,
39
+ v,
40
40
  {
41
41
  modal: !0,
42
42
  onOpenChange: u,
43
43
  open: c,
44
44
  children: [
45
45
  /* @__PURE__ */ e(
46
- g,
46
+ b,
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
- C,
55
+ g,
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 } = v(), [n, a] = f(!1), [i, d] = f("#000000"), x = M(
160
+ const { t: h } = L(), [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
- b,
167
+ v,
168
168
  {
169
169
  onOpenChange: a,
170
170
  open: n,
171
171
  children: [
172
- /* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ s(
172
+ /* @__PURE__ */ e(b, { 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(C, { children: [
182
+ /* @__PURE__ */ s(g, { 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
- D,
207
+ $,
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
- L.Root,
223
+ C.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 = L.Root.displayName;
237
+ N.displayName = C.Root.displayName;
238
238
  export {
239
239
  J as C,
240
240
  N as S
@@ -1 +1 @@
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
+ "use strict";require("./index-BvIJKpX1.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-4pRt5Vqu.js";
1
+ import "./index-BIqaogQg.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) => {