1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2881],{13992:(t,e,i)=>{i.d(e,{Ay:()=>a});var n=i(18106),o=t=>(0,n.Yp)({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=t?t:"â"}),l=t=>(0,n.Yp)({find:/"$/,replace:null!=t?t:"â"}),r=t=>(0,n.Yp)({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=t?t:"â"}),s=t=>(0,n.Yp)({find:/'$/,replace:null!=t?t:"â"}),a=n.YY.create({name:"typography",addOptions:()=>({closeDoubleQuote:"â",closeSingleQuote:"â",copyright:"\xa9",ellipsis:"â¦",emDash:"â",laquo:"\xab",leftArrow:"â",multiplication:"\xd7",notEqual:"â ",oneHalf:"\xbd",oneQuarter:"\xbc",openDoubleQuote:"â",openSingleQuote:"â",plusMinus:"\xb1",raquo:"\xbb",registeredTrademark:"\xae",rightArrow:"â",servicemark:"â ",superscriptThree:"\xb3",superscriptTwo:"\xb2",threeQuarters:"\xbe",trademark:"â¢"}),addInputRules(){var t,e;let i,a,h,u,d,p,c,f,m,g,w,v,y,b,x,C,O,R,T=[];!1!==this.options.emDash&&T.push((i=this.options.emDash,(0,n.Yp)({find:/--$/,replace:null!=i?i:"â"}))),!1!==this.options.ellipsis&&T.push((a=this.options.ellipsis,(0,n.Yp)({find:/\.\.\.$/,replace:null!=a?a:"â¦"})));let S="rtl"===this.editor.options.textDirection;if(null==(t=this.options.doubleQuotes)?void 0:t.rtl){let{open:t,close:e}=this.options.doubleQuotes.rtl;T.push(o(t)),T.push(l(e))}else S?(T.push(o("â")),T.push(l("â"))):(!1!==this.options.openDoubleQuote&&T.push(o(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&T.push(l(this.options.closeDoubleQuote)));if(null==(e=this.options.singleQuotes)?void 0:e.rtl){let{open:t,close:e}=this.options.singleQuotes.rtl;T.push(r(t)),T.push(s(e))}else S?(T.push(r("â")),T.push(s("â"))):(!1!==this.options.openSingleQuote&&T.push(r(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&T.push(s(this.options.closeSingleQuote)));return!1!==this.options.leftArrow&&T.push((h=this.options.leftArrow,(0,n.Yp)({find:/<-$/,replace:null!=h?h:"â"}))),!1!==this.options.rightArrow&&T.push((u=this.options.rightArrow,(0,n.Yp)({find:/->$/,replace:null!=u?u:"â"}))),!1!==this.options.copyright&&T.push((d=this.options.copyright,(0,n.Yp)({find:/\(c\)$/,replace:null!=d?d:"\xa9"}))),!1!==this.options.trademark&&T.push((p=this.options.trademark,(0,n.Yp)({find:/\(tm\)$/,replace:null!=p?p:"â¢"}))),!1!==this.options.servicemark&&T.push((c=this.options.servicemark,(0,n.Yp)({find:/\(sm\)$/,replace:null!=c?c:"â "}))),!1!==this.options.registeredTrademark&&T.push((f=this.options.registeredTrademark,(0,n.Yp)({find:/\(r\)$/,replace:null!=f?f:"\xae"}))),!1!==this.options.oneHalf&&T.push((m=this.options.oneHalf,(0,n.Yp)({find:/(?:^|\s)(1\/2)\s$/,replace:null!=m?m:"\xbd"}))),!1!==this.options.plusMinus&&T.push((g=this.options.plusMinus,(0,n.Yp)({find:/\+\/-$/,replace:null!=g?g:"\xb1"}))),!1!==this.options.notEqual&&T.push((w=this.options.notEqual,(0,n.Yp)({find:/!=$/,replace:null!=w?w:"â "}))),!1!==this.options.laquo&&T.push((v=this.options.laquo,(0,n.Yp)({find:/<<$/,replace:null!=v?v:"\xab"}))),!1!==this.options.raquo&&T.push((y=this.options.raquo,(0,n.Yp)({find:/>>$/,replace:null!=y?y:"\xbb"}))),!1!==this.options.multiplication&&T.push((b=this.options.multiplication,(0,n.Yp)({find:/\d+\s?([*x])\s?\d+$/,replace:null!=b?b:"\xd7"}))),!1!==this.options.superscriptTwo&&T.push((x=this.options.superscriptTwo,(0,n.Yp)({find:/\^2$/,replace:null!=x?x:"\xb2"}))),!1!==this.options.superscriptThree&&T.push((C=this.options.superscriptThree,(0,n.Yp)({find:/\^3$/,replace:null!=C?C:"\xb3"}))),!1!==this.options.oneQuarter&&T.push((O=this.options.oneQuarter,(0,n.Yp)({find:/(?:^|\s)(1\/4)\s$/,replace:null!=O?O:"\xbc"}))),!1!==this.options.threeQuarters&&T.push((R=this.options.threeQuarters,(0,n.Yp)({find:/(?:^|\s)(3\/4)\s$/,replace:null!=R?R:"\xbe"}))),T}})},46657:(t,e,i)=>{let n,o,l;i.d(e,{m:()=>ee});var r=i(18106);let s=["top","right","bottom","left"],a=s.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]),h=Math.min,u=Math.max,d=Math.round,p=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function f(t,e){return"function"==typeof t?t(e):t}function m(t){return t.split("-")[0]}function g(t){return t.split("-")[1]}function w(t){return"x"===t?"y":"x"}function v(t){return"y"===t?"height":"width"}function y(t){let e=t[0];return"t"===e||"b"===e?"y":"x"}function b(t,e,i){void 0===i&&(i=!1);let n=g(t),o=w(y(t)),l=v(o),r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[l]>e.floating[l]&&(r=S(r)),[r,S(r)]}function x(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}let C=["left","right"],O=["right","left"],R=["top","bottom"],T=["bottom","top"];function S(t){let e=m(t);return c[e]+t.slice(e.length)}function D(t){return"number"!=typeof t?{top:0,right:0,bottom:0,left:0,...t}:{top:t,right:t,bottom:t,left:t}}function I(t){let{x:e,y:i,width:n,height:o}=t;return{width:n,height:o,top:i,left:e,right:e+n,bottom:i+o,x:e,y:i}}function E(t,e,i){let n,{reference:o,floating:l}=t,r=y(e),s=w(y(e)),a=v(s),h=m(e),u="y"===r,d=o.x+o.width/2-l.width/2,p=o.y+o.height/2-l.height/2,c=o[a]/2-l[a]/2;switch(h){case"top":n={x:d,y:o.y-l.height};break;case"bottom":n={x:d,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:p};break;case"left":n={x:o.x-l.width,y:p};break;default:n={x:o.x,y:o.y}}switch(g(e)){case"start":n[s]-=c*(i&&u?-1:1);break;case"end":n[s]+=c*(i&&u?-1:1)}return n}async function $(t,e){var i;void 0===e&&(e={});let{x:n,y:o,platform:l,rects:r,elements:s,strategy:a}=t,{boundary:h="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:c=0}=f(e,t),m=D(c),g=s[p?"floating"===d?"reference":"floating":d],w=I(await l.getClippingRect
vendor: 1,244 bytes, line 1
1({element:null==(i=await (null==l.isElement?void 0:l.isElement(g)))||i?g:g.contextElement||await (null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:h,rootBoundary:u,strategy:a})),v="floating"===d?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,y=await (null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await (null==l.isElement?void 0:l.isElement(y))&&await (null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},x=I(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(w.top-x.top+m.top)/b.y,bottom:(x.bottom-w.bottom+m.bottom)/b.y,left:(w.left-x.left+m.left)/b.x,right:(x.right-w.right+m.right)/b.x}}let U=async(t,e,i)=>{let{placement:n="bottom",strategy:o="absolute",middleware:l=[],platform:r}=i,s=r.detectOverflow?r:{...r,detectOverflow:$},a=await (null==r.isRTL?void 0:r.isRTL(e)),h=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:d}=E(h,n,a),p=n,c=0,f={};for(let i=0;i<l.length;i++){let m=l[i];if(!m)continue;let{name:g,fn:w}=m,{x:v,y:y,data:b,reset:x}=await w({x:u,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:f,re
1cts:h,platform:s,elements:{reference:t,floating:e}});u=null!=v?v:u,d=null!=y?y:d,f[g]={...f[g],...b},x&&c<50&&(c++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(h=!0===x.rects?await r.getElementRects({reference:t,floating:e,strategy:o}):x.rects),{x:u,y:d}=E(h,p,a)),i=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};function H(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function L(t){return s.some(e=>t[e]>=0)}function z(t){let e=h(...t.map(t=>t.left)),i=h(...t.map(t=>t.top));return{x:e,y:i,width:u(...t.map(t=>t.right))-e,height:u(...t.map(t=>t.bottom))-i}}let M=new Set(["left","top"]);async function A(t,e){let{placement:i,platform:n,elements:o}=t,l=await (null==n.isRTL?void 0:n.isRTL(o.floating)),r=m(i),s=g(i),a="y"===y(i),h=M.has(r)?-1:1,u=l&&a?-1:1,d=f(e,t),{mainAxis:p,crossAxis:c,alignmentAxis:w}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof w&&(c="end"===s?-1*w:w),a?{x:c*u,y:p*h}:{x:p*h,y:c*u}}function P(){return"u">typeof window}function k(t){return Y(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function V(t){var e;return null==(e=(Y(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Y(t){return!!P()&&(t instanceof Node||t instanceof N(t).Node)}function B(t){return!!P()&&(t instanceof Element||t instanceof N(t).Element)}function K(t){return!!P()&&(t instanceof HTMLElement||t instanceof N(t).HTMLElement)}function W(t){return!(!P()||"u"<typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof N(t).ShadowRoot)}function F(t){let{overflow:e,overflowX:i,overflowY:n,display:o}=X(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&"inline"!==o&&"contents"!==o}function q(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}let Q=/transform|translate|scale|rotate|perspective|filter/,_=/paint|layout|strict|content/,j=t=>!!t&&"none"!==t;function J(t){let e=B(t)?X(t):t;return j(e.transform)||j(e.translate)||j(e.scale)||j(e.rotate)||j(e.perspective)||!G()&&(j(e.backdropFilter)||j(e.filter))||Q.test(e.willChange||"")||_.test(e.contain||"")}function G(){return null==n&&(n="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),n}function Z(t){return/^(html|body|#document)$/.test(k(t))}function X(t){return N(t).getComputedStyle(t)}function tt(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function te(t){if("html"===k(t))return t;let e=t.assignedSlot||t.parentNode||W(t)&&t.host||V(t);return W(e)?e.host:e}function ti(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tn(t){let e=X(t),i=parseFloat(e.width)||0,n=parseFloat(e.height)||0,o=K(t),l=o?t.offsetWidth:i,r=o?t.offsetHeight:n,s=d(i)!==l||d(n)!==r;return s&&(i=l,n=r),{width:i,height:n,$:s}}function to(t){return B(t)?t:t.contextElement}function tl(t){let e=to(t);if(!K(e))return p(1);let i=e.getBoundingClientRect(),{width:n,height:o,$:l}=tn(e),r=(l?d(i.width):i.width)/n,s=(l?d(i.height):i.height)/o;return r&&Number.isFinite(r)||(r=1),s&&Number.isFinite(s)||(s=1),{x:r,y:s}}let tr=p(0);function ts(t){let e=N(t);
1return G()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:tr}function ta(t,e,i,n){var o;void 0===e&&(e=!1),void 0===i&&(i=!1);let l=t.getBoundingClientRect(),r=to(t),s=p(1);e&&(n?B(n)&&(s=tl(n)):s=tl(t));let a=(void 0===(o=i)&&(o=!1),n&&(!o||n===N(r))&&o)?ts(r):p(0),h=(l.left+a.x)/s.x,u=(l.top+a.y)/s.y,d=l.width/s.x,c=l.height/s.y;if(r){let t=N(r),e=n&&B(n)?N(n):n,i=t,o=ti(i);for(;o&&n&&e!==i;){let t=tl(o),e=o.getBoundingClientRect(),n=X(o),l=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,r=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;h*=t.x,u*=t.y,d*=t.x,c*=t.y,h+=l,u+=r,o=ti(i=N(o))}}return I({width:d,height:c,x:h,y:u})}function th(t,e){let i=tt(t).scrollLeft;return e?e.left+i:ta(V(t)).left+i}function tu(t,e){let i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-th(t,i),y:i.top+e.scrollTop}}function td(t,e,i){var n;let o;if("viewport"===e)o=function(t,e){let i=N(t),n=V(t),o=i.visualViewport,l=n.clientWidth,r=n.clientHeight,s=0,a=0;if(o){l=o.width,r=o.height;let t=G();(!t||t&&"fixed"===e)&&(s=o.offsetLeft,a=o.offsetTop)}let h=th(n);if(h<=0){let t=n.ownerDocument,e=t.body,i=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(n.clientWidth-e.clientWidth-o);r<=25&&(l-=r)}else h<=25&&(l+=h);return{width:l,height:r,x:s,y:a}}(t,i);else if("document"===e){let e,i,l,r,s,a,h;n=V(t),e=V(n),i=tt(n),l=n.ownerDocument.body,r=u(e.scrollWidth,e.clientWidth,l.scrollWidth,l.clientWidth),s=u(e.scrollHeight,e.clientHeight,l.scrollHeight,l.clientHeight),a=-i.scrollLeft+th(n),h=-i.scrollTop,"rtl"===X(l).direction&&(a+=u(e.clientWidth,l.clientWidth)-r),o={width:r,height:s,x:a,y:h}}else if(B(e)){let t,n,l,r,s,a;n=(t=ta(e,!0,"fixed"===i)).top+e.clientTop,l=t.left+e.clientLeft,r=K(e)?tl(e):p(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,o={width:s,height:a,x:l*r.x,y:n*r.y}}else{let i=ts(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return I(o)}function tp(t){return"static"===X(t).position}function tc(t,e){if(!K(t)||"fixed"===X(t).position)return null;if(e)return e(t);let i=t.offsetParent;return V(t)===i&&(i=i.ownerDocument.body),i}function tf(t,e){var i;let n=N(t);if(q(t))return n;if(!K(t)){let e=te(t);for(;e&&!Z(e);){if(B(e)&&!tp(e))return e;e=te(e)}return n}let o=tc(t,e);for(;o&&(i=o,/^(table|td|th)$/.test(k(i)))&&tp(o);)o=tc(o,e);return o&&Z(o)&&tp(o)&&!J(o)?n:o||function(t){let e=te(t);for(;K(e)&&!Z(e);){if(J(e))return e;if(q(e))break;e=te(e)}return null}(t)||n}let tm=async function(t){let e=this.getOffsetParent||tf,i=this.getDimensions,n=await i(t.floating);return{reference:function(t,e,i){let n=K(e),o=V(e),l="fixed"===i,r=ta(t,!0,l,e),s={scrollLeft:0,scrollTop:0},a=p(0);if(n||!n&&!l)if(("body"!==k(e)||F(o))&&(s=tt(e)),n){let t=ta(e,!0,l,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else o&&(a.x=th(o));l&&!n&&o&&(a.x=th(o));let h=!o||n||l?p(0):tu(o,s);return{x:r.left+s.scrollLeft-a.x-h.x,y:r.top+s.scrollTop-a.y-h.y,width:r.width,height:r.height}}(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},tg={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t,l="fixed"===o,r=V(n),s=!!e&&q(e.floating);if(n===r||s&&l)return i;let a={scrollLeft:0,scrollTop:0},h=p(1),u=p(0),d=K(n);if((d||!d&&!l)&&(("body"!==k(n)||F(r))&&(a=tt(n)),d)){let t=ta(n);h=tl(n),u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop}let c=!r||d||l?p(0):tu(r,a);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-a.scrollLeft*h.x+u.x+c.x,y:i.y*h.y-a.scrollTop*h.y+u.y+c.y}},getDocumentElement:V,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t,l=[..."clippingAncestors"===i?q(e)?[]:function(t,e){let i=e.get(t);if(i)return i;let n=(function t(e,i,n){var o;void 0===i&&(i=[]),void 0===n&&(n=!0);let l=function t(e){let i=te(e);return Z(i)?e.ownerDocument?e.ownerDocument.body:e.body:K(i)&&F(i)?i:t(i)}(e),r=l===(null==(o=e.ownerDocument)?void 0:o.body),s=N(l);if(!r)return i.concat(l,t(l,[],n));{let e=ti(s);return i.concat(s,s.visualViewport||[],F(l)?l:[],e&&n?t(e):[])}})(t,[],!1).filter(t=>B(t)&&"body"!==k(t)),o=null,l="fixed"===X(t).position,r=l?te(t):t;for(;B(r)&&!Z(r);){let e=X(r),i=J(r);i||"fixed"!==e.position||(o=null),(l?i||o:!(!i&&"static"===e.position&&o&&("absolute"===o.position||"fixed"===o.position)||F(r)&&!i&&function t(e,i){let n=te(e);return!(n===i||!B(n)||Z(n))&&("fixed"===X(n).position||t(n,i))}(t,r)))?o=e:n=n.filter(t=>t!==r),r=te(r)}return e.set(t,n),n}(e,this._c):[].concat(i),n],r=td(e,l[0],o),s=r.top,a=r.right,d=r.bottom,p=r.left;for(let t=1;t<l.length;t++){let i=td(e,l[t],o);s=u(i.top,s),a=h(i.right,a),d=h(i.bottom,d),p=u(i.left,p)}return{width:a-p,height:d-s,x:p,y:s}},getOffsetParent:tf,getElementRects:tm,getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){let{width:e,height:i}=tn(t);return{width:e,height:i}},getScale:tl,isElement:B,isRTL:function(t){return"rtl"===X(t).direction}},tw=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;let{x:o,y:l,placement:r,middlewareData:s}=e,a=await A(e,t);return r===(null==(i=s.offset)?void 0:i.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:l+a.y,data:{...a,placement:r}}}}},tv=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,n,o,l;let{rects:r,middlewareData:s,placement:h,platform:u,elements:d}=e,{crossAxis:p=!1,alignment:c,allowedPlacements:w=a,autoAlignment:v=!0,...y}=f(t,e),C=void 0!==c||w===a?((l=c||null)?[...w.filter(t=>g(t)===l),...w.filter(t=>g(t)!==l)]:w.filter(t=>m(t)===t)).filter(t=>!l||g(t)===l||!!v&&x(t)!==t):w,O=await u.detectOverflow(e,y),R=(null==(i=s.autoPlacement)?void 0:i.index)||0,T=C[R];if(null==T)return{};let S=b(T,r,await (null==u.isRTL?void 0:u.isRTL(d.floating)));if(h!==T)return{reset:{placement:C[0]}};let D=[O[m(T)],O[S[0]],O[S[1]]],I=[...(null==(n=s.autoPlacement)?void 0:n.overflows)||[],{placement:T,overflows:D}],E=C[R+1];if(E)return{data:{index:R+1,overflows:I},reset:{placement:E}};let $=I.map(t=>{let e=g(t.placement);return[t.placement,e&&p?t.overflows.slice(0,2).reduce((t,e)=>t+e,0):t.overflows[0],t.overflows]}).sort((t,e)=>t[1]-e[1]),U=(null==(o=$.filter(t=>t[2].slice(0,g(t[0])?2:3).every(t=>t<=0))[0])?void 0:o[0])||$[0][0];return U!==h?{data:{index:R+1,overflows:I},reset:{placement:U}}:{}}}},ty=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:n,placement:o,platform:l}
1=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...d}=f(t,e),p={x:i,y:n},c=await l.detectOverflow(e,d),g=y(m(o)),v=w(g),b=p[v],x=p[g];if(r){let t="y"===v?"top":"left",e="y"===v?"bottom":"right",i=b+c[t],n=b-c[e];b=u(i,h(b,n))}if(s){let t="y"===g?"top":"left",e="y"===g?"bottom":"right",i=x+c[t],n=x-c[e];x=u(i,h(x,n))}let C=a.fn({...e,[v]:b,[g]:x});return{...C,data:{x:C.x-i,y:C.y-n,enabled:{[v]:r,[g]:s}}}}}},tb=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n,o,l,r;let s,a,h,{placement:u,middlewareData:d,rects:p,initialPlacement:c,platform:w,elements:v}=e,{mainAxis:D=!0,crossAxis:I=!0,fallbackPlacements:E,fallbackStrategy:$="bestFit",fallbackAxisSideDirection:U="none",flipAlignment:H=!0,...L}=f(t,e);if(null!=(i=d.arrow)&&i.alignmentOffset)return{};let z=m(u),M=y(c),A=m(c)===c,P=await (null==w.isRTL?void 0:w.isRTL(v.floating)),k=E||(A||!H?[S(c)]:(s=S(c),[x(c),s,x(s)])),N="none"!==U;!E&&N&&k.push(...(a=g(c),h=function(t,e,i){switch(t){case"top":case"bottom":if(i)return e?O:C;return e?C:O;case"left":case"right":return e?R:T;default:return[]}}(m(c),"start"===U,P),a&&(h=h.map(t=>t+"-"+a),H&&(h=h.concat(h.map(x)))),h));let V=[c,...k],Y=await w.detectOverflow(e,L),B=[],K=(null==(n=d.flip)?void 0:n.overflows)||[];if(D&&B.push(Y[z]),I){let t=b(u,p,P);B.push(Y[t[0]],Y[t[1]])}if(K=[...K,{placement:u,overflows:B}],!B.every(t=>t<=0)){let t=((null==(o=d.flip)?void 0:o.index)||0)+1,e=V[t];if(e&&("alignment"!==I||M===y(e)||K.every(t=>y(t.placement)!==M||t.overflows[0]>0)))return{data:{index:t,overflows:K},reset:{placement:e}};let i=null==(l=K.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:l.placement;if(!i)switch($){case"bestFit":{let t=null==(r=K.filter(t=>{if(N){let e=y(t.placement);return e===M||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:r[0];t&&(i=t);break}case"initialPlacement":i=c}if(u!==i)return{reset:{placement:i}}}return{}}}},tx=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var i,n;let o,l,{placement:r,rects:s,platform:a,elements:d}=e,{apply:p=()=>{},...c}=f(t,e),w=await a.detectOverflow(e,c),v=m(r),b=g(r),x="y"===y(r),{width:C,height:O}=s.floating;"top"===v||"bottom"===v?(o=v,l=b===(await (null==a.isRTL?void 0:a.isRTL(d.floating))?"start":"end")?"left":"right"):(l=v,o="end"===b?"top":"bottom");let R=O-w.top-w.bottom,T=C-w.left-w.right,S=h(O-w[o],R),D=h(C-w[l],T),I=!e.middlewareData.shift,E=S,$=D;if(null!=(i=e.middlewareData.shift)&&i.enabled.x&&($=T),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(E=R),I&&!b){let t=u(w.left,0),e=u(w.right,0),i=u(w.top,0),n=u(w.bottom,0);x?$=C-2*(0!==t||0!==e?t+e:u(w.left,w.right)):E=O-2*(0!==i||0!==n?i+n:u(w.top,w.bottom))}await p({...e,availableWidth:$,availableHeight:E});let U=await a.getDimensions(d.floating);return C!==U.width||O!==U.height?{reset:{rects:!0}}:{}}}},tC=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){let{rects:i,platform:n}=e,{strategy:o="referenceHidden",...l}=f(t,e);switch(o){case"referenceHidden":{let t=H(await n.detectOverflow(e,{...l,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:L(t)}}}case"escaped":{let t=H(await n.detectOverflow(e,{...l,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:L(t)}}}default:return{}}}}},tO=t=>({name:"arrow",options:t,async fn(e){let{x:i,y:n,placement:o,rects:l,platform:r,elements:s,middlewareData:a}=e,{element:d,padding:p=0}=f(t,e)||{};if(null==d)return{};let c=D(p),m={x:i,y:n},b=w(y(o)),x=v(b),C=await r.getDimensions(d),O="y"===b,R=O?"clientHeight":"clientWidth",T=l.reference[x]+l.reference[b]-m[b]-l.floating[x],S=m[b]-l.reference[b],I=await (null==r.getOffsetParent?void 0:r.getOffsetParent(d)),E=I?I[R]:0;
1E&&await (null==r.isElement?void 0:r.isElement(I))||(E=s.floating[R]||l.floating[x]);let $=E/2-C[x]/2-1,U=h(c[O?"top":"left"],$),H=h(c[O?"bottom":"right"],$),L=E-C[x]-H,z=E/2-C[x]/2+(T/2-S/2),M=u(U,h(z,L)),A=!a.arrow&&null!=g(o)&&z!==M&&l.reference[x]/2-(z<U?U:H)-C[x]/2<0,P=A?z<U?z-U:z-L:0;return{[b]:m[b]+P,data:{[b]:M,centerOffset:z-M-P,...A&&{alignmentOffset:P}},reset:A}}}),tR=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){let{placement:i,elements:n,rects:o,platform:l,strategy:r}=e,{padding:s=2,x:a,y:d}=f(t,e),p=Array.from(await (null==l.getClientRects?void 0:l.getClientRects(n.reference))||[]),c=function(t){let e=t.slice().sort((t,e)=>t.y-e.y),i=[],n=null;for(let t=0;t<e.length;t++){let o=e[t];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map(t=>I(z(t)))}(p),g=I(z(p)),w=D(s),v=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===c.length&&c[0].left>c[1].right&&null!=a&&null!=d)return c.find(t=>a>t.left-w.left&&a<t.right+w.right&&d>t.top-w.top&&d<t.bottom+w.bottom)||g;if(c.length>=2){if("y"===y(i)){let t=c[0],e=c[c.length-1],n="top"===m(i),o=t.top,l=e.bottom,r=n?t.left:e.left,s=n?t.right:e.right;return{top:o,bottom:l,left:r,right:s,width:s-r,height:l-o,x:r,y:o}}let t="left"===m(i),e=u(...c.map(t=>t.right)),n=h(...c.map(t=>t.left)),o=c.filter(i=>t?i.left===n:i.right===e),l=o[0].top,r=o[o.length-1].bottom;return{top:l,bottom:r,left:n,right:e,width:e-n,height:r-l,x:n,y:l}}return g}},floating:n.floating,strategy:r});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},tT=(t,e,i)=>{let n=new Map,o={platform:tg,...i},l={...o.platform,_c:n};return U(t,e,{...o,platform:l})};var tS=i(33118),tD=i(52397),tI=i(14413);if("u">typeof WeakMap){let t=new WeakMap;o=e=>t.get(e),l=(e,i)=>(t.set(e,i),i)}else{let t=[],e=0;o=e=>{for(let i=0;i<t.length;i+=2)if(t[i]==e)return t[i+1]},l=(i,n)=>(10==e&&(e=0),t[e++]=i,t[e++]=n)}var tE=class{constructor(t,e,i,n){this.width=t,this.height=e,this.map=i,this.problems=n}findCell(t){for(let e=0;e<this.map.length;e++){let i=this.map[e];if(i!=t)continue;let n=e%this.width,o=e/this.width|0,l=n+1,r=o+1;for(let t=1;l<this.width&&this.map[e+t]==i;t++)l++;for(let t=1;r<this.height&&this.map[e+this.width*t]==i;t++)r++;return{left:n,top:o,right:l,bottom:r}}throw RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw RangeError(`No cell with offset ${t} found`)}nextCell(t,e,i){let{left:n,right:o,top:l,bottom:r}=this.findCell(t);return"horiz"==e?(i<0?0==n:o==this.width)?null:this.map[l*this.width+(i<0?n-1:o)]:(i<0?0==l:r==this.height)?null:this.map[n+this.width*(i<0?l-1:r)]}rectBetween(t,e){let{left:i,right:n,top:o,bottom:l}=this.findCell(t),{left:r,right:s,top:a,bottom:h}=this.findCell(e);return{left:Math.min(i,r),top:Math.min(o,a),right:Math.max(n,s),bottom:Math.max(l,h)}}cellsInRect(t){let e=[],i={};for(let n=t.top;n<t.bottom;n++)for(let o=t.left;o<t.right;o++){let l=n*this.width+o,r=this.map[l];!i[r]&&(i[r]=!0,o==t.left&&o&&this.map[l-1]==r||n==t.top&&n&&this.map[l-this.width]==r||e.push(r))}return e}positionAt(t,e,i){for(let n=0,o=0;;n++){let l=o+i.child(n).nodeSize;if(n==t){let i=e+t*this.width,n=(t+1)*this.width;for(;i<n&&this.map[i]<o;)i++;return i==n?l-1:this.map[i]}o=l}}static get(t){return o(t)||l(t,function(t){if("table"!=t.type.spec.tableRole)throw RangeError("Not a table node: "+t.type.name);let e=function(t){let e=-1,i=!1;for(let n=0;n<t.childCount;n++){let o=t.child(n),l=0;if(i)for(let e=0;e<n;e++){let i=t.child(e);for(let t=0;t<i.childCount;t++){let o=i.child(t);e+o.attrs.rowspan>n&&(l+=o.attrs.colspan)}}for(let t=0;t<o.childCount;t++){let e=o.child(t);l+=e.attrs.colspan,e.attrs.rowspan>1&&(i=!0)}-1==e?e=l:e!=l&&(e=Math.max(e,l))}return e}(t),i=t.childCount,n=[],o=0,l=null,r=[];for(let t=0,o=e*i;t<o;t++)n[t]=0;for(let s=0,a=0;s<i;s++){let h=t.child(s);a++;for(let t=0;;t++){for(;o<n.length&&0!=n[o];)o++;if(t==h.childCount)break;let u=h.child(t),{colspan:d,rowspan:p,colwidth:c}=u.attrs;for(let t=0;t<p;t++){if(t+s>=i){(l||(l=[])).push({type:"overlong_rowspan",pos:a,n:p-t});break}let h=o+t*e;for(let t=0;t<d;t++){0==n[h+t]?n[h+t]=a:(l||(l=[])).push({type:"collision",row:s,pos:a,n:d-t});let i=c&&c[t];if(i){let n=(h+t)%e*2,o=r[n];null==o||o!=i&&1==r[n+1]?(r[n]=i,r[n+1]=1):o==i&&r[n+1]++}}}o+=d,a+=u.nodeSize}let u=(s+1)*e,d=0;for(;o<u;)0==n[o++]&&d++;d&&(l||(l=[])).push({type:"missing",row:s,n:d}),a++}(0===e||0===i)&&(l||(l=[])).push({type:"zero_sized"});let s=new tE(e,i,n,l),a=!1;for(let t=0;!a&&t<r.length;t+=2)null!=r[t]&&r[t+1]<i&&(a=!0);
1return a&&function(t,e,i){t.problems||(t.problems=[]);let n={};for(let o=0;o<t.map.length;o++){let l=t.map[o];if(n[l])continue;n[l]=!0;let r=i.nodeAt(l);if(!r)throw RangeError(`No cell with offset ${l} found`);let s=null,a=r.attrs;for(let i=0;i<a.colspan;i++){let n=e[(o+i)%t.width*2];null==n||a.colwidth&&a.colwidth[i]==n||((s||(s=function(t){if(t.colwidth)return t.colwidth.slice();let e=[];for(let i=0;i<t.colspan;i++)e.push(0);return e}(a)))[i]=n)}s&&t.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:s})}}(s,r,t),s}(t))}};function t$(t){let e=t.cached.tableNodeTypes;if(!e)for(let i in e=t.cached.tableNodeTypes={},t.nodes){let n=t.nodes[i],o=n.spec.tableRole;o&&(e[o]=n)}return e}function tU(t){let e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function tH(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function tL(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function tz(t,e,i){let n=t.node(-1),o=tE.get(n),l=t.start(-1),r=o.nextCell(t.pos-l,e,i);return null==r?null:t.node(0).resolve(l+r)}function tM(t,e,i=1){let n={...t,colspan:t.colspan-i};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,i),n.colwidth.some(t=>t>0)||(n.colwidth=null)),n}new tS.hs("selectingCells");var tA=class t extends tS.LN{constructor(t,e=t){const i=t.node(-1),n=tE.get(i),o=t.start(-1),l=n.rectBetween(t.pos-o,e.pos-o),r=t.node(0),s=n.cellsInRect(l).filter(t=>t!=e.pos-o);s.unshift(e.pos-o);const a=s.map(t=>{let e=i.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);let n=o+t+1;return new tS.yn(r.resolve(n),r.resolve(n+e.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=e}map(e,i){let n=e.resolve(i.map(this.$anchorCell.pos)),o=e.resolve(i.map(this.$headCell.pos));if(tH(n)&&tH(o)&&tL(n,o)){let e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?t.rowSelection(n,o):e&&this.isColSelection()?t.colSelection(n,o):new t(n,o)}return tS.U3.between(n,o)}content(){let t=this.$anchorCell.node(-1),e=tE.get(t),i=this.$anchorCell.start(-1),n=e.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},l=[];for(let i=n.top;i<n.bottom;i++){let r=[];for(let l=i*e.width+n.left,s=n.left;s<n.right;s++,l++){let i=e.map[l];if(o[i])continue;o[i]=!0;let s=e.findCell(i),a=t.nodeAt(i);if(!a)throw RangeError(`No cell with offset ${i} found`);let h=n.left-s.left,u=s.right-n.right;if(h>0||u>0){let t=a.attrs;if(h>0&&(t=tM(t,0,h)),u>0&&(t=tM(t,t.colspan-u,u)),s.left<n.left){if(!(a=a.type.createAndFill(t)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(t)}`)}else a=a.type.create(t,a.content)}if(s.top<n.top||s.bottom>n.bottom){let t={...a.attrs,rowspan:Math.min(s.bottom,n.bottom)-Math.max(s.top,n.top)};a=s.top<n.top?a.type.createAndFill(t):a.type.create(t,a.content)}r.push(a)}l.push(t.child(i).copy(tD.FK.from(r)))}let r=this.isColSelection()&&this.isRowSelection()?t:l;return new tD.Ji(tD.FK.from(r),1,1)}replace(t,e=tD.Ji.empty){let i=t.steps.length,n=this.ranges;for(let o=0;o<n.length;o++){let{$from:l,$to:r}=n[o],s=t.mapping.slice(i);t.replace(s.map(l.pos),s.map(r.pos),o?tD.Ji.empty:e)}let o=tS.LN.findFrom(t.doc.resolve(t.mapping.slice(i).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,e){this.replace(t,new tD.Ji(tD.FK.from(e),0,0))}forEachCell(t){let e=this.$anchorCell.node(-1),i=tE.get(e),n=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n));for(let i=0;i<o.length;i++)t(e.nodeAt(o[i]),n+o[i])}isColSelection(){let t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);return!(Math.min(t,e)>0)&&Math.max(t+this.$anchorCell.nodeAfter.attrs.rowspan,e+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(e,i=e){let n=e.node(-1),o=tE.get(n),l=e.start(-1),r=o.findCell(e.pos-l),s=o.findCell(i.pos-l),a=e.node(0);return r.top<=s.top?(r.top>0&&(e=a.resolve(l+o.map[r.left])),s.bottom<o.height&&(i=a.resolve(l+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(i=a.resolve(l+o.map[s.left])),r.bottom<o.height&&(e=a.resolve(l+o.map[o.width*(o.height-1)+r.right-1]))),new t(e,i)}isRowSelection(){let t=this.$anchorCell.node(-1),e=tE.get(t),i=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-i),o=e.colCount(this.$headCell.pos-i);return!(Math.min(n,o)>0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.colspan,o+this.$headCell.nodeAfter.attrs.colspan)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,i=e){let n=e.node(-1),o=tE.get(n),l=e.start(-1),r=o.findCell(e.pos-l),s=o.findCell(i.pos-l),a=e.node(0);
1return r.left<=s.left?(r.left>0&&(e=a.resolve(l+o.map[r.top*o.width])),s.right<o.width&&(i=a.resolve(l+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(i=a.resolve(l+o.map[s.top*o.width])),r.right<o.width&&(e=a.resolve(l+o.map[o.width*(r.top+1)-1]))),new t(e,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,i){return new t(e.resolve(i.anchor),e.resolve(i.head))}static create(e,i,n=i){return new t(e.resolve(i),e.resolve(n))}getBookmark(){return new tP(this.$anchorCell.pos,this.$headCell.pos)}};tA.prototype.visible=!1,tS.LN.jsonID("cell",tA);var tP=class t{constructor(t,e){this.anchor=t,this.head=e}map(e){return new t(e.map(this.anchor),e.map(this.head))}resolve(t){let e=t.resolve(this.anchor),i=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&i.index()<i.parent.childCount&&tL(e,i)?new tA(e,i):tS.LN.near(i,1)}};function tk(t){let e=t.selection,i=function(t){let e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;let i=function(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}(e.$head)||function(t){for(let e=t.nodeAfter,i=t.pos;e;e=e.firstChild,i++){let n=e.type.spec.tableRole;if("cell"==n||"header_cell"==n)return t.doc.resolve(i)}for(let e=t.nodeBefore,i=t.pos;e;e=e.lastChild,i--){let n=e.type.spec.tableRole;if("cell"==n||"header_cell"==n)return t.doc.resolve(i-e.nodeSize)}}(e.$head);if(i)return i;throw RangeError(`No cell found around position ${e.head}`)}(t),n=i.node(-1),o=i.start(-1),l=tE.get(n);return{...e instanceof tA?l.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):l.findCell(i.pos-o),tableStart:o,map:l,table:n}}function tN(t,e,i){let n=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let t=0;t<n.length;t++){let o=e.table.nodeAt(n[t]);if(o&&o.type!==i.header_cell)return!1}return!0}function tV(t,e){if((e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic)return function(e,i){if(!tU(e))return!1;if(i){let n=t$(e.schema),o=tk(e),l=e.tr,r=o.map.cellsInRect("column"==t?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==t?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=r.map(t=>o.table.nodeAt(t));for(let t=0;t<r.length;t++)s[t].type==n.header_cell&&l.setNodeMarkup(o.tableStart+r[t],n.cell,s[t].attrs);if(0===l.steps.length)for(let t=0;t<r.length;
1t++)l.setNodeMarkup(o.tableStart+r[t],n.header_cell,s[t].attrs);i(l)}return!0};return function(e,i){if(!tU(e))return!1;if(i){let n=t$(e.schema),o=tk(e),l=e.tr,r=tN("row",o,n),s=tN("column",o,n),a=+("column"===t?!!r:"row"===t&&!!s),h="column"==t?{left:0,top:a,right:1,bottom:o.map.height}:"row"==t?{left:a,top:0,right:o.map.width,bottom:1}:o,u="column"==t?s?n.cell:n.header_cell:"row"==t?r?n.cell:n.header_cell:n.cell;o.map.cellsInRect(h).forEach(t=>{let e=t+o.tableStart,i=l.doc.nodeAt(e);i&&l.setNodeMarkup(e,u,i.attrs)}),i(l)}return!0}}function tY(t,e){let i=t.selection;if(!(i instanceof tA))return!1;if(e){let n=t.tr,o=t$(t.schema).cell.createAndFill().content;i.forEachCell((t,e)=>{t.content.eq(o)||n.replace(n.mapping.map(e+1),n.mapping.map(e+t.nodeSize-1),new tD.Ji(o,0,0))}),n.docChanged&&e(n)}return!0}new tS.hs("fix-tables"),tV("row",{useDeprecatedLogic:!0}),tV("column",{useDeprecatedLogic:!0}),tV("cell",{useDeprecatedLogic:!0});function tB(t,e,i){return!i.eq(t.selection)&&(e&&e(t.tr.setSelection(i).scrollIntoView()),!0)}function tK(t,e){return(i,n,o)=>{if(!o)return!1;let l=i.selection;if(l instanceof tA)return tB(i,n,tS.LN.near(l.$headCell,e));if("horiz"!=t&&!l.empty)return!1;let r=tF(o,t,e);if(null==r)return!1;if("horiz"==t)return tB(i,n,tS.LN.near(i.doc.resolve(l.head+e),e));{let o,l=i.doc.resolve(r),s=tz(l,t,e);return o=s?tS.LN.near(s,1):e<0?tS.LN.near(i.doc.resolve(l.before(-1)),-1):tS.LN.near(i.doc.resolve(l.after(-1)),1),tB(i,n,o)}}}function tW(t,e){return(i,n,o)=>{let l;if(!o)return!1;let r=i.selection;if(r instanceof tA)l=r;else{let n=tF(o,t,e);if(null==n)return!1;l=new tA(i.doc.resolve(n))}let s=tz(l.$headCell,t,e);return!!s&&tB(i,n,new tA(l.$anchorCell,s))}}function tF(t,e,i){if(!(t.state.selection instanceof tS.U3))return null;let{$head:n}=t.state.selection;for(let o=n.depth-1;o>=0;o--){let l=n.node(o);if((i<0?n.index(o):n.indexAfter(o))!=(i<0?0:l.childCount))break;if("cell"==l.type.spec.tableRole||"header_cell"==l.type.spec.tableRole){let l=n.before(o),r="vert"==e?i>0?"down":"up":i>0?"right":"left";return t.endOfTextblock(r)?l:null}}return null}(0,tI.K)({ArrowLeft:tK("horiz",-1),ArrowRight:tK("horiz",1),ArrowUp:tK("vert",-1),ArrowDown:tK("vert",1),"Shift-ArrowLeft":tW("horiz",-1),"Shift-ArrowRight":tW("horiz",1),"Shift-ArrowUp":tW("vert",-1),"Shift-ArrowDown":tW("vert",1),Backspace:tY,"Mod-Backspace":tY,Delete:tY,"Mod-Delete":tY}),new tS.hs("tableColumnResizing");var tq=class{constructor({editor:t,element:e,view:i,pluginKey:n="bubbleMenu",updateDelay:o=250,resizeDelay:l=60,shouldShow:s,appendTo:a,getReferencedVirtualElement:h,options:u}){var d;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:t,state:e,from:i,to:n})=>{let{doc:o,selection:l}=e,{empty:s}=l,a=!o.textBetween(i,n).length&&(0,r.eE)(e.selection),h=this.element.contains(document.activeElement);return!!(t.hasFocus()||h)&&!s&&!a&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;if(this.editor.isDestroyed)return void this.destroy();if(this.preventHide){this.preventHide=!1;return}(null==t?void 0:t.relatedTarget)&&(null==(e=this.element.parentNode)?void 0:e.contains(t.relatedTarget))||(null==t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(t,e)=>{let i=!(null==e?void 0:e.selection.eq(t.state.selection)),n=!(null==e?void 0:e.doc.eq(t.state.doc));(i||n)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(t,i,n,e)},this.updateDelay))},this.updateHandler=(t,e,i,n)=>{let{composing:o}=t;!o&&(e||i)&&(this.getShouldShow(n)?(this.show(),this.updatePosition()):this.hide())},this.transactionHandler=({transaction:t})=>{let e=t.getMeta(this.pluginKey);"updatePosition"===e?this.updatePosition():e&&"object"==typeof e&&"updateOptions"===e.type?this.updateOptions(e.options):"hide"===e?this.hide():"show"===e&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=n,this.updateDelay=o,this.resizeDelay=l,this.appendTo=a,this.scrollTarget=null!=(d=null==u?void 0:u.scrollTarget)?d:window,this.getReferencedVirtualElement=h,this.floatingUIOptions={...this.floatingUIOptions,...u},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.get
1ShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let t=[];return this.floatingUIOptions.flip&&t.push(tb("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(ty("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(tw("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(tO(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(tx("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(tv("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(tC("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(tR("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e,i,n,o;let{selection:l}=this.editor.state,s=null==(t=this.getReferencedVirtualElement)?void 0:t.call(this);if(s)return s;if(!(null==(i=null==(e=this.view)?void 0:e.dom)?void 0:i.parentNode))return;let a=(0,r.MG)(this.view,l.from,l.to),h={getBoundingClientRect:()=>a,getClientRects:()=>[a]};if(l instanceof tS.nh){let t=this.view.nodeDOM(l.from),e=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");e&&(t=e),t&&(h={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(l instanceof tA){let t,e,i,{$anchorCell:r,$headCell:s}=l,a=r?r.pos:s.pos,u=s?s.pos:r.pos,d=this.view.nodeDOM(a),p=this.view.nodeDOM(u);if(!d||!p)return;let c=d===p?d.getBoundingClientRect():(n=d.getBoundingClientRect(),o=p.getBoundingClientRect(),t=Math.min(n.top,o.top),e=Math.max(n.bottom,o.bottom),i=Math.min(n.left,o.left),new DOMRect(i,t,Math.max(n.right,o.right)-i,e-t));h={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return h}updatePosition(){if(!this.isVisible)return;let t=this.virtualElement;t&&tT(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:e,strategy:i,middlewareData:n})=>{var o,l;if(this.isVisible&&!this.editor.isDestroyed&&this.element.isConnected){if((null==(o=n.hide)?void 0:o.referenceHidden)||(null==(l=n.hide)?void 0:l.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${t}px`,this.element.style.top=`${e}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){let{state:i}=t,n=i.selection.from!==i.selection.to;if(this.updateDelay>0&&n)return void this.handleDebouncedUpdate(t,e);let o=!(null==e?void 0:e.selection.eq(t.state.selection)),l=!(null==e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,o,l,e)}getShouldShow(t){var e;let{state:i}=this.view,{selection:n}=i,{ranges:o}=n,l=Math.min(...o.map(t=>t.$from.pos)),r=Math.max(...o.map(t=>t.$to.pos));return(null==(e=this.shouldShow)?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:l,to:r}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let e="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(t=null!=e?e:this.view.dom.parentElement)||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){var e;if(void 0!==t.updateDelay&&(this.updateDelay=t.updateDelay),void 0!==t.resizeDelay&&(this.resizeDelay=t.resizeDelay),void 0!==t.appendTo&&(this.appendTo=t.appendTo),void 0!==t.getReferencedVirtualElement&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),void 0!==t.shouldShow&&t.shouldShow&&(this.shouldShow=t.shouldShow),void 0!==t.options){let i=null!=(e=t.options.scrollTarget)?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},tQ=t=>new tS.k_({key:"string"==typeof t.pluginKey?new tS.hs(t.pluginKey):t.pluginKey,view:e=>
1new tq({view:e,...t})});r.YY.create({name:"bubbleMenu",addOptions:()=>({element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[tQ({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var t_=i(35988),tj=i(12115),tJ=i(47650),tG=class{constructor({editor:t,element:e,view:i,pluginKey:n="floatingMenu",updateDelay:o=250,resizeDelay:l=60,options:r,appendTo:s,shouldShow:a}){var h;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:t,state:e})=>{let{selection:i}=e,{$anchor:n,empty:o}=i,l=1===n.depth,r=n.parent.isTextblock&&!n.parent.type.spec.code&&!n.parent.textContent&&0===n.parent.childCount&&!this.getTextContent(n.parent);return!!t.hasFocus()&&!!o&&!!l&&!!r&&!!this.editor.isEditable},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(t,e,i,n)=>{let{composing:o}=t;!o&&(e||i)&&(this.getShouldShow(n)?(this.updatePosition(),this.show()):this.hide())},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;if(this.preventHide){this.preventHide=!1;return}(null==t?void 0:t.relatedTarget)&&(null==(e=this.element.parentNode)?void 0:e.contains(t.relatedTarget))||(null==t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:t})=>{let e=t.getMeta(this.pluginKey);"updatePosition"===e?this.updatePosition():e&&"object"==typeof e&&"updateOptions"===e.type?this.updateOptions(e.options):"hide"===e?this.hide():"show"===e&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=n,this.updateDelay=o,this.resizeDelay=l,this.appendTo=s,this.scrollTarget=null!=(h=null==r?void 0:r.scrollTarget)?h:window,this.floatingUIOptions={...this.floatingUIOptions,...r},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(t){return(0,r.q4)(t,{textSerializers:(0,r.iR)(this.editor.schema)})}get middlewares(){let t=[];return this.floatingUIOptions.flip&&t.push(tb("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(ty("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(tw("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(tO(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(tx("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(tv("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(tC("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(tR("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),t}getShouldShow(t){var e;let{state:i}=this.view,{selection:n}=i,{ranges:o}=n,l=Math.min(...o.map(t=>t.$from.pos)),r=Math.max(...o.map(t=>t.$to.pos));return null==(e=this.shouldShow)?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:l,to:r})}updateOptions(t){var e;if(void 0!==t.updateDelay&&(this.updateDelay=t.updateDelay),void 0!==t.resizeDelay&&(this.resizeDelay=t.resizeDelay),void 0!==t.appendTo&&(this.appendTo=t.appendTo),void 0!==t.shouldShow&&t.shouldShow&&(this.shouldShow=t.shouldShow),void 0!==t.options){let i=null!=(e=t.options.scrollTarget)?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){let{selection:t}=this.editor.state,e=(0,r.MG)(this.view,t.from,t.to);tT({getBoundingClientRect:()=>e,getClientRects:()=>[e]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:e,strategy:i,middlewareData:n})=>{var o,l;if((null==(o=n.hide)?void 0:o.referenceHidden)||(null==(l=n.hide)?void 0:l.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=i,this.element.style.left=`${t}px`,this.element.style.top=`${e}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){let i=!(null==e?void 0:e.selection.eq(t.state.selection)),n=!(null==e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,i,n,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let e="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(t=null!=e?e:this.view.dom.parentElement)||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},tZ=t=>new tS.k_({key:"string"==typeof t.pluginKey?new tS.hs(t.pluginKey):t.pluginKey,view:e=>
1new tG({view:e,...t})});function tX(t,e){return null!=t?t:new tS.hs(e)}r.YY.create({name:"floatingMenu",addOptions:()=>({element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}),addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[tZ({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var t0="u">typeof window?tj.useLayoutEffect:tj.useEffect,t1=new Set(["left","opacity","position","top","visibility","width"]),t2=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),t8=new Set(["children","className","style"]),t3=new Set(["tabIndex"]),t5=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),t4={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function t6(t,e){return/^on[A-Z]/.test(t)&&"function"==typeof e}function t7(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function t9(t,e,i){if("tabIndex"===e){t.tabIndex=Number(i);return}t[e]=i}function et(t,e){let i=(0,tj.useRef)({}),n=(0,tj.useRef)([]);t0(()=>{var o,l,r;let s,a,h,u=i.current;return!function(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}(t,u.className,e.className),o=u.style,l=e.style,s=null!=o?o:{},a=null!=l?l:{},new Set([...Object.keys(s),...Object.keys(a)]).forEach(e=>{let i=s[e],n=a[e];if(i!==n){if(null==n)return void(!t1.has(e)&&t.style.removeProperty(t7(e)));t1.has(e)||t.style.setProperty(t7(e),"number"!=typeof n||0===n||e.startsWith("--")||t2.has(e)?String(n):`${n}px`)}}),new Set([...Object.keys(u),...Object.keys(e)]).forEach(i=>{if(t8.has(i)||!(i.startsWith("aria-")||i.startsWith("data-")||t5.has(i))||t6(i,u[i])||t6(i,e[i]))return;let n=u[i],o=e[i];if(n===o)return;let l=(i.startsWith("aria-")||i.startsWith("data-"),i);if(null==o||!1===o){t3.has(i)&&function(t,e){if("tabIndex"===e)return t.removeAttribute("tabindex");let i=t[e];if("boolean"==typeof i){t[e]=!1;return}if("number"==typeof i){t[e]=0;return}t[e]=""}(t,i),t.removeAttribute(l);return}if(!0===o){t3.has(i)&&t9(t,i,!0),t.setAttribute(l,"");return}t3.has(i)?t9(t,i,o):t.setAttribute(l,String(o))}),r=n.current,r.forEach(({eventName:e,listener:i,options:n})=>{t.removeEventListener(e,i,n)}),h=[],Object.entries(e).forEach(([e,i])=>{var n;let o,l;if(!t6(e,i))return;let{eventName:r,options:s}={eventName:null!=(n=t4[l=((o=e.endsWith("Capture"))?e.slice(0,-7):e).slice(2)])?n:l.toLowerCase(),options:o?{capture:!0}:void 0},a=e=>{let n,o,l;i((n=e.defaultPrevented,o=!1,Object.defineProperties(l=Object.create(e),{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>o},preventDefault:{value:()=>{n=!0,e.preventDefault()}},stopPropagation:{value:()=>{o=!0,e.stopPropagation()}}}),l))};t.addEventListener(r,a,s),h.push({eventName:r,listener:a,options:s})}),n.current=h,i.current=e,()=>{n.current.forEach(({eventName:e,listener:i,options:n})=>{t.removeEventListener(e,i,n)}),n.current=[]}},[t,e])}var ee=tj.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:n,appendTo:o,shouldShow:l=null,getReferencedVirtualElement:r,options:s,children:a,...h},u)=>{let d=(0,tj.useRef)(document.createElement("div")),p=(0,tj.useRef)(tX(t,"bubbleMenu")).current;et(d.current,h),"function"==typeof u?u(d.current):u&&(u.current=d.current);let{editor:c}=(0,t_.aA)(),f=e||c,m={updateDelay:i,resizeDelay:n,appendTo:o,pluginKey:p,shouldShow:l,getReferencedVirtualElement:r,options:s},g=(0,tj.useRef)(m);g.current=m;let[w,v]=(0,tj.useState)(!1),y=(0,tj.useRef)(!0);return(0,tj.useEffect)(()=>
1{if(null==f?void 0:f.isDestroyed)return;if(!f)return void console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");let t=d.current;t.style.visibility="hidden",t.style.position="absolute";let e=tQ({...g.current,editor:f,element:t});f.registerPlugin(e);let i=g.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),f.unregisterPlugin(i),window.requestAnimationFrame(()=>{t.parentNode&&t.parentNode.removeChild(t)})}},[f]),(0,tj.useEffect)(()=>{if(w&&f&&!f.isDestroyed){if(y.current){y.current=!1;return}f.view.dispatch(f.state.tr.setMeta(p,{type:"updateOptions",options:g.current}))}},[w,f,i,n,l,s,o,r,p]),(0,tJ.createPortal)(a,d.current)});tj.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:n,appendTo:o,shouldShow:l=null,options:r,children:s,...a},h)=>{let u=(0,tj.useRef)(document.createElement("div")),d=(0,tj.useRef)(tX(t,"floatingMenu")).current;et(u.current,a),"function"==typeof h?h(u.current):h&&(h.current=u.current);let{editor:p}=(0,t_.aA)(),c=e||p,f={updateDelay:i,resizeDelay:n,appendTo:o,pluginKey:d,shouldShow:l,options:r},m=(0,tj.useRef)(f);m.current=f;let[g,w]=(0,tj.useState)(!1),v=(0,tj.useRef)(!0);return(0,tj.useEffect)(()=>{if(null==c?void 0:c.isDestroyed)return;if(!c)return void console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");let t=u.current;t.style.visibility="hidden",t.style.position="absolute";let e=tZ({...m.current,editor:c,element:t});c.registerPlugin(e);let i=m.current.pluginKey;return v.current=!0,w(!0),()=>{w(!1),c.unregisterPlugin(i),window.requestAnimationFrame(()=>{t.parentNode&&t.parentNode.removeChild(t)})}},[c]),(0,tj.useEffect)(()=>{if(g&&c&&!c.isDestroyed){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(d,{type:"updateOptions",options:m.current}))}},[g,c,i,n,l,r,o,d]),(0,tJ.createPortal)(s,u.current)})},63426:(t,e,i)=>{i.d(e,{A:()=>n});var n=i(18118).n4}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.