reactjs-tiptap-editor 0.3.13 → 0.3.15

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 (221) hide show
  1. package/lib/{ActionMenuButton-Cbbnqd-L.cjs → ActionMenuButton-BiJA06nt.cjs} +1 -1
  2. package/lib/{ActionMenuButton-BfH5nAGi.js → ActionMenuButton-cLs916Iz.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +8 -8
  5. package/lib/Attachment.d.ts +8 -8
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +8 -8
  9. package/lib/Blockquote.d.ts +8 -8
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +8 -8
  13. package/lib/Bold.d.ts +8 -8
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +8 -8
  17. package/lib/BulletList.d.ts +8 -8
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +8 -8
  21. package/lib/Clear.d.ts +8 -8
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +8 -8
  25. package/lib/Code.d.ts +8 -8
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +8 -8
  29. package/lib/CodeBlock.d.ts +8 -8
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +8 -8
  33. package/lib/CodeView.d.ts +8 -8
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +8 -8
  37. package/lib/Color.d.ts +8 -8
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +8 -8
  40. package/lib/Document.d.ts +8 -8
  41. package/lib/{Drawer-jPHImfyr.cjs → Drawer-Ctp3RrUF.cjs} +1 -1
  42. package/lib/{Drawer-DUXFBfgE.js → Drawer-mxoHuP24.js} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +8 -8
  45. package/lib/Drawer.d.ts +8 -8
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +8 -8
  49. package/lib/Emoji.d.ts +8 -8
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-BBOIIhij.js → Excalidraw-BIN8ca6O.js} +1 -1
  52. package/lib/{Excalidraw-CwZ3g3p-.cjs → Excalidraw-D2cIInsp.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +8 -8
  55. package/lib/Excalidraw.d.ts +8 -8
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +29 -5
  58. package/lib/ExportPdf.d.cts +91 -9
  59. package/lib/ExportPdf.d.ts +91 -9
  60. package/lib/ExportPdf.js +75 -35
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +8 -8
  63. package/lib/ExportWord.d.ts +8 -8
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +8 -8
  67. package/lib/FontFamily.d.ts +8 -8
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +8 -8
  71. package/lib/FontSize.d.ts +8 -8
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +8 -8
  75. package/lib/FormatPainter.d.ts +8 -8
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +8 -8
  79. package/lib/Heading.d.ts +8 -8
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +8 -8
  83. package/lib/Highlight.d.ts +8 -8
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +8 -8
  87. package/lib/History.d.ts +8 -8
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +8 -8
  91. package/lib/HorizontalRule.d.ts +8 -8
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +8 -8
  95. package/lib/Iframe.d.ts +8 -8
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +8 -8
  99. package/lib/Image.d.ts +8 -8
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +8 -8
  103. package/lib/ImageGif.d.ts +8 -8
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +8 -8
  107. package/lib/ImportWord.d.ts +8 -8
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +8 -8
  111. package/lib/Indent.d.ts +8 -8
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +8 -8
  115. package/lib/Italic.d.ts +8 -8
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +8 -8
  119. package/lib/Katex.d.ts +8 -8
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +8 -8
  123. package/lib/LineHeight.d.ts +8 -8
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +8 -8
  127. package/lib/Link.d.ts +8 -8
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +8 -8
  130. package/lib/ListItem.d.ts +8 -8
  131. package/lib/Mention.d.cts +8 -8
  132. package/lib/Mention.d.ts +8 -8
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +8 -8
  135. package/lib/Mermaid.d.ts +8 -8
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +8 -8
  139. package/lib/MoreMark.d.ts +8 -8
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +8 -8
  143. package/lib/MultiColumn.d.ts +8 -8
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +8 -8
  147. package/lib/OrderedList.d.ts +8 -8
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-OW4s40FH.js → RichTextEditor-1N7Gl9vo.js} +1033 -1025
  150. package/lib/{RichTextEditor-C3sK_Ys3.cjs → RichTextEditor-B_I3q8FW.cjs} +7 -7
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +8 -8
  153. package/lib/SearchAndReplace.d.ts +8 -8
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +8 -8
  156. package/lib/Selection.d.ts +8 -8
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +8 -8
  159. package/lib/SlashCommand.d.ts +8 -8
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +8 -8
  163. package/lib/Strike.d.ts +8 -8
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +8 -8
  167. package/lib/SubAndSuperScript.d.ts +8 -8
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +8 -8
  171. package/lib/Table.d.ts +8 -8
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +8 -8
  175. package/lib/TableOfContent.d.ts +8 -8
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +8 -8
  179. package/lib/TaskList.d.ts +8 -8
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +8 -8
  183. package/lib/TextAlign.d.ts +8 -8
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +8 -8
  187. package/lib/TextBubble.d.ts +8 -8
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +8 -8
  191. package/lib/TextDirection.d.ts +8 -8
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +8 -8
  195. package/lib/TextUnderline.d.ts +8 -8
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +8 -8
  198. package/lib/TrailingNode.d.ts +8 -8
  199. package/lib/{Twitter-2LOf4hFb.js → Twitter-ClB1gNOp.js} +1 -1
  200. package/lib/{Twitter-Cg58uzB-.cjs → Twitter-CvLMjYUZ.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +8 -8
  203. package/lib/Twitter.d.ts +8 -8
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +8 -8
  207. package/lib/Video.d.ts +8 -8
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +8 -8
  211. package/lib/bubble-extra.d.ts +8 -8
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +8 -8
  215. package/lib/index.d.ts +8 -8
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +8 -8
  218. package/lib/locale-bundle.d.ts +8 -8
  219. package/lib/{textarea-DNz8Tnud.cjs → textarea-BIoxUMDS.cjs} +1 -1
  220. package/lib/{textarea-DM-_io94.js → textarea-rOG4VKVx.js} +1 -1
  221. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- "use strict";var ff=Object.defineProperty;var hf=(e,t,r)=>t in e?ff(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Pr=(e,t,r)=>hf(e,typeof t!="symbol"?t+"":t,r);const c=require("react/jsx-runtime"),S=require("react"),pe=require("./dom-dataset-Cuy-pIfj.cjs"),Ql=require("@radix-ui/react-slot"),H=require("./index-Dz3YxLE7.cjs"),pf=require("@radix-ui/react-separator"),mf=require("@radix-ui/react-toast"),P=require("lucide-react"),gf=require("@radix-ui/react-tooltip"),xf=require("@radix-ui/react-toggle"),kr=require("@radix-ui/react-icons"),vf=require("@radix-ui/react-popover"),yf=require("@radix-ui/react-label"),bf=require("@radix-ui/react-dialog"),B=require("./index-CSvnpArE.cjs"),wf=require("re-resizable"),Sf=require("react-image-crop"),Af=require("@radix-ui/react-tabs"),Cf=require("@radix-ui/react-checkbox"),eu=require("tippy.js"),jf=require("react-colorful"),Tf=require("@radix-ui/react-switch"),Ef=require("@radix-ui/react-dropdown-menu");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ne=Ne(S),tu=Ne(pf),Re=Ne(mf),Sr=Ne(gf),ru=Ne(xf),dr=Ne(vf),nu=Ne(yf),ke=Ne(bf),jt=Ne(Af),Wo=Ne(Cf),Go=Ne(Tf),fe=Ne(Ef);var iu=typeof global=="object"&&global&&global.Object===Object&&global,If=typeof self=="object"&&self&&self.Object===Object&&self,We=iu||If||Function("return this")(),Fe=We.Symbol,ou=Object.prototype,Rf=ou.hasOwnProperty,Of=ou.toString,Jt=Fe?Fe.toStringTag:void 0;function Pf(e){var t=Rf.call(e,Jt),r=e[Jt];try{e[Jt]=void 0;var n=!0}catch{}var i=Of.call(e);return n&&(t?e[Jt]=r:delete e[Jt]),i}var kf=Object.prototype,Nf=kf.toString;function Mf(e){return Nf.call(e)}var Lf="[object Null]",$f="[object Undefined]",xs=Fe?Fe.toStringTag:void 0;function yt(e){return e==null?e===void 0?$f:Lf:xs&&xs in Object(e)?Pf(e):Mf(e)}function rt(e){return e!=null&&typeof e=="object"}var _f="[object Symbol]";function An(e){return typeof e=="symbol"||rt(e)&&yt(e)==_f}function au(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ue=Array.isArray,vs=Fe?Fe.prototype:void 0,ys=vs?vs.toString:void 0;function Gr(e){if(typeof e=="string")return e;if(Ue(e))return au(e,Gr)+"";if(An(e))return ys?ys.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Df=/\s/;function Bf(e){for(var t=e.length;t--&&Df.test(e.charAt(t)););return t}var zf=/^\s+/;function Hf(e){return e&&e.slice(0,Bf(e)+1).replace(zf,"")}function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bs=NaN,qf=/^[-+]0x[0-9a-f]+$/i,Ff=/^0b[01]+$/i,Uf=/^0o[0-7]+$/i,Wf=parseInt;function $t(e){if(typeof e=="number")return e;if(An(e))return bs;if(xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Hf(e);var r=Ff.test(e);return r||Uf.test(e)?Wf(e.slice(2),r?2:8):qf.test(e)?bs:+e}var ws=1/0,Gf=17976931348623157e292;function Vf(e){if(!e)return e===0?e:0;if(e=$t(e),e===ws||e===-ws){var t=e<0?-1:1;return t*Gf}return e===e?e:0}function Kf(e){var t=Vf(e),r=t%1;return t===t?r?t-r:t:0}function ga(e){return e}var Xf="[object AsyncFunction]",Yf="[object Function]",Jf="[object GeneratorFunction]",Zf="[object Proxy]";function su(e){if(!xt(e))return!1;var t=yt(e);return t==Yf||t==Jf||t==Xf||t==Zf}var Wn=We["__core-js_shared__"],Ss=function(){var e=/[^.]+$/.exec(Wn&&Wn.keys&&Wn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qf(e){return!!Ss&&Ss in e}var eh=Function.prototype,th=eh.toString;function Tt(e){if(e!=null){try{return th.call(e)}catch{}try{return e+""}catch{}}return""}var rh=/[\\^$.*+?()[\]{}|]/g,nh=/^\[object .+?Constructor\]$/,ih=Function.prototype,oh=Object.prototype,ah=ih.toString,sh=oh.hasOwnProperty,ch=RegExp("^"+ah.call(sh).replace(rh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lh(e){if(!xt(e)||Qf(e))return!1;var t=su(e)?ch:nh;return t.test(Tt(e))}function uh(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=uh(e,t);return lh(r)?r:void 0}var Vo=Et(We,"WeakMap");function dh(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var fh=800,hh=16,ph=Date.now;function mh(e){var t=0,r=0;return function(){var n=ph(),i=hh-(n-r);if(r=n,i>0){if(++t>=fh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function gh(e){return function(){return e}}var As=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xh=As?function(e,t){return As(e,"toString",{configurable:!0,enumerable:!1,value:gh(t),writable:!0})}:ga,vh=mh(xh);function yh(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function bh(e){return e!==e}function wh(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Sh(e,t,r){return t===t?wh(e,t,r):yh(e,bh,r)}function Ah(e,t){var r=e==null?0:e.length;return!!r&&Sh(e,t,0)>-1}var Ch=9007199254740991,jh=/^(?:0|[1-9]\d*)$/;function cu(e,t){var r=typeof e;return t=t??Ch,!!t&&(r=="number"||r!="symbol"&&jh.test(e))&&e>-1&&e%1==0&&e<t}function lu(e,t){return e===t||e!==e&&t!==t}var Cs=Math.max;function Th(e,t,r){return t=Cs(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Cs(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),dh(e,this,s)}}function Eh(e,t){return vh(Th(e,t,ga),e+"")}var Ih=9007199254740991;function xa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ih}function uu(e){return e!=null&&xa(e.length)&&!su(e)}var Rh=Object.prototype;function Oh(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Rh;return e===r}function Ph(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kh="[object Arguments]";function js(e){return rt(e)&&yt(e)==kh}var du=Object.prototype,Nh=du.hasOwnProperty,Mh=du.propertyIsEnumerable,va=js(function(){return arguments}())?js:function(e){return rt(e)&&Nh.call(e,"callee")&&!Mh.call(e,"callee")};function Lh(){return!1}var fu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ts=fu&&typeof module=="object"&&module&&!module.nodeType&&module,$h=Ts&&Ts.exports===fu,Es=$h?We.Buffer:void 0,_h=Es?Es.isBuffer:void 0,Ko=_h||Lh,Dh="[object Arguments]",Bh="[object Array]",zh="[object Boolean]",Hh="[object Date]",qh="[object Error]",Fh="[object Function]",Uh="[object Map]",Wh="[object Number]",Gh="[object Object]",Vh="[object RegExp]",Kh="[object Set]",Xh="[object String]",Yh="[object WeakMap]",Jh="[object ArrayBuffer]",Zh="[object DataView]",Qh="[object Float32Array]",ep="[object Float64Array]",tp="[object Int8Array]",rp="[object Int16Array]",np="[object Int32Array]",ip="[object Uint8Array]",op="[object Uint8ClampedArray]",ap="[object Uint16Array]",sp="[object Uint32Array]",ue={};ue[Qh]=ue[ep]=ue[tp]=ue[rp]=ue[np]=ue[ip]=ue[op]=ue[ap]=ue[sp]=!0;ue[Dh]=ue[Bh]=ue[Jh]=ue[zh]=ue[Zh]=ue[Hh]=ue[qh]=ue[Fh]=ue[Uh]=ue[Wh]=ue[Gh]=ue[Vh]=ue[Kh]=ue[Xh]=ue[Yh]=!1;function cp(e){return rt(e)&&xa(e.length)&&!!ue[yt(e)]}function ya(e){return function(t){return e(t)}}var hu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=hu&&typeof module=="object"&&module&&!module.nodeType&&module,lp=nr&&nr.exports===hu,Gn=lp&&iu.process,Vr=function(){try{var e=nr&&nr.require&&nr.require("util").types;return e||Gn&&Gn.binding&&Gn.binding("util")}catch{}}(),Is=Vr&&Vr.isTypedArray,pu=Is?ya(Is):cp,up=Object.prototype,dp=up.hasOwnProperty;function fp(e,t){var r=Ue(e),n=!r&&va(e),i=!r&&!n&&Ko(e),o=!r&&!n&&!i&&pu(e),a=r||n||i||o,s=a?Ph(e.length,String):[],l=s.length;for(var u in e)dp.call(e,u)&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cu(u,l)))&&s.push(u);return s}function hp(e,t){return function(r){return e(t(r))}}var pp=hp(Object.keys,Object),mp=Object.prototype,gp=mp.hasOwnProperty;function xp(e){if(!Oh(e))return pp(e);var t=[];for(var r in Object(e))gp.call(e,r)&&r!="constructor"&&t.push(r);return t}function mu(e){return uu(e)?fp(e):xp(e)}var vp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yp=/^\w*$/;function ba(e,t){if(Ue(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||An(e)?!0:yp.test(e)||!vp.test(e)||t!=null&&e in Object(t)}var fr=Et(Object,"create");function bp(){this.__data__=fr?fr(null):{},this.size=0}function wp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Sp="__lodash_hash_undefined__",Ap=Object.prototype,Cp=Ap.hasOwnProperty;function jp(e){var t=this.__data__;if(fr){var r=t[e];return r===Sp?void 0:r}return Cp.call(t,e)?t[e]:void 0}var Tp=Object.prototype,Ep=Tp.hasOwnProperty;function Ip(e){var t=this.__data__;return fr?t[e]!==void 0:Ep.call(t,e)}var Rp="__lodash_hash_undefined__";function Op(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fr&&t===void 0?Rp:t,this}function Ct(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ct.prototype.clear=bp;Ct.prototype.delete=wp;Ct.prototype.get=jp;Ct.prototype.has=Ip;Ct.prototype.set=Op;function Pp(){this.__data__=[],this.size=0}function Cn(e,t){for(var r=e.length;r--;)if(lu(e[r][0],t))return r;return-1}var kp=Array.prototype,Np=kp.splice;function Mp(e){var t=this.__data__,r=Cn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Np.call(t,r,1),--this.size,!0}function Lp(e){var t=this.__data__,r=Cn(t,e);return r<0?void 0:t[r][1]}function $p(e){return Cn(this.__data__,e)>-1}function _p(e,t){var r=this.__data__,n=Cn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function nt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nt.prototype.clear=Pp;nt.prototype.delete=Mp;nt.prototype.get=Lp;nt.prototype.has=$p;nt.prototype.set=_p;var hr=Et(We,"Map");function Dp(){this.size=0,this.__data__={hash:new Ct,map:new(hr||nt),string:new Ct}}function Bp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jn(e,t){var r=e.__data__;return Bp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function zp(e){var t=jn(this,e).delete(e);return this.size-=t?1:0,t}function Hp(e){return jn(this,e).get(e)}function qp(e){return jn(this,e).has(e)}function Fp(e,t){var r=jn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=Dp;it.prototype.delete=zp;it.prototype.get=Hp;it.prototype.has=qp;it.prototype.set=Fp;var Up="Expected a function";function wa(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Up);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(wa.Cache||it),r}wa.Cache=it;var Wp=500;function Gp(e){var t=wa(e,function(n){return r.size===Wp&&r.clear(),n}),r=t.cache;return t}var Vp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kp=/\\(\\)?/g,Xp=Gp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Vp,function(r,n,i,o){t.push(i?o.replace(Kp,"$1"):n||r)}),t});function Xo(e){return e==null?"":Gr(e)}function gu(e,t){return Ue(e)?e:ba(e,t)?[e]:Xp(Xo(e))}function Tn(e){if(typeof e=="string"||An(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xu(e,t){t=gu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tn(t[r++])];return r&&r==n?e:void 0}function Yp(e,t,r){var n=e==null?void 0:xu(e,t);return n===void 0?r:n}function vu(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Rs=Fe?Fe.isConcatSpreadable:void 0;function Jp(e){return Ue(e)||va(e)||!!(Rs&&e&&e[Rs])}function Zp(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Jp),i||(i=[]);++o<a;){var s=e[o];r(s)&&vu(i,s)}return i}function Qp(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function em(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Qp(e,t,r)}var tm="\\ud800-\\udfff",rm="\\u0300-\\u036f",nm="\\ufe20-\\ufe2f",im="\\u20d0-\\u20ff",om=rm+nm+im,am="\\ufe0e\\ufe0f",sm="\\u200d",cm=RegExp("["+sm+tm+om+am+"]");function Sa(e){return cm.test(e)}function lm(e){return e.split("")}var yu="\\ud800-\\udfff",um="\\u0300-\\u036f",dm="\\ufe20-\\ufe2f",fm="\\u20d0-\\u20ff",hm=um+dm+fm,pm="\\ufe0e\\ufe0f",mm="["+yu+"]",Yo="["+hm+"]",Jo="\\ud83c[\\udffb-\\udfff]",gm="(?:"+Yo+"|"+Jo+")",bu="[^"+yu+"]",wu="(?:\\ud83c[\\udde6-\\uddff]){2}",Su="[\\ud800-\\udbff][\\udc00-\\udfff]",xm="\\u200d",Au=gm+"?",Cu="["+pm+"]?",vm="(?:"+xm+"(?:"+[bu,wu,Su].join("|")+")"+Cu+Au+")*",ym=Cu+Au+vm,bm="(?:"+[bu+Yo+"?",Yo,wu,Su,mm].join("|")+")",wm=RegExp(Jo+"(?="+Jo+")|"+bm+ym,"g");function Sm(e){return e.match(wm)||[]}function Am(e){return Sa(e)?Sm(e):lm(e)}function Cm(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function ju(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=$t(r),r=r===r?r:0),t!==void 0&&(t=$t(t),t=t===t?t:0),Cm($t(e),t,r)}function jm(){this.__data__=new nt,this.size=0}function Tm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Em(e){return this.__data__.get(e)}function Im(e){return this.__data__.has(e)}var Rm=200;function Om(e,t){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!hr||n.length<Rm-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(e,t),this.size=r.size,this}function et(e){var t=this.__data__=new nt(e);this.size=t.size}et.prototype.clear=jm;et.prototype.delete=Tm;et.prototype.get=Em;et.prototype.has=Im;et.prototype.set=Om;function Pm(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function km(){return[]}var Nm=Object.prototype,Mm=Nm.propertyIsEnumerable,Os=Object.getOwnPropertySymbols,Lm=Os?function(e){return e==null?[]:(e=Object(e),Pm(Os(e),function(t){return Mm.call(e,t)}))}:km;function $m(e,t,r){var n=t(e);return Ue(e)?n:vu(n,r(e))}function Ps(e){return $m(e,mu,Lm)}var Zo=Et(We,"DataView"),Qo=Et(We,"Promise"),ea=Et(We,"Set"),ks="[object Map]",_m="[object Object]",Ns="[object Promise]",Ms="[object Set]",Ls="[object WeakMap]",$s="[object DataView]",Dm=Tt(Zo),Bm=Tt(hr),zm=Tt(Qo),Hm=Tt(ea),qm=Tt(Vo),pt=yt;(Zo&&pt(new Zo(new ArrayBuffer(1)))!=$s||hr&&pt(new hr)!=ks||Qo&&pt(Qo.resolve())!=Ns||ea&&pt(new ea)!=Ms||Vo&&pt(new Vo)!=Ls)&&(pt=function(e){var t=yt(e),r=t==_m?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Dm:return $s;case Bm:return ks;case zm:return Ns;case Hm:return Ms;case qm:return Ls}return t});var _s=We.Uint8Array,Fm="__lodash_hash_undefined__";function Um(e){return this.__data__.set(e,Fm),this}function Wm(e){return this.__data__.has(e)}function pr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new it;++t<r;)this.add(e[t])}pr.prototype.add=pr.prototype.push=Um;pr.prototype.has=Wm;function Gm(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Tu(e,t){return e.has(t)}var Vm=1,Km=2;function Eu(e,t,r,n,i,o){var a=r&Vm,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&Km?new pr:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var m=e[d],g=t[d];if(n)var x=a?n(g,m,d,t,e,o):n(m,g,d,e,t,o);if(x!==void 0){if(x)continue;h=!1;break}if(p){if(!Gm(t,function(y,w){if(!Tu(p,w)&&(m===y||i(m,y,r,n,o)))return p.push(w)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Xm(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Ym(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Jm=1,Zm=2,Qm="[object Boolean]",eg="[object Date]",tg="[object Error]",rg="[object Map]",ng="[object Number]",ig="[object RegExp]",og="[object Set]",ag="[object String]",sg="[object Symbol]",cg="[object ArrayBuffer]",lg="[object DataView]",Ds=Fe?Fe.prototype:void 0,Vn=Ds?Ds.valueOf:void 0;function ug(e,t,r,n,i,o,a){switch(r){case lg:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cg:return!(e.byteLength!=t.byteLength||!o(new _s(e),new _s(t)));case Qm:case eg:case ng:return lu(+e,+t);case tg:return e.name==t.name&&e.message==t.message;case ig:case ag:return e==t+"";case rg:var s=Xm;case og:var l=n&Jm;if(s||(s=Ym),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=Zm,a.set(e,t);var f=Eu(s(e),s(t),n,i,o,a);return a.delete(e),f;case sg:if(Vn)return Vn.call(e)==Vn.call(t)}return!1}var dg=1,fg=Object.prototype,hg=fg.hasOwnProperty;function pg(e,t,r,n,i,o){var a=r&dg,s=Ps(e),l=s.length,u=Ps(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var h=s[d];if(!(a?h in t:hg.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var x=a;++d<l;){h=s[d];var y=e[h],w=t[h];if(n)var A=a?n(w,y,h,t,e,o):n(y,w,h,e,t,o);if(!(A===void 0?y===w||i(y,w,r,n,o):A)){g=!1;break}x||(x=h=="constructor")}if(g&&!x){var C=e.constructor,T=t.constructor;C!=T&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(g=!1)}return o.delete(e),o.delete(t),g}var mg=1,Bs="[object Arguments]",zs="[object Array]",Nr="[object Object]",gg=Object.prototype,Hs=gg.hasOwnProperty;function xg(e,t,r,n,i,o){var a=Ue(e),s=Ue(t),l=a?zs:pt(e),u=s?zs:pt(t);l=l==Bs?Nr:l,u=u==Bs?Nr:u;var f=l==Nr,d=u==Nr,h=l==u;if(h&&Ko(e)){if(!Ko(t))return!1;a=!0,f=!1}if(h&&!f)return o||(o=new et),a||pu(e)?Eu(e,t,r,n,i,o):ug(e,t,l,r,n,i,o);if(!(r&mg)){var p=f&&Hs.call(e,"__wrapped__"),m=d&&Hs.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,x=m?t.value():t;return o||(o=new et),i(g,x,r,n,o)}}return h?(o||(o=new et),pg(e,t,r,n,i,o)):!1}function Aa(e,t,r,n,i){return e===t?!0:e==null||t==null||!rt(e)&&!rt(t)?e!==e&&t!==t:xg(e,t,r,n,Aa,i)}var vg=1,yg=2;function bg(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var f=new et,d;if(!(d===void 0?Aa(u,l,vg|yg,n,f):d))return!1}}return!0}function Iu(e){return e===e&&!xt(e)}function wg(e){for(var t=mu(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Iu(i)]}return t}function Ru(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Sg(e){var t=wg(e);return t.length==1&&t[0][2]?Ru(t[0][0],t[0][1]):function(r){return r===e||bg(r,e,t)}}function Ag(e,t){return e!=null&&t in Object(e)}function Cg(e,t,r){t=gu(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Tn(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&xa(i)&&cu(a,i)&&(Ue(e)||va(e)))}function jg(e,t){return e!=null&&Cg(e,t,Ag)}var Tg=1,Eg=2;function Ig(e,t){return ba(e)&&Iu(t)?Ru(Tn(e),t):function(r){var n=Yp(r,e);return n===void 0&&n===t?jg(r,e):Aa(t,n,Tg|Eg)}}function Ou(e){return function(t){return t==null?void 0:t[e]}}function Rg(e){return function(t){return xu(t,e)}}function Og(e){return ba(e)?Ou(Tn(e)):Rg(e)}function Pg(e){return typeof e=="function"?e:e==null?ga:typeof e=="object"?Ue(e)?Ig(e[0],e[1]):Sg(e):Og(e)}var Kn=function(){return We.Date.now()},kg="Expected a function",Ng=Math.max,Mg=Math.min;function Ar(e,t,r){var n,i,o,a,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(kg);t=$t(t)||0,xt(r)&&(f=!!r.leading,d="maxWait"in r,o=d?Ng($t(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(k){var M=n,R=i;return n=i=void 0,u=k,a=e.apply(R,M),a}function m(k){return u=k,s=setTimeout(y,t),f?p(k):a}function g(k){var M=k-l,R=k-u,j=t-M;return d?Mg(j,o-R):j}function x(k){var M=k-l,R=k-u;return l===void 0||M>=t||M<0||d&&R>=o}function y(){var k=Kn();if(x(k))return w(k);s=setTimeout(y,g(k))}function w(k){return s=void 0,h&&n?p(k):(n=i=void 0,a)}function A(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function C(){return s===void 0?a:w(Kn())}function T(){var k=Kn(),M=x(k);if(n=arguments,i=this,l=k,M){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),a}return T.cancel=A,T.flush=C,T}function Xn(e){return rt(e)&&uu(e)}var Lg=200;function $g(e,t,r,n){var i=-1,o=Ah,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=au(t,ya(r))),t.length>=Lg&&(o=Tu,a=!1,t=new pr(t));e:for(;++i<s;){var f=e[i],d=r==null?f:r(f);if(f=f!==0?f:0,a&&d===d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(f)}else o(t,d,n)||l.push(f)}return l}function _g(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Dg=Eh(function(e,t){var r=_g(t);return Xn(r)&&(r=void 0),Xn(e)?$g(e,Zp(t,1,Xn),Pg(r)):[]}),Bg="[object Number]";function Kr(e){return typeof e=="number"||rt(e)&&yt(e)==Bg}var zg="[object RegExp]";function Hg(e){return rt(e)&&yt(e)==zg}var qs=Vr&&Vr.isRegExp,qg=qs?ya(qs):Hg,Fg=Ou("length"),Pu="\\ud800-\\udfff",Ug="\\u0300-\\u036f",Wg="\\ufe20-\\ufe2f",Gg="\\u20d0-\\u20ff",Vg=Ug+Wg+Gg,Kg="\\ufe0e\\ufe0f",Xg="["+Pu+"]",ta="["+Vg+"]",ra="\\ud83c[\\udffb-\\udfff]",Yg="(?:"+ta+"|"+ra+")",ku="[^"+Pu+"]",Nu="(?:\\ud83c[\\udde6-\\uddff]){2}",Mu="[\\ud800-\\udbff][\\udc00-\\udfff]",Jg="\\u200d",Lu=Yg+"?",$u="["+Kg+"]?",Zg="(?:"+Jg+"(?:"+[ku,Nu,Mu].join("|")+")"+$u+Lu+")*",Qg=$u+Lu+Zg,ex="(?:"+[ku+ta+"?",ta,Nu,Mu,Xg].join("|")+")",Fs=RegExp(ra+"(?="+ra+")|"+ex+Qg,"g");function tx(e){for(var t=Fs.lastIndex=0;Fs.test(e);)++t;return t}function rx(e){return Sa(e)?tx(e):Fg(e)}var nx="Expected a function";function Bt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(nx);return xt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ar(e,t,{leading:n,maxWait:t,trailing:i})}var ix=30,ox="...",ax=/\w*$/;function sx(e,t){var r=ix,n=ox;if(xt(t)){var i="separator"in t?t.separator:i;r="length"in t?Kf(t.length):r,n="omission"in t?Gr(t.omission):n}e=Xo(e);var o=e.length;if(Sa(e)){var a=Am(e);o=a.length}if(r>=o)return e;var s=r-rx(n);if(s<1)return n;var l=a?em(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+n;if(a&&(s+=l.length-s),qg(i)){if(e.slice(s).search(i)){var u,f=l;for(i.global||(i=RegExp(i.source,Xo(ax.exec(i))+"g")),i.lastIndex=0;u=i.exec(f);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Gr(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+n}const Ca="-",cx=e=>{const t=ux(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const s=a.split(Ca);return s[0]===""&&s.length!==1&&s.shift(),_u(s,t)||lx(a)},getConflictingClassGroupIds:(a,s)=>{const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}}},_u=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?_u(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Ca);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},Us=/^\[(.+)\]$/,lx=e=>{if(Us.test(e)){const t=Us.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ux=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fx(Object.entries(e.classGroups),r).forEach(([o,a])=>{na(a,n,o,t)}),n},na=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Ws(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(dx(i)){na(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,a])=>{na(a,Ws(t,o),r,n)})})},Ws=(e,t)=>{let r=e;return t.split(Ca).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dx=e=>e.isThemeGetter,fx=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[r,i]}):e,hx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return i(o,a),a},set(o,a){r.has(o)?r.set(o,a):i(o,a)}}},Du="!",px=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,f=0,d;for(let x=0;x<s.length;x++){let y=s[x];if(u===0){if(y===i&&(n||s.slice(x,x+o)===t)){l.push(s.slice(f,x)),f=x+o;continue}if(y==="/"){d=x;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?s:s.substring(f),p=h.startsWith(Du),m=p?h.substring(1):h,g=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:a}):a},mx=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gx=e=>({cache:hx(e.cacheSize),parseClassName:px(e),...cx(e)}),xx=/\s+/,vx=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(xx);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let m=!!p,g=n(m?h.substring(0,p):h);if(!g){if(!m){s=u+(s.length>0?" "+s:s);continue}if(g=n(h),!g){s=u+(s.length>0?" "+s:s);continue}m=!1}const x=mx(f).join(":"),y=d?x+Du:x,w=y+g;if(o.includes(w))continue;o.push(w);const A=i(g,m);for(let C=0;C<A.length;++C){const T=A[C];o.push(y+T)}s=u+(s.length>0?" "+s:s)}return s};function yx(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Bu(t))&&(n&&(n+=" "),n+=r);return n}const Bu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Bu(e[n]))&&(r&&(r+=" "),r+=t);return r};function bx(e,...t){let r,n,i,o=a;function a(l){const u=t.reduce((f,d)=>d(f),e());return r=gx(u),n=r.cache.get,i=r.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=vx(l,r);return i(l,f),f}return function(){return o(yx.apply(null,arguments))}}const le=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},zu=/^\[(?:([a-z-]+):)?(.+)\]$/i,wx=/^\d+\/\d+$/,Sx=new Set(["px","full","screen"]),Ax=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cx=/\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$/,jx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Tx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=e=>_t(e)||Sx.has(e)||wx.test(e),dt=e=>qt(e,"length",Lx),_t=e=>!!e&&!Number.isNaN(Number(e)),Yn=e=>qt(e,"number",_t),Zt=e=>!!e&&Number.isInteger(Number(e)),Ix=e=>e.endsWith("%")&&_t(e.slice(0,-1)),K=e=>zu.test(e),ft=e=>Ax.test(e),Rx=new Set(["length","size","percentage"]),Ox=e=>qt(e,Rx,Hu),Px=e=>qt(e,"position",Hu),kx=new Set(["image","url"]),Nx=e=>qt(e,kx,_x),Mx=e=>qt(e,"",$x),Qt=()=>!0,qt=(e,t,r)=>{const n=zu.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Lx=e=>Cx.test(e)&&!jx.test(e),Hu=()=>!1,$x=e=>Tx.test(e),_x=e=>Ex.test(e),Dx=()=>{const e=le("colors"),t=le("spacing"),r=le("blur"),n=le("brightness"),i=le("borderColor"),o=le("borderRadius"),a=le("borderSpacing"),s=le("borderWidth"),l=le("contrast"),u=le("grayscale"),f=le("hueRotate"),d=le("invert"),h=le("gap"),p=le("gradientColorStops"),m=le("gradientColorStopPositions"),g=le("inset"),x=le("margin"),y=le("opacity"),w=le("padding"),A=le("saturate"),C=le("scale"),T=le("sepia"),k=le("skew"),M=le("space"),R=le("translate"),j=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",K,t],N=()=>[K,t],D=()=>["",Ye,dt],$=()=>["auto",_t,K],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",K],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ge=()=>[_t,K];return{cacheSize:500,separator:":",theme:{colors:[Qt],spacing:[Ye,dt],blur:["none","",ft,K],brightness:ge(),borderColor:[e],borderRadius:["none","","full",ft,K],borderSpacing:N(),borderWidth:D(),contrast:ge(),grayscale:re(),hueRotate:ge(),invert:re(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Ix,dt],inset:O(),margin:O(),opacity:ge(),padding:N(),saturate:ge(),scale:ge(),sepia:re(),skew:ge(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"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:[...W(),K]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zt,K]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Zt,K]}],"grid-cols":[{"grid-cols":[Qt]}],"col-start-end":[{col:["auto",{span:["full",Zt,K]},K]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[Qt]}],"row-start-end":[{row:["auto",{span:[Zt,K]},K]}],"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",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yn]}],"font-family":[{font:[Qt]}],"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",K]}],"line-clamp":[{"line-clamp":["none",_t,Yn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ye,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ye,dt]}],"underline-offset":[{"underline-offset":["auto",Ye,K]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],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",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),Px]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ox]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:Q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[Ye,K]}],"outline-w":[{outline:[Ye,dt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ye,dt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,Mx]}],"shadow-color":[{shadow:[Qt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ft,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[A]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:ge()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:ge()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Zt,K]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],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",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ye,dt,Yn]}],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"]}}},Bx=bx(Dx);function ee(...e){return Bx(pe.clsx(e))}let Jn;function Zn(){return Jn===void 0&&(Jn=navigator.platform.includes("Mac")),Jn}function qu(e){return`${e}`.toLowerCase()==="mod"?Zn()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Zn()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Zn()?"⇧":"Shift":e}function Fu(e){return e.map(qu).join(" ")}const F=S.forwardRef((e,t)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:a=void 0,shortcutKeys:s=void 0,tooltipOptions:l={},action:u=void 0,isActive:f=void 0,children:d,asChild:h=!1,upload:p=!1,initialDisplayedColor:m=void 0,...g}=e,x=Ea[r],y=h?Ql.Slot:Ka;return c.jsxs(Xa,{children:[c.jsx(Ya,{asChild:!0,children:c.jsxs(y,{"data-state":f!=null&&f()?"on":"off",onClick:u,ref:t,size:"sm",className:ee("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,...g,children:[x&&c.jsx(x,{className:"richtext-size-4"}),d]})}),n&&c.jsx(kn,{...l,children:c.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[c.jsx("div",{children:n}),!!(s!=null&&s.length)&&c.jsx("span",{children:Fu(s)})]})})]})});function zx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImage({width:H.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:H.IMAGE_SIZE[n]})}}))}function Hx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImageGif({width:H.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:H.IMAGE_SIZE[n]})}}))}function qx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImage)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Fx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageGif)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Ux(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageMermaid)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Wx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageDrawer)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Gx(e){return[{type:"flex-start",icon:"AlignLeft",tooltip:"Align left"},{type:"center",icon:"AlignCenter",tooltip:"Align center"},{type:"flex-end",icon:"AlignRight",tooltip:"Align right"}].map(r=>({type:`video-align-${r.type}`,component:F,componentProps:{tooltip:r.tooltip,icon:r.icon,action:()=>e.commands.updateVideo({align:r.type}),isActive:()=>e.getAttributes("video").align===r.type}}))}function Vx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`video-${n}`,component:F,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateVideo({width:H.VIDEO_SIZE[n]}),isActive:()=>e.isActive("video",{width:H.VIDEO_SIZE[n]})}}))}function Kx(e){return[{type:"flipX",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.tooltip.flipX"),icon:"FlipX",action:()=>{const t=e.getAttributes("image"),{flipX:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipX:!r}).run()}}},{type:"flipY",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.tooltip.flipY"),icon:"FlipY",action:()=>{const t=e.getAttributes("image"),{flipY:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipY:!r}).run()}}},...zx(e),...qx(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Xx(e){return[...Hx(e),...Fx(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Yx(e){return[...Ux(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.edit"),icon:"Pencil",action:()=>!0}},{type:"remove",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Jx(e){return[...Wx(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.edit"),icon:"Pencil",action:()=>(console.log("AAA"),!0)}},{type:"remove",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Zx(e){return[...Vx(e),...Gx(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;B.deleteSelection(t,r)}}}]}function Qx(e,t){return H.BUBBLE_TEXT_LIST.reduce((r,n)=>{if(n==="divider"&&r.length>0)return[...r,{type:"divider",component:void 0,componentProps:{}}];const i=e.extensionManager.extensions.find(o=>o.name===n);return i?[...r,i.configure().options.button({editor:e,t,extension:i})]:r},[])}function ja(e,t,r){const n=[],i=e.node(0);r=typeof r=="number"&&r>=0?r:e.sameParent(t)?Math.max(0,e.sharedDepth(t.pos)-1):e.sharedDepth(t.pos);const o=new B.NodeRange(e,t,r),a=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((s,l)=>{const u=a+l,f=u+s.nodeSize;if(u<o.start||u>=o.end)return;const d=new B.SelectionRange(i.resolve(u),i.resolve(f));n.push(d)}),n}class Ta{constructor(t,r){Pr(this,"anchor");Pr(this,"head");this.anchor=t,this.head=r}map(t){return new Ta(t.map(this.anchor),t.map(this.head))}resolve(t){const r=t.resolve(this.anchor),n=t.resolve(this.head);return new qe(r,n)}}class qe extends B.Selection{constructor(r,n,i,o=1){const{doc:a}=r,s=r===n,l=r.pos===a.content.size&&n.pos===a.content.size,u=s&&!l?a.resolve(n.pos+(o>0?1:-1)):n,f=s&&l?a.resolve(r.pos-(o>0?1:-1)):r,d=ja(f.min(u),f.max(u),i);super(u.pos>=r.pos?d[0].$from:d[d.length-1].$to,u.pos>=r.pos?d[d.length-1].$to:d[0].$from,d);Pr(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof qe&&r.$from.pos===this.$from.pos&&r.$to.pos===this.$to.pos}map(r,n){const i=r.resolve(n.map(this.anchor)),o=r.resolve(n.map(this.head));return new qe(i,o)}toJSON(){return{type:"nodeRange",anchor:this.anchor,head:this.head}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){const{doc:r}=this.$from;if(this.isForwards&&this.ranges.length>1){const o=this.ranges.slice(0,-1),a=o[0].$from,s=o[o.length-1].$to;return new qe(a,s,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new qe(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),a=o[0].$from,s=o[o.length-1].$to;return new qe(s,a,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new qe(this.$anchor,i,this.depth)}static fromJSON(r,n){return new qe(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,a=1){return new this(r.resolve(n),r.resolve(i),o,a)}getBookmark(){return new Ta(this.anchor,this.head)}}function e0(e){const t=e.cloneNode(!0),r=[e,...Array.from(e.getElementsByTagName("*"))],n=[t,...Array.from(t.getElementsByTagName("*"))];return r.forEach((i,o)=>{n[o].style.cssText=function(a){let s="";const l=getComputedStyle(a);for(let u=0;u<l.length;u+=1)s+=`${l[u]}:${l.getPropertyValue(l[u])};`;return s}(i)}),t}function Mr(e,t){return window.getComputedStyle(e)[t]}function t0(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function Gs(e){e.parentNode!==null&&e.parentNode!==void 0&&e.parentNode.removeChild(e)}function Uu(e){const{x:t,y:r,direction:n,editor:i}=e;let o=null,a=null,s=null,l=t;for(;a===null&&l<window.innerWidth&&l>0;){const u=document.elementsFromPoint(l,r),f=u.findIndex(h=>h.classList.contains("ProseMirror")),d=u.slice(0,f);if(d.length>0){const h=d[0];if(o=h,s=i.view.posAtDOM(h,0),s>=0){a=i.state.doc.nodeAt(Math.max(s-1,0)),(a===null||a.isText)&&(a=i.state.doc.nodeAt(Math.max(s-1,0))),a||(a=i.state.doc.nodeAt(Math.max(s,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:a,pos:s!==null?s:null}}function r0(e,t){const{doc:r}=t.view.state,n=Uu({editor:t,x:e.clientX,y:e.clientY,direction:"right"});if(!n.resultNode||n.pos===null)return[];const i=e.clientX,o=function(f,d,h){const p=Number.parseInt(Mr(f.dom,"paddingLeft"),10),m=Number.parseInt(Mr(f.dom,"paddingRight"),10),g=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),x=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),y=f.dom.getBoundingClientRect();return{left:t0(d,y.left+p+g,y.right-m-x),top:h}}(t.view,i,e.clientY),a=t.view.posAtCoords(o);if(!a)return[];const{pos:s}=a;if(!r.resolve(s).parent)return[];const l=r.resolve(n.pos),u=r.resolve(n.pos+1);return ja(l,u,0)}function Vs(e,t){const r=e.resolve(t),{depth:n}=r;return n===0?t:r.pos-r.parentOffset-1}function Ks(e,t){const r=e.nodeAt(t),n=e.resolve(t);let{depth:i}=n,o=r;for(;i>0;){const a=n.node(i);i-=1,i===0&&(o=a)}return o}function Xs(e,t){let r=t;for(;r&&r.parentNode&&r.parentNode!==e.dom;)r=r.parentNode;return r}const Wu=new B.PluginKey("dragHandle");function n0({pluginKey:e=Wu,element:t,editor:r,tippyOptions:n,onNodeChange:i}){const o=document.createElement("div");let a=null,s=!1,l=null,u=-1;return t.addEventListener("dragstart",f=>{const{view:d}=r;if(!f.dataTransfer)return;const{empty:h,$from:p,$to:m}=d.state.selection,g=r0(f,r),x=ja(p,m,0),y=x.some(j=>g.find(L=>L.$from===j.$from&&L.$to===j.$to)),w=h||!y?g:x;if(w.length===0)return;const{tr:A}=d.state,C=document.createElement("div"),T=w[0].$from.pos,k=w[w.length-1].$to.pos,M=qe.create(d.state.doc,T,k),R=M.content();w.forEach(j=>{const L=e0(d.nodeDOM(j.$from.pos));C.append(L)}),C.style.position="absolute",C.style.top="-10000px",document.body.append(C),f.dataTransfer.clearData(),f.dataTransfer.setDragImage(C,0,0),d.dragging={slice:R,move:!0},A.setSelection(M),d.dispatch(A),document.addEventListener("drop",()=>Gs(C),{once:!0}),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}),t.addEventListener("dragend",()=>{t&&(t.style.pointerEvents="auto")}),new B.Plugin({key:typeof e=="string"?new B.PluginKey(e):e,state:{init:()=>({locked:!1}),apply(f,d){const h=f.getMeta("lockDragHandle"),p=f.getMeta("hideDragHandle");if(h!==void 0&&(s=h),p&&a)return a.hide(),s=!1,l=null,u=-1,i==null||i({editor:r,node:null,pos:-1}),d;if(f.docChanged&&u!==-1&&t&&a){const m=f.mapping.map(u);m!==u&&(u=m)}return d}},view:f=>{return d(),h(r.view.dom),a=eu(f.dom,{...p(),...n}),{update(C,T){if(!m(t,a)||(t.draggable=!s,!g(C,T)))return;const k=x(C);k&&y(C,k)},destroy(){A()}};function d(){t.draggable=!0,t.style.pointerEvents="auto"}function h(C){var T;(T=C.parentElement)==null||T.appendChild(o),o.appendChild(t),Object.assign(o.style,{pointerEvents:"none",position:"absolute",top:"0",left:"0"})}function p(){return{getReferenceClientRect:null,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:!1,duration:100,zIndex:10,appendTo:o,content:t,popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{rootBoundary:"document",mainAxis:!1}}]}}}function m(C,T){return C&&T}function g(C,T){return!C.state.doc.eq(T.doc)&&u!==-1}function x(C){let T=C.nodeDOM(u);return T=Xs(C,T),T===C.dom||(T==null?void 0:T.nodeType)!==1?null:T}function y(C,T){const k=C.posAtDOM(T,0),M=Ks(r.state.doc,k);if(M===l)return;const R=Vs(r.state.doc,k);l=M,u=R,i==null||i({editor:r,node:l,pos:u}),w(T)}function w(C){a.setProps({getReferenceClientRect:()=>C.getBoundingClientRect()}),a.show()}function A(){a==null||a.destroy(),t&&Gs(o)}},props:{handleDOMEvents:{mouseleave:(f,d)=>{if(s||!h(d))return!1;return p(),m(),!1;function h(g){return g.target&&!o.contains(g.relatedTarget)}function p(){a==null||a.hide()}function m(){l=null,u=-1,i==null||i({editor:r,node:null,pos:-1})}},mousemove:Ar((f,d)=>{if(!t||!a||s)return!1;const h=Uu({x:d.clientX,y:d.clientY,direction:"right",editor:r});if(!h.resultElement||h.resultElement===f.dom)return!1;const p=Xs(f,h.resultElement);if(p===f.dom||(p==null?void 0:p.nodeType)!==1)return!1;const m=f.posAtDOM(p,0),g=Ks(r.state.doc,m);if(g===l)return!1;const x=Vs(r.state.doc,m);return l=g,u=x,i==null||i({editor:r,node:l,pos:u}),a.setProps({getReferenceClientRect:()=>p.getBoundingClientRect()}),a.show(),!1},100)}}})}var Xr=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(Xr||{});function i0(e,t,r){return e<t?t:e>r?r:e}function o0(e,t,r,n){const{doc:i,selection:o}=e;if(!i||!o||!(o instanceof B.TextSelection||o instanceof B.AllSelection))return e;const{from:a,to:s}=o;return i.nodesBetween(a,s,(l,u)=>{const f=l.type;return r.includes(f.name)?(e=ia(e,u,t),!1):!B.isList(l.type.name,n.extensionManager.extensions)}),e}function ia(e,t,r){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const a=i0((n.attrs.indent||0)+r,0,7);if(a===n.attrs.indent)return e;const s={...n.attrs,indent:a};return e.setNodeMarkup(t,n.type,s,n.marks)}function a0({delta:e,types:t}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:a}=r;return a=a.setSelection(o),a=o0(a,e,t,i),a.docChanged?(n&&n(a),!0):!1}}function s0(e){var R,j,L;const{pluginKey:t=Wu}=e,{t:r}=H.useLocale(),[n,i]=S.useState(null),[o,a]=S.useState(-1),s=S.useRef(null),l=S.useRef(null),[u,f]=S.useState(!1),d=e.editor.extensionManager.extensions.some(O=>O.name==="textAlign"),h=e.editor.extensionManager.extensions.some(O=>O.name==="indent"),p=e.editor.extensionManager.extensions.some(O=>O.name==="clear");S.useEffect(()=>{s.current&&!e.editor.isDestroyed&&(l.current=n0({editor:e.editor,element:s.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:T}),e.editor.registerPlugin(l.current))},[e.editor,s]);function m(){const O=e.editor.chain();O.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&O.setParagraph(),O.run()}function g(){e.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function x(){e.editor.commands.setNodeSelection(o);const{$anchor:O}=e.editor.state.selection,N=O.node(1)||e.editor.state.selection.node;e.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),N.toJSON()).run()}function y(O){e.editor.commands.setTextAlign(O)}function w(){const O=ia(e.editor.state.tr,o,1);O.setMeta("hideDragHandle",!0),e.editor.view.dispatch&&e.editor.view.dispatch(O)}function A(){const O=ia(e.editor.state.tr,o,-1);e.editor.view.dispatch&&e.editor.view.dispatch(O)}function C(){e.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function T(O){O.node&&i(O.node),a(O.pos)}function k(){var O;if(o!==-1){const N=(n==null?void 0:n.nodeSize)||0,D=o+N,$=(n==null?void 0:n.type.name)==="paragraph"&&((O=n==null?void 0:n.content)==null?void 0:O.size)===0,W=$?o+2:D+2;e.editor.chain().command(({dispatch:Q,tr:ae,state:oe})=>Q?($?ae.insertText("/",o,o+1):ae.insert(D,oe.schema.nodes.paragraph.create(null,[oe.schema.text("/")])),Q(ae)):!0).focus(W).run()}}S.useEffect(()=>(u?e.editor.commands.setMeta("lockDragHandle",!0):e.editor.commands.setMeta("lockDragHandle",!1),()=>{e.editor.commands.setMeta("lockDragHandle",!1)}),[u]),S.useEffect(()=>()=>{l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[]),S.useEffect(()=>{var O;(O=e.editor)!=null&&O.isDestroyed&&l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[(R=e.editor)==null?void 0:R.isDestroyed]);const M=O=>{e!=null&&e.disabled||f(O)};return c.jsx("div",{ref:s,className:`drag-handle richtext-duration-200 richtext-ease-in-out [transition-property:top,_left] ${e==null?void 0:e.className}`,style:{opacity:e!=null&&e.disabled?0:1},children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]",children:[c.jsx(be,{className:"!richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,onClick:k,size:"icon",type:"button",variant:"ghost",children:c.jsx(ye,{className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Plus"})}),c.jsxs(md,{onOpenChange:M,open:u,children:[c.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[c.jsxs(Xa,{children:[c.jsx(Ya,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(be,{className:"richtext-relative richtext-z-[1] !richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,size:"icon",type:"button",variant:"ghost",onMouseUp:O=>{O.preventDefault(),!(e!=null&&e.disabled)&&f(!0)},children:c.jsx(ye,{className:"richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Grip"})})}),c.jsx(kn,{children:r("editor.draghandle.tooltip")})]}),c.jsx(gd,{className:"richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]"})]}),c.jsxs(Ua,{align:"start",className:"richtext-w-48",side:"bottom",sideOffset:0,children:[c.jsxs(Be,{className:"richtext-flex richtext-gap-3 richtext-bg-opacity-10 hover:richtext-bg-red-400 hover:richtext-bg-opacity-20 focus:richtext-bg-red-400 focus:richtext-bg-opacity-30 focus:richtext-text-red-500 dark:hover:richtext-bg-opacity-20 dark:hover:richtext-text-red-500",onClick:C,children:[c.jsx(ye,{name:"Trash2"}),c.jsx("span",{children:r("editor.remove")})]}),p?c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:m,children:[c.jsx(ye,{name:"PaintRoller"}),c.jsx("span",{children:r("editor.clear.tooltip")})]}):null,c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:g,children:[c.jsx(ye,{name:"Clipboard"}),c.jsx("span",{children:r("editor.copyToClipboard")})]}),c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:x,children:[c.jsx(ye,{name:"Copy"}),c.jsx("span",{children:r("editor.copy")})]}),d||h?c.jsx(Wa,{}):null,d?c.jsxs(sc,{children:[c.jsxs(ha,{className:"richtext-flex richtext-gap-3",children:[c.jsx(ye,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.tooltip")})]}),c.jsx(ac,{children:c.jsxs(pa,{children:[c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:()=>y("left"),children:[c.jsx(ye,{name:"AlignLeft"}),c.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:()=>y("center"),children:[c.jsx(ye,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),c.jsxs(Be,{className:"richtext-flex richtext-gap-3",onClick:()=>y("right"),children:[c.jsx(ye,{name:"AlignRight"}),c.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,h?c.jsxs(sc,{children:[c.jsxs(ha,{className:"richtext-flex richtext-gap-3",children:[c.jsx(ye,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent")})]}),c.jsx(ac,{children:c.jsxs(pa,{children:[c.jsxs(Be,{className:"richtext-flex richtext-gap-3",disabled:((j=n==null?void 0:n.attrs)==null?void 0:j.indent)>=Xr.max,onClick:w,children:[c.jsx(ye,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent.tooltip")})]}),c.jsxs(Be,{className:"richtext-flex richtext-gap-3",disabled:((L=n==null?void 0:n.attrs)==null?void 0:L.indent)<=Xr.min,onClick:A,children:[c.jsx(ye,{name:"IndentDecrease"}),c.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const c0={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function l0({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r}):c.jsx(c.Fragment,{})}function u0(e){const{t,lang:r}=H.useLocale(),n=({editor:o})=>{const{selection:a}=o.view.state,{$from:s,to:l}=a;return s.pos===l?!1:a instanceof B.TextSelection},i=S.useMemo(()=>e.disabled||!(e!=null&&e.editor)?[]:Qx(e.editor,t),[e.disabled,e.editor,r,t]);return c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:n,tippyOptions:c0,children:i!=null&&i.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-gap-[4px] richtext-whitespace-nowrap",children:i==null?void 0:i.map((o,a)=>(o==null?void 0:o.type)==="divider"?c.jsx(De,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"},`bubbleMenu-divider-${a}`):c.jsx(l0,{disabled:e.disabled,editor:e.editor,item:o},`bubbleMenu-text-${a}`))})}):c.jsx(c.Fragment,{})})}function d0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 f0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 h0(){return c.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:c.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 p0(){return c.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:c.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 m0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 ye(e){const t=Ea[e.name];return t?c.jsx(t,{onClick:e==null?void 0:e.onClick,className:`richtext-w-4 richtext-h-4 ${(e==null?void 0:e.className)||""}`}):null}function g0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 Gu(e){return c.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:c.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function x0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function v0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function y0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 b0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 w0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 S0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 A0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 Vu(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[c.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"}),c.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 Ku(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[c.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"}),c.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 C0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[c.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"}),c.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 j0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.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 T0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[c.jsx("circle",{cx:"10",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"10",r:"4"}),c.jsx("circle",{cx:"38",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"38",r:"4"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function E0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.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 I0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 R0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 O0(){return c.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:c.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 Ea={Bold:P.Bold,LoaderCircle:P.LoaderCircle,Italic:P.Italic,Underline:P.Underline,Quote:P.Quote,TextQuote:f0,Strikethrough:P.Strikethrough,Minus:P.Minus,Eraser:P.Eraser,PaintRoller:P.PaintRoller,Redo2:P.Redo2,Undo2:P.Undo2,AlignCenter:kr.TextAlignCenterIcon,AlignJustify:kr.TextAlignJustifyIcon,AlignLeft:kr.TextAlignLeftIcon,AlignRight:kr.TextAlignRightIcon,ChevronDown:P.ChevronDown,Subscript:P.Subscript,Superscript:P.Superscript,Code:P.Code,Code2:P.CodeXml,Type:P.Type,IndentIncrease:P.IndentIncrease,IndentDecrease:P.IndentDecrease,List:P.List,ListOrdered:P.ListOrdered,ListTodo:P.ListTodo,Link:P.Link,ImageUp:P.ImageUp,Video:P.Video,Maximize:P.Maximize,Minimize:P.Minimize,Table:P.Table,Sparkles:P.Sparkles,Pencil:P.Pencil,Unlink:P.Unlink,BetweenHorizonalEnd:P.BetweenHorizonalEnd,BetweenHorizonalStart:P.BetweenHorizonalStart,BetweenVerticalStart:P.BetweenVerticalStart,BetweenVerticalEnd:P.BetweenVerticalEnd,TableCellsMerge:P.TableCellsMerge,TableCellsSplit:P.TableCellsSplit,Trash2:P.Trash2,Trash:P.Trash,Replace:P.Replace,ChevronsUpDown:P.ChevronsUpDown,LineHeight:g0,Word:m0,Heading1:P.Heading1,Heading2:P.Heading2,Heading3:P.Heading3,Heading4:P.Heading4,Heading5:P.Heading5,Heading6:P.Heading6,Columns2:P.Columns2,Columns3:P.Columns3,Columns4:P.Columns4,Plus:P.Plus,Grip:P.GripVertical,Copy:P.Copy,Clipboard:P.Clipboard,PanelLeft:P.PanelLeft,PanelRight:P.PanelRight,Columns:P.Columns2,Iframe:P.Frame,MenuDown:Gu,SizeS:y0,SizeM:v0,SizeL:x0,AspectRatio:d0,Emoji:P.SmilePlus,DeleteColumn:h0,DeleteRow:p0,SearchAndReplace:P.Replace,EmojiIcon:P.SmilePlusIcon,KatexIcon:P.Sigma,ExportPdf:Vu,ExportWord:Ku,ImportWord:O0,ColumnAddLeft:b0,ColumnAddRight:w0,BookMarked:P.BookMarked,Excalidraw:A0,ZoomIn:P.ZoomIn,ZoomOut:P.ZoomOut,Settings:P.Settings,Eye:P.Eye,TextDirection:S0,LeftToRight:j0,RightToLeft:E0,Attachment:P.Paperclip,GifIcon:C0,ChevronUp:P.ChevronUp,Crop:P.CropIcon,Mermaid:T0,Twitter:I0,CodeView:R0,FlipX:P.FlipVertical,FlipY:P.FlipHorizontal,PencilRuler:P.PencilRuler,WrapText:P.WrapText};function P0({fill:e}){return c.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:c.jsxs("g",{id:"icon/背景颜色",children:[c.jsx("g",{id:"编组",fill:"currentColor",children:c.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[c.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),c.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),c.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),c.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",id:"矩形",fill:e||"#FBDE28"})]})})})}function Xu(e){const[t,r]=S.useState(void 0);function n(a){var s;(s=e.action)==null||s.call(e,a)}function i(){var a;(a=e.action)==null||a.call(e,t)}const o=S.useCallback(Ar(a=>{r(a)},350),[]);return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[c.jsx(F,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:i,tooltipOptions:e==null?void 0:e.tooltipOptions,shortcutKeys:e==null?void 0:e.shortcutKeys,children:c.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:c.jsx(P0,{fill:t})})}),c.jsx(rf,{selectedColor:t,setSelectedColor:o,onChange:n,highlight:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(be,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:e==null?void 0:e.disabled,children:c.jsx(ye,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function k0({editor:e,disabled:t,actions:r}){var x,y,w,A,C,T,k,M,R,j,L,O,N,D,$,W,Q,ae;const n=({editor:oe})=>B.isActive(oe.view.state,"table"),{t:i}=H.useLocale();function o(){e.chain().focus().addColumnBefore().run()}function a(){e.chain().focus().addColumnAfter().run()}function s(){e.chain().focus().deleteColumn().run()}function l(){e.chain().focus().addRowBefore().run()}function u(){e.chain().focus().addRowAfter().run()}function f(){e.chain().focus().deleteRow().run()}function d(){e.chain().focus().mergeCells().run()}function h(){e==null||e.chain().focus().splitCell().run()}function p(){e.chain().focus().deleteTable().run()}function m(oe){e.chain().focus().setTableCellBackground(oe).run()}const g=()=>{var Le;const{view:oe,state:{selection:{from:re}}}=e,we=oe.domAtPos(re).node;if(!we)return new DOMRect(-1e3,-1e3,0,0);const ge=(Le=we==null?void 0:we.closest)==null?void 0:Le.call(we,".tableWrapper");return ge?ge.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"table",shouldShow:n,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:g,plugins:[eu.sticky],sticky:"popper"},children:t?c.jsx(c.Fragment,{}):c.jsxs("div",{className:"richtext-flex richtext-size-full richtext-min-w-32 richtext-flex-row richtext-items-center richtext-gap-0.5 richtext-rounded-lg !richtext-border richtext-border-border richtext-bg-background richtext-p-2 richtext-leading-none richtext-shadow-sm",children:[c.jsx(F,{action:o,disabled:!((y=(x=e==null?void 0:e.can())==null?void 0:x.addColumnBefore)!=null&&y.call(x)),icon:"BetweenHorizonalEnd",tooltip:i("editor.table.menu.insertColumnBefore"),"tooltip-options":{sideOffset:15}}),c.jsx(F,{action:a,disabled:!((A=(w=e==null?void 0:e.can())==null?void 0:w.addColumnAfter)!=null&&A.call(w)),icon:"BetweenHorizonalStart",tooltip:i("editor.table.menu.insertColumnAfter"),"tooltip-options":{sideOffset:15}}),c.jsx(F,{action:s,disabled:!((T=e==null?void 0:(C=e.can()).deleteColumn)!=null&&T.call(C)),icon:"DeleteColumn",tooltip:i("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15}}),c.jsx(De,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(F,{action:l,disabled:!((M=e==null?void 0:(k=e.can()).addRowBefore)!=null&&M.call(k)),icon:"BetweenVerticalEnd",tooltip:i("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15}}),c.jsx(F,{action:u,disabled:!((j=(R=e==null?void 0:e.can())==null?void 0:R.addRowAfter)!=null&&j.call(R)),icon:"BetweenVerticalStart",tooltip:i("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15}}),c.jsx(F,{action:f,disabled:!((O=(L=e==null?void 0:e.can())==null?void 0:L.deleteRow)!=null&&O.call(L)),icon:"DeleteRow",tooltip:i("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15}}),c.jsx(De,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(F,{action:d,disabled:!((D=(N=e==null?void 0:e.can())==null?void 0:N.mergeCells)!=null&&D.call(N)),icon:"TableCellsMerge",tooltip:i("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15}}),c.jsx(F,{action:h,disabled:!((W=($=e==null?void 0:e.can())==null?void 0:$.splitCell)!=null&&W.call($)),icon:"TableCellsSplit",tooltip:i("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15}}),c.jsx(De,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(Xu,{action:m,editor:e,tooltip:i("editor.table.menu.setCellsBgColor"),tooltipOptions:{sideOffset:15}}),c.jsx(F,{action:p,disabled:!((ae=(Q=e==null?void 0:e.can())==null?void 0:Q.deleteTable)!=null&&ae.call(Q)),icon:"Trash2",tooltip:i("editor.table.menu.deleteTable"),"tooltip-options":{sideOffset:15}}),r&&r.map((oe,re)=>c.jsx(F,{...oe},re))]})})}const N0="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",M0="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",zt=(e,t)=>{for(const r in t)e[r]=t[r];return e},oa="numeric",aa="ascii",sa="alpha",ir="asciinumeric",rr="alphanumeric",ca="domain",Yu="emoji",L0="scheme",$0="slashscheme",Qn="whitespace";function _0(e,t){return e in t||(t[e]=[]),t[e]}function At(e,t,r){t[oa]&&(t[ir]=!0,t[rr]=!0),t[aa]&&(t[ir]=!0,t[sa]=!0),t[ir]&&(t[rr]=!0),t[sa]&&(t[rr]=!0),t[rr]&&(t[ca]=!0),t[Yu]&&(t[ca]=!0);for(const n in t){const i=_0(n,r);i.indexOf(e)<0&&i.push(e)}}function D0(e,t){const r={};for(const n in t)t[n].indexOf(e)>=0&&(r[n]=!0);return r}function Te(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Te.groups={};Te.prototype={accepts(){return!!this.t},go(e){const t=this,r=t.j[e];if(r)return r;for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],o=t.jr[n][1];if(o&&i.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,r,n){for(let i=0;i<e.length;i++)this.tt(e[i],t,r,n)},tr(e,t,r,n){n=n||Te.groups;let i;return t&&t.j?i=t:(i=new Te(t),r&&n&&At(t,r,n)),this.jr.push([e,i]),i},ts(e,t,r,n){let i=this;const o=e.length;if(!o)return i;for(let a=0;a<o-1;a++)i=i.tt(e[a]);return i.tt(e[o-1],t,r,n)},tt(e,t,r,n){n=n||Te.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let a,s=i.go(e);if(s?(a=new Te,zt(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new Te,o){if(n)if(a.t&&typeof a.t=="string"){const l=zt(D0(a.t,n),r);At(o,l,n)}else r&&At(o,r,n);a.t=o}return i.j[e]=a,a}};const Y=(e,t,r,n,i)=>e.ta(t,r,n,i),he=(e,t,r,n,i)=>e.tr(t,r,n,i),Ys=(e,t,r,n,i)=>e.ts(t,r,n,i),I=(e,t,r,n,i)=>e.tt(t,r,n,i),Qe="WORD",la="UWORD",Ju="ASCIINUMERICAL",Zu="ALPHANUMERICAL",mr="LOCALHOST",ua="TLD",da="UTLD",Fr="SCHEME",Lt="SLASH_SCHEME",Ia="NUM",fa="WS",Ra="NL",or="OPENBRACE",ar="CLOSEBRACE",Yr="OPENBRACKET",Jr="CLOSEBRACKET",Zr="OPENPAREN",Qr="CLOSEPAREN",en="OPENANGLEBRACKET",tn="CLOSEANGLEBRACKET",rn="FULLWIDTHLEFTPAREN",nn="FULLWIDTHRIGHTPAREN",on="LEFTCORNERBRACKET",an="RIGHTCORNERBRACKET",sn="LEFTWHITECORNERBRACKET",cn="RIGHTWHITECORNERBRACKET",ln="FULLWIDTHLESSTHAN",un="FULLWIDTHGREATERTHAN",dn="AMPERSAND",Oa="APOSTROPHE",fn="ASTERISK",mt="AT",hn="BACKSLASH",pn="BACKTICK",mn="CARET",gt="COLON",Pa="COMMA",gn="DOLLAR",ze="DOT",xn="EQUALS",ka="EXCLAMATION",Pe="HYPHEN",sr="PERCENT",vn="PIPE",yn="PLUS",bn="POUND",cr="QUERY",Na="QUOTE",Qu="FULLWIDTHMIDDLEDOT",Ma="SEMI",He="SLASH",lr="TILDE",wn="UNDERSCORE",ed="EMOJI",Sn="SYM";var td=Object.freeze({__proto__:null,WORD:Qe,UWORD:la,ASCIINUMERICAL:Ju,ALPHANUMERICAL:Zu,LOCALHOST:mr,TLD:ua,UTLD:da,SCHEME:Fr,SLASH_SCHEME:Lt,NUM:Ia,WS:fa,NL:Ra,OPENBRACE:or,CLOSEBRACE:ar,OPENBRACKET:Yr,CLOSEBRACKET:Jr,OPENPAREN:Zr,CLOSEPAREN:Qr,OPENANGLEBRACKET:en,CLOSEANGLEBRACKET:tn,FULLWIDTHLEFTPAREN:rn,FULLWIDTHRIGHTPAREN:nn,LEFTCORNERBRACKET:on,RIGHTCORNERBRACKET:an,LEFTWHITECORNERBRACKET:sn,RIGHTWHITECORNERBRACKET:cn,FULLWIDTHLESSTHAN:ln,FULLWIDTHGREATERTHAN:un,AMPERSAND:dn,APOSTROPHE:Oa,ASTERISK:fn,AT:mt,BACKSLASH:hn,BACKTICK:pn,CARET:mn,COLON:gt,COMMA:Pa,DOLLAR:gn,DOT:ze,EQUALS:xn,EXCLAMATION:ka,HYPHEN:Pe,PERCENT:sr,PIPE:vn,PLUS:yn,POUND:bn,QUERY:cr,QUOTE:Na,FULLWIDTHMIDDLEDOT:Qu,SEMI:Ma,SLASH:He,TILDE:lr,UNDERSCORE:wn,EMOJI:ed,SYM:Sn});const Je=/[a-z]/,er=new RegExp("\\p{L}","u"),ei=new RegExp("\\p{Emoji}","u"),Ze=/\d/,ti=/\s/,Js="\r",ri=`
2
- `,B0="️",z0="‍",ni="";let Lr=null,$r=null;function H0(e=[]){const t={};Te.groups=t;const r=new Te;Lr==null&&(Lr=Zs(N0)),$r==null&&($r=Zs(M0)),I(r,"'",Oa),I(r,"{",or),I(r,"}",ar),I(r,"[",Yr),I(r,"]",Jr),I(r,"(",Zr),I(r,")",Qr),I(r,"<",en),I(r,">",tn),I(r,"(",rn),I(r,")",nn),I(r,"「",on),I(r,"」",an),I(r,"『",sn),I(r,"』",cn),I(r,"<",ln),I(r,">",un),I(r,"&",dn),I(r,"*",fn),I(r,"@",mt),I(r,"`",pn),I(r,"^",mn),I(r,":",gt),I(r,",",Pa),I(r,"$",gn),I(r,".",ze),I(r,"=",xn),I(r,"!",ka),I(r,"-",Pe),I(r,"%",sr),I(r,"|",vn),I(r,"+",yn),I(r,"#",bn),I(r,"?",cr),I(r,'"',Na),I(r,"/",He),I(r,";",Ma),I(r,"~",lr),I(r,"_",wn),I(r,"\\",hn),I(r,"・",Qu);const n=he(r,Ze,Ia,{[oa]:!0});he(n,Ze,n);const i=he(n,Je,Ju,{[ir]:!0}),o=he(n,er,Zu,{[rr]:!0}),a=he(r,Je,Qe,{[aa]:!0});he(a,Ze,i),he(a,Je,a),he(i,Ze,i),he(i,Je,i);const s=he(r,er,la,{[sa]:!0});he(s,Je),he(s,Ze,o),he(s,er,s),he(o,Ze,o),he(o,Je),he(o,er,o);const l=I(r,ri,Ra,{[Qn]:!0}),u=I(r,Js,fa,{[Qn]:!0}),f=he(r,ti,fa,{[Qn]:!0});I(r,ni,f),I(u,ri,l),I(u,ni,f),he(u,ti,f),I(f,Js),I(f,ri),he(f,ti,f),I(f,ni,f);const d=he(r,ei,ed,{[Yu]:!0});I(d,"#"),he(d,ei,d),I(d,B0,d);const h=I(d,z0);I(h,"#"),he(h,ei,d);const p=[[Je,a],[Ze,i]],m=[[Je,null],[er,s],[Ze,o]];for(let g=0;g<Lr.length;g++)ht(r,Lr[g],ua,Qe,p);for(let g=0;g<$r.length;g++)ht(r,$r[g],da,la,m);At(ua,{tld:!0,ascii:!0},t),At(da,{utld:!0,alpha:!0},t),ht(r,"file",Fr,Qe,p),ht(r,"mailto",Fr,Qe,p),ht(r,"http",Lt,Qe,p),ht(r,"https",Lt,Qe,p),ht(r,"ftp",Lt,Qe,p),ht(r,"ftps",Lt,Qe,p),At(Fr,{scheme:!0,ascii:!0},t),At(Lt,{slashscheme:!0,ascii:!0},t),e=e.sort((g,x)=>g[0]>x[0]?1:-1);for(let g=0;g<e.length;g++){const x=e[g][0],w=e[g][1]?{[L0]:!0}:{[$0]:!0};x.indexOf("-")>=0?w[ca]=!0:Je.test(x)?Ze.test(x)?w[ir]=!0:w[aa]=!0:w[oa]=!0,Ys(r,x,x,w)}return Ys(r,"localhost",mr,{ascii:!0}),r.jd=new Te(Sn),{start:r,tokens:zt({groups:t},td)}}function rd(e,t){const r=q0(t.replace(/[A-Z]/g,s=>s.toLowerCase())),n=r.length,i=[];let o=0,a=0;for(;a<n;){let s=e,l=null,u=0,f=null,d=-1,h=-1;for(;a<n&&(l=s.go(r[a]));)s=l,s.accepts()?(d=0,h=0,f=s):d>=0&&(d+=r[a].length,h++),u+=r[a].length,o+=r[a].length,a++;o-=d,a-=h,u-=d,i.push({t:f.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function q0(e){const t=[],r=e.length;let n=0;for(;n<r;){let i=e.charCodeAt(n),o,a=i<55296||i>56319||n+1===r||(o=e.charCodeAt(n+1))<56320||o>57343?e[n]:e.slice(n,n+2);t.push(a),n+=a.length}return t}function ht(e,t,r,n,i){let o;const a=t.length;for(let s=0;s<a-1;s++){const l=t[s];e.j[l]?o=e.j[l]:(o=new Te(n),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Te(r),o.jr=i.slice(),e.j[t[a-1]]=o,o}function Zs(e){const t=[],r=[];let n=0,i="0123456789";for(;n<e.length;){let o=0;for(;i.indexOf(e[n+o])>=0;)o++;if(o>0){t.push(r.join(""));for(let a=parseInt(e.substring(n,n+o),10);a>0;a--)r.pop();n+=o}else r.push(e[n]),n++}return t}const gr={defaultProtocol:"http",events:null,format:Qs,formatHref:Qs,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function La(e,t=null){let r=zt({},gr);e&&(r=zt(r,e instanceof La?e.o:e));const n=r.ignoreTags,i=[];for(let o=0;o<n.length;o++)i.push(n[o].toUpperCase());this.o=r,t&&(this.defaultRender=t),this.ignoreTags=i}La.prototype={o:gr,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){const n=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=r.t in i?i[r.t]:gr[e],typeof i=="function"&&n&&(i=i(t,r))):typeof i=="function"&&n&&(i=i(t,r.t,r)),i)},getObj(e,t,r){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,r.t,r)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Qs(e){return e}function nd(e,t){this.t="token",this.v=e,this.tk=t}nd.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=gr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,r=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",r,this),i=e.get("tagName",r,t),o=this.toFormattedString(e),a={},s=e.get("className",r,t),l=e.get("target",r,t),u=e.get("rel",r,t),f=e.getObj("attributes",r,t),d=e.getObj("events",r,t);return a.href=n,s&&(a.class=s),l&&(a.target=l),u&&(a.rel=u),f&&zt(a,f),{tagName:i,attributes:a,content:o,eventListeners:d}}};function En(e,t){class r extends nd{constructor(i,o){super(i,o),this.t=e}}for(const n in t)r.prototype[n]=t[n];return r.t=e,r}const ec=En("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tc=En("text"),F0=En("nl"),_r=En("url",{isLink:!0,toHref(e=gr.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==mr&&e[1].t===gt}}),Oe=e=>new Te(e);function U0({groups:e}){const t=e.domain.concat([dn,fn,mt,hn,pn,mn,gn,xn,Pe,Ia,sr,vn,yn,bn,He,Sn,lr,wn]),r=[gt,Pa,ze,ka,sr,cr,Na,Ma,en,tn,or,ar,Jr,Yr,Zr,Qr,rn,nn,on,an,sn,cn,ln,un],n=[dn,Oa,fn,hn,pn,mn,gn,xn,Pe,or,ar,sr,vn,yn,bn,cr,He,Sn,lr,wn],i=Oe(),o=I(i,lr);Y(o,n,o),Y(o,e.domain,o);const a=Oe(),s=Oe(),l=Oe();Y(i,e.domain,a),Y(i,e.scheme,s),Y(i,e.slashscheme,l),Y(a,n,o),Y(a,e.domain,a);const u=I(a,mt);I(o,mt,u),I(s,mt,u),I(l,mt,u);const f=I(o,ze);Y(f,n,o),Y(f,e.domain,o);const d=Oe();Y(u,e.domain,d),Y(d,e.domain,d);const h=I(d,ze);Y(h,e.domain,d);const p=Oe(ec);Y(h,e.tld,p),Y(h,e.utld,p),I(u,mr,p);const m=I(d,Pe);I(m,Pe,m),Y(m,e.domain,d),Y(p,e.domain,d),I(p,ze,h),I(p,Pe,m);const g=I(p,gt);Y(g,e.numeric,ec);const x=I(a,Pe),y=I(a,ze);I(x,Pe,x),Y(x,e.domain,a),Y(y,n,o),Y(y,e.domain,a);const w=Oe(_r);Y(y,e.tld,w),Y(y,e.utld,w),Y(w,e.domain,a),Y(w,n,o),I(w,ze,y),I(w,Pe,x),I(w,mt,u);const A=I(w,gt),C=Oe(_r);Y(A,e.numeric,C);const T=Oe(_r),k=Oe();Y(T,t,T),Y(T,r,k),Y(k,t,T),Y(k,r,k),I(w,He,T),I(C,He,T);const M=I(s,gt),R=I(l,gt),j=I(R,He),L=I(j,He);Y(s,e.domain,a),I(s,ze,y),I(s,Pe,x),Y(l,e.domain,a),I(l,ze,y),I(l,Pe,x),Y(M,e.domain,T),I(M,He,T),I(M,cr,T),Y(L,e.domain,T),Y(L,t,T),I(L,He,T);const O=[[or,ar],[Yr,Jr],[Zr,Qr],[en,tn],[rn,nn],[on,an],[sn,cn],[ln,un]];for(let N=0;N<O.length;N++){const[D,$]=O[N],W=I(T,D);I(k,D,W),I(W,$,T);const Q=Oe(_r);Y(W,t,Q);const ae=Oe();Y(W,r),Y(Q,t,Q),Y(Q,r,ae),Y(ae,t,Q),Y(ae,r,ae),I(Q,$,T),I(ae,$,T)}return I(i,mr,w),I(i,Ra,F0),{start:i,tokens:td}}function W0(e,t,r){let n=r.length,i=0,o=[],a=[];for(;i<n;){let s=e,l=null,u=null,f=0,d=null,h=-1;for(;i<n&&!(l=s.go(r[i].t));)a.push(r[i++]);for(;i<n&&(u=l||s.go(r[i].t));)l=null,s=u,s.accepts()?(h=0,d=s):h>=0&&h++,i++,f++;if(h<0)i-=f,i<n&&(a.push(r[i]),i++);else{a.length>0&&(o.push(ii(tc,t,a)),a=[]),i-=h,f-=h;const p=d.t,m=r.slice(i-f,i);o.push(ii(p,t,m))}}return a.length>0&&o.push(ii(tc,t,a)),o}function ii(e,t,r){const n=r[0].s,i=r[r.length-1].e,o=t.slice(n,i);return new e(o,r)}const G0=typeof console<"u"&&console&&console.warn||(()=>{}),V0="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",de={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function K0(){return Te.groups={},de.scanner=null,de.parser=null,de.tokenQueue=[],de.pluginQueue=[],de.customSchemes=[],de.initialized=!1,de}function rc(e,t=!1){if(de.initialized&&G0(`linkifyjs: already initialized - will not register custom scheme "${e}" ${V0}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
1
+ "use strict";var ff=Object.defineProperty;var hf=(e,t,r)=>t in e?ff(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Pr=(e,t,r)=>hf(e,typeof t!="symbol"?t+"":t,r);const c=require("react/jsx-runtime"),w=require("react"),pe=require("./dom-dataset-Cuy-pIfj.cjs"),Ql=require("@radix-ui/react-slot"),H=require("./index-Dz3YxLE7.cjs"),pf=require("@radix-ui/react-separator"),mf=require("@radix-ui/react-toast"),P=require("lucide-react"),gf=require("@radix-ui/react-tooltip"),xf=require("@radix-ui/react-toggle"),kr=require("@radix-ui/react-icons"),vf=require("@radix-ui/react-popover"),yf=require("@radix-ui/react-label"),bf=require("@radix-ui/react-dialog"),D=require("./index-CSvnpArE.cjs"),wf=require("re-resizable"),Sf=require("react-image-crop"),Af=require("@radix-ui/react-tabs"),Cf=require("@radix-ui/react-checkbox"),eu=require("tippy.js"),jf=require("react-colorful"),Tf=require("@radix-ui/react-switch"),Ef=require("@radix-ui/react-dropdown-menu");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const oe=Ne(w),tu=Ne(pf),Re=Ne(mf),Sr=Ne(gf),ru=Ne(xf),dr=Ne(vf),nu=Ne(yf),ke=Ne(bf),jt=Ne(Af),Wo=Ne(Cf),Go=Ne(Tf),fe=Ne(Ef);var iu=typeof global=="object"&&global&&global.Object===Object&&global,If=typeof self=="object"&&self&&self.Object===Object&&self,Ge=iu||If||Function("return this")(),Ue=Ge.Symbol,ou=Object.prototype,Rf=ou.hasOwnProperty,Of=ou.toString,Jt=Ue?Ue.toStringTag:void 0;function Pf(e){var t=Rf.call(e,Jt),r=e[Jt];try{e[Jt]=void 0;var n=!0}catch{}var i=Of.call(e);return n&&(t?e[Jt]=r:delete e[Jt]),i}var kf=Object.prototype,Nf=kf.toString;function Mf(e){return Nf.call(e)}var Lf="[object Null]",$f="[object Undefined]",xs=Ue?Ue.toStringTag:void 0;function yt(e){return e==null?e===void 0?$f:Lf:xs&&xs in Object(e)?Pf(e):Mf(e)}function nt(e){return e!=null&&typeof e=="object"}var _f="[object Symbol]";function An(e){return typeof e=="symbol"||nt(e)&&yt(e)==_f}function au(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var We=Array.isArray,vs=Ue?Ue.prototype:void 0,ys=vs?vs.toString:void 0;function Gr(e){if(typeof e=="string")return e;if(We(e))return au(e,Gr)+"";if(An(e))return ys?ys.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Df=/\s/;function Bf(e){for(var t=e.length;t--&&Df.test(e.charAt(t)););return t}var zf=/^\s+/;function Hf(e){return e&&e.slice(0,Bf(e)+1).replace(zf,"")}function xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bs=NaN,qf=/^[-+]0x[0-9a-f]+$/i,Ff=/^0b[01]+$/i,Uf=/^0o[0-7]+$/i,Wf=parseInt;function $t(e){if(typeof e=="number")return e;if(An(e))return bs;if(xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Hf(e);var r=Ff.test(e);return r||Uf.test(e)?Wf(e.slice(2),r?2:8):qf.test(e)?bs:+e}var ws=1/0,Gf=17976931348623157e292;function Vf(e){if(!e)return e===0?e:0;if(e=$t(e),e===ws||e===-ws){var t=e<0?-1:1;return t*Gf}return e===e?e:0}function Kf(e){var t=Vf(e),r=t%1;return t===t?r?t-r:t:0}function ga(e){return e}var Xf="[object AsyncFunction]",Yf="[object Function]",Jf="[object GeneratorFunction]",Zf="[object Proxy]";function su(e){if(!xt(e))return!1;var t=yt(e);return t==Yf||t==Jf||t==Xf||t==Zf}var Wn=Ge["__core-js_shared__"],Ss=function(){var e=/[^.]+$/.exec(Wn&&Wn.keys&&Wn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qf(e){return!!Ss&&Ss in e}var eh=Function.prototype,th=eh.toString;function Tt(e){if(e!=null){try{return th.call(e)}catch{}try{return e+""}catch{}}return""}var rh=/[\\^$.*+?()[\]{}|]/g,nh=/^\[object .+?Constructor\]$/,ih=Function.prototype,oh=Object.prototype,ah=ih.toString,sh=oh.hasOwnProperty,ch=RegExp("^"+ah.call(sh).replace(rh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lh(e){if(!xt(e)||Qf(e))return!1;var t=su(e)?ch:nh;return t.test(Tt(e))}function uh(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=uh(e,t);return lh(r)?r:void 0}var Vo=Et(Ge,"WeakMap");function dh(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var fh=800,hh=16,ph=Date.now;function mh(e){var t=0,r=0;return function(){var n=ph(),i=hh-(n-r);if(r=n,i>0){if(++t>=fh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function gh(e){return function(){return e}}var As=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xh=As?function(e,t){return As(e,"toString",{configurable:!0,enumerable:!1,value:gh(t),writable:!0})}:ga,vh=mh(xh);function yh(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function bh(e){return e!==e}function wh(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Sh(e,t,r){return t===t?wh(e,t,r):yh(e,bh,r)}function Ah(e,t){var r=e==null?0:e.length;return!!r&&Sh(e,t,0)>-1}var Ch=9007199254740991,jh=/^(?:0|[1-9]\d*)$/;function cu(e,t){var r=typeof e;return t=t??Ch,!!t&&(r=="number"||r!="symbol"&&jh.test(e))&&e>-1&&e%1==0&&e<t}function lu(e,t){return e===t||e!==e&&t!==t}var Cs=Math.max;function Th(e,t,r){return t=Cs(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Cs(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),dh(e,this,s)}}function Eh(e,t){return vh(Th(e,t,ga),e+"")}var Ih=9007199254740991;function xa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ih}function uu(e){return e!=null&&xa(e.length)&&!su(e)}var Rh=Object.prototype;function Oh(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Rh;return e===r}function Ph(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kh="[object Arguments]";function js(e){return nt(e)&&yt(e)==kh}var du=Object.prototype,Nh=du.hasOwnProperty,Mh=du.propertyIsEnumerable,va=js(function(){return arguments}())?js:function(e){return nt(e)&&Nh.call(e,"callee")&&!Mh.call(e,"callee")};function Lh(){return!1}var fu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ts=fu&&typeof module=="object"&&module&&!module.nodeType&&module,$h=Ts&&Ts.exports===fu,Es=$h?Ge.Buffer:void 0,_h=Es?Es.isBuffer:void 0,Ko=_h||Lh,Dh="[object Arguments]",Bh="[object Array]",zh="[object Boolean]",Hh="[object Date]",qh="[object Error]",Fh="[object Function]",Uh="[object Map]",Wh="[object Number]",Gh="[object Object]",Vh="[object RegExp]",Kh="[object Set]",Xh="[object String]",Yh="[object WeakMap]",Jh="[object ArrayBuffer]",Zh="[object DataView]",Qh="[object Float32Array]",ep="[object Float64Array]",tp="[object Int8Array]",rp="[object Int16Array]",np="[object Int32Array]",ip="[object Uint8Array]",op="[object Uint8ClampedArray]",ap="[object Uint16Array]",sp="[object Uint32Array]",ue={};ue[Qh]=ue[ep]=ue[tp]=ue[rp]=ue[np]=ue[ip]=ue[op]=ue[ap]=ue[sp]=!0;ue[Dh]=ue[Bh]=ue[Jh]=ue[zh]=ue[Zh]=ue[Hh]=ue[qh]=ue[Fh]=ue[Uh]=ue[Wh]=ue[Gh]=ue[Vh]=ue[Kh]=ue[Xh]=ue[Yh]=!1;function cp(e){return nt(e)&&xa(e.length)&&!!ue[yt(e)]}function ya(e){return function(t){return e(t)}}var hu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=hu&&typeof module=="object"&&module&&!module.nodeType&&module,lp=nr&&nr.exports===hu,Gn=lp&&iu.process,Vr=function(){try{var e=nr&&nr.require&&nr.require("util").types;return e||Gn&&Gn.binding&&Gn.binding("util")}catch{}}(),Is=Vr&&Vr.isTypedArray,pu=Is?ya(Is):cp,up=Object.prototype,dp=up.hasOwnProperty;function fp(e,t){var r=We(e),n=!r&&va(e),i=!r&&!n&&Ko(e),o=!r&&!n&&!i&&pu(e),a=r||n||i||o,s=a?Ph(e.length,String):[],l=s.length;for(var u in e)dp.call(e,u)&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cu(u,l)))&&s.push(u);return s}function hp(e,t){return function(r){return e(t(r))}}var pp=hp(Object.keys,Object),mp=Object.prototype,gp=mp.hasOwnProperty;function xp(e){if(!Oh(e))return pp(e);var t=[];for(var r in Object(e))gp.call(e,r)&&r!="constructor"&&t.push(r);return t}function mu(e){return uu(e)?fp(e):xp(e)}var vp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yp=/^\w*$/;function ba(e,t){if(We(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||An(e)?!0:yp.test(e)||!vp.test(e)||t!=null&&e in Object(t)}var fr=Et(Object,"create");function bp(){this.__data__=fr?fr(null):{},this.size=0}function wp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Sp="__lodash_hash_undefined__",Ap=Object.prototype,Cp=Ap.hasOwnProperty;function jp(e){var t=this.__data__;if(fr){var r=t[e];return r===Sp?void 0:r}return Cp.call(t,e)?t[e]:void 0}var Tp=Object.prototype,Ep=Tp.hasOwnProperty;function Ip(e){var t=this.__data__;return fr?t[e]!==void 0:Ep.call(t,e)}var Rp="__lodash_hash_undefined__";function Op(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fr&&t===void 0?Rp:t,this}function Ct(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ct.prototype.clear=bp;Ct.prototype.delete=wp;Ct.prototype.get=jp;Ct.prototype.has=Ip;Ct.prototype.set=Op;function Pp(){this.__data__=[],this.size=0}function Cn(e,t){for(var r=e.length;r--;)if(lu(e[r][0],t))return r;return-1}var kp=Array.prototype,Np=kp.splice;function Mp(e){var t=this.__data__,r=Cn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Np.call(t,r,1),--this.size,!0}function Lp(e){var t=this.__data__,r=Cn(t,e);return r<0?void 0:t[r][1]}function $p(e){return Cn(this.__data__,e)>-1}function _p(e,t){var r=this.__data__,n=Cn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=Pp;it.prototype.delete=Mp;it.prototype.get=Lp;it.prototype.has=$p;it.prototype.set=_p;var hr=Et(Ge,"Map");function Dp(){this.size=0,this.__data__={hash:new Ct,map:new(hr||it),string:new Ct}}function Bp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jn(e,t){var r=e.__data__;return Bp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function zp(e){var t=jn(this,e).delete(e);return this.size-=t?1:0,t}function Hp(e){return jn(this,e).get(e)}function qp(e){return jn(this,e).has(e)}function Fp(e,t){var r=jn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Dp;ot.prototype.delete=zp;ot.prototype.get=Hp;ot.prototype.has=qp;ot.prototype.set=Fp;var Up="Expected a function";function wa(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Up);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(wa.Cache||ot),r}wa.Cache=ot;var Wp=500;function Gp(e){var t=wa(e,function(n){return r.size===Wp&&r.clear(),n}),r=t.cache;return t}var Vp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kp=/\\(\\)?/g,Xp=Gp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Vp,function(r,n,i,o){t.push(i?o.replace(Kp,"$1"):n||r)}),t});function Xo(e){return e==null?"":Gr(e)}function gu(e,t){return We(e)?e:ba(e,t)?[e]:Xp(Xo(e))}function Tn(e){if(typeof e=="string"||An(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xu(e,t){t=gu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tn(t[r++])];return r&&r==n?e:void 0}function Yp(e,t,r){var n=e==null?void 0:xu(e,t);return n===void 0?r:n}function vu(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Rs=Ue?Ue.isConcatSpreadable:void 0;function Jp(e){return We(e)||va(e)||!!(Rs&&e&&e[Rs])}function Zp(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Jp),i||(i=[]);++o<a;){var s=e[o];r(s)&&vu(i,s)}return i}function Qp(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function em(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Qp(e,t,r)}var tm="\\ud800-\\udfff",rm="\\u0300-\\u036f",nm="\\ufe20-\\ufe2f",im="\\u20d0-\\u20ff",om=rm+nm+im,am="\\ufe0e\\ufe0f",sm="\\u200d",cm=RegExp("["+sm+tm+om+am+"]");function Sa(e){return cm.test(e)}function lm(e){return e.split("")}var yu="\\ud800-\\udfff",um="\\u0300-\\u036f",dm="\\ufe20-\\ufe2f",fm="\\u20d0-\\u20ff",hm=um+dm+fm,pm="\\ufe0e\\ufe0f",mm="["+yu+"]",Yo="["+hm+"]",Jo="\\ud83c[\\udffb-\\udfff]",gm="(?:"+Yo+"|"+Jo+")",bu="[^"+yu+"]",wu="(?:\\ud83c[\\udde6-\\uddff]){2}",Su="[\\ud800-\\udbff][\\udc00-\\udfff]",xm="\\u200d",Au=gm+"?",Cu="["+pm+"]?",vm="(?:"+xm+"(?:"+[bu,wu,Su].join("|")+")"+Cu+Au+")*",ym=Cu+Au+vm,bm="(?:"+[bu+Yo+"?",Yo,wu,Su,mm].join("|")+")",wm=RegExp(Jo+"(?="+Jo+")|"+bm+ym,"g");function Sm(e){return e.match(wm)||[]}function Am(e){return Sa(e)?Sm(e):lm(e)}function Cm(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function ju(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=$t(r),r=r===r?r:0),t!==void 0&&(t=$t(t),t=t===t?t:0),Cm($t(e),t,r)}function jm(){this.__data__=new it,this.size=0}function Tm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Em(e){return this.__data__.get(e)}function Im(e){return this.__data__.has(e)}var Rm=200;function Om(e,t){var r=this.__data__;if(r instanceof it){var n=r.__data__;if(!hr||n.length<Rm-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(e,t),this.size=r.size,this}function tt(e){var t=this.__data__=new it(e);this.size=t.size}tt.prototype.clear=jm;tt.prototype.delete=Tm;tt.prototype.get=Em;tt.prototype.has=Im;tt.prototype.set=Om;function Pm(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function km(){return[]}var Nm=Object.prototype,Mm=Nm.propertyIsEnumerable,Os=Object.getOwnPropertySymbols,Lm=Os?function(e){return e==null?[]:(e=Object(e),Pm(Os(e),function(t){return Mm.call(e,t)}))}:km;function $m(e,t,r){var n=t(e);return We(e)?n:vu(n,r(e))}function Ps(e){return $m(e,mu,Lm)}var Zo=Et(Ge,"DataView"),Qo=Et(Ge,"Promise"),ea=Et(Ge,"Set"),ks="[object Map]",_m="[object Object]",Ns="[object Promise]",Ms="[object Set]",Ls="[object WeakMap]",$s="[object DataView]",Dm=Tt(Zo),Bm=Tt(hr),zm=Tt(Qo),Hm=Tt(ea),qm=Tt(Vo),pt=yt;(Zo&&pt(new Zo(new ArrayBuffer(1)))!=$s||hr&&pt(new hr)!=ks||Qo&&pt(Qo.resolve())!=Ns||ea&&pt(new ea)!=Ms||Vo&&pt(new Vo)!=Ls)&&(pt=function(e){var t=yt(e),r=t==_m?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Dm:return $s;case Bm:return ks;case zm:return Ns;case Hm:return Ms;case qm:return Ls}return t});var _s=Ge.Uint8Array,Fm="__lodash_hash_undefined__";function Um(e){return this.__data__.set(e,Fm),this}function Wm(e){return this.__data__.has(e)}function pr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ot;++t<r;)this.add(e[t])}pr.prototype.add=pr.prototype.push=Um;pr.prototype.has=Wm;function Gm(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Tu(e,t){return e.has(t)}var Vm=1,Km=2;function Eu(e,t,r,n,i,o){var a=r&Vm,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&Km?new pr:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var m=e[d],g=t[d];if(n)var x=a?n(g,m,d,t,e,o):n(m,g,d,e,t,o);if(x!==void 0){if(x)continue;h=!1;break}if(p){if(!Gm(t,function(y,S){if(!Tu(p,S)&&(m===y||i(m,y,r,n,o)))return p.push(S)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Xm(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Ym(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Jm=1,Zm=2,Qm="[object Boolean]",eg="[object Date]",tg="[object Error]",rg="[object Map]",ng="[object Number]",ig="[object RegExp]",og="[object Set]",ag="[object String]",sg="[object Symbol]",cg="[object ArrayBuffer]",lg="[object DataView]",Ds=Ue?Ue.prototype:void 0,Vn=Ds?Ds.valueOf:void 0;function ug(e,t,r,n,i,o,a){switch(r){case lg:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cg:return!(e.byteLength!=t.byteLength||!o(new _s(e),new _s(t)));case Qm:case eg:case ng:return lu(+e,+t);case tg:return e.name==t.name&&e.message==t.message;case ig:case ag:return e==t+"";case rg:var s=Xm;case og:var l=n&Jm;if(s||(s=Ym),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=Zm,a.set(e,t);var f=Eu(s(e),s(t),n,i,o,a);return a.delete(e),f;case sg:if(Vn)return Vn.call(e)==Vn.call(t)}return!1}var dg=1,fg=Object.prototype,hg=fg.hasOwnProperty;function pg(e,t,r,n,i,o){var a=r&dg,s=Ps(e),l=s.length,u=Ps(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var h=s[d];if(!(a?h in t:hg.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var x=a;++d<l;){h=s[d];var y=e[h],S=t[h];if(n)var A=a?n(S,y,h,t,e,o):n(y,S,h,e,t,o);if(!(A===void 0?y===S||i(y,S,r,n,o):A)){g=!1;break}x||(x=h=="constructor")}if(g&&!x){var C=e.constructor,E=t.constructor;C!=E&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof E=="function"&&E instanceof E)&&(g=!1)}return o.delete(e),o.delete(t),g}var mg=1,Bs="[object Arguments]",zs="[object Array]",Nr="[object Object]",gg=Object.prototype,Hs=gg.hasOwnProperty;function xg(e,t,r,n,i,o){var a=We(e),s=We(t),l=a?zs:pt(e),u=s?zs:pt(t);l=l==Bs?Nr:l,u=u==Bs?Nr:u;var f=l==Nr,d=u==Nr,h=l==u;if(h&&Ko(e)){if(!Ko(t))return!1;a=!0,f=!1}if(h&&!f)return o||(o=new tt),a||pu(e)?Eu(e,t,r,n,i,o):ug(e,t,l,r,n,i,o);if(!(r&mg)){var p=f&&Hs.call(e,"__wrapped__"),m=d&&Hs.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,x=m?t.value():t;return o||(o=new tt),i(g,x,r,n,o)}}return h?(o||(o=new tt),pg(e,t,r,n,i,o)):!1}function Aa(e,t,r,n,i){return e===t?!0:e==null||t==null||!nt(e)&&!nt(t)?e!==e&&t!==t:xg(e,t,r,n,Aa,i)}var vg=1,yg=2;function bg(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],l=e[s],u=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var f=new tt,d;if(!(d===void 0?Aa(u,l,vg|yg,n,f):d))return!1}}return!0}function Iu(e){return e===e&&!xt(e)}function wg(e){for(var t=mu(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Iu(i)]}return t}function Ru(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Sg(e){var t=wg(e);return t.length==1&&t[0][2]?Ru(t[0][0],t[0][1]):function(r){return r===e||bg(r,e,t)}}function Ag(e,t){return e!=null&&t in Object(e)}function Cg(e,t,r){t=gu(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Tn(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&xa(i)&&cu(a,i)&&(We(e)||va(e)))}function jg(e,t){return e!=null&&Cg(e,t,Ag)}var Tg=1,Eg=2;function Ig(e,t){return ba(e)&&Iu(t)?Ru(Tn(e),t):function(r){var n=Yp(r,e);return n===void 0&&n===t?jg(r,e):Aa(t,n,Tg|Eg)}}function Ou(e){return function(t){return t==null?void 0:t[e]}}function Rg(e){return function(t){return xu(t,e)}}function Og(e){return ba(e)?Ou(Tn(e)):Rg(e)}function Pg(e){return typeof e=="function"?e:e==null?ga:typeof e=="object"?We(e)?Ig(e[0],e[1]):Sg(e):Og(e)}var Kn=function(){return Ge.Date.now()},kg="Expected a function",Ng=Math.max,Mg=Math.min;function Ar(e,t,r){var n,i,o,a,s,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(kg);t=$t(t)||0,xt(r)&&(f=!!r.leading,d="maxWait"in r,o=d?Ng($t(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(k){var M=n,R=i;return n=i=void 0,u=k,a=e.apply(R,M),a}function m(k){return u=k,s=setTimeout(y,t),f?p(k):a}function g(k){var M=k-l,R=k-u,N=t-M;return d?Mg(N,o-R):N}function x(k){var M=k-l,R=k-u;return l===void 0||M>=t||M<0||d&&R>=o}function y(){var k=Kn();if(x(k))return S(k);s=setTimeout(y,g(k))}function S(k){return s=void 0,h&&n?p(k):(n=i=void 0,a)}function A(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function C(){return s===void 0?a:S(Kn())}function E(){var k=Kn(),M=x(k);if(n=arguments,i=this,l=k,M){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),a}return E.cancel=A,E.flush=C,E}function Xn(e){return nt(e)&&uu(e)}var Lg=200;function $g(e,t,r,n){var i=-1,o=Ah,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=au(t,ya(r))),t.length>=Lg&&(o=Tu,a=!1,t=new pr(t));e:for(;++i<s;){var f=e[i],d=r==null?f:r(f);if(f=f!==0?f:0,a&&d===d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(f)}else o(t,d,n)||l.push(f)}return l}function _g(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Dg=Eh(function(e,t){var r=_g(t);return Xn(r)&&(r=void 0),Xn(e)?$g(e,Zp(t,1,Xn),Pg(r)):[]}),Bg="[object Number]";function Kr(e){return typeof e=="number"||nt(e)&&yt(e)==Bg}var zg="[object RegExp]";function Hg(e){return nt(e)&&yt(e)==zg}var qs=Vr&&Vr.isRegExp,qg=qs?ya(qs):Hg,Fg=Ou("length"),Pu="\\ud800-\\udfff",Ug="\\u0300-\\u036f",Wg="\\ufe20-\\ufe2f",Gg="\\u20d0-\\u20ff",Vg=Ug+Wg+Gg,Kg="\\ufe0e\\ufe0f",Xg="["+Pu+"]",ta="["+Vg+"]",ra="\\ud83c[\\udffb-\\udfff]",Yg="(?:"+ta+"|"+ra+")",ku="[^"+Pu+"]",Nu="(?:\\ud83c[\\udde6-\\uddff]){2}",Mu="[\\ud800-\\udbff][\\udc00-\\udfff]",Jg="\\u200d",Lu=Yg+"?",$u="["+Kg+"]?",Zg="(?:"+Jg+"(?:"+[ku,Nu,Mu].join("|")+")"+$u+Lu+")*",Qg=$u+Lu+Zg,ex="(?:"+[ku+ta+"?",ta,Nu,Mu,Xg].join("|")+")",Fs=RegExp(ra+"(?="+ra+")|"+ex+Qg,"g");function tx(e){for(var t=Fs.lastIndex=0;Fs.test(e);)++t;return t}function rx(e){return Sa(e)?tx(e):Fg(e)}var nx="Expected a function";function Bt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(nx);return xt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ar(e,t,{leading:n,maxWait:t,trailing:i})}var ix=30,ox="...",ax=/\w*$/;function sx(e,t){var r=ix,n=ox;if(xt(t)){var i="separator"in t?t.separator:i;r="length"in t?Kf(t.length):r,n="omission"in t?Gr(t.omission):n}e=Xo(e);var o=e.length;if(Sa(e)){var a=Am(e);o=a.length}if(r>=o)return e;var s=r-rx(n);if(s<1)return n;var l=a?em(a,0,s).join(""):e.slice(0,s);if(i===void 0)return l+n;if(a&&(s+=l.length-s),qg(i)){if(e.slice(s).search(i)){var u,f=l;for(i.global||(i=RegExp(i.source,Xo(ax.exec(i))+"g")),i.lastIndex=0;u=i.exec(f);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(e.indexOf(Gr(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+n}const Ca="-",cx=e=>{const t=ux(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const s=a.split(Ca);return s[0]===""&&s.length!==1&&s.shift(),_u(s,t)||lx(a)},getConflictingClassGroupIds:(a,s)=>{const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}}},_u=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?_u(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Ca);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},Us=/^\[(.+)\]$/,lx=e=>{if(Us.test(e)){const t=Us.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ux=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fx(Object.entries(e.classGroups),r).forEach(([o,a])=>{na(a,n,o,t)}),n},na=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Ws(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(dx(i)){na(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,a])=>{na(a,Ws(t,o),r,n)})})},Ws=(e,t)=>{let r=e;return t.split(Ca).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dx=e=>e.isThemeGetter,fx=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[r,i]}):e,hx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return i(o,a),a},set(o,a){r.has(o)?r.set(o,a):i(o,a)}}},Du="!",px=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,f=0,d;for(let x=0;x<s.length;x++){let y=s[x];if(u===0){if(y===i&&(n||s.slice(x,x+o)===t)){l.push(s.slice(f,x)),f=x+o;continue}if(y==="/"){d=x;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?s:s.substring(f),p=h.startsWith(Du),m=p?h.substring(1):h,g=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:a}):a},mx=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gx=e=>({cache:hx(e.cacheSize),parseClassName:px(e),...cx(e)}),xx=/\s+/,vx=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(xx);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let m=!!p,g=n(m?h.substring(0,p):h);if(!g){if(!m){s=u+(s.length>0?" "+s:s);continue}if(g=n(h),!g){s=u+(s.length>0?" "+s:s);continue}m=!1}const x=mx(f).join(":"),y=d?x+Du:x,S=y+g;if(o.includes(S))continue;o.push(S);const A=i(g,m);for(let C=0;C<A.length;++C){const E=A[C];o.push(y+E)}s=u+(s.length>0?" "+s:s)}return s};function yx(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Bu(t))&&(n&&(n+=" "),n+=r);return n}const Bu=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Bu(e[n]))&&(r&&(r+=" "),r+=t);return r};function bx(e,...t){let r,n,i,o=a;function a(l){const u=t.reduce((f,d)=>d(f),e());return r=gx(u),n=r.cache.get,i=r.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=vx(l,r);return i(l,f),f}return function(){return o(yx.apply(null,arguments))}}const le=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},zu=/^\[(?:([a-z-]+):)?(.+)\]$/i,wx=/^\d+\/\d+$/,Sx=new Set(["px","full","screen"]),Ax=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cx=/\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$/,jx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Tx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Je=e=>_t(e)||Sx.has(e)||wx.test(e),dt=e=>qt(e,"length",Lx),_t=e=>!!e&&!Number.isNaN(Number(e)),Yn=e=>qt(e,"number",_t),Zt=e=>!!e&&Number.isInteger(Number(e)),Ix=e=>e.endsWith("%")&&_t(e.slice(0,-1)),K=e=>zu.test(e),ft=e=>Ax.test(e),Rx=new Set(["length","size","percentage"]),Ox=e=>qt(e,Rx,Hu),Px=e=>qt(e,"position",Hu),kx=new Set(["image","url"]),Nx=e=>qt(e,kx,_x),Mx=e=>qt(e,"",$x),Qt=()=>!0,qt=(e,t,r)=>{const n=zu.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Lx=e=>Cx.test(e)&&!jx.test(e),Hu=()=>!1,$x=e=>Tx.test(e),_x=e=>Ex.test(e),Dx=()=>{const e=le("colors"),t=le("spacing"),r=le("blur"),n=le("brightness"),i=le("borderColor"),o=le("borderRadius"),a=le("borderSpacing"),s=le("borderWidth"),l=le("contrast"),u=le("grayscale"),f=le("hueRotate"),d=le("invert"),h=le("gap"),p=le("gradientColorStops"),m=le("gradientColorStopPositions"),g=le("inset"),x=le("margin"),y=le("opacity"),S=le("padding"),A=le("saturate"),C=le("scale"),E=le("sepia"),k=le("skew"),M=le("space"),R=le("translate"),N=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",K,t],O=()=>[K,t],$=()=>["",Je,dt],z=()=>["auto",_t,K],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",K],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[_t,K];return{cacheSize:500,separator:":",theme:{colors:[Qt],spacing:[Je,dt],blur:["none","",ft,K],brightness:me(),borderColor:[e],borderRadius:["none","","full",ft,K],borderSpacing:O(),borderWidth:$(),contrast:me(),grayscale:ne(),hueRotate:me(),invert:ne(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Ix,dt],inset:j(),margin:j(),opacity:me(),padding:O(),saturate:me(),scale:me(),sepia:ne(),skew:me(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":xe()}],"break-before":[{"break-before":xe()}],"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:[...X(),K]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zt,K]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Zt,K]}],"grid-cols":[{"grid-cols":[Qt]}],"col-start-end":[{col:["auto",{span:["full",Zt,K]},K]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Qt]}],"row-start-end":[{row:["auto",{span:[Zt,K]},K]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yn]}],"font-family":[{font:[Qt]}],"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",K]}],"line-clamp":[{"line-clamp":["none",_t,Yn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Je,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Je,dt]}],"underline-offset":[{"underline-offset":["auto",Je,K]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],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",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Px]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ox]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Je,K]}],"outline-w":[{outline:[Je,dt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Je,dt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,Mx]}],"shadow-color":[{shadow:[Qt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ft,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[A]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Zt,K]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],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",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Je,dt,Yn]}],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"]}}},Bx=bx(Dx);function te(...e){return Bx(pe.clsx(e))}let Jn;function Zn(){return Jn===void 0&&(Jn=navigator.platform.includes("Mac")),Jn}function qu(e){return`${e}`.toLowerCase()==="mod"?Zn()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Zn()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Zn()?"⇧":"Shift":e}function Fu(e){return e.map(qu).join(" ")}const U=w.forwardRef((e,t)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:a=void 0,shortcutKeys:s=void 0,tooltipOptions:l={},action:u=void 0,isActive:f=void 0,children:d,asChild:h=!1,upload:p=!1,initialDisplayedColor:m=void 0,...g}=e,x=Ea[r],y=h?Ql.Slot:Ka;return c.jsxs(Xa,{children:[c.jsx(Ya,{asChild:!0,children:c.jsxs(y,{"data-state":f!=null&&f()?"on":"off",onClick:u,ref:t,size:"sm",className:te("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,...g,children:[x&&c.jsx(x,{className:"richtext-size-4"}),d]})}),n&&c.jsx(kn,{...l,children:c.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[c.jsx("div",{children:n}),!!(s!=null&&s.length)&&c.jsx("span",{children:Fu(s)})]})})]})});function zx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImage({width:H.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:H.IMAGE_SIZE[n]})}}))}function Hx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImageGif({width:H.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:H.IMAGE_SIZE[n]})}}))}function qx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImage)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Fx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageGif)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Ux(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageMermaid)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Wx(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.textalign.${n}.tooltip`),icon:r[n],action:()=>{var i,o;return(o=(i=e.commands)==null?void 0:i.setAlignImageDrawer)==null?void 0:o.call(i,n)},isActive:()=>e.isActive({align:n})||!1,disabled:!1}}))}function Gx(e){return[{type:"flex-start",icon:"AlignLeft",tooltip:"Align left"},{type:"center",icon:"AlignCenter",tooltip:"Align center"},{type:"flex-end",icon:"AlignRight",tooltip:"Align right"}].map(r=>({type:`video-align-${r.type}`,component:U,componentProps:{tooltip:r.tooltip,icon:r.icon,action:()=>e.commands.updateVideo({align:r.type}),isActive:()=>e.getAttributes("video").align===r.type}}))}function Vx(e){const t=["size-small","size-medium","size-large"],r=["SizeS","SizeM","SizeL"];return t.map((n,i)=>({type:`video-${n}`,component:U,componentProps:{tooltip:H.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateVideo({width:H.VIDEO_SIZE[n]}),isActive:()=>e.isActive("video",{width:H.VIDEO_SIZE[n]})}}))}function Kx(e){return[{type:"flipX",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.tooltip.flipX"),icon:"FlipX",action:()=>{const t=e.getAttributes("image"),{flipX:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipX:!r}).run()}}},{type:"flipY",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.tooltip.flipY"),icon:"FlipY",action:()=>{const t=e.getAttributes("image"),{flipY:r}=t;e.chain().focus(void 0,{scrollIntoView:!1}).updateImage({flipY:!r}).run()}}},...zx(e),...qx(e),{type:"remove",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;D.deleteSelection(t,r)}}}]}function Xx(e){return[...Hx(e),...Fx(e),{type:"remove",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;D.deleteSelection(t,r)}}}]}function Yx(e){return[...Ux(e),{type:"edit",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.edit"),icon:"Pencil",action:()=>!0}},{type:"remove",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;D.deleteSelection(t,r)}}}]}function Jx(e){return[...Wx(e),{type:"edit",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.edit"),icon:"Pencil",action:()=>(console.log("AAA"),!0)}},{type:"remove",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;D.deleteSelection(t,r)}}}]}function Zx(e){return[...Vx(e),...Gx(e),{type:"remove",component:U,componentProps:{editor:e,tooltip:H.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;D.deleteSelection(t,r)}}}]}function Qx(e,t){return H.BUBBLE_TEXT_LIST.reduce((r,n)=>{if(n==="divider"&&r.length>0)return[...r,{type:"divider",component:void 0,componentProps:{}}];const i=e.extensionManager.extensions.find(o=>o.name===n);return i?[...r,i.configure().options.button({editor:e,t,extension:i})]:r},[])}function ja(e,t,r){const n=[],i=e.node(0);r=typeof r=="number"&&r>=0?r:e.sameParent(t)?Math.max(0,e.sharedDepth(t.pos)-1):e.sharedDepth(t.pos);const o=new D.NodeRange(e,t,r),a=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((s,l)=>{const u=a+l,f=u+s.nodeSize;if(u<o.start||u>=o.end)return;const d=new D.SelectionRange(i.resolve(u),i.resolve(f));n.push(d)}),n}class Ta{constructor(t,r){Pr(this,"anchor");Pr(this,"head");this.anchor=t,this.head=r}map(t){return new Ta(t.map(this.anchor),t.map(this.head))}resolve(t){const r=t.resolve(this.anchor),n=t.resolve(this.head);return new Fe(r,n)}}class Fe extends D.Selection{constructor(r,n,i,o=1){const{doc:a}=r,s=r===n,l=r.pos===a.content.size&&n.pos===a.content.size,u=s&&!l?a.resolve(n.pos+(o>0?1:-1)):n,f=s&&l?a.resolve(r.pos-(o>0?1:-1)):r,d=ja(f.min(u),f.max(u),i);super(u.pos>=r.pos?d[0].$from:d[d.length-1].$to,u.pos>=r.pos?d[d.length-1].$to:d[0].$from,d);Pr(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof Fe&&r.$from.pos===this.$from.pos&&r.$to.pos===this.$to.pos}map(r,n){const i=r.resolve(n.map(this.anchor)),o=r.resolve(n.map(this.head));return new Fe(i,o)}toJSON(){return{type:"nodeRange",anchor:this.anchor,head:this.head}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){const{doc:r}=this.$from;if(this.isForwards&&this.ranges.length>1){const o=this.ranges.slice(0,-1),a=o[0].$from,s=o[o.length-1].$to;return new Fe(a,s,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new Fe(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),a=o[0].$from,s=o[o.length-1].$to;return new Fe(s,a,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new Fe(this.$anchor,i,this.depth)}static fromJSON(r,n){return new Fe(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,a=1){return new this(r.resolve(n),r.resolve(i),o,a)}getBookmark(){return new Ta(this.anchor,this.head)}}function e0(e){const t=e.cloneNode(!0),r=[e,...Array.from(e.getElementsByTagName("*"))],n=[t,...Array.from(t.getElementsByTagName("*"))];return r.forEach((i,o)=>{n[o].style.cssText=function(a){let s="";const l=getComputedStyle(a);for(let u=0;u<l.length;u+=1)s+=`${l[u]}:${l.getPropertyValue(l[u])};`;return s}(i)}),t}function Mr(e,t){return window.getComputedStyle(e)[t]}function t0(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function Gs(e){e.parentNode!==null&&e.parentNode!==void 0&&e.parentNode.removeChild(e)}function Uu(e){const{x:t,y:r,direction:n,editor:i}=e;let o=null,a=null,s=null,l=t;for(;a===null&&l<window.innerWidth&&l>0;){const u=document.elementsFromPoint(l,r),f=u.findIndex(h=>h.classList.contains("ProseMirror")),d=u.slice(0,f);if(d.length>0){const h=d[0];if(o=h,s=i.view.posAtDOM(h,0),s>=0){a=i.state.doc.nodeAt(Math.max(s-1,0)),(a===null||a.isText)&&(a=i.state.doc.nodeAt(Math.max(s-1,0))),a||(a=i.state.doc.nodeAt(Math.max(s,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:a,pos:s!==null?s:null}}function r0(e,t){const{doc:r}=t.view.state,n=Uu({editor:t,x:e.clientX,y:e.clientY,direction:"right"});if(!n.resultNode||n.pos===null)return[];const i=e.clientX,o=function(f,d,h){const p=Number.parseInt(Mr(f.dom,"paddingLeft"),10),m=Number.parseInt(Mr(f.dom,"paddingRight"),10),g=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),x=Number.parseInt(Mr(f.dom,"borderLeftWidth"),10),y=f.dom.getBoundingClientRect();return{left:t0(d,y.left+p+g,y.right-m-x),top:h}}(t.view,i,e.clientY),a=t.view.posAtCoords(o);if(!a)return[];const{pos:s}=a;if(!r.resolve(s).parent)return[];const l=r.resolve(n.pos),u=r.resolve(n.pos+1);return ja(l,u,0)}function Vs(e,t){const r=e.resolve(t),{depth:n}=r;return n===0?t:r.pos-r.parentOffset-1}function Ks(e,t){const r=e.nodeAt(t),n=e.resolve(t);let{depth:i}=n,o=r;for(;i>0;){const a=n.node(i);i-=1,i===0&&(o=a)}return o}function Xs(e,t){let r=t;for(;r&&r.parentNode&&r.parentNode!==e.dom;)r=r.parentNode;return r}const Wu=new D.PluginKey("dragHandle");function n0({pluginKey:e=Wu,element:t,editor:r,tippyOptions:n,onNodeChange:i}){const o=document.createElement("div");let a=null,s=!1,l=null,u=-1;return t.addEventListener("dragstart",f=>{const{view:d}=r;if(!f.dataTransfer)return;const{empty:h,$from:p,$to:m}=d.state.selection,g=r0(f,r),x=ja(p,m,0),y=x.some(N=>g.find(_=>_.$from===N.$from&&_.$to===N.$to)),S=h||!y?g:x;if(S.length===0)return;const{tr:A}=d.state,C=document.createElement("div"),E=S[0].$from.pos,k=S[S.length-1].$to.pos,M=Fe.create(d.state.doc,E,k),R=M.content();S.forEach(N=>{const _=e0(d.nodeDOM(N.$from.pos));C.append(_)}),C.style.position="absolute",C.style.top="-10000px",document.body.append(C),f.dataTransfer.clearData(),f.dataTransfer.setDragImage(C,0,0),d.dragging={slice:R,move:!0},A.setSelection(M),d.dispatch(A),document.addEventListener("drop",()=>Gs(C),{once:!0}),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}),t.addEventListener("dragend",()=>{t&&(t.style.pointerEvents="auto")}),new D.Plugin({key:typeof e=="string"?new D.PluginKey(e):e,state:{init:()=>({locked:!1}),apply(f,d){const h=f.getMeta("lockDragHandle"),p=f.getMeta("hideDragHandle");if(h!==void 0&&(s=h),p&&a)return a.hide(),s=!1,l=null,u=-1,i==null||i({editor:r,node:null,pos:-1}),d;if(f.docChanged&&u!==-1&&t&&a){const m=f.mapping.map(u);m!==u&&(u=m)}return d}},view:f=>{return d(),h(r.view.dom),a=eu(f.dom,{...p(),...n}),{update(C,E){if(!m(t,a)||(t.draggable=!s,!g(C,E)))return;const k=x(C);k&&y(C,k)},destroy(){A()}};function d(){t.draggable=!0,t.style.pointerEvents="auto"}function h(C){var E;(E=C.parentElement)==null||E.appendChild(o),o.appendChild(t),Object.assign(o.style,{pointerEvents:"none",position:"absolute",top:"0",left:"0"})}function p(){return{getReferenceClientRect:null,interactive:!0,trigger:"manual",placement:"left-start",hideOnClick:!1,duration:100,zIndex:10,appendTo:o,content:t,popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{rootBoundary:"document",mainAxis:!1}}]}}}function m(C,E){return C&&E}function g(C,E){return!C.state.doc.eq(E.doc)&&u!==-1}function x(C){let E=C.nodeDOM(u);return E=Xs(C,E),E===C.dom||(E==null?void 0:E.nodeType)!==1?null:E}function y(C,E){const k=C.posAtDOM(E,0),M=Ks(r.state.doc,k);if(M===l)return;const R=Vs(r.state.doc,k);l=M,u=R,i==null||i({editor:r,node:l,pos:u}),S(E)}function S(C){a.setProps({getReferenceClientRect:()=>C.getBoundingClientRect()}),a.show()}function A(){a==null||a.destroy(),t&&Gs(o)}},props:{handleDOMEvents:{mouseleave:(f,d)=>{if(s||!h(d))return!1;return p(),m(),!1;function h(g){return g.target&&!o.contains(g.relatedTarget)}function p(){a==null||a.hide()}function m(){l=null,u=-1,i==null||i({editor:r,node:null,pos:-1})}},mousemove:Ar((f,d)=>{if(!t||!a||s)return!1;const h=Uu({x:d.clientX,y:d.clientY,direction:"right",editor:r});if(!h.resultElement||h.resultElement===f.dom)return!1;const p=Xs(f,h.resultElement);if(p===f.dom||(p==null?void 0:p.nodeType)!==1)return!1;const m=f.posAtDOM(p,0),g=Ks(r.state.doc,m);if(g===l)return!1;const x=Vs(r.state.doc,m);return l=g,u=x,i==null||i({editor:r,node:l,pos:u}),a.setProps({getReferenceClientRect:()=>p.getBoundingClientRect()}),a.show(),!1},100)}}})}var Xr=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(Xr||{});function i0(e,t,r){return e<t?t:e>r?r:e}function o0(e,t,r,n){const{doc:i,selection:o}=e;if(!i||!o||!(o instanceof D.TextSelection||o instanceof D.AllSelection))return e;const{from:a,to:s}=o;return i.nodesBetween(a,s,(l,u)=>{const f=l.type;return r.includes(f.name)?(e=ia(e,u,t),!1):!D.isList(l.type.name,n.extensionManager.extensions)}),e}function ia(e,t,r){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const a=i0((n.attrs.indent||0)+r,0,7);if(a===n.attrs.indent)return e;const s={...n.attrs,indent:a};return e.setNodeMarkup(t,n.type,s,n.marks)}function a0({delta:e,types:t}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:a}=r;return a=a.setSelection(o),a=o0(a,e,t,i),a.docChanged?(n&&n(a),!0):!1}}function s0(e){var R,N,_;const{pluginKey:t=Wu}=e,{t:r}=H.useLocale(),[n,i]=w.useState(null),[o,a]=w.useState(-1),s=w.useRef(null),l=w.useRef(null),[u,f]=w.useState(!1),d=e.editor.extensionManager.extensions.some(j=>j.name==="textAlign"),h=e.editor.extensionManager.extensions.some(j=>j.name==="indent"),p=e.editor.extensionManager.extensions.some(j=>j.name==="clear");w.useEffect(()=>{s.current&&!e.editor.isDestroyed&&(l.current=n0({editor:e.editor,element:s.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:E}),e.editor.registerPlugin(l.current))},[e.editor,s]);function m(){const j=e.editor.chain();j.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&j.setParagraph(),j.run()}function g(){e.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function x(){e.editor.commands.setNodeSelection(o);const{$anchor:j}=e.editor.state.selection,O=j.node(1)||e.editor.state.selection.node;e.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),O.toJSON()).run()}function y(j){e.editor.commands.setTextAlign(j)}function S(){const j=ia(e.editor.state.tr,o,1);j.setMeta("hideDragHandle",!0),e.editor.view.dispatch&&e.editor.view.dispatch(j)}function A(){const j=ia(e.editor.state.tr,o,-1);e.editor.view.dispatch&&e.editor.view.dispatch(j)}function C(){e.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function E(j){j.node&&i(j.node),a(j.pos)}function k(){var j;if(o!==-1){const O=(n==null?void 0:n.nodeSize)||0,$=o+O,z=(n==null?void 0:n.type.name)==="paragraph"&&((j=n==null?void 0:n.content)==null?void 0:j.size)===0,X=z?o+2:$+2;e.editor.chain().command(({dispatch:F,tr:re,state:ee})=>F?(z?re.insertText("/",o,o+1):re.insert($,ee.schema.nodes.paragraph.create(null,[ee.schema.text("/")])),F(re)):!0).focus(X).run()}}w.useEffect(()=>(u?e.editor.commands.setMeta("lockDragHandle",!0):e.editor.commands.setMeta("lockDragHandle",!1),()=>{e.editor.commands.setMeta("lockDragHandle",!1)}),[u]),w.useEffect(()=>()=>{l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[]),w.useEffect(()=>{var j;(j=e.editor)!=null&&j.isDestroyed&&l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[(R=e.editor)==null?void 0:R.isDestroyed]);const M=j=>{e!=null&&e.disabled||f(j)};return c.jsx("div",{ref:s,className:`drag-handle richtext-duration-200 richtext-ease-in-out [transition-property:top,_left] ${e==null?void 0:e.className}`,style:{opacity:e!=null&&e.disabled?0:1},children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]",children:[c.jsx(we,{className:"!richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,onClick:k,size:"icon",type:"button",variant:"ghost",children:c.jsx(be,{className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Plus"})}),c.jsxs(md,{onOpenChange:M,open:u,children:[c.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[c.jsxs(Xa,{children:[c.jsx(Ya,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(we,{className:"richtext-relative richtext-z-[1] !richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,size:"icon",type:"button",variant:"ghost",onMouseUp:j=>{j.preventDefault(),!(e!=null&&e.disabled)&&f(!0)},children:c.jsx(be,{className:"richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Grip"})})}),c.jsx(kn,{children:r("editor.draghandle.tooltip")})]}),c.jsx(gd,{className:"richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]"})]}),c.jsxs(Ua,{align:"start",className:"richtext-w-48",side:"bottom",sideOffset:0,children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3 richtext-bg-opacity-10 hover:richtext-bg-red-400 hover:richtext-bg-opacity-20 focus:richtext-bg-red-400 focus:richtext-bg-opacity-30 focus:richtext-text-red-500 dark:hover:richtext-bg-opacity-20 dark:hover:richtext-text-red-500",onClick:C,children:[c.jsx(be,{name:"Trash2"}),c.jsx("span",{children:r("editor.remove")})]}),p?c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:m,children:[c.jsx(be,{name:"PaintRoller"}),c.jsx("span",{children:r("editor.clear.tooltip")})]}):null,c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:g,children:[c.jsx(be,{name:"Clipboard"}),c.jsx("span",{children:r("editor.copyToClipboard")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:x,children:[c.jsx(be,{name:"Copy"}),c.jsx("span",{children:r("editor.copy")})]}),d||h?c.jsx(Wa,{}):null,d?c.jsxs(sc,{children:[c.jsxs(ha,{className:"richtext-flex richtext-gap-3",children:[c.jsx(be,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.tooltip")})]}),c.jsx(ac,{children:c.jsxs(pa,{children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("left"),children:[c.jsx(be,{name:"AlignLeft"}),c.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("center"),children:[c.jsx(be,{name:"AlignCenter"}),c.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",onClick:()=>y("right"),children:[c.jsx(be,{name:"AlignRight"}),c.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,h?c.jsxs(sc,{children:[c.jsxs(ha,{className:"richtext-flex richtext-gap-3",children:[c.jsx(be,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent")})]}),c.jsx(ac,{children:c.jsxs(pa,{children:[c.jsxs(ze,{className:"richtext-flex richtext-gap-3",disabled:((N=n==null?void 0:n.attrs)==null?void 0:N.indent)>=Xr.max,onClick:S,children:[c.jsx(be,{name:"IndentIncrease"}),c.jsx("span",{children:r("editor.indent.tooltip")})]}),c.jsxs(ze,{className:"richtext-flex richtext-gap-3",disabled:((_=n==null?void 0:n.attrs)==null?void 0:_.indent)<=Xr.min,onClick:A,children:[c.jsx(be,{name:"IndentDecrease"}),c.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const c0={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function l0({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r}):c.jsx(c.Fragment,{})}function u0(e){const{t,lang:r}=H.useLocale(),n=({editor:o})=>{const{selection:a}=o.view.state,{$from:s,to:l}=a;return s.pos===l?!1:a instanceof D.TextSelection},i=w.useMemo(()=>e.disabled||!(e!=null&&e.editor)?[]:Qx(e.editor,t),[e.disabled,e.editor,r,t]);return c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:n,tippyOptions:c0,children:i!=null&&i.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-gap-[4px] richtext-whitespace-nowrap",children:i==null?void 0:i.map((o,a)=>(o==null?void 0:o.type)==="divider"?c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"},`bubbleMenu-divider-${a}`):c.jsx(l0,{disabled:e.disabled,editor:e.editor,item:o},`bubbleMenu-text-${a}`))})}):c.jsx(c.Fragment,{})})}function d0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 f0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 h0(){return c.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:c.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 p0(){return c.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:c.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 m0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 be(e){const t=Ea[e.name];return t?c.jsx(t,{onClick:e==null?void 0:e.onClick,className:`richtext-w-4 richtext-h-4 ${(e==null?void 0:e.className)||""}`}):null}function g0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 Gu(e){return c.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:c.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function x0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function v0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function y0(e){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:c.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 b0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 w0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 S0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 A0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 Vu(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[c.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"}),c.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 Ku(){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[c.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"}),c.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 C0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[c.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"}),c.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 j0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.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 T0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:c.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[c.jsx("circle",{cx:"10",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"10",r:"4"}),c.jsx("circle",{cx:"38",cy:"24",r:"4"}),c.jsx("circle",{cx:"38",cy:"38",r:"4"}),c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function E0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:c.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 I0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 R0(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 O0(){return c.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:c.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 Ea={Bold:P.Bold,LoaderCircle:P.LoaderCircle,Italic:P.Italic,Underline:P.Underline,Quote:P.Quote,TextQuote:f0,Strikethrough:P.Strikethrough,Minus:P.Minus,Eraser:P.Eraser,PaintRoller:P.PaintRoller,Redo2:P.Redo2,Undo2:P.Undo2,AlignCenter:kr.TextAlignCenterIcon,AlignJustify:kr.TextAlignJustifyIcon,AlignLeft:kr.TextAlignLeftIcon,AlignRight:kr.TextAlignRightIcon,ChevronDown:P.ChevronDown,Subscript:P.Subscript,Superscript:P.Superscript,Code:P.Code,Code2:P.CodeXml,Type:P.Type,IndentIncrease:P.IndentIncrease,IndentDecrease:P.IndentDecrease,List:P.List,ListOrdered:P.ListOrdered,ListTodo:P.ListTodo,Link:P.Link,ImageUp:P.ImageUp,Video:P.Video,Maximize:P.Maximize,Minimize:P.Minimize,Table:P.Table,Sparkles:P.Sparkles,Pencil:P.Pencil,Unlink:P.Unlink,BetweenHorizonalEnd:P.BetweenHorizonalEnd,BetweenHorizonalStart:P.BetweenHorizonalStart,BetweenVerticalStart:P.BetweenVerticalStart,BetweenVerticalEnd:P.BetweenVerticalEnd,TableCellsMerge:P.TableCellsMerge,TableCellsSplit:P.TableCellsSplit,Trash2:P.Trash2,Trash:P.Trash,Replace:P.Replace,ChevronsUpDown:P.ChevronsUpDown,LineHeight:g0,Word:m0,Heading1:P.Heading1,Heading2:P.Heading2,Heading3:P.Heading3,Heading4:P.Heading4,Heading5:P.Heading5,Heading6:P.Heading6,Columns2:P.Columns2,Columns3:P.Columns3,Columns4:P.Columns4,Plus:P.Plus,Grip:P.GripVertical,Copy:P.Copy,Clipboard:P.Clipboard,PanelLeft:P.PanelLeft,PanelRight:P.PanelRight,Columns:P.Columns2,Iframe:P.Frame,MenuDown:Gu,SizeS:y0,SizeM:v0,SizeL:x0,AspectRatio:d0,Emoji:P.SmilePlus,DeleteColumn:h0,DeleteRow:p0,SearchAndReplace:P.Replace,EmojiIcon:P.SmilePlusIcon,KatexIcon:P.Sigma,ExportPdf:Vu,ExportWord:Ku,ImportWord:O0,ColumnAddLeft:b0,ColumnAddRight:w0,BookMarked:P.BookMarked,Excalidraw:A0,ZoomIn:P.ZoomIn,ZoomOut:P.ZoomOut,Settings:P.Settings,Eye:P.Eye,TextDirection:S0,LeftToRight:j0,RightToLeft:E0,Attachment:P.Paperclip,GifIcon:C0,ChevronUp:P.ChevronUp,Crop:P.CropIcon,Mermaid:T0,Twitter:I0,CodeView:R0,FlipX:P.FlipVertical,FlipY:P.FlipHorizontal,PencilRuler:P.PencilRuler,WrapText:P.WrapText};function P0({fill:e}){return c.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:c.jsxs("g",{id:"icon/背景颜色",children:[c.jsx("g",{id:"编组",fill:"currentColor",children:c.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[c.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),c.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),c.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),c.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",id:"矩形",fill:e||"#FBDE28"})]})})})}function Xu(e){const[t,r]=w.useState(void 0);function n(a){var s;(s=e.action)==null||s.call(e,a)}function i(){var a;(a=e.action)==null||a.call(e,t)}const o=w.useCallback(Ar(a=>{r(a)},350),[]);return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[c.jsx(U,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:i,tooltipOptions:e==null?void 0:e.tooltipOptions,shortcutKeys:e==null?void 0:e.shortcutKeys,children:c.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:c.jsx(P0,{fill:t})})}),c.jsx(rf,{selectedColor:t,setSelectedColor:o,onChange:n,highlight:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(we,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:e==null?void 0:e.disabled,children:c.jsx(be,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function k0({editor:e,disabled:t,actions:r}){var x,y,S,A,C,E,k,M,R,N,_,j,O,$,z,X,F,re;const n=({editor:ee})=>D.isActive(ee.view.state,"table"),{t:i}=H.useLocale();function o(){e.chain().focus().addColumnBefore().run()}function a(){e.chain().focus().addColumnAfter().run()}function s(){e.chain().focus().deleteColumn().run()}function l(){e.chain().focus().addRowBefore().run()}function u(){e.chain().focus().addRowAfter().run()}function f(){e.chain().focus().deleteRow().run()}function d(){e.chain().focus().mergeCells().run()}function h(){e==null||e.chain().focus().splitCell().run()}function p(){e.chain().focus().deleteTable().run()}function m(ee){e.chain().focus().setTableCellBackground(ee).run()}const g=()=>{var $e;const{view:ee,state:{selection:{from:ne}}}=e,xe=ee.domAtPos(ne).node;if(!xe)return new DOMRect(-1e3,-1e3,0,0);const me=($e=xe==null?void 0:xe.closest)==null?void 0:$e.call(xe,".tableWrapper");return me?me.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"table",shouldShow:n,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:g,plugins:[eu.sticky],sticky:"popper"},children:t?c.jsx(c.Fragment,{}):c.jsxs("div",{className:"richtext-flex richtext-size-full richtext-min-w-32 richtext-flex-row richtext-items-center richtext-gap-0.5 richtext-rounded-lg !richtext-border richtext-border-border richtext-bg-background richtext-p-2 richtext-leading-none richtext-shadow-sm",children:[c.jsx(U,{action:o,disabled:!((y=(x=e==null?void 0:e.can())==null?void 0:x.addColumnBefore)!=null&&y.call(x)),icon:"BetweenHorizonalEnd",tooltip:i("editor.table.menu.insertColumnBefore"),"tooltip-options":{sideOffset:15}}),c.jsx(U,{action:a,disabled:!((A=(S=e==null?void 0:e.can())==null?void 0:S.addColumnAfter)!=null&&A.call(S)),icon:"BetweenHorizonalStart",tooltip:i("editor.table.menu.insertColumnAfter"),"tooltip-options":{sideOffset:15}}),c.jsx(U,{action:s,disabled:!((E=e==null?void 0:(C=e.can()).deleteColumn)!=null&&E.call(C)),icon:"DeleteColumn",tooltip:i("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(U,{action:l,disabled:!((M=e==null?void 0:(k=e.can()).addRowBefore)!=null&&M.call(k)),icon:"BetweenVerticalEnd",tooltip:i("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15}}),c.jsx(U,{action:u,disabled:!((N=(R=e==null?void 0:e.can())==null?void 0:R.addRowAfter)!=null&&N.call(R)),icon:"BetweenVerticalStart",tooltip:i("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15}}),c.jsx(U,{action:f,disabled:!((j=(_=e==null?void 0:e.can())==null?void 0:_.deleteRow)!=null&&j.call(_)),icon:"DeleteRow",tooltip:i("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(U,{action:d,disabled:!(($=(O=e==null?void 0:e.can())==null?void 0:O.mergeCells)!=null&&$.call(O)),icon:"TableCellsMerge",tooltip:i("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15}}),c.jsx(U,{action:h,disabled:!((X=(z=e==null?void 0:e.can())==null?void 0:z.splitCell)!=null&&X.call(z)),icon:"TableCellsSplit",tooltip:i("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15}}),c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),c.jsx(Xu,{action:m,editor:e,tooltip:i("editor.table.menu.setCellsBgColor"),tooltipOptions:{sideOffset:15}}),c.jsx(U,{action:p,disabled:!((re=(F=e==null?void 0:e.can())==null?void 0:F.deleteTable)!=null&&re.call(F)),icon:"Trash2",tooltip:i("editor.table.menu.deleteTable"),"tooltip-options":{sideOffset:15}}),r&&r.map((ee,ne)=>c.jsx(U,{...ee},ne))]})})}const N0="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",M0="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",zt=(e,t)=>{for(const r in t)e[r]=t[r];return e},oa="numeric",aa="ascii",sa="alpha",ir="asciinumeric",rr="alphanumeric",ca="domain",Yu="emoji",L0="scheme",$0="slashscheme",Qn="whitespace";function _0(e,t){return e in t||(t[e]=[]),t[e]}function At(e,t,r){t[oa]&&(t[ir]=!0,t[rr]=!0),t[aa]&&(t[ir]=!0,t[sa]=!0),t[ir]&&(t[rr]=!0),t[sa]&&(t[rr]=!0),t[rr]&&(t[ca]=!0),t[Yu]&&(t[ca]=!0);for(const n in t){const i=_0(n,r);i.indexOf(e)<0&&i.push(e)}}function D0(e,t){const r={};for(const n in t)t[n].indexOf(e)>=0&&(r[n]=!0);return r}function Te(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Te.groups={};Te.prototype={accepts(){return!!this.t},go(e){const t=this,r=t.j[e];if(r)return r;for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],o=t.jr[n][1];if(o&&i.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,r,n){for(let i=0;i<e.length;i++)this.tt(e[i],t,r,n)},tr(e,t,r,n){n=n||Te.groups;let i;return t&&t.j?i=t:(i=new Te(t),r&&n&&At(t,r,n)),this.jr.push([e,i]),i},ts(e,t,r,n){let i=this;const o=e.length;if(!o)return i;for(let a=0;a<o-1;a++)i=i.tt(e[a]);return i.tt(e[o-1],t,r,n)},tt(e,t,r,n){n=n||Te.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let a,s=i.go(e);if(s?(a=new Te,zt(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new Te,o){if(n)if(a.t&&typeof a.t=="string"){const l=zt(D0(a.t,n),r);At(o,l,n)}else r&&At(o,r,n);a.t=o}return i.j[e]=a,a}};const J=(e,t,r,n,i)=>e.ta(t,r,n,i),he=(e,t,r,n,i)=>e.tr(t,r,n,i),Ys=(e,t,r,n,i)=>e.ts(t,r,n,i),I=(e,t,r,n,i)=>e.tt(t,r,n,i),et="WORD",la="UWORD",Ju="ASCIINUMERICAL",Zu="ALPHANUMERICAL",mr="LOCALHOST",ua="TLD",da="UTLD",Fr="SCHEME",Lt="SLASH_SCHEME",Ia="NUM",fa="WS",Ra="NL",or="OPENBRACE",ar="CLOSEBRACE",Yr="OPENBRACKET",Jr="CLOSEBRACKET",Zr="OPENPAREN",Qr="CLOSEPAREN",en="OPENANGLEBRACKET",tn="CLOSEANGLEBRACKET",rn="FULLWIDTHLEFTPAREN",nn="FULLWIDTHRIGHTPAREN",on="LEFTCORNERBRACKET",an="RIGHTCORNERBRACKET",sn="LEFTWHITECORNERBRACKET",cn="RIGHTWHITECORNERBRACKET",ln="FULLWIDTHLESSTHAN",un="FULLWIDTHGREATERTHAN",dn="AMPERSAND",Oa="APOSTROPHE",fn="ASTERISK",mt="AT",hn="BACKSLASH",pn="BACKTICK",mn="CARET",gt="COLON",Pa="COMMA",gn="DOLLAR",He="DOT",xn="EQUALS",ka="EXCLAMATION",Pe="HYPHEN",sr="PERCENT",vn="PIPE",yn="PLUS",bn="POUND",cr="QUERY",Na="QUOTE",Qu="FULLWIDTHMIDDLEDOT",Ma="SEMI",qe="SLASH",lr="TILDE",wn="UNDERSCORE",ed="EMOJI",Sn="SYM";var td=Object.freeze({__proto__:null,WORD:et,UWORD:la,ASCIINUMERICAL:Ju,ALPHANUMERICAL:Zu,LOCALHOST:mr,TLD:ua,UTLD:da,SCHEME:Fr,SLASH_SCHEME:Lt,NUM:Ia,WS:fa,NL:Ra,OPENBRACE:or,CLOSEBRACE:ar,OPENBRACKET:Yr,CLOSEBRACKET:Jr,OPENPAREN:Zr,CLOSEPAREN:Qr,OPENANGLEBRACKET:en,CLOSEANGLEBRACKET:tn,FULLWIDTHLEFTPAREN:rn,FULLWIDTHRIGHTPAREN:nn,LEFTCORNERBRACKET:on,RIGHTCORNERBRACKET:an,LEFTWHITECORNERBRACKET:sn,RIGHTWHITECORNERBRACKET:cn,FULLWIDTHLESSTHAN:ln,FULLWIDTHGREATERTHAN:un,AMPERSAND:dn,APOSTROPHE:Oa,ASTERISK:fn,AT:mt,BACKSLASH:hn,BACKTICK:pn,CARET:mn,COLON:gt,COMMA:Pa,DOLLAR:gn,DOT:He,EQUALS:xn,EXCLAMATION:ka,HYPHEN:Pe,PERCENT:sr,PIPE:vn,PLUS:yn,POUND:bn,QUERY:cr,QUOTE:Na,FULLWIDTHMIDDLEDOT:Qu,SEMI:Ma,SLASH:qe,TILDE:lr,UNDERSCORE:wn,EMOJI:ed,SYM:Sn});const Ze=/[a-z]/,er=new RegExp("\\p{L}","u"),ei=new RegExp("\\p{Emoji}","u"),Qe=/\d/,ti=/\s/,Js="\r",ri=`
2
+ `,B0="️",z0="‍",ni="";let Lr=null,$r=null;function H0(e=[]){const t={};Te.groups=t;const r=new Te;Lr==null&&(Lr=Zs(N0)),$r==null&&($r=Zs(M0)),I(r,"'",Oa),I(r,"{",or),I(r,"}",ar),I(r,"[",Yr),I(r,"]",Jr),I(r,"(",Zr),I(r,")",Qr),I(r,"<",en),I(r,">",tn),I(r,"(",rn),I(r,")",nn),I(r,"「",on),I(r,"」",an),I(r,"『",sn),I(r,"』",cn),I(r,"<",ln),I(r,">",un),I(r,"&",dn),I(r,"*",fn),I(r,"@",mt),I(r,"`",pn),I(r,"^",mn),I(r,":",gt),I(r,",",Pa),I(r,"$",gn),I(r,".",He),I(r,"=",xn),I(r,"!",ka),I(r,"-",Pe),I(r,"%",sr),I(r,"|",vn),I(r,"+",yn),I(r,"#",bn),I(r,"?",cr),I(r,'"',Na),I(r,"/",qe),I(r,";",Ma),I(r,"~",lr),I(r,"_",wn),I(r,"\\",hn),I(r,"・",Qu);const n=he(r,Qe,Ia,{[oa]:!0});he(n,Qe,n);const i=he(n,Ze,Ju,{[ir]:!0}),o=he(n,er,Zu,{[rr]:!0}),a=he(r,Ze,et,{[aa]:!0});he(a,Qe,i),he(a,Ze,a),he(i,Qe,i),he(i,Ze,i);const s=he(r,er,la,{[sa]:!0});he(s,Ze),he(s,Qe,o),he(s,er,s),he(o,Qe,o),he(o,Ze),he(o,er,o);const l=I(r,ri,Ra,{[Qn]:!0}),u=I(r,Js,fa,{[Qn]:!0}),f=he(r,ti,fa,{[Qn]:!0});I(r,ni,f),I(u,ri,l),I(u,ni,f),he(u,ti,f),I(f,Js),I(f,ri),he(f,ti,f),I(f,ni,f);const d=he(r,ei,ed,{[Yu]:!0});I(d,"#"),he(d,ei,d),I(d,B0,d);const h=I(d,z0);I(h,"#"),he(h,ei,d);const p=[[Ze,a],[Qe,i]],m=[[Ze,null],[er,s],[Qe,o]];for(let g=0;g<Lr.length;g++)ht(r,Lr[g],ua,et,p);for(let g=0;g<$r.length;g++)ht(r,$r[g],da,la,m);At(ua,{tld:!0,ascii:!0},t),At(da,{utld:!0,alpha:!0},t),ht(r,"file",Fr,et,p),ht(r,"mailto",Fr,et,p),ht(r,"http",Lt,et,p),ht(r,"https",Lt,et,p),ht(r,"ftp",Lt,et,p),ht(r,"ftps",Lt,et,p),At(Fr,{scheme:!0,ascii:!0},t),At(Lt,{slashscheme:!0,ascii:!0},t),e=e.sort((g,x)=>g[0]>x[0]?1:-1);for(let g=0;g<e.length;g++){const x=e[g][0],S=e[g][1]?{[L0]:!0}:{[$0]:!0};x.indexOf("-")>=0?S[ca]=!0:Ze.test(x)?Qe.test(x)?S[ir]=!0:S[aa]=!0:S[oa]=!0,Ys(r,x,x,S)}return Ys(r,"localhost",mr,{ascii:!0}),r.jd=new Te(Sn),{start:r,tokens:zt({groups:t},td)}}function rd(e,t){const r=q0(t.replace(/[A-Z]/g,s=>s.toLowerCase())),n=r.length,i=[];let o=0,a=0;for(;a<n;){let s=e,l=null,u=0,f=null,d=-1,h=-1;for(;a<n&&(l=s.go(r[a]));)s=l,s.accepts()?(d=0,h=0,f=s):d>=0&&(d+=r[a].length,h++),u+=r[a].length,o+=r[a].length,a++;o-=d,a-=h,u-=d,i.push({t:f.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function q0(e){const t=[],r=e.length;let n=0;for(;n<r;){let i=e.charCodeAt(n),o,a=i<55296||i>56319||n+1===r||(o=e.charCodeAt(n+1))<56320||o>57343?e[n]:e.slice(n,n+2);t.push(a),n+=a.length}return t}function ht(e,t,r,n,i){let o;const a=t.length;for(let s=0;s<a-1;s++){const l=t[s];e.j[l]?o=e.j[l]:(o=new Te(n),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Te(r),o.jr=i.slice(),e.j[t[a-1]]=o,o}function Zs(e){const t=[],r=[];let n=0,i="0123456789";for(;n<e.length;){let o=0;for(;i.indexOf(e[n+o])>=0;)o++;if(o>0){t.push(r.join(""));for(let a=parseInt(e.substring(n,n+o),10);a>0;a--)r.pop();n+=o}else r.push(e[n]),n++}return t}const gr={defaultProtocol:"http",events:null,format:Qs,formatHref:Qs,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function La(e,t=null){let r=zt({},gr);e&&(r=zt(r,e instanceof La?e.o:e));const n=r.ignoreTags,i=[];for(let o=0;o<n.length;o++)i.push(n[o].toUpperCase());this.o=r,t&&(this.defaultRender=t),this.ignoreTags=i}La.prototype={o:gr,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){const n=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=r.t in i?i[r.t]:gr[e],typeof i=="function"&&n&&(i=i(t,r))):typeof i=="function"&&n&&(i=i(t,r.t,r)),i)},getObj(e,t,r){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,r.t,r)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Qs(e){return e}function nd(e,t){this.t="token",this.v=e,this.tk=t}nd.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=gr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,r=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",r,this),i=e.get("tagName",r,t),o=this.toFormattedString(e),a={},s=e.get("className",r,t),l=e.get("target",r,t),u=e.get("rel",r,t),f=e.getObj("attributes",r,t),d=e.getObj("events",r,t);return a.href=n,s&&(a.class=s),l&&(a.target=l),u&&(a.rel=u),f&&zt(a,f),{tagName:i,attributes:a,content:o,eventListeners:d}}};function En(e,t){class r extends nd{constructor(i,o){super(i,o),this.t=e}}for(const n in t)r.prototype[n]=t[n];return r.t=e,r}const ec=En("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tc=En("text"),F0=En("nl"),_r=En("url",{isLink:!0,toHref(e=gr.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==mr&&e[1].t===gt}}),Oe=e=>new Te(e);function U0({groups:e}){const t=e.domain.concat([dn,fn,mt,hn,pn,mn,gn,xn,Pe,Ia,sr,vn,yn,bn,qe,Sn,lr,wn]),r=[gt,Pa,He,ka,sr,cr,Na,Ma,en,tn,or,ar,Jr,Yr,Zr,Qr,rn,nn,on,an,sn,cn,ln,un],n=[dn,Oa,fn,hn,pn,mn,gn,xn,Pe,or,ar,sr,vn,yn,bn,cr,qe,Sn,lr,wn],i=Oe(),o=I(i,lr);J(o,n,o),J(o,e.domain,o);const a=Oe(),s=Oe(),l=Oe();J(i,e.domain,a),J(i,e.scheme,s),J(i,e.slashscheme,l),J(a,n,o),J(a,e.domain,a);const u=I(a,mt);I(o,mt,u),I(s,mt,u),I(l,mt,u);const f=I(o,He);J(f,n,o),J(f,e.domain,o);const d=Oe();J(u,e.domain,d),J(d,e.domain,d);const h=I(d,He);J(h,e.domain,d);const p=Oe(ec);J(h,e.tld,p),J(h,e.utld,p),I(u,mr,p);const m=I(d,Pe);I(m,Pe,m),J(m,e.domain,d),J(p,e.domain,d),I(p,He,h),I(p,Pe,m);const g=I(p,gt);J(g,e.numeric,ec);const x=I(a,Pe),y=I(a,He);I(x,Pe,x),J(x,e.domain,a),J(y,n,o),J(y,e.domain,a);const S=Oe(_r);J(y,e.tld,S),J(y,e.utld,S),J(S,e.domain,a),J(S,n,o),I(S,He,y),I(S,Pe,x),I(S,mt,u);const A=I(S,gt),C=Oe(_r);J(A,e.numeric,C);const E=Oe(_r),k=Oe();J(E,t,E),J(E,r,k),J(k,t,E),J(k,r,k),I(S,qe,E),I(C,qe,E);const M=I(s,gt),R=I(l,gt),N=I(R,qe),_=I(N,qe);J(s,e.domain,a),I(s,He,y),I(s,Pe,x),J(l,e.domain,a),I(l,He,y),I(l,Pe,x),J(M,e.domain,E),I(M,qe,E),I(M,cr,E),J(_,e.domain,E),J(_,t,E),I(_,qe,E);const j=[[or,ar],[Yr,Jr],[Zr,Qr],[en,tn],[rn,nn],[on,an],[sn,cn],[ln,un]];for(let O=0;O<j.length;O++){const[$,z]=j[O],X=I(E,$);I(k,$,X),I(X,z,E);const F=Oe(_r);J(X,t,F);const re=Oe();J(X,r),J(F,t,F),J(F,r,re),J(re,t,F),J(re,r,re),I(F,z,E),I(re,z,E)}return I(i,mr,S),I(i,Ra,F0),{start:i,tokens:td}}function W0(e,t,r){let n=r.length,i=0,o=[],a=[];for(;i<n;){let s=e,l=null,u=null,f=0,d=null,h=-1;for(;i<n&&!(l=s.go(r[i].t));)a.push(r[i++]);for(;i<n&&(u=l||s.go(r[i].t));)l=null,s=u,s.accepts()?(h=0,d=s):h>=0&&h++,i++,f++;if(h<0)i-=f,i<n&&(a.push(r[i]),i++);else{a.length>0&&(o.push(ii(tc,t,a)),a=[]),i-=h,f-=h;const p=d.t,m=r.slice(i-f,i);o.push(ii(p,t,m))}}return a.length>0&&o.push(ii(tc,t,a)),o}function ii(e,t,r){const n=r[0].s,i=r[r.length-1].e,o=t.slice(n,i);return new e(o,r)}const G0=typeof console<"u"&&console&&console.warn||(()=>{}),V0="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",de={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function K0(){return Te.groups={},de.scanner=null,de.parser=null,de.tokenQueue=[],de.pluginQueue=[],de.customSchemes=[],de.initialized=!1,de}function rc(e,t=!1){if(de.initialized&&G0(`linkifyjs: already initialized - will not register custom scheme "${e}" ${V0}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
3
3
  1. Must only contain digits, lowercase ASCII letters or "-"
4
4
  2. Cannot start or end with "-"
5
- 3. "-" cannot repeat`);de.customSchemes.push([e,t])}function X0(){de.scanner=H0(de.customSchemes);for(let e=0;e<de.tokenQueue.length;e++)de.tokenQueue[e][1]({scanner:de.scanner});de.parser=U0(de.scanner.tokens);for(let e=0;e<de.pluginQueue.length;e++)de.pluginQueue[e][1]({scanner:de.scanner,parser:de.parser});return de.initialized=!0,de}function $a(e){return de.initialized||X0(),W0(de.parser.start,e,rd(de.scanner.start,e))}$a.scan=rd;function id(e,t=null,r=null){if(t&&typeof t=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);r=t,t=null}const n=new La(r),i=$a(e),o=[];for(let a=0;a<i.length;a++){const s=i[a];s.isLink&&(!t||s.t===t)&&n.check(s)&&o.push(s.toFormattedObject(n))}return o}function Y0(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function J0(e){return new B.Plugin({key:new B.PluginKey("autolink"),appendTransaction:(t,r,n)=>{const i=t.some(u=>u.docChanged)&&!r.doc.eq(n.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=n,s=B.combineTransactionSteps(r.doc,[...t]);if(B.getChangedRanges(s).forEach(({newRange:u})=>{const f=B.findChildrenInRange(n.doc,u,p=>p.isTextblock);let d,h;if(f.length>1?(d=f[0],h=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):f.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=f[0],h=n.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const p=h.split(" ").filter(y=>y!=="");if(p.length<=0)return!1;const m=p[p.length-1],g=d.pos+h.lastIndexOf(m);if(!m)return!1;const x=$a(m).map(y=>y.toObject(e.defaultProtocol));if(!Y0(x))return!1;x.filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>n.schema.marks.code?!n.doc.rangeHasMark(y.from,y.to,n.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{B.getMarksBetween(y.from,y.to,n.doc).some(w=>w.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function Z0(e){return new B.Plugin({key:new B.PluginKey("handleClickLink"),props:{handleClick:(t,r,n)=>{var i,o;if(n.button!==0||!t.editable)return!1;let a=n.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(h=>h.nodeName==="A"))return!1;const l=B.getAttributes(t.state,e.type.name),u=n.target,f=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&f?(window.open(f,d),!0):!1}}})}function Q0(e){return new B.Plugin({key:new B.PluginKey("handlePasteLink"),props:{handlePaste:(t,r,n)=>{const{state:i}=t,{selection:o}=i,{empty:a}=o;if(a)return!1;let s="";n.content.forEach(u=>{s+=u.textContent});const l=id(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}const e1=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function wt(e,t){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!e||e.replace(e1,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const t1=B.Mark.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){rc(e);return}rc(e.scheme,e.optionalSlashes)})},onDestroy(){K0()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!wt(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",B.mergeAttributes(this.options.HTMLAttributes,e),0]:["a",B.mergeAttributes(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[B.markPasteRule({find:e=>{const t=[];if(e){const{protocols:r,defaultProtocol:n}=this.options,i=id(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!wt(a,r),protocols:r,defaultProtocol:n}));i.length&&i.forEach(o=>t.push({text:o.value,data:{href:o.href},index:o.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:r}=this.options;return this.options.autolink&&e.push(J0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:i=>!!wt(i,t),protocols:t,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(Z0({type:this.type})),this.options.linkOnPaste&&e.push(Q0({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function r1(e){const[t,r]=S.useState(!1);function n(i,o,a){e.action&&(e.action({link:i,text:o,openInNewTab:a}),r(!1))}return c.jsxs(Wt,{modal:!0,open:t,onOpenChange:r,children:[c.jsx(Gt,{disabled:e==null?void 0:e.disabled,asChild:!0,children:c.jsx(F,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:c.jsx(ye,{name:e==null?void 0:e.icon})})}),c.jsx(It,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:c.jsx(ad,{editor:e.editor,onSetLink:n})})]})}const od=t1.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",B.mergeAttributes(this.options.HTMLAttributes,e,{class:"link"}),0]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),openOnClick:!0,button:({editor:t,t:r})=>({component:r1,componentProps:{editor:t,action:n=>{const{link:i,text:o,openInNewTab:a}=n,{state:s}=t,{from:l}=s.selection,u=o.length,f=l+u;t.chain().extendMarkRange("link").insertContent({type:"text",text:o,marks:[{type:"link",attrs:{href:i,target:a?"_blank":""}}]}).setLink({href:i}).setTextSelection({from:l,to:f}).focus().run()},id:"linkk",isActive:()=>t.isActive("link")||!1,disabled:!t.can().setLink({href:""}),icon:"Link",tooltip:r("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new B.Plugin({props:{handleClick:(e,t)=>{const{schema:r,doc:n,tr:i}=e.state,o=B.getMarkRange(n.resolve(t),r.marks.link);if(!o)return!1;const a=n.resolve(o.from),s=n.resolve(o.to),l=i.setSelection(new B.TextSelection(a,s));e.dispatch(l)}}})]}});function ad(e){const{t}=H.useLocale(),[r,n]=S.useState({text:"",link:""}),[i,o]=S.useState(!1);S.useEffect(()=>{const s=()=>{var l,u,f;if((l=e.editor)!=null&&l.isActive("link")){const{href:d,target:h}=e.editor.getAttributes("link"),{from:p,to:m}=e.editor.state.selection,g=e.editor.state.doc.textBetween(p,m," ");n({link:d||"",text:g}),o(h==="_blank")}else{const d=(u=e.editor.extensionManager.extensions.find(h=>h.name===od.name))==null?void 0:u.options;o(((f=d==null?void 0:d.HTMLAttributes)==null?void 0:f.target)==="_blank")}};return s(),e.editor.on("selectionUpdate",s),()=>{e.editor.off("selectionUpdate",s)}},[e.editor]);function a(s){s.preventDefault(),s.stopPropagation(),e==null||e.onSetLink(r.link,r.text,i),n({text:"",link:""})}return c.jsx("div",{className:"border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-gap-2",children:[c.jsx(tt,{className:"mb-[6px]",children:t("editor.link.dialog.text")}),c.jsx("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:c.jsx(Ie,{className:"richtext-w-80",onChange:s=>n({...r,text:s.target.value}),placeholder:"Text",required:!0,type:"text",value:r.text})})}),c.jsx(tt,{className:"mb-[6px]",children:t("editor.link.dialog.link")}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsxs("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:[c.jsx(Ie,{className:"richtext-pl-10",onChange:s=>n({...r,link:s.target.value}),required:!0,type:"url",value:r.link}),c.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2",children:c.jsx(ye,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[c.jsx(tt,{children:t("editor.link.dialog.openInNewTab")}),c.jsx(Ga,{checked:i,onCheckedChange:s=>{o(s)}})]}),c.jsx(be,{className:"richtext-mt-2 richtext-self-end",onClick:a,type:"button",children:t("editor.link.dialog.button.apply")})]})})}function n1(e){const{t}=H.useLocale();return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:[c.jsx("a",{href:e==null?void 0:e.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:sx(e==null?void 0:e.link,{length:50,omission:"…"})}),(e==null?void 0:e.link)&&c.jsx(De,{orientation:"vertical",className:"!richtext-h-4"}),c.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[c.jsx(F,{icon:"Pencil",tooltip:t("editor.link.edit.tooltip"),action:()=>{e==null||e.onEdit()},tooltipOptions:{sideOffset:15}}),c.jsx(F,{icon:"Unlink",tooltip:t("editor.link.unlink.tooltip"),action:()=>{e==null||e.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function i1({editor:e,disabled:t}){const[r,n]=S.useState(!1),i=S.useMemo(()=>{const{href:l}=e.getAttributes("link");return l},[e]),o=S.useCallback(({editor:l})=>l.isActive("link"),[]),a=(l,u,f)=>{const d=e.state.selection,{from:h}=d,p=(u==null?void 0:u.length)??0,m=h+p;e.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:f?"_blank":""}}]}).setLink({href:l}).setTextSelection({from:h,to:m}).focus().run(),n(!1)},s=S.useCallback(()=>{e.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[e]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e,shouldShow:o,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n(!1)}},children:t?c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{children:r?c.jsx(ad,{onSetLink:a,editor:e}):c.jsx(n1,{editor:e,onClear:s,onEdit:()=>{n(!0)},link:i})})})})}const o1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,_a=B.Node.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",B.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[B.nodeInputRule({find:o1,type:this.type,getAttributes:e=>{const[,,t,r,n]=e;return{src:r,alt:t,title:n}}})]}}),Cr=ke.Root,jr=ke.Trigger,a1=ke.Portal,sd=ne.forwardRef(({className:e,...t},r)=>c.jsx(ke.Overlay,{ref:r,className:ee("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- 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",e),...t}));sd.displayName=ke.Overlay.displayName;const Ft=ne.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(a1,{children:[c.jsx(sd,{}),c.jsxs(ke.Content,{ref:n,className:ee("richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",e),...r,children:[t,c.jsxs(ke.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[c.jsx(P.X,{className:"richtext-h-4 richtext-w-4"}),c.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));Ft.displayName=ke.Content.displayName;function cd({className:e,...t}){return c.jsx("div",{className:ee("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",e),...t})}cd.displayName="DialogHeader";function In({className:e,...t}){return c.jsx("div",{className:ee("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",e),...t})}In.displayName="DialogFooter";const Ut=ne.forwardRef(({className:e,...t},r)=>c.jsx(ke.Title,{ref:r,className:ee("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",e),...t}));Ut.displayName=ke.Title.displayName;const s1=ne.forwardRef(({className:e,...t},r)=>c.jsx(ke.Description,{ref:r,className:ee("richtext-text-sm richtext-text-muted-foreground",e),...t}));s1.displayName=ke.Description.displayName;const nc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ic=pe.clsx,Rn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ic(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=o==null?void 0:o[u];if(f===null)return null;const h=nc(f)||nc(d);return i[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...o,...s}[g]):{...o,...s}[g]===x})?[...u,d,h]:u},[]);return ic(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},c1=Rn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-h-10 richtext-w-10"}},defaultVariants:{variant:"default",size:"default"}}),be=ne.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const a=n?Ql.Slot:"button";return c.jsx(a,{className:ee(c1({variant:t,size:r,className:e})),ref:o,...i})});be.displayName="Button";function l1(e){return e.replace(/^.*\/|\..+$/g,"")}function u1(e){return e.split(".").pop()}function d1(e){return e<1024?`${e} Byte`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function f1(e){return e?e==="application/pdf"?"pdf":e.startsWith("application/")&&[".document","word"].some(t=>e.includes(t))?"word":e.startsWith("application/")&&["presentation"].some(t=>e.includes(t))?"excel":e.startsWith("application/")&&["sheet"].some(t=>e.includes(t))?"ppt":e.startsWith("image")?"image":e.startsWith("audio")?"audio":e.startsWith("video")?"video":"file":"file"}function h1(e){return new Promise(t=>{const r=new FileReader;r.addEventListener("load",()=>{t({alt:e.name,src:r.result})},!1),r.readAsDataURL(e)})}function ld(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const a=new Uint8Array(o);for(;o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}function p1({editor:e,imageInline:t,onClose:r}){const{t:n}=H.useLocale(),[i,o]=S.useState(!1),a=S.useRef(null),[s,l]=S.useState(),[u,f]=S.useState(""),d=S.useRef(null),[h,p]=S.useState({src:"",file:null});function m(A){if(a.current&&A.width&&A.height){const C=g(a.current,A);f(C)}}function g(A,C){const T=document.createElement("canvas"),k=A.naturalWidth/A.width,M=A.naturalHeight/A.height;T.width=C.width*k,T.height=C.height*M;const R=T.getContext("2d");return R&&(R.imageSmoothingEnabled=!1,R.drawImage(A,C.x*k,C.y*M,C.width*k,C.height*M,0,0,C.width*k,C.height*M)),T.toDataURL("image/png",1)}async function x(){var A,C;try{const T=ld(u,((A=h==null?void 0:h.file)==null?void 0:A.name)||"image.png"),k=(C=e.extensionManager.extensions.find(R=>R.name===Ht.name))==null?void 0:C.options;let M="";k.upload?M=await k.upload(T):M=URL.createObjectURL(T),e.chain().focus().setImageInline({src:M,inline:t}).run(),o(!1),p({src:"",file:null}),r()}catch(T){console.log("Error cropping image",T)}}function y(A){var C;A.preventDefault(),(C=d.current)==null||C.click()}const w=async A=>{var M;const C=(M=A==null?void 0:A.target)==null?void 0:M.files;if(!e||e.isDestroyed||C.length===0)return;const T=C[0],k=await h1(T);o(!0),p({src:k.src,file:T})};return c.jsxs(c.Fragment,{children:[c.jsx(be,{className:"richtext-mt-1 richtext-w-full",onClick:y,size:"sm",children:n("editor.image.dialog.tab.uploadCrop")}),c.jsxs(Cr,{open:i,children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:n("editor.image.dialog.tab.uploadCrop")}),c.jsx("div",{children:h.src&&c.jsx(Sf,{className:"richtext-w-full",crop:s,onChange:A=>l(A),onComplete:A=>m(A),children:c.jsx("img",{alt:"Crop me",ref:a,src:h.src})})}),c.jsxs(In,{children:[c.jsxs(be,{onClick:()=>{o(!1),p({src:"",file:null})},children:[n("editor.imageUpload.cancel"),c.jsx(ye,{className:"richtext-ml-[4px]",name:"Trash2"})]}),c.jsxs(be,{className:"richtext-w-fit",onClick:x,children:[n("editor.imageUpload.crop"),c.jsx(ye,{className:"richtext-ml-[4px]",name:"Crop"})]})]})]})]}),c.jsx("input",{accept:"image/*",multiple:!0,onChange:w,ref:d,type:"file",style:{display:"none"}})]})}function On(e){function t(){const o=S.useRef(e),a=S.useCallback(()=>o.current,[]),s=S.useRef(new Set),l=S.useCallback(f=>{o.current={...o.current,...f},s.current.forEach(d=>d())},[]),u=S.useCallback(f=>(s.current.add(f),()=>s.current.delete(f)),[]);return{get:a,set:l,subscribe:u}}const r=S.createContext(null);function n({children:o}){return c.jsx(r.Provider,{value:t(),children:o})}function i(o){const a=S.useContext(r);if(!a)throw new Error("Store not found");return[S.useSyncExternalStore(a.subscribe,()=>o(a.get()),()=>o(e)),a.set]}return{Provider:n,useStore:i}}On({value:!1});On({value:!1});const{Provider:m1,useStore:ud}=On({value:!1}),{Provider:g1,useStore:dd}=On({value:"light"});H.d("0");function xr(e,t){return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}function Pn(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const vt={UPLOAD_IMAGE:e=>`UPLOAD_IMAGE-${e}`,UPLOAD_VIDEO:e=>`UPLOAD_VIDEO-${e}`,EDIT:e=>`EDIT-${e}`,UPDATE_THEME:e=>`UPDATE_THEME-${e}`,SEARCH_REPLCE:"SEARCH_REPLACE"},fd={setOpen:(e,t)=>{Pn(vt.UPLOAD_IMAGE(e),t)}};function x1(e){var m;const{t}=H.useLocale(),[r,n]=S.useState(!1),i=g=>{n(g.detail)},[o,a]=S.useState(""),s=S.useRef(null),[l,u]=S.useState(((m=e.editor.extensionManager.extensions.find(g=>g.name===Ht.name))==null?void 0:m.options.defaultInline)||!1),f=S.useMemo(()=>{var x;return(x=e.editor.extensionManager.extensions.find(y=>y.name===Ht.name))==null?void 0:x.options},[e.editor]);S.useEffect(()=>{const g=xr(vt.UPLOAD_IMAGE(e.editor.id),i);return()=>{g()}},[]);async function d(g){var A;const x=(A=g==null?void 0:g.target)==null?void 0:A.files;if(!e.editor||e.editor.isDestroyed||x.length===0)return;const y=x[0];let w="";f.upload?w=await f.upload(y):w=URL.createObjectURL(y),e.editor.chain().focus().setImageInline({src:w,inline:l}).run(),n(!1),u(!1)}function h(g){g.preventDefault(),g.stopPropagation(),e.editor.chain().focus().setImageInline({src:o,inline:l}).run(),n(!1),u(!1),a("")}function p(g){var x;g.preventDefault(),(x=s.current)==null||x.click()}return c.jsxs(Cr,{onOpenChange:n,open:r,children:[c.jsx(jr,{asChild:!0,children:c.jsx(F,{action:()=>n(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.image.dialog.title")}),c.jsxs(yd,{activationMode:"manual",defaultValue:f.resourceImage==="both"||f.resourceImage==="upload"?"upload":"link",children:[c.jsxs(Va,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[f.resourceImage==="both"||f.resourceImage==="upload"?c.jsx(yr,{value:"upload",children:t("editor.image.dialog.tab.upload")}):c.jsx(c.Fragment,{}),f.resourceImage==="both"||f.resourceImage==="link"?c.jsx(yr,{value:"link",children:t("editor.image.dialog.tab.url")}):c.jsx(c.Fragment,{})]}),c.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[c.jsx(Td,{checked:l,onCheckedChange:g=>{u(g)}}),c.jsx(tt,{children:t("editor.link.dialog.inline")})]}),c.jsxs(br,{value:"upload",children:[c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[c.jsx(be,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.image.dialog.tab.upload")}),c.jsx(p1,{editor:e.editor,imageInline:l,onClose:()=>fd.setOpen(e.editor.id,!1)})]}),c.jsx("input",{accept:"image/*",multiple:!0,onChange:d,ref:s,type:"file",style:{display:"none"}})]}),c.jsx(br,{value:"link",children:c.jsx("form",{onSubmit:h,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ie,{autoFocus:!0,onChange:g=>a(g.target.value),placeholder:t("editor.image.dialog.placeholder"),required:!0,type:"url",value:o}),c.jsx(be,{type:"submit",children:t("editor.image.dialog.button.apply")})]})})})]})]})]})}const Dr={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function v1(e){var M,R;const[t,r]=S.useState({width:H.IMAGE_MAX_SIZE,height:H.IMAGE_MAX_SIZE}),[n,i]=S.useState({width:0,height:0}),[o]=S.useState([Dr.TOP_LEFT,Dr.TOP_RIGHT,Dr.BOTTOM_LEFT,Dr.BOTTOM_RIGHT]),[a,s]=S.useState(!1),[l,u]=S.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f,inline:d}=(M=e==null?void 0:e.node)==null?void 0:M.attrs,h=S.useMemo(()=>{var re;const{src:j,alt:L,width:O,height:N,flipX:D,flipY:$}=(re=e==null?void 0:e.node)==null?void 0:re.attrs,W=Kr(O)?`${O}px`:O,Q=Kr(N)?`${N}px`:N,ae=[];D&&ae.push("rotateX(180deg)"),$&&ae.push("rotateY(180deg)");const oe=ae.join(" ");return{src:j||void 0,alt:L||void 0,style:{width:W||void 0,height:Q||void 0,transform:oe||"none"}}},[(R=e==null?void 0:e.node)==null?void 0:R.attrs]),p=S.useMemo(()=>{const{style:{width:j}}=h;return{width:j==="100%"?j:void 0}},[h]);function m(j){i({width:j.target.width,height:j.target.height})}function g(){const{editor:j,getPos:L}=e;j.commands.setNodeSelection(L())}const x=S.useCallback(Bt(()=>{const{editor:j}=e,{width:L}=getComputedStyle(j.view.dom);r(O=>({...O,width:Number.parseInt(L,10)}))},H.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function y(j,L){j.preventDefault(),j.stopPropagation();const O=n.width,N=n.height,D=O/N;let $=Number(e.node.attrs.width),W=Number(e.node.attrs.height);const Q=t.width;$&&!W?($=$>Q?Q:$,W=Math.round($/D)):W&&!$?($=Math.round(W*D),$=$>Q?Q:$):!$&&!W?($=O>Q?Q:O,W=Math.round($/D)):$=$>Q?Q:$,s(!0),u({x:j.clientX,y:j.clientY,w:$,h:W,dir:L})}const w=S.useCallback(Bt(j=>{if(j.preventDefault(),j.stopPropagation(),!a)return;const{x:L,w:O,dir:N}=l,D=(j.clientX-L)*(/l/.test(N)?-1:1),$=ju(O+D,H.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:$,height:null})},H.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),A=S.useCallback(j=>{j.preventDefault(),j.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),g())},[a,g]),C=S.useCallback(()=>{document==null||document.addEventListener("mousemove",w,!0),document==null||document.addEventListener("mouseup",A,!0)},[w,A]),T=S.useCallback(()=>{document==null||document.removeEventListener("mousemove",w,!0),document==null||document.removeEventListener("mouseup",A,!0)},[w,A]);S.useEffect(()=>(a?C():T(),()=>{T()}),[a,C,T]);const k=S.useMemo(()=>new ResizeObserver(()=>x()),[x]);return S.useEffect(()=>(k.observe(e.editor.view.dom),()=>{k.disconnect()}),[e.editor.view.dom,k]),c.jsx(pe.NodeViewWrapper,{as:d?"span":"div",className:"image-view",style:{...p,textAlign:f,display:d?"inline":"block"},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:p,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:h.alt,className:"image-view__body__image block",height:"auto",onClick:g,onLoad:m,src:h.src,style:h.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(j=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${j}`,onMouseDown:L=>y(L,j)},`image-dir-${j}`))})]})})}const Dt=new B.PluginKey("upload-image");function y1(){return new B.Plugin({key:Dt,state:{init(){return B.DecorationSet.empty},apply(e,t){t=t.map(e.mapping,e.doc);const r=e.getMeta(Dt);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const a=b1(o),s=B.Decoration.widget(i,a,{id:n});t=t.add(e.doc,[s])}else if(r!=null&&r.remove)for(const n of r.remove)t=t.remove(t.find(void 0,void 0,i=>i.id===n));return t}},props:{decorations(e){return this.getState(e)}}})}function b1(e){const t=document.createElement("div"),r=document.createElement("img");return r.setAttribute("class","opacity-50"),r.src=e,r.addEventListener("load",()=>{t.setAttribute("class","img-placeholder")}),t.append(r),t}function w1(e,t){var i;const n=Dt.getState(e).find(void 0,void 0,o=>o.id===t);return n.length>0?(i=n[0])==null?void 0:i.from:null}function S1({validateFn:e,onUpload:t,postUpload:r,defaultInline:n=!1}){return(i,o,a)=>{for(const s of i){if(e&&!e(s))continue;const l=Date.now().toString(),u=o.state.tr;u.selection.empty||u.deleteSelection();const f=URL.createObjectURL(s);u.setMeta(Dt,{add:[{id:l,pos:a,src:f}]}),o.dispatch(u),t(s).then(async d=>{var w;r&&typeof d=="string"&&(d=await r(d));const{schema:h}=o.state;let p=w1(o.state,l);if(p===null)return;const m=typeof d=="object"?f:d,g=(w=h.nodes.image)==null?void 0:w.create({src:m,inline:n});if(!g)return;const{doc:x}=o.state;p>x.content.size&&(p=x.content.size-1);const y=o.state.tr.replaceWith(p,p,g).setMeta(Dt,{remove:[l]});o.dispatch(y)},()=>{const d=o.state.tr.delete(a,a).setMeta(Dt,{remove:[l]});o.dispatch(d)})}}}function A1(e,t,r){var i;const n=[...((i=t.clipboardData)==null?void 0:i.files)||[]];if(n.length>0){t.preventDefault();const o=e.state.selection.from;return r(n,e,o+1),!0}return!1}function C1(e,t,r,n){var o;const i=[...((o=t.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){t.preventDefault();const a=e.posAtCoords({left:t.clientX,top:t.clientY});if(a)return n(i,e,a.pos+1),!0}return!1}const j1={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,resourceImage:"both",defaultInline:!1},Ht=_a.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...j1,...(e=this.parent)==null?void 0:e.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:t,extension:r,t:n})=>{var i,o;return{component:x1,componentProps:{action:()=>!0,upload:r.options.upload,disabled:!((o=(i=t.can()).setImage)!=null&&o.call(i,{})),icon:"ImageUp",tooltip:n("editor.image.tooltip"),editor:t}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),flipX:{default:!1},flipY:{default:!1},width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||null;return r?Number.parseInt(r,10):null},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})},inline:{default:!1,parseHTML:t=>!!t.getAttribute("inline"),renderHTML:t=>({inline:t.inline})}}},addNodeView(){return pe.ReactNodeViewRenderer(v1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageInline:t=>({commands:r})=>r.insertContent({type:this.name,attrs:{...t,inline:t.inline??this.options.defaultInline}}),updateImage:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImage:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{flipX:t,flipY:r,align:n,inline:i}=e,o=t||r?`transform: rotateX(${t?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",a=n?`text-align: ${n};`:"";return[i?"span":"div",{style:a,class:"image"},["img",B.mergeAttributes({height:"auto",style:o},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"span.image img",getAttrs:e=>{var o;const t=e==null?void 0:e.parentElement,r=e==null?void 0:e.getAttribute("width"),n=(e==null?void 0:e.getAttribute("flipx"))||!1,i=(e==null?void 0:e.getAttribute("flipy"))||!1;return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),caption:e==null?void 0:e.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||((o=t==null?void 0:t.style)==null?void 0:o.textAlign)||null,inline:(e==null?void 0:e.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}},{tag:"div[class=image]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width"),n=(t==null?void 0:t.getAttribute("flipx"))||!1,i=(t==null?void 0:t.getAttribute("flipy"))||!1;return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),caption:t==null?void 0:t.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null,inline:(t==null?void 0:t.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}}]},addProseMirrorPlugins(){const t=S1({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload,defaultInline:this.options.defaultInline});return[new B.Plugin({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:A1(r,n,t),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||C1(r,n,o,t),!1)}}),y1()]}});function T1({selectImage:e,giphyApiKey:t,children:r}){const[n,i]=S.useState([]),[o]=S.useState(15),a=S.useRef(null),s=(u,f="search")=>{if(!t)return;const h=`${f==="search"?`https://api.giphy.com/v1/gifs/search?q=${u}`:`https://api.giphy.com/v1/gifs/trending?q=${u}`}&limit=${o}&api_key=${t}`;fetch(h).then(p=>p.json()).then(p=>{i(p.data)}).catch(p=>{console.log(p)})};S.useEffect(()=>{s("","trend")},[]);const l=S.useCallback(Ar(u=>{if(!u.target.value){s("","trend");return}s(u.target.value)},350),[]);return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:r}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:t?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"richtext-mb-[10px] richtext-w-full",children:c.jsx(Ie,{onChange:l,placeholder:"Search GIF",ref:a,type:"text"})}),c.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:c.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(u=>c.jsx("img",{alt:"giphy",className:"richtext-cursor-pointer richtext-text-center",height:u.images.fixed_width_downsampled.height,onClick:()=>e(u),src:u.images.fixed_width_downsampled.url,width:u.images.fixed_width_downsampled.width},`giphy-${u.id}`)):c.jsx("p",{children:"No GIFs found"})})})]}):c.jsx("div",{children:c.jsx("p",{children:"Missing Giphy API Key"})})})]})}function E1({editor:e,icon:t,giphyApiKey:r,...n}){const i=o=>{const{url:a}=o.images.original;e.chain().focus().setImageGif({src:a}).run()};return c.jsx(T1,{giphyApiKey:r,selectImage:i,children:c.jsx(F,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Br={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function I1(e){var k,M;const[t,r]=S.useState({width:H.IMAGE_MAX_SIZE,height:H.IMAGE_MAX_SIZE}),[n,i]=S.useState({width:0,height:0}),[o]=S.useState([Br.TOP_LEFT,Br.TOP_RIGHT,Br.BOTTOM_LEFT,Br.BOTTOM_RIGHT]),[a,s]=S.useState(!1),[l,u]=S.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f}=(k=e==null?void 0:e.node)==null?void 0:k.attrs,d=S.useMemo(()=>{var $;const{src:R,alt:j,width:L,height:O}=($=e==null?void 0:e.node)==null?void 0:$.attrs,N=Kr(L)?`${L}px`:L,D=Kr(O)?`${O}px`:O;return{src:R||void 0,alt:j||void 0,style:{width:N||void 0,height:D||void 0}}},[(M=e==null?void 0:e.node)==null?void 0:M.attrs]),h=S.useMemo(()=>{const{style:{width:R}}=d;return{width:R==="100%"?R:void 0}},[d]);function p(R){i({width:R.target.width,height:R.target.height})}function m(){const{editor:R,getPos:j}=e;R.commands.setNodeSelection(j())}const g=S.useCallback(Bt(()=>{const{editor:R}=e,{width:j}=getComputedStyle(R.view.dom);r(L=>({...L,width:Number.parseInt(j,10)}))},H.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function x(R,j){R.preventDefault(),R.stopPropagation();const L=n.width,O=n.height,N=L/O;let D=Number(e.node.attrs.width),$=Number(e.node.attrs.height);const W=t.width;D&&!$?(D=D>W?W:D,$=Math.round(D/N)):$&&!D?(D=Math.round($*N),D=D>W?W:D):!D&&!$?(D=L>W?W:L,$=Math.round(D/N)):D=D>W?W:D,s(!0),u({x:R.clientX,y:R.clientY,w:D,h:$,dir:j})}const y=S.useCallback(Bt(R=>{if(R.preventDefault(),R.stopPropagation(),!a)return;const{x:j,w:L,dir:O}=l,N=(R.clientX-j)*(/l/.test(O)?-1:1),D=ju(L+N,H.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:D,height:null})},H.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),w=S.useCallback(R=>{R.preventDefault(),R.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),m())},[a,m]),A=S.useCallback(()=>{document==null||document.addEventListener("mousemove",y,!0),document==null||document.addEventListener("mouseup",w,!0)},[y,w]),C=S.useCallback(()=>{document==null||document.removeEventListener("mousemove",y,!0),document==null||document.removeEventListener("mouseup",w,!0)},[y,w]);S.useEffect(()=>(a?A():C(),()=>{C()}),[a,A,C]);const T=S.useMemo(()=>new ResizeObserver(()=>g()),[g]);return S.useEffect(()=>(T.observe(e.editor.view.dom),()=>{T.disconnect()}),[e.editor.view.dom,T]),c.jsx(pe.NodeViewWrapper,{className:"image-view",style:{...h,width:"100%",textAlign:f},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:h,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:d.alt,className:"image-view__body__image block",height:"auto",onClick:m,onLoad:p,src:d.src,style:d.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(R=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${R}`,onMouseDown:j=>x(j,R)},`image-dir-${R}`))})]})})}const Da=_a.extend({name:"imageGif",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),inline:!1,content:"",marks:"",group:"block",GIPHY_API_KEY:"",draggable:!1,selectable:!0,atom:!0,button:({editor:t,extension:r,t:n})=>{var o;const i=((o=r==null?void 0:r.options)==null?void 0:o.GIPHY_API_KEY)||"";return{component:E1,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"GifIcon",tooltip:n("editor.imageGif.tooltip"),giphyApiKey:i}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})}}},addNodeView(){return pe.ReactNodeViewRenderer(I1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageGif:t=>({commands:r})=>r.insertContent({type:this.name,attrs:t}),updateImageGif:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImageGif:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{align:t}=e;return["div",{style:t?`text-align: ${t};`:"",class:"imageGIf"},["img",B.mergeAttributes({height:"auto"},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"div[class=imageGIf]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width");return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),title:t==null?void 0:t.getAttribute("title"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null}}}]}});function R1(e,t){let r;try{r=new URL(e)}catch{return!1}return!(t!=null&&t.length)||t.length===1&&t[0]==="."?!0:t.some(n=>{if(n.includes("*")){const i=n.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(r.hostname)}return r.hostname.includes(n)})}function O1(e){const{t}=H.useLocale(),[r,n]=S.useState(""),i=S.useRef(null),[o,a]=S.useState(""),[s,l]=S.useState(!1),u=m=>{l(m.detail)};S.useEffect(()=>{const m=xr(vt.UPLOAD_VIDEO(e.editor.id),u);return()=>{m()}},[]);const f=S.useMemo(()=>{var g;return(g=e.editor.extensionManager.extensions.find(x=>x.name===Ba.name))==null?void 0:g.options},[e.editor]);async function d(m){var w;const g=(w=m==null?void 0:m.target)==null?void 0:w.files;if(!e.editor||e.editor.isDestroyed||g.length===0)return;const x=g[0];let y="";f.upload?y=await f.upload(x):y=URL.createObjectURL(x),e.editor.chain().focus().setVideo({src:y,width:"100%"}).run(),l(!1)}function h(m){m.preventDefault(),m.stopPropagation(),r&&(e.editor.chain().focus().setVideo({src:r,width:"100%"}).run(),l(!1))}function p(m){var g;m.preventDefault(),(g=i.current)==null||g.click()}return c.jsxs(Cr,{onOpenChange:l,open:s,children:[c.jsx(jr,{asChild:!0,children:c.jsx(F,{action:()=>l(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.video.dialog.title")}),c.jsxs(yd,{activationMode:"manual",defaultValue:(f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload"?"upload":"link",children:[c.jsxs(Va,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload")&&c.jsx(yr,{value:"upload",children:t("editor.video.dialog.tab.upload")}),((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="link")&&c.jsx(yr,{value:"link",children:t("editor.video.dialog.link")})]}),c.jsxs(br,{value:"upload",children:[c.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:c.jsx(be,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.video.dialog.tab.upload")})}),c.jsx("input",{accept:"video/*",multiple:!0,onChange:d,ref:i,type:"file",style:{display:"none"}})]}),c.jsxs(br,{value:"link",children:[c.jsx("form",{onSubmit:h,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ie,{autoFocus:!0,placeholder:t("editor.video.dialog.placeholder"),required:!0,type:"url",value:r,onChange:m=>{n(m.target.value)},onBlur:m=>{const g=m.target.value,x=f.videoProviders||["."];g&&!R1(g,x)?a("Invalid video URL"):a("")}}),c.jsx(be,{type:"submit",children:t("editor.video.dialog.button.apply")})]})}),o&&c.jsx("div",{className:"richtext-my-[5px] richtext-text-red-500",children:o})]})]})]})]})}function P1(e,t,r){return e<t?t:e>r?r:e}const k1=e=>typeof e=="number",N1=e=>typeof e=="string",M1=e=>typeof e=="function";function L1(e,t="px"){if(!e)return e;const r=k1(e)?String(e):e,n=Number.parseFloat(r),i=r.match(/[%a-z]+$/i),o=i?i[0]:t;return Number.isNaN(n)?e:n+o}function hd(e,t){if(!e)return!1;const{extensions:r=[]}=(e==null?void 0:e.extensionManager)??{};return!!r.find(i=>i.name===t)}function $1(e){return e.map(t=>N1(t)?{value:t,name:t}:t)}function _1(e){e=e.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/");const t=e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);t&&(e=`https://www.youtube.com/embed/${t[1]}`);const r=e.match(/^https:\/\/vimeo\.com\/(\d+)(?:\/([a-zA-Z0-9]+))?/);if(r){const i=r[1],o=r[2];o?e=`https://player.vimeo.com/video/${i}?h=${o}`:e=`https://player.vimeo.com/video/${i}`}return/^https?:\/\/www.bilibili.com\/video\/.*/i.test(e)&&(e=e.replace(/\?.*$/,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),e.includes("drive.google.com")&&(e=e.replace("/view","/preview")),e}const Ba=B.Node.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,frameborder:!1,resourceVideo:"both",width:H.VIDEO_SIZE["size-medium"],HTMLAttributes:{class:"iframe-wrapper"},button:({editor:e,t})=>{var r,n;return{component:O1,componentProps:{action:()=>{},isActive:()=>e.isActive("video")||!1,disabled:!((n=(r=e.can()).setVideo)!=null&&n.call(r,{})),icon:"Video",tooltip:t("editor.video.tooltip"),videoProviders:["."],editor:e}}}}},addAttributes(){return{src:{default:null,renderHTML:({src:e})=>({src:e?_1(e):null})},width:{default:this.options.width,renderHTML:({width:e})=>({width:L1(e)})},frameborder:{default:this.options.frameborder?1:0,parseHTML:()=>this.options.frameborder?1:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},align:{default:"center",renderHTML:({align:e})=>({align:e})}}},parseHTML(){return[{tag:"div[data-video] iframe"}]},renderHTML({HTMLAttributes:e}){const{width:t="100%",align:r="center"}=e??{},n={...e,width:"100%",height:"100%"},i=`position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`,o=`flex: 1;padding-bottom: ${9/16*100}%;`,f=["div",{style:`display: flex; justify-content: ${r};`},["div",{style:i},["div",{style:o}],["iframe",n]]];return["div",{...this.options.HTMLAttributes,class:"iframe-wrapper","data-video":""},f]},addCommands(){return{setVideo:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateVideo:e=>({commands:t})=>t.updateAttributes(this.name,e)}}}),za={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function Ha({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(S.Fragment,{children:e.type==="divider"?c.jsx(De,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}):c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r})}):c.jsx(c.Fragment,{})}function D1(e){return e.type.name===Ht.name}function B1(e){return e.type.name===Da.name}function z1(e){return e.type.name===Ba.name}function H1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(D1(u))return l=!0,!1}),l},n=S.useMemo(()=>e.disabled?[]:Kx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-${o}`))})}):c.jsx(c.Fragment,{})})})}function q1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(B1(u))return l=!0,!1}),l},n=S.useMemo(()=>e.disabled?[]:Xx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-gif-${o}`))})}):c.jsx(c.Fragment,{})})})}function F1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(z1(u))return l=!0,!1}),l},n=S.useMemo(()=>e.disabled?[]:Zx(e.editor),[e.editor,e.disabled,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-video-${o}`))})}):c.jsx(c.Fragment,{})})})}function U1(e,t,r=null){return r?e.createChecked({index:t},r):e.createAndFill({index:t})}function W1(e){if(e.cached.columnsNodeTypes)return e.cached.columnsNodeTypes;const t={columns:e.nodes.columns,column:e.nodes.column};return e.cached.columnsNodeTypes=t,t}function G1(e,t,r=null){const n=W1(e),i=[];for(let o=0;o<t;o+=1){const a=U1(n.column,o,r);a&&i.push(a)}return n.columns.createChecked({cols:t},i)}function oi({state:e,dispatch:t,type:r}){const n=B.findParentNode(o=>o.type.name===vr.name)(e.selection),i=B.findParentNode(o=>o.type.name===qa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index,s=o.toJSON();let l=a;r==="delete"?(l=a-1,s.content.splice(a,1)):(l=r==="addBefore"?a:a+1,s.content.splice(l,0,{type:"column",attrs:{index:a},content:[{type:"paragraph"}]})),s.attrs.cols=s.content.length,s.content.forEach((h,p)=>{h.attrs.index=p});const u=B.Node$1.fromJSON(e.schema,s);let f=n.pos;u.content.forEach((h,p,m)=>{m<l&&(f+=h.nodeSize)});const d=e.tr.setTime(Date.now());d.replaceWith(n.pos,n.pos+n.node.nodeSize,u).setSelection(B.TextSelection.near(d.doc.resolve(f))),t(d)}return!0}function oc({state:e,dispatch:t,type:r}){const n=B.findParentNode(o=>o.type.name===vr.name)(e.selection),i=B.findParentNode(o=>o.type.name===qa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index;let s=0;r==="before"?s=(a-1+o.attrs.cols)%o.attrs.cols:s=(a+1)%o.attrs.cols;let l=n.pos;o.content.forEach((f,d,h)=>{h<s&&(l+=f.nodeSize)});const u=e.tr.setTime(Date.now());return u.setSelection(B.TextSelection.near(u.doc.resolve(l))),t(u),!0}return!1}const qa=B.Node.create({name:"column",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"column"}}},addAttributes(){return{index:{default:0,parseHTML:e=>e.getAttribute("index")}}},parseHTML(){return[{tag:"div[class=column]"}]},renderHTML({HTMLAttributes:e}){return["div",B.mergeAttributes(this.options.HTMLAttributes,e),0]}}),V1=B.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r})=>({component:F,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:r("editor.columns.tooltip")}})}}}),pd=200,vr=B.Node.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:pd,addOptions(){return{HTMLAttributes:{class:"columns"}}},addAttributes(){return{cols:{default:2,parseHTML:e=>e.getAttribute("cols")}}},parseHTML(){return[{tag:"div[class=grid]"}]},renderHTML({HTMLAttributes:e}){return["div",B.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{insertColumns:e=>({tr:t,dispatch:r,editor:n})=>{const i=G1(n.schema,e&&e.cols||3);if(r){const o=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(B.TextSelection.near(t.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"addBefore"}),addColAfter:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"addAfter"}),deleteCol:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>oc({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>oc({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}});function Fa(e,t){const{state:r}=t,n=r.selection.$anchor;let i=!1;if(n.depth)for(let o=n.depth;o>0;o--)n.node(o).type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(n.before(o),n.after(o)).scrollIntoView()),i=!0);else{const o=r.selection.node;o&&o.type.name===e&&(t.chain().deleteSelection().run(),i=!0)}if(!i){const o=n.pos;if(o){const a=r.tr.doc.nodeAt(o);a&&a.type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(o,o+a.nodeSize)),i=!0)}}return i}function K1({editor:e}){const{t}=H.useLocale(),r=S.useCallback(()=>e.isActive(vr.name),[e]),n=S.useCallback(()=>Fa(vr.name,e),[e]),i=S.useCallback(()=>e.chain().focus().addColBefore().run(),[e]),o=S.useCallback(()=>e.chain().focus().addColAfter().run(),[e]),a=S.useCallback(()=>e.chain().focus().deleteCol().run(),[e]);return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"columns-bubble-menu",shouldShow:r,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(F,{action:i,icon:"ColumnAddLeft",tooltip:t("editor.table.menu.insertColumnBefore")}),c.jsx(F,{action:o,icon:"ColumnAddRight",tooltip:t("editor.table.menu.insertColumnAfter")}),c.jsx(F,{action:a,icon:"DeleteColumn",tooltip:t("editor.table.menu.deleteColumn")}),c.jsx(F,{action:n,icon:"Trash2",tooltip:t("editor.table.menu.delete_column")})]})})}const md=fe.Root,gd=fe.Trigger,ac=fe.Portal,sc=fe.Sub,ha=ne.forwardRef(({className:e,inset:t,children:r,...n},i)=>c.jsxs(fe.SubTrigger,{ref:i,className:ee("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",t&&"richtext-pl-8",e),...n,children:[r,c.jsx(P.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));ha.displayName=fe.SubTrigger.displayName;const pa=ne.forwardRef(({className:e,...t},r)=>c.jsx(fe.SubContent,{ref:r,className:ee("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg 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",e),...t}));pa.displayName=fe.SubContent.displayName;const Ua=ne.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(fe.Portal,{children:c.jsx(fe.Content,{ref:n,sideOffset:t,className:ee("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 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",e),...r})}));Ua.displayName=fe.Content.displayName;const Be=ne.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Item,{ref:n,className:ee("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t&&"richtext-pl-8",e),...r}));Be.displayName=fe.Item.displayName;const xd=ne.forwardRef(({className:e,children:t,checked:r,...n},i)=>c.jsxs(fe.CheckboxItem,{ref:i,className:ee("richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(P.Check,{className:"richtext-h-4 richtext-w-4"})})}),t]}));xd.displayName=fe.CheckboxItem.displayName;const X1=ne.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fe.RadioItem,{ref:n,className:ee("richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...r,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(P.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),t]}));X1.displayName=fe.RadioItem.displayName;const Y1=ne.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Label,{ref:n,className:ee("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",t&&"richtext-pl-8",e),...r}));Y1.displayName=fe.Label.displayName;const Wa=ne.forwardRef(({className:e,...t},r)=>c.jsx(fe.Separator,{ref:r,className:ee("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));Wa.displayName=fe.Separator.displayName;function vd({className:e,...t}){return c.jsx("span",{className:ee("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",e),...t})}vd.displayName="DropdownMenuShortcut";const Ie=ne.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:ee("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background 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 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),ref:n,...r}));Ie.displayName="Input";const J1=Rn("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),tt=ne.forwardRef(({className:e,...t},r)=>c.jsx(nu.Root,{ref:r,className:ee(J1(),e),...t}));tt.displayName=nu.Root.displayName;const Wt=dr.Root,Gt=dr.Trigger,It=ne.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>c.jsx(dr.Portal,{children:c.jsx(dr.Content,{ref:i,align:t,sideOffset:r,className:ee("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",e),...n})}));It.displayName=dr.Content.displayName;const De=ne.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>c.jsx(tu.Root,{ref:i,decorative:r,orientation:t,className:ee("richtext-shrink-0 richtext-bg-border",t==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",e),...n}));De.displayName=tu.Root.displayName;const Ga=ne.forwardRef(({className:e,...t},r)=>c.jsx(Go.Root,{className:ee("richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",e),...t,ref:r,children:c.jsx(Go.Thumb,{className:ee("richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0")})}));Ga.displayName=Go.Root.displayName;const yd=jt.Root,Va=ne.forwardRef(({className:e,...t},r)=>c.jsx(jt.List,{ref:r,className:ee("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",e),...t}));Va.displayName=jt.List.displayName;const yr=ne.forwardRef(({className:e,...t},r)=>c.jsx(jt.Trigger,{ref:r,className:ee("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",e),...t}));yr.displayName=jt.Trigger.displayName;const br=ne.forwardRef(({className:e,...t},r)=>c.jsx(jt.Content,{ref:r,className:ee("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2",e),...t}));br.displayName=jt.Content.displayName;const Z1=Re.Provider,bd=ne.forwardRef(({className:e,...t},r)=>c.jsx(Re.Viewport,{ref:r,className:ee("richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",e),...t}));bd.displayName=Re.Viewport.displayName;const Q1=Rn("richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",{variants:{variant:{default:"richtext-border richtext-bg-background richtext-text-foreground",destructive:"richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),wd=ne.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(Re.Root,{ref:n,className:ee(Q1({variant:t}),e),...r}));wd.displayName=Re.Root.displayName;const ev=ne.forwardRef(({className:e,...t},r)=>c.jsx(Re.Action,{ref:r,className:ee("richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",e),...t}));ev.displayName=Re.Action.displayName;const Sd=ne.forwardRef(({className:e,...t},r)=>c.jsx(Re.Close,{ref:r,className:ee("richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(P.X,{className:"richtext-h-4 richtext-w-4"})}));Sd.displayName=Re.Close.displayName;const Ad=ne.forwardRef(({className:e,...t},r)=>c.jsx(Re.Title,{ref:r,className:ee("richtext-text-sm richtext-font-semibold",e),...t}));Ad.displayName=Re.Title.displayName;const Cd=ne.forwardRef(({className:e,...t},r)=>c.jsx(Re.Description,{ref:r,className:ee("richtext-text-sm richtext-opacity-90",e),...t}));Cd.displayName=Re.Description.displayName;const tv=Rn("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-2 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"}}),Ka=ne.forwardRef(({className:e,variant:t,size:r,...n},i)=>c.jsx(ru.Root,{ref:i,className:ee(tv({variant:t,size:r,className:e})),...n}));Ka.displayName=ru.Root.displayName;const rv=Sr.Provider,Xa=Sr.Root,Ya=Sr.Trigger,kn=ne.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Sr.Content,{ref:n,sideOffset:t,className:ee("richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-popover-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",e),...r}));kn.displayName=Sr.Content.displayName;const nv=1,iv=1e6;let ai=0;function ov(){return ai=(ai+1)%Number.MAX_SAFE_INTEGER,ai.toString()}const si=new Map;function cc(e){if(si.has(e))return;const t=setTimeout(()=>{si.delete(e),ur({type:"REMOVE_TOAST",toastId:e})},iv);si.set(e,t)}function av(e,t){switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,nv)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?cc(r):e.toasts.forEach(n=>{cc(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}}const Ur=[];let Wr={toasts:[]};function ur(e){Wr=av(Wr,e),Ur.forEach(t=>{t(Wr)})}function sv({...e}){const t=ov(),r=i=>ur({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>ur({type:"DISMISS_TOAST",toastId:t});return ur({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function jd(){const[e,t]=ne.useState(Wr);return ne.useEffect(()=>(Ur.push(t),()=>{const r=Ur.indexOf(t);r>-1&&Ur.splice(r,1)}),[e]),{...e,toast:sv,dismiss:r=>ur({type:"DISMISS_TOAST",toastId:r})}}const Td=ne.forwardRef(({className:e,...t},r)=>c.jsx(Wo.Root,{ref:r,className:ee("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",e),...t,children:c.jsx(Wo.Indicator,{className:ee("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:c.jsx(P.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));Td.displayName=Wo.Root.displayName;const cv={padding:"0 12px 12px"},Ed=({width:e,maxWidth:t,height:r,onOk:n,children:i})=>{const{t:o}=H.useLocale(),[a,s]=S.useState({width:"",height:"",maxWidth:""});S.useEffect(()=>{s({width:e,height:r,maxWidth:t})},[r,t,e]);function l(u){u.preventDefault(),u.stopPropagation(),n(a)}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:i}),c.jsx(It,{children:c.jsx("div",{style:cv,children:c.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[c.jsx(tt,{className:"mb-[6px]",children:"Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.width,required:!0,onChange:u=>s({...a,width:u.target.value})})})}),c.jsx(tt,{className:"mb-[6px]",children:"Max Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.maxWidth,required:!0,onChange:u=>s({...a,maxWidth:u.target.value})})})}),c.jsx(tt,{className:"mb-[6px]",children:"Height"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.height,required:!0,onChange:u=>s({...a,height:u.target.value})})})}),c.jsx(be,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})},Vt={youtube:{example:"https://www.youtube.com/watch?v=I4sMhHbHYXM",src:"https://www.youtube.com/embed/I4sMhHbHYXM",srcPrefix:"https://www.youtube.com/embed",linkRule:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\s/]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[&?]v=)|youtu\.be\/)([\w-]{11})/]},youku:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html?spm=a2h0c.8166622.PhoneSokuUgc_4.dtitle",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"https://player.youku.com/embed",linkRule:[String.raw`v.youku.com\/v_show\/id_\w+\=*`],idRule:String.raw`id_\w+\=*`},bilibili:{example:"https://www.bilibili.com/video/BV1EJ411u7DN",src:"https://player.bilibili.com/player.html?bvid=BV1EJ411u7DN",srcPrefix:"https://player.bilibili.com/player.html?bvid",linkRule:[String.raw`www.bilibili.com\/video\/\w+`]},qqvideo:{example:"https://v.qq.com/x/cover/mzc0020006aw1mn/u0033nvzb5v.html",src:"https://v.qq.com/txp/iframe/player.html?vid=u0033nvzb5v",srcPrefix:"https://v.qq.com/txp/iframe/player.html?vid",linkRule:[String.raw`v.qq.com\/x\/cover\/\w+\/\w+`]},amap:{example:"https://ditu.amap.com/",src:"https://www.amap.com/place/B000A45467",srcPrefix:"",linkRule:[String.raw`\.amap\.com`]},baidu_map:{example:"https://j.map.baidu.com/15/fo",src:"https://j.map.baidu.com/15/fo",srcPrefix:"",linkRule:[String.raw`map\.baidu\.com`]},modao:{example:"https://free.modao.cc/app/2cd26580a6717a147454df7470e7ec464093cba3/embed/v2#screen=sk71k6d1dfxulzx",src:"https://free.modao.cc/app/6UkpAxcGE3nPz52GLqhnOZgC7MATBSy/embed/v2",srcPrefix:"",linkRule:[String.raw`https:\/\/\w+.modao.cc\/app\/\w+\/embed\/v2`],tips:"Modao > More > Share > Embed > COPY"},lanhu:{example:"https://lanhuapp.com/link/#/invite?sid=evP7L",src:"https://lanhuapp.com/url/evP7L",srcPrefix:"",linkRule:[String.raw`https:\/\/lanhuapp.com\/url\/\w+`],tips:"Lanhu > Project > Share > Copy Link"},figma:{example:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",src:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",srcPrefix:"https://www.figma.com/embed?embed_host=share&url",linkRule:[String.raw`https:\/\/www.figma.com\/file\/\w+`]},canva:{example:"https://www.canva.cn/design/DAD61-t29UI/view",src:"https://www.canva.cn/design/DAD61-t29UI/view",srcPrefix:"",linkRule:[String.raw`https:\/\/www.canva.cn\/design\/.+\/view`]},processon:{example:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",src:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",srcPrefix:"",linkRule:[String.raw`https:\/\/www.processon.com\/embed\/\w+`]},codepen:{example:"https://codepen.io/mekery/embed/YzyrKOJ",src:"https://codepen.io/mekery/embed/YzyrKOJ",srcPrefix:"",linkRule:[String.raw`https:\/\/codepen.io\/.+\/embed\/\w+`]},jinshuju:{example:"https://jinshuju.net/f/q9YvVf",src:"https://jinshuju.net/f/q9YvVf",srcPrefix:"",linkRule:[String.raw`https:\/\/jinshuju.net\/f\/\w+`]},iframe:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"",linkRule:[".+"]},googlemaps:{example:"https://goo.gl/maps/8Ys8b4K1ZJY2",src:"https://www.google.com/maps/embed?pb=https://goo.gl/maps/8Ys8b4K1ZJY2",srcPrefix:"",linkRule:[String.raw`https:\/\/goo.gl\/maps\/\w+`]}};function lv(e){const t=Vt.youtube,r=e.matchedUrl;e.validLink=!0;const n=r.split("="),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}/${o}`,e.validId=!0}return e}function uv(e){const t=Vt.youku,r=e.matchedUrl,n=t.idRule,i=new RegExp(n),o=r.match(i);if(o&&o.length>0){const a=o[0].slice(3);e.validId=!0,e.src=`${t.srcPrefix}/${a}`}else e.validId=!1;return e}function dv(e){const t=Vt.bilibili,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function fv(e){const t=Vt.qqvideo,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function hv(e,t){return t.src=e,t.validId=!0,t}function pv(e,t){return t.src=e,t.validId=!0,t}function mv(e,t){return t.src=e,t.validId=!0,t.originalLink=e,t}function gv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function xv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function vv(e){const t=Vt.figma;return e.src=`${t.srcPrefix}=${encodeURIComponent(e.matchedUrl)}`,e.validId=!0,e.originalLink=e.matchedUrl,e}function yv(e,t){return t.src=`${t.matchedUrl}?embed`,t.validId=!0,t.originalLink=e,t}function bv(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function wv(e){return e.src=`${e.matchedUrl}`,e.validId=!0,e.originalLink=e.src,e}function Sv(e,t){return t.src=`${t.matchedUrl}?background=white&banner=show&embedded=true`,t.validId=!0,t.originalLink=e,t}function Av(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function Cv(e,t,r){if(e==="googlemaps")return r.validLink=!0,r.matchedUrl=t,r;const i=Vt[e].linkRule;for(const o of i){const a=new RegExp(o),s=t.match(a);if(s&&s.length>0)return r.validLink=!0,r.matchedUrl=e==="youtube"?s[1]:s[0],r}return r}function jv(e){var r,n;let t="iframe";return((r=e.includes)!=null&&r.call(e,"youtube")||(n=e.includes)!=null&&n.call(e,"youtu.be"))&&(t="youtube"),e.includes("youku")&&(t="youku"),e.includes("bilibili")&&(t="bilibili"),e.includes("qq")&&(t="qqvideo"),e.includes("amap")&&(t="amap"),e.includes("map.baidu")&&(t="baidu_map"),(e.includes("google.com/maps")||e.includes("maps.app.goo.gl"))&&(t="googlemaps"),e.includes("modao")&&(t="modao"),e.includes("lanhuapp")&&(t="lanhu"),e.includes("figma")&&(t="figma"),e.includes("canva")&&(t="canva"),e.includes("processon")&&(t="processon"),e.includes("codepen")&&(t="codepen"),e.includes("jinshuju")&&(t="jinshuju"),e.includes("iframe")&&(t="iframe"),t}function Id(e){let t={validLink:!1,validId:!1,matchedUrl:"",originalLink:e,src:""};const r=jv(e);if(t=Cv(r,e,t),!t.validLink)return t;switch(r){case"youtube":return lv(t);case"youku":return uv(t);case"bilibili":return dv(t);case"qqvideo":return fv(t);case"amap":return hv(e,t);case"baidu_map":return pv(e,t);case"googlemaps":return mv(e,t);case"modao":return gv(t);case"lanhu":return xv(t);case"figma":return vv(t);case"canva":return yv(e,t);case"processon":return bv(e,t);case"codepen":return wv(t);case"jinshuju":return Sv(e,t);case"iframe":return Av(e,t);default:return e}}function Rd(){const[e]=ud(t=>t.value);return e}const Tv={setDisable:(e,t)=>{Pn(vt.EDIT(e),t)}},Ev="_wrap_5y04w_1",Iv="_innerWrap_5y04w_15",lc={wrap:Ev,innerWrap:Iv};function Rv({editor:e,node:t,updateAttributes:r}){const n=Rd(),{src:i,width:o,height:a}=t.attrs,[s,l]=S.useState("");function u(){if(!s)return;const d=Id(s);e.chain().updateAttributes(St.name,{src:(d==null?void 0:d.src)||s}).setNodeSelection(e.state.selection.from).focus().run()}const f=S.useCallback(d=>{r({width:d.width,height:d.height})},[r]);return c.jsxs(pe.NodeViewWrapper,{children:[!i&&c.jsxs("div",{className:"richtext-mx-auto richtext-my-[12px] richtext-flex richtext-max-w-[600px] richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-rounded-[12px] richtext-border richtext-border-solid richtext-border-[#ccc] richtext-p-[10px]",children:[c.jsx(Ie,{autoFocus:!0,className:"richtext-flex-1",onInput:d=>l(d.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsx(be,{className:"richtext-w-[60px]",onClick:u,children:"OK"})]}),i&&c.jsx(wf.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(a)},onResizeStop:(d,h,p,m)=>{f({width:Number.parseInt(o)+m.width,height:Number.parseInt(a)+m.height})},children:c.jsx("div",{className:pe.clsx(lc.wrap,"render-wrapper"),children:c.jsx("div",{className:lc.innerWrap,style:{pointerEvents:n?"none":"auto"},children:c.jsx("iframe",{className:"richtext-my-[12px] ",src:i})})})})]})}const St=B.Node.create({name:"iframe",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"iframe"},button:({editor:t,extension:r,t:n})=>({component:F,componentProps:{action:i=>t.commands.setIframe(i),upload:r.options.upload,disabled:!t.can().setIframe({}),icon:"Iframe",tooltip:n("editor.iframe.tooltip")}})}},addAttributes(){return{width:{default:600,parseHTML:pe.getDatasetAttribute("width")},height:{default:300,parseHTML:pe.getDatasetAttribute("height")},src:{default:null,parseHTML:pe.getDatasetAttribute("src")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",B.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:r,chain:n})=>{var o,a,s;if(((s=(a=(o=t.selection)==null?void 0:o.node)==null?void 0:a.type)==null?void 0:s.name)==this.name)return r.updateAttributes(this.name,e);const i=e||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[B.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return pe.ReactNodeViewRenderer(Rv)}});var wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Od(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ci,uc;function kd(){if(uc)return ci;uc=1;var e=Object.prototype.toString;return ci=function(r){var n=e.call(r),i=n==="[object Arguments]";return i||(i=n!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&e.call(r.callee)==="[object Function]"),i},ci}var li,dc;function Ov(){if(dc)return li;dc=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=kd(),i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(h){var p=h.constructor;return p&&p.prototype===h},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!u["$"+h]&&t.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{l(window[h])}catch{return!0}}catch{return!0}return!1}(),d=function(h){if(typeof window>"u"||!f)return l(h);try{return l(h)}catch{return!1}};e=function(p){var m=p!==null&&typeof p=="object",g=r.call(p)==="[object Function]",x=n(p),y=m&&r.call(p)==="[object String]",w=[];if(!m&&!g&&!x)throw new TypeError("Object.keys called on a non-object");var A=a&&g;if(y&&p.length>0&&!t.call(p,0))for(var C=0;C<p.length;++C)w.push(String(C));if(x&&p.length>0)for(var T=0;T<p.length;++T)w.push(String(T));else for(var k in p)!(A&&k==="prototype")&&t.call(p,k)&&w.push(String(k));if(o)for(var M=d(p),R=0;R<s.length;++R)!(M&&s[R]==="constructor")&&t.call(p,s[R])&&w.push(s[R]);return w}}return li=e,li}var ui,fc;function Ja(){if(fc)return ui;fc=1;var e=Array.prototype.slice,t=kd(),r=Object.keys,n=r?function(a){return r(a)}:Ov(),i=Object.keys;return n.shim=function(){if(Object.keys){var a=function(){var s=Object.keys(arguments);return s&&s.length===arguments.length}(1,2);a||(Object.keys=function(l){return t(l)?i(e.call(l)):i(l)})}else Object.keys=n;return Object.keys||n},ui=n,ui}var di,hc;function Nn(){if(hc)return di;hc=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return di=e,di}var fi,pc;function Za(){return pc||(pc=1,fi=SyntaxError),fi}var hi,mc;function Me(){return mc||(mc=1,hi=TypeError),hi}var pi,gc;function Pv(){return gc||(gc=1,pi=Object.getOwnPropertyDescriptor),pi}var mi,xc;function Rt(){if(xc)return mi;xc=1;var e=Pv();if(e)try{e([],"length")}catch{e=null}return mi=e,mi}var gi,vc;function Qa(){if(vc)return gi;vc=1;var e=Nn(),t=Za(),r=Me(),n=Rt();return gi=function(o,a,s){if(!o||typeof o!="object"&&typeof o!="function")throw new r("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!n&&n(o,a);if(e)e(o,a,{configurable:f===null&&h?h.configurable:!f,enumerable:l===null&&h?h.enumerable:!l,value:s,writable:u===null&&h?h.writable:!u});else if(d||!l&&!u&&!f)o[a]=s;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},gi}var xi,yc;function es(){if(yc)return xi;yc=1;var e=Nn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},xi=t,xi}var vi,bc;function Ot(){if(bc)return vi;bc=1;var e=Ja(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,i=Qa(),o=function(u){return typeof u=="function"&&r.call(u)==="[object Function]"},a=es()(),s=function(u,f,d,h){if(f in u){if(h===!0){if(u[f]===d)return}else if(!o(h)||!h())return}a?i(u,f,d,!0):i(u,f,d)},l=function(u,f){var d=arguments.length>2?arguments[2]:{},h=e(f);t&&(h=n.call(h,Object.getOwnPropertySymbols(f)));for(var p=0;p<h.length;p+=1)s(u,h[p],f[h[p]],d[h[p]])};return l.supportsDescriptors=!!a,vi=l,vi}var yi={exports:{}},bi,wc;function ts(){return wc||(wc=1,bi=Object),bi}var wi,Sc;function Nd(){return Sc||(Sc=1,wi=Error),wi}var Si,Ac;function kv(){return Ac||(Ac=1,Si=EvalError),Si}var Ai,Cc;function Nv(){return Cc||(Cc=1,Ai=RangeError),Ai}var Ci,jc;function Mv(){return jc||(jc=1,Ci=ReferenceError),Ci}var ji,Tc;function Lv(){return Tc||(Tc=1,ji=URIError),ji}var Ti,Ec;function $v(){return Ec||(Ec=1,Ti=Math.abs),Ti}var Ei,Ic;function _v(){return Ic||(Ic=1,Ei=Math.floor),Ei}var Ii,Rc;function Dv(){return Rc||(Rc=1,Ii=Math.max),Ii}var Ri,Oc;function Bv(){return Oc||(Oc=1,Ri=Math.min),Ri}var Oi,Pc;function zv(){return Pc||(Pc=1,Oi=Math.pow),Oi}var Pi,kc;function Hv(){return kc||(kc=1,Pi=Math.round),Pi}var ki,Nc;function qv(){return Nc||(Nc=1,ki=Number.isNaN||function(t){return t!==t}),ki}var Ni,Mc;function Fv(){if(Mc)return Ni;Mc=1;var e=qv();return Ni=function(r){return e(r)||r===0?r:r<0?-1:1},Ni}var Mi,Lc;function Mn(){return Lc||(Lc=1,Mi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),Mi}var Li,$c;function rs(){if($c)return Li;$c=1;var e=typeof Symbol<"u"&&Symbol,t=Mn();return Li=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Li}var $i,_c;function Md(){return _c||(_c=1,$i=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),$i}var _i,Dc;function Ld(){if(Dc)return _i;Dc=1;var e=ts();return _i=e.getPrototypeOf||null,_i}var Di,Bc;function Uv(){if(Bc)return Di;Bc=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(l,u){for(var f=[],d=0;d<l.length;d+=1)f[d]=l[d];for(var h=0;h<u.length;h+=1)f[h+l.length]=u[h];return f},o=function(l,u){for(var f=[],d=u,h=0;d<l.length;d+=1,h+=1)f[h]=l[d];return f},a=function(s,l){for(var u="",f=0;f<s.length;f+=1)u+=s[f],f+1<s.length&&(u+=l);return u};return Di=function(l){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var f=o(arguments,1),d,h=function(){if(this instanceof d){var y=u.apply(this,i(f,arguments));return Object(y)===y?y:this}return u.apply(l,i(f,arguments))},p=r(0,u.length-f.length),m=[],g=0;g<p;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var x=function(){};x.prototype=u.prototype,d.prototype=new x,x.prototype=null}return d},Di}var Bi,zc;function Tr(){if(zc)return Bi;zc=1;var e=Uv();return Bi=Function.prototype.bind||e,Bi}var zi,Hc;function ns(){return Hc||(Hc=1,zi=Function.prototype.call),zi}var Hi,qc;function is(){return qc||(qc=1,Hi=Function.prototype.apply),Hi}var qi,Fc;function Wv(){return Fc||(Fc=1,qi=typeof Reflect<"u"&&Reflect&&Reflect.apply),qi}var Fi,Uc;function $d(){if(Uc)return Fi;Uc=1;var e=Tr(),t=is(),r=ns(),n=Wv();return Fi=n||e.call(r,t),Fi}var Ui,Wc;function os(){if(Wc)return Ui;Wc=1;var e=Tr(),t=Me(),r=ns(),n=$d();return Ui=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return n(e,r,o)},Ui}var Wi,Gc;function Gv(){if(Gc)return Wi;Gc=1;var e=os(),t=Rt(),r;try{r=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Wi=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(s){return o(s==null?s:i(s))}:!1,Wi}var Gi,Vc;function _d(){if(Vc)return Gi;Vc=1;var e=Md(),t=Ld(),r=Gv();return Gi=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:r?function(i){return r(i)}:null,Gi}var Vi,Kc;function as(){if(Kc)return Vi;Kc=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Tr();return Vi=r.call(e,t),Vi}var Ki,Xc;function ot(){if(Xc)return Ki;Xc=1;var e,t=ts(),r=Nd(),n=kv(),i=Nv(),o=Mv(),a=Za(),s=Me(),l=Lv(),u=$v(),f=_v(),d=Dv(),h=Bv(),p=zv(),m=Hv(),g=Fv(),x=Function,y=function(te){try{return x('"use strict"; return ('+te+").constructor;")()}catch{}},w=Rt(),A=Nn(),C=function(){throw new s},T=w?function(){try{return arguments.callee,C}catch{try{return w(arguments,"callee").get}catch{return C}}}():C,k=rs()(),M=_d(),R=Ld(),j=Md(),L=is(),O=ns(),N={},D=typeof Uint8Array>"u"||!M?e:M(Uint8Array),$={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":k&&M?M([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&M?M(M([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!M?e:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!M?e:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&M?M(""[Symbol.iterator]()):e,"%Symbol%":k?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":D,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":L,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":R,"%Math.abs%":u,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":j};if(M)try{null.error}catch(te){var W=M(M(te));$["%Error.prototype%"]=W}var Q=function te(q){var U;if(q==="%AsyncFunction%")U=y("async function () {}");else if(q==="%GeneratorFunction%")U=y("function* () {}");else if(q==="%AsyncGeneratorFunction%")U=y("async function* () {}");else if(q==="%AsyncGenerator%"){var z=te("%AsyncGeneratorFunction%");z&&(U=z.prototype)}else if(q==="%AsyncIteratorPrototype%"){var X=te("%AsyncGenerator%");X&&M&&(U=M(X.prototype))}return $[q]=U,U},ae={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},oe=Tr(),re=as(),we=oe.call(O,Array.prototype.concat),ge=oe.call(L,Array.prototype.splice),at=oe.call(O,String.prototype.replace),Le=oe.call(O,String.prototype.slice),E=oe.call(O,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,G=function(q){var U=Le(q,0,1),z=Le(q,-1);if(U==="%"&&z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&U!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var X=[];return at(q,_,function(me,xe,ve,Se){X[X.length]=ve?at(Se,V,"$1"):xe||me}),X},Z=function(q,U){var z=q,X;if(re(ae,z)&&(X=ae[z],z="%"+X[0]+"%"),re($,z)){var me=$[z];if(me===N&&(me=Q(z)),typeof me>"u"&&!U)throw new s("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:X,name:z,value:me}}throw new a("intrinsic "+q+" does not exist!")};return Ki=function(q,U){if(typeof q!="string"||q.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof U!="boolean")throw new s('"allowMissing" argument must be a boolean');if(E(/^%?[^%]*%?$/,q)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=G(q),X=z.length>0?z[0]:"",me=Z("%"+X+"%",U),xe=me.name,ve=me.value,Se=!1,Ce=me.alias;Ce&&(X=Ce[0],ge(z,we([0,1],Ce)));for(var Ge=1,$e=!0;Ge<z.length;Ge+=1){var je=z[Ge],Ve=Le(je,0,1),Ke=Le(je,-1);if((Ve==='"'||Ve==="'"||Ve==="`"||Ke==='"'||Ke==="'"||Ke==="`")&&Ve!==Ke)throw new a("property names with quotes must have matching quotes");if((je==="constructor"||!$e)&&(Se=!0),X+="."+je,xe="%"+X+"%",re($,xe))ve=$[xe];else if(ve!=null){if(!(je in ve)){if(!U)throw new s("base intrinsic for "+q+" exists, but the property is not available.");return}if(w&&Ge+1>=z.length){var Xe=w(ve,je);$e=!!Xe,$e&&"get"in Xe&&!("originalValue"in Xe.get)?ve=Xe.get:ve=ve[je]}else $e=re(ve,je),ve=ve[je];$e&&!Se&&($[xe]=ve)}}return ve},Ki}var Xi,Yc;function Vv(){if(Yc)return Xi;Yc=1;var e=ot(),t=Qa(),r=es()(),n=Rt(),i=Me(),o=e("%Math.floor%");return Xi=function(s,l){if(typeof s!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||o(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in s&&n){var h=n(s,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!u)&&(r?t(s,"length",l,!0,!0):t(s,"length",l)),s},Xi}var Yi,Jc;function Kv(){if(Jc)return Yi;Jc=1;var e=Tr(),t=is(),r=$d();return Yi=function(){return r(e,t,arguments)},Yi}var Zc;function Kt(){return Zc||(Zc=1,function(e){var t=Vv(),r=Nn(),n=os(),i=Kv();e.exports=function(a){var s=n(arguments),l=a.length-(arguments.length-1);return t(s,1+(l>0?l:0),!0)},r?r(e.exports,"apply",{value:i}):e.exports.apply=i}(yi)),yi.exports}var Ji,Qc;function Ae(){if(Qc)return Ji;Qc=1;var e=ot(),t=os(),r=t([e("%String.prototype.indexOf%")]);return Ji=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t([a]):a},Ji}var Zi,el;function Dd(){if(el)return Zi;el=1;var e=Ja(),t=Mn()(),r=Ae(),n=ts(),i=r("Array.prototype.push"),o=r("Object.prototype.propertyIsEnumerable"),a=t?n.getOwnPropertySymbols:null;return Zi=function(l,u){if(l==null)throw new TypeError("target must be an object");var f=n(l);if(arguments.length===1)return f;for(var d=1;d<arguments.length;++d){var h=n(arguments[d]),p=e(h),m=t&&(n.getOwnPropertySymbols||a);if(m)for(var g=m(h),x=0;x<g.length;++x){var y=g[x];o(h,y)&&i(p,y)}for(var w=0;w<p.length;++w){var A=p[w];if(o(h,A)){var C=h[A];f[A]=C}}}return f},Zi}var Qi,tl;function Bd(){if(tl)return Qi;tl=1;var e=Dd(),t=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",i=n.split(""),o={},a=0;a<i.length;++a)o[i[a]]=i[a];var s=Object.assign({},o),l="";for(var u in s)l+=u;return n!==l},r=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1};return Qi=function(){return!Object.assign||t()||r()?e:Object.assign},Qi}var eo,rl;function Xv(){if(rl)return eo;rl=1;var e=Ot(),t=Bd();return eo=function(){var n=t();return e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},eo}var to,nl;function Yv(){if(nl)return to;nl=1;var e=Ot(),t=Kt(),r=Dd(),n=Bd(),i=Xv(),o=t.apply(n()),a=function(l,u){return o(Object,arguments)};return e(a,{getPolyfill:n,implementation:r,shim:i}),to=a,to}var ro,il;function zd(){if(il)return ro;il=1;var e=ot(),t=Kt(),r=t(e("String.prototype.indexOf"));return ro=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t(a):a},ro}var no,ol;function Jv(){if(ol)return no;ol=1;var e=function(){return typeof(function(){}).name=="string"},t=Object.getOwnPropertyDescriptor;if(t)try{t([],"length")}catch{t=null}e.functionsHaveConfigurableNames=function(){if(!e()||!t)return!1;var i=t(function(){},"name");return!!i&&!!i.configurable};var r=Function.prototype.bind;return e.boundFunctionsHaveNames=function(){return e()&&typeof r=="function"&&(function(){}).bind().name!==""},no=e,no}var io,al;function Zv(){if(al)return io;al=1;var e=Qa(),t=es()(),r=Jv().functionsHaveConfigurableNames(),n=Me();return io=function(o,a){if(typeof o!="function")throw new n("`fn` is not a function");var s=arguments.length>2&&!!arguments[2];return(!s||r)&&(t?e(o,"name",a,!0,!0):e(o,"name",a)),o},io}var oo,sl;function Hd(){if(sl)return oo;sl=1;var e=Zv(),t=Me(),r=Object;return oo=e(function(){if(this==null||this!==r(this))throw new t("RegExp.prototype.flags getter called on non-object");var i="";return this.hasIndices&&(i+="d"),this.global&&(i+="g"),this.ignoreCase&&(i+="i"),this.multiline&&(i+="m"),this.dotAll&&(i+="s"),this.unicode&&(i+="u"),this.unicodeSets&&(i+="v"),this.sticky&&(i+="y"),i},"get flags",!0),oo}var ao,cl;function qd(){if(cl)return ao;cl=1;var e=Hd(),t=Ot().supportsDescriptors,r=Object.getOwnPropertyDescriptor;return ao=function(){if(t&&/a/mig.flags==="gim"){var i=r(RegExp.prototype,"flags");if(i&&typeof i.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var o="",a={};if(Object.defineProperty(a,"hasIndices",{get:function(){o+="d"}}),Object.defineProperty(a,"sticky",{get:function(){o+="y"}}),i.get.call(a),o==="dy")return i.get}}return e},ao}var so,ll;function Qv(){if(ll)return so;ll=1;var e=Ot().supportsDescriptors,t=qd(),r=Rt(),n=Object.defineProperty,i=Nd(),o=_d(),a=/a/;return so=function(){if(!e||!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=t(),u=o(a),f=r(u,"flags");return(!f||f.get!==l)&&n(u,"flags",{configurable:!0,enumerable:!1,get:l}),l},so}var co,ul;function ey(){if(ul)return co;ul=1;var e=Ot(),t=Kt(),r=Hd(),n=qd(),i=Qv(),o=t(n());return e(o,{getPolyfill:n,implementation:r,shim:i}),co=o,co}var tr={exports:{}},lo,dl;function Pt(){if(dl)return lo;dl=1;var e=Mn();return lo=function(){return e()&&!!Symbol.toStringTag},lo}var uo,fl;function Fd(){if(fl)return uo;fl=1;var e=Pt()(),t=Ae(),r=t("Object.prototype.toString"),n=function(s){return e&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:r(s)==="[object Arguments]"},i=function(s){return n(s)?!0:s!==null&&typeof s=="object"&&"length"in s&&typeof s.length=="number"&&s.length>=0&&r(s)!=="[object Array]"&&"callee"in s&&r(s.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,uo=o?n:i,uo}const ty={},ry=Object.freeze(Object.defineProperty({__proto__:null,default:ty},Symbol.toStringTag,{value:"Module"})),ny=Pd(ry);var fo,hl;function Ln(){if(hl)return fo;hl=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=i&&o&&typeof o.get=="function"?o.get:null,s=i&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,d=f?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,x=Function.prototype.toString,y=String.prototype.match,w=String.prototype.slice,A=String.prototype.replace,C=String.prototype.toUpperCase,T=String.prototype.toLowerCase,k=RegExp.prototype.test,M=Array.prototype.concat,R=Array.prototype.join,j=Array.prototype.slice,L=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||!0)?Symbol.toStringTag:null,Q=Object.prototype.propertyIsEnumerable,ae=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(v){return v.__proto__}:null);function oe(v,b){if(v===1/0||v===-1/0||v!==v||v&&v>-1e3&&v<1e3||k.call(/e/,b))return b;var ie=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof v=="number"){var se=v<0?-L(-v):L(v);if(se!==v){var ce=String(se),J=w.call(b,ce.length+1);return A.call(ce,ie,"$&_")+"."+A.call(A.call(J,/([0-9]{3})/g,"$&_"),/_$/,"")}}return A.call(b,ie,"$&_")}var re=ny,we=re.custom,ge=me(we)?we:null,at={__proto__:null,double:'"',single:"'"},Le={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};fo=function v(b,ie,se,ce){var J=ie||{};if(Se(J,"quoteStyle")&&!Se(at,J.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(J,"maxStringLength")&&(typeof J.maxStringLength=="number"?J.maxStringLength<0&&J.maxStringLength!==1/0:J.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var lt=Se(J,"customInspect")?J.customInspect:!0;if(typeof lt!="boolean"&&lt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(J,"indent")&&J.indent!==null&&J.indent!==" "&&!(parseInt(J.indent,10)===J.indent&&J.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(J,"numericSeparator")&&typeof J.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bt=J.numericSeparator;if(typeof b>"u")return"undefined";if(b===null)return"null";if(typeof b=="boolean")return b?"true":"false";if(typeof b=="string")return kt(b,J);if(typeof b=="number"){if(b===0)return 1/0/b>0?"0":"-0";var Ee=String(b);return bt?oe(b,Ee):Ee}if(typeof b=="bigint"){var ut=String(b)+"n";return bt?oe(b,ut):ut}var Dn=typeof J.depth>"u"?5:J.depth;if(typeof se>"u"&&(se=0),se>=Dn&&Dn>0&&typeof b=="object")return G(b)?"[Array]":"[Object]";var Nt=lf(J,se);if(typeof ce>"u")ce=[];else if($e(ce,b)>=0)return"[Circular]";function _e(Mt,Or,df){if(Or&&(ce=j.call(ce),ce.push(Or)),df){var gs={depth:J.depth};return Se(J,"quoteStyle")&&(gs.quoteStyle=J.quoteStyle),v(Mt,gs,se+1,ce)}return v(Mt,J,se+1,ce)}if(typeof b=="function"&&!te(b)){var ls=Ge(b),us=Ir(b,_e);return"[Function"+(ls?": "+ls:" (anonymous)")+"]"+(us.length>0?" { "+R.call(us,", ")+" }":"")}if(me(b)){var ds=$?A.call(String(b),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(b);return typeof b=="object"&&!$?ct(ds):ds}if(st(b)){for(var Yt="<"+T.call(String(b.nodeName)),Bn=b.attributes||[],Rr=0;Rr<Bn.length;Rr++)Yt+=" "+Bn[Rr].name+"="+E(_(Bn[Rr].value),"double",J);return Yt+=">",b.childNodes&&b.childNodes.length&&(Yt+="..."),Yt+="</"+T.call(String(b.nodeName))+">",Yt}if(G(b)){if(b.length===0)return"[]";var zn=Ir(b,_e);return Nt&&!cf(zn)?"["+_n(zn,Nt)+"]":"[ "+R.call(zn,", ")+" ]"}if(q(b)){var Hn=Ir(b,_e);return!("cause"in Error.prototype)&&"cause"in b&&!Q.call(b,"cause")?"{ ["+String(b)+"] "+R.call(M.call("[cause]: "+_e(b.cause),Hn),", ")+" }":Hn.length===0?"["+String(b)+"]":"{ ["+String(b)+"] "+R.call(Hn,", ")+" }"}if(typeof b=="object"&&lt){if(ge&&typeof b[ge]=="function"&&re)return re(b,{depth:Dn-se});if(lt!=="symbol"&&typeof b.inspect=="function")return b.inspect()}if(je(b)){var fs=[];return n&&n.call(b,function(Mt,Or){fs.push(_e(Or,b,!0)+" => "+_e(Mt,b))}),cs("Map",r.call(b),fs,Nt)}if(Xe(b)){var hs=[];return s&&s.call(b,function(Mt){hs.push(_e(Mt,b))}),cs("Set",a.call(b),hs,Nt)}if(Ve(b))return $n("WeakMap");if(Er(b))return $n("WeakSet");if(Ke(b))return $n("WeakRef");if(z(b))return ct(_e(Number(b)));if(xe(b))return ct(_e(O.call(b)));if(X(b))return ct(m.call(b));if(U(b))return ct(_e(String(b)));if(typeof window<"u"&&b===window)return"{ [object Window] }";if(typeof globalThis<"u"&&b===globalThis||typeof wr<"u"&&b===wr)return"{ [object globalThis] }";if(!Z(b)&&!te(b)){var qn=Ir(b,_e),ps=ae?ae(b)===Object.prototype:b instanceof Object||b.constructor===Object,Fn=b instanceof Object?"":"null prototype",ms=!ps&&W&&Object(b)===b&&W in b?w.call(Ce(b),8,-1):Fn?"Object":"",uf=ps||typeof b.constructor!="function"?"":b.constructor.name?b.constructor.name+" ":"",Un=uf+(ms||Fn?"["+R.call(M.call([],ms||[],Fn||[]),": ")+"] ":"");return qn.length===0?Un+"{}":Nt?Un+"{"+_n(qn,Nt)+"}":Un+"{ "+R.call(qn,", ")+" }"}return String(b)};function E(v,b,ie){var se=ie.quoteStyle||b,ce=at[se];return ce+v+ce}function _(v){return A.call(String(v),/"/g,"&quot;")}function V(v){return!W||!(typeof v=="object"&&(W in v||typeof v[W]<"u"))}function G(v){return Ce(v)==="[object Array]"&&V(v)}function Z(v){return Ce(v)==="[object Date]"&&V(v)}function te(v){return Ce(v)==="[object RegExp]"&&V(v)}function q(v){return Ce(v)==="[object Error]"&&V(v)}function U(v){return Ce(v)==="[object String]"&&V(v)}function z(v){return Ce(v)==="[object Number]"&&V(v)}function X(v){return Ce(v)==="[object Boolean]"&&V(v)}function me(v){if($)return v&&typeof v=="object"&&v instanceof Symbol;if(typeof v=="symbol")return!0;if(!v||typeof v!="object"||!D)return!1;try{return D.call(v),!0}catch{}return!1}function xe(v){if(!v||typeof v!="object"||!O)return!1;try{return O.call(v),!0}catch{}return!1}var ve=Object.prototype.hasOwnProperty||function(v){return v in this};function Se(v,b){return ve.call(v,b)}function Ce(v){return g.call(v)}function Ge(v){if(v.name)return v.name;var b=y.call(x.call(v),/^function\s*([\w$]+)/);return b?b[1]:null}function $e(v,b){if(v.indexOf)return v.indexOf(b);for(var ie=0,se=v.length;ie<se;ie++)if(v[ie]===b)return ie;return-1}function je(v){if(!r||!v||typeof v!="object")return!1;try{r.call(v);try{a.call(v)}catch{return!0}return v instanceof Map}catch{}return!1}function Ve(v){if(!u||!v||typeof v!="object")return!1;try{u.call(v,u);try{d.call(v,d)}catch{return!0}return v instanceof WeakMap}catch{}return!1}function Ke(v){if(!p||!v||typeof v!="object")return!1;try{return p.call(v),!0}catch{}return!1}function Xe(v){if(!a||!v||typeof v!="object")return!1;try{a.call(v);try{r.call(v)}catch{return!0}return v instanceof Set}catch{}return!1}function Er(v){if(!d||!v||typeof v!="object")return!1;try{d.call(v,d);try{u.call(v,u)}catch{return!0}return v instanceof WeakSet}catch{}return!1}function st(v){return!v||typeof v!="object"?!1:typeof HTMLElement<"u"&&v instanceof HTMLElement?!0:typeof v.nodeName=="string"&&typeof v.getAttribute=="function"}function kt(v,b){if(v.length>b.maxStringLength){var ie=v.length-b.maxStringLength,se="... "+ie+" more character"+(ie>1?"s":"");return kt(w.call(v,0,b.maxStringLength),b)+se}var ce=Le[b.quoteStyle||"single"];ce.lastIndex=0;var J=A.call(A.call(v,ce,"\\$1"),/[\x00-\x1f]/g,Xt);return E(J,"single",b)}function Xt(v){var b=v.charCodeAt(0),ie={8:"b",9:"t",10:"n",12:"f",13:"r"}[b];return ie?"\\"+ie:"\\x"+(b<16?"0":"")+C.call(b.toString(16))}function ct(v){return"Object("+v+")"}function $n(v){return v+" { ? }"}function cs(v,b,ie,se){var ce=se?_n(ie,se):R.call(ie,", ");return v+" ("+b+") {"+ce+"}"}function cf(v){for(var b=0;b<v.length;b++)if($e(v[b],`
6
- `)>=0)return!1;return!0}function lf(v,b){var ie;if(v.indent===" ")ie=" ";else if(typeof v.indent=="number"&&v.indent>0)ie=R.call(Array(v.indent+1)," ");else return null;return{base:ie,prev:R.call(Array(b+1),ie)}}function _n(v,b){if(v.length===0)return"";var ie=`
7
- `+b.prev+b.base;return ie+R.call(v,","+ie)+`
8
- `+b.prev}function Ir(v,b){var ie=G(v),se=[];if(ie){se.length=v.length;for(var ce=0;ce<v.length;ce++)se[ce]=Se(v,ce)?b(v[ce],v):""}var J=typeof N=="function"?N(v):[],lt;if($){lt={};for(var bt=0;bt<J.length;bt++)lt["$"+J[bt]]=J[bt]}for(var Ee in v)Se(v,Ee)&&(ie&&String(Number(Ee))===Ee&&Ee<v.length||$&&lt["$"+Ee]instanceof Symbol||(k.call(/[^\w$]/,Ee)?se.push(b(Ee,v)+": "+b(v[Ee],v)):se.push(Ee+": "+b(v[Ee],v))));if(typeof N=="function")for(var ut=0;ut<J.length;ut++)Q.call(v,J[ut])&&se.push("["+b(J[ut])+"]: "+b(v[J[ut]],v));return se}return fo}var ho,pl;function iy(){if(pl)return ho;pl=1;var e=Ln(),t=Me(),r=function(s,l,u){for(var f=s,d;(d=f.next)!=null;f=d)if(d.key===l)return f.next=d.next,u||(d.next=s.next,s.next=d),d},n=function(s,l){if(s){var u=r(s,l);return u&&u.value}},i=function(s,l,u){var f=r(s,l);f?f.value=u:s.next={key:l,next:s.next,value:u}},o=function(s,l){return s?!!r(s,l):!1},a=function(s,l){if(s)return r(s,l,!0)};return ho=function(){var l,u={assert:function(f){if(!u.has(f))throw new t("Side channel does not contain "+e(f))},delete:function(f){var d=l&&l.next,h=a(l,f);return h&&d&&d===h&&(l=void 0),!!h},get:function(f){return n(l,f)},has:function(f){return o(l,f)},set:function(f,d){l||(l={next:void 0}),i(l,f,d)}};return u},ho}var po,ml;function Ud(){if(ml)return po;ml=1;var e=ot(),t=Ae(),r=Ln(),n=Me(),i=e("%Map%",!0),o=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return po=!!i&&function(){var d,h={assert:function(p){if(!h.has(p))throw new n("Side channel does not contain "+r(p))},delete:function(p){if(d){var m=l(d,p);return u(d)===0&&(d=void 0),m}return!1},get:function(p){if(d)return o(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,m){d||(d=new i),a(d,p,m)}};return h},po}var mo,gl;function oy(){if(gl)return mo;gl=1;var e=ot(),t=Ae(),r=Ln(),n=Ud(),i=Me(),o=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return mo=o?function(){var d,h,p={assert:function(m){if(!p.has(m))throw new i("Side channel does not contain "+r(m))},delete:function(m){if(o&&m&&(typeof m=="object"||typeof m=="function")){if(d)return u(d,m)}else if(n&&h)return h.delete(m);return!1},get:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):h&&h.get(m)},has:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!h&&h.has(m)},set:function(m,g){o&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new o),s(d,m,g)):n&&(h||(h=n()),h.set(m,g))}};return p}:n,mo}var go,xl;function Wd(){if(xl)return go;xl=1;var e=Me(),t=Ln(),r=iy(),n=Ud(),i=oy(),o=i||n||r;return go=function(){var s,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,f){s||(s=o()),s.set(u,f)}};return l},go}var xo,vl;function ay(){if(vl)return xo;vl=1;var e=as(),t=Wd()(),r=Me(),n={assert:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");if(t.assert(i),!n.has(i,o))throw new r("`"+o+"` is not present on `O`")},get:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return a&&a["$"+o]},has:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return!!a&&e(a,"$"+o)},set:function(i,o,a){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var s=t.get(i);s||(s={},t.set(i,s)),s["$"+o]=a}};return Object.freeze&&Object.freeze(n),xo=n,xo}var vo,yl;function sy(){if(yl)return vo;yl=1;var e=ay(),t=Za(),r=typeof StopIteration=="object"?StopIteration:null;return vo=function(i){if(!r)throw new t("this environment lacks StopIteration");e.set(i,"[[Done]]",!1);var o={next:function(){var s=e.get(this,"[[Iterator]]"),l=!!e.get(s,"[[Done]]");try{return{done:l,value:l?void 0:s.next()}}catch(u){if(e.set(s,"[[Done]]",!0),u!==r)throw u;return{done:!0,value:void 0}}}};return e.set(o,"[[Iterator]]",i),o},vo}var yo,bl;function Gd(){if(bl)return yo;bl=1;var e={}.toString;return yo=Array.isArray||function(t){return e.call(t)=="[object Array]"},yo}var bo,wl;function Vd(){if(wl)return bo;wl=1;var e=Ae(),t=e("String.prototype.valueOf"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object String]",o=Pt()();return bo=function(s){return typeof s=="string"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},bo}var wo,Sl;function Kd(){if(Sl)return wo;Sl=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;e||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),wo=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a),i)try{i.call(a)}catch{return!0}return a instanceof e}catch{}return!1},wo}var So,Al;function Xd(){if(Al)return So;Al=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;t||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!i&&(r=function(a){return!1}),So=r||function(a){if(!a||typeof a!="object")return!1;try{if(i.call(a),n)try{n.call(a)}catch{return!0}return a instanceof t}catch{}return!1},So}var Cl;function cy(){if(Cl)return tr.exports;Cl=1;var e=Fd(),t=sy();if(rs()()||Mn()()){var r=Symbol.iterator;tr.exports=function(j){if(j!=null&&typeof j[r]<"u")return j[r]();if(e(j))return Array.prototype[r].call(j)}}else{var n=Gd(),i=Vd(),o=ot(),a=o("%Map%",!0),s=o("%Set%",!0),l=zd(),u=l("Array.prototype.push"),f=l("String.prototype.charCodeAt"),d=l("String.prototype.slice"),h=function(j,L){var O=j.length;if(L+1>=O)return L+1;var N=f(j,L);if(N<55296||N>56319)return L+1;var D=f(j,L+1);return D<56320||D>57343?L+1:L+2},p=function(j){var L=0;return{next:function(){var N=L>=j.length,D;return N||(D=j[L],L+=1),{done:N,value:D}}}},m=function(j,L){if(n(j)||e(j))return p(j);if(i(j)){var O=0;return{next:function(){var D=h(j,O),$=d(j,O,D);return O=D,{done:D>j.length,value:$}}}}if(L&&typeof j["_es6-shim iterator_"]<"u")return j["_es6-shim iterator_"]()};if(!a&&!s)tr.exports=function(j){if(j!=null)return m(j,!0)};else{var g=Kd(),x=Xd(),y=l("Map.prototype.forEach",!0),w=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var A=l("Map.prototype.iterator",!0),C=l("Set.prototype.iterator",!0);var T=l("Map.prototype.@@iterator",!0)||l("Map.prototype._es6-shim iterator_",!0),k=l("Set.prototype.@@iterator",!0)||l("Set.prototype._es6-shim iterator_",!0),M=function(j){if(g(j)){if(A)return t(A(j));if(T)return T(j);if(y){var L=[];return y(j,function(N,D){u(L,[D,N])}),p(L)}}if(x(j)){if(C)return t(C(j));if(k)return k(j);if(w){var O=[];return w(j,function(N){u(O,N)}),p(O)}}};tr.exports=function(j){return M(j)||m(j)}}}return tr.exports}var Ao,jl;function Yd(){if(jl)return Ao;jl=1;var e=function(t){return t!==t};return Ao=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},Ao}var Co,Tl;function Jd(){if(Tl)return Co;Tl=1;var e=Yd();return Co=function(){return typeof Object.is=="function"?Object.is:e},Co}var jo,El;function ly(){if(El)return jo;El=1;var e=Jd(),t=Ot();return jo=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},jo}var To,Il;function uy(){if(Il)return To;Il=1;var e=Ot(),t=Kt(),r=Yd(),n=Jd(),i=ly(),o=t(n(),Object);return e(o,{getPolyfill:n,implementation:r,shim:i}),To=o,To}var Eo,Rl;function Zd(){if(Rl)return Eo;Rl=1;var e=Kt(),t=Ae(),r=ot(),n=r("%ArrayBuffer%",!0),i=t("ArrayBuffer.prototype.byteLength",!0),o=t("Object.prototype.toString"),a=!!n&&!i&&new n(0).slice,s=!!a&&e(a);return Eo=i||s?function(u){if(!u||typeof u!="object")return!1;try{return i?i(u):s(u,0),!0}catch{return!1}}:n?function(u){return o(u)==="[object ArrayBuffer]"}:function(u){return!1},Eo}var Io,Ol;function dy(){if(Ol)return Io;Ol=1;var e=Ae(),t=e("Date.prototype.getDay"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Date]",o=Pt()();return Io=function(s){return typeof s!="object"||s===null?!1:o?r(s):n(s)===i},Io}var Ro,Pl;function Qd(){if(Pl)return Ro;Pl=1;var e=Ae(),t=Pt()(),r=as(),n=Rt(),i;if(t){var o=e("RegExp.prototype.exec"),a={},s=function(){throw a},l={toString:s,valueOf:s};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=s),i=function(h){if(!h||typeof h!="object")return!1;var p=n(h,"lastIndex"),m=p&&r(p,"value");if(!m)return!1;try{o(h,l)}catch(g){return g===a}}}else{var u=e("Object.prototype.toString"),f="[object RegExp]";i=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:u(h)===f}}return Ro=i,Ro}var Oo,kl;function fy(){if(kl)return Oo;kl=1;var e=Ae(),t=e("SharedArrayBuffer.prototype.byteLength",!0);return Oo=t?function(n){if(!n||typeof n!="object")return!1;try{return t(n),!0}catch{return!1}}:function(n){return!1},Oo}var Po,Nl;function hy(){if(Nl)return Po;Nl=1;var e=Ae(),t=e("Number.prototype.toString"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Number]",o=Pt()();return Po=function(s){return typeof s=="number"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},Po}var ko,Ml;function py(){if(Ml)return ko;Ml=1;var e=Ae(),t=e("Boolean.prototype.toString"),r=e("Object.prototype.toString"),n=function(s){try{return t(s),!0}catch{return!1}},i="[object Boolean]",o=Pt()();return ko=function(s){return typeof s=="boolean"?!0:s===null||typeof s!="object"?!1:o?n(s):r(s)===i},ko}var zr={exports:{}},No,Ll;function my(){if(Ll)return No;Ll=1;var e=Ae(),t=Qd(),r=e("RegExp.prototype.exec"),n=Me();return No=function(o){if(!t(o))throw new n("`regex` must be a RegExp");return function(s){return r(o,s)!==null}},No}var $l;function gy(){if($l)return zr.exports;$l=1;var e=Ae(),t=e("Object.prototype.toString"),r=rs()(),n=my();if(r){var i=e("Symbol.prototype.toString"),o=n(/^Symbol\(.*\)$/),a=function(l){return typeof l.valueOf()!="symbol"?!1:o(i(l))};zr.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||t(l)!=="[object Symbol]")return!1;try{return a(l)}catch{return!1}}}else zr.exports=function(l){return!1};return zr.exports}var Hr={exports:{}},Mo,_l;function xy(){if(_l)return Mo;_l=1;var e=typeof BigInt<"u"&&BigInt;return Mo=function(){return typeof e=="function"&&typeof BigInt=="function"&&typeof e(42)=="bigint"&&typeof BigInt(42)=="bigint"},Mo}var Dl;function vy(){if(Dl)return Hr.exports;Dl=1;var e=xy()();if(e){var t=BigInt.prototype.valueOf,r=function(i){try{return t.call(i),!0}catch{}return!1};Hr.exports=function(i){return i===null||typeof i>"u"||typeof i=="boolean"||typeof i=="string"||typeof i=="number"||typeof i=="symbol"||typeof i=="function"?!1:typeof i=="bigint"?!0:r(i)}}else Hr.exports=function(i){return!1};return Hr.exports}var Lo,Bl;function yy(){if(Bl)return Lo;Bl=1;var e=Vd(),t=hy(),r=py(),n=gy(),i=vy();return Lo=function(a){if(a==null||typeof a!="object"&&typeof a!="function")return null;if(e(a))return"String";if(t(a))return"Number";if(r(a))return"Boolean";if(n(a))return"Symbol";if(i(a))return"BigInt"},Lo}var $o,zl;function by(){if(zl)return $o;zl=1;var e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,t=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,r;e||(r=function(a){return!1});var n=e?e.prototype.has:null,i=t?t.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),$o=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a,n),i)try{i.call(a,i)}catch{return!0}return a instanceof e}catch{}return!1},$o}var qr={exports:{}},Hl;function wy(){if(Hl)return qr.exports;Hl=1;var e=ot(),t=Ae(),r=e("%WeakSet%",!0),n=t("WeakSet.prototype.has",!0);if(n){var i=t("WeakMap.prototype.has",!0);qr.exports=function(a){if(!a||typeof a!="object")return!1;try{if(n(a,n),i)try{i(a,i)}catch{return!0}return a instanceof r}catch{}return!1}}else qr.exports=function(a){return!1};return qr.exports}var _o,ql;function Sy(){if(ql)return _o;ql=1;var e=Kd(),t=Xd(),r=by(),n=wy();return _o=function(o){if(o&&typeof o=="object"){if(e(o))return"Map";if(t(o))return"Set";if(r(o))return"WeakMap";if(n(o))return"WeakSet"}return!1},_o}var Do,Fl;function Ay(){if(Fl)return Do;Fl=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(w){w!==n&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(A){try{var C=e.call(A);return i.test(C)}catch{return!1}},a=function(A){try{return o(A)?!1:(e.call(A),!0)}catch{return!1}},s=Object.prototype.toString,l="[object Object]",u="[object Function]",f="[object GeneratorFunction]",d="[object HTMLAllCollection]",h="[object HTML document.all class]",p="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var y=document.all;s.call(y)===s.call(document.all)&&(x=function(A){if((g||!A)&&(typeof A>"u"||typeof A=="object"))try{var C=s.call(A);return(C===d||C===h||C===p||C===l)&&A("")==null}catch{}return!1})}return Do=t?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{t(A,null,r)}catch(C){if(C!==n)return!1}return!o(A)&&a(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(m)return a(A);if(o(A))return!1;var C=s.call(A);return C!==u&&C!==f&&!/^\[object HTML/.test(C)?!1:a(A)},Do}var Bo,Ul;function Cy(){if(Ul)return Bo;Ul=1;var e=Ay(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(l,u,f){for(var d=0,h=l.length;d<h;d++)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))},i=function(l,u,f){for(var d=0,h=l.length;d<h;d++)f==null?u(l.charAt(d),d,l):u.call(f,l.charAt(d),d,l)},o=function(l,u,f){for(var d in l)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))};function a(s){return t.call(s)==="[object Array]"}return Bo=function(l,u,f){if(!e(u))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=f),a(l)?n(l,u,d):typeof l=="string"?i(l,u,d):o(l,u,d)},Bo}var zo,Wl;function jy(){return Wl||(Wl=1,zo=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),zo}var Ho,Gl;function Ty(){if(Gl)return Ho;Gl=1;var e=jy(),t=typeof globalThis>"u"?wr:globalThis;return Ho=function(){for(var n=[],i=0;i<e.length;i++)typeof t[e[i]]=="function"&&(n[n.length]=e[i]);return n},Ho}var qo,Vl;function Ey(){if(Vl)return qo;Vl=1;var e=Cy(),t=Ty(),r=Kt(),n=Ae(),i=Rt(),o=n("Object.prototype.toString"),a=Pt()(),s=typeof globalThis>"u"?wr:globalThis,l=t(),u=n("String.prototype.slice"),f=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(x,y){for(var w=0;w<x.length;w+=1)if(x[w]===y)return w;return-1},h={__proto__:null};a&&i&&f?e(l,function(g){var x=new s[g];if(Symbol.toStringTag in x){var y=f(x),w=i(y,Symbol.toStringTag);if(!w){var A=f(y);w=i(A,Symbol.toStringTag)}h["$"+g]=r(w.get)}}):e(l,function(g){var x=new s[g],y=x.slice||x.set;y&&(h["$"+g]=r(y))});var p=function(x){var y=!1;return e(h,function(w,A){if(!y)try{"$"+w(x)===A&&(y=u(A,1))}catch{}}),y},m=function(x){var y=!1;return e(h,function(w,A){if(!y)try{w(x),y=u(A,1)}catch{}}),y};return qo=function(x){if(!x||typeof x!="object")return!1;if(!a){var y=u(o(x),8,-1);return d(l,y)>-1?y:y!=="Object"?!1:m(x)}return i?p(x):null},qo}var Fo,Kl;function Iy(){if(Kl)return Fo;Kl=1;var e=Ae(),t=e("ArrayBuffer.prototype.byteLength",!0),r=Zd();return Fo=function(i){return r(i)?t?t(i):i.byteLength:NaN},Fo}var Uo,Xl;function Ry(){if(Xl)return Uo;Xl=1;var e=Yv(),t=zd(),r=ey(),n=ot(),i=cy(),o=Wd(),a=uy(),s=Fd(),l=Gd(),u=Zd(),f=dy(),d=Qd(),h=fy(),p=Ja(),m=yy(),g=Sy(),x=Ey(),y=Iy(),w=t("SharedArrayBuffer.prototype.byteLength",!0),A=t("Date.prototype.getTime"),C=Object.getPrototypeOf,T=t("Object.prototype.toString"),k=n("%Set%",!0),M=t("Map.prototype.has",!0),R=t("Map.prototype.get",!0),j=t("Map.prototype.size",!0),L=t("Set.prototype.add",!0),O=t("Set.prototype.delete",!0),N=t("Set.prototype.has",!0),D=t("Set.prototype.size",!0);function $(E,_,V,G){for(var Z=i(E),te;(te=Z.next())&&!te.done;)if(re(_,te.value,V,G))return O(E,te.value),!0;return!1}function W(E){if(typeof E>"u")return null;if(typeof E!="object")return typeof E=="symbol"?!1:typeof E=="string"||typeof E=="number"?+E==+E:!0}function Q(E,_,V,G,Z,te){var q=W(V);if(q!=null)return q;var U=R(_,q),z=e({},Z,{strict:!1});return typeof U>"u"&&!M(_,q)||!re(G,U,z,te)?!1:!M(E,q)&&re(G,U,z,te)}function ae(E,_,V){var G=W(V);return G??(N(_,G)&&!N(E,G))}function oe(E,_,V,G,Z,te){for(var q=i(E),U,z;(U=q.next())&&!U.done;)if(z=U.value,re(V,z,Z,te)&&re(G,R(_,z),Z,te))return O(E,z),!0;return!1}function re(E,_,V,G){var Z=V||{};if(Z.strict?a(E,_):E===_)return!0;var te=m(E),q=m(_);if(te!==q)return!1;if(!E||!_||typeof E!="object"&&typeof _!="object")return Z.strict?a(E,_):E==_;var U=G.has(E),z=G.has(_),X;if(U&&z){if(G.get(E)===G.get(_))return!0}else X={};return U||G.set(E,X),z||G.set(_,X),Le(E,_,Z,G)}function we(E){return!E||typeof E!="object"||typeof E.length!="number"||typeof E.copy!="function"||typeof E.slice!="function"||E.length>0&&typeof E[0]!="number"?!1:!!(E.constructor&&E.constructor.isBuffer&&E.constructor.isBuffer(E))}function ge(E,_,V,G){if(D(E)!==D(_))return!1;for(var Z=i(E),te=i(_),q,U,z;(q=Z.next())&&!q.done;)if(q.value&&typeof q.value=="object")z||(z=new k),L(z,q.value);else if(!N(_,q.value)){if(V.strict||!ae(E,_,q.value))return!1;z||(z=new k),L(z,q.value)}if(z){for(;(U=te.next())&&!U.done;)if(U.value&&typeof U.value=="object"){if(!$(z,U.value,V.strict,G))return!1}else if(!V.strict&&!N(E,U.value)&&!$(z,U.value,V.strict,G))return!1;return D(z)===0}return!0}function at(E,_,V,G){if(j(E)!==j(_))return!1;for(var Z=i(E),te=i(_),q,U,z,X,me,xe;(q=Z.next())&&!q.done;)if(X=q.value[0],me=q.value[1],X&&typeof X=="object")z||(z=new k),L(z,X);else if(xe=R(_,X),typeof xe>"u"&&!M(_,X)||!re(me,xe,V,G)){if(V.strict||!Q(E,_,X,me,V,G))return!1;z||(z=new k),L(z,X)}if(z){for(;(U=te.next())&&!U.done;)if(X=U.value[0],xe=U.value[1],X&&typeof X=="object"){if(!oe(z,E,X,xe,V,G))return!1}else if(!V.strict&&(!E.has(X)||!re(R(E,X),xe,V,G))&&!oe(z,E,X,xe,e({},V,{strict:!1}),G))return!1;return D(z)===0}return!0}function Le(E,_,V,G){var Z,te;if(typeof E!=typeof _||E==null||_==null||T(E)!==T(_)||s(E)!==s(_))return!1;var q=l(E),U=l(_);if(q!==U)return!1;var z=E instanceof Error,X=_ instanceof Error;if(z!==X||(z||X)&&(E.name!==_.name||E.message!==_.message))return!1;var me=d(E),xe=d(_);if(me!==xe||(me||xe)&&(E.source!==_.source||r(E)!==r(_)))return!1;var ve=f(E),Se=f(_);if(ve!==Se||(ve||Se)&&A(E)!==A(_)||V.strict&&C&&C(E)!==C(_))return!1;var Ce=x(E),Ge=x(_);if(Ce!==Ge)return!1;if(Ce||Ge){if(E.length!==_.length)return!1;for(Z=0;Z<E.length;Z++)if(E[Z]!==_[Z])return!1;return!0}var $e=we(E),je=we(_);if($e!==je)return!1;if($e||je){if(E.length!==_.length)return!1;for(Z=0;Z<E.length;Z++)if(E[Z]!==_[Z])return!1;return!0}var Ve=u(E),Ke=u(_);if(Ve!==Ke)return!1;if(Ve||Ke)return y(E)!==y(_)?!1:typeof Uint8Array=="function"&&re(new Uint8Array(E),new Uint8Array(_),V,G);var Xe=h(E),Er=h(_);if(Xe!==Er)return!1;if(Xe||Er)return w(E)!==w(_)?!1:typeof Uint8Array=="function"&&re(new Uint8Array(E),new Uint8Array(_),V,G);if(typeof E!=typeof _)return!1;var st=p(E),kt=p(_);if(st.length!==kt.length)return!1;for(st.sort(),kt.sort(),Z=st.length-1;Z>=0;Z--)if(st[Z]!=kt[Z])return!1;for(Z=st.length-1;Z>=0;Z--)if(te=st[Z],!re(E[te],_[te],V,G))return!1;var Xt=g(E),ct=g(_);return Xt!==ct?!1:Xt==="Set"||ct==="Set"?ge(E,_,V,G):Xt==="Map"?at(E,_,V,G):!0}return Uo=function(_,V,G){return re(_,V,G,o())},Uo}var Oy=Ry();const ef=Od(Oy);function Py(e){return e}function tf(e,t,r,n){const i=Py,[o,a]=S.useState(i(r)),s=S.useRef(o);return S.useEffect(()=>{const l=()=>{const u={...r,...e.getAttributes(t)};Object.keys(u).forEach(d=>{(u[d]===null||u[d]===void 0)&&(u[d]=r?r[d]:null)});const f=i(u);ef(s.current,f)||(a(f),s.current=f)};return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e,r,t,i]),o}function ky({editor:e}){const{t}=H.useLocale(),{width:r,height:n,src:i}=tf(e,St.name,{width:0,height:0,src:"",defaultShowPicker:!1}),[o,a]=S.useState(!1),[s,l]=S.useState(""),u=S.useCallback(()=>{a(!1)},[a]);S.useEffect(()=>{o&&l(i)},[o,i]);const f=S.useCallback(()=>{const x=Id(s);e.chain().updateAttributes(St.name,{src:(x==null?void 0:x.src)||s}).setNodeSelection(e.state.selection.from).focus().run(),a(!1)},[e,s,a]),d=S.useCallback(()=>{window.open(i,"_blank")},[i]),h=S.useCallback(()=>{a(!0)},[a]),p=S.useCallback(x=>{e.chain().updateAttributes(St.name,x).setNodeSelection(e.state.selection.from).focus().run()},[e]),m=S.useCallback(()=>e.isActive(St.name)&&!i,[e,i]),g=S.useCallback(()=>Fa(St.name,e),[e]);return c.jsxs(c.Fragment,{children:[c.jsx(pe.BubbleMenu,{className:"bubble-menu",editor:e,pluginKey:"iframe-bubble-menu",shouldShow:m,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(F,{action:d,icon:"Eye",tooltip:"Visit Link"}),c.jsx(F,{action:h,icon:"Pencil",tooltip:"Open Edit Link"}),c.jsx(Ed,{height:n,onOk:p,width:r,children:c.jsx(F,{icon:"Settings",tooltip:t("editor.settings")})}),c.jsx(F,{action:g,icon:"Trash2",tooltip:t("editor.delete")})]})}),c.jsxs(Cr,{onOpenChange:a,open:o,children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(cd,{children:c.jsx(Ut,{children:"Edit Link Iframe"})}),c.jsx(Ie,{autoFocus:!0,onInput:x=>l(x.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsxs(In,{children:[c.jsx(be,{onClick:u,children:"Cancel"}),c.jsx(be,{onClick:f,children:"OK"})]})]})]})]})}function Ny({editor:e,disabled:t,bubbleMenu:r}){const n=e.extensionManager.extensions.map(o=>o.name),i=()=>{var o,a,s,l,u,f,d,h,p,m;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?c.jsx(K1,{editor:e},"columns"):null,n.includes("table")&&!((a=r==null?void 0:r.tableConfig)!=null&&a.hidden)?c.jsx(k0,{actions:(s=r==null?void 0:r.tableConfig)==null?void 0:s.actions,editor:e},"table"):null,n.includes("link")&&!((l=r==null?void 0:r.linkConfig)!=null&&l.hidden)?c.jsx(i1,{disabled:t,editor:e},"link"):null,n.includes(Ht.name)&&!((u=r==null?void 0:r.imageConfig)!=null&&u.hidden)?c.jsx(H1,{disabled:t,editor:e},"image"):null,n.includes(Da.name)&&!((f=r==null?void 0:r.imageGifConfig)!=null&&f.hidden)?c.jsx(q1,{disabled:t,editor:e},"imageGif"):null,n.includes("video")&&!((d=r==null?void 0:r.videoConfig)!=null&&d.hidden)?c.jsx(F1,{disabled:t,editor:e},"video"):null,n.includes("iframe")&&!((h=r==null?void 0:r.iframeConfig)!=null&&h.hidden)?c.jsx(ky,{disabled:t,editor:e},"iframe"):null,(p=r==null?void 0:r.floatingMenuConfig)!=null&&p.hidden?null:c.jsx(s0,{disabled:t,editor:e},"content"),(m=r==null?void 0:r.textConfig)!=null&&m.hidden?null:c.jsx(u0,{disabled:t,editor:e},"text")]};return r!=null&&r.render?r.render({editor:e,disabled:t||!1,extensionsNames:n,bubbleMenu:r},i()):i().filter(Boolean)}function Yl(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 rf(e){const{t}=H.useLocale(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:a,colors:s=H.COLORS_LIST}=e,l=S.useMemo(()=>{const p=s,m=[];for(let g=0;g<p.length;g+=10)m.push(p.slice(g,g+10));return m},[s]),[u,f]=S.useState([]),d=p=>{const m=[...u],g=m.indexOf(p);g!==-1&&m.splice(g,1),m.unshift(p),m.length>10&&m.pop(),f(m)};function h(p){if(p===void 0){o==null||o(p),a==null||a(p);return}/^#([\da-f]{3}){1,2}$/i.test(p)&&(o==null||o(p),a==null||a(p),d(p))}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,className:"!richtext-p-0",disabled:n,children:e==null?void 0:e.children}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>h(void 0),children:[c.jsx(Yl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.nofill")})]}):c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{h(void 0)},children:[c.jsx(Yl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.default")})]}),l.map((p,m)=>c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:p.map((g,x)=>c.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:()=>h(g),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:g},children:g===i?c.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:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${x}`))},m)),c.jsxs("div",{children:[c.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:t("editor.recent")}),c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:u==null?void 0:u.map((p,m)=>c.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:()=>h(p),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:p},children:c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${m}`))})]}),c.jsx(My,{setColor:h})]})})]})}function My({setColor:e}){const[t,r]=S.useState("#000000"),[n,i]=S.useState(!1),{t:o}=H.useLocale();return S.useEffect(()=>()=>{i(!1)},[]),c.jsxs(Wt,{open:n,children:[c.jsx(Gt,{asChild:!0,children:c.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",onClick:a=>{a.preventDefault(),i(!0)},children:[o("editor.color.more"),"..."]})}),c.jsxs(It,{children:[c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[c.jsx(jf.HexColorPicker,{color:t,onChange:r}),c.jsx(Ie,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:t.slice(1),onChange:a=>{a.preventDefault(),r(`#${a.target.value}`)}})]}),c.jsx(De,{className:"richtext-my-[10px]"}),c.jsx(be,{className:"richtext-w-full",onClick:a=>{a.preventDefault(),e(t),i(!1)},children:c.jsx(P.Plus,{size:16})})]})]})}function Ly({editor:e,disabled:t,toolbar:r}){const{t:n,lang:i}=H.useLocale(),o=S.useMemo(()=>{const u=[...e.extensionManager.extensions].sort((d,h)=>{const p=d.options.sort??-1,m=h.options.sort??-1;return p-m});let f=[];for(const d of u){const{button:h,divider:p=!1,spacer:m=!1,toolbar:g=!0}=d.options;if(!h||!M1(h)||!g)continue;const x=h({editor:e,extension:d,t:n});if(Array.isArray(x)){const y=x.map((w,A)=>({button:w,divider:A===x.length-1?p:!1,spacer:A===0?m:!1,type:d.type,name:d.name}));f=[...f,...y];continue}f.push({button:x,divider:p,spacer:m,type:d.type,name:d.name})}return f},[e,n,i]),a=l=>c.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:t?"none":"auto",opacity:t?.5:1},children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:l})}),s=o.map((l,u)=>{var d,h;const f=l.button.component;return c.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(l==null?void 0:l.spacer)&&c.jsx(De,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),c.jsx(f,{...l.button.componentProps,disabled:t||((h=(d=l==null?void 0:l.button)==null?void 0:d.componentProps)==null?void 0:h.disabled)}),(l==null?void 0:l.divider)&&c.jsx(De,{orientation:"vertical",className:"!richtext-h-auto !richtext-mx-2"})]},`toolbar-item-${u}`)});return r&&(r!=null&&r.render)?r.render({editor:e,disabled:t||!1},o,s,a):a(s)}function $y({editor:e,extensions:t}){const{t:r}=H.useLocale(),n=S.useMemo(()=>{var i,o,a;return(a=(o=(i=t==null?void 0:t.find(s=>s.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:a.limit},[t]);return n?c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function _y(){const{toasts:e}=jd();return c.jsxs(Z1,{children:[e.map(({id:t,title:r,description:n,action:i,...o})=>c.jsxs(wd,{...o,children:[c.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[r&&c.jsx(Ad,{children:r}),n&&c.jsx(Cd,{children:n})]}),i,c.jsx(Sd,{})]},t)),c.jsx(bd,{})]})}const Dy=`
5
+ 3. "-" cannot repeat`);de.customSchemes.push([e,t])}function X0(){de.scanner=H0(de.customSchemes);for(let e=0;e<de.tokenQueue.length;e++)de.tokenQueue[e][1]({scanner:de.scanner});de.parser=U0(de.scanner.tokens);for(let e=0;e<de.pluginQueue.length;e++)de.pluginQueue[e][1]({scanner:de.scanner,parser:de.parser});return de.initialized=!0,de}function $a(e){return de.initialized||X0(),W0(de.parser.start,e,rd(de.scanner.start,e))}$a.scan=rd;function id(e,t=null,r=null){if(t&&typeof t=="object"){if(r)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);r=t,t=null}const n=new La(r),i=$a(e),o=[];for(let a=0;a<i.length;a++){const s=i[a];s.isLink&&(!t||s.t===t)&&n.check(s)&&o.push(s.toFormattedObject(n))}return o}function Y0(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function J0(e){return new D.Plugin({key:new D.PluginKey("autolink"),appendTransaction:(t,r,n)=>{const i=t.some(u=>u.docChanged)&&!r.doc.eq(n.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=n,s=D.combineTransactionSteps(r.doc,[...t]);if(D.getChangedRanges(s).forEach(({newRange:u})=>{const f=D.findChildrenInRange(n.doc,u,p=>p.isTextblock);let d,h;if(f.length>1?(d=f[0],h=n.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):f.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=f[0],h=n.doc.textBetween(d.pos,u.to,void 0," ")),d&&h){const p=h.split(" ").filter(y=>y!=="");if(p.length<=0)return!1;const m=p[p.length-1],g=d.pos+h.lastIndexOf(m);if(!m)return!1;const x=$a(m).map(y=>y.toObject(e.defaultProtocol));if(!Y0(x))return!1;x.filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>n.schema.marks.code?!n.doc.rangeHasMark(y.from,y.to,n.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{D.getMarksBetween(y.from,y.to,n.doc).some(S=>S.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function Z0(e){return new D.Plugin({key:new D.PluginKey("handleClickLink"),props:{handleClick:(t,r,n)=>{var i,o;if(n.button!==0||!t.editable)return!1;let a=n.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(h=>h.nodeName==="A"))return!1;const l=D.getAttributes(t.state,e.type.name),u=n.target,f=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&f?(window.open(f,d),!0):!1}}})}function Q0(e){return new D.Plugin({key:new D.PluginKey("handlePasteLink"),props:{handlePaste:(t,r,n)=>{const{state:i}=t,{selection:o}=i,{empty:a}=o;if(a)return!1;let s="";n.content.forEach(u=>{s+=u.textContent});const l=id(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}const e1=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function wt(e,t){const r=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&r.push(i)}),!e||e.replace(e1,"").match(new RegExp(`^(?:(?:${r.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const t1=D.Mark.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){rc(e);return}rc(e.scheme,e.optionalSlashes)})},onDestroy(){K0()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!wt(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",D.mergeAttributes(this.options.HTMLAttributes,e),0]:["a",D.mergeAttributes(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:r}=e;return this.options.isAllowedUri(r,{defaultValidate:n=>!!wt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[D.markPasteRule({find:e=>{const t=[];if(e){const{protocols:r,defaultProtocol:n}=this.options,i=id(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!wt(a,r),protocols:r,defaultProtocol:n}));i.length&&i.forEach(o=>t.push({text:o.value,data:{href:o.href},index:o.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:r}=this.options;return this.options.autolink&&e.push(J0({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:i=>!!wt(i,t),protocols:t,defaultProtocol:r}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(Z0({type:this.type})),this.options.linkOnPaste&&e.push(Q0({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function r1(e){const[t,r]=w.useState(!1);function n(i,o,a){e.action&&(e.action({link:i,text:o,openInNewTab:a}),r(!1))}return c.jsxs(Wt,{modal:!0,open:t,onOpenChange:r,children:[c.jsx(Gt,{disabled:e==null?void 0:e.disabled,asChild:!0,children:c.jsx(U,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:c.jsx(be,{name:e==null?void 0:e.icon})})}),c.jsx(It,{hideWhenDetached:!0,className:"richtext-w-full",align:"start",side:"bottom",children:c.jsx(ad,{editor:e.editor,onSetLink:n})})]})}const od=t1.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",D.mergeAttributes(this.options.HTMLAttributes,e,{class:"link"}),0]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),openOnClick:!0,button:({editor:t,t:r})=>({component:r1,componentProps:{editor:t,action:n=>{const{link:i,text:o,openInNewTab:a}=n,{state:s}=t,{from:l}=s.selection,u=o.length,f=l+u;t.chain().extendMarkRange("link").insertContent({type:"text",text:o,marks:[{type:"link",attrs:{href:i,target:a?"_blank":""}}]}).setLink({href:i}).setTextSelection({from:l,to:f}).focus().run()},id:"linkk",isActive:()=>t.isActive("link")||!1,disabled:!t.can().setLink({href:""}),icon:"Link",tooltip:r("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new D.Plugin({props:{handleClick:(e,t)=>{const{schema:r,doc:n,tr:i}=e.state,o=D.getMarkRange(n.resolve(t),r.marks.link);if(!o)return!1;const a=n.resolve(o.from),s=n.resolve(o.to),l=i.setSelection(new D.TextSelection(a,s));e.dispatch(l)}}})]}});function ad(e){const{t}=H.useLocale(),[r,n]=w.useState({text:"",link:""}),[i,o]=w.useState(!1);w.useEffect(()=>{const s=()=>{var l,u,f;if((l=e.editor)!=null&&l.isActive("link")){const{href:d,target:h}=e.editor.getAttributes("link"),{from:p,to:m}=e.editor.state.selection,g=e.editor.state.doc.textBetween(p,m," ");n({link:d||"",text:g}),o(h==="_blank")}else{const d=(u=e.editor.extensionManager.extensions.find(h=>h.name===od.name))==null?void 0:u.options;o(((f=d==null?void 0:d.HTMLAttributes)==null?void 0:f.target)==="_blank")}};return s(),e.editor.on("selectionUpdate",s),()=>{e.editor.off("selectionUpdate",s)}},[e.editor]);function a(s){s.preventDefault(),s.stopPropagation(),e==null||e.onSetLink(r.link,r.text,i),n({text:"",link:""})}return c.jsx("div",{className:"border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-gap-2",children:[c.jsx(rt,{className:"mb-[6px]",children:t("editor.link.dialog.text")}),c.jsx("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:c.jsx(Ie,{className:"richtext-w-80",onChange:s=>n({...r,text:s.target.value}),placeholder:"Text",required:!0,type:"text",value:r.text})})}),c.jsx(rt,{className:"mb-[6px]",children:t("editor.link.dialog.link")}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsxs("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:[c.jsx(Ie,{className:"richtext-pl-10",onChange:s=>n({...r,link:s.target.value}),required:!0,type:"url",value:r.link}),c.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2",children:c.jsx(be,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[c.jsx(rt,{children:t("editor.link.dialog.openInNewTab")}),c.jsx(Ga,{checked:i,onCheckedChange:s=>{o(s)}})]}),c.jsx(we,{className:"richtext-mt-2 richtext-self-end",onClick:a,type:"button",children:t("editor.link.dialog.button.apply")})]})})}function n1(e){const{t}=H.useLocale();return c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800",children:[c.jsx("a",{href:e==null?void 0:e.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:sx(e==null?void 0:e.link,{length:50,omission:"…"})}),(e==null?void 0:e.link)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-4"}),c.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[c.jsx(U,{icon:"Pencil",tooltip:t("editor.link.edit.tooltip"),action:()=>{e==null||e.onEdit()},tooltipOptions:{sideOffset:15}}),c.jsx(U,{icon:"Unlink",tooltip:t("editor.link.unlink.tooltip"),action:()=>{e==null||e.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function i1({editor:e,disabled:t}){const[r,n]=w.useState(!1),i=w.useMemo(()=>{const{href:l}=e.getAttributes("link");return l},[e]),o=w.useCallback(({editor:l})=>l.isActive("link"),[]),a=(l,u,f)=>{const d=e.state.selection,{from:h}=d,p=(u==null?void 0:u.length)??0,m=h+p;e.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:f?"_blank":""}}]}).setLink({href:l}).setTextSelection({from:h,to:m}).focus().run(),n(!1)},s=w.useCallback(()=>{e.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[e]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e,shouldShow:o,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n(!1)}},children:t?c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{children:r?c.jsx(ad,{onSetLink:a,editor:e}):c.jsx(n1,{editor:e,onClear:s,onEdit:()=>{n(!0)},link:i})})})})}const o1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,_a=D.Node.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",D.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[D.nodeInputRule({find:o1,type:this.type,getAttributes:e=>{const[,,t,r,n]=e;return{src:r,alt:t,title:n}}})]}}),Cr=ke.Root,jr=ke.Trigger,a1=ke.Portal,sd=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Overlay,{ref:r,className:te("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- 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",e),...t}));sd.displayName=ke.Overlay.displayName;const Ft=oe.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(a1,{children:[c.jsx(sd,{}),c.jsxs(ke.Content,{ref:n,className:te("richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",e),...r,children:[t,c.jsxs(ke.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[c.jsx(P.X,{className:"richtext-h-4 richtext-w-4"}),c.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));Ft.displayName=ke.Content.displayName;function cd({className:e,...t}){return c.jsx("div",{className:te("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",e),...t})}cd.displayName="DialogHeader";function In({className:e,...t}){return c.jsx("div",{className:te("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",e),...t})}In.displayName="DialogFooter";const Ut=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Title,{ref:r,className:te("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",e),...t}));Ut.displayName=ke.Title.displayName;const s1=oe.forwardRef(({className:e,...t},r)=>c.jsx(ke.Description,{ref:r,className:te("richtext-text-sm richtext-text-muted-foreground",e),...t}));s1.displayName=ke.Description.displayName;const nc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ic=pe.clsx,Rn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ic(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=o==null?void 0:o[u];if(f===null)return null;const h=nc(f)||nc(d);return i[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...o,...s}[g]):{...o,...s}[g]===x})?[...u,d,h]:u},[]);return ic(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},c1=Rn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-h-10 richtext-w-10"}},defaultVariants:{variant:"default",size:"default"}}),we=oe.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const a=n?Ql.Slot:"button";return c.jsx(a,{className:te(c1({variant:t,size:r,className:e})),ref:o,...i})});we.displayName="Button";function l1(e){return e.replace(/^.*\/|\..+$/g,"")}function u1(e){return e.split(".").pop()}function d1(e){return e<1024?`${e} Byte`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function f1(e){return e?e==="application/pdf"?"pdf":e.startsWith("application/")&&[".document","word"].some(t=>e.includes(t))?"word":e.startsWith("application/")&&["presentation"].some(t=>e.includes(t))?"excel":e.startsWith("application/")&&["sheet"].some(t=>e.includes(t))?"ppt":e.startsWith("image")?"image":e.startsWith("audio")?"audio":e.startsWith("video")?"video":"file":"file"}function h1(e){return new Promise(t=>{const r=new FileReader;r.addEventListener("load",()=>{t({alt:e.name,src:r.result})},!1),r.readAsDataURL(e)})}function ld(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const a=new Uint8Array(o);for(;o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}function p1({editor:e,imageInline:t,onClose:r}){const{t:n}=H.useLocale(),[i,o]=w.useState(!1),a=w.useRef(null),[s,l]=w.useState(),[u,f]=w.useState(""),d=w.useRef(null),[h,p]=w.useState({src:"",file:null});function m(A){if(a.current&&A.width&&A.height){const C=g(a.current,A);f(C)}}function g(A,C){const E=document.createElement("canvas"),k=A.naturalWidth/A.width,M=A.naturalHeight/A.height;E.width=C.width*k,E.height=C.height*M;const R=E.getContext("2d");return R&&(R.imageSmoothingEnabled=!1,R.drawImage(A,C.x*k,C.y*M,C.width*k,C.height*M,0,0,C.width*k,C.height*M)),E.toDataURL("image/png",1)}async function x(){var A,C;try{const E=ld(u,((A=h==null?void 0:h.file)==null?void 0:A.name)||"image.png"),k=(C=e.extensionManager.extensions.find(R=>R.name===Ht.name))==null?void 0:C.options;let M="";k.upload?M=await k.upload(E):M=URL.createObjectURL(E),e.chain().focus().setImageInline({src:M,inline:t}).run(),o(!1),p({src:"",file:null}),r()}catch(E){console.log("Error cropping image",E)}}function y(A){var C;A.preventDefault(),(C=d.current)==null||C.click()}const S=async A=>{var M;const C=(M=A==null?void 0:A.target)==null?void 0:M.files;if(!e||e.isDestroyed||C.length===0)return;const E=C[0],k=await h1(E);o(!0),p({src:k.src,file:E})};return c.jsxs(c.Fragment,{children:[c.jsx(we,{className:"richtext-mt-1 richtext-w-full",onClick:y,size:"sm",children:n("editor.image.dialog.tab.uploadCrop")}),c.jsxs(Cr,{open:i,children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:n("editor.image.dialog.tab.uploadCrop")}),c.jsx("div",{children:h.src&&c.jsx(Sf,{className:"richtext-w-full",crop:s,onChange:A=>l(A),onComplete:A=>m(A),children:c.jsx("img",{alt:"Crop me",ref:a,src:h.src})})}),c.jsxs(In,{children:[c.jsxs(we,{onClick:()=>{o(!1),p({src:"",file:null})},children:[n("editor.imageUpload.cancel"),c.jsx(be,{className:"richtext-ml-[4px]",name:"Trash2"})]}),c.jsxs(we,{className:"richtext-w-fit",onClick:x,children:[n("editor.imageUpload.crop"),c.jsx(be,{className:"richtext-ml-[4px]",name:"Crop"})]})]})]})]}),c.jsx("input",{accept:"image/*",multiple:!0,onChange:S,ref:d,type:"file",style:{display:"none"}})]})}function On(e){function t(){const o=w.useRef(e),a=w.useCallback(()=>o.current,[]),s=w.useRef(new Set),l=w.useCallback(f=>{o.current={...o.current,...f},s.current.forEach(d=>d())},[]),u=w.useCallback(f=>(s.current.add(f),()=>s.current.delete(f)),[]);return{get:a,set:l,subscribe:u}}const r=w.createContext(null);function n({children:o}){return c.jsx(r.Provider,{value:t(),children:o})}function i(o){const a=w.useContext(r);if(!a)throw new Error("Store not found");return[w.useSyncExternalStore(a.subscribe,()=>o(a.get()),()=>o(e)),a.set]}return{Provider:n,useStore:i}}On({value:!1});On({value:!1});const{Provider:m1,useStore:ud}=On({value:!1}),{Provider:g1,useStore:dd}=On({value:"light"});H.d("0");function xr(e,t){return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}function Pn(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const vt={UPLOAD_IMAGE:e=>`UPLOAD_IMAGE-${e}`,UPLOAD_VIDEO:e=>`UPLOAD_VIDEO-${e}`,EDIT:e=>`EDIT-${e}`,UPDATE_THEME:e=>`UPDATE_THEME-${e}`,SEARCH_REPLCE:"SEARCH_REPLACE"},fd={setOpen:(e,t)=>{Pn(vt.UPLOAD_IMAGE(e),t)}};function x1(e){var m;const{t}=H.useLocale(),[r,n]=w.useState(!1),i=g=>{n(g.detail)},[o,a]=w.useState(""),s=w.useRef(null),[l,u]=w.useState(((m=e.editor.extensionManager.extensions.find(g=>g.name===Ht.name))==null?void 0:m.options.defaultInline)||!1),f=w.useMemo(()=>{var x;return(x=e.editor.extensionManager.extensions.find(y=>y.name===Ht.name))==null?void 0:x.options},[e.editor]);w.useEffect(()=>{const g=xr(vt.UPLOAD_IMAGE(e.editor.id),i);return()=>{g()}},[]);async function d(g){var A;const x=(A=g==null?void 0:g.target)==null?void 0:A.files;if(!e.editor||e.editor.isDestroyed||x.length===0)return;const y=x[0];let S="";f.upload?S=await f.upload(y):S=URL.createObjectURL(y),e.editor.chain().focus().setImageInline({src:S,inline:l}).run(),n(!1),u(!1)}function h(g){g.preventDefault(),g.stopPropagation(),e.editor.chain().focus().setImageInline({src:o,inline:l}).run(),n(!1),u(!1),a("")}function p(g){var x;g.preventDefault(),(x=s.current)==null||x.click()}return c.jsxs(Cr,{onOpenChange:n,open:r,children:[c.jsx(jr,{asChild:!0,children:c.jsx(U,{action:()=>n(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.image.dialog.title")}),c.jsxs(yd,{activationMode:"manual",defaultValue:f.resourceImage==="both"||f.resourceImage==="upload"?"upload":"link",children:[c.jsxs(Va,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[f.resourceImage==="both"||f.resourceImage==="upload"?c.jsx(yr,{value:"upload",children:t("editor.image.dialog.tab.upload")}):c.jsx(c.Fragment,{}),f.resourceImage==="both"||f.resourceImage==="link"?c.jsx(yr,{value:"link",children:t("editor.image.dialog.tab.url")}):c.jsx(c.Fragment,{})]}),c.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[c.jsx(Td,{checked:l,onCheckedChange:g=>{u(g)}}),c.jsx(rt,{children:t("editor.link.dialog.inline")})]}),c.jsxs(br,{value:"upload",children:[c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[c.jsx(we,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.image.dialog.tab.upload")}),c.jsx(p1,{editor:e.editor,imageInline:l,onClose:()=>fd.setOpen(e.editor.id,!1)})]}),c.jsx("input",{accept:"image/*",multiple:!0,onChange:d,ref:s,type:"file",style:{display:"none"}})]}),c.jsx(br,{value:"link",children:c.jsx("form",{onSubmit:h,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ie,{autoFocus:!0,onChange:g=>a(g.target.value),placeholder:t("editor.image.dialog.placeholder"),required:!0,type:"url",value:o}),c.jsx(we,{type:"submit",children:t("editor.image.dialog.button.apply")})]})})})]})]})]})}const Dr={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function v1(e){var R,N,_;const[t,r]=w.useState({width:H.IMAGE_MAX_SIZE,height:H.IMAGE_MAX_SIZE}),[n,i]=w.useState({width:0,height:0}),[o]=w.useState([Dr.TOP_LEFT,Dr.TOP_RIGHT,Dr.BOTTOM_LEFT,Dr.BOTTOM_RIGHT]),[a,s]=w.useState(!1),[l,u]=w.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f,inline:d}=(R=e==null?void 0:e.node)==null?void 0:R.attrs,h=d&&(f==="left"||f==="right"),p=w.useMemo(()=>{var Le;const{src:j,alt:O,width:$,height:z,flipX:X,flipY:F}=(Le=e==null?void 0:e.node)==null?void 0:Le.attrs,re=Kr($)?`${$}px`:$,ee=Kr(z)?`${z}px`:z,ne=[];X&&ne.push("rotateX(180deg)"),F&&ne.push("rotateY(180deg)");const xe=ne.join(" ");return{src:j||void 0,alt:O||void 0,style:{width:re||void 0,height:ee||void 0,transform:xe||"none",...h?{float:f}:{}}}},[(N=e==null?void 0:e.node)==null?void 0:N.attrs]),m=w.useMemo(()=>{const{style:{width:j}}=p;return{width:j==="100%"?j:void 0}},[p]);function g(j){i({width:j.target.width,height:j.target.height})}function x(){const{editor:j,getPos:O}=e;j.commands.setNodeSelection(O())}const y=w.useCallback(Bt(()=>{const{editor:j}=e,{width:O}=getComputedStyle(j.view.dom);r($=>({...$,width:Number.parseInt(O,10)}))},H.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function S(j,O){j.preventDefault(),j.stopPropagation();const $=n.width,z=n.height,X=$/z;let F=Number(e.node.attrs.width),re=Number(e.node.attrs.height);const ee=t.width;F&&!re?(F=F>ee?ee:F,re=Math.round(F/X)):re&&!F?(F=Math.round(re*X),F=F>ee?ee:F):!F&&!re?(F=$>ee?ee:$,re=Math.round(F/X)):F=F>ee?ee:F,s(!0),u({x:j.clientX,y:j.clientY,w:F,h:re,dir:O})}const A=w.useCallback(Bt(j=>{if(j.preventDefault(),j.stopPropagation(),!a)return;const{x:O,w:$,dir:z}=l,X=(j.clientX-O)*(/l/.test(z)?-1:1),F=ju($+X,H.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:F,height:null})},H.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),C=w.useCallback(j=>{j.preventDefault(),j.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),x())},[a,x]),E=w.useCallback(()=>{document==null||document.addEventListener("mousemove",A,!0),document==null||document.addEventListener("mouseup",C,!0)},[A,C]),k=w.useCallback(()=>{document==null||document.removeEventListener("mousemove",A,!0),document==null||document.removeEventListener("mouseup",C,!0)},[A,C]);w.useEffect(()=>(a?E():k(),()=>{k()}),[a,E,k]);const M=w.useMemo(()=>new ResizeObserver(()=>y()),[y]);return w.useEffect(()=>(M.observe(e.editor.view.dom),()=>{M.disconnect()}),[e.editor.view.dom,M]),c.jsx(pe.NodeViewWrapper,{as:d?"span":"div",className:"image-view",style:{float:h?f:void 0,margin:h?f==="left"?"1em 1em 1em 0":"1em 0 1em 1em":void 0,display:d?"inline":"block",textAlign:h?void 0:f,width:((_=p.style)==null?void 0:_.width)??"auto",...h?{}:m},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:m,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:p.alt,className:"image-view__body__image block",height:"auto",onClick:x,onLoad:g,src:p.src,style:p.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(j=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${j}`,onMouseDown:O=>S(O,j)},`image-dir-${j}`))})]})})}const Dt=new D.PluginKey("upload-image");function y1(){return new D.Plugin({key:Dt,state:{init(){return D.DecorationSet.empty},apply(e,t){t=t.map(e.mapping,e.doc);const r=e.getMeta(Dt);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const a=b1(o),s=D.Decoration.widget(i,a,{id:n});t=t.add(e.doc,[s])}else if(r!=null&&r.remove)for(const n of r.remove)t=t.remove(t.find(void 0,void 0,i=>i.id===n));return t}},props:{decorations(e){return this.getState(e)}}})}function b1(e){const t=document.createElement("div"),r=document.createElement("img");return r.setAttribute("class","opacity-50"),r.src=e,r.addEventListener("load",()=>{t.setAttribute("class","img-placeholder")}),t.append(r),t}function w1(e,t){var i;const n=Dt.getState(e).find(void 0,void 0,o=>o.id===t);return n.length>0?(i=n[0])==null?void 0:i.from:null}function S1({validateFn:e,onUpload:t,postUpload:r,defaultInline:n=!1}){return(i,o,a)=>{for(const s of i){if(e&&!e(s))continue;const l=Date.now().toString(),u=o.state.tr;u.selection.empty||u.deleteSelection();const f=URL.createObjectURL(s);u.setMeta(Dt,{add:[{id:l,pos:a,src:f}]}),o.dispatch(u),t(s).then(async d=>{var S;r&&typeof d=="string"&&(d=await r(d));const{schema:h}=o.state;let p=w1(o.state,l);if(p===null)return;const m=typeof d=="object"?f:d,g=(S=h.nodes.image)==null?void 0:S.create({src:m,inline:n});if(!g)return;const{doc:x}=o.state;p>x.content.size&&(p=x.content.size-1);const y=o.state.tr.replaceWith(p,p,g).setMeta(Dt,{remove:[l]});o.dispatch(y)},()=>{const d=o.state.tr.delete(a,a).setMeta(Dt,{remove:[l]});o.dispatch(d)})}}}function A1(e,t,r){var i;const n=[...((i=t.clipboardData)==null?void 0:i.files)||[]];if(n.length>0){t.preventDefault();const o=e.state.selection.from;return r(n,e,o+1),!0}return!1}function C1(e,t,r,n){var o;const i=[...((o=t.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){t.preventDefault();const a=e.posAtCoords({left:t.clientX,top:t.clientY});if(a)return n(i,e,a.pos+1),!0}return!1}const j1={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,resourceImage:"both",defaultInline:!1},Ht=_a.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...j1,...(e=this.parent)==null?void 0:e.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:t,extension:r,t:n})=>{var i,o;return{component:x1,componentProps:{action:()=>!0,upload:r.options.upload,disabled:!((o=(i=t.can()).setImage)!=null&&o.call(i,{})),icon:"ImageUp",tooltip:n("editor.image.tooltip"),editor:t}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),flipX:{default:!1},flipY:{default:!1},width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||null;return r?Number.parseInt(r,10):null},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})},inline:{default:!1,parseHTML:t=>!!t.getAttribute("inline"),renderHTML:t=>({inline:t.inline})}}},addNodeView(){return pe.ReactNodeViewRenderer(v1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageInline:t=>({commands:r})=>r.insertContent({type:this.name,attrs:{...t,inline:t.inline??this.options.defaultInline}}),updateImage:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImage:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{flipX:t,flipY:r,align:n,inline:i}=e,o=i&&(n==="left"||n==="right"),a=t||r?`transform: rotateX(${t?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",s=o?"":`text-align: ${n};`,f=`${o?`float: ${n};`:""}${o?n==="left"?"margin: 1em 1em 1em 0;":"margin: 1em 0 1em 1em;":""}${a}`;return[i?"span":"div",{style:s,class:"image"},["img",D.mergeAttributes({height:"auto",style:f},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"span.image img",getAttrs:e=>{var o;const t=e==null?void 0:e.parentElement,r=e==null?void 0:e.getAttribute("width"),n=(e==null?void 0:e.getAttribute("flipx"))||!1,i=(e==null?void 0:e.getAttribute("flipy"))||!1;return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),caption:e==null?void 0:e.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||((o=t==null?void 0:t.style)==null?void 0:o.textAlign)||null,inline:(e==null?void 0:e.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}},{tag:"div[class=image]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width"),n=(t==null?void 0:t.getAttribute("flipx"))||!1,i=(t==null?void 0:t.getAttribute("flipy"))||!1;return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),caption:t==null?void 0:t.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null,inline:(t==null?void 0:t.getAttribute("inline"))||!1,flipX:n==="true",flipY:i==="true"}}}]},addProseMirrorPlugins(){const t=S1({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload,defaultInline:this.options.defaultInline});return[new D.Plugin({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:A1(r,n,t),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||C1(r,n,o,t),!1)}}),y1()]}});function T1({selectImage:e,giphyApiKey:t,children:r}){const[n,i]=w.useState([]),[o]=w.useState(15),a=w.useRef(null),s=(u,f="search")=>{if(!t)return;const h=`${f==="search"?`https://api.giphy.com/v1/gifs/search?q=${u}`:`https://api.giphy.com/v1/gifs/trending?q=${u}`}&limit=${o}&api_key=${t}`;fetch(h).then(p=>p.json()).then(p=>{i(p.data)}).catch(p=>{console.log(p)})};w.useEffect(()=>{s("","trend")},[]);const l=w.useCallback(Ar(u=>{if(!u.target.value){s("","trend");return}s(u.target.value)},350),[]);return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:r}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:t?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"richtext-mb-[10px] richtext-w-full",children:c.jsx(Ie,{onChange:l,placeholder:"Search GIF",ref:a,type:"text"})}),c.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:c.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(u=>c.jsx("img",{alt:"giphy",className:"richtext-cursor-pointer richtext-text-center",height:u.images.fixed_width_downsampled.height,onClick:()=>e(u),src:u.images.fixed_width_downsampled.url,width:u.images.fixed_width_downsampled.width},`giphy-${u.id}`)):c.jsx("p",{children:"No GIFs found"})})})]}):c.jsx("div",{children:c.jsx("p",{children:"Missing Giphy API Key"})})})]})}function E1({editor:e,icon:t,giphyApiKey:r,...n}){const i=o=>{const{url:a}=o.images.original;e.chain().focus().setImageGif({src:a}).run()};return c.jsx(T1,{giphyApiKey:r,selectImage:i,children:c.jsx(U,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Br={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function I1(e){var k,M;const[t,r]=w.useState({width:H.IMAGE_MAX_SIZE,height:H.IMAGE_MAX_SIZE}),[n,i]=w.useState({width:0,height:0}),[o]=w.useState([Br.TOP_LEFT,Br.TOP_RIGHT,Br.BOTTOM_LEFT,Br.BOTTOM_RIGHT]),[a,s]=w.useState(!1),[l,u]=w.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f}=(k=e==null?void 0:e.node)==null?void 0:k.attrs,d=w.useMemo(()=>{var z;const{src:R,alt:N,width:_,height:j}=(z=e==null?void 0:e.node)==null?void 0:z.attrs,O=Kr(_)?`${_}px`:_,$=Kr(j)?`${j}px`:j;return{src:R||void 0,alt:N||void 0,style:{width:O||void 0,height:$||void 0}}},[(M=e==null?void 0:e.node)==null?void 0:M.attrs]),h=w.useMemo(()=>{const{style:{width:R}}=d;return{width:R==="100%"?R:void 0}},[d]);function p(R){i({width:R.target.width,height:R.target.height})}function m(){const{editor:R,getPos:N}=e;R.commands.setNodeSelection(N())}const g=w.useCallback(Bt(()=>{const{editor:R}=e,{width:N}=getComputedStyle(R.view.dom);r(_=>({..._,width:Number.parseInt(N,10)}))},H.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function x(R,N){R.preventDefault(),R.stopPropagation();const _=n.width,j=n.height,O=_/j;let $=Number(e.node.attrs.width),z=Number(e.node.attrs.height);const X=t.width;$&&!z?($=$>X?X:$,z=Math.round($/O)):z&&!$?($=Math.round(z*O),$=$>X?X:$):!$&&!z?($=_>X?X:_,z=Math.round($/O)):$=$>X?X:$,s(!0),u({x:R.clientX,y:R.clientY,w:$,h:z,dir:N})}const y=w.useCallback(Bt(R=>{if(R.preventDefault(),R.stopPropagation(),!a)return;const{x:N,w:_,dir:j}=l,O=(R.clientX-N)*(/l/.test(j)?-1:1),$=ju(_+O,H.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:$,height:null})},H.IMAGE_THROTTLE_WAIT_TIME),[a,l,t,e.updateAttributes]),S=w.useCallback(R=>{R.preventDefault(),R.stopPropagation(),a&&(u({x:0,y:0,w:0,h:0,dir:""}),s(!1),m())},[a,m]),A=w.useCallback(()=>{document==null||document.addEventListener("mousemove",y,!0),document==null||document.addEventListener("mouseup",S,!0)},[y,S]),C=w.useCallback(()=>{document==null||document.removeEventListener("mousemove",y,!0),document==null||document.removeEventListener("mouseup",S,!0)},[y,S]);w.useEffect(()=>(a?A():C(),()=>{C()}),[a,A,C]);const E=w.useMemo(()=>new ResizeObserver(()=>g()),[g]);return w.useEffect(()=>(E.observe(e.editor.view.dom),()=>{E.disconnect()}),[e.editor.view.dom,E]),c.jsx(pe.NodeViewWrapper,{className:"image-view",style:{...h,width:"100%",textAlign:f},children:c.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:h,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${a?"image-view__body--resizing":""}`,children:[c.jsx("img",{alt:d.alt,className:"image-view__body__image block",height:"auto",onClick:m,onLoad:p,src:d.src,style:d.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||a)&&c.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(R=>c.jsx("span",{className:`image-resizer__handler image-resizer__handler--${R}`,onMouseDown:N=>x(N,R)},`image-dir-${R}`))})]})})}const Da=_a.extend({name:"imageGif",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),inline:!1,content:"",marks:"",group:"block",GIPHY_API_KEY:"",draggable:!1,selectable:!0,atom:!0,button:({editor:t,extension:r,t:n})=>{var o;const i=((o=r==null?void 0:r.options)==null?void 0:o.GIPHY_API_KEY)||"";return{component:E1,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"GifIcon",tooltip:n("editor.imageGif.tooltip"),giphyApiKey:i}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||"10";return r===void 0?null:Number.parseInt(`${r}`,10)},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})}}},addNodeView(){return pe.ReactNodeViewRenderer(I1)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageGif:t=>({commands:r})=>r.insertContent({type:this.name,attrs:t}),updateImageGif:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImageGif:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{align:t}=e;return["div",{style:t?`text-align: ${t};`:"",class:"imageGIf"},["img",D.mergeAttributes({height:"auto"},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"div[class=imageGIf]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width");return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),title:t==null?void 0:t.getAttribute("title"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null}}}]}});function R1(e,t){let r;try{r=new URL(e)}catch{return!1}return!(t!=null&&t.length)||t.length===1&&t[0]==="."?!0:t.some(n=>{if(n.includes("*")){const i=n.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(r.hostname)}return r.hostname.includes(n)})}function O1(e){const{t}=H.useLocale(),[r,n]=w.useState(""),i=w.useRef(null),[o,a]=w.useState(""),[s,l]=w.useState(!1),u=m=>{l(m.detail)};w.useEffect(()=>{const m=xr(vt.UPLOAD_VIDEO(e.editor.id),u);return()=>{m()}},[]);const f=w.useMemo(()=>{var g;return(g=e.editor.extensionManager.extensions.find(x=>x.name===Ba.name))==null?void 0:g.options},[e.editor]);async function d(m){var S;const g=(S=m==null?void 0:m.target)==null?void 0:S.files;if(!e.editor||e.editor.isDestroyed||g.length===0)return;const x=g[0];let y="";f.upload?y=await f.upload(x):y=URL.createObjectURL(x),e.editor.chain().focus().setVideo({src:y,width:"100%"}).run(),l(!1)}function h(m){m.preventDefault(),m.stopPropagation(),r&&(e.editor.chain().focus().setVideo({src:r,width:"100%"}).run(),l(!1))}function p(m){var g;m.preventDefault(),(g=i.current)==null||g.click()}return c.jsxs(Cr,{onOpenChange:l,open:s,children:[c.jsx(jr,{asChild:!0,children:c.jsx(U,{action:()=>l(!0),icon:e.icon,tooltip:e.tooltip})}),c.jsxs(Ft,{children:[c.jsx(Ut,{children:t("editor.video.dialog.title")}),c.jsxs(yd,{activationMode:"manual",defaultValue:(f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload"?"upload":"link",children:[c.jsxs(Va,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload")&&c.jsx(yr,{value:"upload",children:t("editor.video.dialog.tab.upload")}),((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="link")&&c.jsx(yr,{value:"link",children:t("editor.video.dialog.link")})]}),c.jsxs(br,{value:"upload",children:[c.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:c.jsx(we,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.video.dialog.tab.upload")})}),c.jsx("input",{accept:"video/*",multiple:!0,onChange:d,ref:i,type:"file",style:{display:"none"}})]}),c.jsxs(br,{value:"link",children:[c.jsx("form",{onSubmit:h,children:c.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[c.jsx(Ie,{autoFocus:!0,placeholder:t("editor.video.dialog.placeholder"),required:!0,type:"url",value:r,onChange:m=>{n(m.target.value)},onBlur:m=>{const g=m.target.value,x=f.videoProviders||["."];g&&!R1(g,x)?a("Invalid video URL"):a("")}}),c.jsx(we,{type:"submit",children:t("editor.video.dialog.button.apply")})]})}),o&&c.jsx("div",{className:"richtext-my-[5px] richtext-text-red-500",children:o})]})]})]})]})}function P1(e,t,r){return e<t?t:e>r?r:e}const k1=e=>typeof e=="number",N1=e=>typeof e=="string",M1=e=>typeof e=="function";function L1(e,t="px"){if(!e)return e;const r=k1(e)?String(e):e,n=Number.parseFloat(r),i=r.match(/[%a-z]+$/i),o=i?i[0]:t;return Number.isNaN(n)?e:n+o}function hd(e,t){if(!e)return!1;const{extensions:r=[]}=(e==null?void 0:e.extensionManager)??{};return!!r.find(i=>i.name===t)}function $1(e){return e.map(t=>N1(t)?{value:t,name:t}:t)}function _1(e){e=e.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/");const t=e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);t&&(e=`https://www.youtube.com/embed/${t[1]}`);const r=e.match(/^https:\/\/vimeo\.com\/(\d+)(?:\/([a-zA-Z0-9]+))?/);if(r){const i=r[1],o=r[2];o?e=`https://player.vimeo.com/video/${i}?h=${o}`:e=`https://player.vimeo.com/video/${i}`}return/^https?:\/\/www.bilibili.com\/video\/.*/i.test(e)&&(e=e.replace(/\?.*$/,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),e.includes("drive.google.com")&&(e=e.replace("/view","/preview")),e}const Ba=D.Node.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,frameborder:!1,resourceVideo:"both",width:H.VIDEO_SIZE["size-medium"],HTMLAttributes:{class:"iframe-wrapper"},button:({editor:e,t})=>{var r,n;return{component:O1,componentProps:{action:()=>{},isActive:()=>e.isActive("video")||!1,disabled:!((n=(r=e.can()).setVideo)!=null&&n.call(r,{})),icon:"Video",tooltip:t("editor.video.tooltip"),videoProviders:["."],editor:e}}}}},addAttributes(){return{src:{default:null,renderHTML:({src:e})=>({src:e?_1(e):null})},width:{default:this.options.width,renderHTML:({width:e})=>({width:L1(e)})},frameborder:{default:this.options.frameborder?1:0,parseHTML:()=>this.options.frameborder?1:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},align:{default:"center",renderHTML:({align:e})=>({align:e})}}},parseHTML(){return[{tag:"div[data-video] iframe"}]},renderHTML({HTMLAttributes:e}){const{width:t="100%",align:r="center"}=e??{},n={...e,width:"100%",height:"100%"},i=`position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`,o=`flex: 1;padding-bottom: ${9/16*100}%;`,f=["div",{style:`display: flex; justify-content: ${r};`},["div",{style:i},["div",{style:o}],["iframe",n]]];return["div",{...this.options.HTMLAttributes,class:"iframe-wrapper","data-video":""},f]},addCommands(){return{setVideo:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateVideo:e=>({commands:t})=>t.updateAttributes(this.name,e)}}}),za={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function Ha({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?c.jsx(w.Fragment,{children:e.type==="divider"?c.jsx(Be,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}):c.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r})}):c.jsx(c.Fragment,{})}function D1(e){return e.type.name===Ht.name}function B1(e){return e.type.name===Da.name}function z1(e){return e.type.name===Ba.name}function H1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(D1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Kx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-${o}`))})}):c.jsx(c.Fragment,{})})})}function q1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(B1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Xx(e.editor),[e.disabled,e.editor,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-gif-${o}`))})}):c.jsx(c.Fragment,{})})})}function F1(e){const{lang:t}=H.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:a,to:s}=o;let l=!1;return i.view.state.doc.nodesBetween(a.pos,s,u=>{if(z1(u))return l=!0,!1}),l},n=w.useMemo(()=>e.disabled?[]:Zx(e.editor),[e.editor,e.disabled,t]);return c.jsx(c.Fragment,{children:c.jsx(pe.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:za,children:n!=null&&n.length?c.jsx("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap",children:n==null?void 0:n.map((i,o)=>c.jsx(Ha,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-video-${o}`))})}):c.jsx(c.Fragment,{})})})}function U1(e,t,r=null){return r?e.createChecked({index:t},r):e.createAndFill({index:t})}function W1(e){if(e.cached.columnsNodeTypes)return e.cached.columnsNodeTypes;const t={columns:e.nodes.columns,column:e.nodes.column};return e.cached.columnsNodeTypes=t,t}function G1(e,t,r=null){const n=W1(e),i=[];for(let o=0;o<t;o+=1){const a=U1(n.column,o,r);a&&i.push(a)}return n.columns.createChecked({cols:t},i)}function oi({state:e,dispatch:t,type:r}){const n=D.findParentNode(o=>o.type.name===vr.name)(e.selection),i=D.findParentNode(o=>o.type.name===qa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index,s=o.toJSON();let l=a;r==="delete"?(l=a-1,s.content.splice(a,1)):(l=r==="addBefore"?a:a+1,s.content.splice(l,0,{type:"column",attrs:{index:a},content:[{type:"paragraph"}]})),s.attrs.cols=s.content.length,s.content.forEach((h,p)=>{h.attrs.index=p});const u=D.Node$1.fromJSON(e.schema,s);let f=n.pos;u.content.forEach((h,p,m)=>{m<l&&(f+=h.nodeSize)});const d=e.tr.setTime(Date.now());d.replaceWith(n.pos,n.pos+n.node.nodeSize,u).setSelection(D.TextSelection.near(d.doc.resolve(f))),t(d)}return!0}function oc({state:e,dispatch:t,type:r}){const n=D.findParentNode(o=>o.type.name===vr.name)(e.selection),i=D.findParentNode(o=>o.type.name===qa.name)(e.selection);if(t&&n&&i){const o=n.node,a=i.node.attrs.index;let s=0;r==="before"?s=(a-1+o.attrs.cols)%o.attrs.cols:s=(a+1)%o.attrs.cols;let l=n.pos;o.content.forEach((f,d,h)=>{h<s&&(l+=f.nodeSize)});const u=e.tr.setTime(Date.now());return u.setSelection(D.TextSelection.near(u.doc.resolve(l))),t(u),!0}return!1}const qa=D.Node.create({name:"column",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"column"}}},addAttributes(){return{index:{default:0,parseHTML:e=>e.getAttribute("index")}}},parseHTML(){return[{tag:"div[class=column]"}]},renderHTML({HTMLAttributes:e}){return["div",D.mergeAttributes(this.options.HTMLAttributes,e),0]}}),V1=D.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r})=>({component:U,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:r("editor.columns.tooltip")}})}}}),pd=200,vr=D.Node.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:pd,addOptions(){return{HTMLAttributes:{class:"columns"}}},addAttributes(){return{cols:{default:2,parseHTML:e=>e.getAttribute("cols")}}},parseHTML(){return[{tag:"div[class=grid]"}]},renderHTML({HTMLAttributes:e}){return["div",D.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{insertColumns:e=>({tr:t,dispatch:r,editor:n})=>{const i=G1(n.schema,e&&e.cols||3);if(r){const o=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(D.TextSelection.near(t.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"addBefore"}),addColAfter:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"addAfter"}),deleteCol:()=>({dispatch:e,state:t})=>oi({dispatch:e,state:t,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>oc({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>oc({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}});function Fa(e,t){const{state:r}=t,n=r.selection.$anchor;let i=!1;if(n.depth)for(let o=n.depth;o>0;o--)n.node(o).type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(n.before(o),n.after(o)).scrollIntoView()),i=!0);else{const o=r.selection.node;o&&o.type.name===e&&(t.chain().deleteSelection().run(),i=!0)}if(!i){const o=n.pos;if(o){const a=r.tr.doc.nodeAt(o);a&&a.type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(o,o+a.nodeSize)),i=!0)}}return i}function K1({editor:e}){const{t}=H.useLocale(),r=w.useCallback(()=>e.isActive(vr.name),[e]),n=w.useCallback(()=>Fa(vr.name,e),[e]),i=w.useCallback(()=>e.chain().focus().addColBefore().run(),[e]),o=w.useCallback(()=>e.chain().focus().addColAfter().run(),[e]),a=w.useCallback(()=>e.chain().focus().deleteCol().run(),[e]);return c.jsx(pe.BubbleMenu,{editor:e,pluginKey:"columns-bubble-menu",shouldShow:r,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(U,{action:i,icon:"ColumnAddLeft",tooltip:t("editor.table.menu.insertColumnBefore")}),c.jsx(U,{action:o,icon:"ColumnAddRight",tooltip:t("editor.table.menu.insertColumnAfter")}),c.jsx(U,{action:a,icon:"DeleteColumn",tooltip:t("editor.table.menu.deleteColumn")}),c.jsx(U,{action:n,icon:"Trash2",tooltip:t("editor.table.menu.delete_column")})]})})}const md=fe.Root,gd=fe.Trigger,ac=fe.Portal,sc=fe.Sub,ha=oe.forwardRef(({className:e,inset:t,children:r,...n},i)=>c.jsxs(fe.SubTrigger,{ref:i,className:te("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",t&&"richtext-pl-8",e),...n,children:[r,c.jsx(P.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));ha.displayName=fe.SubTrigger.displayName;const pa=oe.forwardRef(({className:e,...t},r)=>c.jsx(fe.SubContent,{ref:r,className:te("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg 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",e),...t}));pa.displayName=fe.SubContent.displayName;const Ua=oe.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(fe.Portal,{children:c.jsx(fe.Content,{ref:n,sideOffset:t,className:te("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 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",e),...r})}));Ua.displayName=fe.Content.displayName;const ze=oe.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Item,{ref:n,className:te("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t&&"richtext-pl-8",e),...r}));ze.displayName=fe.Item.displayName;const xd=oe.forwardRef(({className:e,children:t,checked:r,...n},i)=>c.jsxs(fe.CheckboxItem,{ref:i,className:te("richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(P.Check,{className:"richtext-h-4 richtext-w-4"})})}),t]}));xd.displayName=fe.CheckboxItem.displayName;const X1=oe.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fe.RadioItem,{ref:n,className:te("richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...r,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(fe.ItemIndicator,{children:c.jsx(P.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),t]}));X1.displayName=fe.RadioItem.displayName;const Y1=oe.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(fe.Label,{ref:n,className:te("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",t&&"richtext-pl-8",e),...r}));Y1.displayName=fe.Label.displayName;const Wa=oe.forwardRef(({className:e,...t},r)=>c.jsx(fe.Separator,{ref:r,className:te("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));Wa.displayName=fe.Separator.displayName;function vd({className:e,...t}){return c.jsx("span",{className:te("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",e),...t})}vd.displayName="DropdownMenuShortcut";const Ie=oe.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:te("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background 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 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),ref:n,...r}));Ie.displayName="Input";const J1=Rn("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),rt=oe.forwardRef(({className:e,...t},r)=>c.jsx(nu.Root,{ref:r,className:te(J1(),e),...t}));rt.displayName=nu.Root.displayName;const Wt=dr.Root,Gt=dr.Trigger,It=oe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>c.jsx(dr.Portal,{children:c.jsx(dr.Content,{ref:i,align:t,sideOffset:r,className:te("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",e),...n})}));It.displayName=dr.Content.displayName;const Be=oe.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>c.jsx(tu.Root,{ref:i,decorative:r,orientation:t,className:te("richtext-shrink-0 richtext-bg-border",t==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",e),...n}));Be.displayName=tu.Root.displayName;const Ga=oe.forwardRef(({className:e,...t},r)=>c.jsx(Go.Root,{className:te("richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",e),...t,ref:r,children:c.jsx(Go.Thumb,{className:te("richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0")})}));Ga.displayName=Go.Root.displayName;const yd=jt.Root,Va=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.List,{ref:r,className:te("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",e),...t}));Va.displayName=jt.List.displayName;const yr=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.Trigger,{ref:r,className:te("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",e),...t}));yr.displayName=jt.Trigger.displayName;const br=oe.forwardRef(({className:e,...t},r)=>c.jsx(jt.Content,{ref:r,className:te("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2",e),...t}));br.displayName=jt.Content.displayName;const Z1=Re.Provider,bd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Viewport,{ref:r,className:te("richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",e),...t}));bd.displayName=Re.Viewport.displayName;const Q1=Rn("richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",{variants:{variant:{default:"richtext-border richtext-bg-background richtext-text-foreground",destructive:"richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"}},defaultVariants:{variant:"default"}}),wd=oe.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(Re.Root,{ref:n,className:te(Q1({variant:t}),e),...r}));wd.displayName=Re.Root.displayName;const ev=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Action,{ref:r,className:te("richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",e),...t}));ev.displayName=Re.Action.displayName;const Sd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Close,{ref:r,className:te("richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(P.X,{className:"richtext-h-4 richtext-w-4"})}));Sd.displayName=Re.Close.displayName;const Ad=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Title,{ref:r,className:te("richtext-text-sm richtext-font-semibold",e),...t}));Ad.displayName=Re.Title.displayName;const Cd=oe.forwardRef(({className:e,...t},r)=>c.jsx(Re.Description,{ref:r,className:te("richtext-text-sm richtext-opacity-90",e),...t}));Cd.displayName=Re.Description.displayName;const tv=Rn("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-2 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"}}),Ka=oe.forwardRef(({className:e,variant:t,size:r,...n},i)=>c.jsx(ru.Root,{ref:i,className:te(tv({variant:t,size:r,className:e})),...n}));Ka.displayName=ru.Root.displayName;const rv=Sr.Provider,Xa=Sr.Root,Ya=Sr.Trigger,kn=oe.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Sr.Content,{ref:n,sideOffset:t,className:te("richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-popover-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",e),...r}));kn.displayName=Sr.Content.displayName;const nv=1,iv=1e6;let ai=0;function ov(){return ai=(ai+1)%Number.MAX_SAFE_INTEGER,ai.toString()}const si=new Map;function cc(e){if(si.has(e))return;const t=setTimeout(()=>{si.delete(e),ur({type:"REMOVE_TOAST",toastId:e})},iv);si.set(e,t)}function av(e,t){switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,nv)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?cc(r):e.toasts.forEach(n=>{cc(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}}const Ur=[];let Wr={toasts:[]};function ur(e){Wr=av(Wr,e),Ur.forEach(t=>{t(Wr)})}function sv({...e}){const t=ov(),r=i=>ur({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>ur({type:"DISMISS_TOAST",toastId:t});return ur({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function jd(){const[e,t]=oe.useState(Wr);return oe.useEffect(()=>(Ur.push(t),()=>{const r=Ur.indexOf(t);r>-1&&Ur.splice(r,1)}),[e]),{...e,toast:sv,dismiss:r=>ur({type:"DISMISS_TOAST",toastId:r})}}const Td=oe.forwardRef(({className:e,...t},r)=>c.jsx(Wo.Root,{ref:r,className:te("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",e),...t,children:c.jsx(Wo.Indicator,{className:te("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:c.jsx(P.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));Td.displayName=Wo.Root.displayName;const cv={padding:"0 12px 12px"},Ed=({width:e,maxWidth:t,height:r,onOk:n,children:i})=>{const{t:o}=H.useLocale(),[a,s]=w.useState({width:"",height:"",maxWidth:""});w.useEffect(()=>{s({width:e,height:r,maxWidth:t})},[r,t,e]);function l(u){u.preventDefault(),u.stopPropagation(),n(a)}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,children:i}),c.jsx(It,{children:c.jsx("div",{style:cv,children:c.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[c.jsx(rt,{className:"mb-[6px]",children:"Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.width,required:!0,onChange:u=>s({...a,width:u.target.value})})})}),c.jsx(rt,{className:"mb-[6px]",children:"Max Width"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.maxWidth,required:!0,onChange:u=>s({...a,maxWidth:u.target.value})})})}),c.jsx(rt,{className:"mb-[6px]",children:"Height"}),c.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:c.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:c.jsx(Ie,{type:"number",value:a.height,required:!0,onChange:u=>s({...a,height:u.target.value})})})}),c.jsx(we,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})},Vt={youtube:{example:"https://www.youtube.com/watch?v=I4sMhHbHYXM",src:"https://www.youtube.com/embed/I4sMhHbHYXM",srcPrefix:"https://www.youtube.com/embed",linkRule:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\s/]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[&?]v=)|youtu\.be\/)([\w-]{11})/]},youku:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html?spm=a2h0c.8166622.PhoneSokuUgc_4.dtitle",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"https://player.youku.com/embed",linkRule:[String.raw`v.youku.com\/v_show\/id_\w+\=*`],idRule:String.raw`id_\w+\=*`},bilibili:{example:"https://www.bilibili.com/video/BV1EJ411u7DN",src:"https://player.bilibili.com/player.html?bvid=BV1EJ411u7DN",srcPrefix:"https://player.bilibili.com/player.html?bvid",linkRule:[String.raw`www.bilibili.com\/video\/\w+`]},qqvideo:{example:"https://v.qq.com/x/cover/mzc0020006aw1mn/u0033nvzb5v.html",src:"https://v.qq.com/txp/iframe/player.html?vid=u0033nvzb5v",srcPrefix:"https://v.qq.com/txp/iframe/player.html?vid",linkRule:[String.raw`v.qq.com\/x\/cover\/\w+\/\w+`]},amap:{example:"https://ditu.amap.com/",src:"https://www.amap.com/place/B000A45467",srcPrefix:"",linkRule:[String.raw`\.amap\.com`]},baidu_map:{example:"https://j.map.baidu.com/15/fo",src:"https://j.map.baidu.com/15/fo",srcPrefix:"",linkRule:[String.raw`map\.baidu\.com`]},modao:{example:"https://free.modao.cc/app/2cd26580a6717a147454df7470e7ec464093cba3/embed/v2#screen=sk71k6d1dfxulzx",src:"https://free.modao.cc/app/6UkpAxcGE3nPz52GLqhnOZgC7MATBSy/embed/v2",srcPrefix:"",linkRule:[String.raw`https:\/\/\w+.modao.cc\/app\/\w+\/embed\/v2`],tips:"Modao > More > Share > Embed > COPY"},lanhu:{example:"https://lanhuapp.com/link/#/invite?sid=evP7L",src:"https://lanhuapp.com/url/evP7L",srcPrefix:"",linkRule:[String.raw`https:\/\/lanhuapp.com\/url\/\w+`],tips:"Lanhu > Project > Share > Copy Link"},figma:{example:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",src:"https://www.figma.com/file/aS9uSgPXoNpaPkzbjNcK8v/Demo?node-id=0%3A1",srcPrefix:"https://www.figma.com/embed?embed_host=share&url",linkRule:[String.raw`https:\/\/www.figma.com\/file\/\w+`]},canva:{example:"https://www.canva.cn/design/DAD61-t29UI/view",src:"https://www.canva.cn/design/DAD61-t29UI/view",srcPrefix:"",linkRule:[String.raw`https:\/\/www.canva.cn\/design\/.+\/view`]},processon:{example:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",src:"https://www.processon.com/embed/5ea99d8607912948b0e6fe78",srcPrefix:"",linkRule:[String.raw`https:\/\/www.processon.com\/embed\/\w+`]},codepen:{example:"https://codepen.io/mekery/embed/YzyrKOJ",src:"https://codepen.io/mekery/embed/YzyrKOJ",srcPrefix:"",linkRule:[String.raw`https:\/\/codepen.io\/.+\/embed\/\w+`]},jinshuju:{example:"https://jinshuju.net/f/q9YvVf",src:"https://jinshuju.net/f/q9YvVf",srcPrefix:"",linkRule:[String.raw`https:\/\/jinshuju.net\/f\/\w+`]},iframe:{example:"https://v.youku.com/v_show/id_XNDM0NDM4MTcy.html",src:"https://player.youku.com/embed/XNDM0NDM4MTcy",srcPrefix:"",linkRule:[".+"]},googlemaps:{example:"https://goo.gl/maps/8Ys8b4K1ZJY2",src:"https://www.google.com/maps/embed?pb=https://goo.gl/maps/8Ys8b4K1ZJY2",srcPrefix:"",linkRule:[String.raw`https:\/\/goo.gl\/maps\/\w+`]}};function lv(e){const t=Vt.youtube,r=e.matchedUrl;e.validLink=!0;const n=r.split("="),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}/${o}`,e.validId=!0}return e}function uv(e){const t=Vt.youku,r=e.matchedUrl,n=t.idRule,i=new RegExp(n),o=r.match(i);if(o&&o.length>0){const a=o[0].slice(3);e.validId=!0,e.src=`${t.srcPrefix}/${a}`}else e.validId=!1;return e}function dv(e){const t=Vt.bilibili,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function fv(e){const t=Vt.qqvideo,n=e.matchedUrl.split("/"),i=n.length;if(i>0){const o=n[i-1];e.src=`${t.srcPrefix}=${o}`,e.validId=!0}return e}function hv(e,t){return t.src=e,t.validId=!0,t}function pv(e,t){return t.src=e,t.validId=!0,t}function mv(e,t){return t.src=e,t.validId=!0,t.originalLink=e,t}function gv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function xv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function vv(e){const t=Vt.figma;return e.src=`${t.srcPrefix}=${encodeURIComponent(e.matchedUrl)}`,e.validId=!0,e.originalLink=e.matchedUrl,e}function yv(e,t){return t.src=`${t.matchedUrl}?embed`,t.validId=!0,t.originalLink=e,t}function bv(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function wv(e){return e.src=`${e.matchedUrl}`,e.validId=!0,e.originalLink=e.src,e}function Sv(e,t){return t.src=`${t.matchedUrl}?background=white&banner=show&embedded=true`,t.validId=!0,t.originalLink=e,t}function Av(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function Cv(e,t,r){if(e==="googlemaps")return r.validLink=!0,r.matchedUrl=t,r;const i=Vt[e].linkRule;for(const o of i){const a=new RegExp(o),s=t.match(a);if(s&&s.length>0)return r.validLink=!0,r.matchedUrl=e==="youtube"?s[1]:s[0],r}return r}function jv(e){var r,n;let t="iframe";return((r=e.includes)!=null&&r.call(e,"youtube")||(n=e.includes)!=null&&n.call(e,"youtu.be"))&&(t="youtube"),e.includes("youku")&&(t="youku"),e.includes("bilibili")&&(t="bilibili"),e.includes("qq")&&(t="qqvideo"),e.includes("amap")&&(t="amap"),e.includes("map.baidu")&&(t="baidu_map"),(e.includes("google.com/maps")||e.includes("maps.app.goo.gl"))&&(t="googlemaps"),e.includes("modao")&&(t="modao"),e.includes("lanhuapp")&&(t="lanhu"),e.includes("figma")&&(t="figma"),e.includes("canva")&&(t="canva"),e.includes("processon")&&(t="processon"),e.includes("codepen")&&(t="codepen"),e.includes("jinshuju")&&(t="jinshuju"),e.includes("iframe")&&(t="iframe"),t}function Id(e){let t={validLink:!1,validId:!1,matchedUrl:"",originalLink:e,src:""};const r=jv(e);if(t=Cv(r,e,t),!t.validLink)return t;switch(r){case"youtube":return lv(t);case"youku":return uv(t);case"bilibili":return dv(t);case"qqvideo":return fv(t);case"amap":return hv(e,t);case"baidu_map":return pv(e,t);case"googlemaps":return mv(e,t);case"modao":return gv(t);case"lanhu":return xv(t);case"figma":return vv(t);case"canva":return yv(e,t);case"processon":return bv(e,t);case"codepen":return wv(t);case"jinshuju":return Sv(e,t);case"iframe":return Av(e,t);default:return e}}function Rd(){const[e]=ud(t=>t.value);return e}const Tv={setDisable:(e,t)=>{Pn(vt.EDIT(e),t)}},Ev="_wrap_5y04w_1",Iv="_innerWrap_5y04w_15",lc={wrap:Ev,innerWrap:Iv};function Rv({editor:e,node:t,updateAttributes:r}){const n=Rd(),{src:i,width:o,height:a}=t.attrs,[s,l]=w.useState("");function u(){if(!s)return;const d=Id(s);e.chain().updateAttributes(St.name,{src:(d==null?void 0:d.src)||s}).setNodeSelection(e.state.selection.from).focus().run()}const f=w.useCallback(d=>{r({width:d.width,height:d.height})},[r]);return c.jsxs(pe.NodeViewWrapper,{children:[!i&&c.jsxs("div",{className:"richtext-mx-auto richtext-my-[12px] richtext-flex richtext-max-w-[600px] richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-rounded-[12px] richtext-border richtext-border-solid richtext-border-[#ccc] richtext-p-[10px]",children:[c.jsx(Ie,{autoFocus:!0,className:"richtext-flex-1",onInput:d=>l(d.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsx(we,{className:"richtext-w-[60px]",onClick:u,children:"OK"})]}),i&&c.jsx(wf.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(a)},onResizeStop:(d,h,p,m)=>{f({width:Number.parseInt(o)+m.width,height:Number.parseInt(a)+m.height})},children:c.jsx("div",{className:pe.clsx(lc.wrap,"render-wrapper"),children:c.jsx("div",{className:lc.innerWrap,style:{pointerEvents:n?"none":"auto"},children:c.jsx("iframe",{className:"richtext-my-[12px] ",src:i})})})})]})}const St=D.Node.create({name:"iframe",content:"",marks:"",group:"block",selectable:!0,atom:!0,draggable:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"iframe"},button:({editor:t,extension:r,t:n})=>({component:U,componentProps:{action:i=>t.commands.setIframe(i),upload:r.options.upload,disabled:!t.can().setIframe({}),icon:"Iframe",tooltip:n("editor.iframe.tooltip")}})}},addAttributes(){return{width:{default:600,parseHTML:pe.getDatasetAttribute("width")},height:{default:300,parseHTML:pe.getDatasetAttribute("height")},src:{default:null,parseHTML:pe.getDatasetAttribute("src")},defaultShowPicker:{default:!1},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML(){return[{tag:"iframe"}]},renderHTML({HTMLAttributes:e}){return["iframe",D.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:r,chain:n})=>{var o,a,s;if(((s=(a=(o=t.selection)==null?void 0:o.node)==null?void 0:a.type)==null?void 0:s.name)==this.name)return r.updateAttributes(this.name,e);const i=e||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[D.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return pe.ReactNodeViewRenderer(Rv)}});var wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Od(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ci,uc;function kd(){if(uc)return ci;uc=1;var e=Object.prototype.toString;return ci=function(r){var n=e.call(r),i=n==="[object Arguments]";return i||(i=n!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&e.call(r.callee)==="[object Function]"),i},ci}var li,dc;function Ov(){if(dc)return li;dc=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=kd(),i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(h){var p=h.constructor;return p&&p.prototype===h},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!u["$"+h]&&t.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{l(window[h])}catch{return!0}}catch{return!0}return!1}(),d=function(h){if(typeof window>"u"||!f)return l(h);try{return l(h)}catch{return!1}};e=function(p){var m=p!==null&&typeof p=="object",g=r.call(p)==="[object Function]",x=n(p),y=m&&r.call(p)==="[object String]",S=[];if(!m&&!g&&!x)throw new TypeError("Object.keys called on a non-object");var A=a&&g;if(y&&p.length>0&&!t.call(p,0))for(var C=0;C<p.length;++C)S.push(String(C));if(x&&p.length>0)for(var E=0;E<p.length;++E)S.push(String(E));else for(var k in p)!(A&&k==="prototype")&&t.call(p,k)&&S.push(String(k));if(o)for(var M=d(p),R=0;R<s.length;++R)!(M&&s[R]==="constructor")&&t.call(p,s[R])&&S.push(s[R]);return S}}return li=e,li}var ui,fc;function Ja(){if(fc)return ui;fc=1;var e=Array.prototype.slice,t=kd(),r=Object.keys,n=r?function(a){return r(a)}:Ov(),i=Object.keys;return n.shim=function(){if(Object.keys){var a=function(){var s=Object.keys(arguments);return s&&s.length===arguments.length}(1,2);a||(Object.keys=function(l){return t(l)?i(e.call(l)):i(l)})}else Object.keys=n;return Object.keys||n},ui=n,ui}var di,hc;function Nn(){if(hc)return di;hc=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return di=e,di}var fi,pc;function Za(){return pc||(pc=1,fi=SyntaxError),fi}var hi,mc;function Me(){return mc||(mc=1,hi=TypeError),hi}var pi,gc;function Pv(){return gc||(gc=1,pi=Object.getOwnPropertyDescriptor),pi}var mi,xc;function Rt(){if(xc)return mi;xc=1;var e=Pv();if(e)try{e([],"length")}catch{e=null}return mi=e,mi}var gi,vc;function Qa(){if(vc)return gi;vc=1;var e=Nn(),t=Za(),r=Me(),n=Rt();return gi=function(o,a,s){if(!o||typeof o!="object"&&typeof o!="function")throw new r("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!n&&n(o,a);if(e)e(o,a,{configurable:f===null&&h?h.configurable:!f,enumerable:l===null&&h?h.enumerable:!l,value:s,writable:u===null&&h?h.writable:!u});else if(d||!l&&!u&&!f)o[a]=s;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},gi}var xi,yc;function es(){if(yc)return xi;yc=1;var e=Nn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},xi=t,xi}var vi,bc;function Ot(){if(bc)return vi;bc=1;var e=Ja(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,i=Qa(),o=function(u){return typeof u=="function"&&r.call(u)==="[object Function]"},a=es()(),s=function(u,f,d,h){if(f in u){if(h===!0){if(u[f]===d)return}else if(!o(h)||!h())return}a?i(u,f,d,!0):i(u,f,d)},l=function(u,f){var d=arguments.length>2?arguments[2]:{},h=e(f);t&&(h=n.call(h,Object.getOwnPropertySymbols(f)));for(var p=0;p<h.length;p+=1)s(u,h[p],f[h[p]],d[h[p]])};return l.supportsDescriptors=!!a,vi=l,vi}var yi={exports:{}},bi,wc;function ts(){return wc||(wc=1,bi=Object),bi}var wi,Sc;function Nd(){return Sc||(Sc=1,wi=Error),wi}var Si,Ac;function kv(){return Ac||(Ac=1,Si=EvalError),Si}var Ai,Cc;function Nv(){return Cc||(Cc=1,Ai=RangeError),Ai}var Ci,jc;function Mv(){return jc||(jc=1,Ci=ReferenceError),Ci}var ji,Tc;function Lv(){return Tc||(Tc=1,ji=URIError),ji}var Ti,Ec;function $v(){return Ec||(Ec=1,Ti=Math.abs),Ti}var Ei,Ic;function _v(){return Ic||(Ic=1,Ei=Math.floor),Ei}var Ii,Rc;function Dv(){return Rc||(Rc=1,Ii=Math.max),Ii}var Ri,Oc;function Bv(){return Oc||(Oc=1,Ri=Math.min),Ri}var Oi,Pc;function zv(){return Pc||(Pc=1,Oi=Math.pow),Oi}var Pi,kc;function Hv(){return kc||(kc=1,Pi=Math.round),Pi}var ki,Nc;function qv(){return Nc||(Nc=1,ki=Number.isNaN||function(t){return t!==t}),ki}var Ni,Mc;function Fv(){if(Mc)return Ni;Mc=1;var e=qv();return Ni=function(r){return e(r)||r===0?r:r<0?-1:1},Ni}var Mi,Lc;function Mn(){return Lc||(Lc=1,Mi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),Mi}var Li,$c;function rs(){if($c)return Li;$c=1;var e=typeof Symbol<"u"&&Symbol,t=Mn();return Li=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Li}var $i,_c;function Md(){return _c||(_c=1,$i=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),$i}var _i,Dc;function Ld(){if(Dc)return _i;Dc=1;var e=ts();return _i=e.getPrototypeOf||null,_i}var Di,Bc;function Uv(){if(Bc)return Di;Bc=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(l,u){for(var f=[],d=0;d<l.length;d+=1)f[d]=l[d];for(var h=0;h<u.length;h+=1)f[h+l.length]=u[h];return f},o=function(l,u){for(var f=[],d=u,h=0;d<l.length;d+=1,h+=1)f[h]=l[d];return f},a=function(s,l){for(var u="",f=0;f<s.length;f+=1)u+=s[f],f+1<s.length&&(u+=l);return u};return Di=function(l){var u=this;if(typeof u!="function"||t.apply(u)!==n)throw new TypeError(e+u);for(var f=o(arguments,1),d,h=function(){if(this instanceof d){var y=u.apply(this,i(f,arguments));return Object(y)===y?y:this}return u.apply(l,i(f,arguments))},p=r(0,u.length-f.length),m=[],g=0;g<p;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var x=function(){};x.prototype=u.prototype,d.prototype=new x,x.prototype=null}return d},Di}var Bi,zc;function Tr(){if(zc)return Bi;zc=1;var e=Uv();return Bi=Function.prototype.bind||e,Bi}var zi,Hc;function ns(){return Hc||(Hc=1,zi=Function.prototype.call),zi}var Hi,qc;function is(){return qc||(qc=1,Hi=Function.prototype.apply),Hi}var qi,Fc;function Wv(){return Fc||(Fc=1,qi=typeof Reflect<"u"&&Reflect&&Reflect.apply),qi}var Fi,Uc;function $d(){if(Uc)return Fi;Uc=1;var e=Tr(),t=is(),r=ns(),n=Wv();return Fi=n||e.call(r,t),Fi}var Ui,Wc;function os(){if(Wc)return Ui;Wc=1;var e=Tr(),t=Me(),r=ns(),n=$d();return Ui=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return n(e,r,o)},Ui}var Wi,Gc;function Gv(){if(Gc)return Wi;Gc=1;var e=os(),t=Rt(),r;try{r=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Wi=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(s){return o(s==null?s:i(s))}:!1,Wi}var Gi,Vc;function _d(){if(Vc)return Gi;Vc=1;var e=Md(),t=Ld(),r=Gv();return Gi=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:r?function(i){return r(i)}:null,Gi}var Vi,Kc;function as(){if(Kc)return Vi;Kc=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Tr();return Vi=r.call(e,t),Vi}var Ki,Xc;function at(){if(Xc)return Ki;Xc=1;var e,t=ts(),r=Nd(),n=kv(),i=Nv(),o=Mv(),a=Za(),s=Me(),l=Lv(),u=$v(),f=_v(),d=Dv(),h=Bv(),p=zv(),m=Hv(),g=Fv(),x=Function,y=function(ie){try{return x('"use strict"; return ('+ie+").constructor;")()}catch{}},S=Rt(),A=Nn(),C=function(){throw new s},E=S?function(){try{return arguments.callee,C}catch{try{return S(arguments,"callee").get}catch{return C}}}():C,k=rs()(),M=_d(),R=Ld(),N=Md(),_=is(),j=ns(),O={},$=typeof Uint8Array>"u"||!M?e:M(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":k&&M?M([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":O,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&M?M(M([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!M?e:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!M?e:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&M?M(""[Symbol.iterator]()):e,"%Symbol%":k?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":j,"%Function.prototype.apply%":_,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":R,"%Math.abs%":u,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":N};if(M)try{null.error}catch(ie){var X=M(M(ie));z["%Error.prototype%"]=X}var F=function ie(q){var W;if(q==="%AsyncFunction%")W=y("async function () {}");else if(q==="%GeneratorFunction%")W=y("function* () {}");else if(q==="%AsyncGeneratorFunction%")W=y("async function* () {}");else if(q==="%AsyncGenerator%"){var B=ie("%AsyncGeneratorFunction%");B&&(W=B.prototype)}else if(q==="%AsyncIteratorPrototype%"){var Y=ie("%AsyncGenerator%");Y&&M&&(W=M(Y.prototype))}return z[q]=W,W},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ee=Tr(),ne=as(),xe=ee.call(j,Array.prototype.concat),me=ee.call(_,Array.prototype.splice),Le=ee.call(j,String.prototype.replace),$e=ee.call(j,String.prototype.slice),T=ee.call(j,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,G=function(q){var W=$e(q,0,1),B=$e(q,-1);if(W==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&W!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Y=[];return Le(q,L,function(ge,ve,ye,Se){Y[Y.length]=ye?Le(Se,V,"$1"):ve||ge}),Y},Q=function(q,W){var B=q,Y;if(ne(re,B)&&(Y=re[B],B="%"+Y[0]+"%"),ne(z,B)){var ge=z[B];if(ge===O&&(ge=F(B)),typeof ge>"u"&&!W)throw new s("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:Y,name:B,value:ge}}throw new a("intrinsic "+q+" does not exist!")};return Ki=function(q,W){if(typeof q!="string"||q.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof W!="boolean")throw new s('"allowMissing" argument must be a boolean');if(T(/^%?[^%]*%?$/,q)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=G(q),Y=B.length>0?B[0]:"",ge=Q("%"+Y+"%",W),ve=ge.name,ye=ge.value,Se=!1,Ce=ge.alias;Ce&&(Y=Ce[0],me(B,xe([0,1],Ce)));for(var Ve=1,_e=!0;Ve<B.length;Ve+=1){var je=B[Ve],Ke=$e(je,0,1),Xe=$e(je,-1);if((Ke==='"'||Ke==="'"||Ke==="`"||Xe==='"'||Xe==="'"||Xe==="`")&&Ke!==Xe)throw new a("property names with quotes must have matching quotes");if((je==="constructor"||!_e)&&(Se=!0),Y+="."+je,ve="%"+Y+"%",ne(z,ve))ye=z[ve];else if(ye!=null){if(!(je in ye)){if(!W)throw new s("base intrinsic for "+q+" exists, but the property is not available.");return}if(S&&Ve+1>=B.length){var Ye=S(ye,je);_e=!!Ye,_e&&"get"in Ye&&!("originalValue"in Ye.get)?ye=Ye.get:ye=ye[je]}else _e=ne(ye,je),ye=ye[je];_e&&!Se&&(z[ve]=ye)}}return ye},Ki}var Xi,Yc;function Vv(){if(Yc)return Xi;Yc=1;var e=at(),t=Qa(),r=es()(),n=Rt(),i=Me(),o=e("%Math.floor%");return Xi=function(s,l){if(typeof s!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||o(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in s&&n){var h=n(s,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!u)&&(r?t(s,"length",l,!0,!0):t(s,"length",l)),s},Xi}var Yi,Jc;function Kv(){if(Jc)return Yi;Jc=1;var e=Tr(),t=is(),r=$d();return Yi=function(){return r(e,t,arguments)},Yi}var Zc;function Kt(){return Zc||(Zc=1,function(e){var t=Vv(),r=Nn(),n=os(),i=Kv();e.exports=function(a){var s=n(arguments),l=a.length-(arguments.length-1);return t(s,1+(l>0?l:0),!0)},r?r(e.exports,"apply",{value:i}):e.exports.apply=i}(yi)),yi.exports}var Ji,Qc;function Ae(){if(Qc)return Ji;Qc=1;var e=at(),t=os(),r=t([e("%String.prototype.indexOf%")]);return Ji=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t([a]):a},Ji}var Zi,el;function Dd(){if(el)return Zi;el=1;var e=Ja(),t=Mn()(),r=Ae(),n=ts(),i=r("Array.prototype.push"),o=r("Object.prototype.propertyIsEnumerable"),a=t?n.getOwnPropertySymbols:null;return Zi=function(l,u){if(l==null)throw new TypeError("target must be an object");var f=n(l);if(arguments.length===1)return f;for(var d=1;d<arguments.length;++d){var h=n(arguments[d]),p=e(h),m=t&&(n.getOwnPropertySymbols||a);if(m)for(var g=m(h),x=0;x<g.length;++x){var y=g[x];o(h,y)&&i(p,y)}for(var S=0;S<p.length;++S){var A=p[S];if(o(h,A)){var C=h[A];f[A]=C}}}return f},Zi}var Qi,tl;function Bd(){if(tl)return Qi;tl=1;var e=Dd(),t=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",i=n.split(""),o={},a=0;a<i.length;++a)o[i[a]]=i[a];var s=Object.assign({},o),l="";for(var u in s)l+=u;return n!==l},r=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch{return n[1]==="y"}return!1};return Qi=function(){return!Object.assign||t()||r()?e:Object.assign},Qi}var eo,rl;function Xv(){if(rl)return eo;rl=1;var e=Ot(),t=Bd();return eo=function(){var n=t();return e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},eo}var to,nl;function Yv(){if(nl)return to;nl=1;var e=Ot(),t=Kt(),r=Dd(),n=Bd(),i=Xv(),o=t.apply(n()),a=function(l,u){return o(Object,arguments)};return e(a,{getPolyfill:n,implementation:r,shim:i}),to=a,to}var ro,il;function zd(){if(il)return ro;il=1;var e=at(),t=Kt(),r=t(e("String.prototype.indexOf"));return ro=function(i,o){var a=e(i,!!o);return typeof a=="function"&&r(i,".prototype.")>-1?t(a):a},ro}var no,ol;function Jv(){if(ol)return no;ol=1;var e=function(){return typeof(function(){}).name=="string"},t=Object.getOwnPropertyDescriptor;if(t)try{t([],"length")}catch{t=null}e.functionsHaveConfigurableNames=function(){if(!e()||!t)return!1;var i=t(function(){},"name");return!!i&&!!i.configurable};var r=Function.prototype.bind;return e.boundFunctionsHaveNames=function(){return e()&&typeof r=="function"&&(function(){}).bind().name!==""},no=e,no}var io,al;function Zv(){if(al)return io;al=1;var e=Qa(),t=es()(),r=Jv().functionsHaveConfigurableNames(),n=Me();return io=function(o,a){if(typeof o!="function")throw new n("`fn` is not a function");var s=arguments.length>2&&!!arguments[2];return(!s||r)&&(t?e(o,"name",a,!0,!0):e(o,"name",a)),o},io}var oo,sl;function Hd(){if(sl)return oo;sl=1;var e=Zv(),t=Me(),r=Object;return oo=e(function(){if(this==null||this!==r(this))throw new t("RegExp.prototype.flags getter called on non-object");var i="";return this.hasIndices&&(i+="d"),this.global&&(i+="g"),this.ignoreCase&&(i+="i"),this.multiline&&(i+="m"),this.dotAll&&(i+="s"),this.unicode&&(i+="u"),this.unicodeSets&&(i+="v"),this.sticky&&(i+="y"),i},"get flags",!0),oo}var ao,cl;function qd(){if(cl)return ao;cl=1;var e=Hd(),t=Ot().supportsDescriptors,r=Object.getOwnPropertyDescriptor;return ao=function(){if(t&&/a/mig.flags==="gim"){var i=r(RegExp.prototype,"flags");if(i&&typeof i.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var o="",a={};if(Object.defineProperty(a,"hasIndices",{get:function(){o+="d"}}),Object.defineProperty(a,"sticky",{get:function(){o+="y"}}),i.get.call(a),o==="dy")return i.get}}return e},ao}var so,ll;function Qv(){if(ll)return so;ll=1;var e=Ot().supportsDescriptors,t=qd(),r=Rt(),n=Object.defineProperty,i=Nd(),o=_d(),a=/a/;return so=function(){if(!e||!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=t(),u=o(a),f=r(u,"flags");return(!f||f.get!==l)&&n(u,"flags",{configurable:!0,enumerable:!1,get:l}),l},so}var co,ul;function ey(){if(ul)return co;ul=1;var e=Ot(),t=Kt(),r=Hd(),n=qd(),i=Qv(),o=t(n());return e(o,{getPolyfill:n,implementation:r,shim:i}),co=o,co}var tr={exports:{}},lo,dl;function Pt(){if(dl)return lo;dl=1;var e=Mn();return lo=function(){return e()&&!!Symbol.toStringTag},lo}var uo,fl;function Fd(){if(fl)return uo;fl=1;var e=Pt()(),t=Ae(),r=t("Object.prototype.toString"),n=function(s){return e&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:r(s)==="[object Arguments]"},i=function(s){return n(s)?!0:s!==null&&typeof s=="object"&&"length"in s&&typeof s.length=="number"&&s.length>=0&&r(s)!=="[object Array]"&&"callee"in s&&r(s.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,uo=o?n:i,uo}const ty={},ry=Object.freeze(Object.defineProperty({__proto__:null,default:ty},Symbol.toStringTag,{value:"Module"})),ny=Pd(ry);var fo,hl;function Ln(){if(hl)return fo;hl=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=i&&o&&typeof o.get=="function"?o.get:null,s=i&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,d=f?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,x=Function.prototype.toString,y=String.prototype.match,S=String.prototype.slice,A=String.prototype.replace,C=String.prototype.toUpperCase,E=String.prototype.toLowerCase,k=RegExp.prototype.test,M=Array.prototype.concat,R=Array.prototype.join,N=Array.prototype.slice,_=Math.floor,j=typeof BigInt=="function"?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",X=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===z||!0)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(v){return v.__proto__}:null);function ee(v,b){if(v===1/0||v===-1/0||v!==v||v&&v>-1e3&&v<1e3||k.call(/e/,b))return b;var ae=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof v=="number"){var se=v<0?-_(-v):_(v);if(se!==v){var ce=String(se),Z=S.call(b,ce.length+1);return A.call(ce,ae,"$&_")+"."+A.call(A.call(Z,/([0-9]{3})/g,"$&_"),/_$/,"")}}return A.call(b,ae,"$&_")}var ne=ny,xe=ne.custom,me=ge(xe)?xe:null,Le={__proto__:null,double:'"',single:"'"},$e={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};fo=function v(b,ae,se,ce){var Z=ae||{};if(Se(Z,"quoteStyle")&&!Se(Le,Z.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(Z,"maxStringLength")&&(typeof Z.maxStringLength=="number"?Z.maxStringLength<0&&Z.maxStringLength!==1/0:Z.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var lt=Se(Z,"customInspect")?Z.customInspect:!0;if(typeof lt!="boolean"&&lt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(Z,"indent")&&Z.indent!==null&&Z.indent!==" "&&!(parseInt(Z.indent,10)===Z.indent&&Z.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(Z,"numericSeparator")&&typeof Z.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bt=Z.numericSeparator;if(typeof b>"u")return"undefined";if(b===null)return"null";if(typeof b=="boolean")return b?"true":"false";if(typeof b=="string")return kt(b,Z);if(typeof b=="number"){if(b===0)return 1/0/b>0?"0":"-0";var Ee=String(b);return bt?ee(b,Ee):Ee}if(typeof b=="bigint"){var ut=String(b)+"n";return bt?ee(b,ut):ut}var Dn=typeof Z.depth>"u"?5:Z.depth;if(typeof se>"u"&&(se=0),se>=Dn&&Dn>0&&typeof b=="object")return G(b)?"[Array]":"[Object]";var Nt=lf(Z,se);if(typeof ce>"u")ce=[];else if(_e(ce,b)>=0)return"[Circular]";function De(Mt,Or,df){if(Or&&(ce=N.call(ce),ce.push(Or)),df){var gs={depth:Z.depth};return Se(Z,"quoteStyle")&&(gs.quoteStyle=Z.quoteStyle),v(Mt,gs,se+1,ce)}return v(Mt,Z,se+1,ce)}if(typeof b=="function"&&!ie(b)){var ls=Ve(b),us=Ir(b,De);return"[Function"+(ls?": "+ls:" (anonymous)")+"]"+(us.length>0?" { "+R.call(us,", ")+" }":"")}if(ge(b)){var ds=z?A.call(String(b),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(b);return typeof b=="object"&&!z?ct(ds):ds}if(st(b)){for(var Yt="<"+E.call(String(b.nodeName)),Bn=b.attributes||[],Rr=0;Rr<Bn.length;Rr++)Yt+=" "+Bn[Rr].name+"="+T(L(Bn[Rr].value),"double",Z);return Yt+=">",b.childNodes&&b.childNodes.length&&(Yt+="..."),Yt+="</"+E.call(String(b.nodeName))+">",Yt}if(G(b)){if(b.length===0)return"[]";var zn=Ir(b,De);return Nt&&!cf(zn)?"["+_n(zn,Nt)+"]":"[ "+R.call(zn,", ")+" ]"}if(q(b)){var Hn=Ir(b,De);return!("cause"in Error.prototype)&&"cause"in b&&!F.call(b,"cause")?"{ ["+String(b)+"] "+R.call(M.call("[cause]: "+De(b.cause),Hn),", ")+" }":Hn.length===0?"["+String(b)+"]":"{ ["+String(b)+"] "+R.call(Hn,", ")+" }"}if(typeof b=="object"&&lt){if(me&&typeof b[me]=="function"&&ne)return ne(b,{depth:Dn-se});if(lt!=="symbol"&&typeof b.inspect=="function")return b.inspect()}if(je(b)){var fs=[];return n&&n.call(b,function(Mt,Or){fs.push(De(Or,b,!0)+" => "+De(Mt,b))}),cs("Map",r.call(b),fs,Nt)}if(Ye(b)){var hs=[];return s&&s.call(b,function(Mt){hs.push(De(Mt,b))}),cs("Set",a.call(b),hs,Nt)}if(Ke(b))return $n("WeakMap");if(Er(b))return $n("WeakSet");if(Xe(b))return $n("WeakRef");if(B(b))return ct(De(Number(b)));if(ve(b))return ct(De(j.call(b)));if(Y(b))return ct(m.call(b));if(W(b))return ct(De(String(b)));if(typeof window<"u"&&b===window)return"{ [object Window] }";if(typeof globalThis<"u"&&b===globalThis||typeof wr<"u"&&b===wr)return"{ [object globalThis] }";if(!Q(b)&&!ie(b)){var qn=Ir(b,De),ps=re?re(b)===Object.prototype:b instanceof Object||b.constructor===Object,Fn=b instanceof Object?"":"null prototype",ms=!ps&&X&&Object(b)===b&&X in b?S.call(Ce(b),8,-1):Fn?"Object":"",uf=ps||typeof b.constructor!="function"?"":b.constructor.name?b.constructor.name+" ":"",Un=uf+(ms||Fn?"["+R.call(M.call([],ms||[],Fn||[]),": ")+"] ":"");return qn.length===0?Un+"{}":Nt?Un+"{"+_n(qn,Nt)+"}":Un+"{ "+R.call(qn,", ")+" }"}return String(b)};function T(v,b,ae){var se=ae.quoteStyle||b,ce=Le[se];return ce+v+ce}function L(v){return A.call(String(v),/"/g,"&quot;")}function V(v){return!X||!(typeof v=="object"&&(X in v||typeof v[X]<"u"))}function G(v){return Ce(v)==="[object Array]"&&V(v)}function Q(v){return Ce(v)==="[object Date]"&&V(v)}function ie(v){return Ce(v)==="[object RegExp]"&&V(v)}function q(v){return Ce(v)==="[object Error]"&&V(v)}function W(v){return Ce(v)==="[object String]"&&V(v)}function B(v){return Ce(v)==="[object Number]"&&V(v)}function Y(v){return Ce(v)==="[object Boolean]"&&V(v)}function ge(v){if(z)return v&&typeof v=="object"&&v instanceof Symbol;if(typeof v=="symbol")return!0;if(!v||typeof v!="object"||!$)return!1;try{return $.call(v),!0}catch{}return!1}function ve(v){if(!v||typeof v!="object"||!j)return!1;try{return j.call(v),!0}catch{}return!1}var ye=Object.prototype.hasOwnProperty||function(v){return v in this};function Se(v,b){return ye.call(v,b)}function Ce(v){return g.call(v)}function Ve(v){if(v.name)return v.name;var b=y.call(x.call(v),/^function\s*([\w$]+)/);return b?b[1]:null}function _e(v,b){if(v.indexOf)return v.indexOf(b);for(var ae=0,se=v.length;ae<se;ae++)if(v[ae]===b)return ae;return-1}function je(v){if(!r||!v||typeof v!="object")return!1;try{r.call(v);try{a.call(v)}catch{return!0}return v instanceof Map}catch{}return!1}function Ke(v){if(!u||!v||typeof v!="object")return!1;try{u.call(v,u);try{d.call(v,d)}catch{return!0}return v instanceof WeakMap}catch{}return!1}function Xe(v){if(!p||!v||typeof v!="object")return!1;try{return p.call(v),!0}catch{}return!1}function Ye(v){if(!a||!v||typeof v!="object")return!1;try{a.call(v);try{r.call(v)}catch{return!0}return v instanceof Set}catch{}return!1}function Er(v){if(!d||!v||typeof v!="object")return!1;try{d.call(v,d);try{u.call(v,u)}catch{return!0}return v instanceof WeakSet}catch{}return!1}function st(v){return!v||typeof v!="object"?!1:typeof HTMLElement<"u"&&v instanceof HTMLElement?!0:typeof v.nodeName=="string"&&typeof v.getAttribute=="function"}function kt(v,b){if(v.length>b.maxStringLength){var ae=v.length-b.maxStringLength,se="... "+ae+" more character"+(ae>1?"s":"");return kt(S.call(v,0,b.maxStringLength),b)+se}var ce=$e[b.quoteStyle||"single"];ce.lastIndex=0;var Z=A.call(A.call(v,ce,"\\$1"),/[\x00-\x1f]/g,Xt);return T(Z,"single",b)}function Xt(v){var b=v.charCodeAt(0),ae={8:"b",9:"t",10:"n",12:"f",13:"r"}[b];return ae?"\\"+ae:"\\x"+(b<16?"0":"")+C.call(b.toString(16))}function ct(v){return"Object("+v+")"}function $n(v){return v+" { ? }"}function cs(v,b,ae,se){var ce=se?_n(ae,se):R.call(ae,", ");return v+" ("+b+") {"+ce+"}"}function cf(v){for(var b=0;b<v.length;b++)if(_e(v[b],`
6
+ `)>=0)return!1;return!0}function lf(v,b){var ae;if(v.indent===" ")ae=" ";else if(typeof v.indent=="number"&&v.indent>0)ae=R.call(Array(v.indent+1)," ");else return null;return{base:ae,prev:R.call(Array(b+1),ae)}}function _n(v,b){if(v.length===0)return"";var ae=`
7
+ `+b.prev+b.base;return ae+R.call(v,","+ae)+`
8
+ `+b.prev}function Ir(v,b){var ae=G(v),se=[];if(ae){se.length=v.length;for(var ce=0;ce<v.length;ce++)se[ce]=Se(v,ce)?b(v[ce],v):""}var Z=typeof O=="function"?O(v):[],lt;if(z){lt={};for(var bt=0;bt<Z.length;bt++)lt["$"+Z[bt]]=Z[bt]}for(var Ee in v)Se(v,Ee)&&(ae&&String(Number(Ee))===Ee&&Ee<v.length||z&&lt["$"+Ee]instanceof Symbol||(k.call(/[^\w$]/,Ee)?se.push(b(Ee,v)+": "+b(v[Ee],v)):se.push(Ee+": "+b(v[Ee],v))));if(typeof O=="function")for(var ut=0;ut<Z.length;ut++)F.call(v,Z[ut])&&se.push("["+b(Z[ut])+"]: "+b(v[Z[ut]],v));return se}return fo}var ho,pl;function iy(){if(pl)return ho;pl=1;var e=Ln(),t=Me(),r=function(s,l,u){for(var f=s,d;(d=f.next)!=null;f=d)if(d.key===l)return f.next=d.next,u||(d.next=s.next,s.next=d),d},n=function(s,l){if(s){var u=r(s,l);return u&&u.value}},i=function(s,l,u){var f=r(s,l);f?f.value=u:s.next={key:l,next:s.next,value:u}},o=function(s,l){return s?!!r(s,l):!1},a=function(s,l){if(s)return r(s,l,!0)};return ho=function(){var l,u={assert:function(f){if(!u.has(f))throw new t("Side channel does not contain "+e(f))},delete:function(f){var d=l&&l.next,h=a(l,f);return h&&d&&d===h&&(l=void 0),!!h},get:function(f){return n(l,f)},has:function(f){return o(l,f)},set:function(f,d){l||(l={next:void 0}),i(l,f,d)}};return u},ho}var po,ml;function Ud(){if(ml)return po;ml=1;var e=at(),t=Ae(),r=Ln(),n=Me(),i=e("%Map%",!0),o=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return po=!!i&&function(){var d,h={assert:function(p){if(!h.has(p))throw new n("Side channel does not contain "+r(p))},delete:function(p){if(d){var m=l(d,p);return u(d)===0&&(d=void 0),m}return!1},get:function(p){if(d)return o(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,m){d||(d=new i),a(d,p,m)}};return h},po}var mo,gl;function oy(){if(gl)return mo;gl=1;var e=at(),t=Ae(),r=Ln(),n=Ud(),i=Me(),o=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return mo=o?function(){var d,h,p={assert:function(m){if(!p.has(m))throw new i("Side channel does not contain "+r(m))},delete:function(m){if(o&&m&&(typeof m=="object"||typeof m=="function")){if(d)return u(d,m)}else if(n&&h)return h.delete(m);return!1},get:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):h&&h.get(m)},has:function(m){return o&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!h&&h.has(m)},set:function(m,g){o&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new o),s(d,m,g)):n&&(h||(h=n()),h.set(m,g))}};return p}:n,mo}var go,xl;function Wd(){if(xl)return go;xl=1;var e=Me(),t=Ln(),r=iy(),n=Ud(),i=oy(),o=i||n||r;return go=function(){var s,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,f){s||(s=o()),s.set(u,f)}};return l},go}var xo,vl;function ay(){if(vl)return xo;vl=1;var e=as(),t=Wd()(),r=Me(),n={assert:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");if(t.assert(i),!n.has(i,o))throw new r("`"+o+"` is not present on `O`")},get:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return a&&a["$"+o]},has:function(i,o){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var a=t.get(i);return!!a&&e(a,"$"+o)},set:function(i,o,a){if(!i||typeof i!="object"&&typeof i!="function")throw new r("`O` is not an object");if(typeof o!="string")throw new r("`slot` must be a string");var s=t.get(i);s||(s={},t.set(i,s)),s["$"+o]=a}};return Object.freeze&&Object.freeze(n),xo=n,xo}var vo,yl;function sy(){if(yl)return vo;yl=1;var e=ay(),t=Za(),r=typeof StopIteration=="object"?StopIteration:null;return vo=function(i){if(!r)throw new t("this environment lacks StopIteration");e.set(i,"[[Done]]",!1);var o={next:function(){var s=e.get(this,"[[Iterator]]"),l=!!e.get(s,"[[Done]]");try{return{done:l,value:l?void 0:s.next()}}catch(u){if(e.set(s,"[[Done]]",!0),u!==r)throw u;return{done:!0,value:void 0}}}};return e.set(o,"[[Iterator]]",i),o},vo}var yo,bl;function Gd(){if(bl)return yo;bl=1;var e={}.toString;return yo=Array.isArray||function(t){return e.call(t)=="[object Array]"},yo}var bo,wl;function Vd(){if(wl)return bo;wl=1;var e=Ae(),t=e("String.prototype.valueOf"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object String]",o=Pt()();return bo=function(s){return typeof s=="string"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},bo}var wo,Sl;function Kd(){if(Sl)return wo;Sl=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;e||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),wo=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a),i)try{i.call(a)}catch{return!0}return a instanceof e}catch{}return!1},wo}var So,Al;function Xd(){if(Al)return So;Al=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;t||(r=function(a){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!i&&(r=function(a){return!1}),So=r||function(a){if(!a||typeof a!="object")return!1;try{if(i.call(a),n)try{n.call(a)}catch{return!0}return a instanceof t}catch{}return!1},So}var Cl;function cy(){if(Cl)return tr.exports;Cl=1;var e=Fd(),t=sy();if(rs()()||Mn()()){var r=Symbol.iterator;tr.exports=function(N){if(N!=null&&typeof N[r]<"u")return N[r]();if(e(N))return Array.prototype[r].call(N)}}else{var n=Gd(),i=Vd(),o=at(),a=o("%Map%",!0),s=o("%Set%",!0),l=zd(),u=l("Array.prototype.push"),f=l("String.prototype.charCodeAt"),d=l("String.prototype.slice"),h=function(N,_){var j=N.length;if(_+1>=j)return _+1;var O=f(N,_);if(O<55296||O>56319)return _+1;var $=f(N,_+1);return $<56320||$>57343?_+1:_+2},p=function(N){var _=0;return{next:function(){var O=_>=N.length,$;return O||($=N[_],_+=1),{done:O,value:$}}}},m=function(N,_){if(n(N)||e(N))return p(N);if(i(N)){var j=0;return{next:function(){var $=h(N,j),z=d(N,j,$);return j=$,{done:$>N.length,value:z}}}}if(_&&typeof N["_es6-shim iterator_"]<"u")return N["_es6-shim iterator_"]()};if(!a&&!s)tr.exports=function(N){if(N!=null)return m(N,!0)};else{var g=Kd(),x=Xd(),y=l("Map.prototype.forEach",!0),S=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var A=l("Map.prototype.iterator",!0),C=l("Set.prototype.iterator",!0);var E=l("Map.prototype.@@iterator",!0)||l("Map.prototype._es6-shim iterator_",!0),k=l("Set.prototype.@@iterator",!0)||l("Set.prototype._es6-shim iterator_",!0),M=function(N){if(g(N)){if(A)return t(A(N));if(E)return E(N);if(y){var _=[];return y(N,function(O,$){u(_,[$,O])}),p(_)}}if(x(N)){if(C)return t(C(N));if(k)return k(N);if(S){var j=[];return S(N,function(O){u(j,O)}),p(j)}}};tr.exports=function(N){return M(N)||m(N)}}}return tr.exports}var Ao,jl;function Yd(){if(jl)return Ao;jl=1;var e=function(t){return t!==t};return Ao=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},Ao}var Co,Tl;function Jd(){if(Tl)return Co;Tl=1;var e=Yd();return Co=function(){return typeof Object.is=="function"?Object.is:e},Co}var jo,El;function ly(){if(El)return jo;El=1;var e=Jd(),t=Ot();return jo=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},jo}var To,Il;function uy(){if(Il)return To;Il=1;var e=Ot(),t=Kt(),r=Yd(),n=Jd(),i=ly(),o=t(n(),Object);return e(o,{getPolyfill:n,implementation:r,shim:i}),To=o,To}var Eo,Rl;function Zd(){if(Rl)return Eo;Rl=1;var e=Kt(),t=Ae(),r=at(),n=r("%ArrayBuffer%",!0),i=t("ArrayBuffer.prototype.byteLength",!0),o=t("Object.prototype.toString"),a=!!n&&!i&&new n(0).slice,s=!!a&&e(a);return Eo=i||s?function(u){if(!u||typeof u!="object")return!1;try{return i?i(u):s(u,0),!0}catch{return!1}}:n?function(u){return o(u)==="[object ArrayBuffer]"}:function(u){return!1},Eo}var Io,Ol;function dy(){if(Ol)return Io;Ol=1;var e=Ae(),t=e("Date.prototype.getDay"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Date]",o=Pt()();return Io=function(s){return typeof s!="object"||s===null?!1:o?r(s):n(s)===i},Io}var Ro,Pl;function Qd(){if(Pl)return Ro;Pl=1;var e=Ae(),t=Pt()(),r=as(),n=Rt(),i;if(t){var o=e("RegExp.prototype.exec"),a={},s=function(){throw a},l={toString:s,valueOf:s};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=s),i=function(h){if(!h||typeof h!="object")return!1;var p=n(h,"lastIndex"),m=p&&r(p,"value");if(!m)return!1;try{o(h,l)}catch(g){return g===a}}}else{var u=e("Object.prototype.toString"),f="[object RegExp]";i=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:u(h)===f}}return Ro=i,Ro}var Oo,kl;function fy(){if(kl)return Oo;kl=1;var e=Ae(),t=e("SharedArrayBuffer.prototype.byteLength",!0);return Oo=t?function(n){if(!n||typeof n!="object")return!1;try{return t(n),!0}catch{return!1}}:function(n){return!1},Oo}var Po,Nl;function hy(){if(Nl)return Po;Nl=1;var e=Ae(),t=e("Number.prototype.toString"),r=function(s){try{return t(s),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Number]",o=Pt()();return Po=function(s){return typeof s=="number"?!0:!s||typeof s!="object"?!1:o?r(s):n(s)===i},Po}var ko,Ml;function py(){if(Ml)return ko;Ml=1;var e=Ae(),t=e("Boolean.prototype.toString"),r=e("Object.prototype.toString"),n=function(s){try{return t(s),!0}catch{return!1}},i="[object Boolean]",o=Pt()();return ko=function(s){return typeof s=="boolean"?!0:s===null||typeof s!="object"?!1:o?n(s):r(s)===i},ko}var zr={exports:{}},No,Ll;function my(){if(Ll)return No;Ll=1;var e=Ae(),t=Qd(),r=e("RegExp.prototype.exec"),n=Me();return No=function(o){if(!t(o))throw new n("`regex` must be a RegExp");return function(s){return r(o,s)!==null}},No}var $l;function gy(){if($l)return zr.exports;$l=1;var e=Ae(),t=e("Object.prototype.toString"),r=rs()(),n=my();if(r){var i=e("Symbol.prototype.toString"),o=n(/^Symbol\(.*\)$/),a=function(l){return typeof l.valueOf()!="symbol"?!1:o(i(l))};zr.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||t(l)!=="[object Symbol]")return!1;try{return a(l)}catch{return!1}}}else zr.exports=function(l){return!1};return zr.exports}var Hr={exports:{}},Mo,_l;function xy(){if(_l)return Mo;_l=1;var e=typeof BigInt<"u"&&BigInt;return Mo=function(){return typeof e=="function"&&typeof BigInt=="function"&&typeof e(42)=="bigint"&&typeof BigInt(42)=="bigint"},Mo}var Dl;function vy(){if(Dl)return Hr.exports;Dl=1;var e=xy()();if(e){var t=BigInt.prototype.valueOf,r=function(i){try{return t.call(i),!0}catch{}return!1};Hr.exports=function(i){return i===null||typeof i>"u"||typeof i=="boolean"||typeof i=="string"||typeof i=="number"||typeof i=="symbol"||typeof i=="function"?!1:typeof i=="bigint"?!0:r(i)}}else Hr.exports=function(i){return!1};return Hr.exports}var Lo,Bl;function yy(){if(Bl)return Lo;Bl=1;var e=Vd(),t=hy(),r=py(),n=gy(),i=vy();return Lo=function(a){if(a==null||typeof a!="object"&&typeof a!="function")return null;if(e(a))return"String";if(t(a))return"Number";if(r(a))return"Boolean";if(n(a))return"Symbol";if(i(a))return"BigInt"},Lo}var $o,zl;function by(){if(zl)return $o;zl=1;var e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,t=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,r;e||(r=function(a){return!1});var n=e?e.prototype.has:null,i=t?t.prototype.has:null;return!r&&!n&&(r=function(a){return!1}),$o=r||function(a){if(!a||typeof a!="object")return!1;try{if(n.call(a,n),i)try{i.call(a,i)}catch{return!0}return a instanceof e}catch{}return!1},$o}var qr={exports:{}},Hl;function wy(){if(Hl)return qr.exports;Hl=1;var e=at(),t=Ae(),r=e("%WeakSet%",!0),n=t("WeakSet.prototype.has",!0);if(n){var i=t("WeakMap.prototype.has",!0);qr.exports=function(a){if(!a||typeof a!="object")return!1;try{if(n(a,n),i)try{i(a,i)}catch{return!0}return a instanceof r}catch{}return!1}}else qr.exports=function(a){return!1};return qr.exports}var _o,ql;function Sy(){if(ql)return _o;ql=1;var e=Kd(),t=Xd(),r=by(),n=wy();return _o=function(o){if(o&&typeof o=="object"){if(e(o))return"Map";if(t(o))return"Set";if(r(o))return"WeakMap";if(n(o))return"WeakSet"}return!1},_o}var Do,Fl;function Ay(){if(Fl)return Do;Fl=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(S){S!==n&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(A){try{var C=e.call(A);return i.test(C)}catch{return!1}},a=function(A){try{return o(A)?!1:(e.call(A),!0)}catch{return!1}},s=Object.prototype.toString,l="[object Object]",u="[object Function]",f="[object GeneratorFunction]",d="[object HTMLAllCollection]",h="[object HTML document.all class]",p="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var y=document.all;s.call(y)===s.call(document.all)&&(x=function(A){if((g||!A)&&(typeof A>"u"||typeof A=="object"))try{var C=s.call(A);return(C===d||C===h||C===p||C===l)&&A("")==null}catch{}return!1})}return Do=t?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{t(A,null,r)}catch(C){if(C!==n)return!1}return!o(A)&&a(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(m)return a(A);if(o(A))return!1;var C=s.call(A);return C!==u&&C!==f&&!/^\[object HTML/.test(C)?!1:a(A)},Do}var Bo,Ul;function Cy(){if(Ul)return Bo;Ul=1;var e=Ay(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(l,u,f){for(var d=0,h=l.length;d<h;d++)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))},i=function(l,u,f){for(var d=0,h=l.length;d<h;d++)f==null?u(l.charAt(d),d,l):u.call(f,l.charAt(d),d,l)},o=function(l,u,f){for(var d in l)r.call(l,d)&&(f==null?u(l[d],d,l):u.call(f,l[d],d,l))};function a(s){return t.call(s)==="[object Array]"}return Bo=function(l,u,f){if(!e(u))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=f),a(l)?n(l,u,d):typeof l=="string"?i(l,u,d):o(l,u,d)},Bo}var zo,Wl;function jy(){return Wl||(Wl=1,zo=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),zo}var Ho,Gl;function Ty(){if(Gl)return Ho;Gl=1;var e=jy(),t=typeof globalThis>"u"?wr:globalThis;return Ho=function(){for(var n=[],i=0;i<e.length;i++)typeof t[e[i]]=="function"&&(n[n.length]=e[i]);return n},Ho}var qo,Vl;function Ey(){if(Vl)return qo;Vl=1;var e=Cy(),t=Ty(),r=Kt(),n=Ae(),i=Rt(),o=n("Object.prototype.toString"),a=Pt()(),s=typeof globalThis>"u"?wr:globalThis,l=t(),u=n("String.prototype.slice"),f=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(x,y){for(var S=0;S<x.length;S+=1)if(x[S]===y)return S;return-1},h={__proto__:null};a&&i&&f?e(l,function(g){var x=new s[g];if(Symbol.toStringTag in x){var y=f(x),S=i(y,Symbol.toStringTag);if(!S){var A=f(y);S=i(A,Symbol.toStringTag)}h["$"+g]=r(S.get)}}):e(l,function(g){var x=new s[g],y=x.slice||x.set;y&&(h["$"+g]=r(y))});var p=function(x){var y=!1;return e(h,function(S,A){if(!y)try{"$"+S(x)===A&&(y=u(A,1))}catch{}}),y},m=function(x){var y=!1;return e(h,function(S,A){if(!y)try{S(x),y=u(A,1)}catch{}}),y};return qo=function(x){if(!x||typeof x!="object")return!1;if(!a){var y=u(o(x),8,-1);return d(l,y)>-1?y:y!=="Object"?!1:m(x)}return i?p(x):null},qo}var Fo,Kl;function Iy(){if(Kl)return Fo;Kl=1;var e=Ae(),t=e("ArrayBuffer.prototype.byteLength",!0),r=Zd();return Fo=function(i){return r(i)?t?t(i):i.byteLength:NaN},Fo}var Uo,Xl;function Ry(){if(Xl)return Uo;Xl=1;var e=Yv(),t=zd(),r=ey(),n=at(),i=cy(),o=Wd(),a=uy(),s=Fd(),l=Gd(),u=Zd(),f=dy(),d=Qd(),h=fy(),p=Ja(),m=yy(),g=Sy(),x=Ey(),y=Iy(),S=t("SharedArrayBuffer.prototype.byteLength",!0),A=t("Date.prototype.getTime"),C=Object.getPrototypeOf,E=t("Object.prototype.toString"),k=n("%Set%",!0),M=t("Map.prototype.has",!0),R=t("Map.prototype.get",!0),N=t("Map.prototype.size",!0),_=t("Set.prototype.add",!0),j=t("Set.prototype.delete",!0),O=t("Set.prototype.has",!0),$=t("Set.prototype.size",!0);function z(T,L,V,G){for(var Q=i(T),ie;(ie=Q.next())&&!ie.done;)if(ne(L,ie.value,V,G))return j(T,ie.value),!0;return!1}function X(T){if(typeof T>"u")return null;if(typeof T!="object")return typeof T=="symbol"?!1:typeof T=="string"||typeof T=="number"?+T==+T:!0}function F(T,L,V,G,Q,ie){var q=X(V);if(q!=null)return q;var W=R(L,q),B=e({},Q,{strict:!1});return typeof W>"u"&&!M(L,q)||!ne(G,W,B,ie)?!1:!M(T,q)&&ne(G,W,B,ie)}function re(T,L,V){var G=X(V);return G??(O(L,G)&&!O(T,G))}function ee(T,L,V,G,Q,ie){for(var q=i(T),W,B;(W=q.next())&&!W.done;)if(B=W.value,ne(V,B,Q,ie)&&ne(G,R(L,B),Q,ie))return j(T,B),!0;return!1}function ne(T,L,V,G){var Q=V||{};if(Q.strict?a(T,L):T===L)return!0;var ie=m(T),q=m(L);if(ie!==q)return!1;if(!T||!L||typeof T!="object"&&typeof L!="object")return Q.strict?a(T,L):T==L;var W=G.has(T),B=G.has(L),Y;if(W&&B){if(G.get(T)===G.get(L))return!0}else Y={};return W||G.set(T,Y),B||G.set(L,Y),$e(T,L,Q,G)}function xe(T){return!T||typeof T!="object"||typeof T.length!="number"||typeof T.copy!="function"||typeof T.slice!="function"||T.length>0&&typeof T[0]!="number"?!1:!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))}function me(T,L,V,G){if($(T)!==$(L))return!1;for(var Q=i(T),ie=i(L),q,W,B;(q=Q.next())&&!q.done;)if(q.value&&typeof q.value=="object")B||(B=new k),_(B,q.value);else if(!O(L,q.value)){if(V.strict||!re(T,L,q.value))return!1;B||(B=new k),_(B,q.value)}if(B){for(;(W=ie.next())&&!W.done;)if(W.value&&typeof W.value=="object"){if(!z(B,W.value,V.strict,G))return!1}else if(!V.strict&&!O(T,W.value)&&!z(B,W.value,V.strict,G))return!1;return $(B)===0}return!0}function Le(T,L,V,G){if(N(T)!==N(L))return!1;for(var Q=i(T),ie=i(L),q,W,B,Y,ge,ve;(q=Q.next())&&!q.done;)if(Y=q.value[0],ge=q.value[1],Y&&typeof Y=="object")B||(B=new k),_(B,Y);else if(ve=R(L,Y),typeof ve>"u"&&!M(L,Y)||!ne(ge,ve,V,G)){if(V.strict||!F(T,L,Y,ge,V,G))return!1;B||(B=new k),_(B,Y)}if(B){for(;(W=ie.next())&&!W.done;)if(Y=W.value[0],ve=W.value[1],Y&&typeof Y=="object"){if(!ee(B,T,Y,ve,V,G))return!1}else if(!V.strict&&(!T.has(Y)||!ne(R(T,Y),ve,V,G))&&!ee(B,T,Y,ve,e({},V,{strict:!1}),G))return!1;return $(B)===0}return!0}function $e(T,L,V,G){var Q,ie;if(typeof T!=typeof L||T==null||L==null||E(T)!==E(L)||s(T)!==s(L))return!1;var q=l(T),W=l(L);if(q!==W)return!1;var B=T instanceof Error,Y=L instanceof Error;if(B!==Y||(B||Y)&&(T.name!==L.name||T.message!==L.message))return!1;var ge=d(T),ve=d(L);if(ge!==ve||(ge||ve)&&(T.source!==L.source||r(T)!==r(L)))return!1;var ye=f(T),Se=f(L);if(ye!==Se||(ye||Se)&&A(T)!==A(L)||V.strict&&C&&C(T)!==C(L))return!1;var Ce=x(T),Ve=x(L);if(Ce!==Ve)return!1;if(Ce||Ve){if(T.length!==L.length)return!1;for(Q=0;Q<T.length;Q++)if(T[Q]!==L[Q])return!1;return!0}var _e=xe(T),je=xe(L);if(_e!==je)return!1;if(_e||je){if(T.length!==L.length)return!1;for(Q=0;Q<T.length;Q++)if(T[Q]!==L[Q])return!1;return!0}var Ke=u(T),Xe=u(L);if(Ke!==Xe)return!1;if(Ke||Xe)return y(T)!==y(L)?!1:typeof Uint8Array=="function"&&ne(new Uint8Array(T),new Uint8Array(L),V,G);var Ye=h(T),Er=h(L);if(Ye!==Er)return!1;if(Ye||Er)return S(T)!==S(L)?!1:typeof Uint8Array=="function"&&ne(new Uint8Array(T),new Uint8Array(L),V,G);if(typeof T!=typeof L)return!1;var st=p(T),kt=p(L);if(st.length!==kt.length)return!1;for(st.sort(),kt.sort(),Q=st.length-1;Q>=0;Q--)if(st[Q]!=kt[Q])return!1;for(Q=st.length-1;Q>=0;Q--)if(ie=st[Q],!ne(T[ie],L[ie],V,G))return!1;var Xt=g(T),ct=g(L);return Xt!==ct?!1:Xt==="Set"||ct==="Set"?me(T,L,V,G):Xt==="Map"?Le(T,L,V,G):!0}return Uo=function(L,V,G){return ne(L,V,G,o())},Uo}var Oy=Ry();const ef=Od(Oy);function Py(e){return e}function tf(e,t,r,n){const i=Py,[o,a]=w.useState(i(r)),s=w.useRef(o);return w.useEffect(()=>{const l=()=>{const u={...r,...e.getAttributes(t)};Object.keys(u).forEach(d=>{(u[d]===null||u[d]===void 0)&&(u[d]=r?r[d]:null)});const f=i(u);ef(s.current,f)||(a(f),s.current=f)};return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e,r,t,i]),o}function ky({editor:e}){const{t}=H.useLocale(),{width:r,height:n,src:i}=tf(e,St.name,{width:0,height:0,src:"",defaultShowPicker:!1}),[o,a]=w.useState(!1),[s,l]=w.useState(""),u=w.useCallback(()=>{a(!1)},[a]);w.useEffect(()=>{o&&l(i)},[o,i]);const f=w.useCallback(()=>{const x=Id(s);e.chain().updateAttributes(St.name,{src:(x==null?void 0:x.src)||s}).setNodeSelection(e.state.selection.from).focus().run(),a(!1)},[e,s,a]),d=w.useCallback(()=>{window.open(i,"_blank")},[i]),h=w.useCallback(()=>{a(!0)},[a]),p=w.useCallback(x=>{e.chain().updateAttributes(St.name,x).setNodeSelection(e.state.selection.from).focus().run()},[e]),m=w.useCallback(()=>e.isActive(St.name)&&!i,[e,i]),g=w.useCallback(()=>Fa(St.name,e),[e]);return c.jsxs(c.Fragment,{children:[c.jsx(pe.BubbleMenu,{className:"bubble-menu",editor:e,pluginKey:"iframe-bubble-menu",shouldShow:m,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},placement:"bottom-start",offset:[-2,16],zIndex:9999},children:c.jsxs("div",{className:"richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800",children:[c.jsx(U,{action:d,icon:"Eye",tooltip:"Visit Link"}),c.jsx(U,{action:h,icon:"Pencil",tooltip:"Open Edit Link"}),c.jsx(Ed,{height:n,onOk:p,width:r,children:c.jsx(U,{icon:"Settings",tooltip:t("editor.settings")})}),c.jsx(U,{action:g,icon:"Trash2",tooltip:t("editor.delete")})]})}),c.jsxs(Cr,{onOpenChange:a,open:o,children:[c.jsx(jr,{}),c.jsxs(Ft,{children:[c.jsx(cd,{children:c.jsx(Ut,{children:"Edit Link Iframe"})}),c.jsx(Ie,{autoFocus:!0,onInput:x=>l(x.target.value),placeholder:"Enter link",type:"url",value:s}),c.jsxs(In,{children:[c.jsx(we,{onClick:u,children:"Cancel"}),c.jsx(we,{onClick:f,children:"OK"})]})]})]})]})}function Ny({editor:e,disabled:t,bubbleMenu:r}){const n=e.extensionManager.extensions.map(o=>o.name),i=()=>{var o,a,s,l,u,f,d,h,p,m;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?c.jsx(K1,{editor:e},"columns"):null,n.includes("table")&&!((a=r==null?void 0:r.tableConfig)!=null&&a.hidden)?c.jsx(k0,{actions:(s=r==null?void 0:r.tableConfig)==null?void 0:s.actions,editor:e},"table"):null,n.includes("link")&&!((l=r==null?void 0:r.linkConfig)!=null&&l.hidden)?c.jsx(i1,{disabled:t,editor:e},"link"):null,n.includes(Ht.name)&&!((u=r==null?void 0:r.imageConfig)!=null&&u.hidden)?c.jsx(H1,{disabled:t,editor:e},"image"):null,n.includes(Da.name)&&!((f=r==null?void 0:r.imageGifConfig)!=null&&f.hidden)?c.jsx(q1,{disabled:t,editor:e},"imageGif"):null,n.includes("video")&&!((d=r==null?void 0:r.videoConfig)!=null&&d.hidden)?c.jsx(F1,{disabled:t,editor:e},"video"):null,n.includes("iframe")&&!((h=r==null?void 0:r.iframeConfig)!=null&&h.hidden)?c.jsx(ky,{disabled:t,editor:e},"iframe"):null,(p=r==null?void 0:r.floatingMenuConfig)!=null&&p.hidden?null:c.jsx(s0,{disabled:t,editor:e},"content"),(m=r==null?void 0:r.textConfig)!=null&&m.hidden?null:c.jsx(u0,{disabled:t,editor:e},"text")]};return r!=null&&r.render?r.render({editor:e,disabled:t||!1,extensionsNames:n,bubbleMenu:r},i()):i().filter(Boolean)}function Yl(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:c.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 rf(e){const{t}=H.useLocale(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:a,colors:s=H.COLORS_LIST}=e,l=w.useMemo(()=>{const p=s,m=[];for(let g=0;g<p.length;g+=10)m.push(p.slice(g,g+10));return m},[s]),[u,f]=w.useState([]),d=p=>{const m=[...u],g=m.indexOf(p);g!==-1&&m.splice(g,1),m.unshift(p),m.length>10&&m.pop(),f(m)};function h(p){if(p===void 0){o==null||o(p),a==null||a(p);return}/^#([\da-f]{3}){1,2}$/i.test(p)&&(o==null||o(p),a==null||a(p),d(p))}return c.jsxs(Wt,{modal:!0,children:[c.jsx(Gt,{asChild:!0,className:"!richtext-p-0",disabled:n,children:e==null?void 0:e.children}),c.jsx(It,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:c.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>h(void 0),children:[c.jsx(Yl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.nofill")})]}):c.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{h(void 0)},children:[c.jsx(Yl,{}),c.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.default")})]}),l.map((p,m)=>c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:p.map((g,x)=>c.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:()=>h(g),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:g},children:g===i?c.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:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${x}`))},m)),c.jsxs("div",{children:[c.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:t("editor.recent")}),c.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:u==null?void 0:u.map((p,m)=>c.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:()=>h(p),children:c.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:p},children:c.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:c.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${m}`))})]}),c.jsx(My,{setColor:h})]})})]})}function My({setColor:e}){const[t,r]=w.useState("#000000"),[n,i]=w.useState(!1),{t:o}=H.useLocale();return w.useEffect(()=>()=>{i(!1)},[]),c.jsxs(Wt,{open:n,children:[c.jsx(Gt,{asChild:!0,children:c.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",onClick:a=>{a.preventDefault(),i(!0)},children:[o("editor.color.more"),"..."]})}),c.jsxs(It,{children:[c.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[c.jsx(jf.HexColorPicker,{color:t,onChange:r}),c.jsx(Ie,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:t.slice(1),onChange:a=>{a.preventDefault(),r(`#${a.target.value}`)}})]}),c.jsx(Be,{className:"richtext-my-[10px]"}),c.jsx(we,{className:"richtext-w-full",onClick:a=>{a.preventDefault(),e(t),i(!1)},children:c.jsx(P.Plus,{size:16})})]})]})}function Ly({editor:e,disabled:t,toolbar:r}){const{t:n,lang:i}=H.useLocale(),o=w.useMemo(()=>{const u=[...e.extensionManager.extensions].sort((d,h)=>{const p=d.options.sort??-1,m=h.options.sort??-1;return p-m});let f=[];for(const d of u){const{button:h,divider:p=!1,spacer:m=!1,toolbar:g=!0}=d.options;if(!h||!M1(h)||!g)continue;const x=h({editor:e,extension:d,t:n});if(Array.isArray(x)){const y=x.map((S,A)=>({button:S,divider:A===x.length-1?p:!1,spacer:A===0?m:!1,type:d.type,name:d.name}));f=[...f,...y];continue}f.push({button:x,divider:p,spacer:m,type:d.type,name:d.name})}return f},[e,n,i]),a=l=>c.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:t?"none":"auto",opacity:t?.5:1},children:c.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:l})}),s=o.map((l,u)=>{var d,h;const f=l.button.component;return c.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(l==null?void 0:l.spacer)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),c.jsx(f,{...l.button.componentProps,disabled:t||((h=(d=l==null?void 0:l.button)==null?void 0:d.componentProps)==null?void 0:h.disabled)}),(l==null?void 0:l.divider)&&c.jsx(Be,{orientation:"vertical",className:"!richtext-h-auto !richtext-mx-2"})]},`toolbar-item-${u}`)});return r&&(r!=null&&r.render)?r.render({editor:e,disabled:t||!1},o,s,a):a(s)}function $y({editor:e,extensions:t}){const{t:r}=H.useLocale(),n=w.useMemo(()=>{var i,o,a;return(a=(o=(i=t==null?void 0:t.find(s=>s.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:a.limit},[t]);return n?c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):c.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:c.jsx("div",{className:"richtext-flex richtext-flex-col",children:c.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:c.jsxs("span",{children:[e.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function _y(){const{toasts:e}=jd();return c.jsxs(Z1,{children:[e.map(({id:t,title:r,description:n,action:i,...o})=>c.jsxs(wd,{...o,children:[c.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[r&&c.jsx(Ad,{children:r}),n&&c.jsx(Cd,{children:n})]}),i,c.jsx(Sd,{})]},t)),c.jsx(bd,{})]})}const Dy=`
9
9
  .reactjs-tiptap-editor,
10
10
  .richtext-dialog-content {
11
11
  button,
@@ -138,4 +138,4 @@ div[data-tippy-root] {
138
138
  color: inherit;
139
139
  }
140
140
  }
141
- `,By=S.memo(({children:e,id:t})=>{const[,r]=ud(a=>a.value),[,n]=dd(a=>a.value),i=a=>{r({value:a.detail})},o=a=>{n({value:a.detail})};return S.useEffect(()=>{const a=xr(vt.EDIT(t),i),s=xr(vt.UPDATE_THEME(t),o);return()=>{a(),s()}},[]),c.jsx(c.Fragment,{children:e})});function zy({children:e,id:t}){return c.jsx(m1,{children:c.jsx(g1,{children:c.jsx(By,{id:t,children:e})})})}function Hy(){const[e]=dd(t=>t.value);return e}const qy={setTheme:(e,t)=>{Pn(vt.UPDATE_THEME(e),t)}},Jl="data-rc-order",Zl="data-rc-priority",Fy="rc-util-key",ma=new Map;function Uy(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function nf({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Fy}function ss(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Wy(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function of(e){return[...(ma.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function af(e,t={}){const{csp:r,prepend:n,priority:i=0}=t,o=Wy(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(Jl,o),a&&i&&s.setAttribute(Zl,`${i}`),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;const l=ss(t),{firstChild:u}=l;if(n){if(a){const f=of(l).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Jl)))return!1;const h=Number(d.getAttribute(Zl)||0);return i>=h});if(f.length>0)return l.insertBefore(s,f.at(-1).nextSibling),s}u.before(s)}else l.append(s);return s}function sf(e,t={}){const r=ss(t);return of(r).find(n=>n.getAttribute(nf(t))===e)}function Gy(e,t={}){const r=sf(e,t);r&&r.remove()}function Vy(e,t){const r=ma.get(e);if(!r||!Uy(document,r)){const n=af("",t),{parentNode:i}=n;ma.set(e,i),n.remove()}}function Ky(e,t,r={}){var a,s,l;const n=ss(r);Vy(n,r);const i=sf(t,r);if(i)return(a=r.csp)!=null&&a.nonce&&i.nonce!==((s=r.csp)==null?void 0:s.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const o=af(e,r);return o.setAttribute(nf(r),t),o}function Xy(e,t){const{content:r,extensions:n,useEditorOptions:i={}}=e,o=S.useId(),a=S.useMemo(()=>{const d=Dg(n,n,"name");return[...n.map(p=>{const m=n.find(g=>g.name===p.name);return m?p.configure(m.options):p}),...d].map((p,m)=>p.configure({sort:m}))},[n]),s=Bt(d=>{var p;const h=u(d,e.output);(p=e==null?void 0:e.onChangeContent)==null||p.call(e,h)},H.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME),l=pe.useEditor({extensions:a,content:r,immediatelyRender:(e==null?void 0:e.immediatelyRender)||!1,onUpdate:({editor:d})=>{s&&s(d)},...i});S.useImperativeHandle(t,()=>({editor:l})),S.useEffect(()=>{document.documentElement.classList.toggle("dark",e.dark),qy.setTheme(o,e.dark?"dark":"light")},[e.dark]),S.useEffect(()=>{l==null||l.setEditable(!(e!=null&&e.disabled)),Tv.setDisable(o,!(e!=null&&e.disabled))},[l,e==null?void 0:e.disabled]),S.useEffect(()=>((e==null?void 0:e.resetCSS)!==!1&&Ky(Dy,"react-tiptap-reset"),()=>{Gy("react-tiptap-reset")}),[e==null?void 0:e.resetCSS]);function u(d,h){return e!=null&&e.removeDefaultWrapper?h==="html"?d.isEmpty?"":d.getHTML():h==="json"?d.isEmpty?{}:d.getJSON():h==="text"?d.isEmpty?"":d.getText():"":h==="html"?d.getHTML():h==="json"?d.getJSON():h==="text"?d.getText():""}S.useLayoutEffect(()=>{l&&(l.id=o)},[o,l]),S.useEffect(()=>()=>{var d;(d=l==null?void 0:l.destroy)==null||d.call(l)},[]);const f=hd(l,"characterCount");return l?c.jsxs("div",{className:"reactjs-tiptap-editor",children:[c.jsx(zy,{id:o,children:c.jsx(rv,{delayDuration:0,disableHoverableContent:!0,children:c.jsx("div",{className:"richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1",children:c.jsxs("div",{className:"richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col",children:[!(e!=null&&e.hideToolbar)&&c.jsx(Ly,{disabled:!!(e!=null&&e.disabled),editor:l,toolbar:e.toolbar}),c.jsx(pe.EditorContent,{className:`richtext-relative ${(e==null?void 0:e.contentClass)||""}`,editor:l}),f&&c.jsx($y,{editor:l,extensions:n}),!(e!=null&&e.hideBubble)&&c.jsx(Ny,{bubbleMenu:e==null?void 0:e.bubbleMenu,disabled:e==null?void 0:e.disabled,editor:l})]})})})}),c.jsx(_y,{})]}):c.jsx(c.Fragment,{})}const Yy=S.forwardRef(Xy);exports.ActionButton=F;exports.Button=be;exports.ColorPicker=rf;exports.Column=qa;exports.ColumnActionButton=V1;exports.Dialog=Cr;exports.DialogContent=Ft;exports.DialogFooter=In;exports.DialogTitle=Ut;exports.DialogTrigger=jr;exports.DropdownMenu=md;exports.DropdownMenuCheckboxItem=xd;exports.DropdownMenuContent=Ua;exports.DropdownMenuSeparator=Wa;exports.DropdownMenuShortcut=vd;exports.DropdownMenuTrigger=gd;exports.EVENTS=vt;exports.EXTENSION_PRIORITY_HIGHEST=pd;exports.ExportPdf=Vu;exports.ExportWord=Ku;exports.HighlightActionButton=Xu;exports.IconComponent=ye;exports.Iframe=St;exports.Image=_a;exports.Image$1=Ht;exports.ImageGif=Da;exports.IndentProps=Xr;exports.Input=Ie;exports.Label=tt;exports.Link=od;exports.MenuDown=Gu;exports.MultiColumn=vr;exports.Popover=Wt;exports.PopoverContent=It;exports.PopoverTrigger=Gt;exports.RichTextEditor=Yy;exports.Separator=De;exports.SizeSetter=Ed;exports.Switch=Ga;exports.Toggle=Ka;exports.Tooltip=Xa;exports.TooltipContent=kn;exports.TooltipTrigger=Ya;exports.Video=Ba;exports.actionDialogImage=fd;exports.clamp=P1;exports.cn=ee;exports.commonjsGlobal=wr;exports.createIndentCommand=a0;exports.dataURLtoFile=ld;exports.debounce=Ar;exports.deepEqual=ef;exports.deleteNode=Fa;exports.dispatchEvent=Pn;exports.ensureNameValueOptions=$1;exports.extractFileExtension=u1;exports.extractFilename=l1;exports.getAugmentedNamespace=Pd;exports.getBubbleDrawer=Jx;exports.getBubbleMermaid=Yx;exports.getDefaultExportFromCjs=Od;exports.getShortcutKey=qu;exports.getShortcutKeys=Fu;exports.hasExtension=hd;exports.icons=Ea;exports.listenEvent=xr;exports.normalizeFileSize=d1;exports.normalizeFileType=f1;exports.throttle=Bt;exports.useAttributes=tf;exports.useEditableEditor=Rd;exports.useTheme=Hy;exports.useToast=jd;
141
+ `,By=w.memo(({children:e,id:t})=>{const[,r]=ud(a=>a.value),[,n]=dd(a=>a.value),i=a=>{r({value:a.detail})},o=a=>{n({value:a.detail})};return w.useEffect(()=>{const a=xr(vt.EDIT(t),i),s=xr(vt.UPDATE_THEME(t),o);return()=>{a(),s()}},[]),c.jsx(c.Fragment,{children:e})});function zy({children:e,id:t}){return c.jsx(m1,{children:c.jsx(g1,{children:c.jsx(By,{id:t,children:e})})})}function Hy(){const[e]=dd(t=>t.value);return e}const qy={setTheme:(e,t)=>{Pn(vt.UPDATE_THEME(e),t)}},Jl="data-rc-order",Zl="data-rc-priority",Fy="rc-util-key",ma=new Map;function Uy(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function nf({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Fy}function ss(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Wy(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function of(e){return[...(ma.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function af(e,t={}){const{csp:r,prepend:n,priority:i=0}=t,o=Wy(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(Jl,o),a&&i&&s.setAttribute(Zl,`${i}`),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;const l=ss(t),{firstChild:u}=l;if(n){if(a){const f=of(l).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Jl)))return!1;const h=Number(d.getAttribute(Zl)||0);return i>=h});if(f.length>0)return l.insertBefore(s,f.at(-1).nextSibling),s}u.before(s)}else l.append(s);return s}function sf(e,t={}){const r=ss(t);return of(r).find(n=>n.getAttribute(nf(t))===e)}function Gy(e,t={}){const r=sf(e,t);r&&r.remove()}function Vy(e,t){const r=ma.get(e);if(!r||!Uy(document,r)){const n=af("",t),{parentNode:i}=n;ma.set(e,i),n.remove()}}function Ky(e,t,r={}){var a,s,l;const n=ss(r);Vy(n,r);const i=sf(t,r);if(i)return(a=r.csp)!=null&&a.nonce&&i.nonce!==((s=r.csp)==null?void 0:s.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const o=af(e,r);return o.setAttribute(nf(r),t),o}function Xy(e,t){const{content:r,extensions:n,useEditorOptions:i={}}=e,o=w.useId(),a=w.useMemo(()=>{const d=Dg(n,n,"name");return[...n.map(p=>{const m=n.find(g=>g.name===p.name);return m?p.configure(m.options):p}),...d].map((p,m)=>p.configure({sort:m}))},[n]),s=Bt(d=>{var p;const h=u(d,e.output);(p=e==null?void 0:e.onChangeContent)==null||p.call(e,h)},H.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME),l=pe.useEditor({extensions:a,content:r,immediatelyRender:(e==null?void 0:e.immediatelyRender)||!1,onUpdate:({editor:d})=>{s&&s(d)},...i});w.useImperativeHandle(t,()=>({editor:l})),w.useEffect(()=>{document.documentElement.classList.toggle("dark",e.dark),qy.setTheme(o,e.dark?"dark":"light")},[e.dark]),w.useEffect(()=>{l==null||l.setEditable(!(e!=null&&e.disabled)),Tv.setDisable(o,!(e!=null&&e.disabled))},[l,e==null?void 0:e.disabled]),w.useEffect(()=>((e==null?void 0:e.resetCSS)!==!1&&Ky(Dy,"react-tiptap-reset"),()=>{Gy("react-tiptap-reset")}),[e==null?void 0:e.resetCSS]);function u(d,h){return e!=null&&e.removeDefaultWrapper?h==="html"?d.isEmpty?"":d.getHTML():h==="json"?d.isEmpty?{}:d.getJSON():h==="text"?d.isEmpty?"":d.getText():"":h==="html"?d.getHTML():h==="json"?d.getJSON():h==="text"?d.getText():""}w.useLayoutEffect(()=>{l&&(l.id=o)},[o,l]),w.useEffect(()=>()=>{var d;(d=l==null?void 0:l.destroy)==null||d.call(l)},[]);const f=hd(l,"characterCount");return l?c.jsxs("div",{className:"reactjs-tiptap-editor",children:[c.jsx(zy,{id:o,children:c.jsx(rv,{delayDuration:0,disableHoverableContent:!0,children:c.jsx("div",{className:"richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1",children:c.jsxs("div",{className:"richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col",children:[!(e!=null&&e.hideToolbar)&&c.jsx(Ly,{disabled:!!(e!=null&&e.disabled),editor:l,toolbar:e.toolbar}),c.jsx(pe.EditorContent,{className:`richtext-relative ${(e==null?void 0:e.contentClass)||""}`,editor:l}),f&&c.jsx($y,{editor:l,extensions:n}),!(e!=null&&e.hideBubble)&&c.jsx(Ny,{bubbleMenu:e==null?void 0:e.bubbleMenu,disabled:e==null?void 0:e.disabled,editor:l})]})})})}),c.jsx(_y,{})]}):c.jsx(c.Fragment,{})}const Yy=w.forwardRef(Xy);exports.ActionButton=U;exports.Button=we;exports.ColorPicker=rf;exports.Column=qa;exports.ColumnActionButton=V1;exports.Dialog=Cr;exports.DialogContent=Ft;exports.DialogFooter=In;exports.DialogTitle=Ut;exports.DialogTrigger=jr;exports.DropdownMenu=md;exports.DropdownMenuCheckboxItem=xd;exports.DropdownMenuContent=Ua;exports.DropdownMenuSeparator=Wa;exports.DropdownMenuShortcut=vd;exports.DropdownMenuTrigger=gd;exports.EVENTS=vt;exports.EXTENSION_PRIORITY_HIGHEST=pd;exports.ExportPdf=Vu;exports.ExportWord=Ku;exports.HighlightActionButton=Xu;exports.IconComponent=be;exports.Iframe=St;exports.Image=_a;exports.Image$1=Ht;exports.ImageGif=Da;exports.IndentProps=Xr;exports.Input=Ie;exports.Label=rt;exports.Link=od;exports.MenuDown=Gu;exports.MultiColumn=vr;exports.Popover=Wt;exports.PopoverContent=It;exports.PopoverTrigger=Gt;exports.RichTextEditor=Yy;exports.Separator=Be;exports.SizeSetter=Ed;exports.Switch=Ga;exports.Toggle=Ka;exports.Tooltip=Xa;exports.TooltipContent=kn;exports.TooltipTrigger=Ya;exports.Video=Ba;exports.actionDialogImage=fd;exports.clamp=P1;exports.cn=te;exports.commonjsGlobal=wr;exports.createIndentCommand=a0;exports.dataURLtoFile=ld;exports.debounce=Ar;exports.deepEqual=ef;exports.deleteNode=Fa;exports.dispatchEvent=Pn;exports.ensureNameValueOptions=$1;exports.extractFileExtension=u1;exports.extractFilename=l1;exports.getAugmentedNamespace=Pd;exports.getBubbleDrawer=Jx;exports.getBubbleMermaid=Yx;exports.getDefaultExportFromCjs=Od;exports.getShortcutKey=qu;exports.getShortcutKeys=Fu;exports.hasExtension=hd;exports.icons=Ea;exports.listenEvent=xr;exports.normalizeFileSize=d1;exports.normalizeFileType=f1;exports.throttle=Bt;exports.useAttributes=tf;exports.useEditableEditor=Rd;exports.useTheme=Hy;exports.useToast=jd;