reactjs-tiptap-editor 0.3.12 → 0.3.13

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 (126) hide show
  1. package/lib/{ActionMenuButton-BQ2ojtpo.js → ActionMenuButton-BfH5nAGi.js} +1 -1
  2. package/lib/{ActionMenuButton-OfnmanTP.cjs → ActionMenuButton-Cbbnqd-L.cjs} +1 -1
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +5 -5
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +2 -2
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +2 -2
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +2 -2
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +2 -2
  15. package/lib/CodeBlock.cjs +1 -1
  16. package/lib/CodeBlock.js +3 -3
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +2 -2
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +3 -3
  21. package/lib/Document.js +1 -1
  22. package/lib/{Drawer-9QMJnenp.js → Drawer-DUXFBfgE.js} +3 -3
  23. package/lib/{Drawer-BN8H4Zb2.cjs → Drawer-jPHImfyr.cjs} +1 -1
  24. package/lib/Drawer.cjs +1 -1
  25. package/lib/Drawer.js +4 -4
  26. package/lib/Emoji.cjs +1 -1
  27. package/lib/Emoji.js +4 -4
  28. package/lib/{Excalidraw-B95hkXm5.js → Excalidraw-BBOIIhij.js} +3 -3
  29. package/lib/{Excalidraw-iG1WleD5.cjs → Excalidraw-CwZ3g3p-.cjs} +1 -1
  30. package/lib/Excalidraw.cjs +1 -1
  31. package/lib/Excalidraw.js +3 -3
  32. package/lib/ExportPdf.cjs +1 -1
  33. package/lib/ExportPdf.js +2 -2
  34. package/lib/ExportWord.cjs +1 -1
  35. package/lib/ExportWord.js +2 -2
  36. package/lib/FontFamily.cjs +1 -1
  37. package/lib/FontFamily.js +4 -4
  38. package/lib/FontSize.cjs +1 -1
  39. package/lib/FontSize.js +3 -3
  40. package/lib/FormatPainter.cjs +1 -1
  41. package/lib/FormatPainter.js +2 -2
  42. package/lib/Heading.cjs +1 -1
  43. package/lib/Heading.js +3 -3
  44. package/lib/Highlight.cjs +1 -1
  45. package/lib/Highlight.js +2 -2
  46. package/lib/History.cjs +1 -1
  47. package/lib/History.js +2 -2
  48. package/lib/HorizontalRule.cjs +1 -1
  49. package/lib/HorizontalRule.js +2 -2
  50. package/lib/Iframe.cjs +1 -1
  51. package/lib/Iframe.js +3 -3
  52. package/lib/Image.cjs +1 -1
  53. package/lib/Image.js +3 -3
  54. package/lib/ImageGif.cjs +1 -1
  55. package/lib/ImageGif.js +3 -3
  56. package/lib/ImportWord.cjs +1 -1
  57. package/lib/ImportWord.js +2 -2
  58. package/lib/Indent.cjs +1 -1
  59. package/lib/Indent.js +2 -2
  60. package/lib/Italic.cjs +1 -1
  61. package/lib/Italic.js +2 -2
  62. package/lib/Katex.cjs +1 -1
  63. package/lib/Katex.js +4 -4
  64. package/lib/LineHeight.cjs +1 -1
  65. package/lib/LineHeight.js +2 -2
  66. package/lib/Link.cjs +1 -5
  67. package/lib/Link.d.cts +3 -1
  68. package/lib/Link.d.ts +3 -1
  69. package/lib/Link.js +4 -1048
  70. package/lib/ListItem.js +1 -1
  71. package/lib/Mention.js +3 -3
  72. package/lib/Mermaid.cjs +2 -2
  73. package/lib/Mermaid.js +4 -4
  74. package/lib/MoreMark.cjs +1 -1
  75. package/lib/MoreMark.js +3 -3
  76. package/lib/MultiColumn.cjs +1 -1
  77. package/lib/MultiColumn.js +2 -2
  78. package/lib/OrderedList.cjs +1 -1
  79. package/lib/OrderedList.js +2 -2
  80. package/lib/RichTextEditor-C3sK_Ys3.cjs +141 -0
  81. package/lib/{RichTextEditor-CFwUKN9i.js → RichTextEditor-OW4s40FH.js} +4817 -3766
  82. package/lib/SearchAndReplace.cjs +1 -1
  83. package/lib/SearchAndReplace.js +2 -2
  84. package/lib/Selection.js +1 -1
  85. package/lib/SlashCommand.cjs +1 -1
  86. package/lib/SlashCommand.js +18 -18
  87. package/lib/Strike.cjs +1 -1
  88. package/lib/Strike.js +2 -2
  89. package/lib/SubAndSuperScript.cjs +1 -1
  90. package/lib/SubAndSuperScript.js +3 -3
  91. package/lib/Table.cjs +2 -2
  92. package/lib/Table.js +16 -16
  93. package/lib/TableOfContent.cjs +1 -1
  94. package/lib/TableOfContent.js +5 -5
  95. package/lib/TaskList.cjs +1 -1
  96. package/lib/TaskList.js +2 -2
  97. package/lib/TextAlign.cjs +1 -1
  98. package/lib/TextAlign.js +2 -2
  99. package/lib/TextBubble.cjs +1 -1
  100. package/lib/TextBubble.js +2 -2
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +2 -2
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +2 -2
  105. package/lib/TrailingNode.js +1 -1
  106. package/lib/{Twitter-ChRmdJB0.js → Twitter-2LOf4hFb.js} +44 -44
  107. package/lib/{Twitter-DbokWMq-.cjs → Twitter-Cg58uzB-.cjs} +3 -3
  108. package/lib/Twitter.cjs +1 -1
  109. package/lib/Twitter.js +3 -3
  110. package/lib/Video.cjs +1 -1
  111. package/lib/Video.js +2 -2
  112. package/lib/bubble-extra.cjs +2 -2
  113. package/lib/bubble-extra.js +6 -6
  114. package/lib/{dom-dataset-2RXYq9wp.js → dom-dataset-CHDbKz5J.js} +1 -1
  115. package/lib/{index-CXIIg9Sq.js → index-BWx1Mchx.js} +21 -21
  116. package/lib/{index-BGwJ0NfQ.js → index-DEFQHExY.js} +1 -1
  117. package/lib/{index-BkoojfPK.js → index-DIPntess.js} +1 -1
  118. package/lib/{index-fKx6CYUM.js → index-oQutU45z.js} +1 -1
  119. package/lib/index.cjs +1 -1
  120. package/lib/index.d.cts +2 -0
  121. package/lib/index.d.ts +2 -0
  122. package/lib/index.js +43 -43
  123. package/lib/{textarea-D5VHsW3K.js → textarea-DM-_io94.js} +1 -1
  124. package/lib/{textarea-BfhvC1nW.cjs → textarea-DNz8Tnud.cjs} +1 -1
  125. package/package.json +1 -1
  126. package/lib/RichTextEditor-COwI-b24.cjs +0 -137
@@ -1,137 +0,0 @@
1
- "use strict";var yu=Object.defineProperty;var bu=(e,t,r)=>t in e?yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rr=(e,t,r)=>bu(e,typeof t!="symbol"?t+"":t,r);const a=require("react/jsx-runtime"),b=require("react"),le=require("./dom-dataset-Cuy-pIfj.cjs"),xc=require("@radix-ui/react-slot"),B=require("./index-Dz3YxLE7.cjs"),wu=require("@radix-ui/react-separator"),Su=require("@radix-ui/react-toast"),R=require("lucide-react"),Au=require("@radix-ui/react-tooltip"),ju=require("@radix-ui/react-toggle"),nr=require("@radix-ui/react-icons"),Cu=require("@radix-ui/react-popover"),Iu=require("@radix-ui/react-label"),Tu=require("@radix-ui/react-dialog"),H=require("./index-CSvnpArE.cjs"),Pu=require("re-resizable"),Ru=require("react-image-crop"),Ou=require("@radix-ui/react-tabs"),Eu=require("@radix-ui/react-checkbox"),vc=require("tippy.js"),Mu=require("react-colorful"),Nu=require("@radix-ui/react-switch"),$u=require("@radix-ui/react-dropdown-menu");function Ie(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 ee=Ie(b),yc=Ie(wu),je=Ie(Su),Gt=Ie(Au),bc=Ie(ju),kt=Ie(Cu),wc=Ie(Iu),Ce=Ie(Tu),ct=Ie(Ou),Mi=Ie(Eu),Ni=Ie(Nu),ce=Ie($u);var Sc=typeof global=="object"&&global&&global.Object===Object&&global,_u=typeof self=="object"&&self&&self.Object===Object&&self,ke=Sc||_u||Function("return this")(),$e=ke.Symbol,Ac=Object.prototype,ku=Ac.hasOwnProperty,Lu=Ac.toString,Ot=$e?$e.toStringTag:void 0;function Du(e){var t=ku.call(e,Ot),r=e[Ot];try{e[Ot]=void 0;var n=!0}catch{}var i=Lu.call(e);return n&&(t?e[Ot]=r:delete e[Ot]),i}var Bu=Object.prototype,zu=Bu.toString;function qu(e){return zu.call(e)}var Fu="[object Null]",Hu="[object Undefined]",Fo=$e?$e.toStringTag:void 0;function it(e){return e==null?e===void 0?Hu:Fu:Fo&&Fo in Object(e)?Du(e):qu(e)}function Ue(e){return e!=null&&typeof e=="object"}var Uu="[object Symbol]";function xr(e){return typeof e=="symbol"||Ue(e)&&it(e)==Uu}function jc(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 _e=Array.isArray,Ho=$e?$e.prototype:void 0,Uo=Ho?Ho.toString:void 0;function hr(e){if(typeof e=="string")return e;if(_e(e))return jc(e,hr)+"";if(xr(e))return Uo?Uo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Gu=/\s/;function Wu(e){for(var t=e.length;t--&&Gu.test(e.charAt(t)););return t}var Vu=/^\s+/;function Xu(e){return e&&e.slice(0,Wu(e)+1).replace(Vu,"")}function rt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Go=NaN,Yu=/^[-+]0x[0-9a-f]+$/i,Ku=/^0b[01]+$/i,Zu=/^0o[0-7]+$/i,Ju=parseInt;function xt(e){if(typeof e=="number")return e;if(xr(e))return Go;if(rt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=rt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xu(e);var r=Ku.test(e);return r||Zu.test(e)?Ju(e.slice(2),r?2:8):Yu.test(e)?Go:+e}var Wo=1/0,Qu=17976931348623157e292;function ed(e){if(!e)return e===0?e:0;if(e=xt(e),e===Wo||e===-Wo){var t=e<0?-1:1;return t*Qu}return e===e?e:0}function td(e){var t=ed(e),r=t%1;return t===t?r?t-r:t:0}function Yi(e){return e}var rd="[object AsyncFunction]",nd="[object Function]",id="[object GeneratorFunction]",od="[object Proxy]";function Cc(e){if(!rt(e))return!1;var t=it(e);return t==nd||t==id||t==rd||t==od}var Dr=ke["__core-js_shared__"],Vo=function(){var e=/[^.]+$/.exec(Dr&&Dr.keys&&Dr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ad(e){return!!Vo&&Vo in e}var sd=Function.prototype,cd=sd.toString;function lt(e){if(e!=null){try{return cd.call(e)}catch{}try{return e+""}catch{}}return""}var ld=/[\\^$.*+?()[\]{}|]/g,ud=/^\[object .+?Constructor\]$/,dd=Function.prototype,fd=Object.prototype,hd=dd.toString,pd=fd.hasOwnProperty,md=RegExp("^"+hd.call(pd).replace(ld,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gd(e){if(!rt(e)||ad(e))return!1;var t=Cc(e)?md:ud;return t.test(lt(e))}function xd(e,t){return e==null?void 0:e[t]}function ut(e,t){var r=xd(e,t);return gd(r)?r:void 0}var $i=ut(ke,"WeakMap");function vd(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 yd=800,bd=16,wd=Date.now;function Sd(e){var t=0,r=0;return function(){var n=wd(),i=bd-(n-r);if(r=n,i>0){if(++t>=yd)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ad(e){return function(){return e}}var Xo=function(){try{var e=ut(Object,"defineProperty");return e({},"",{}),e}catch{}}(),jd=Xo?function(e,t){return Xo(e,"toString",{configurable:!0,enumerable:!1,value:Ad(t),writable:!0})}:Yi,Cd=Sd(jd);function Id(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 Td(e){return e!==e}function Pd(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Rd(e,t,r){return t===t?Pd(e,t,r):Id(e,Td,r)}function Od(e,t){var r=e==null?0:e.length;return!!r&&Rd(e,t,0)>-1}var Ed=9007199254740991,Md=/^(?:0|[1-9]\d*)$/;function Ic(e,t){var r=typeof e;return t=t??Ed,!!t&&(r=="number"||r!="symbol"&&Md.test(e))&&e>-1&&e%1==0&&e<t}function Tc(e,t){return e===t||e!==e&&t!==t}var Yo=Math.max;function Nd(e,t,r){return t=Yo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Yo(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=n[i];return c[t]=r(s),vd(e,this,c)}}function $d(e,t){return Cd(Nd(e,t,Yi),e+"")}var _d=9007199254740991;function Ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_d}function Pc(e){return e!=null&&Ki(e.length)&&!Cc(e)}var kd=Object.prototype;function Ld(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kd;return e===r}function Dd(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Bd="[object Arguments]";function Ko(e){return Ue(e)&&it(e)==Bd}var Rc=Object.prototype,zd=Rc.hasOwnProperty,qd=Rc.propertyIsEnumerable,Zi=Ko(function(){return arguments}())?Ko:function(e){return Ue(e)&&zd.call(e,"callee")&&!qd.call(e,"callee")};function Fd(){return!1}var Oc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zo=Oc&&typeof module=="object"&&module&&!module.nodeType&&module,Hd=Zo&&Zo.exports===Oc,Jo=Hd?ke.Buffer:void 0,Ud=Jo?Jo.isBuffer:void 0,_i=Ud||Fd,Gd="[object Arguments]",Wd="[object Array]",Vd="[object Boolean]",Xd="[object Date]",Yd="[object Error]",Kd="[object Function]",Zd="[object Map]",Jd="[object Number]",Qd="[object Object]",ef="[object RegExp]",tf="[object Set]",rf="[object String]",nf="[object WeakMap]",of="[object ArrayBuffer]",af="[object DataView]",sf="[object Float32Array]",cf="[object Float64Array]",lf="[object Int8Array]",uf="[object Int16Array]",df="[object Int32Array]",ff="[object Uint8Array]",hf="[object Uint8ClampedArray]",pf="[object Uint16Array]",mf="[object Uint32Array]",se={};se[sf]=se[cf]=se[lf]=se[uf]=se[df]=se[ff]=se[hf]=se[pf]=se[mf]=!0;se[Gd]=se[Wd]=se[of]=se[Vd]=se[af]=se[Xd]=se[Yd]=se[Kd]=se[Zd]=se[Jd]=se[Qd]=se[ef]=se[tf]=se[rf]=se[nf]=!1;function gf(e){return Ue(e)&&Ki(e.length)&&!!se[it(e)]}function Ji(e){return function(t){return e(t)}}var Ec=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$t=Ec&&typeof module=="object"&&module&&!module.nodeType&&module,xf=$t&&$t.exports===Ec,Br=xf&&Sc.process,pr=function(){try{var e=$t&&$t.require&&$t.require("util").types;return e||Br&&Br.binding&&Br.binding("util")}catch{}}(),Qo=pr&&pr.isTypedArray,Mc=Qo?Ji(Qo):gf,vf=Object.prototype,yf=vf.hasOwnProperty;function bf(e,t){var r=_e(e),n=!r&&Zi(e),i=!r&&!n&&_i(e),o=!r&&!n&&!i&&Mc(e),s=r||n||i||o,c=s?Dd(e.length,String):[],l=c.length;for(var u in e)yf.call(e,u)&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ic(u,l)))&&c.push(u);return c}function wf(e,t){return function(r){return e(t(r))}}var Sf=wf(Object.keys,Object),Af=Object.prototype,jf=Af.hasOwnProperty;function Cf(e){if(!Ld(e))return Sf(e);var t=[];for(var r in Object(e))jf.call(e,r)&&r!="constructor"&&t.push(r);return t}function Nc(e){return Pc(e)?bf(e):Cf(e)}var If=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tf=/^\w*$/;function Qi(e,t){if(_e(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||xr(e)?!0:Tf.test(e)||!If.test(e)||t!=null&&e in Object(t)}var Lt=ut(Object,"create");function Pf(){this.__data__=Lt?Lt(null):{},this.size=0}function Rf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Of="__lodash_hash_undefined__",Ef=Object.prototype,Mf=Ef.hasOwnProperty;function Nf(e){var t=this.__data__;if(Lt){var r=t[e];return r===Of?void 0:r}return Mf.call(t,e)?t[e]:void 0}var $f=Object.prototype,_f=$f.hasOwnProperty;function kf(e){var t=this.__data__;return Lt?t[e]!==void 0:_f.call(t,e)}var Lf="__lodash_hash_undefined__";function Df(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Lt&&t===void 0?Lf:t,this}function st(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])}}st.prototype.clear=Pf;st.prototype.delete=Rf;st.prototype.get=Nf;st.prototype.has=kf;st.prototype.set=Df;function Bf(){this.__data__=[],this.size=0}function vr(e,t){for(var r=e.length;r--;)if(Tc(e[r][0],t))return r;return-1}var zf=Array.prototype,qf=zf.splice;function Ff(e){var t=this.__data__,r=vr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():qf.call(t,r,1),--this.size,!0}function Hf(e){var t=this.__data__,r=vr(t,e);return r<0?void 0:t[r][1]}function Uf(e){return vr(this.__data__,e)>-1}function Gf(e,t){var r=this.__data__,n=vr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ge(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])}}Ge.prototype.clear=Bf;Ge.prototype.delete=Ff;Ge.prototype.get=Hf;Ge.prototype.has=Uf;Ge.prototype.set=Gf;var Dt=ut(ke,"Map");function Wf(){this.size=0,this.__data__={hash:new st,map:new(Dt||Ge),string:new st}}function Vf(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function yr(e,t){var r=e.__data__;return Vf(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Xf(e){var t=yr(this,e).delete(e);return this.size-=t?1:0,t}function Yf(e){return yr(this,e).get(e)}function Kf(e){return yr(this,e).has(e)}function Zf(e,t){var r=yr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function We(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])}}We.prototype.clear=Wf;We.prototype.delete=Xf;We.prototype.get=Yf;We.prototype.has=Kf;We.prototype.set=Zf;var Jf="Expected a function";function eo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Jf);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 s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(eo.Cache||We),r}eo.Cache=We;var Qf=500;function eh(e){var t=eo(e,function(n){return r.size===Qf&&r.clear(),n}),r=t.cache;return t}var th=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rh=/\\(\\)?/g,nh=eh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(th,function(r,n,i,o){t.push(i?o.replace(rh,"$1"):n||r)}),t});function ki(e){return e==null?"":hr(e)}function $c(e,t){return _e(e)?e:Qi(e,t)?[e]:nh(ki(e))}function br(e){if(typeof e=="string"||xr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _c(e,t){t=$c(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[br(t[r++])];return r&&r==n?e:void 0}function ih(e,t,r){var n=e==null?void 0:_c(e,t);return n===void 0?r:n}function kc(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var ea=$e?$e.isConcatSpreadable:void 0;function oh(e){return _e(e)||Zi(e)||!!(ea&&e&&e[ea])}function ah(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=oh),i||(i=[]);++o<s;){var c=e[o];r(c)&&kc(i,c)}return i}function sh(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 ch(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:sh(e,t,r)}var lh="\\ud800-\\udfff",uh="\\u0300-\\u036f",dh="\\ufe20-\\ufe2f",fh="\\u20d0-\\u20ff",hh=uh+dh+fh,ph="\\ufe0e\\ufe0f",mh="\\u200d",gh=RegExp("["+mh+lh+hh+ph+"]");function to(e){return gh.test(e)}function xh(e){return e.split("")}var Lc="\\ud800-\\udfff",vh="\\u0300-\\u036f",yh="\\ufe20-\\ufe2f",bh="\\u20d0-\\u20ff",wh=vh+yh+bh,Sh="\\ufe0e\\ufe0f",Ah="["+Lc+"]",Li="["+wh+"]",Di="\\ud83c[\\udffb-\\udfff]",jh="(?:"+Li+"|"+Di+")",Dc="[^"+Lc+"]",Bc="(?:\\ud83c[\\udde6-\\uddff]){2}",zc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ch="\\u200d",qc=jh+"?",Fc="["+Sh+"]?",Ih="(?:"+Ch+"(?:"+[Dc,Bc,zc].join("|")+")"+Fc+qc+")*",Th=Fc+qc+Ih,Ph="(?:"+[Dc+Li+"?",Li,Bc,zc,Ah].join("|")+")",Rh=RegExp(Di+"(?="+Di+")|"+Ph+Th,"g");function Oh(e){return e.match(Rh)||[]}function Eh(e){return to(e)?Oh(e):xh(e)}function Mh(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function Hc(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=xt(r),r=r===r?r:0),t!==void 0&&(t=xt(t),t=t===t?t:0),Mh(xt(e),t,r)}function Nh(){this.__data__=new Ge,this.size=0}function $h(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function _h(e){return this.__data__.get(e)}function kh(e){return this.__data__.has(e)}var Lh=200;function Dh(e,t){var r=this.__data__;if(r instanceof Ge){var n=r.__data__;if(!Dt||n.length<Lh-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new We(n)}return r.set(e,t),this.size=r.size,this}function Fe(e){var t=this.__data__=new Ge(e);this.size=t.size}Fe.prototype.clear=Nh;Fe.prototype.delete=$h;Fe.prototype.get=_h;Fe.prototype.has=kh;Fe.prototype.set=Dh;function Bh(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function zh(){return[]}var qh=Object.prototype,Fh=qh.propertyIsEnumerable,ta=Object.getOwnPropertySymbols,Hh=ta?function(e){return e==null?[]:(e=Object(e),Bh(ta(e),function(t){return Fh.call(e,t)}))}:zh;function Uh(e,t,r){var n=t(e);return _e(e)?n:kc(n,r(e))}function ra(e){return Uh(e,Nc,Hh)}var Bi=ut(ke,"DataView"),zi=ut(ke,"Promise"),qi=ut(ke,"Set"),na="[object Map]",Gh="[object Object]",ia="[object Promise]",oa="[object Set]",aa="[object WeakMap]",sa="[object DataView]",Wh=lt(Bi),Vh=lt(Dt),Xh=lt(zi),Yh=lt(qi),Kh=lt($i),tt=it;(Bi&&tt(new Bi(new ArrayBuffer(1)))!=sa||Dt&&tt(new Dt)!=na||zi&&tt(zi.resolve())!=ia||qi&&tt(new qi)!=oa||$i&&tt(new $i)!=aa)&&(tt=function(e){var t=it(e),r=t==Gh?e.constructor:void 0,n=r?lt(r):"";if(n)switch(n){case Wh:return sa;case Vh:return na;case Xh:return ia;case Yh:return oa;case Kh:return aa}return t});var ca=ke.Uint8Array,Zh="__lodash_hash_undefined__";function Jh(e){return this.__data__.set(e,Zh),this}function Qh(e){return this.__data__.has(e)}function Bt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new We;++t<r;)this.add(e[t])}Bt.prototype.add=Bt.prototype.push=Jh;Bt.prototype.has=Qh;function ep(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 Uc(e,t){return e.has(t)}var tp=1,rp=2;function Gc(e,t,r,n,i,o){var s=r&tp,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))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&rp?new Bt:void 0;for(o.set(e,t),o.set(t,e);++d<c;){var m=e[d],g=t[d];if(n)var v=s?n(g,m,d,t,e,o):n(m,g,d,e,t,o);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!ep(t,function(S,A){if(!Uc(p,A)&&(m===S||i(m,S,r,n,o)))return p.push(A)})){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 np(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function ip(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var op=1,ap=2,sp="[object Boolean]",cp="[object Date]",lp="[object Error]",up="[object Map]",dp="[object Number]",fp="[object RegExp]",hp="[object Set]",pp="[object String]",mp="[object Symbol]",gp="[object ArrayBuffer]",xp="[object DataView]",la=$e?$e.prototype:void 0,zr=la?la.valueOf:void 0;function vp(e,t,r,n,i,o,s){switch(r){case xp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gp:return!(e.byteLength!=t.byteLength||!o(new ca(e),new ca(t)));case sp:case cp:case dp:return Tc(+e,+t);case lp:return e.name==t.name&&e.message==t.message;case fp:case pp:return e==t+"";case up:var c=np;case hp:var l=n&op;if(c||(c=ip),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=ap,s.set(e,t);var f=Gc(c(e),c(t),n,i,o,s);return s.delete(e),f;case mp:if(zr)return zr.call(e)==zr.call(t)}return!1}var yp=1,bp=Object.prototype,wp=bp.hasOwnProperty;function Sp(e,t,r,n,i,o){var s=r&yp,c=ra(e),l=c.length,u=ra(t),f=u.length;if(l!=f&&!s)return!1;for(var d=l;d--;){var h=c[d];if(!(s?h in t:wp.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 v=s;++d<l;){h=c[d];var S=e[h],A=t[h];if(n)var w=s?n(A,S,h,t,e,o):n(S,A,h,e,t,o);if(!(w===void 0?S===A||i(S,A,r,n,o):w)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var j=e.constructor,O=t.constructor;j!=O&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof O=="function"&&O instanceof O)&&(g=!1)}return o.delete(e),o.delete(t),g}var Ap=1,ua="[object Arguments]",da="[object Array]",ir="[object Object]",jp=Object.prototype,fa=jp.hasOwnProperty;function Cp(e,t,r,n,i,o){var s=_e(e),c=_e(t),l=s?da:tt(e),u=c?da:tt(t);l=l==ua?ir:l,u=u==ua?ir:u;var f=l==ir,d=u==ir,h=l==u;if(h&&_i(e)){if(!_i(t))return!1;s=!0,f=!1}if(h&&!f)return o||(o=new Fe),s||Mc(e)?Gc(e,t,r,n,i,o):vp(e,t,l,r,n,i,o);if(!(r&Ap)){var p=f&&fa.call(e,"__wrapped__"),m=d&&fa.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,v=m?t.value():t;return o||(o=new Fe),i(g,v,r,n,o)}}return h?(o||(o=new Fe),Sp(e,t,r,n,i,o)):!1}function ro(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ue(e)&&!Ue(t)?e!==e&&t!==t:Cp(e,t,r,n,ro,i)}var Ip=1,Tp=2;function Pp(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var c=s[0],l=e[c],u=s[1];if(s[2]){if(l===void 0&&!(c in e))return!1}else{var f=new Fe,d;if(!(d===void 0?ro(u,l,Ip|Tp,n,f):d))return!1}}return!0}function Wc(e){return e===e&&!rt(e)}function Rp(e){for(var t=Nc(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Wc(i)]}return t}function Vc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Op(e){var t=Rp(e);return t.length==1&&t[0][2]?Vc(t[0][0],t[0][1]):function(r){return r===e||Pp(r,e,t)}}function Ep(e,t){return e!=null&&t in Object(e)}function Mp(e,t,r){t=$c(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=br(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Ki(i)&&Ic(s,i)&&(_e(e)||Zi(e)))}function Np(e,t){return e!=null&&Mp(e,t,Ep)}var $p=1,_p=2;function kp(e,t){return Qi(e)&&Wc(t)?Vc(br(e),t):function(r){var n=ih(r,e);return n===void 0&&n===t?Np(r,e):ro(t,n,$p|_p)}}function Xc(e){return function(t){return t==null?void 0:t[e]}}function Lp(e){return function(t){return _c(t,e)}}function Dp(e){return Qi(e)?Xc(br(e)):Lp(e)}function Bp(e){return typeof e=="function"?e:e==null?Yi:typeof e=="object"?_e(e)?kp(e[0],e[1]):Op(e):Dp(e)}var qr=function(){return ke.Date.now()},zp="Expected a function",qp=Math.max,Fp=Math.min;function Wt(e,t,r){var n,i,o,s,c,l,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(zp);t=xt(t)||0,rt(r)&&(f=!!r.leading,d="maxWait"in r,o=d?qp(xt(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(M){var N=n,T=i;return n=i=void 0,u=M,s=e.apply(T,N),s}function m(M){return u=M,c=setTimeout(S,t),f?p(M):s}function g(M){var N=M-l,T=M-u,C=t-N;return d?Fp(C,o-T):C}function v(M){var N=M-l,T=M-u;return l===void 0||N>=t||N<0||d&&T>=o}function S(){var M=qr();if(v(M))return A(M);c=setTimeout(S,g(M))}function A(M){return c=void 0,h&&n?p(M):(n=i=void 0,s)}function w(){c!==void 0&&clearTimeout(c),u=0,n=l=i=c=void 0}function j(){return c===void 0?s:A(qr())}function O(){var M=qr(),N=v(M);if(n=arguments,i=this,l=M,N){if(c===void 0)return m(l);if(d)return clearTimeout(c),c=setTimeout(S,t),p(l)}return c===void 0&&(c=setTimeout(S,t)),s}return O.cancel=w,O.flush=j,O}function Fr(e){return Ue(e)&&Pc(e)}var Hp=200;function Up(e,t,r,n){var i=-1,o=Od,s=!0,c=e.length,l=[],u=t.length;if(!c)return l;r&&(t=jc(t,Ji(r))),t.length>=Hp&&(o=Uc,s=!1,t=new Bt(t));e:for(;++i<c;){var f=e[i],d=r==null?f:r(f);if(f=f!==0?f:0,s&&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 Gp(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Wp=$d(function(e,t){var r=Gp(t);return Fr(r)&&(r=void 0),Fr(e)?Up(e,ah(t,1,Fr),Bp(r)):[]}),Vp="[object Number]";function mr(e){return typeof e=="number"||Ue(e)&&it(e)==Vp}var Xp="[object RegExp]";function Yp(e){return Ue(e)&&it(e)==Xp}var ha=pr&&pr.isRegExp,Kp=ha?Ji(ha):Yp,Zp=Xc("length"),Yc="\\ud800-\\udfff",Jp="\\u0300-\\u036f",Qp="\\ufe20-\\ufe2f",em="\\u20d0-\\u20ff",tm=Jp+Qp+em,rm="\\ufe0e\\ufe0f",nm="["+Yc+"]",Fi="["+tm+"]",Hi="\\ud83c[\\udffb-\\udfff]",im="(?:"+Fi+"|"+Hi+")",Kc="[^"+Yc+"]",Zc="(?:\\ud83c[\\udde6-\\uddff]){2}",Jc="[\\ud800-\\udbff][\\udc00-\\udfff]",om="\\u200d",Qc=im+"?",el="["+rm+"]?",am="(?:"+om+"(?:"+[Kc,Zc,Jc].join("|")+")"+el+Qc+")*",sm=el+Qc+am,cm="(?:"+[Kc+Fi+"?",Fi,Zc,Jc,nm].join("|")+")",pa=RegExp(Hi+"(?="+Hi+")|"+cm+sm,"g");function lm(e){for(var t=pa.lastIndex=0;pa.test(e);)++t;return t}function um(e){return to(e)?lm(e):Zp(e)}var dm="Expected a function";function bt(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(dm);return rt(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Wt(e,t,{leading:n,maxWait:t,trailing:i})}var fm=30,hm="...",pm=/\w*$/;function mm(e,t){var r=fm,n=hm;if(rt(t)){var i="separator"in t?t.separator:i;r="length"in t?td(t.length):r,n="omission"in t?hr(t.omission):n}e=ki(e);var o=e.length;if(to(e)){var s=Eh(e);o=s.length}if(r>=o)return e;var c=r-um(n);if(c<1)return n;var l=s?ch(s,0,c).join(""):e.slice(0,c);if(i===void 0)return l+n;if(s&&(c+=l.length-c),Kp(i)){if(e.slice(c).search(i)){var u,f=l;for(i.global||(i=RegExp(i.source,ki(pm.exec(i))+"g")),i.lastIndex=0;u=i.exec(f);)var d=u.index;l=l.slice(0,d===void 0?c:d)}}else if(e.indexOf(hr(i),c)!=c){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+n}const no="-",gm=e=>{const t=vm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const c=s.split(no);return c[0]===""&&c.length!==1&&c.shift(),tl(c,t)||xm(s)},getConflictingClassGroupIds:(s,c)=>{const l=r[s]||[];return c&&n[s]?[...l,...n[s]]:l}}},tl=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?tl(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(no);return(s=t.validators.find(({validator:c})=>c(o)))==null?void 0:s.classGroupId},ma=/^\[(.+)\]$/,xm=e=>{if(ma.test(e)){const t=ma.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},vm=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return bm(Object.entries(e.classGroups),r).forEach(([o,s])=>{Ui(s,n,o,t)}),n},Ui=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:ga(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(ym(i)){Ui(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{Ui(s,ga(t,o),r,n)})})},ga=(e,t)=>{let r=e;return t.split(no).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},ym=e=>e.isThemeGetter,bm=(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(([s,c])=>[t+s,c])):o);return[r,i]}):e,wm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set(o,s){r.has(o)?r.set(o,s):i(o,s)}}},rl="!",Sm=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,s=c=>{const l=[];let u=0,f=0,d;for(let v=0;v<c.length;v++){let S=c[v];if(u===0){if(S===i&&(n||c.slice(v,v+o)===t)){l.push(c.slice(f,v)),f=v+o;continue}if(S==="/"){d=v;continue}}S==="["?u++:S==="]"&&u--}const h=l.length===0?c:c.substring(f),p=h.startsWith(rl),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?c=>r({className:c,parseClassName:s}):s},Am=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},jm=e=>({cache:wm(e.cacheSize),parseClassName:Sm(e),...gm(e)}),Cm=/\s+/,Im=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(Cm);let c="";for(let l=s.length-1;l>=0;l-=1){const u=s[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){c=u+(c.length>0?" "+c:c);continue}if(g=n(h),!g){c=u+(c.length>0?" "+c:c);continue}m=!1}const v=Am(f).join(":"),S=d?v+rl:v,A=S+g;if(o.includes(A))continue;o.push(A);const w=i(g,m);for(let j=0;j<w.length;++j){const O=w[j];o.push(S+O)}c=u+(c.length>0?" "+c:c)}return c};function Tm(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=nl(t))&&(n&&(n+=" "),n+=r);return n}const nl=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=nl(e[n]))&&(r&&(r+=" "),r+=t);return r};function Pm(e,...t){let r,n,i,o=s;function s(l){const u=t.reduce((f,d)=>d(f),e());return r=jm(u),n=r.cache.get,i=r.cache.set,o=c,c(l)}function c(l){const u=n(l);if(u)return u;const f=Im(l,r);return i(l,f),f}return function(){return o(Tm.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},il=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rm=/^\d+\/\d+$/,Om=new Set(["px","full","screen"]),Em=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mm=/\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$/,Nm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$m=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_m=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>vt(e)||Om.has(e)||Rm.test(e),Qe=e=>St(e,"length",Hm),vt=e=>!!e&&!Number.isNaN(Number(e)),Hr=e=>St(e,"number",vt),Et=e=>!!e&&Number.isInteger(Number(e)),km=e=>e.endsWith("%")&&vt(e.slice(0,-1)),W=e=>il.test(e),et=e=>Em.test(e),Lm=new Set(["length","size","percentage"]),Dm=e=>St(e,Lm,ol),Bm=e=>St(e,"position",ol),zm=new Set(["image","url"]),qm=e=>St(e,zm,Gm),Fm=e=>St(e,"",Um),Mt=()=>!0,St=(e,t,r)=>{const n=il.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Hm=e=>Mm.test(e)&&!Nm.test(e),ol=()=>!1,Um=e=>$m.test(e),Gm=e=>_m.test(e),Wm=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),i=ae("borderColor"),o=ae("borderRadius"),s=ae("borderSpacing"),c=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),f=ae("hueRotate"),d=ae("invert"),h=ae("gap"),p=ae("gradientColorStops"),m=ae("gradientColorStopPositions"),g=ae("inset"),v=ae("margin"),S=ae("opacity"),A=ae("padding"),w=ae("saturate"),j=ae("scale"),O=ae("sepia"),M=ae("skew"),N=ae("space"),T=ae("translate"),C=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",W,t],E=()=>[W,t],L=()=>["",qe,Qe],k=()=>["auto",vt,W],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",W],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],fe=()=>[vt,W];return{cacheSize:500,separator:":",theme:{colors:[Mt],spacing:[qe,Qe],blur:["none","",et,W],brightness:fe(),borderColor:[e],borderRadius:["none","","full",et,W],borderSpacing:E(),borderWidth:L(),contrast:fe(),grayscale:Q(),hueRotate:fe(),invert:Q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[km,Qe],inset:P(),margin:P(),opacity:fe(),padding:E(),saturate:fe(),scale:fe(),sepia:Q(),skew:fe(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[et]}],"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:[...Y(),W]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],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",Et,W]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Et,W]}],"grid-cols":[{"grid-cols":[Mt]}],"col-start-end":[{col:["auto",{span:["full",Et,W]},W]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Mt]}],"row-start-end":[{row:["auto",{span:[Et,W]},W]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ne()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ne(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ne(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",et,Qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hr]}],"font-family":[{font:[Mt]}],"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",W]}],"line-clamp":[{"line-clamp":["none",vt,Hr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qe,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qe,Qe]}],"underline-offset":[{"underline-offset":["auto",qe,W]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],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",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Bm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qm]}],"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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:re()}],"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:["",...re()]}],"outline-offset":[{"outline-offset":[qe,W]}],"outline-w":[{outline:[qe,Qe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[qe,Qe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,Fm]}],"shadow-color":[{shadow:[Mt]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",et,W]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[O]}],"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":[S]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:fe()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Et,W]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],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",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qe,Qe,Hr]}],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"]}}},Vm=Pm(Wm);function Z(...e){return Vm(le.clsx(e))}let Ur;function Gr(){return Ur===void 0&&(Ur=navigator.platform.includes("Mac")),Ur}function al(e){return`${e}`.toLowerCase()==="mod"?Gr()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Gr()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Gr()?"⇧":"Shift":e}function sl(e){return e.map(al).join(" ")}const F=b.forwardRef((e,t)=>{const{icon:r=void 0,tooltip:n=void 0,disabled:i=!1,customClass:o="",loading:s=void 0,shortcutKeys:c=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,v=ao[r],S=h?xc.Slot:yo;return a.jsxs(bo,{children:[a.jsx(wo,{asChild:!0,children:a.jsxs(S,{"data-state":f!=null&&f()?"on":"off",onClick:u,ref:t,size:"sm",className:Z("richtext-w-[32px] richtext-h-[32px]",o),disabled:i,...g,children:[v&&a.jsx(v,{className:"richtext-size-4"}),d]})}),n&&a.jsx(Cr,{...l,children:a.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[a.jsx("div",{children:n}),!!(c!=null&&c.length)&&a.jsx("span",{children:sl(c)})]})})]})});function Xm(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:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImage({width:B.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:B.IMAGE_SIZE[n]})}}))}function Ym(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:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateImageGif({width:B.IMAGE_SIZE[n]}),isActive:()=>e.isActive("image",{width:B.IMAGE_SIZE[n]})}}))}function Km(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Zm(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Jm(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 Qm(e){const t=["left","center","right"],r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};return t.map(n=>({type:`image-${n}`,component:F,componentProps:{tooltip:B.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 eg(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 tg(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:B.localeActions.t(`editor.${n.replace("-",".")}.tooltip`),icon:r[i],action:()=>e.commands.updateVideo({width:B.VIDEO_SIZE[n]}),isActive:()=>e.isActive("video",{width:B.VIDEO_SIZE[n]})}}))}function rg(e){return[{type:"flipX",component:F,componentProps:{editor:e,tooltip:B.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:B.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()}}},...Xm(e),...Km(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function ng(e){return[...Ym(e),...Zm(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function ig(e){return[...Jm(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.edit"),icon:"Pencil",action:()=>!0}},{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function og(e){return[...Qm(e),{type:"edit",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.edit"),icon:"Pencil",action:()=>(console.log("AAA"),!0)}},{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function ag(e){return[...tg(e),...eg(e),{type:"remove",component:F,componentProps:{editor:e,tooltip:B.localeActions.t("editor.remove"),icon:"Trash2",action:()=>{const{state:t,dispatch:r}=e.view;H.deleteSelection(t,r)}}}]}function sg(e,t){return B.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 io(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 H.NodeRange(e,t,r),s=o.depth===0?0:i.resolve(o.start).posAtIndex(0);return o.parent.forEach((c,l)=>{const u=s+l,f=u+c.nodeSize;if(u<o.start||u>=o.end)return;const d=new H.SelectionRange(i.resolve(u),i.resolve(f));n.push(d)}),n}class oo{constructor(t,r){rr(this,"anchor");rr(this,"head");this.anchor=t,this.head=r}map(t){return new oo(t.map(this.anchor),t.map(this.head))}resolve(t){const r=t.resolve(this.anchor),n=t.resolve(this.head);return new Ne(r,n)}}class Ne extends H.Selection{constructor(r,n,i,o=1){const{doc:s}=r,c=r===n,l=r.pos===s.content.size&&n.pos===s.content.size,u=c&&!l?s.resolve(n.pos+(o>0?1:-1)):n,f=c&&l?s.resolve(r.pos-(o>0?1:-1)):r,d=io(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);rr(this,"depth");this.depth=i}get $to(){return this.ranges[this.ranges.length-1].$to}eq(r){return r instanceof Ne&&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 Ne(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),s=o[0].$from,c=o[o.length-1].$to;return new Ne(s,c,this.depth)}const n=this.ranges[0],i=r.resolve(Math.max(0,n.$from.pos-1));return new Ne(this.$anchor,i,this.depth)}extendForwards(){const{doc:r}=this.$from;if(this.isBackwards&&this.ranges.length>1){const o=this.ranges.slice(1),s=o[0].$from,c=o[o.length-1].$to;return new Ne(c,s,this.depth)}const n=this.ranges[this.ranges.length-1],i=r.resolve(Math.min(r.content.size,n.$to.pos+1));return new Ne(this.$anchor,i,this.depth)}static fromJSON(r,n){return new Ne(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i,o,s=1){return new this(r.resolve(n),r.resolve(i),o,s)}getBookmark(){return new oo(this.anchor,this.head)}}function cg(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(s){let c="";const l=getComputedStyle(s);for(let u=0;u<l.length;u+=1)c+=`${l[u]}:${l.getPropertyValue(l[u])};`;return c}(i)}),t}function or(e,t){return window.getComputedStyle(e)[t]}function lg(e=0,t=0,r=0){return Math.min(Math.max(e,t),r)}function xa(e){e.parentNode!==null&&e.parentNode!==void 0&&e.parentNode.removeChild(e)}function cl(e){const{x:t,y:r,direction:n,editor:i}=e;let o=null,s=null,c=null,l=t;for(;s===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,c=i.view.posAtDOM(h,0),c>=0){s=i.state.doc.nodeAt(Math.max(c-1,0)),(s===null||s.isText)&&(s=i.state.doc.nodeAt(Math.max(c-1,0))),s||(s=i.state.doc.nodeAt(Math.max(c,0)));break}}n==="left"?l-=1:l+=1}return{resultElement:o,resultNode:s,pos:c!==null?c:null}}function ug(e,t){const{doc:r}=t.view.state,n=cl({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(or(f.dom,"paddingLeft"),10),m=Number.parseInt(or(f.dom,"paddingRight"),10),g=Number.parseInt(or(f.dom,"borderLeftWidth"),10),v=Number.parseInt(or(f.dom,"borderLeftWidth"),10),S=f.dom.getBoundingClientRect();return{left:lg(d,S.left+p+g,S.right-m-v),top:h}}(t.view,i,e.clientY),s=t.view.posAtCoords(o);if(!s)return[];const{pos:c}=s;if(!r.resolve(c).parent)return[];const l=r.resolve(n.pos),u=r.resolve(n.pos+1);return io(l,u,0)}function va(e,t){const r=e.resolve(t),{depth:n}=r;return n===0?t:r.pos-r.parentOffset-1}function ya(e,t){const r=e.nodeAt(t),n=e.resolve(t);let{depth:i}=n,o=r;for(;i>0;){const s=n.node(i);i-=1,i===0&&(o=s)}return o}function ba(e,t){let r=t;for(;r&&r.parentNode&&r.parentNode!==e.dom;)r=r.parentNode;return r}const ll=new H.PluginKey("dragHandle");function dg({pluginKey:e=ll,element:t,editor:r,tippyOptions:n,onNodeChange:i}){const o=document.createElement("div");let s=null,c=!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=ug(f,r),v=io(p,m,0),S=v.some(C=>g.find(_=>_.$from===C.$from&&_.$to===C.$to)),A=h||!S?g:v;if(A.length===0)return;const{tr:w}=d.state,j=document.createElement("div"),O=A[0].$from.pos,M=A[A.length-1].$to.pos,N=Ne.create(d.state.doc,O,M),T=N.content();A.forEach(C=>{const _=cg(d.nodeDOM(C.$from.pos));j.append(_)}),j.style.position="absolute",j.style.top="-10000px",document.body.append(j),f.dataTransfer.clearData(),f.dataTransfer.setDragImage(j,0,0),d.dragging={slice:T,move:!0},w.setSelection(N),d.dispatch(w),document.addEventListener("drop",()=>xa(j),{once:!0}),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}),t.addEventListener("dragend",()=>{t&&(t.style.pointerEvents="auto")}),new H.Plugin({key:typeof e=="string"?new H.PluginKey(e):e,state:{init:()=>({locked:!1}),apply(f,d){const h=f.getMeta("lockDragHandle"),p=f.getMeta("hideDragHandle");if(h!==void 0&&(c=h),p&&s)return s.hide(),c=!1,l=null,u=-1,i==null||i({editor:r,node:null,pos:-1}),d;if(f.docChanged&&u!==-1&&t&&s){const m=f.mapping.map(u);m!==u&&(u=m)}return d}},view:f=>{return d(),h(r.view.dom),s=vc(f.dom,{...p(),...n}),{update(j,O){if(!m(t,s)||(t.draggable=!c,!g(j,O)))return;const M=v(j);M&&S(j,M)},destroy(){w()}};function d(){t.draggable=!0,t.style.pointerEvents="auto"}function h(j){var O;(O=j.parentElement)==null||O.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(j,O){return j&&O}function g(j,O){return!j.state.doc.eq(O.doc)&&u!==-1}function v(j){let O=j.nodeDOM(u);return O=ba(j,O),O===j.dom||(O==null?void 0:O.nodeType)!==1?null:O}function S(j,O){const M=j.posAtDOM(O,0),N=ya(r.state.doc,M);if(N===l)return;const T=va(r.state.doc,M);l=N,u=T,i==null||i({editor:r,node:l,pos:u}),A(O)}function A(j){s.setProps({getReferenceClientRect:()=>j.getBoundingClientRect()}),s.show()}function w(){s==null||s.destroy(),t&&xa(o)}},props:{handleDOMEvents:{mouseleave:(f,d)=>{if(c||!h(d))return!1;return p(),m(),!1;function h(g){return g.target&&!o.contains(g.relatedTarget)}function p(){s==null||s.hide()}function m(){l=null,u=-1,i==null||i({editor:r,node:null,pos:-1})}},mousemove:Wt((f,d)=>{if(!t||!s||c)return!1;const h=cl({x:d.clientX,y:d.clientY,direction:"right",editor:r});if(!h.resultElement||h.resultElement===f.dom)return!1;const p=ba(f,h.resultElement);if(p===f.dom||(p==null?void 0:p.nodeType)!==1)return!1;const m=f.posAtDOM(p,0),g=ya(r.state.doc,m);if(g===l)return!1;const v=va(r.state.doc,m);return l=g,u=v,i==null||i({editor:r,node:l,pos:u}),s.setProps({getReferenceClientRect:()=>p.getBoundingClientRect()}),s.show(),!1},100)}}})}var gr=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(gr||{});function fg(e,t,r){return e<t?t:e>r?r:e}function hg(e,t,r,n){const{doc:i,selection:o}=e;if(!i||!o||!(o instanceof H.TextSelection||o instanceof H.AllSelection))return e;const{from:s,to:c}=o;return i.nodesBetween(s,c,(l,u)=>{const f=l.type;return r.includes(f.name)?(e=Gi(e,u,t),!1):!H.isList(l.type.name,n.extensionManager.extensions)}),e}function Gi(e,t,r){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const s=fg((n.attrs.indent||0)+r,0,7);if(s===n.attrs.indent)return e;const c={...n.attrs,indent:s};return e.setNodeMarkup(t,n.type,c,n.marks)}function pg({delta:e,types:t}){return({state:r,dispatch:n,editor:i})=>{const{selection:o}=r;let{tr:s}=r;return s=s.setSelection(o),s=hg(s,e,t,i),s.docChanged?(n&&n(s),!0):!1}}function mg(e){var T,C,_;const{pluginKey:t=ll}=e,{t:r}=B.useLocale(),[n,i]=b.useState(null),[o,s]=b.useState(-1),c=b.useRef(null),l=b.useRef(null),[u,f]=b.useState(!1),d=e.editor.extensionManager.extensions.some(P=>P.name==="textAlign"),h=e.editor.extensionManager.extensions.some(P=>P.name==="indent"),p=e.editor.extensionManager.extensions.some(P=>P.name==="clear");b.useEffect(()=>{c.current&&!e.editor.isDestroyed&&(l.current=dg({editor:e.editor,element:c.current,pluginKey:"ContentItemMenu",tippyOptions:{offset:[-2,16],zIndex:99,moveTransition:"transform 0.15s ease-out"},onNodeChange:O}),e.editor.registerPlugin(l.current))},[e.editor,c]);function m(){const P=e.editor.chain();P.setNodeSelection(o).unsetAllMarks(),(n==null?void 0:n.type.name)!=="paragraph"&&P.setParagraph(),P.run()}function g(){e.editor.chain().focus().setNodeSelection(o).run(),document.execCommand("copy")}function v(){e.editor.commands.setNodeSelection(o);const{$anchor:P}=e.editor.state.selection,E=P.node(1)||e.editor.state.selection.node;e.editor.chain().setMeta("hideDragHandle",!0).insertContentAt(o+((n==null?void 0:n.nodeSize)||0),E.toJSON()).run()}function S(P){e.editor.commands.setTextAlign(P)}function A(){const P=Gi(e.editor.state.tr,o,1);P.setMeta("hideDragHandle",!0),e.editor.view.dispatch&&e.editor.view.dispatch(P)}function w(){const P=Gi(e.editor.state.tr,o,-1);e.editor.view.dispatch&&e.editor.view.dispatch(P)}function j(){e.editor.chain().setMeta("hideDragHandle",!0).setNodeSelection(o).deleteSelection().run()}function O(P){P.node&&i(P.node),s(P.pos)}function M(){var P;if(o!==-1){const E=(n==null?void 0:n.nodeSize)||0,L=o+E,k=(n==null?void 0:n.type.name)==="paragraph"&&((P=n==null?void 0:n.content)==null?void 0:P.size)===0,Y=k?o+2:L+2;e.editor.chain().command(({dispatch:re,tr:ue,state:ne})=>re?(k?ue.insertText("/",o,o+1):ue.insert(L,ne.schema.nodes.paragraph.create(null,[ne.schema.text("/")])),re(ue)):!0).focus(Y).run()}}b.useEffect(()=>(u?e.editor.commands.setMeta("lockDragHandle",!0):e.editor.commands.setMeta("lockDragHandle",!1),()=>{e.editor.commands.setMeta("lockDragHandle",!1)}),[u]),b.useEffect(()=>()=>{l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[]),b.useEffect(()=>{var P;(P=e.editor)!=null&&P.isDestroyed&&l.current&&(e.editor.unregisterPlugin(t),l.current=null)},[(T=e.editor)==null?void 0:T.isDestroyed]);const N=P=>{e!=null&&e.disabled||f(P)};return a.jsx("div",{ref:c,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:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]",children:[a.jsx(ge,{className:"!richtext-size-7 richtext-cursor-grab",disabled:e==null?void 0:e.disabled,onClick:M,size:"icon",type:"button",variant:"ghost",children:a.jsx(me,{className:"richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Plus"})}),a.jsxs(Al,{onOpenChange:N,open:u,children:[a.jsxs("div",{className:"richtext-relative richtext-flex richtext-flex-col",children:[a.jsxs(bo,{children:[a.jsx(wo,{asChild:!0,disabled:e==null?void 0:e.disabled,children:a.jsx(ge,{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:P=>{P.preventDefault(),!(e!=null&&e.disabled)&&f(!0)},children:a.jsx(me,{className:"richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",name:"Grip"})})}),a.jsx(Cr,{children:r("editor.draghandle.tooltip")})]}),a.jsx(jl,{className:"richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]"})]}),a.jsxs(mo,{align:"start",className:"richtext-w-48",side:"bottom",sideOffset:0,children:[a.jsxs(Me,{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:j,children:[a.jsx(me,{name:"Trash2"}),a.jsx("span",{children:r("editor.remove")})]}),p?a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:m,children:[a.jsx(me,{name:"PaintRoller"}),a.jsx("span",{children:r("editor.clear.tooltip")})]}):null,a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:g,children:[a.jsx(me,{name:"Clipboard"}),a.jsx("span",{children:r("editor.copyToClipboard")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:v,children:[a.jsx(me,{name:"Copy"}),a.jsx("span",{children:r("editor.copy")})]}),d||h?a.jsx(go,{}):null,d?a.jsxs(Ca,{children:[a.jsxs(Wi,{className:"richtext-flex richtext-gap-3",children:[a.jsx(me,{name:"AlignCenter"}),a.jsx("span",{children:r("editor.textalign.tooltip")})]}),a.jsx(ja,{children:a.jsxs(Vi,{children:[a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("left"),children:[a.jsx(me,{name:"AlignLeft"}),a.jsx("span",{children:r("editor.textalign.left.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("center"),children:[a.jsx(me,{name:"AlignCenter"}),a.jsx("span",{children:r("editor.textalign.center.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",onClick:()=>S("right"),children:[a.jsx(me,{name:"AlignRight"}),a.jsx("span",{children:r("editor.textalign.right.tooltip")})]})]})})]}):null,h?a.jsxs(Ca,{children:[a.jsxs(Wi,{className:"richtext-flex richtext-gap-3",children:[a.jsx(me,{name:"IndentIncrease"}),a.jsx("span",{children:r("editor.indent")})]}),a.jsx(ja,{children:a.jsxs(Vi,{children:[a.jsxs(Me,{className:"richtext-flex richtext-gap-3",disabled:((C=n==null?void 0:n.attrs)==null?void 0:C.indent)>=gr.max,onClick:A,children:[a.jsx(me,{name:"IndentIncrease"}),a.jsx("span",{children:r("editor.indent.tooltip")})]}),a.jsxs(Me,{className:"richtext-flex richtext-gap-3",disabled:((_=n==null?void 0:n.attrs)==null?void 0:_.indent)<=gr.min,onClick:w,children:[a.jsx(me,{name:"IndentDecrease"}),a.jsx("span",{children:r("editor.outdent.tooltip")})]})]})})]}):null]})]})]})})}const gg={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function xg({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?a.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r}):a.jsx(a.Fragment,{})}function vg(e){const{t,lang:r}=B.useLocale(),n=({editor:o})=>{const{selection:s}=o.view.state,{$from:c,to:l}=s;return c.pos===l?!1:s instanceof H.TextSelection},i=b.useMemo(()=>e.disabled||!(e!=null&&e.editor)?[]:sg(e.editor,t),[e.disabled,e.editor,r,t]);return a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:n,tippyOptions:gg,children:i!=null&&i.length?a.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:a.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,s)=>(o==null?void 0:o.type)==="divider"?a.jsx(Ee,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"},`bubbleMenu-divider-${s}`):a.jsx(xg,{disabled:e.disabled,editor:e.editor,item:o},`bubbleMenu-text-${s}`))})}):a.jsx(a.Fragment,{})})}function yg(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 bg(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 wg(){return a.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:a.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 Sg(){return a.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:a.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 Ag(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 me(e){const t=ao[e.name];return t?a.jsx(t,{onClick:e==null?void 0:e.onClick,className:`richtext-w-4 richtext-h-4 ${(e==null?void 0:e.className)||""}`}):null}function jg(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 ul(e){return a.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:a.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Cg(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function Ig(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function Tg(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.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 Pg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Rg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Og(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Eg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 dl(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[a.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"}),a.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 fl(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[a.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"}),a.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 Mg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[a.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"}),a.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 Ng(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.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 $g(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[a.jsx("circle",{cx:"10",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"10",r:"4"}),a.jsx("circle",{cx:"38",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"38",r:"4"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function _g(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.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 kg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Lg(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 Dg(){return a.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:a.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 ao={Bold:R.Bold,LoaderCircle:R.LoaderCircle,Italic:R.Italic,Underline:R.Underline,Quote:R.Quote,TextQuote:bg,Strikethrough:R.Strikethrough,Minus:R.Minus,Eraser:R.Eraser,PaintRoller:R.PaintRoller,Redo2:R.Redo2,Undo2:R.Undo2,AlignCenter:nr.TextAlignCenterIcon,AlignJustify:nr.TextAlignJustifyIcon,AlignLeft:nr.TextAlignLeftIcon,AlignRight:nr.TextAlignRightIcon,ChevronDown:R.ChevronDown,Subscript:R.Subscript,Superscript:R.Superscript,Code:R.Code,Code2:R.CodeXml,Type:R.Type,IndentIncrease:R.IndentIncrease,IndentDecrease:R.IndentDecrease,List:R.List,ListOrdered:R.ListOrdered,ListTodo:R.ListTodo,Link:R.Link,ImageUp:R.ImageUp,Video:R.Video,Maximize:R.Maximize,Minimize:R.Minimize,Table:R.Table,Sparkles:R.Sparkles,Pencil:R.Pencil,Unlink:R.Unlink,BetweenHorizonalEnd:R.BetweenHorizonalEnd,BetweenHorizonalStart:R.BetweenHorizonalStart,BetweenVerticalStart:R.BetweenVerticalStart,BetweenVerticalEnd:R.BetweenVerticalEnd,TableCellsMerge:R.TableCellsMerge,TableCellsSplit:R.TableCellsSplit,Trash2:R.Trash2,Trash:R.Trash,Replace:R.Replace,ChevronsUpDown:R.ChevronsUpDown,LineHeight:jg,Word:Ag,Heading1:R.Heading1,Heading2:R.Heading2,Heading3:R.Heading3,Heading4:R.Heading4,Heading5:R.Heading5,Heading6:R.Heading6,Columns2:R.Columns2,Columns3:R.Columns3,Columns4:R.Columns4,Plus:R.Plus,Grip:R.GripVertical,Copy:R.Copy,Clipboard:R.Clipboard,PanelLeft:R.PanelLeft,PanelRight:R.PanelRight,Columns:R.Columns2,Iframe:R.Frame,MenuDown:ul,SizeS:Tg,SizeM:Ig,SizeL:Cg,AspectRatio:yg,Emoji:R.SmilePlus,DeleteColumn:wg,DeleteRow:Sg,SearchAndReplace:R.Replace,EmojiIcon:R.SmilePlusIcon,KatexIcon:R.Sigma,ExportPdf:dl,ExportWord:fl,ImportWord:Dg,ColumnAddLeft:Pg,ColumnAddRight:Rg,BookMarked:R.BookMarked,Excalidraw:Eg,ZoomIn:R.ZoomIn,ZoomOut:R.ZoomOut,Settings:R.Settings,Eye:R.Eye,TextDirection:Og,LeftToRight:Ng,RightToLeft:_g,Attachment:R.Paperclip,GifIcon:Mg,ChevronUp:R.ChevronUp,Crop:R.CropIcon,Mermaid:$g,Twitter:kg,CodeView:Lg,FlipX:R.FlipVertical,FlipY:R.FlipHorizontal,PencilRuler:R.PencilRuler,WrapText:R.WrapText};function Bg({fill:e}){return a.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("g",{id:"icon/填充色",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:a.jsxs("g",{id:"icon/背景颜色",children:[a.jsx("g",{id:"编组",fill:"currentColor",children:a.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",id:"矩形",children:[a.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"}),a.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"}),a.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"})]})}),a.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 hl(e){const[t,r]=b.useState(void 0);function n(s){var c;(c=e.action)==null||c.call(e,s)}function i(){var s;(s=e.action)==null||s.call(e,t)}const o=b.useCallback(Wt(s=>{r(s)},350),[]);return a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[a.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:a.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:a.jsx(Bg,{fill:t})})}),a.jsx(uu,{selectedColor:t,setSelectedColor:o,onChange:n,highlight:!0,disabled:e==null?void 0:e.disabled,children:a.jsx(ge,{variant:"ghost",size:"icon",className:"!richtext-w-3 !richtext-h-[32px]",disabled:e==null?void 0:e.disabled,children:a.jsx(me,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}function zg({editor:e,disabled:t,actions:r}){var v,S,A,w,j,O,M,N,T,C,_,P,E,L,k,Y,re,ue;const n=({editor:ne})=>H.isActive(ne.view.state,"table"),{t:i}=B.useLocale();function o(){e.chain().focus().addColumnBefore().run()}function s(){e.chain().focus().addColumnAfter().run()}function c(){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(ne){e.chain().focus().setTableCellBackground(ne).run()}const g=()=>{var Pe;const{view:ne,state:{selection:{from:Q}}}=e,xe=ne.domAtPos(Q).node;if(!xe)return new DOMRect(-1e3,-1e3,0,0);const fe=(Pe=xe==null?void 0:xe.closest)==null?void 0:Pe.call(xe,".tableWrapper");return fe?fe.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return a.jsx(le.BubbleMenu,{editor:e,pluginKey:"table",shouldShow:n,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},maxWidth:"auto",getReferenceClientRect:g,plugins:[vc.sticky],sticky:"popper"},children:t?a.jsx(a.Fragment,{}):a.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:[a.jsx(F,{action:o,disabled:!((S=(v=e==null?void 0:e.can())==null?void 0:v.addColumnBefore)!=null&&S.call(v)),icon:"BetweenHorizonalEnd",tooltip:i("editor.table.menu.insertColumnBefore"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:s,disabled:!((w=(A=e==null?void 0:e.can())==null?void 0:A.addColumnAfter)!=null&&w.call(A)),icon:"BetweenHorizonalStart",tooltip:i("editor.table.menu.insertColumnAfter"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:c,disabled:!((O=e==null?void 0:(j=e.can()).deleteColumn)!=null&&O.call(j)),icon:"DeleteColumn",tooltip:i("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15}}),a.jsx(Ee,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(F,{action:l,disabled:!((N=e==null?void 0:(M=e.can()).addRowBefore)!=null&&N.call(M)),icon:"BetweenVerticalEnd",tooltip:i("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:u,disabled:!((C=(T=e==null?void 0:e.can())==null?void 0:T.addRowAfter)!=null&&C.call(T)),icon:"BetweenVerticalStart",tooltip:i("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:f,disabled:!((P=(_=e==null?void 0:e.can())==null?void 0:_.deleteRow)!=null&&P.call(_)),icon:"DeleteRow",tooltip:i("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15}}),a.jsx(Ee,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(F,{action:d,disabled:!((L=(E=e==null?void 0:e.can())==null?void 0:E.mergeCells)!=null&&L.call(E)),icon:"TableCellsMerge",tooltip:i("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15}}),a.jsx(F,{action:h,disabled:!((Y=(k=e==null?void 0:e.can())==null?void 0:k.splitCell)!=null&&Y.call(k)),icon:"TableCellsSplit",tooltip:i("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15}}),a.jsx(Ee,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}),a.jsx(hl,{action:m,editor:e,tooltip:i("editor.table.menu.setCellsBgColor"),tooltipOptions:{sideOffset:15}}),a.jsx(F,{action:p,disabled:!((ue=(re=e==null?void 0:e.can())==null?void 0:re.deleteTable)!=null&&ue.call(re)),icon:"Trash2",tooltip:i("editor.table.menu.deleteTable"),"tooltip-options":{sideOffset:15}}),r&&r.map((ne,Q)=>a.jsx(F,{...ne},Q))]})})}function pl(e){const{t}=B.useLocale(),[r,n]=b.useState({text:"",link:""}),[i,o]=b.useState(!1);b.useEffect(()=>{var c;if(e!=null&&e.editor){const{href:l,target:u}=(c=e.editor)==null?void 0:c.getAttributes("link"),{from:f,to:d}=e.editor.state.selection,h=e.editor.state.doc.textBetween(f,d," ");n({link:l||"",text:h}),o(u==="_blank")}},[e==null?void 0:e.editor]);function s(c){c.preventDefault(),c.stopPropagation(),e==null||e.onSetLink(r.link,r.text,i),n({text:"",link:""})}return a.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:a.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-gap-2",children:[a.jsx(He,{className:"mb-[6px]",children:t("editor.link.dialog.text")}),a.jsx("div",{className:"richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:a.jsx(Ae,{className:"richtext-w-80",onChange:c=>n({...r,text:c.target.value}),placeholder:"Text",required:!0,type:"text",value:r.text})})}),a.jsx(He,{className:"mb-[6px]",children:t("editor.link.dialog.link")}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsxs("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center",children:[a.jsx(Ae,{className:"richtext-pl-10",onChange:c=>n({...r,link:c.target.value}),required:!0,type:"url",value:r.link}),a.jsx("span",{className:"richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2",children:a.jsx(me,{className:"richtext-size-5 richtext-text-muted-foreground",name:"Link"})})]})}),a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-space-x-2",children:[a.jsx(He,{children:t("editor.link.dialog.openInNewTab")}),a.jsx(xo,{checked:i,onCheckedChange:c=>{o(c)}})]}),a.jsx(ge,{className:"richtext-mt-2 richtext-self-end",onClick:s,type:"button",children:t("editor.link.dialog.button.apply")})]})})}function qg(e){const{t}=B.useLocale();return a.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:[a.jsx("a",{href:e==null?void 0:e.link,target:"_blank",rel:"noopener noreferrer",className:"richtext-text-sm richtext-underline richtext-break-all",children:mm(e==null?void 0:e.link,{length:50,omission:"…"})}),(e==null?void 0:e.link)&&a.jsx(Ee,{orientation:"vertical",className:"!richtext-h-4"}),a.jsxs("div",{className:"richtext-flex richtext-flex-nowrap",children:[a.jsx(F,{icon:"Pencil",tooltip:t("editor.link.edit.tooltip"),action:()=>{e==null||e.onEdit()},tooltipOptions:{sideOffset:15}}),a.jsx(F,{icon:"Unlink",tooltip:t("editor.link.unlink.tooltip"),action:()=>{e==null||e.onClear()},tooltipOptions:{sideOffset:15}})]})]})}function Fg({editor:e,disabled:t}){const[r,n]=b.useState(!1),i=b.useMemo(()=>{const{href:l}=e.getAttributes("link");return l},[e]),o=b.useCallback(({editor:l})=>l.isActive("link"),[]),s=(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)},c=b.useCallback(()=>{e.chain().extendMarkRange("link").unsetLink().focus().run(),n(!1)},[e]);return a.jsx(a.Fragment,{children:a.jsx(le.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?a.jsx(a.Fragment,{}):a.jsx(a.Fragment,{children:r?a.jsx(pl,{onSetLink:s,editor:e}):a.jsx(qg,{editor:e,onClear:c,onEdit:()=>{n(!0)},link:i})})})})}const Hg=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,so=H.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",H.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[H.nodeInputRule({find:Hg,type:this.type,getAttributes:e=>{const[,,t,r,n]=e;return{src:r,alt:t,title:n}}})]}}),Vt=Ce.Root,Xt=Ce.Trigger,Ug=Ce.Portal,ml=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Overlay,{ref:r,className:Z("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}));ml.displayName=Ce.Overlay.displayName;const At=ee.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(Ug,{children:[a.jsx(ml,{}),a.jsxs(Ce.Content,{ref:n,className:Z("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,a.jsxs(Ce.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:[a.jsx(R.X,{className:"richtext-h-4 richtext-w-4"}),a.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));At.displayName=Ce.Content.displayName;function gl({className:e,...t}){return a.jsx("div",{className:Z("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",e),...t})}gl.displayName="DialogHeader";function wr({className:e,...t}){return a.jsx("div",{className:Z("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",e),...t})}wr.displayName="DialogFooter";const jt=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Title,{ref:r,className:Z("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",e),...t}));jt.displayName=Ce.Title.displayName;const Gg=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ce.Description,{ref:r,className:Z("richtext-text-sm richtext-text-muted-foreground",e),...t}));Gg.displayName=Ce.Description.displayName;const wa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sa=le.clsx,Sr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Sa(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=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=wa(f)||wa(d);return i[u][h]}),c=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,v]=m;return Array.isArray(v)?v.includes({...o,...c}[g]):{...o,...c}[g]===v})?[...u,d,h]:u},[]);return Sa(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},Wg=Sr("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"}}),ge=ee.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},o)=>{const s=n?xc.Slot:"button";return a.jsx(s,{className:Z(Wg({variant:t,size:r,className:e})),ref:o,...i})});ge.displayName="Button";function Vg(e){return e.replace(/^.*\/|\..+$/g,"")}function Xg(e){return e.split(".").pop()}function Yg(e){return e<1024?`${e} Byte`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function Kg(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 Zg(e){return new Promise(t=>{const r=new FileReader;r.addEventListener("load",()=>{t({alt:e.name,src:r.result})},!1),r.readAsDataURL(e)})}function xl(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let o=i.length;const s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:n})}function Jg({editor:e,imageInline:t,onClose:r}){const{t:n}=B.useLocale(),[i,o]=b.useState(!1),s=b.useRef(null),[c,l]=b.useState(),[u,f]=b.useState(""),d=b.useRef(null),[h,p]=b.useState({src:"",file:null});function m(w){if(s.current&&w.width&&w.height){const j=g(s.current,w);f(j)}}function g(w,j){const O=document.createElement("canvas"),M=w.naturalWidth/w.width,N=w.naturalHeight/w.height;O.width=j.width*M,O.height=j.height*N;const T=O.getContext("2d");return T&&(T.imageSmoothingEnabled=!1,T.drawImage(w,j.x*M,j.y*N,j.width*M,j.height*N,0,0,j.width*M,j.height*N)),O.toDataURL("image/png",1)}async function v(){var w,j;try{const O=xl(u,((w=h==null?void 0:h.file)==null?void 0:w.name)||"image.png"),M=(j=e.extensionManager.extensions.find(T=>T.name===wt.name))==null?void 0:j.options;let N="";M.upload?N=await M.upload(O):N=URL.createObjectURL(O),e.chain().focus().setImageInline({src:N,inline:t}).run(),o(!1),p({src:"",file:null}),r()}catch(O){console.log("Error cropping image",O)}}function S(w){var j;w.preventDefault(),(j=d.current)==null||j.click()}const A=async w=>{var N;const j=(N=w==null?void 0:w.target)==null?void 0:N.files;if(!e||e.isDestroyed||j.length===0)return;const O=j[0],M=await Zg(O);o(!0),p({src:M.src,file:O})};return a.jsxs(a.Fragment,{children:[a.jsx(ge,{className:"richtext-mt-1 richtext-w-full",onClick:S,size:"sm",children:n("editor.image.dialog.tab.uploadCrop")}),a.jsxs(Vt,{open:i,children:[a.jsx(Xt,{}),a.jsxs(At,{children:[a.jsx(jt,{children:n("editor.image.dialog.tab.uploadCrop")}),a.jsx("div",{children:h.src&&a.jsx(Ru,{className:"richtext-w-full",crop:c,onChange:w=>l(w),onComplete:w=>m(w),children:a.jsx("img",{alt:"Crop me",ref:s,src:h.src})})}),a.jsxs(wr,{children:[a.jsxs(ge,{onClick:()=>{o(!1),p({src:"",file:null})},children:[n("editor.imageUpload.cancel"),a.jsx(me,{className:"richtext-ml-[4px]",name:"Trash2"})]}),a.jsxs(ge,{className:"richtext-w-fit",onClick:v,children:[n("editor.imageUpload.crop"),a.jsx(me,{className:"richtext-ml-[4px]",name:"Crop"})]})]})]})]}),a.jsx("input",{accept:"image/*",multiple:!0,onChange:A,ref:d,type:"file",style:{display:"none"}})]})}function Ar(e){function t(){const o=b.useRef(e),s=b.useCallback(()=>o.current,[]),c=b.useRef(new Set),l=b.useCallback(f=>{o.current={...o.current,...f},c.current.forEach(d=>d())},[]),u=b.useCallback(f=>(c.current.add(f),()=>c.current.delete(f)),[]);return{get:s,set:l,subscribe:u}}const r=b.createContext(null);function n({children:o}){return a.jsx(r.Provider,{value:t(),children:o})}function i(o){const s=b.useContext(r);if(!s)throw new Error("Store not found");return[b.useSyncExternalStore(s.subscribe,()=>o(s.get()),()=>o(e)),s.set]}return{Provider:n,useStore:i}}Ar({value:!1});Ar({value:!1});const{Provider:Qg,useStore:vl}=Ar({value:!1}),{Provider:ex,useStore:yl}=Ar({value:"light"});B.d("0");function zt(e,t){return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}function jr(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const nt={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"},bl={setOpen:(e,t)=>{jr(nt.UPLOAD_IMAGE(e),t)}};function tx(e){var m;const{t}=B.useLocale(),[r,n]=b.useState(!1),i=g=>{n(g.detail)},[o,s]=b.useState(""),c=b.useRef(null),[l,u]=b.useState(((m=e.editor.extensionManager.extensions.find(g=>g.name===wt.name))==null?void 0:m.options.defaultInline)||!1),f=b.useMemo(()=>{var v;return(v=e.editor.extensionManager.extensions.find(S=>S.name===wt.name))==null?void 0:v.options},[e.editor]);b.useEffect(()=>{const g=zt(nt.UPLOAD_IMAGE(e.editor.id),i);return()=>{g()}},[]);async function d(g){var w;const v=(w=g==null?void 0:g.target)==null?void 0:w.files;if(!e.editor||e.editor.isDestroyed||v.length===0)return;const S=v[0];let A="";f.upload?A=await f.upload(S):A=URL.createObjectURL(S),e.editor.chain().focus().setImageInline({src:A,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),s("")}function p(g){var v;g.preventDefault(),(v=c.current)==null||v.click()}return a.jsxs(Vt,{onOpenChange:n,open:r,children:[a.jsx(Xt,{asChild:!0,children:a.jsx(F,{action:()=>n(!0),icon:e.icon,tooltip:e.tooltip})}),a.jsxs(At,{children:[a.jsx(jt,{children:t("editor.image.dialog.title")}),a.jsxs(Tl,{activationMode:"manual",defaultValue:f.resourceImage==="both"||f.resourceImage==="upload"?"upload":"link",children:[a.jsxs(vo,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[f.resourceImage==="both"||f.resourceImage==="upload"?a.jsx(Ft,{value:"upload",children:t("editor.image.dialog.tab.upload")}):a.jsx(a.Fragment,{}),f.resourceImage==="both"||f.resourceImage==="link"?a.jsx(Ft,{value:"link",children:t("editor.image.dialog.tab.url")}):a.jsx(a.Fragment,{})]}),a.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[a.jsx($l,{checked:l,onCheckedChange:g=>{u(g)}}),a.jsx(He,{children:t("editor.link.dialog.inline")})]}),a.jsxs(Ht,{value:"upload",children:[a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[a.jsx(ge,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.image.dialog.tab.upload")}),a.jsx(Jg,{editor:e.editor,imageInline:l,onClose:()=>bl.setOpen(e.editor.id,!1)})]}),a.jsx("input",{accept:"image/*",multiple:!0,onChange:d,ref:c,type:"file",style:{display:"none"}})]}),a.jsx(Ht,{value:"link",children:a.jsx("form",{onSubmit:h,children:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[a.jsx(Ae,{autoFocus:!0,onChange:g=>s(g.target.value),placeholder:t("editor.image.dialog.placeholder"),required:!0,type:"url",value:o}),a.jsx(ge,{type:"submit",children:t("editor.image.dialog.button.apply")})]})})})]})]})]})}const ar={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function rx(e){var N,T;const[t,r]=b.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[n,i]=b.useState({width:0,height:0}),[o]=b.useState([ar.TOP_LEFT,ar.TOP_RIGHT,ar.BOTTOM_LEFT,ar.BOTTOM_RIGHT]),[s,c]=b.useState(!1),[l,u]=b.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f,inline:d}=(N=e==null?void 0:e.node)==null?void 0:N.attrs,h=b.useMemo(()=>{var Q;const{src:C,alt:_,width:P,height:E,flipX:L,flipY:k}=(Q=e==null?void 0:e.node)==null?void 0:Q.attrs,Y=mr(P)?`${P}px`:P,re=mr(E)?`${E}px`:E,ue=[];L&&ue.push("rotateX(180deg)"),k&&ue.push("rotateY(180deg)");const ne=ue.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:Y||void 0,height:re||void 0,transform:ne||"none"}}},[(T=e==null?void 0:e.node)==null?void 0:T.attrs]),p=b.useMemo(()=>{const{style:{width:C}}=h;return{width:C==="100%"?C:void 0}},[h]);function m(C){i({width:C.target.width,height:C.target.height})}function g(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const v=b.useCallback(bt(()=>{const{editor:C}=e,{width:_}=getComputedStyle(C.view.dom);r(P=>({...P,width:Number.parseInt(_,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function S(C,_){C.preventDefault(),C.stopPropagation();const P=n.width,E=n.height,L=P/E;let k=Number(e.node.attrs.width),Y=Number(e.node.attrs.height);const re=t.width;k&&!Y?(k=k>re?re:k,Y=Math.round(k/L)):Y&&!k?(k=Math.round(Y*L),k=k>re?re:k):!k&&!Y?(k=P>re?re:P,Y=Math.round(k/L)):k=k>re?re:k,c(!0),u({x:C.clientX,y:C.clientY,w:k,h:Y,dir:_})}const A=b.useCallback(bt(C=>{if(C.preventDefault(),C.stopPropagation(),!s)return;const{x:_,w:P,dir:E}=l,L=(C.clientX-_)*(/l/.test(E)?-1:1),k=Hc(P+L,B.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:k,height:null})},B.IMAGE_THROTTLE_WAIT_TIME),[s,l,t,e.updateAttributes]),w=b.useCallback(C=>{C.preventDefault(),C.stopPropagation(),s&&(u({x:0,y:0,w:0,h:0,dir:""}),c(!1),g())},[s,g]),j=b.useCallback(()=>{document==null||document.addEventListener("mousemove",A,!0),document==null||document.addEventListener("mouseup",w,!0)},[A,w]),O=b.useCallback(()=>{document==null||document.removeEventListener("mousemove",A,!0),document==null||document.removeEventListener("mouseup",w,!0)},[A,w]);b.useEffect(()=>(s?j():O(),()=>{O()}),[s,j,O]);const M=b.useMemo(()=>new ResizeObserver(()=>v()),[v]);return b.useEffect(()=>(M.observe(e.editor.view.dom),()=>{M.disconnect()}),[e.editor.view.dom,M]),a.jsx(le.NodeViewWrapper,{as:d?"span":"div",className:"image-view",style:{...p,textAlign:f,display:d?"inline":"block"},children:a.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:p,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,children:[a.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)||s)&&a.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(C=>a.jsx("span",{className:`image-resizer__handler image-resizer__handler--${C}`,onMouseDown:_=>S(_,C)},`image-dir-${C}`))})]})})}const yt=new H.PluginKey("upload-image");function nx(){return new H.Plugin({key:yt,state:{init(){return H.DecorationSet.empty},apply(e,t){t=t.map(e.mapping,e.doc);const r=e.getMeta(yt);if(r!=null&&r.add)for(const{id:n,pos:i,src:o}of r.add){const s=ix(o),c=H.Decoration.widget(i,s,{id:n});t=t.add(e.doc,[c])}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 ix(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 ox(e,t){var i;const n=yt.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 ax({validateFn:e,onUpload:t,postUpload:r,defaultInline:n=!1}){return(i,o,s)=>{for(const c of i){if(e&&!e(c))continue;const l=Date.now().toString(),u=o.state.tr;u.selection.empty||u.deleteSelection();const f=URL.createObjectURL(c);u.setMeta(yt,{add:[{id:l,pos:s,src:f}]}),o.dispatch(u),t(c).then(async d=>{var A;r&&typeof d=="string"&&(d=await r(d));const{schema:h}=o.state;let p=ox(o.state,l);if(p===null)return;const m=typeof d=="object"?f:d,g=(A=h.nodes.image)==null?void 0:A.create({src:m,inline:n});if(!g)return;const{doc:v}=o.state;p>v.content.size&&(p=v.content.size-1);const S=o.state.tr.replaceWith(p,p,g).setMeta(yt,{remove:[l]});o.dispatch(S)},()=>{const d=o.state.tr.delete(s,s).setMeta(yt,{remove:[l]});o.dispatch(d)})}}}function sx(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 cx(e,t,r,n){var o;const i=[...((o=t.dataTransfer)==null?void 0:o.files)||[]];if(!r&&i.length>0){t.preventDefault();const s=e.posAtCoords({left:t.clientX,top:t.clientY});if(s)return n(i,e,s.pos+1),!0}return!1}const lx={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,resourceImage:"both",defaultInline:!1},wt=so.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...lx,...(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:tx,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 le.ReactNodeViewRenderer(rx)},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);`:"",s=n?`text-align: ${n};`:"";return[i?"span":"div",{style:s,class:"image"},["img",H.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=ax({validateFn:r=>!(!this.options.acceptMimes.includes(r.type)||r.size>this.options.maxSize),onUpload:this.options.upload,defaultInline:this.options.defaultInline});return[new H.Plugin({props:{handlePaste:(r,n)=>!n.clipboardData||[...n.clipboardData.files||[]].some(o=>o.type==="text/html")?!1:sx(r,n,t),handleDrop:(r,n,i,o)=>(!(n instanceof DragEvent)||!n.dataTransfer||cx(r,n,o,t),!1)}}),nx()]}});function ux({selectImage:e,giphyApiKey:t,children:r}){const[n,i]=b.useState([]),[o]=b.useState(15),s=b.useRef(null),c=(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)})};b.useEffect(()=>{c("","trend")},[]);const l=b.useCallback(Wt(u=>{if(!u.target.value){c("","trend");return}c(u.target.value)},350),[]);return a.jsxs(Yt,{modal:!0,children:[a.jsx(Kt,{asChild:!0,children:r}),a.jsx(Ct,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"richtext-mb-[10px] richtext-w-full",children:a.jsx(Ae,{onChange:l,placeholder:"Search GIF",ref:s,type:"text"})}),a.jsx("div",{className:"richtext-max-h-[280px] richtext-overflow-y-auto",children:a.jsx("div",{className:"richtext-grid richtext-grid-cols-2 richtext-gap-1 ",children:n!=null&&n.length?n==null?void 0:n.map(u=>a.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}`)):a.jsx("p",{children:"No GIFs found"})})})]}):a.jsx("div",{children:a.jsx("p",{children:"Missing Giphy API Key"})})})]})}function dx({editor:e,icon:t,giphyApiKey:r,...n}){const i=o=>{const{url:s}=o.images.original;e.chain().focus().setImageGif({src:s}).run()};return a.jsx(ux,{giphyApiKey:r,selectImage:i,children:a.jsx(F,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const sr={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function fx(e){var M,N;const[t,r]=b.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[n,i]=b.useState({width:0,height:0}),[o]=b.useState([sr.TOP_LEFT,sr.TOP_RIGHT,sr.BOTTOM_LEFT,sr.BOTTOM_RIGHT]),[s,c]=b.useState(!1),[l,u]=b.useState({x:0,y:0,w:0,h:0,dir:""}),{align:f}=(M=e==null?void 0:e.node)==null?void 0:M.attrs,d=b.useMemo(()=>{var k;const{src:T,alt:C,width:_,height:P}=(k=e==null?void 0:e.node)==null?void 0:k.attrs,E=mr(_)?`${_}px`:_,L=mr(P)?`${P}px`:P;return{src:T||void 0,alt:C||void 0,style:{width:E||void 0,height:L||void 0}}},[(N=e==null?void 0:e.node)==null?void 0:N.attrs]),h=b.useMemo(()=>{const{style:{width:T}}=d;return{width:T==="100%"?T:void 0}},[d]);function p(T){i({width:T.target.width,height:T.target.height})}function m(){const{editor:T,getPos:C}=e;T.commands.setNodeSelection(C())}const g=b.useCallback(bt(()=>{const{editor:T}=e,{width:C}=getComputedStyle(T.view.dom);r(_=>({..._,width:Number.parseInt(C,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function v(T,C){T.preventDefault(),T.stopPropagation();const _=n.width,P=n.height,E=_/P;let L=Number(e.node.attrs.width),k=Number(e.node.attrs.height);const Y=t.width;L&&!k?(L=L>Y?Y:L,k=Math.round(L/E)):k&&!L?(L=Math.round(k*E),L=L>Y?Y:L):!L&&!k?(L=_>Y?Y:_,k=Math.round(L/E)):L=L>Y?Y:L,c(!0),u({x:T.clientX,y:T.clientY,w:L,h:k,dir:C})}const S=b.useCallback(bt(T=>{if(T.preventDefault(),T.stopPropagation(),!s)return;const{x:C,w:_,dir:P}=l,E=(T.clientX-C)*(/l/.test(P)?-1:1),L=Hc(_+E,B.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:L,height:null})},B.IMAGE_THROTTLE_WAIT_TIME),[s,l,t,e.updateAttributes]),A=b.useCallback(T=>{T.preventDefault(),T.stopPropagation(),s&&(u({x:0,y:0,w:0,h:0,dir:""}),c(!1),m())},[s,m]),w=b.useCallback(()=>{document==null||document.addEventListener("mousemove",S,!0),document==null||document.addEventListener("mouseup",A,!0)},[S,A]),j=b.useCallback(()=>{document==null||document.removeEventListener("mousemove",S,!0),document==null||document.removeEventListener("mouseup",A,!0)},[S,A]);b.useEffect(()=>(s?w():j(),()=>{j()}),[s,w,j]);const O=b.useMemo(()=>new ResizeObserver(()=>g()),[g]);return b.useEffect(()=>(O.observe(e.editor.view.dom),()=>{O.disconnect()}),[e.editor.view.dom,O]),a.jsx(le.NodeViewWrapper,{className:"image-view",style:{...h,width:"100%",textAlign:f},children:a.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:h,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${s?"image-view__body--resizing":""}`,children:[a.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)||s)&&a.jsx("div",{className:"image-resizer",children:o==null?void 0:o.map(T=>a.jsx("span",{className:`image-resizer__handler image-resizer__handler--${T}`,onMouseDown:C=>v(C,T)},`image-dir-${T}`))})]})})}const co=so.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:dx,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 le.ReactNodeViewRenderer(fx)},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",H.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 hx(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 px(e){const{t}=B.useLocale(),[r,n]=b.useState(""),i=b.useRef(null),[o,s]=b.useState(""),[c,l]=b.useState(!1),u=m=>{l(m.detail)};b.useEffect(()=>{const m=zt(nt.UPLOAD_VIDEO(e.editor.id),u);return()=>{m()}},[]);const f=b.useMemo(()=>{var g;return(g=e.editor.extensionManager.extensions.find(v=>v.name===lo.name))==null?void 0:g.options},[e.editor]);async function d(m){var A;const g=(A=m==null?void 0:m.target)==null?void 0:A.files;if(!e.editor||e.editor.isDestroyed||g.length===0)return;const v=g[0];let S="";f.upload?S=await f.upload(v):S=URL.createObjectURL(v),e.editor.chain().focus().setVideo({src:S,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 a.jsxs(Vt,{onOpenChange:l,open:c,children:[a.jsx(Xt,{asChild:!0,children:a.jsx(F,{action:()=>l(!0),icon:e.icon,tooltip:e.tooltip})}),a.jsxs(At,{children:[a.jsx(jt,{children:t("editor.video.dialog.title")}),a.jsxs(Tl,{activationMode:"manual",defaultValue:(f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="upload"?"upload":"link",children:[a.jsxs(vo,{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")&&a.jsx(Ft,{value:"upload",children:t("editor.video.dialog.tab.upload")}),((f==null?void 0:f.resourceVideo)==="both"||(f==null?void 0:f.resourceVideo)==="link")&&a.jsx(Ft,{value:"link",children:t("editor.video.dialog.link")})]}),a.jsxs(Ht,{value:"upload",children:[a.jsx("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:a.jsx(ge,{className:"richtext-mt-1 richtext-w-full",onClick:p,size:"sm",children:t("editor.video.dialog.tab.upload")})}),a.jsx("input",{accept:"video/*",multiple:!0,onChange:d,ref:i,type:"file",style:{display:"none"}})]}),a.jsxs(Ht,{value:"link",children:[a.jsx("form",{onSubmit:h,children:a.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[a.jsx(Ae,{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,v=f.videoProviders||["."];g&&!hx(g,v)?s("Invalid video URL"):s("")}}),a.jsx(ge,{type:"submit",children:t("editor.video.dialog.button.apply")})]})}),o&&a.jsx("div",{className:"richtext-my-[5px] richtext-text-red-500",children:o})]})]})]})]})}function mx(e,t,r){return e<t?t:e>r?r:e}const gx=e=>typeof e=="number",xx=e=>typeof e=="string",vx=e=>typeof e=="function";function yx(e,t="px"){if(!e)return e;const r=gx(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 wl(e,t){if(!e)return!1;const{extensions:r=[]}=(e==null?void 0:e.extensionManager)??{};return!!r.find(i=>i.name===t)}function bx(e){return e.map(t=>xx(t)?{value:t,name:t}:t)}function wx(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 lo=H.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:B.VIDEO_SIZE["size-medium"],HTMLAttributes:{class:"iframe-wrapper"},button:({editor:e,t})=>{var r,n;return{component:px,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?wx(e):null})},width:{default:this.options.width,renderHTML:({width:e})=>({width:yx(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)}}}),uo={maxWidth:"auto",zIndex:20,appendTo:"parent",moveTransition:"transform 0.1s ease-out"};function fo({item:e,disabled:t,editor:r}){var i;const n=e.component;return n?a.jsx(b.Fragment,{children:e.type==="divider"?a.jsx(Ee,{className:"!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",orientation:"vertical"}):a.jsx(n,{...e.componentProps,disabled:t||((i=e==null?void 0:e.componentProps)==null?void 0:i.disabled),editor:r})}):a.jsx(a.Fragment,{})}function Sx(e){return e.type.name===wt.name}function Ax(e){return e.type.name===co.name}function jx(e){return e.type.name===lo.name}function Cx(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(Sx(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:rg(e.editor),[e.disabled,e.editor,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:uo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(fo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-${o}`))})}):a.jsx(a.Fragment,{})})})}function Ix(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(Ax(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:ng(e.editor),[e.disabled,e.editor,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:uo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(fo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-image-gif-${o}`))})}):a.jsx(a.Fragment,{})})})}function Tx(e){const{lang:t}=B.useLocale(),r=({editor:i})=>{const{selection:o}=i.view.state,{$from:s,to:c}=o;let l=!1;return i.view.state.doc.nodesBetween(s.pos,c,u=>{if(jx(u))return l=!0,!1}),l},n=b.useMemo(()=>e.disabled?[]:ag(e.editor),[e.editor,e.disabled,t]);return a.jsx(a.Fragment,{children:a.jsx(le.BubbleMenu,{editor:e==null?void 0:e.editor,shouldShow:r,tippyOptions:uo,children:n!=null&&n.length?a.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:a.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)=>a.jsx(fo,{disabled:e.disabled,editor:e.editor,item:i},`bubbleMenu-video-${o}`))})}):a.jsx(a.Fragment,{})})})}function Px(e,t,r=null){return r?e.createChecked({index:t},r):e.createAndFill({index:t})}function Rx(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 Ox(e,t,r=null){const n=Rx(e),i=[];for(let o=0;o<t;o+=1){const s=Px(n.column,o,r);s&&i.push(s)}return n.columns.createChecked({cols:t},i)}function Wr({state:e,dispatch:t,type:r}){const n=H.findParentNode(o=>o.type.name===qt.name)(e.selection),i=H.findParentNode(o=>o.type.name===ho.name)(e.selection);if(t&&n&&i){const o=n.node,s=i.node.attrs.index,c=o.toJSON();let l=s;r==="delete"?(l=s-1,c.content.splice(s,1)):(l=r==="addBefore"?s:s+1,c.content.splice(l,0,{type:"column",attrs:{index:s},content:[{type:"paragraph"}]})),c.attrs.cols=c.content.length,c.content.forEach((h,p)=>{h.attrs.index=p});const u=H.Node$1.fromJSON(e.schema,c);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(H.TextSelection.near(d.doc.resolve(f))),t(d)}return!0}function Aa({state:e,dispatch:t,type:r}){const n=H.findParentNode(o=>o.type.name===qt.name)(e.selection),i=H.findParentNode(o=>o.type.name===ho.name)(e.selection);if(t&&n&&i){const o=n.node,s=i.node.attrs.index;let c=0;r==="before"?c=(s-1+o.attrs.cols)%o.attrs.cols:c=(s+1)%o.attrs.cols;let l=n.pos;o.content.forEach((f,d,h)=>{h<c&&(l+=f.nodeSize)});const u=e.tr.setTime(Date.now());return u.setSelection(H.TextSelection.near(u.doc.resolve(l))),t(u),!0}return!1}const ho=H.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",H.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Ex=H.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")}})}}}),Sl=200,qt=H.Node.create({name:"columns",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"column{1,}",priority:Sl,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",H.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{insertColumns:e=>({tr:t,dispatch:r,editor:n})=>{const i=Ox(n.schema,e&&e.cols||3);if(r){const o=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(H.TextSelection.near(t.doc.resolve(o)))}return!0},addColBefore:()=>({dispatch:e,state:t})=>Wr({dispatch:e,state:t,type:"addBefore"}),addColAfter:()=>({dispatch:e,state:t})=>Wr({dispatch:e,state:t,type:"addAfter"}),deleteCol:()=>({dispatch:e,state:t})=>Wr({dispatch:e,state:t,type:"delete"})}},addKeyboardShortcuts(){return{"Mod-Alt-G":()=>this.editor.commands.insertColumns(),Tab:()=>Aa({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"after"}),"Shift-Tab":()=>Aa({state:this.editor.state,dispatch:this.editor.view.dispatch,type:"before"})}}});function po(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 s=r.tr.doc.nodeAt(o);s&&s.type.name===e&&(t.dispatchTransaction&&t.dispatchTransaction(r.tr.delete(o,o+s.nodeSize)),i=!0)}}return i}function Mx({editor:e}){const{t}=B.useLocale(),r=b.useCallback(()=>e.isActive(qt.name),[e]),n=b.useCallback(()=>po(qt.name,e),[e]),i=b.useCallback(()=>e.chain().focus().addColBefore().run(),[e]),o=b.useCallback(()=>e.chain().focus().addColAfter().run(),[e]),s=b.useCallback(()=>e.chain().focus().deleteCol().run(),[e]);return a.jsx(le.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:a.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:[a.jsx(F,{action:i,icon:"ColumnAddLeft",tooltip:t("editor.table.menu.insertColumnBefore")}),a.jsx(F,{action:o,icon:"ColumnAddRight",tooltip:t("editor.table.menu.insertColumnAfter")}),a.jsx(F,{action:s,icon:"DeleteColumn",tooltip:t("editor.table.menu.deleteColumn")}),a.jsx(F,{action:n,icon:"Trash2",tooltip:t("editor.table.menu.delete_column")})]})})}const Al=ce.Root,jl=ce.Trigger,ja=ce.Portal,Ca=ce.Sub,Wi=ee.forwardRef(({className:e,inset:t,children:r,...n},i)=>a.jsxs(ce.SubTrigger,{ref:i,className:Z("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,a.jsx(R.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));Wi.displayName=ce.SubTrigger.displayName;const Vi=ee.forwardRef(({className:e,...t},r)=>a.jsx(ce.SubContent,{ref:r,className:Z("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}));Vi.displayName=ce.SubContent.displayName;const mo=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(ce.Portal,{children:a.jsx(ce.Content,{ref:n,sideOffset:t,className:Z("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})}));mo.displayName=ce.Content.displayName;const Me=ee.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(ce.Item,{ref:n,className:Z("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}));Me.displayName=ce.Item.displayName;const Cl=ee.forwardRef(({className:e,children:t,checked:r,...n},i)=>a.jsxs(ce.CheckboxItem,{ref:i,className:Z("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:[a.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:a.jsx(ce.ItemIndicator,{children:a.jsx(R.Check,{className:"richtext-h-4 richtext-w-4"})})}),t]}));Cl.displayName=ce.CheckboxItem.displayName;const Nx=ee.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(ce.RadioItem,{ref:n,className:Z("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:[a.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:a.jsx(ce.ItemIndicator,{children:a.jsx(R.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),t]}));Nx.displayName=ce.RadioItem.displayName;const $x=ee.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(ce.Label,{ref:n,className:Z("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",t&&"richtext-pl-8",e),...r}));$x.displayName=ce.Label.displayName;const go=ee.forwardRef(({className:e,...t},r)=>a.jsx(ce.Separator,{ref:r,className:Z("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),...t}));go.displayName=ce.Separator.displayName;function Il({className:e,...t}){return a.jsx("span",{className:Z("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",e),...t})}Il.displayName="DropdownMenuShortcut";const Ae=ee.forwardRef(({className:e,type:t,...r},n)=>a.jsx("input",{type:t,className:Z("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}));Ae.displayName="Input";const _x=Sr("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),He=ee.forwardRef(({className:e,...t},r)=>a.jsx(wc.Root,{ref:r,className:Z(_x(),e),...t}));He.displayName=wc.Root.displayName;const Yt=kt.Root,Kt=kt.Trigger,Ct=ee.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},i)=>a.jsx(kt.Portal,{children:a.jsx(kt.Content,{ref:i,align:t,sideOffset:r,className:Z("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})}));Ct.displayName=kt.Content.displayName;const Ee=ee.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>a.jsx(yc.Root,{ref:i,decorative:r,orientation:t,className:Z("richtext-shrink-0 richtext-bg-border",t==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",e),...n}));Ee.displayName=yc.Root.displayName;const xo=ee.forwardRef(({className:e,...t},r)=>a.jsx(Ni.Root,{className:Z("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:a.jsx(Ni.Thumb,{className:Z("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")})}));xo.displayName=Ni.Root.displayName;const Tl=ct.Root,vo=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.List,{ref:r,className:Z("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}));vo.displayName=ct.List.displayName;const Ft=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.Trigger,{ref:r,className:Z("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}));Ft.displayName=ct.Trigger.displayName;const Ht=ee.forwardRef(({className:e,...t},r)=>a.jsx(ct.Content,{ref:r,className:Z("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}));Ht.displayName=ct.Content.displayName;const kx=je.Provider,Pl=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Viewport,{ref:r,className:Z("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}));Pl.displayName=je.Viewport.displayName;const Lx=Sr("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"}}),Rl=ee.forwardRef(({className:e,variant:t,...r},n)=>a.jsx(je.Root,{ref:n,className:Z(Lx({variant:t}),e),...r}));Rl.displayName=je.Root.displayName;const Dx=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Action,{ref:r,className:Z("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}));Dx.displayName=je.Action.displayName;const Ol=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Close,{ref:r,className:Z("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:a.jsx(R.X,{className:"richtext-h-4 richtext-w-4"})}));Ol.displayName=je.Close.displayName;const El=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Title,{ref:r,className:Z("richtext-text-sm richtext-font-semibold",e),...t}));El.displayName=je.Title.displayName;const Ml=ee.forwardRef(({className:e,...t},r)=>a.jsx(je.Description,{ref:r,className:Z("richtext-text-sm richtext-opacity-90",e),...t}));Ml.displayName=je.Description.displayName;const Bx=Sr("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"}}),yo=ee.forwardRef(({className:e,variant:t,size:r,...n},i)=>a.jsx(bc.Root,{ref:i,className:Z(Bx({variant:t,size:r,className:e})),...n}));yo.displayName=bc.Root.displayName;const zx=Gt.Provider,bo=Gt.Root,wo=Gt.Trigger,Cr=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(Gt.Content,{ref:n,sideOffset:t,className:Z("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}));Cr.displayName=Gt.Content.displayName;const qx=1,Fx=1e6;let Vr=0;function Hx(){return Vr=(Vr+1)%Number.MAX_SAFE_INTEGER,Vr.toString()}const Xr=new Map;function Ia(e){if(Xr.has(e))return;const t=setTimeout(()=>{Xr.delete(e),_t({type:"REMOVE_TOAST",toastId:e})},Fx);Xr.set(e,t)}function Ux(e,t){switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,qx)};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?Ia(r):e.toasts.forEach(n=>{Ia(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 dr=[];let fr={toasts:[]};function _t(e){fr=Ux(fr,e),dr.forEach(t=>{t(fr)})}function Gx({...e}){const t=Hx(),r=i=>_t({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>_t({type:"DISMISS_TOAST",toastId:t});return _t({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function Nl(){const[e,t]=ee.useState(fr);return ee.useEffect(()=>(dr.push(t),()=>{const r=dr.indexOf(t);r>-1&&dr.splice(r,1)}),[e]),{...e,toast:Gx,dismiss:r=>_t({type:"DISMISS_TOAST",toastId:r})}}const $l=ee.forwardRef(({className:e,...t},r)=>a.jsx(Mi.Root,{ref:r,className:Z("!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:a.jsx(Mi.Indicator,{className:Z("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:a.jsx(R.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));$l.displayName=Mi.Root.displayName;const Wx={padding:"0 12px 12px"},_l=({width:e,maxWidth:t,height:r,onOk:n,children:i})=>{const{t:o}=B.useLocale(),[s,c]=b.useState({width:"",height:"",maxWidth:""});b.useEffect(()=>{c({width:e,height:r,maxWidth:t})},[r,t,e]);function l(u){u.preventDefault(),u.stopPropagation(),n(s)}return a.jsxs(Yt,{modal:!0,children:[a.jsx(Kt,{asChild:!0,children:i}),a.jsx(Ct,{children:a.jsx("div",{style:Wx,children:a.jsxs("form",{className:"richtext-flex richtext-flex-col richtext-gap-2",onSubmit:l,children:[a.jsx(He,{className:"mb-[6px]",children:"Width"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.width,required:!0,onChange:u=>c({...s,width:u.target.value})})})}),a.jsx(He,{className:"mb-[6px]",children:"Max Width"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.maxWidth,required:!0,onChange:u=>c({...s,maxWidth:u.target.value})})})}),a.jsx(He,{className:"mb-[6px]",children:"Height"}),a.jsx("div",{className:"richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:a.jsx("div",{className:"richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm",children:a.jsx(Ae,{type:"number",value:s.height,required:!0,onChange:u=>c({...s,height:u.target.value})})})}),a.jsx(ge,{type:"submit",className:"richtext-self-end richtext-mt-2",children:o("editor.link.dialog.button.apply")})]})})})]})},It={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 Vx(e){const t=It.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 Xx(e){const t=It.youku,r=e.matchedUrl,n=t.idRule,i=new RegExp(n),o=r.match(i);if(o&&o.length>0){const s=o[0].slice(3);e.validId=!0,e.src=`${t.srcPrefix}/${s}`}else e.validId=!1;return e}function Yx(e){const t=It.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 Kx(e){const t=It.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 Zx(e,t){return t.src=e,t.validId=!0,t}function Jx(e,t){return t.src=e,t.validId=!0,t}function Qx(e,t){return t.src=e,t.validId=!0,t.originalLink=e,t}function ev(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function tv(e){return e.src=e.matchedUrl,e.validId=!0,e.originalLink=e.src,e}function rv(e){const t=It.figma;return e.src=`${t.srcPrefix}=${encodeURIComponent(e.matchedUrl)}`,e.validId=!0,e.originalLink=e.matchedUrl,e}function nv(e,t){return t.src=`${t.matchedUrl}?embed`,t.validId=!0,t.originalLink=e,t}function iv(e,t){return t.src=`${t.matchedUrl}`,t.validId=!0,t.originalLink=e,t}function ov(e){return e.src=`${e.matchedUrl}`,e.validId=!0,e.originalLink=e.src,e}function av(e,t){return t.src=`${t.matchedUrl}?background=white&banner=show&embedded=true`,t.validId=!0,t.originalLink=e,t}function sv(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=It[e].linkRule;for(const o of i){const s=new RegExp(o),c=t.match(s);if(c&&c.length>0)return r.validLink=!0,r.matchedUrl=e==="youtube"?c[1]:c[0],r}return r}function lv(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 kl(e){let t={validLink:!1,validId:!1,matchedUrl:"",originalLink:e,src:""};const r=lv(e);if(t=cv(r,e,t),!t.validLink)return t;switch(r){case"youtube":return Vx(t);case"youku":return Xx(t);case"bilibili":return Yx(t);case"qqvideo":return Kx(t);case"amap":return Zx(e,t);case"baidu_map":return Jx(e,t);case"googlemaps":return Qx(e,t);case"modao":return ev(t);case"lanhu":return tv(t);case"figma":return rv(t);case"canva":return nv(e,t);case"processon":return iv(e,t);case"codepen":return ov(t);case"jinshuju":return av(e,t);case"iframe":return sv(e,t);default:return e}}function Ll(){const[e]=vl(t=>t.value);return e}const uv={setDisable:(e,t)=>{jr(nt.EDIT(e),t)}},dv="_wrap_5y04w_1",fv="_innerWrap_5y04w_15",Ta={wrap:dv,innerWrap:fv};function hv({editor:e,node:t,updateAttributes:r}){const n=Ll(),{src:i,width:o,height:s}=t.attrs,[c,l]=b.useState("");function u(){if(!c)return;const d=kl(c);e.chain().updateAttributes(at.name,{src:(d==null?void 0:d.src)||c}).setNodeSelection(e.state.selection.from).focus().run()}const f=b.useCallback(d=>{r({width:d.width,height:d.height})},[r]);return a.jsxs(le.NodeViewWrapper,{children:[!i&&a.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:[a.jsx(Ae,{autoFocus:!0,className:"richtext-flex-1",onInput:d=>l(d.target.value),placeholder:"Enter link",type:"url",value:c}),a.jsx(ge,{className:"richtext-w-[60px]",onClick:u,children:"OK"})]}),i&&a.jsx(Pu.Resizable,{size:{width:Number.parseInt(o),height:Number.parseInt(s)},onResizeStop:(d,h,p,m)=>{f({width:Number.parseInt(o)+m.width,height:Number.parseInt(s)+m.height})},children:a.jsx("div",{className:le.clsx(Ta.wrap,"render-wrapper"),children:a.jsx("div",{className:Ta.innerWrap,style:{pointerEvents:n?"none":"auto"},children:a.jsx("iframe",{className:"richtext-my-[12px] ",src:i})})})})]})}const at=H.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:le.getDatasetAttribute("width")},height:{default:300,parseHTML:le.getDatasetAttribute("height")},src:{default:null,parseHTML:le.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",H.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setIframe:e=>({tr:t,commands:r,chain:n})=>{var o,s,c;if(((c=(s=(o=t.selection)==null?void 0:o.node)==null?void 0:s.type)==null?void 0:c.name)==this.name)return r.updateAttributes(this.name,e);const i=e||{url:""};return n().insertContent({type:this.name,attrs:i}).run()}}},addInputRules(){return[H.nodeInputRule({find:/^\$iframe\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]},addNodeView(){return le.ReactNodeViewRenderer(hv)}});var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bl(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 Yr,Pa;function zl(){if(Pa)return Yr;Pa=1;var e=Object.prototype.toString;return Yr=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},Yr}var Kr,Ra;function pv(){if(Ra)return Kr;Ra=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=zl(),i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),c=["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]",v=n(p),S=m&&r.call(p)==="[object String]",A=[];if(!m&&!g&&!v)throw new TypeError("Object.keys called on a non-object");var w=s&&g;if(S&&p.length>0&&!t.call(p,0))for(var j=0;j<p.length;++j)A.push(String(j));if(v&&p.length>0)for(var O=0;O<p.length;++O)A.push(String(O));else for(var M in p)!(w&&M==="prototype")&&t.call(p,M)&&A.push(String(M));if(o)for(var N=d(p),T=0;T<c.length;++T)!(N&&c[T]==="constructor")&&t.call(p,c[T])&&A.push(c[T]);return A}}return Kr=e,Kr}var Zr,Oa;function So(){if(Oa)return Zr;Oa=1;var e=Array.prototype.slice,t=zl(),r=Object.keys,n=r?function(s){return r(s)}:pv(),i=Object.keys;return n.shim=function(){if(Object.keys){var s=function(){var c=Object.keys(arguments);return c&&c.length===arguments.length}(1,2);s||(Object.keys=function(l){return t(l)?i(e.call(l)):i(l)})}else Object.keys=n;return Object.keys||n},Zr=n,Zr}var Jr,Ea;function Ir(){if(Ea)return Jr;Ea=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jr=e,Jr}var Qr,Ma;function Ao(){return Ma||(Ma=1,Qr=SyntaxError),Qr}var en,Na;function Te(){return Na||(Na=1,en=TypeError),en}var tn,$a;function mv(){return $a||($a=1,tn=Object.getOwnPropertyDescriptor),tn}var rn,_a;function dt(){if(_a)return rn;_a=1;var e=mv();if(e)try{e([],"length")}catch{e=null}return rn=e,rn}var nn,ka;function jo(){if(ka)return nn;ka=1;var e=Ir(),t=Ao(),r=Te(),n=dt();return nn=function(o,s,c){if(!o||typeof o!="object"&&typeof o!="function")throw new r("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="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,s);if(e)e(o,s,{configurable:f===null&&h?h.configurable:!f,enumerable:l===null&&h?h.enumerable:!l,value:c,writable:u===null&&h?h.writable:!u});else if(d||!l&&!u&&!f)o[s]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},nn}var on,La;function Co(){if(La)return on;La=1;var e=Ir(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},on=t,on}var an,Da;function ft(){if(Da)return an;Da=1;var e=So(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,i=jo(),o=function(u){return typeof u=="function"&&r.call(u)==="[object Function]"},s=Co()(),c=function(u,f,d,h){if(f in u){if(h===!0){if(u[f]===d)return}else if(!o(h)||!h())return}s?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)c(u,h[p],f[h[p]],d[h[p]])};return l.supportsDescriptors=!!s,an=l,an}var sn={exports:{}},cn,Ba;function Io(){return Ba||(Ba=1,cn=Object),cn}var ln,za;function ql(){return za||(za=1,ln=Error),ln}var un,qa;function gv(){return qa||(qa=1,un=EvalError),un}var dn,Fa;function xv(){return Fa||(Fa=1,dn=RangeError),dn}var fn,Ha;function vv(){return Ha||(Ha=1,fn=ReferenceError),fn}var hn,Ua;function yv(){return Ua||(Ua=1,hn=URIError),hn}var pn,Ga;function bv(){return Ga||(Ga=1,pn=Math.abs),pn}var mn,Wa;function wv(){return Wa||(Wa=1,mn=Math.floor),mn}var gn,Va;function Sv(){return Va||(Va=1,gn=Math.max),gn}var xn,Xa;function Av(){return Xa||(Xa=1,xn=Math.min),xn}var vn,Ya;function jv(){return Ya||(Ya=1,vn=Math.pow),vn}var yn,Ka;function Cv(){return Ka||(Ka=1,yn=Math.round),yn}var bn,Za;function Iv(){return Za||(Za=1,bn=Number.isNaN||function(t){return t!==t}),bn}var wn,Ja;function Tv(){if(Ja)return wn;Ja=1;var e=Iv();return wn=function(r){return e(r)||r===0?r:r<0?-1:1},wn}var Sn,Qa;function Tr(){return Qa||(Qa=1,Sn=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 s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,r);if(c.value!==i||c.enumerable!==!0)return!1}return!0}),Sn}var An,es;function To(){if(es)return An;es=1;var e=typeof Symbol<"u"&&Symbol,t=Tr();return An=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},An}var jn,ts;function Fl(){return ts||(ts=1,jn=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jn}var Cn,rs;function Hl(){if(rs)return Cn;rs=1;var e=Io();return Cn=e.getPrototypeOf||null,Cn}var In,ns;function Pv(){if(ns)return In;ns=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},s=function(c,l){for(var u="",f=0;f<c.length;f+=1)u+=c[f],f+1<c.length&&(u+=l);return u};return In=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 S=u.apply(this,i(f,arguments));return Object(S)===S?S: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 ("+s(m,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var v=function(){};v.prototype=u.prototype,d.prototype=new v,v.prototype=null}return d},In}var Tn,is;function Zt(){if(is)return Tn;is=1;var e=Pv();return Tn=Function.prototype.bind||e,Tn}var Pn,os;function Po(){return os||(os=1,Pn=Function.prototype.call),Pn}var Rn,as;function Ro(){return as||(as=1,Rn=Function.prototype.apply),Rn}var On,ss;function Rv(){return ss||(ss=1,On=typeof Reflect<"u"&&Reflect&&Reflect.apply),On}var En,cs;function Ul(){if(cs)return En;cs=1;var e=Zt(),t=Ro(),r=Po(),n=Rv();return En=n||e.call(r,t),En}var Mn,ls;function Oo(){if(ls)return Mn;ls=1;var e=Zt(),t=Te(),r=Po(),n=Ul();return Mn=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return n(e,r,o)},Mn}var Nn,us;function Ov(){if(us)return Nn;us=1;var e=Oo(),t=dt(),r;try{r=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Nn=n&&typeof n.get=="function"?e([n.get]):typeof o=="function"?function(c){return o(c==null?c:i(c))}:!1,Nn}var $n,ds;function Gl(){if(ds)return $n;ds=1;var e=Fl(),t=Hl(),r=Ov();return $n=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,$n}var _n,fs;function Eo(){if(fs)return _n;fs=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Zt();return _n=r.call(e,t),_n}var kn,hs;function Ve(){if(hs)return kn;hs=1;var e,t=Io(),r=ql(),n=gv(),i=xv(),o=vv(),s=Ao(),c=Te(),l=yv(),u=bv(),f=wv(),d=Sv(),h=Av(),p=jv(),m=Cv(),g=Tv(),v=Function,S=function(J){try{return v('"use strict"; return ('+J+").constructor;")()}catch{}},A=dt(),w=Ir(),j=function(){throw new c},O=A?function(){try{return arguments.callee,j}catch{try{return A(arguments,"callee").get}catch{return j}}}():j,M=To()(),N=Gl(),T=Hl(),C=Fl(),_=Ro(),P=Po(),E={},L=typeof Uint8Array>"u"||!N?e:N(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&N?N([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":E,"%AsyncGenerator%":E,"%AsyncGeneratorFunction%":E,"%AsyncIteratorPrototype%":E,"%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%":v,"%GeneratorFunction%":E,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&N?N(N([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!N?e:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":A,"%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"||!M||!N?e:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&N?N(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":O,"%TypedArray%":L,"%TypeError%":c,"%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%":P,"%Function.prototype.apply%":_,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":T,"%Math.abs%":u,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":C};if(N)try{null.error}catch(J){var Y=N(N(J));k["%Error.prototype%"]=Y}var re=function J(z){var q;if(z==="%AsyncFunction%")q=S("async function () {}");else if(z==="%GeneratorFunction%")q=S("function* () {}");else if(z==="%AsyncGeneratorFunction%")q=S("async function* () {}");else if(z==="%AsyncGenerator%"){var D=J("%AsyncGeneratorFunction%");D&&(q=D.prototype)}else if(z==="%AsyncIteratorPrototype%"){var V=J("%AsyncGenerator%");V&&N&&(q=N(V.prototype))}return k[z]=q,q},ue={__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"]},ne=Zt(),Q=Eo(),xe=ne.call(P,Array.prototype.concat),fe=ne.call(_,Array.prototype.splice),Xe=ne.call(P,String.prototype.replace),Pe=ne.call(P,String.prototype.slice),I=ne.call(P,RegExp.prototype.exec),$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,U=function(z){var q=Pe(z,0,1),D=Pe(z,-1);if(q==="%"&&D!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(D==="%"&&q!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var V=[];return Xe(z,$,function(de,he,pe,ve){V[V.length]=pe?Xe(ve,G,"$1"):he||de}),V},K=function(z,q){var D=z,V;if(Q(ue,D)&&(V=ue[D],D="%"+V[0]+"%"),Q(k,D)){var de=k[D];if(de===E&&(de=re(D)),typeof de>"u"&&!q)throw new c("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:V,name:D,value:de}}throw new s("intrinsic "+z+" does not exist!")};return kn=function(z,q){if(typeof z!="string"||z.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new c('"allowMissing" argument must be a boolean');if(I(/^%?[^%]*%?$/,z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=U(z),V=D.length>0?D[0]:"",de=K("%"+V+"%",q),he=de.name,pe=de.value,ve=!1,be=de.alias;be&&(V=be[0],fe(D,xe([0,1],be)));for(var Le=1,Re=!0;Le<D.length;Le+=1){var we=D[Le],De=Pe(we,0,1),Be=Pe(we,-1);if((De==='"'||De==="'"||De==="`"||Be==='"'||Be==="'"||Be==="`")&&De!==Be)throw new s("property names with quotes must have matching quotes");if((we==="constructor"||!Re)&&(ve=!0),V+="."+we,he="%"+V+"%",Q(k,he))pe=k[he];else if(pe!=null){if(!(we in pe)){if(!q)throw new c("base intrinsic for "+z+" exists, but the property is not available.");return}if(A&&Le+1>=D.length){var ze=A(pe,we);Re=!!ze,Re&&"get"in ze&&!("originalValue"in ze.get)?pe=ze.get:pe=pe[we]}else Re=Q(pe,we),pe=pe[we];Re&&!ve&&(k[he]=pe)}}return pe},kn}var Ln,ps;function Ev(){if(ps)return Ln;ps=1;var e=Ve(),t=jo(),r=Co()(),n=dt(),i=Te(),o=e("%Math.floor%");return Ln=function(c,l){if(typeof c!="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 c&&n){var h=n(c,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!u)&&(r?t(c,"length",l,!0,!0):t(c,"length",l)),c},Ln}var Dn,ms;function Mv(){if(ms)return Dn;ms=1;var e=Zt(),t=Ro(),r=Ul();return Dn=function(){return r(e,t,arguments)},Dn}var gs;function Tt(){return gs||(gs=1,function(e){var t=Ev(),r=Ir(),n=Oo(),i=Mv();e.exports=function(s){var c=n(arguments),l=s.length-(arguments.length-1);return t(c,1+(l>0?l:0),!0)},r?r(e.exports,"apply",{value:i}):e.exports.apply=i}(sn)),sn.exports}var Bn,xs;function ye(){if(xs)return Bn;xs=1;var e=Ve(),t=Oo(),r=t([e("%String.prototype.indexOf%")]);return Bn=function(i,o){var s=e(i,!!o);return typeof s=="function"&&r(i,".prototype.")>-1?t([s]):s},Bn}var zn,vs;function Wl(){if(vs)return zn;vs=1;var e=So(),t=Tr()(),r=ye(),n=Io(),i=r("Array.prototype.push"),o=r("Object.prototype.propertyIsEnumerable"),s=t?n.getOwnPropertySymbols:null;return zn=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||s);if(m)for(var g=m(h),v=0;v<g.length;++v){var S=g[v];o(h,S)&&i(p,S)}for(var A=0;A<p.length;++A){var w=p[A];if(o(h,w)){var j=h[w];f[w]=j}}}return f},zn}var qn,ys;function Vl(){if(ys)return qn;ys=1;var e=Wl(),t=function(){if(!Object.assign)return!1;for(var n="abcdefghijklmnopqrst",i=n.split(""),o={},s=0;s<i.length;++s)o[i[s]]=i[s];var c=Object.assign({},o),l="";for(var u in c)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 qn=function(){return!Object.assign||t()||r()?e:Object.assign},qn}var Fn,bs;function Nv(){if(bs)return Fn;bs=1;var e=ft(),t=Vl();return Fn=function(){var n=t();return e(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n},Fn}var Hn,ws;function $v(){if(ws)return Hn;ws=1;var e=ft(),t=Tt(),r=Wl(),n=Vl(),i=Nv(),o=t.apply(n()),s=function(l,u){return o(Object,arguments)};return e(s,{getPolyfill:n,implementation:r,shim:i}),Hn=s,Hn}var Un,Ss;function Xl(){if(Ss)return Un;Ss=1;var e=Ve(),t=Tt(),r=t(e("String.prototype.indexOf"));return Un=function(i,o){var s=e(i,!!o);return typeof s=="function"&&r(i,".prototype.")>-1?t(s):s},Un}var Gn,As;function _v(){if(As)return Gn;As=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!==""},Gn=e,Gn}var Wn,js;function kv(){if(js)return Wn;js=1;var e=jo(),t=Co()(),r=_v().functionsHaveConfigurableNames(),n=Te();return Wn=function(o,s){if(typeof o!="function")throw new n("`fn` is not a function");var c=arguments.length>2&&!!arguments[2];return(!c||r)&&(t?e(o,"name",s,!0,!0):e(o,"name",s)),o},Wn}var Vn,Cs;function Yl(){if(Cs)return Vn;Cs=1;var e=kv(),t=Te(),r=Object;return Vn=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),Vn}var Xn,Is;function Kl(){if(Is)return Xn;Is=1;var e=Yl(),t=ft().supportsDescriptors,r=Object.getOwnPropertyDescriptor;return Xn=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="",s={};if(Object.defineProperty(s,"hasIndices",{get:function(){o+="d"}}),Object.defineProperty(s,"sticky",{get:function(){o+="y"}}),i.get.call(s),o==="dy")return i.get}}return e},Xn}var Yn,Ts;function Lv(){if(Ts)return Yn;Ts=1;var e=ft().supportsDescriptors,t=Kl(),r=dt(),n=Object.defineProperty,i=ql(),o=Gl(),s=/a/;return Yn=function(){if(!e||!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var l=t(),u=o(s),f=r(u,"flags");return(!f||f.get!==l)&&n(u,"flags",{configurable:!0,enumerable:!1,get:l}),l},Yn}var Kn,Ps;function Dv(){if(Ps)return Kn;Ps=1;var e=ft(),t=Tt(),r=Yl(),n=Kl(),i=Lv(),o=t(n());return e(o,{getPolyfill:n,implementation:r,shim:i}),Kn=o,Kn}var Nt={exports:{}},Zn,Rs;function ht(){if(Rs)return Zn;Rs=1;var e=Tr();return Zn=function(){return e()&&!!Symbol.toStringTag},Zn}var Jn,Os;function Zl(){if(Os)return Jn;Os=1;var e=ht()(),t=ye(),r=t("Object.prototype.toString"),n=function(c){return e&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:r(c)==="[object Arguments]"},i=function(c){return n(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&r(c)!=="[object Array]"&&"callee"in c&&r(c.callee)==="[object Function]"},o=function(){return n(arguments)}();return n.isLegacyArguments=i,Jn=o?n:i,Jn}const Bv={},zv=Object.freeze(Object.defineProperty({__proto__:null,default:Bv},Symbol.toStringTag,{value:"Module"})),qv=Bl(zv);var Qn,Es;function Pr(){if(Es)return Qn;Es=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,s=i&&o&&typeof o.get=="function"?o.get:null,c=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,v=Function.prototype.toString,S=String.prototype.match,A=String.prototype.slice,w=String.prototype.replace,j=String.prototype.toUpperCase,O=String.prototype.toLowerCase,M=RegExp.prototype.test,N=Array.prototype.concat,T=Array.prototype.join,C=Array.prototype.slice,_=Math.floor,P=typeof BigInt=="function"?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,k=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Y=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||!0)?Symbol.toStringTag:null,re=Object.prototype.propertyIsEnumerable,ue=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(x){return x.__proto__}:null);function ne(x,y){if(x===1/0||x===-1/0||x!==x||x&&x>-1e3&&x<1e3||M.call(/e/,y))return y;var te=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof x=="number"){var ie=x<0?-_(-x):_(x);if(ie!==x){var oe=String(ie),X=A.call(y,oe.length+1);return w.call(oe,te,"$&_")+"."+w.call(w.call(X,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(y,te,"$&_")}var Q=qv,xe=Q.custom,fe=de(xe)?xe:null,Xe={__proto__:null,double:'"',single:"'"},Pe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Qn=function x(y,te,ie,oe){var X=te||{};if(ve(X,"quoteStyle")&&!ve(Xe,X.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(X,"maxStringLength")&&(typeof X.maxStringLength=="number"?X.maxStringLength<0&&X.maxStringLength!==1/0:X.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ze=ve(X,"customInspect")?X.customInspect:!0;if(typeof Ze!="boolean"&&Ze!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(X,"indent")&&X.indent!==null&&X.indent!==" "&&!(parseInt(X.indent,10)===X.indent&&X.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(X,"numericSeparator")&&typeof X.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ot=X.numericSeparator;if(typeof y>"u")return"undefined";if(y===null)return"null";if(typeof y=="boolean")return y?"true":"false";if(typeof y=="string")return pt(y,X);if(typeof y=="number"){if(y===0)return 1/0/y>0?"0":"-0";var Se=String(y);return ot?ne(y,Se):Se}if(typeof y=="bigint"){var Je=String(y)+"n";return ot?ne(y,Je):Je}var Er=typeof X.depth>"u"?5:X.depth;if(typeof ie>"u"&&(ie=0),ie>=Er&&Er>0&&typeof y=="object")return U(y)?"[Array]":"[Object]";var mt=gu(X,ie);if(typeof oe>"u")oe=[];else if(Re(oe,y)>=0)return"[Circular]";function Oe(gt,tr,vu){if(tr&&(oe=C.call(oe),oe.push(tr)),vu){var qo={depth:X.depth};return ve(X,"quoteStyle")&&(qo.quoteStyle=X.quoteStyle),x(gt,qo,ie+1,oe)}return x(gt,X,ie+1,oe)}if(typeof y=="function"&&!J(y)){var $o=Le(y),_o=Qt(y,Oe);return"[Function"+($o?": "+$o:" (anonymous)")+"]"+(_o.length>0?" { "+T.call(_o,", ")+" }":"")}if(de(y)){var ko=k?w.call(String(y),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(y);return typeof y=="object"&&!k?Ke(ko):ko}if(Ye(y)){for(var Rt="<"+O.call(String(y.nodeName)),Mr=y.attributes||[],er=0;er<Mr.length;er++)Rt+=" "+Mr[er].name+"="+I($(Mr[er].value),"double",X);return Rt+=">",y.childNodes&&y.childNodes.length&&(Rt+="..."),Rt+="</"+O.call(String(y.nodeName))+">",Rt}if(U(y)){if(y.length===0)return"[]";var Nr=Qt(y,Oe);return mt&&!mu(Nr)?"["+Or(Nr,mt)+"]":"[ "+T.call(Nr,", ")+" ]"}if(z(y)){var $r=Qt(y,Oe);return!("cause"in Error.prototype)&&"cause"in y&&!re.call(y,"cause")?"{ ["+String(y)+"] "+T.call(N.call("[cause]: "+Oe(y.cause),$r),", ")+" }":$r.length===0?"["+String(y)+"]":"{ ["+String(y)+"] "+T.call($r,", ")+" }"}if(typeof y=="object"&&Ze){if(fe&&typeof y[fe]=="function"&&Q)return Q(y,{depth:Er-ie});if(Ze!=="symbol"&&typeof y.inspect=="function")return y.inspect()}if(we(y)){var Lo=[];return n&&n.call(y,function(gt,tr){Lo.push(Oe(tr,y,!0)+" => "+Oe(gt,y))}),No("Map",r.call(y),Lo,mt)}if(ze(y)){var Do=[];return c&&c.call(y,function(gt){Do.push(Oe(gt,y))}),No("Set",s.call(y),Do,mt)}if(De(y))return Rr("WeakMap");if(Jt(y))return Rr("WeakSet");if(Be(y))return Rr("WeakRef");if(D(y))return Ke(Oe(Number(y)));if(he(y))return Ke(Oe(P.call(y)));if(V(y))return Ke(m.call(y));if(q(y))return Ke(Oe(String(y)));if(typeof window<"u"&&y===window)return"{ [object Window] }";if(typeof globalThis<"u"&&y===globalThis||typeof Ut<"u"&&y===Ut)return"{ [object globalThis] }";if(!K(y)&&!J(y)){var _r=Qt(y,Oe),Bo=ue?ue(y)===Object.prototype:y instanceof Object||y.constructor===Object,kr=y instanceof Object?"":"null prototype",zo=!Bo&&Y&&Object(y)===y&&Y in y?A.call(be(y),8,-1):kr?"Object":"",xu=Bo||typeof y.constructor!="function"?"":y.constructor.name?y.constructor.name+" ":"",Lr=xu+(zo||kr?"["+T.call(N.call([],zo||[],kr||[]),": ")+"] ":"");return _r.length===0?Lr+"{}":mt?Lr+"{"+Or(_r,mt)+"}":Lr+"{ "+T.call(_r,", ")+" }"}return String(y)};function I(x,y,te){var ie=te.quoteStyle||y,oe=Xe[ie];return oe+x+oe}function $(x){return w.call(String(x),/"/g,"&quot;")}function G(x){return!Y||!(typeof x=="object"&&(Y in x||typeof x[Y]<"u"))}function U(x){return be(x)==="[object Array]"&&G(x)}function K(x){return be(x)==="[object Date]"&&G(x)}function J(x){return be(x)==="[object RegExp]"&&G(x)}function z(x){return be(x)==="[object Error]"&&G(x)}function q(x){return be(x)==="[object String]"&&G(x)}function D(x){return be(x)==="[object Number]"&&G(x)}function V(x){return be(x)==="[object Boolean]"&&G(x)}function de(x){if(k)return x&&typeof x=="object"&&x instanceof Symbol;if(typeof x=="symbol")return!0;if(!x||typeof x!="object"||!L)return!1;try{return L.call(x),!0}catch{}return!1}function he(x){if(!x||typeof x!="object"||!P)return!1;try{return P.call(x),!0}catch{}return!1}var pe=Object.prototype.hasOwnProperty||function(x){return x in this};function ve(x,y){return pe.call(x,y)}function be(x){return g.call(x)}function Le(x){if(x.name)return x.name;var y=S.call(v.call(x),/^function\s*([\w$]+)/);return y?y[1]:null}function Re(x,y){if(x.indexOf)return x.indexOf(y);for(var te=0,ie=x.length;te<ie;te++)if(x[te]===y)return te;return-1}function we(x){if(!r||!x||typeof x!="object")return!1;try{r.call(x);try{s.call(x)}catch{return!0}return x instanceof Map}catch{}return!1}function De(x){if(!u||!x||typeof x!="object")return!1;try{u.call(x,u);try{d.call(x,d)}catch{return!0}return x instanceof WeakMap}catch{}return!1}function Be(x){if(!p||!x||typeof x!="object")return!1;try{return p.call(x),!0}catch{}return!1}function ze(x){if(!s||!x||typeof x!="object")return!1;try{s.call(x);try{r.call(x)}catch{return!0}return x instanceof Set}catch{}return!1}function Jt(x){if(!d||!x||typeof x!="object")return!1;try{d.call(x,d);try{u.call(x,u)}catch{return!0}return x instanceof WeakSet}catch{}return!1}function Ye(x){return!x||typeof x!="object"?!1:typeof HTMLElement<"u"&&x instanceof HTMLElement?!0:typeof x.nodeName=="string"&&typeof x.getAttribute=="function"}function pt(x,y){if(x.length>y.maxStringLength){var te=x.length-y.maxStringLength,ie="... "+te+" more character"+(te>1?"s":"");return pt(A.call(x,0,y.maxStringLength),y)+ie}var oe=Pe[y.quoteStyle||"single"];oe.lastIndex=0;var X=w.call(w.call(x,oe,"\\$1"),/[\x00-\x1f]/g,Pt);return I(X,"single",y)}function Pt(x){var y=x.charCodeAt(0),te={8:"b",9:"t",10:"n",12:"f",13:"r"}[y];return te?"\\"+te:"\\x"+(y<16?"0":"")+j.call(y.toString(16))}function Ke(x){return"Object("+x+")"}function Rr(x){return x+" { ? }"}function No(x,y,te,ie){var oe=ie?Or(te,ie):T.call(te,", ");return x+" ("+y+") {"+oe+"}"}function mu(x){for(var y=0;y<x.length;y++)if(Re(x[y],`
2
- `)>=0)return!1;return!0}function gu(x,y){var te;if(x.indent===" ")te=" ";else if(typeof x.indent=="number"&&x.indent>0)te=T.call(Array(x.indent+1)," ");else return null;return{base:te,prev:T.call(Array(y+1),te)}}function Or(x,y){if(x.length===0)return"";var te=`
3
- `+y.prev+y.base;return te+T.call(x,","+te)+`
4
- `+y.prev}function Qt(x,y){var te=U(x),ie=[];if(te){ie.length=x.length;for(var oe=0;oe<x.length;oe++)ie[oe]=ve(x,oe)?y(x[oe],x):""}var X=typeof E=="function"?E(x):[],Ze;if(k){Ze={};for(var ot=0;ot<X.length;ot++)Ze["$"+X[ot]]=X[ot]}for(var Se in x)ve(x,Se)&&(te&&String(Number(Se))===Se&&Se<x.length||k&&Ze["$"+Se]instanceof Symbol||(M.call(/[^\w$]/,Se)?ie.push(y(Se,x)+": "+y(x[Se],x)):ie.push(Se+": "+y(x[Se],x))));if(typeof E=="function")for(var Je=0;Je<X.length;Je++)re.call(x,X[Je])&&ie.push("["+y(X[Je])+"]: "+y(x[X[Je]],x));return ie}return Qn}var ei,Ms;function Fv(){if(Ms)return ei;Ms=1;var e=Pr(),t=Te(),r=function(c,l,u){for(var f=c,d;(d=f.next)!=null;f=d)if(d.key===l)return f.next=d.next,u||(d.next=c.next,c.next=d),d},n=function(c,l){if(c){var u=r(c,l);return u&&u.value}},i=function(c,l,u){var f=r(c,l);f?f.value=u:c.next={key:l,next:c.next,value:u}},o=function(c,l){return c?!!r(c,l):!1},s=function(c,l){if(c)return r(c,l,!0)};return ei=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=s(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},ei}var ti,Ns;function Jl(){if(Ns)return ti;Ns=1;var e=Ve(),t=ye(),r=Pr(),n=Te(),i=e("%Map%",!0),o=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),c=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return ti=!!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?c(d,p):!1},set:function(p,m){d||(d=new i),s(d,p,m)}};return h},ti}var ri,$s;function Hv(){if($s)return ri;$s=1;var e=Ve(),t=ye(),r=Pr(),n=Jl(),i=Te(),o=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return ri=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?s(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),c(d,m,g)):n&&(h||(h=n()),h.set(m,g))}};return p}:n,ri}var ni,_s;function Ql(){if(_s)return ni;_s=1;var e=Te(),t=Pr(),r=Fv(),n=Jl(),i=Hv(),o=i||n||r;return ni=function(){var c,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!c&&c.delete(u)},get:function(u){return c&&c.get(u)},has:function(u){return!!c&&c.has(u)},set:function(u,f){c||(c=o()),c.set(u,f)}};return l},ni}var ii,ks;function Uv(){if(ks)return ii;ks=1;var e=Eo(),t=Ql()(),r=Te(),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 s=t.get(i);return s&&s["$"+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 s=t.get(i);return!!s&&e(s,"$"+o)},set:function(i,o,s){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 c=t.get(i);c||(c={},t.set(i,c)),c["$"+o]=s}};return Object.freeze&&Object.freeze(n),ii=n,ii}var oi,Ls;function Gv(){if(Ls)return oi;Ls=1;var e=Uv(),t=Ao(),r=typeof StopIteration=="object"?StopIteration:null;return oi=function(i){if(!r)throw new t("this environment lacks StopIteration");e.set(i,"[[Done]]",!1);var o={next:function(){var c=e.get(this,"[[Iterator]]"),l=!!e.get(c,"[[Done]]");try{return{done:l,value:l?void 0:c.next()}}catch(u){if(e.set(c,"[[Done]]",!0),u!==r)throw u;return{done:!0,value:void 0}}}};return e.set(o,"[[Iterator]]",i),o},oi}var ai,Ds;function eu(){if(Ds)return ai;Ds=1;var e={}.toString;return ai=Array.isArray||function(t){return e.call(t)=="[object Array]"},ai}var si,Bs;function tu(){if(Bs)return si;Bs=1;var e=ye(),t=e("String.prototype.valueOf"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object String]",o=ht()();return si=function(c){return typeof c=="string"?!0:!c||typeof c!="object"?!1:o?r(c):n(c)===i},si}var ci,zs;function ru(){if(zs)return ci;zs=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;e||(r=function(s){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!n&&(r=function(s){return!1}),ci=r||function(s){if(!s||typeof s!="object")return!1;try{if(n.call(s),i)try{i.call(s)}catch{return!0}return s instanceof e}catch{}return!1},ci}var li,qs;function nu(){if(qs)return li;qs=1;var e=typeof Map=="function"&&Map.prototype?Map:null,t=typeof Set=="function"&&Set.prototype?Set:null,r;t||(r=function(s){return!1});var n=e?Map.prototype.has:null,i=t?Set.prototype.has:null;return!r&&!i&&(r=function(s){return!1}),li=r||function(s){if(!s||typeof s!="object")return!1;try{if(i.call(s),n)try{n.call(s)}catch{return!0}return s instanceof t}catch{}return!1},li}var Fs;function Wv(){if(Fs)return Nt.exports;Fs=1;var e=Zl(),t=Gv();if(To()()||Tr()()){var r=Symbol.iterator;Nt.exports=function(C){if(C!=null&&typeof C[r]<"u")return C[r]();if(e(C))return Array.prototype[r].call(C)}}else{var n=eu(),i=tu(),o=Ve(),s=o("%Map%",!0),c=o("%Set%",!0),l=Xl(),u=l("Array.prototype.push"),f=l("String.prototype.charCodeAt"),d=l("String.prototype.slice"),h=function(C,_){var P=C.length;if(_+1>=P)return _+1;var E=f(C,_);if(E<55296||E>56319)return _+1;var L=f(C,_+1);return L<56320||L>57343?_+1:_+2},p=function(C){var _=0;return{next:function(){var E=_>=C.length,L;return E||(L=C[_],_+=1),{done:E,value:L}}}},m=function(C,_){if(n(C)||e(C))return p(C);if(i(C)){var P=0;return{next:function(){var L=h(C,P),k=d(C,P,L);return P=L,{done:L>C.length,value:k}}}}if(_&&typeof C["_es6-shim iterator_"]<"u")return C["_es6-shim iterator_"]()};if(!s&&!c)Nt.exports=function(C){if(C!=null)return m(C,!0)};else{var g=ru(),v=nu(),S=l("Map.prototype.forEach",!0),A=l("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var w=l("Map.prototype.iterator",!0),j=l("Set.prototype.iterator",!0);var O=l("Map.prototype.@@iterator",!0)||l("Map.prototype._es6-shim iterator_",!0),M=l("Set.prototype.@@iterator",!0)||l("Set.prototype._es6-shim iterator_",!0),N=function(C){if(g(C)){if(w)return t(w(C));if(O)return O(C);if(S){var _=[];return S(C,function(E,L){u(_,[L,E])}),p(_)}}if(v(C)){if(j)return t(j(C));if(M)return M(C);if(A){var P=[];return A(C,function(E){u(P,E)}),p(P)}}};Nt.exports=function(C){return N(C)||m(C)}}}return Nt.exports}var ui,Hs;function iu(){if(Hs)return ui;Hs=1;var e=function(t){return t!==t};return ui=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},ui}var di,Us;function ou(){if(Us)return di;Us=1;var e=iu();return di=function(){return typeof Object.is=="function"?Object.is:e},di}var fi,Gs;function Vv(){if(Gs)return fi;Gs=1;var e=ou(),t=ft();return fi=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},fi}var hi,Ws;function Xv(){if(Ws)return hi;Ws=1;var e=ft(),t=Tt(),r=iu(),n=ou(),i=Vv(),o=t(n(),Object);return e(o,{getPolyfill:n,implementation:r,shim:i}),hi=o,hi}var pi,Vs;function au(){if(Vs)return pi;Vs=1;var e=Tt(),t=ye(),r=Ve(),n=r("%ArrayBuffer%",!0),i=t("ArrayBuffer.prototype.byteLength",!0),o=t("Object.prototype.toString"),s=!!n&&!i&&new n(0).slice,c=!!s&&e(s);return pi=i||c?function(u){if(!u||typeof u!="object")return!1;try{return i?i(u):c(u,0),!0}catch{return!1}}:n?function(u){return o(u)==="[object ArrayBuffer]"}:function(u){return!1},pi}var mi,Xs;function Yv(){if(Xs)return mi;Xs=1;var e=ye(),t=e("Date.prototype.getDay"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Date]",o=ht()();return mi=function(c){return typeof c!="object"||c===null?!1:o?r(c):n(c)===i},mi}var gi,Ys;function su(){if(Ys)return gi;Ys=1;var e=ye(),t=ht()(),r=Eo(),n=dt(),i;if(t){var o=e("RegExp.prototype.exec"),s={},c=function(){throw s},l={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=c),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===s}}}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 gi=i,gi}var xi,Ks;function Kv(){if(Ks)return xi;Ks=1;var e=ye(),t=e("SharedArrayBuffer.prototype.byteLength",!0);return xi=t?function(n){if(!n||typeof n!="object")return!1;try{return t(n),!0}catch{return!1}}:function(n){return!1},xi}var vi,Zs;function Zv(){if(Zs)return vi;Zs=1;var e=ye(),t=e("Number.prototype.toString"),r=function(c){try{return t(c),!0}catch{return!1}},n=e("Object.prototype.toString"),i="[object Number]",o=ht()();return vi=function(c){return typeof c=="number"?!0:!c||typeof c!="object"?!1:o?r(c):n(c)===i},vi}var yi,Js;function Jv(){if(Js)return yi;Js=1;var e=ye(),t=e("Boolean.prototype.toString"),r=e("Object.prototype.toString"),n=function(c){try{return t(c),!0}catch{return!1}},i="[object Boolean]",o=ht()();return yi=function(c){return typeof c=="boolean"?!0:c===null||typeof c!="object"?!1:o?n(c):r(c)===i},yi}var cr={exports:{}},bi,Qs;function Qv(){if(Qs)return bi;Qs=1;var e=ye(),t=su(),r=e("RegExp.prototype.exec"),n=Te();return bi=function(o){if(!t(o))throw new n("`regex` must be a RegExp");return function(c){return r(o,c)!==null}},bi}var ec;function ey(){if(ec)return cr.exports;ec=1;var e=ye(),t=e("Object.prototype.toString"),r=To()(),n=Qv();if(r){var i=e("Symbol.prototype.toString"),o=n(/^Symbol\(.*\)$/),s=function(l){return typeof l.valueOf()!="symbol"?!1:o(i(l))};cr.exports=function(l){if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||t(l)!=="[object Symbol]")return!1;try{return s(l)}catch{return!1}}}else cr.exports=function(l){return!1};return cr.exports}var lr={exports:{}},wi,tc;function ty(){if(tc)return wi;tc=1;var e=typeof BigInt<"u"&&BigInt;return wi=function(){return typeof e=="function"&&typeof BigInt=="function"&&typeof e(42)=="bigint"&&typeof BigInt(42)=="bigint"},wi}var rc;function ry(){if(rc)return lr.exports;rc=1;var e=ty()();if(e){var t=BigInt.prototype.valueOf,r=function(i){try{return t.call(i),!0}catch{}return!1};lr.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 lr.exports=function(i){return!1};return lr.exports}var Si,nc;function ny(){if(nc)return Si;nc=1;var e=tu(),t=Zv(),r=Jv(),n=ey(),i=ry();return Si=function(s){if(s==null||typeof s!="object"&&typeof s!="function")return null;if(e(s))return"String";if(t(s))return"Number";if(r(s))return"Boolean";if(n(s))return"Symbol";if(i(s))return"BigInt"},Si}var Ai,ic;function iy(){if(ic)return Ai;ic=1;var e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,t=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,r;e||(r=function(s){return!1});var n=e?e.prototype.has:null,i=t?t.prototype.has:null;return!r&&!n&&(r=function(s){return!1}),Ai=r||function(s){if(!s||typeof s!="object")return!1;try{if(n.call(s,n),i)try{i.call(s,i)}catch{return!0}return s instanceof e}catch{}return!1},Ai}var ur={exports:{}},oc;function oy(){if(oc)return ur.exports;oc=1;var e=Ve(),t=ye(),r=e("%WeakSet%",!0),n=t("WeakSet.prototype.has",!0);if(n){var i=t("WeakMap.prototype.has",!0);ur.exports=function(s){if(!s||typeof s!="object")return!1;try{if(n(s,n),i)try{i(s,i)}catch{return!0}return s instanceof r}catch{}return!1}}else ur.exports=function(s){return!1};return ur.exports}var ji,ac;function ay(){if(ac)return ji;ac=1;var e=ru(),t=nu(),r=iy(),n=oy();return ji=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},ji}var Ci,sc;function sy(){if(sc)return Ci;sc=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(A){A!==n&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(w){try{var j=e.call(w);return i.test(j)}catch{return!1}},s=function(w){try{return o(w)?!1:(e.call(w),!0)}catch{return!1}},c=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[,]),v=function(){return!1};if(typeof document=="object"){var S=document.all;c.call(S)===c.call(document.all)&&(v=function(w){if((g||!w)&&(typeof w>"u"||typeof w=="object"))try{var j=c.call(w);return(j===d||j===h||j===p||j===l)&&w("")==null}catch{}return!1})}return Ci=t?function(w){if(v(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{t(w,null,r)}catch(j){if(j!==n)return!1}return!o(w)&&s(w)}:function(w){if(v(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(m)return s(w);if(o(w))return!1;var j=c.call(w);return j!==u&&j!==f&&!/^\[object HTML/.test(j)?!1:s(w)},Ci}var Ii,cc;function cy(){if(cc)return Ii;cc=1;var e=sy(),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 s(c){return t.call(c)==="[object Array]"}return Ii=function(l,u,f){if(!e(u))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=f),s(l)?n(l,u,d):typeof l=="string"?i(l,u,d):o(l,u,d)},Ii}var Ti,lc;function ly(){return lc||(lc=1,Ti=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ti}var Pi,uc;function uy(){if(uc)return Pi;uc=1;var e=ly(),t=typeof globalThis>"u"?Ut:globalThis;return Pi=function(){for(var n=[],i=0;i<e.length;i++)typeof t[e[i]]=="function"&&(n[n.length]=e[i]);return n},Pi}var Ri,dc;function dy(){if(dc)return Ri;dc=1;var e=cy(),t=uy(),r=Tt(),n=ye(),i=dt(),o=n("Object.prototype.toString"),s=ht()(),c=typeof globalThis>"u"?Ut:globalThis,l=t(),u=n("String.prototype.slice"),f=Object.getPrototypeOf,d=n("Array.prototype.indexOf",!0)||function(v,S){for(var A=0;A<v.length;A+=1)if(v[A]===S)return A;return-1},h={__proto__:null};s&&i&&f?e(l,function(g){var v=new c[g];if(Symbol.toStringTag in v){var S=f(v),A=i(S,Symbol.toStringTag);if(!A){var w=f(S);A=i(w,Symbol.toStringTag)}h["$"+g]=r(A.get)}}):e(l,function(g){var v=new c[g],S=v.slice||v.set;S&&(h["$"+g]=r(S))});var p=function(v){var S=!1;return e(h,function(A,w){if(!S)try{"$"+A(v)===w&&(S=u(w,1))}catch{}}),S},m=function(v){var S=!1;return e(h,function(A,w){if(!S)try{A(v),S=u(w,1)}catch{}}),S};return Ri=function(v){if(!v||typeof v!="object")return!1;if(!s){var S=u(o(v),8,-1);return d(l,S)>-1?S:S!=="Object"?!1:m(v)}return i?p(v):null},Ri}var Oi,fc;function fy(){if(fc)return Oi;fc=1;var e=ye(),t=e("ArrayBuffer.prototype.byteLength",!0),r=au();return Oi=function(i){return r(i)?t?t(i):i.byteLength:NaN},Oi}var Ei,hc;function hy(){if(hc)return Ei;hc=1;var e=$v(),t=Xl(),r=Dv(),n=Ve(),i=Wv(),o=Ql(),s=Xv(),c=Zl(),l=eu(),u=au(),f=Yv(),d=su(),h=Kv(),p=So(),m=ny(),g=ay(),v=dy(),S=fy(),A=t("SharedArrayBuffer.prototype.byteLength",!0),w=t("Date.prototype.getTime"),j=Object.getPrototypeOf,O=t("Object.prototype.toString"),M=n("%Set%",!0),N=t("Map.prototype.has",!0),T=t("Map.prototype.get",!0),C=t("Map.prototype.size",!0),_=t("Set.prototype.add",!0),P=t("Set.prototype.delete",!0),E=t("Set.prototype.has",!0),L=t("Set.prototype.size",!0);function k(I,$,G,U){for(var K=i(I),J;(J=K.next())&&!J.done;)if(Q($,J.value,G,U))return P(I,J.value),!0;return!1}function Y(I){if(typeof I>"u")return null;if(typeof I!="object")return typeof I=="symbol"?!1:typeof I=="string"||typeof I=="number"?+I==+I:!0}function re(I,$,G,U,K,J){var z=Y(G);if(z!=null)return z;var q=T($,z),D=e({},K,{strict:!1});return typeof q>"u"&&!N($,z)||!Q(U,q,D,J)?!1:!N(I,z)&&Q(U,q,D,J)}function ue(I,$,G){var U=Y(G);return U??(E($,U)&&!E(I,U))}function ne(I,$,G,U,K,J){for(var z=i(I),q,D;(q=z.next())&&!q.done;)if(D=q.value,Q(G,D,K,J)&&Q(U,T($,D),K,J))return P(I,D),!0;return!1}function Q(I,$,G,U){var K=G||{};if(K.strict?s(I,$):I===$)return!0;var J=m(I),z=m($);if(J!==z)return!1;if(!I||!$||typeof I!="object"&&typeof $!="object")return K.strict?s(I,$):I==$;var q=U.has(I),D=U.has($),V;if(q&&D){if(U.get(I)===U.get($))return!0}else V={};return q||U.set(I,V),D||U.set($,V),Pe(I,$,K,U)}function xe(I){return!I||typeof I!="object"||typeof I.length!="number"||typeof I.copy!="function"||typeof I.slice!="function"||I.length>0&&typeof I[0]!="number"?!1:!!(I.constructor&&I.constructor.isBuffer&&I.constructor.isBuffer(I))}function fe(I,$,G,U){if(L(I)!==L($))return!1;for(var K=i(I),J=i($),z,q,D;(z=K.next())&&!z.done;)if(z.value&&typeof z.value=="object")D||(D=new M),_(D,z.value);else if(!E($,z.value)){if(G.strict||!ue(I,$,z.value))return!1;D||(D=new M),_(D,z.value)}if(D){for(;(q=J.next())&&!q.done;)if(q.value&&typeof q.value=="object"){if(!k(D,q.value,G.strict,U))return!1}else if(!G.strict&&!E(I,q.value)&&!k(D,q.value,G.strict,U))return!1;return L(D)===0}return!0}function Xe(I,$,G,U){if(C(I)!==C($))return!1;for(var K=i(I),J=i($),z,q,D,V,de,he;(z=K.next())&&!z.done;)if(V=z.value[0],de=z.value[1],V&&typeof V=="object")D||(D=new M),_(D,V);else if(he=T($,V),typeof he>"u"&&!N($,V)||!Q(de,he,G,U)){if(G.strict||!re(I,$,V,de,G,U))return!1;D||(D=new M),_(D,V)}if(D){for(;(q=J.next())&&!q.done;)if(V=q.value[0],he=q.value[1],V&&typeof V=="object"){if(!ne(D,I,V,he,G,U))return!1}else if(!G.strict&&(!I.has(V)||!Q(T(I,V),he,G,U))&&!ne(D,I,V,he,e({},G,{strict:!1}),U))return!1;return L(D)===0}return!0}function Pe(I,$,G,U){var K,J;if(typeof I!=typeof $||I==null||$==null||O(I)!==O($)||c(I)!==c($))return!1;var z=l(I),q=l($);if(z!==q)return!1;var D=I instanceof Error,V=$ instanceof Error;if(D!==V||(D||V)&&(I.name!==$.name||I.message!==$.message))return!1;var de=d(I),he=d($);if(de!==he||(de||he)&&(I.source!==$.source||r(I)!==r($)))return!1;var pe=f(I),ve=f($);if(pe!==ve||(pe||ve)&&w(I)!==w($)||G.strict&&j&&j(I)!==j($))return!1;var be=v(I),Le=v($);if(be!==Le)return!1;if(be||Le){if(I.length!==$.length)return!1;for(K=0;K<I.length;K++)if(I[K]!==$[K])return!1;return!0}var Re=xe(I),we=xe($);if(Re!==we)return!1;if(Re||we){if(I.length!==$.length)return!1;for(K=0;K<I.length;K++)if(I[K]!==$[K])return!1;return!0}var De=u(I),Be=u($);if(De!==Be)return!1;if(De||Be)return S(I)!==S($)?!1:typeof Uint8Array=="function"&&Q(new Uint8Array(I),new Uint8Array($),G,U);var ze=h(I),Jt=h($);if(ze!==Jt)return!1;if(ze||Jt)return A(I)!==A($)?!1:typeof Uint8Array=="function"&&Q(new Uint8Array(I),new Uint8Array($),G,U);if(typeof I!=typeof $)return!1;var Ye=p(I),pt=p($);if(Ye.length!==pt.length)return!1;for(Ye.sort(),pt.sort(),K=Ye.length-1;K>=0;K--)if(Ye[K]!=pt[K])return!1;for(K=Ye.length-1;K>=0;K--)if(J=Ye[K],!Q(I[J],$[J],G,U))return!1;var Pt=g(I),Ke=g($);return Pt!==Ke?!1:Pt==="Set"||Ke==="Set"?fe(I,$,G,U):Pt==="Map"?Xe(I,$,G,U):!0}return Ei=function($,G,U){return Q($,G,U,o())},Ei}var py=hy();const cu=Dl(py);function my(e){return e}function lu(e,t,r,n){const i=my,[o,s]=b.useState(i(r)),c=b.useRef(o);return b.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);cu(c.current,f)||(s(f),c.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 gy({editor:e}){const{t}=B.useLocale(),{width:r,height:n,src:i}=lu(e,at.name,{width:0,height:0,src:"",defaultShowPicker:!1}),[o,s]=b.useState(!1),[c,l]=b.useState(""),u=b.useCallback(()=>{s(!1)},[s]);b.useEffect(()=>{o&&l(i)},[o,i]);const f=b.useCallback(()=>{const v=kl(c);e.chain().updateAttributes(at.name,{src:(v==null?void 0:v.src)||c}).setNodeSelection(e.state.selection.from).focus().run(),s(!1)},[e,c,s]),d=b.useCallback(()=>{window.open(i,"_blank")},[i]),h=b.useCallback(()=>{s(!0)},[s]),p=b.useCallback(v=>{e.chain().updateAttributes(at.name,v).setNodeSelection(e.state.selection.from).focus().run()},[e]),m=b.useCallback(()=>e.isActive(at.name)&&!i,[e,i]),g=b.useCallback(()=>po(at.name,e),[e]);return a.jsxs(a.Fragment,{children:[a.jsx(le.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:a.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:[a.jsx(F,{action:d,icon:"Eye",tooltip:"Visit Link"}),a.jsx(F,{action:h,icon:"Pencil",tooltip:"Open Edit Link"}),a.jsx(_l,{height:n,onOk:p,width:r,children:a.jsx(F,{icon:"Settings",tooltip:t("editor.settings")})}),a.jsx(F,{action:g,icon:"Trash2",tooltip:t("editor.delete")})]})}),a.jsxs(Vt,{onOpenChange:s,open:o,children:[a.jsx(Xt,{}),a.jsxs(At,{children:[a.jsx(gl,{children:a.jsx(jt,{children:"Edit Link Iframe"})}),a.jsx(Ae,{autoFocus:!0,onInput:v=>l(v.target.value),placeholder:"Enter link",type:"url",value:c}),a.jsxs(wr,{children:[a.jsx(ge,{onClick:u,children:"Cancel"}),a.jsx(ge,{onClick:f,children:"OK"})]})]})]})]})}function xy({editor:e,disabled:t,bubbleMenu:r}){const n=e.extensionManager.extensions.map(o=>o.name),i=()=>{var o,s,c,l,u,f,d,h,p,m;return[n.includes("columns")&&!((o=r==null?void 0:r.columnConfig)!=null&&o.hidden)?a.jsx(Mx,{editor:e},"columns"):null,n.includes("table")&&!((s=r==null?void 0:r.tableConfig)!=null&&s.hidden)?a.jsx(zg,{actions:(c=r==null?void 0:r.tableConfig)==null?void 0:c.actions,editor:e},"table"):null,n.includes("link")&&!((l=r==null?void 0:r.linkConfig)!=null&&l.hidden)?a.jsx(Fg,{disabled:t,editor:e},"link"):null,n.includes(wt.name)&&!((u=r==null?void 0:r.imageConfig)!=null&&u.hidden)?a.jsx(Cx,{disabled:t,editor:e},"image"):null,n.includes(co.name)&&!((f=r==null?void 0:r.imageGifConfig)!=null&&f.hidden)?a.jsx(Ix,{disabled:t,editor:e},"imageGif"):null,n.includes("video")&&!((d=r==null?void 0:r.videoConfig)!=null&&d.hidden)?a.jsx(Tx,{disabled:t,editor:e},"video"):null,n.includes("iframe")&&!((h=r==null?void 0:r.iframeConfig)!=null&&h.hidden)?a.jsx(gy,{disabled:t,editor:e},"iframe"):null,(p=r==null?void 0:r.floatingMenuConfig)!=null&&p.hidden?null:a.jsx(mg,{disabled:t,editor:e},"content"),(m=r==null?void 0:r.textConfig)!=null&&m.hidden?null:a.jsx(vg,{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 pc(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.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 uu(e){const{t}=B.useLocale(),{highlight:r=!1,disabled:n=!1,selectedColor:i,setSelectedColor:o,onChange:s,colors:c=B.COLORS_LIST}=e,l=b.useMemo(()=>{const p=c,m=[];for(let g=0;g<p.length;g+=10)m.push(p.slice(g,g+10));return m},[c]),[u,f]=b.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),s==null||s(p);return}/^#([\da-f]{3}){1,2}$/i.test(p)&&(o==null||o(p),s==null||s(p),d(p))}return a.jsxs(Yt,{modal:!0,children:[a.jsx(Kt,{asChild:!0,className:"!richtext-p-0",disabled:n,children:e==null?void 0:e.children}),a.jsx(Ct,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:a.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[r?a.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:[a.jsx(pc,{}),a.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.nofill")})]}):a.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:[a.jsx(pc,{}),a.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:t("editor.default")})]}),l.map((p,m)=>a.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:p.map((g,v)=>a.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:a.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:g},children:g===i?a.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:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):a.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${v}`))},m)),a.jsxs("div",{children:[a.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:t("editor.recent")}),a.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)=>a.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:a.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:p},children:a.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:a.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${m}`))})]}),a.jsx(vy,{setColor:h})]})})]})}function vy({setColor:e}){const[t,r]=b.useState("#000000"),[n,i]=b.useState(!1),{t:o}=B.useLocale();return b.useEffect(()=>()=>{i(!1)},[]),a.jsxs(Yt,{open:n,children:[a.jsx(Kt,{asChild:!0,children:a.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",onClick:s=>{s.preventDefault(),i(!0)},children:[o("editor.color.more"),"..."]})}),a.jsxs(Ct,{children:[a.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[a.jsx(Mu.HexColorPicker,{color:t,onChange:r}),a.jsx(Ae,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:t.slice(1),onChange:s=>{s.preventDefault(),r(`#${s.target.value}`)}})]}),a.jsx(Ee,{className:"richtext-my-[10px]"}),a.jsx(ge,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),e(t),i(!1)},children:a.jsx(R.Plus,{size:16})})]})]})}function yy({editor:e,disabled:t,toolbar:r}){const{t:n,lang:i}=B.useLocale(),o=b.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||!vx(h)||!g)continue;const v=h({editor:e,extension:d,t:n});if(Array.isArray(v)){const S=v.map((A,w)=>({button:A,divider:w===v.length-1?p:!1,spacer:w===0?m:!1,type:d.type,name:d.name}));f=[...f,...S];continue}f.push({button:v,divider:p,spacer:m,type:d.type,name:d.name})}return f},[e,n,i]),s=l=>a.jsx("div",{className:"richtext-px-1 richtext-py-2 !richtext-border-b",style:{pointerEvents:t?"none":"auto",opacity:t?.5:1},children:a.jsx("div",{className:"richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1",children:l})}),c=o.map((l,u)=>{var d,h;const f=l.button.component;return a.jsxs("div",{className:"richtext-flex richtext-items-center",children:[(l==null?void 0:l.spacer)&&a.jsx(Ee,{orientation:"vertical",className:"!richtext-h-[16px] !richtext-mx-[10px]"}),a.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)&&a.jsx(Ee,{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,c,s):s(c)}function by({editor:e,extensions:t}){const{t:r}=B.useLocale(),n=b.useMemo(()=>{var i,o,s;return(s=(o=(i=t==null?void 0:t.find(c=>c.name==="base-kit"))==null?void 0:i.options)==null?void 0:o.characterCount)==null?void 0:s.limit},[t]);return n?a.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:a.jsx("div",{className:"richtext-flex richtext-flex-col",children:a.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:a.jsxs("span",{children:[e.storage.characterCount.characters(),"/",n," ",r("editor.characters")]})})})}):a.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t",children:a.jsx("div",{className:"richtext-flex richtext-flex-col",children:a.jsx("div",{className:"richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm",children:a.jsxs("span",{children:[e.storage.characterCount.characters()," ",r("editor.characters")]})})})})}function wy(){const{toasts:e}=Nl();return a.jsxs(kx,{children:[e.map(({id:t,title:r,description:n,action:i,...o})=>a.jsxs(Rl,{...o,children:[a.jsxs("div",{className:"richtext-grid richtext-gap-1",children:[r&&a.jsx(El,{children:r}),n&&a.jsx(Ml,{children:n})]}),i,a.jsx(Ol,{})]},t)),a.jsx(Pl,{})]})}const Sy=`
5
- .reactjs-tiptap-editor,
6
- .richtext-dialog-content {
7
- button,
8
- input:where([type=button]),
9
- input:where([type=reset]),
10
- input:where([type=submit]) {
11
- -webkit-appearance: button;
12
- background-color: transparent;
13
- background-image: none;
14
- }
15
-
16
- input,
17
- optgroup,
18
- select {
19
- font-family: inherit;
20
- font-feature-settings: inherit;
21
- font-variation-settings: inherit;
22
- font-size: 100%;
23
- font-weight: inherit;
24
- line-height: inherit;
25
- letter-spacing: inherit;
26
- color: inherit;
27
- }
28
-
29
- button {
30
- font-family: inherit;
31
- font-feature-settings: inherit;
32
- font-variation-settings: inherit;
33
- font-size: 100%;
34
- font-weight: inherit;
35
- line-height: inherit;
36
- letter-spacing: inherit;
37
- color: inherit;
38
- }
39
-
40
- *,
41
- ::before,
42
- ::after {
43
- box-sizing: border-box;
44
- border-width: 0;
45
- border-style: solid;
46
- border-color: hsl(var(--richtext-border));
47
- }
48
-
49
- background-color: hsl(var(--richtext-background));
50
- color: hsl(var(--richtext-foreground));
51
-
52
- hr {
53
- height: 0;
54
- color: inherit;
55
- border-top-width: 1px;
56
- }
57
-
58
- a {
59
- color: inherit;
60
- text-decoration: inherit;
61
- }
62
-
63
- b,
64
- strong {
65
- font-weight: bolder;
66
- }
67
-
68
- code,
69
- kbd,
70
- samp,
71
- pre {
72
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
73
- font-feature-settings: normal;
74
- font-variation-settings: normal;
75
- font-size: 1em;
76
- }
77
-
78
- table {
79
- text-indent: 0;
80
- border-color: inherit;
81
- border-collapse: collapse;
82
- }
83
-
84
- input {
85
- border-width: 1px;
86
- }
87
-
88
-
89
- input::placeholder {
90
- opacity: 1;
91
- color: #9ca3af;
92
- }
93
-
94
- button, input {
95
- cursor: pointer;
96
- color: inherit;
97
- }
98
-
99
- img,
100
- svg,
101
- video,
102
- canvas,
103
- audio,
104
- iframe,
105
- embed,
106
- object {
107
- display: block;
108
- vertical-align: middle;
109
- }
110
-
111
- img,
112
- video {
113
- max-width: 100%;
114
- height: auto;
115
- }
116
- }
117
-
118
- div[data-radix-popper-content-wrapper],
119
- div[data-tippy-root] {
120
- *,
121
- ::before,
122
- ::after {
123
- box-sizing: border-box;
124
- border-width: 0;
125
- border-style: solid;
126
- border-color: hsl(var(--richtext-border));
127
- }
128
-
129
- background-color: hsl(var(--richtext-background));
130
- color: hsl(var(--richtext-foreground));
131
-
132
- button, input {
133
- cursor: pointer;
134
- color: inherit;
135
- }
136
- }
137
- `,Ay=b.memo(({children:e,id:t})=>{const[,r]=vl(s=>s.value),[,n]=yl(s=>s.value),i=s=>{r({value:s.detail})},o=s=>{n({value:s.detail})};return b.useEffect(()=>{const s=zt(nt.EDIT(t),i),c=zt(nt.UPDATE_THEME(t),o);return()=>{s(),c()}},[]),a.jsx(a.Fragment,{children:e})});function jy({children:e,id:t}){return a.jsx(Qg,{children:a.jsx(ex,{children:a.jsx(Ay,{id:t,children:e})})})}function Cy(){const[e]=yl(t=>t.value);return e}const Iy={setTheme:(e,t)=>{jr(nt.UPDATE_THEME(e),t)}},mc="data-rc-order",gc="data-rc-priority",Ty="rc-util-key",Xi=new Map;function Py(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 du({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Ty}function Mo(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Ry(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function fu(e){return[...(Xi.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function hu(e,t={}){const{csp:r,prepend:n,priority:i=0}=t,o=Ry(n),s=o==="prependQueue",c=document.createElement("style");c.setAttribute(mc,o),s&&i&&c.setAttribute(gc,`${i}`),r!=null&&r.nonce&&(c.nonce=r==null?void 0:r.nonce),c.innerHTML=e;const l=Mo(t),{firstChild:u}=l;if(n){if(s){const f=fu(l).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(mc)))return!1;const h=Number(d.getAttribute(gc)||0);return i>=h});if(f.length>0)return l.insertBefore(c,f.at(-1).nextSibling),c}u.before(c)}else l.append(c);return c}function pu(e,t={}){const r=Mo(t);return fu(r).find(n=>n.getAttribute(du(t))===e)}function Oy(e,t={}){const r=pu(e,t);r&&r.remove()}function Ey(e,t){const r=Xi.get(e);if(!r||!Py(document,r)){const n=hu("",t),{parentNode:i}=n;Xi.set(e,i),n.remove()}}function My(e,t,r={}){var s,c,l;const n=Mo(r);Ey(n,r);const i=pu(t,r);if(i)return(s=r.csp)!=null&&s.nonce&&i.nonce!==((c=r.csp)==null?void 0:c.nonce)&&(i.nonce=(l=r.csp)==null?void 0:l.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const o=hu(e,r);return o.setAttribute(du(r),t),o}function Ny(e,t){const{content:r,extensions:n,useEditorOptions:i={}}=e,o=b.useId(),s=b.useMemo(()=>{const d=Wp(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]),c=bt(d=>{var p;const h=u(d,e.output);(p=e==null?void 0:e.onChangeContent)==null||p.call(e,h)},B.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME),l=le.useEditor({extensions:s,content:r,onUpdate:({editor:d})=>{c&&c(d)},...i});b.useImperativeHandle(t,()=>({editor:l})),b.useEffect(()=>{document.documentElement.classList.toggle("dark",e.dark),Iy.setTheme(o,e.dark?"dark":"light")},[e.dark]),b.useEffect(()=>{l==null||l.setEditable(!(e!=null&&e.disabled)),uv.setDisable(o,!(e!=null&&e.disabled))},[l,e==null?void 0:e.disabled]),b.useEffect(()=>((e==null?void 0:e.resetCSS)!==!1&&My(Sy,"react-tiptap-reset"),()=>{Oy("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():""}b.useLayoutEffect(()=>{l&&(l.id=o)},[o,l]),b.useEffect(()=>()=>{var d;(d=l==null?void 0:l.destroy)==null||d.call(l)},[]);const f=wl(l,"characterCount");return l?a.jsxs("div",{className:"reactjs-tiptap-editor",children:[a.jsx(jy,{id:o,children:a.jsx(zx,{delayDuration:0,disableHoverableContent:!0,children:a.jsx("div",{className:"richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1",children:a.jsxs("div",{className:"richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col",children:[!(e!=null&&e.hideToolbar)&&a.jsx(yy,{disabled:!!(e!=null&&e.disabled),editor:l,toolbar:e.toolbar}),a.jsx(le.EditorContent,{className:`richtext-relative ${(e==null?void 0:e.contentClass)||""}`,editor:l}),f&&a.jsx(by,{editor:l,extensions:n}),!(e!=null&&e.hideBubble)&&a.jsx(xy,{bubbleMenu:e==null?void 0:e.bubbleMenu,disabled:e==null?void 0:e.disabled,editor:l})]})})})}),a.jsx(wy,{})]}):a.jsx(a.Fragment,{})}const $y=b.forwardRef(Ny);exports.ActionButton=F;exports.Button=ge;exports.ColorPicker=uu;exports.Column=ho;exports.ColumnActionButton=Ex;exports.Dialog=Vt;exports.DialogContent=At;exports.DialogFooter=wr;exports.DialogTitle=jt;exports.DialogTrigger=Xt;exports.DropdownMenu=Al;exports.DropdownMenuCheckboxItem=Cl;exports.DropdownMenuContent=mo;exports.DropdownMenuSeparator=go;exports.DropdownMenuShortcut=Il;exports.DropdownMenuTrigger=jl;exports.EVENTS=nt;exports.EXTENSION_PRIORITY_HIGHEST=Sl;exports.ExportPdf=dl;exports.ExportWord=fl;exports.HighlightActionButton=hl;exports.IconComponent=me;exports.Iframe=at;exports.Image=so;exports.Image$1=wt;exports.ImageGif=co;exports.IndentProps=gr;exports.Input=Ae;exports.Label=He;exports.LinkEditBlock=pl;exports.MenuDown=ul;exports.MultiColumn=qt;exports.Popover=Yt;exports.PopoverContent=Ct;exports.PopoverTrigger=Kt;exports.RichTextEditor=$y;exports.Separator=Ee;exports.SizeSetter=_l;exports.Switch=xo;exports.Toggle=yo;exports.Tooltip=bo;exports.TooltipContent=Cr;exports.TooltipTrigger=wo;exports.Video=lo;exports.actionDialogImage=bl;exports.clamp=mx;exports.cn=Z;exports.commonjsGlobal=Ut;exports.createIndentCommand=pg;exports.dataURLtoFile=xl;exports.debounce=Wt;exports.deepEqual=cu;exports.deleteNode=po;exports.dispatchEvent=jr;exports.ensureNameValueOptions=bx;exports.extractFileExtension=Xg;exports.extractFilename=Vg;exports.getAugmentedNamespace=Bl;exports.getBubbleDrawer=og;exports.getBubbleMermaid=ig;exports.getDefaultExportFromCjs=Dl;exports.getShortcutKey=al;exports.getShortcutKeys=sl;exports.hasExtension=wl;exports.icons=ao;exports.listenEvent=zt;exports.normalizeFileSize=Yg;exports.normalizeFileType=Kg;exports.throttle=bt;exports.useAttributes=lu;exports.useEditableEditor=Ll;exports.useTheme=Cy;exports.useToast=Nl;