@zeniai/web-cockpit-ui 2.3.22-dev → 2.3.22-qa

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.
@@ -1,4 +1,4 @@
1
- import{r as V,g as St,a as A}from"./sentry-CsmEj6N0.js";import{r as K}from"./lexical-Q_iSNeyd.js";import{f as Mt}from"./core-Tp-f995F.js";import{y as Rt,af as Ot,ag as kt,n as At,k as Pt,ah as wt,ai as It}from"./index-BGcLWwYU.js";import{G as Ht,c as Ft,k as qt}from"./mui-B8_UdfTU.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},_=new l.Error().stack;_&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[_]="bece65a3-41ef-430f-aeab-fd7ceec93d77",l._sentryDebugIdIdentifier="sentry-dbid-bece65a3-41ef-430f-aeab-fd7ceec93d77")}catch{}})();var ne={},q={},qe;function Wt(){if(qe)return q;qe=1;var l=K();let _=new Map;function D(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function n(e){let r=e.parentNode;if(r==null)throw Error("Should never happen");return[r,Array.from(r.childNodes).indexOf(e)]}function N(e){let r={};e=e.split(";");for(let i of e)if(i!==""){let[t,o]=i.split(/:([^]+)/);r[t.trim()]=o.trim()}return r}function a(e){let r=_.get(e);return r===void 0&&(r=N(e),_.set(e,r)),r}function d(e){let r="";for(let i in e)i&&(r+=`${i}: ${e[i]};`);return r}function C(e,r){var i=a("getStyle"in e?e.getStyle():e.style);r=Object.entries(r).reduce((t,[o,u])=>(u===null?delete t[o]:t[o]=u,t),{...i}),i=d(r),e.setStyle(i),_.set(i,r)}function $(e){for(;e!==null&&!l.$isRootOrShadowRoot(e);){let r=e.getLatest(),i=e.getParent();r.getChildrenSize()===0&&e.remove(!0),e=i}}function v(e,r,i,t,o=null){if(r.length!==0){var u=r[0],x=new Map,p=[];u=l.$isElementNode(u)?u:u.getParentOrThrow(),u.isInline()&&(u=u.getParentOrThrow());for(var R=!1;u!==null;){var S=u.getPreviousSibling();if(S!==null){u=S,R=!0;break}if(u=u.getParentOrThrow(),l.$isRootOrShadowRoot(u))break}S=new Set;for(var k=0;k<i;k++){var I=r[k];l.$isElementNode(I)&&I.getChildrenSize()===0&&S.add(I.getKey())}var P=new Set;for(k=0;k<i;k++){I=r[k];var T=I.getParent();if(T!==null&&T.isInline()&&(T=T.getParent()),T!==null&&l.$isLeafNode(I)&&!P.has(I.getKey())){if(I=T.getKey(),x.get(I)===void 0){let c=t();c.setFormat(T.getFormatType()),c.setIndent(T.getIndent()),p.push(c),x.set(I,c),T.getChildren().forEach(f=>{c.append(f),P.add(f.getKey()),l.$isElementNode(f)&&f.getChildrenKeys().forEach(O=>P.add(O))}),$(T)}}else S.has(I.getKey())&&(T=t(),T.setFormat(I.getFormatType()),T.setIndent(I.getIndent()),p.push(T),I.remove(!0))}if(o!==null)for(r=0;r<p.length;r++)o.append(p[r]);if(r=null,l.$isRootOrShadowRoot(u))if(R)if(o!==null)u.insertAfter(o);else for(o=p.length-1;0<=o;o--)u.insertAfter(p[o]);else if(R=u.getFirstChild(),l.$isElementNode(R)&&(u=R),R===null)if(o)u.append(o);else for(o=0;o<p.length;o++)R=p[o],u.append(R),r=R;else if(o!==null)R.insertBefore(o);else for(u=0;u<p.length;u++)o=p[u],R.insertBefore(o),r=o;else if(o)u.insertAfter(o);else for(o=p.length-1;0<=o;o--)R=p[o],u.insertAfter(R),r=R;p=l.$getPreviousSelection(),l.$isRangeSelection(p)&&p.anchor.getNode().isAttached()&&p.focus.getNode().isAttached()?l.$setSelection(p.clone()):r!==null?r.selectEnd():e.dirty=!0}}function m(e,r,i,t){e.modify(r?"extend":"move",i,t)}function g(e){return e=e.anchor.getNode(),(l.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}return q.$addNodeStyle=function(e){e=e.getStyle();let r=N(e);_.set(e,r)},q.$cloneWithProperties=function(e){e=e.getLatest();let r=e.constructor.clone(e);return r.__parent=e.__parent,r.__next=e.__next,r.__prev=e.__prev,l.$isElementNode(e)&&l.$isElementNode(r)?(r.__first=e.__first,r.__last=e.__last,r.__size=e.__size,r.__format=e.__format,r.__indent=e.__indent,r.__dir=e.__dir,r):(l.$isTextNode(e)&&l.$isTextNode(r)&&(r.__format=e.__format,r.__style=e.__style,r.__mode=e.__mode,r.__detail=e.__detail),r)},q.$getSelectionStyleValueForProperty=function(e,r,i=""){let t=null,o=e.getNodes();var u=e.anchor,x=e.focus,p=e.isBackward();let R=p?x.offset:u.offset;if(u=p?x.getNode():u.getNode(),e.style!==""&&(e=a(e.style),e!==null&&r in e))return e[r];for(e=0;e<o.length;e++){var S=o[e];if((e===0||R!==0||!S.is(u))&&l.$isTextNode(S)){if(x=r,p=i,S=S.getStyle(),S=a(S),x=S!==null&&S[x]||p,t===null)t=x;else if(t!==x){t="";break}}}return t===null?i:t},q.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},q.$isParentElementRTL=g,q.$moveCaretSelection=m,q.$moveCharacter=function(e,r,i){let t=g(e);m(e,r,i?!t:t,"character")},q.$patchStyleText=function(e,r){var i=e.getNodes();let t=i.length-1,o=i[0],u=i[t];if(e.isCollapsed())C(e,r);else{var x=e.anchor,p=e.focus,R=o.getTextContent().length,S=p.offset,k=x.offset,I=x.isBefore(p),P=I?k:S;e=I?S:k;var T=I?x.type:p.type,c=I?p.type:x.type;if(x=I?p.key:x.key,l.$isTextNode(o)&&P===R&&(p=o.getNextSibling(),l.$isTextNode(p)&&(P=k=0,o=p)),i.length===1)l.$isTextNode(o)&&(P=T==="element"?0:k>S?S:k,e=c==="element"?R:k>S?k:S,P!==e&&(P===0&&e===R?(C(o,r),o.select(P,e)):(i=o.splitText(P,e),i=P===0?i[0]:i[1],C(i,r),i.select(0,e-P))));else for(l.$isTextNode(o)&&P<o.getTextContentSize()&&(P!==0&&(o=o.splitText(P)[1]),C(o,r)),l.$isTextNode(u)&&(P=u.getTextContent().length,u.__key!==x&&e!==0&&(e=P),e!==P&&([u]=u.splitText(e)),e!==0&&C(u,r)),e=1;e<t;e++)P=i[e],R=P.getKey(),l.$isTextNode(P)&&R!==o.getKey()&&R!==u.getKey()&&!P.isToken()&&C(P,r)}},q.$selectAll=function(e){let r=e.anchor;e=e.focus;var i=r.getNode().getTopLevelElementOrThrow().getParentOrThrow();let t=i.getFirstDescendant();i=i.getLastDescendant();let o="element",u="element",x=0;l.$isTextNode(t)?o="text":l.$isElementNode(t)||t===null||(t=t.getParentOrThrow()),l.$isTextNode(i)?(u="text",x=i.getTextContentSize()):l.$isElementNode(i)||i===null||(i=i.getParentOrThrow()),t&&i&&(r.set(t.getKey(),0,o),e.set(i.getKey(),x,u))},q.$setBlocksType=function(e,r){if(e.anchor.key==="root"){r=r();var i=l.$getRoot();(e=i.getFirstChild())?e.replace(r,!0):i.append(r)}else for(i=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),i.indexOf(e)===-1&&i.push(e),e.isInline()&&(e=e.getParentOrThrow(),i.indexOf(e)===-1&&i.push(e)),e=0;e<i.length;e++){let u=i[e];var t=u;if(!l.$isElementNode(t)||l.$isRootOrShadowRoot(t))t=!1;else{var o=t.getFirstChild();o=o===null||l.$isTextNode(o)||o.isInline(),t=!t.isInline()&&t.canBeEmpty()!==!1&&o}t&&(t=r(),t.setFormat(u.getFormatType()),t.setIndent(u.getIndent()),u.replace(t,!0))}},q.$shouldOverrideDefaultCharacterSelection=function(e,r){return e=l.$getAdjacentNode(e.focus,r),l.$isDecoratorNode(e)&&!e.isIsolated()||l.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()},q.$sliceSelectedTextNodeContent=function(e,r){if(r.isSelected()&&!r.isSegmented()&&!r.isToken()&&(l.$isRangeSelection(e)||l.DEPRECATED_$isGridSelection(e))){var i=e.anchor.getNode(),t=e.focus.getNode(),o=r.is(i),u=r.is(t);if(o||u){o=e.isBackward();let[x,p]=e.getCharacterOffsets();e=i.is(t),u=r.is(o?t:i),t=r.is(o?i:t),i=0;let R;e?(i=x>p?p:x,R=x>p?x:p):u?(i=o?p:x,R=void 0):t&&(o=o?x:p,i=0,R=o),r.__text=r.__text.slice(i,R)}}return r},q.$wrapNodes=function(e,r,i=null){var t=e.getNodes();let o=t.length;var u=e.anchor;if(o===0||o===1&&u.type==="element"&&u.getNode().getChildrenSize()===0){e=u.type==="text"?u.getNode().getParentOrThrow():u.getNode(),t=e.getChildren();let p=r();p.setFormat(e.getFormatType()),p.setIndent(e.getIndent()),t.forEach(R=>p.append(R)),i&&(p=i.append(p)),e.replace(p)}else{u=null;var x=[];for(let p=0;p<o;p++){let R=t[p];l.$isRootOrShadowRoot(R)?(v(e,x,x.length,r,i),x=[],u=R):u===null||u!==null&&l.$hasAncestor(R,u)?x.push(R):(v(e,x,x.length,r,i),x=[R])}v(e,x,x.length,r,i)}},q.createDOMRange=function(e,r,i,t,o){let u=r.getKey(),x=t.getKey(),p=document.createRange(),R=e.getElementByKey(u);if(e=e.getElementByKey(x),l.$isTextNode(r)&&(R=D(R)),l.$isTextNode(t)&&(e=D(e)),r===void 0||t===void 0||R===null||e===null)return null;R.nodeName==="BR"&&([R,i]=n(R)),e.nodeName==="BR"&&([e,o]=n(e)),r=R.firstChild,R===e&&r!=null&&r.nodeName==="BR"&&i===0&&o===0&&(o=1);try{p.setStart(R,i),p.setEnd(e,o)}catch{return null}return!p.collapsed||i===o&&u===x||(p.setStart(e,o),p.setEnd(R,i)),p},q.createRectsFromDOMRange=function(e,r){var i=e.getRootElement();if(i===null)return[];e=i.getBoundingClientRect(),i=getComputedStyle(i),i=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r=Array.from(r.getClientRects());let t=r.length,o;for(let u=0;u<t;u++){let x=r[u],p=x.width+i===e.width;o&&o.top===x.top&&o.left===x.left&&o.width===x.width&&o.height===x.height||p?(r.splice(u--,1),t--):o=x}return r},q.getStyleObjectFromCSS=a,q.trimTextContentFromAnchor=function(e,r,i){let t=r.getNode();if(l.$isElementNode(t)){var o=t.getDescendantByIndex(r.offset);o!==null&&(t=o)}for(;0<i&&t!==null;){var u=t.getPreviousSibling(),x=0;if(u===null){o=t.getParentOrThrow();for(var p=o.getPreviousSibling();p===null;){if(o=o.getParent(),o===null){u=null;break}p=o.getPreviousSibling()}o!==null&&(x=o.isInline()?0:2,u=l.$isElementNode(p)?p.getLastDescendant():p)}if(p=t.getTextContent(),p===""&&l.$isElementNode(t)&&!t.isInline()&&(p=`
1
+ import{r as V,g as St,a as A}from"./sentry-CsmEj6N0.js";import{r as K}from"./lexical-Q_iSNeyd.js";import{f as Mt}from"./core-Tp-f995F.js";import{y as Rt,af as Ot,ag as kt,n as At,k as Pt,ah as wt,ai as It}from"./index-CFHmKcgp.js";import{G as Ht,c as Ft,k as qt}from"./mui-B8_UdfTU.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},_=new l.Error().stack;_&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[_]="bece65a3-41ef-430f-aeab-fd7ceec93d77",l._sentryDebugIdIdentifier="sentry-dbid-bece65a3-41ef-430f-aeab-fd7ceec93d77")}catch{}})();var ne={},q={},qe;function Wt(){if(qe)return q;qe=1;var l=K();let _=new Map;function D(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function n(e){let r=e.parentNode;if(r==null)throw Error("Should never happen");return[r,Array.from(r.childNodes).indexOf(e)]}function N(e){let r={};e=e.split(";");for(let i of e)if(i!==""){let[t,o]=i.split(/:([^]+)/);r[t.trim()]=o.trim()}return r}function a(e){let r=_.get(e);return r===void 0&&(r=N(e),_.set(e,r)),r}function d(e){let r="";for(let i in e)i&&(r+=`${i}: ${e[i]};`);return r}function C(e,r){var i=a("getStyle"in e?e.getStyle():e.style);r=Object.entries(r).reduce((t,[o,u])=>(u===null?delete t[o]:t[o]=u,t),{...i}),i=d(r),e.setStyle(i),_.set(i,r)}function $(e){for(;e!==null&&!l.$isRootOrShadowRoot(e);){let r=e.getLatest(),i=e.getParent();r.getChildrenSize()===0&&e.remove(!0),e=i}}function v(e,r,i,t,o=null){if(r.length!==0){var u=r[0],x=new Map,p=[];u=l.$isElementNode(u)?u:u.getParentOrThrow(),u.isInline()&&(u=u.getParentOrThrow());for(var R=!1;u!==null;){var S=u.getPreviousSibling();if(S!==null){u=S,R=!0;break}if(u=u.getParentOrThrow(),l.$isRootOrShadowRoot(u))break}S=new Set;for(var k=0;k<i;k++){var I=r[k];l.$isElementNode(I)&&I.getChildrenSize()===0&&S.add(I.getKey())}var P=new Set;for(k=0;k<i;k++){I=r[k];var T=I.getParent();if(T!==null&&T.isInline()&&(T=T.getParent()),T!==null&&l.$isLeafNode(I)&&!P.has(I.getKey())){if(I=T.getKey(),x.get(I)===void 0){let c=t();c.setFormat(T.getFormatType()),c.setIndent(T.getIndent()),p.push(c),x.set(I,c),T.getChildren().forEach(f=>{c.append(f),P.add(f.getKey()),l.$isElementNode(f)&&f.getChildrenKeys().forEach(O=>P.add(O))}),$(T)}}else S.has(I.getKey())&&(T=t(),T.setFormat(I.getFormatType()),T.setIndent(I.getIndent()),p.push(T),I.remove(!0))}if(o!==null)for(r=0;r<p.length;r++)o.append(p[r]);if(r=null,l.$isRootOrShadowRoot(u))if(R)if(o!==null)u.insertAfter(o);else for(o=p.length-1;0<=o;o--)u.insertAfter(p[o]);else if(R=u.getFirstChild(),l.$isElementNode(R)&&(u=R),R===null)if(o)u.append(o);else for(o=0;o<p.length;o++)R=p[o],u.append(R),r=R;else if(o!==null)R.insertBefore(o);else for(u=0;u<p.length;u++)o=p[u],R.insertBefore(o),r=o;else if(o)u.insertAfter(o);else for(o=p.length-1;0<=o;o--)R=p[o],u.insertAfter(R),r=R;p=l.$getPreviousSelection(),l.$isRangeSelection(p)&&p.anchor.getNode().isAttached()&&p.focus.getNode().isAttached()?l.$setSelection(p.clone()):r!==null?r.selectEnd():e.dirty=!0}}function m(e,r,i,t){e.modify(r?"extend":"move",i,t)}function g(e){return e=e.anchor.getNode(),(l.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}return q.$addNodeStyle=function(e){e=e.getStyle();let r=N(e);_.set(e,r)},q.$cloneWithProperties=function(e){e=e.getLatest();let r=e.constructor.clone(e);return r.__parent=e.__parent,r.__next=e.__next,r.__prev=e.__prev,l.$isElementNode(e)&&l.$isElementNode(r)?(r.__first=e.__first,r.__last=e.__last,r.__size=e.__size,r.__format=e.__format,r.__indent=e.__indent,r.__dir=e.__dir,r):(l.$isTextNode(e)&&l.$isTextNode(r)&&(r.__format=e.__format,r.__style=e.__style,r.__mode=e.__mode,r.__detail=e.__detail),r)},q.$getSelectionStyleValueForProperty=function(e,r,i=""){let t=null,o=e.getNodes();var u=e.anchor,x=e.focus,p=e.isBackward();let R=p?x.offset:u.offset;if(u=p?x.getNode():u.getNode(),e.style!==""&&(e=a(e.style),e!==null&&r in e))return e[r];for(e=0;e<o.length;e++){var S=o[e];if((e===0||R!==0||!S.is(u))&&l.$isTextNode(S)){if(x=r,p=i,S=S.getStyle(),S=a(S),x=S!==null&&S[x]||p,t===null)t=x;else if(t!==x){t="";break}}}return t===null?i:t},q.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},q.$isParentElementRTL=g,q.$moveCaretSelection=m,q.$moveCharacter=function(e,r,i){let t=g(e);m(e,r,i?!t:t,"character")},q.$patchStyleText=function(e,r){var i=e.getNodes();let t=i.length-1,o=i[0],u=i[t];if(e.isCollapsed())C(e,r);else{var x=e.anchor,p=e.focus,R=o.getTextContent().length,S=p.offset,k=x.offset,I=x.isBefore(p),P=I?k:S;e=I?S:k;var T=I?x.type:p.type,c=I?p.type:x.type;if(x=I?p.key:x.key,l.$isTextNode(o)&&P===R&&(p=o.getNextSibling(),l.$isTextNode(p)&&(P=k=0,o=p)),i.length===1)l.$isTextNode(o)&&(P=T==="element"?0:k>S?S:k,e=c==="element"?R:k>S?k:S,P!==e&&(P===0&&e===R?(C(o,r),o.select(P,e)):(i=o.splitText(P,e),i=P===0?i[0]:i[1],C(i,r),i.select(0,e-P))));else for(l.$isTextNode(o)&&P<o.getTextContentSize()&&(P!==0&&(o=o.splitText(P)[1]),C(o,r)),l.$isTextNode(u)&&(P=u.getTextContent().length,u.__key!==x&&e!==0&&(e=P),e!==P&&([u]=u.splitText(e)),e!==0&&C(u,r)),e=1;e<t;e++)P=i[e],R=P.getKey(),l.$isTextNode(P)&&R!==o.getKey()&&R!==u.getKey()&&!P.isToken()&&C(P,r)}},q.$selectAll=function(e){let r=e.anchor;e=e.focus;var i=r.getNode().getTopLevelElementOrThrow().getParentOrThrow();let t=i.getFirstDescendant();i=i.getLastDescendant();let o="element",u="element",x=0;l.$isTextNode(t)?o="text":l.$isElementNode(t)||t===null||(t=t.getParentOrThrow()),l.$isTextNode(i)?(u="text",x=i.getTextContentSize()):l.$isElementNode(i)||i===null||(i=i.getParentOrThrow()),t&&i&&(r.set(t.getKey(),0,o),e.set(i.getKey(),x,u))},q.$setBlocksType=function(e,r){if(e.anchor.key==="root"){r=r();var i=l.$getRoot();(e=i.getFirstChild())?e.replace(r,!0):i.append(r)}else for(i=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),i.indexOf(e)===-1&&i.push(e),e.isInline()&&(e=e.getParentOrThrow(),i.indexOf(e)===-1&&i.push(e)),e=0;e<i.length;e++){let u=i[e];var t=u;if(!l.$isElementNode(t)||l.$isRootOrShadowRoot(t))t=!1;else{var o=t.getFirstChild();o=o===null||l.$isTextNode(o)||o.isInline(),t=!t.isInline()&&t.canBeEmpty()!==!1&&o}t&&(t=r(),t.setFormat(u.getFormatType()),t.setIndent(u.getIndent()),u.replace(t,!0))}},q.$shouldOverrideDefaultCharacterSelection=function(e,r){return e=l.$getAdjacentNode(e.focus,r),l.$isDecoratorNode(e)&&!e.isIsolated()||l.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()},q.$sliceSelectedTextNodeContent=function(e,r){if(r.isSelected()&&!r.isSegmented()&&!r.isToken()&&(l.$isRangeSelection(e)||l.DEPRECATED_$isGridSelection(e))){var i=e.anchor.getNode(),t=e.focus.getNode(),o=r.is(i),u=r.is(t);if(o||u){o=e.isBackward();let[x,p]=e.getCharacterOffsets();e=i.is(t),u=r.is(o?t:i),t=r.is(o?i:t),i=0;let R;e?(i=x>p?p:x,R=x>p?x:p):u?(i=o?p:x,R=void 0):t&&(o=o?x:p,i=0,R=o),r.__text=r.__text.slice(i,R)}}return r},q.$wrapNodes=function(e,r,i=null){var t=e.getNodes();let o=t.length;var u=e.anchor;if(o===0||o===1&&u.type==="element"&&u.getNode().getChildrenSize()===0){e=u.type==="text"?u.getNode().getParentOrThrow():u.getNode(),t=e.getChildren();let p=r();p.setFormat(e.getFormatType()),p.setIndent(e.getIndent()),t.forEach(R=>p.append(R)),i&&(p=i.append(p)),e.replace(p)}else{u=null;var x=[];for(let p=0;p<o;p++){let R=t[p];l.$isRootOrShadowRoot(R)?(v(e,x,x.length,r,i),x=[],u=R):u===null||u!==null&&l.$hasAncestor(R,u)?x.push(R):(v(e,x,x.length,r,i),x=[R])}v(e,x,x.length,r,i)}},q.createDOMRange=function(e,r,i,t,o){let u=r.getKey(),x=t.getKey(),p=document.createRange(),R=e.getElementByKey(u);if(e=e.getElementByKey(x),l.$isTextNode(r)&&(R=D(R)),l.$isTextNode(t)&&(e=D(e)),r===void 0||t===void 0||R===null||e===null)return null;R.nodeName==="BR"&&([R,i]=n(R)),e.nodeName==="BR"&&([e,o]=n(e)),r=R.firstChild,R===e&&r!=null&&r.nodeName==="BR"&&i===0&&o===0&&(o=1);try{p.setStart(R,i),p.setEnd(e,o)}catch{return null}return!p.collapsed||i===o&&u===x||(p.setStart(e,o),p.setEnd(R,i)),p},q.createRectsFromDOMRange=function(e,r){var i=e.getRootElement();if(i===null)return[];e=i.getBoundingClientRect(),i=getComputedStyle(i),i=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r=Array.from(r.getClientRects());let t=r.length,o;for(let u=0;u<t;u++){let x=r[u],p=x.width+i===e.width;o&&o.top===x.top&&o.left===x.left&&o.width===x.width&&o.height===x.height||p?(r.splice(u--,1),t--):o=x}return r},q.getStyleObjectFromCSS=a,q.trimTextContentFromAnchor=function(e,r,i){let t=r.getNode();if(l.$isElementNode(t)){var o=t.getDescendantByIndex(r.offset);o!==null&&(t=o)}for(;0<i&&t!==null;){var u=t.getPreviousSibling(),x=0;if(u===null){o=t.getParentOrThrow();for(var p=o.getPreviousSibling();p===null;){if(o=o.getParent(),o===null){u=null;break}p=o.getPreviousSibling()}o!==null&&(x=o.isInline()?0:2,u=l.$isElementNode(p)?p.getLastDescendant():p)}if(p=t.getTextContent(),p===""&&l.$isElementNode(t)&&!t.isInline()&&(p=`
2
2
 
3
3
  `),o=t.getTextContentSize(),!l.$isTextNode(t)||i>=o)p=t.getParent(),t.remove(),p==null||p.getChildrenSize()!==0||l.$isRootNode(p)||p.remove(),i-=o+x,t=u;else{let R=t.getKey();x=e.getEditorState().read(()=>{const k=l.$getNodeByKey(R);return l.$isTextNode(k)&&k.isSimpleText()?k.getTextContent():null}),u=o-i;let S=p.slice(0,u);x!==null&&x!==p?(i=l.$getPreviousSelection(),o=t,t.isSimpleText()?t.setTextContent(x):(o=l.$createTextNode(x),t.replace(o)),l.$isRangeSelection(i)&&i.isCollapsed()&&(i=i.anchor.offset,o.select(i,i))):t.isSimpleText()?(x=r.key===R,p=r.offset,p<i&&(p=o),i=x?p-i:0,o=x?p:u,x&&i===0?([i]=t.splitText(i,o),i.remove()):([,i]=t.splitText(i,o),i.remove())):(i=l.$createTextNode(S),t.replace(i)),i=0}}},q}var ae,We;function te(){return We||(We=1,ae=Wt()),ae}var Be;function Bt(){if(Be)return ne;Be=1;var l=te(),_=K();function D(a,d,C,$=null){let v=$!=null?d.isSelected():!0,m=_.$isElementNode(d)&&d.excludeFromCopy("html");var g=d;$!==null&&(g=l.$cloneWithProperties(d),g=_.$isTextNode(g)&&$!=null?l.$sliceSelectedTextNodeContent($,g):g);let e=_.$isElementNode(g)?g.getChildren():[],{element:r,after:i}=g.exportDOM(a);if(!r)return!1;let t=document.createDocumentFragment();for(let o=0;o<e.length;o++){let u=e[o],x=D(a,u,t,$);!v&&_.$isElementNode(d)&&x&&d.extractWithChild(u,$,"html")&&(v=!0)}return v&&!m?(r.append(t),C.append(r),i&&(a=i.call(g,r))&&r.replaceWith(a)):C.append(t),v}let n=new Set(["STYLE","SCRIPT"]);function N(a,d,C=new Map,$,v=!1){let m=[];if(n.has(a.nodeName))return m;let g=null;var{nodeName:e}=a,r=d._htmlConversions.get(e.toLowerCase());if(e=null,r!==void 0)for(i of r)r=i(a),r!==null&&(e===null||e.priority<r.priority)&&(e=r);var i=(i=e!==null?e.conversion:null)?i(a,void 0,v):null;if(e=null,i!==null){if(e=i.after,g=i.node,g!==null){for(var[,t]of C)if(g=t(g,$),!g)break;g&&m.push(g)}i.forChild!=null&&C.set(a.nodeName,i.forChild)}for(a=a.childNodes,$=[],t=0;t<a.length;t++)$.push(...N(a[t],d,new Map(C),g,v||(i&&i.preformatted)===!0));return e!=null&&($=e($)),g==null?m=m.concat($):_.$isElementNode(g)&&g.append(...$),m}return ne.$generateHtmlFromNodes=function(a,d){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let C=document.createElement("div"),$=_.$getRoot().getChildren();for(let v=0;v<$.length;v++)D(a,$[v],C,d);return C.innerHTML},ne.$generateNodesFromDOM=function(a,d){let C=[];d=d.body?d.body.childNodes:[];for(let v=0;v<d.length;v++){var $=d[v];n.has($.nodeName)||($=N($,a),$!==null&&(C=C.concat($)))}return C},ne}var ue,Ke;function $t(){return Ke||(Ke=1,ue=Bt()),ue}var Mr=$t(),z={},W={},je;function Kt(){if(je)return W;je=1;var l=te(),_=K();function D(a,d){for(let C of d)if(a.type.startsWith(C))return!0;return!1}function n(a,d){for(;a!==_.$getRoot()&&a!=null;){if(d(a))return a;a=a.getParent()}return null}function N(a){return a.nodeType===1}return W.$splitNode=_.$splitNode,W.$dfs=function(a,d){let C=[];a=(a||_.$getRoot()).getLatest(),d=d||(_.$isElementNode(a)?a.getLastDescendant():a);for(var $=a,v=0;($=$.getParent())!==null;)v++;for($=v;a!==null&&!a.is(d);)if(C.push({depth:$,node:a}),_.$isElementNode(a)&&0<a.getChildrenSize())a=a.getFirstChild(),$++;else for(v=null;v===null&&a!==null;)v=a.getNextSibling(),v===null?(a=a.getParent(),$--):a=v;return a!==null&&a.is(d)&&C.push({depth:$,node:a}),C},W.$findMatchingParent=n,W.$getNearestBlockElementAncestorOrThrow=function(a){if(a=n(a,d=>_.$isElementNode(d)&&!d.isInline()),!_.$isElementNode(a))throw Error("Minified Lexical error #4; visit https://lexical.dev/docs/error?code=4 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return a},W.$getNearestNodeOfType=function(a,d){for(;a!=null;){if(a instanceof d)return a;a=a.getParent()}return null},W.$insertNodeToNearestRoot=function(a){var d=_.$getSelection();if(_.$isRangeSelection(d)){var{focus:C}=d;if(d=C.getNode(),C=C.offset,_.$isRootOrShadowRoot(d))C=d.getChildAtIndex(C),C==null?d.append(a):C.insertBefore(a),a.selectNext();else{let $,v;_.$isTextNode(d)?($=d.getParentOrThrow(),v=d.getIndexWithinParent(),0<C&&(v+=1,d.splitText(C))):($=d,v=C),[,d]=_.$splitNode($,v),d.insertBefore(a),d.selectStart()}}else _.$isNodeSelection(d)||_.DEPRECATED_$isGridSelection(d)?(d=d.getNodes(),d[d.length-1].getTopLevelElementOrThrow().insertAfter(a)):_.$getRoot().append(a),d=_.$createParagraphNode(),a.insertAfter(d),d.select();return a.getLatest()},W.$restoreEditorState=function(a,d){let C=new Map,$=a._pendingEditorState;for(let[v,m]of d._nodeMap){let g=l.$cloneWithProperties(m);_.$isTextNode(g)&&(g.__text=m.__text),C.set(v,g)}$&&($._nodeMap=C),a._dirtyType=2,a=d._selection,_.$setSelection(a===null?null:a.clone())},W.$wrapNodeInElement=function(a,d){return d=d(),a.replace(d),d.append(a),d},W.addClassNamesToElement=function(a,...d){d.forEach(C=>{typeof C=="string"&&(C=C.split(" ").filter($=>$!==""),a.classList.add(...C))})},W.isHTMLAnchorElement=function(a){return N(a)&&a.tagName==="A"},W.isHTMLElement=N,W.isMimeType=D,W.mediaFileReader=function(a,d){let C=a[Symbol.iterator]();return new Promise(($,v)=>{let m=[],g=()=>{const{done:e,value:r}=C.next();if(e)return $(m);const i=new FileReader;i.addEventListener("error",v),i.addEventListener("load",()=>{const t=i.result;typeof t=="string"&&m.push({file:r,result:t}),g()}),D(r,d)?i.readAsDataURL(r):g()};g()})},W.mergeRegister=function(...a){return()=>{a.forEach(d=>d())}},W.registerNestedElementResolver=function(a,d,C,$){return a.registerNodeTransform(d,v=>{e:{for(var m=v.getChildren(),g=0;g<m.length;g++)if(m[g]instanceof d){m=null;break e}for(m=v;m!==null;)if(g=m,m=m.getParent(),m instanceof d){m={child:g,parent:m};break e}m=null}if(m!==null){const{child:e,parent:r}=m;if(e.is(v)){if($(r,v),v=e.getNextSiblings(),m=v.length,r.insertAfter(e),m!==0){g=C(r),e.insertAfter(g);for(let i=0;i<m;i++)g.append(v[i])}r.canBeEmpty()||r.getChildrenSize()!==0||r.remove()}}})},W.removeClassNamesFromElement=function(a,...d){d.forEach(C=>{typeof C=="string"&&a.classList.remove(...C.split(" "))})},W}var de,Ye;function X(){return Ye||(Ye=1,de=Kt()),de}var Ge;function jt(){if(Ge)return z;Ge=1;var l=X(),_=K();class D extends _.ElementNode{static getType(){return"link"}static clone(g){return new D(g.__url,{rel:g.__rel,target:g.__target,title:g.__title},g.__key)}constructor(g,e={},r){super(r);let{target:i=null,rel:t=null,title:o=null}=e;this.__url=g,this.__target=i,this.__rel=t,this.__title=o}createDOM(g){let e=document.createElement("a");return e.href=this.__url,this.__target!==null&&(e.target=this.__target),this.__rel!==null&&(e.rel=this.__rel),this.__title!==null&&(e.title=this.__title),l.addClassNamesToElement(e,g.theme.link),e}updateDOM(g,e){let r=this.__url,i=this.__target,t=this.__rel,o=this.__title;return r!==g.__url&&(e.href=r),i!==g.__target&&(i?e.target=i:e.removeAttribute("target")),t!==g.__rel&&(t?e.rel=t:e.removeAttribute("rel")),o!==g.__title&&(o?e.title=o:e.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:n,priority:1})}}static importJSON(g){let e=N(g.url,{rel:g.rel,target:g.target,title:g.title});return e.setFormat(g.format),e.setIndent(g.indent),e.setDirection(g.direction),e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(g){this.getWritable().__url=g}getTarget(){return this.getLatest().__target}setTarget(g){this.getWritable().__target=g}getRel(){return this.getLatest().__rel}setRel(g){this.getWritable().__rel=g}getTitle(){return this.getLatest().__title}setTitle(g){this.getWritable().__title=g}insertNewAfter(g,e=!0){return g=this.getParentOrThrow().insertNewAfter(g,e),_.$isElementNode(g)?(e=N(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),g.append(e),e):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(g,e){if(!_.$isRangeSelection(e))return!1;g=e.anchor.getNode();let r=e.focus.getNode();return this.isParentOf(g)&&this.isParentOf(r)&&0<e.getTextContent().length}}function n(m){let g=null;if(l.isHTMLAnchorElement(m)){let e=m.textContent;e!==null&&e!==""&&(g=N(m.getAttribute("href")||"",{rel:m.getAttribute("rel"),target:m.getAttribute("target"),title:m.getAttribute("title")}))}return{node:g}}function N(m,g){return _.$applyNodeReplacement(new D(m,g))}function a(m){return m instanceof D}class d extends D{static getType(){return"autolink"}static clone(g){return new d(g.__url,{rel:g.__rel,target:g.__target,title:g.__title},g.__key)}static importJSON(g){let e=C(g.url,{rel:g.rel,target:g.target,title:g.title});return e.setFormat(g.format),e.setIndent(g.indent),e.setDirection(g.direction),e}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(g,e=!0){return g=this.getParentOrThrow().insertNewAfter(g,e),_.$isElementNode(g)?(e=C(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),g.append(e),e):null}}function C(m,g){return _.$applyNodeReplacement(new d(m,g))}let $=_.createCommand("TOGGLE_LINK_COMMAND");function v(m,g){for(;m!==null&&(m=m.getParent())!==null&&!g(m););return m}return z.$createAutoLinkNode=C,z.$createLinkNode=N,z.$isAutoLinkNode=function(m){return m instanceof d},z.$isLinkNode=a,z.AutoLinkNode=d,z.LinkNode=D,z.TOGGLE_LINK_COMMAND=$,z.toggleLink=function(m,g={}){let{target:e,title:r}=g,i=g.rel===void 0?"noopener":g.rel;if(g=_.$getSelection(),_.$isRangeSelection(g))if(g=g.extract(),m===null)g.forEach(o=>{if(o=o.getParent(),a(o)){let u=o.getChildren();for(let x=0;x<u.length;x++)o.insertBefore(u[x]);o.remove()}});else{if(g.length===1){var t=g[0];if(t=a(t)?t:v(t,a),t!==null){t.setURL(m),e!==void 0&&t.setTarget(e),i!==null&&t.setRel(i),r!==void 0&&t.setTitle(r);return}}let o=null,u=null;g.forEach(x=>{var p=x.getParent();if(p!==u&&p!==null&&(!_.$isElementNode(x)||x.isInline()))if(a(p))u=p,p.setURL(m),e!==void 0&&p.setTarget(e),i!==null&&u.setRel(i),r!==void 0&&u.setTitle(r);else if(p.is(o)||(o=p,u=N(m,{rel:i,target:e}),a(p)?x.getPreviousSibling()===null?p.insertBefore(u):p.insertAfter(u):x.insertBefore(u)),a(x)){if(!x.is(u)){if(u!==null){p=x.getChildren();for(let R=0;R<p.length;R++)u.append(p[R])}x.remove()}}else u!==null&&u.append(x)})}},z}var ce,Ue;function Ie(){return Ue||(Ue=1,ce=jt()),ce}var Or=Ie(),B={},ze;function Yt(){if(ze)return B;ze=1;var l=K(),_=X();function D(L){throw Error(`Minified Lexical error #${L}; visit https://lexical.dev/docs/error?code=${L} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function n(L){let s=1;for(L=L.getParent();L!=null;){if(R(L)){if(L=L.getParent(),f(L)){s++,L=L.getParent();continue}D(40)}break}return s}function N(L){L=L.getParent(),f(L)||D(40);let s=L;for(;s!==null;)s=s.getParent(),f(s)&&(L=s);return L}function a(L){let s=[];L=L.getChildren().filter(R);for(let h=0;h<L.length;h++){let E=L[h],y=E.getFirstChild();f(y)?s=s.concat(a(y)):s.push(E)}return s}function d(L){return R(L)&&f(L.getFirstChild())}function C(L){for(;L.getNextSibling()==null&&L.getPreviousSibling()==null;){let s=L.getParent();if(s==null||!R(L)&&!f(L))break;L=s}L.remove()}function $(L){return p().append(L)}function v(L,s){return R(L)&&(s.length===0||s.length===1&&L.is(s[0])&&L.getChildrenSize()===0)}function m(L,s){L.splice(L.getChildrenSize(),0,s)}function g(L,s){if(f(L))return L;let h=L.getPreviousSibling(),E=L.getNextSibling(),y=p();return y.setFormat(L.getFormatType()),y.setIndent(L.getIndent()),m(y,L.getChildren()),f(h)&&s===h.getListType()?(h.append(y),L.remove(),f(E)&&s===E.getListType()&&(m(h,E.getChildren()),E.remove()),h):f(E)&&s===E.getListType()?(E.getFirstChildOrThrow().insertBefore(y),L.remove(),E):(s=c(s),s.append(y),L.replace(s),r(s),s)}function e(L,s){var h=L.getLastChild();let E=s.getFirstChild();h&&E&&d(h)&&d(E)&&(e(h.getFirstChild(),E.getFirstChild()),E.remove()),h=s.getChildren(),0<h.length&&(L.append(...h),r(L)),s.remove()}function r(L,s){if(L=s||L.getChildren(),L!==void 0)for(s=0;s<L.length;s++){let M=L[s];if(R(M)){let w=M.getValue();var h=M,E=h.getParent(),y=1;for(E!=null&&(f(E)?y=E.getStart():D(44)),h=h.getPreviousSiblings(),E=0;E<h.length;E++){let H=h[E];R(H)&&!f(H.getFirstChild())&&y++}w!==y&&M.setValue(y)}}}function i(L){if(!d(L)){var s=L.getParent(),h=s?s.getParent():void 0,E=h?h.getParent():void 0;if(f(E)&&R(h)&&f(s)){var y=s?s.getFirstChild():void 0,M=s?s.getLastChild():void 0;if(L.is(y))h.insertBefore(L),s.isEmpty()&&h.remove();else if(L.is(M))h.insertAfter(L),s.isEmpty()&&h.remove();else{var w=s.getListType();y=p();let H=c(w);y.append(H),L.getPreviousSiblings().forEach(re=>H.append(re)),M=p(),w=c(w),M.append(w),m(w,L.getNextSiblings()),h.insertBefore(y),h.insertAfter(M),h.replace(L)}r(s),r(E)}}}class t extends l.ElementNode{static getType(){return"listitem"}static clone(s){return new t(s.__value,s.__checked,s.__key)}constructor(s,h,E){super(E),this.__value=s===void 0?1:s,this.__checked=h}createDOM(s){let h=document.createElement("li"),E=this.getParent();return f(E)&&E.getListType()==="check"&&u(h,this,null),h.value=this.__value,o(h,s.theme,this),h}updateDOM(s,h,E){let y=this.getParent();return f(y)&&y.getListType()==="check"&&u(h,this,s),h.value=this.__value,o(h,E.theme,this),!1}static transform(){return s=>{let h=s.getParent();f(h)&&(r(h),h.getListType()!=="check"&&s.getChecked()!=null&&s.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:x,priority:0})}}static importJSON(s){let h=new t(s.value,s.checked);return h.setFormat(s.format),h.setDirection(s.direction),h}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...s){for(let h=0;h<s.length;h++){let E=s[h];if(l.$isElementNode(E)&&this.canMergeWith(E)){let y=E.getChildren();this.append(...y),E.remove()}else super.append(E)}return this}replace(s,h){if(R(s))return super.replace(s);this.setIndent(0);let E=this.getParentOrThrow();if(!f(E))return s;if(E.__first===this.getKey())E.insertBefore(s);else if(E.__last===this.getKey())E.insertAfter(s);else{let y=c(E.getListType()),M=this.getNextSibling();for(;M;){let w=M;M=M.getNextSibling(),y.append(w)}E.insertAfter(s),s.insertAfter(y)}return h&&this.getChildren().forEach(y=>{s.append(y)}),this.remove(),E.getChildrenSize()===0&&E.remove(),s}insertAfter(s,h=!0){var E=this.getParentOrThrow();f(E)||D(39);var y=this.getNextSiblings();if(R(s))return h=super.insertAfter(s,h),s=s.getParentOrThrow(),f(s)&&r(s),h;if(f(s)&&s.getListType()===E.getListType()){for(E=s,s=s.getChildren(),y=s.length-1;0<=y;y--)E=s[y],this.insertAfter(E,h);return E}if(E.insertAfter(s,h),y.length!==0){let M=c(E.getListType());y.forEach(w=>M.append(w)),s.insertAfter(M,h)}return s}remove(s){let h=this.getPreviousSibling(),E=this.getNextSibling();super.remove(s),h&&E&&d(h)&&d(E)?(e(h.getFirstChild(),E.getFirstChild()),E.remove()):E&&(s=E.getParent(),f(s)&&r(s))}insertNewAfter(s,h=!0){return s=p(this.__checked==null?void 0:!1),this.insertAfter(s,h),s}collapseAtStart(s){let h=l.$createParagraphNode();this.getChildren().forEach(w=>h.append(w));var E=this.getParentOrThrow(),y=E.getParentOrThrow();let M=R(y);return E.getChildrenSize()===1?M?(E.remove(),y.select()):(E.insertBefore(h),E.remove(),E=s.anchor,s=s.focus,y=h.getKey(),E.type==="element"&&E.getNode().is(this)&&E.set(y,E.offset,"element"),s.type==="element"&&s.getNode().is(this)&&s.set(y,s.offset,"element")):(E.insertBefore(h),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(s){this.getWritable().__value=s}getChecked(){return this.getLatest().__checked}setChecked(s){this.getWritable().__checked=s}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var s=this.getParent();if(s===null)return this.getLatest().__indent;s=s.getParentOrThrow();let h=0;for(;R(s);)s=s.getParentOrThrow().getParentOrThrow(),h++;return h}setIndent(s){typeof s=="number"&&-1<s||D(117);let h=this.getIndent();for(;h!==s;)if(h<s){e:{var E=new Set;if(d(this)||E.has(this.getKey()))break e;let H=this.getParent();var y=this.getNextSibling(),M=this.getPreviousSibling();if(d(y)&&d(M)){if(M=M.getFirstChild(),f(M)){M.append(this);var w=y.getFirstChild();f(w)&&(w=w.getChildren(),m(M,w),y.remove(),E.add(y.getKey())),r(M)}}else d(y)?(y=y.getFirstChild(),f(y)&&(E=y.getFirstChild(),E!==null&&E.insertBefore(this),r(y))):d(M)?(y=M.getFirstChild(),f(y)&&(y.append(this),r(y))):f(H)&&(E=p(),w=c(H.getListType()),E.append(w),w.append(this),M?M.insertAfter(E):y?y.insertBefore(E):H.append(E),r(w));f(H)&&r(H)}h++}else i(this),h--;return this}insertBefore(s){if(R(s)){let h=this.getParentOrThrow();if(f(h)){let E=this.getNextSiblings();r(h,E)}}return super.insertBefore(s)}canInsertAfter(s){return R(s)}canReplaceWith(s){return R(s)}canMergeWith(s){return l.$isParagraphNode(s)||R(s)}extractWithChild(s,h){if(!l.$isRangeSelection(h))return!1;s=h.anchor.getNode();let E=h.focus.getNode();return this.isParentOf(s)&&this.isParentOf(E)&&this.getTextContent().length===h.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return c("bullet")}}function o(L,s,h){let E=[],y=[];var M=(s=s.list)?s.listitem:void 0;if(s&&s.nested)var w=s.nested.listitem;if(M!==void 0&&(M=M.split(" "),E.push(...M)),s){M=h.getParent(),M=f(M)&&M.getListType()==="check";let H=h.getChecked();M&&!H||y.push(s.listitemUnchecked),M&&H||y.push(s.listitemChecked),M&&E.push(H?s.listitemChecked:s.listitemUnchecked)}w!==void 0&&(w=w.split(" "),h.getChildren().some(H=>f(H))?E.push(...w):y.push(...w)),0<y.length&&_.removeClassNamesFromElement(L,...y),0<E.length&&_.addClassNamesToElement(L,...E)}function u(L,s,h){f(s.getFirstChild())?(L.removeAttribute("role"),L.removeAttribute("tabIndex"),L.removeAttribute("aria-checked")):(L.setAttribute("role","checkbox"),L.setAttribute("tabIndex","-1"),h&&s.__checked===h.__checked||L.setAttribute("aria-checked",s.getChecked()?"true":"false"))}function x(L){return L=_.isHTMLElement(L)&&L.getAttribute("aria-checked")==="true",{node:p(L)}}function p(L){return l.$applyNodeReplacement(new t(void 0,L))}function R(L){return L instanceof t}class S extends l.ElementNode{static getType(){return"list"}static clone(s){return new S(s.__listType||T[s.__tag],s.__start,s.__key)}constructor(s,h,E){super(E),this.__listType=s=T[s]||s,this.__tag=s==="number"?"ol":"ul",this.__start=h}getTag(){return this.__tag}getListType(){return this.__listType}getStart(){return this.__start}createDOM(s){let h=document.createElement(this.__tag);return this.__start!==1&&h.setAttribute("start",String(this.__start)),h.__lexicalListType=this.__listType,k(h,s.theme,this),h}updateDOM(s,h,E){return s.__tag!==this.__tag?!0:(k(h,E.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:P,priority:0}),ul:()=>({conversion:P,priority:0})}}static importJSON(s){let h=c(s.listType,s.start);return h.setFormat(s.format),h.setIndent(s.indent),h.setDirection(s.direction),h}exportDOM(s){return{element:s}=super.exportDOM(s),s&&(this.__start!==1&&s.setAttribute("start",String(this.__start)),this.__listType==="check"&&s.setAttribute("__lexicalListType","check")),{element:s}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...s){for(let E=0;E<s.length;E++){var h=s[E];if(R(h))super.append(h);else{let y=p();f(h)||l.$isElementNode(h)&&(h=l.$createTextNode(h.getTextContent())),y.append(h),super.append(y)}}return r(this),this}extractWithChild(s){return R(s)}}function k(L,s,h){let E=[],y=[];var M=s.list;if(M!==void 0){let H=M[`${h.__tag}Depth`]||[];s=n(h)-1;let re=s%H.length;var w=H[re];let Fe=M[h.__tag],se;if(M=M.nested,M!==void 0&&M.list&&(se=M.list),Fe!==void 0&&E.push(Fe),w!==void 0)for(w=w.split(" "),E.push(...w),w=0;w<H.length;w++)w!==re&&y.push(h.__tag+w);se!==void 0&&(h=se.split(" "),1<s?E.push(...h):y.push(...h))}0<y.length&&_.removeClassNamesFromElement(L,...y),0<E.length&&_.addClassNamesToElement(L,...E)}function I(L){let s=[];for(let E=0;E<L.length;E++){var h=L[E];R(h)?(s.push(h),h=h.getChildren(),1<h.length&&h.forEach(y=>{f(y)&&s.push($(y))})):s.push($(h))}return s}function P(L){let s=L.nodeName.toLowerCase(),h=null;return s==="ol"?h=c("number",L.start):s==="ul"&&(h=_.isHTMLElement(L)&&L.getAttribute("__lexicallisttype")==="check"?c("check"):c("bullet")),{after:I,node:h}}let T={ol:"number",ul:"bullet"};function c(L,s=1){return l.$applyNodeReplacement(new S(L,s))}function f(L){return L instanceof S}let O=l.createCommand("INSERT_UNORDERED_LIST_COMMAND"),F=l.createCommand("INSERT_ORDERED_LIST_COMMAND"),j=l.createCommand("INSERT_CHECK_LIST_COMMAND"),G=l.createCommand("REMOVE_LIST_COMMAND");return B.$createListItemNode=p,B.$createListNode=c,B.$getListDepth=n,B.$handleListInsertParagraph=function(){var L=l.$getSelection();if(!l.$isRangeSelection(L)||!L.isCollapsed()||(L=L.anchor.getNode(),!R(L)||L.getTextContent()!==""))return!1;var s=N(L),h=L.getParent();f(h)||D(40);let E=h.getParent(),y;if(l.$isRootOrShadowRoot(E))y=l.$createParagraphNode(),s.insertAfter(y);else if(R(E))y=p(),E.insertAfter(y);else return!1;if(y.select(),s=L.getNextSiblings(),0<s.length){let M=c(h.getListType());l.$isParagraphNode(y)?y.insertAfter(M):(h=p(),h.append(M),y.insertAfter(h)),s.forEach(w=>{w.remove(),M.append(w)})}return C(L),!0},B.$isListItemNode=R,B.$isListNode=f,B.INSERT_CHECK_LIST_COMMAND=j,B.INSERT_ORDERED_LIST_COMMAND=F,B.INSERT_UNORDERED_LIST_COMMAND=O,B.ListItemNode=t,B.ListNode=S,B.REMOVE_LIST_COMMAND=G,B.insertList=function(L,s){L.update(()=>{var h=l.$getSelection();if(l.$isRangeSelection(h)||l.DEPRECATED_$isGridSelection(h)){var E=h.getNodes();h=h.anchor.getNode();var y=h.getParent();if(v(h,E))E=c(s),l.$isRootOrShadowRoot(y)?(h.replace(E),y=p(),l.$isElementNode(h)&&(y.setFormat(h.getFormatType()),y.setIndent(h.getIndent())),E.append(y)):R(h)&&(h=h.getParentOrThrow(),m(E,h.getChildren()),h.replace(E));else for(h=new Set,y=0;y<E.length;y++){var M=E[y];if(l.$isElementNode(M)&&M.isEmpty()&&!h.has(M.getKey()))g(M,s);else if(l.$isLeafNode(M))for(M=M.getParent();M!=null;){let H=M.getKey();if(f(M)){if(!h.has(H)){var w=c(s);m(w,M.getChildren()),M.replace(w),r(w),h.add(H)}break}else{if(w=M.getParent(),l.$isRootOrShadowRoot(w)&&!h.has(H)){h.add(H),g(M,s);break}M=w}}}}})},B.removeList=function(L){L.update(()=>{let s=l.$getSelection();if(l.$isRangeSelection(s)){var h=new Set,E=s.getNodes(),y=s.anchor.getNode();if(v(y,E))h.add(N(y));else for(y=0;y<E.length;y++){var M=E[y];l.$isLeafNode(M)&&(M=_.$getNearestNodeOfType(M,t),M!=null&&h.add(N(M)))}for(let w of h){h=w,E=a(w);for(let H of E)E=l.$createParagraphNode(),m(E,H.getChildren()),h.insertAfter(E),h=E,H.__key===s.anchor.key&&s.anchor.set(E.getKey(),0,"element"),H.__key===s.focus.key&&s.focus.set(E.getKey(),0,"element"),H.remove();w.remove()}}})},B}var ge,Je;function yt(){return Je||(Je=1,ge=Yt()),ge}var b=yt(),fe={},ee={},Ve;function Gt(){if(Ve)return ee;Ve=1;var l=V();let _=l.createContext(null);return ee.LexicalComposerContext=_,ee.createLexicalComposerContext=function(D,n){let N=null;return D!=null&&(N=D[1]),{getTheme:function(){return n??(N!=null?N.getTheme():null)}}},ee.useLexicalComposerContext=function(){let D=l.useContext(_);if(D==null)throw Error("Minified Lexical error #8; visit https://lexical.dev/docs/error?code=8 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return D},ee}var he,Xe;function Z(){return Xe||(Xe=1,he=Gt()),he}var Qe;function Ut(){if(Qe)return fe;Qe=1;var l=Z(),_=K(),D=V();let n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var N=n?D.useLayoutEffect:D.useEffect;let a={tag:"history-merge"};function d(C,$){if($!==null){if($===void 0)C.update(()=>{var v=_.$getRoot();if(v.isEmpty()){let m=_.$createParagraphNode();v.append(m),v=n?document.activeElement:null,(_.$getSelection()!==null||v!==null&&v===C.getRootElement())&&m.select()}},a);else if($!==null)switch(typeof $){case"string":let v=C.parseEditorState($);C.setEditorState(v,a);break;case"object":C.setEditorState($,a);break;case"function":C.update(()=>{_.$getRoot().isEmpty()&&$(C)},a)}}}return fe.LexicalComposer=function({initialConfig:C,children:$}){let v=D.useMemo(()=>{const{theme:m,namespace:g,editor__DEPRECATED:e,nodes:r,onError:i,editorState:t}=C,o=l.createLexicalComposerContext(null,m);let u=e||null;if(u===null){const x=_.createEditor({editable:C.editable,namespace:g,nodes:r,onError:p=>i(p,x),theme:m});d(x,t),u=x}return[u,o]},[]);return N(()=>{let m=C.editable,[g]=v;g.setEditable(m!==void 0?m:!0)},[]),D.createElement(l.LexicalComposerContext.Provider,{value:v},$)},fe}var pe,Ze;function zt(){return Ze||(Ze=1,pe=Ut()),pe}var kr=zt(),He=Z(),me={},be;function Jt(){if(be)return me;be=1;var l=Z(),_=V(),D=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_.useLayoutEffect:_.useEffect;return me.ContentEditable=function({ariaActiveDescendant:n,ariaAutoComplete:N,ariaControls:a,ariaDescribedBy:d,ariaExpanded:C,ariaLabel:$,ariaLabelledBy:v,ariaMultiline:m,ariaOwns:g,ariaRequired:e,autoCapitalize:r,className:i,id:t,role:o="textbox",spellCheck:u=!0,style:x,tabIndex:p,"data-testid":R}){let[S]=l.useLexicalComposerContext(),[k,I]=_.useState(!1),P=_.useCallback(T=>{S.setRootElement(T)},[S]);return D(()=>(I(S.isEditable()),S.registerEditableListener(T=>{I(T)})),[S]),_.createElement("div",{"aria-activedescendant":k?n:void 0,"aria-autocomplete":k?N:"none","aria-controls":k?a:void 0,"aria-describedby":d,"aria-expanded":k&&o==="combobox"?!!C:void 0,"aria-label":$,"aria-labelledby":v,"aria-multiline":m,"aria-owns":k?g:void 0,"aria-required":e,autoCapitalize:r,className:i,contentEditable:k,"data-testid":R,id:t,ref:P,role:k?o:void 0,spellCheck:u,style:x,tabIndex:p})},me}var _e,et;function Vt(){return et||(et=1,_e=Jt()),_e}var Ar=Vt(),Ce,tt;function Xt(){if(tt)return Ce;tt=1;var l=V();function _(d,C){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,v){return $.__proto__=v,$},_(d,C)}function D(d,C){d.prototype=Object.create(C.prototype),d.prototype.constructor=d,_(d,C)}function n(d,C){return d===void 0&&(d=[]),C===void 0&&(C=[]),d.length!==C.length||d.some(function($,v){return!Object.is($,C[v])})}var N={error:null},a=(function(d){function C(){for(var v,m=arguments.length,g=Array(m),e=0;e<m;e++)g[e]=arguments[e];return v=d.call.apply(d,[this].concat(g))||this,v.state=N,v.resetErrorBoundary=function(){for(var r,i=arguments.length,t=Array(i),o=0;o<i;o++)t[o]=arguments[o];v.props.onReset==null||(r=v.props).onReset.apply(r,t),v.reset()},v}D(C,d),C.getDerivedStateFromError=function(v){return{error:v}};var $=C.prototype;return $.reset=function(){this.setState(N)},$.componentDidCatch=function(v,m){var g,e;(g=(e=this.props).onError)==null||g.call(e,v,m)},$.componentDidUpdate=function(v,m){var g=this.props.resetKeys;if(this.state.error!==null&&m.error!==null&&n(v.resetKeys,g)){var e,r;(e=(r=this.props).onResetKeysChange)==null||e.call(r,v.resetKeys,g),this.reset()}},$.render=function(){var v=this.state.error,m=this.props,g=m.fallbackRender,e=m.FallbackComponent;if(m=m.fallback,v!==null){if(v={error:v,resetErrorBoundary:this.resetErrorBoundary},l.isValidElement(m))return m;if(typeof g=="function")return g(v);if(e)return l.createElement(e,v);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},C})(l.Component);return Ce=function({children:d,onError:C}){return l.createElement(a,{fallback:l.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:C},d)},Ce}var xe,rt;function Qt(){return rt||(rt=1,xe=Xt()),xe}var Zt=Qt();const Pr=St(Zt);var ie={},oe={},nt;function bt(){if(nt)return oe;nt=1;var l=X(),_=K();function D(N,a,d,C,$){if(N===null||d.size===0&&C.size===0&&!$)return 0;var v=a._selection,m=N._selection;if($)return 1;if(!(_.$isRangeSelection(v)&&_.$isRangeSelection(m)&&m.isCollapsed()&&v.isCollapsed()))return 0;$=a._nodeMap;let g=[];for(let e of d)d=$.get(e),d!==void 0&&g.push(d);for(let[e,r]of C)r&&(C=$.get(e),C===void 0||_.$isRootNode(C)||g.push(C));return g.length===0?0:1<g.length?(C=a._nodeMap,a=C.get(v.anchor.key),m=C.get(m.anchor.key),a&&m&&!N._nodeMap.has(a.__key)&&_.$isTextNode(a)&&a.__text.length===1&&v.anchor.offset===1?2:0):(a=g[0],N=N._nodeMap.get(a.__key),!_.$isTextNode(N)||!_.$isTextNode(a)||N.__mode!==a.__mode||(N=N.__text,a=a.__text,N===a)||(v=v.anchor,m=m.anchor,v.key!==m.key||v.type!=="text")?0:(v=v.offset,m=m.offset,N=a.length-N.length,N===1&&m===v-1?2:N===-1&&m===v+1?3:N===-1&&m===v?4:0))}function n(N,a){let d=Date.now(),C=0;return($,v,m,g,e,r)=>{let i=Date.now();if(r.has("historic"))return C=0,d=i,2;let t=D($,v,g,e,N.isComposing()),o=(()=>{var u=m===null||m.editor===N,x=r.has("history-push");if(!x&&u&&r.has("history-merge"))return 0;if($===null)return 1;var p=v._selection;if(!(0<g.size||0<e.size))return p!==null?0:2;if(x===!1&&t!==0&&t===C&&i<d+a&&u)return 0;if(g.size===1){{x=Array.from(g)[0],u=$._nodeMap.get(x),x=v._nodeMap.get(x),p=$._selection;let R=v._selection,S=!1;_.$isRangeSelection(p)&&_.$isRangeSelection(R)&&(S=p.anchor.type==="element"&&p.focus.type==="element"&&R.anchor.type==="text"&&R.focus.type==="text"),u=!S&&_.$isTextNode(u)&&_.$isTextNode(x)?u.__type===x.__type&&u.__text===x.__text&&u.__mode===x.__mode&&u.__detail===x.__detail&&u.__style===x.__style&&u.__format===x.__format&&u.__parent===x.__parent:!1}if(u)return 0}return 1})();return d=i,C=t,o}}return oe.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},oe.registerHistory=function(N,a,d){let C=n(N,d);d=({editorState:m,prevEditorState:g,dirtyLeaves:e,dirtyElements:r,tags:i})=>{const t=a.current,o=a.redoStack,u=a.undoStack,x=t===null?null:t.editorState;if(t===null||m!==x){if(e=C(g,m,t,e,r,i),e===1)o.length!==0&&(a.redoStack=[],N.dispatchCommand(_.CAN_REDO_COMMAND,!1)),t!==null&&(u.push({...t,undoSelection:g.read(_.$getSelection)}),N.dispatchCommand(_.CAN_UNDO_COMMAND,!0));else if(e===2)return;a.current={editor:N,editorState:m}}};let $=l.mergeRegister(N.registerCommand(_.UNDO_COMMAND,()=>{let m=a.redoStack,g=a.undoStack;if(g.length!==0){let e=a.current,r=g.pop();e!==null&&(m.push(e),N.dispatchCommand(_.CAN_REDO_COMMAND,!0)),g.length===0&&N.dispatchCommand(_.CAN_UNDO_COMMAND,!1),a.current=r||null,r&&r.editor.setEditorState(r.editorState.clone(r.undoSelection),{tag:"historic"})}return!0},_.COMMAND_PRIORITY_EDITOR),N.registerCommand(_.REDO_COMMAND,()=>{let m=a.redoStack;var g=a.undoStack;if(m.length!==0){let e=a.current;e!==null&&(g.push(e),N.dispatchCommand(_.CAN_UNDO_COMMAND,!0)),g=m.pop(),m.length===0&&N.dispatchCommand(_.CAN_REDO_COMMAND,!1),a.current=g||null,g&&g.editor.setEditorState(g.editorState,{tag:"historic"})}return!0},_.COMMAND_PRIORITY_EDITOR),N.registerCommand(_.CLEAR_EDITOR_COMMAND,()=>(a.undoStack=[],a.redoStack=[],a.current=null,!1),_.COMMAND_PRIORITY_EDITOR),N.registerCommand(_.CLEAR_HISTORY_COMMAND,()=>(a.undoStack=[],a.redoStack=[],a.current=null,N.dispatchCommand(_.CAN_REDO_COMMAND,!1),N.dispatchCommand(_.CAN_UNDO_COMMAND,!1),!0),_.COMMAND_PRIORITY_EDITOR),N.registerUpdateListener(d)),v=N.registerUpdateListener(d);return()=>{$(),v()}},oe}var Ee,it;function er(){return it||(it=1,Ee=bt()),Ee}var ot;function tr(){if(ot)return ie;ot=1;var l=Z(),_=er(),D=V();function n(N,a,d=1e3){let C=D.useMemo(()=>a||_.createEmptyHistoryState(),[a]);D.useEffect(()=>_.registerHistory(N,C,d),[d,N,C])}return ie.createEmptyHistoryState=_.createEmptyHistoryState,ie.HistoryPlugin=function({externalHistoryState:N}){let[a]=l.useLexicalComposerContext();return n(a,N),null},ie}var Ne,lt;function rr(){return lt||(lt=1,Ne=tr()),Ne}var wr=rr(),Le={},st;function nr(){if(st)return Le;st=1;var l=Ie(),_=Z(),D=X(),n=K(),N=V();return Le.LinkPlugin=function({validateUrl:a}){let[d]=_.useLexicalComposerContext();return N.useEffect(()=>{if(!d.hasNodes([l.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return D.mergeRegister(d.registerCommand(l.TOGGLE_LINK_COMMAND,C=>{if(C===null)return l.toggleLink(C),!0;if(typeof C=="string")return a===void 0||a(C)?(l.toggleLink(C),!0):!1;let{url:$,target:v,rel:m,title:g}=C;return l.toggleLink($,{rel:m,target:v,title:g}),!0},n.COMMAND_PRIORITY_LOW),a!==void 0?d.registerCommand(n.PASTE_COMMAND,C=>{let $=n.$getSelection();if(!n.$isRangeSelection($)||$.isCollapsed()||!(C instanceof ClipboardEvent)||C.clipboardData==null)return!1;let v=C.clipboardData.getData("text");return a(v)?$.getNodes().some(m=>n.$isElementNode(m))?!1:(d.dispatchCommand(l.TOGGLE_LINK_COMMAND,v),C.preventDefault(),!0):!1},n.COMMAND_PRIORITY_LOW):()=>{})},[d,a]),null},Le}var ve,at;function ir(){return at||(at=1,ve=nr()),ve}var Ir=ir(),Te={},ut;function or(){if(ut)return Te;ut=1;var l=yt(),_=Z(),D=V(),n=X(),N=K();function a(d){D.useEffect(()=>n.mergeRegister(d.registerCommand(l.INSERT_ORDERED_LIST_COMMAND,()=>(l.insertList(d,"number"),!0),N.COMMAND_PRIORITY_LOW),d.registerCommand(l.INSERT_UNORDERED_LIST_COMMAND,()=>(l.insertList(d,"bullet"),!0),N.COMMAND_PRIORITY_LOW),d.registerCommand(l.REMOVE_LIST_COMMAND,()=>(l.removeList(d),!0),N.COMMAND_PRIORITY_LOW),d.registerCommand(N.INSERT_PARAGRAPH_COMMAND,()=>!!l.$handleListInsertParagraph(),N.COMMAND_PRIORITY_LOW)),[d])}return Te.ListPlugin=function(){let[d]=_.useLexicalComposerContext();return D.useEffect(()=>{if(!d.hasNodes([l.ListNode,l.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[d]),a(d),null},Te}var Re,dt;function lr(){return dt||(dt=1,Re=or()),Re}var Hr=lr(),$e={},ye,ct;function sr(){if(ct)return ye;ct=1;var l=Z(),_=V(),D=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_.useLayoutEffect:_.useEffect;function n(a){let[d]=l.useLexicalComposerContext(),C=_.useMemo(()=>a(d),[d,a]),$=_.useRef(C.initialValueFn()),[v,m]=_.useState($.current);return D(()=>{let{initialValueFn:g,subscribe:e}=C,r=g();return $.current!==r&&($.current=r,m(r)),e(i=>{$.current=i,m(i)})},[C,a]),v}function N(a){return{initialValueFn:()=>a.isEditable(),subscribe:d=>a.registerEditableListener(d)}}return ye=function(){return n(N)},ye}var De,gt;function ar(){return gt||(gt=1,De=sr()),De}var Q={},ft;function ur(){if(ft)return Q;ft=1;var l=K();function _(N,a=!0){return N?!1:(N=D(),a&&(N=N.trim()),N==="")}function D(){return l.$getRoot().getTextContent()}function n(N){if(!_(N,!1))return!1;N=l.$getRoot().getChildren();let a=N.length;if(1<a)return!1;for(let C=0;C<a;C++){var d=N[C];if(l.$isDecoratorNode(d))return!1;if(l.$isElementNode(d)){if(!l.$isParagraphNode(d)||d.__indent!==0)return!1;d=d.getChildren();let $=d.length;for(let v=0;v<$;v++)if(!l.$isTextNode(d[C]))return!1}}return!0}return Q.$canShowPlaceholder=n,Q.$canShowPlaceholderCurry=function(N){return()=>n(N)},Q.$findTextIntersectionFromCharacters=function(N,a){var d=N.getFirstChild();N=0;e:for(;d!==null;){if(l.$isElementNode(d)){var C=d.getFirstChild();if(C!==null){d=C;continue}}else if(l.$isTextNode(d)){if(C=d.getTextContentSize(),N+C>a)return{node:d,offset:a-N};N+=C}if(C=d.getNextSibling(),C!==null)d=C;else{for(d=d.getParent();d!==null;){if(C=d.getNextSibling(),C!==null){d=C;continue e}d=d.getParent()}break}}return null},Q.$isRootTextContentEmpty=_,Q.$isRootTextContentEmptyCurry=function(N,a){return()=>_(N,a)},Q.$rootTextContent=D,Q.registerLexicalTextEntity=function(N,a,d,C){let $=m=>{const g=l.$createTextNode(m.getTextContent());g.setFormat(m.getFormat()),m.replace(g)},v=N.registerNodeTransform(l.TextNode,m=>{if(m.isSimpleText()){var g=m.getPreviousSibling(),e=m.getTextContent(),r=m;if(l.$isTextNode(g)){var i=g.getTextContent(),t=a(i+e);if(g instanceof d){if(t===null||g.getLatest().__mode!==0){$(g);return}if(t=t.end-i.length,0<t){r=e.slice(0,t),r=i+r,g.select(),g.setTextContent(r),t===e.length?m.remove():(g=e.slice(t),m.setTextContent(g));return}}else if(t===null||t.start<i.length)return}for(;;){if(m=a(e),e=t=m===null?"":e.slice(m.end),t===""){if(i=r.getNextSibling(),l.$isTextNode(i)){if(t=r.getTextContent()+i.getTextContent(),t=a(t),t===null){i instanceof d?$(i):i.markDirty();break}else if(t.start!==0)break}}else if(i=a(t),i!==null&&i.start===0)break;if(m===null)break;if(m.start===0&&l.$isTextNode(g)&&g.isTextEntity())continue;let o;if(m.start===0?[o,r]=r.splitText(m.end):[,o,r]=r.splitText(m.start,m.end),m=C(o),o.replace(m),r==null)break}}});return N=N.registerNodeTransform(d,m=>{var g=m.getTextContent();const e=a(g);e===null||e.start!==0?$(m):g.length>e.end?m.splitText(e.end):(g=m.getPreviousSibling(),l.$isTextNode(g)&&g.isTextEntity()&&($(g),$(m)),g=m.getNextSibling(),l.$isTextNode(g)&&g.isTextEntity()&&($(g),m instanceof d&&$(m)))}),[v,N]},Q}var Se,ht;function dr(){return ht||(ht=1,Se=ur()),Se}var Me={},pt;function cr(){if(pt)return Me;pt=1;var l=K();return Me.registerDragonSupport=function(_){let D=window.location.origin,n=N=>{if(N.origin===D){var a=_.getRootElement();if(document.activeElement===a&&(a=N.data,typeof a=="string")){try{var d=JSON.parse(a)}catch{return}if(d&&d.protocol==="nuanria_messaging"&&d.type==="request"&&(d=d.payload)&&d.functionId==="makeChanges"&&(d=d.args)){const[C,$,v,m,g]=d;_.update(()=>{const e=l.$getSelection();if(l.$isRangeSelection(e)){var r=e.anchor;let i=r.getNode(),t=0,o=0;l.$isTextNode(i)&&0<=C&&0<=$&&(t=C,o=C+$,e.setTextNodeRange(i,t,i,o)),(t!==o||v!=="")&&(e.insertRawText(v),i=r.getNode()),l.$isTextNode(i)&&(t=m,o=m+g,r=i.getTextContentSize(),t=t>r?r:t,o=o>r?r:o,e.setTextNodeRange(i,t,i,o)),N.stopImmediatePropagation()}})}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}},Me}var Oe,mt;function gr(){return mt||(mt=1,Oe=cr()),Oe}var U={},J={},_t;function fr(){if(_t)return J;_t=1;var l=$t(),_=te(),D=X(),n=K();function N(t){throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?code=${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function a(t){let o=n.$getSelection();if(o==null)throw Error("Expected valid LexicalSelection");return n.$isRangeSelection(o)&&o.isCollapsed()||o.getNodes().length===0?"":l.$generateHtmlFromNodes(t,o)}function d(t){let o=n.$getSelection();if(o==null)throw Error("Expected valid LexicalSelection");return n.$isRangeSelection(o)&&o.isCollapsed()||o.getNodes().length===0?null:JSON.stringify(g(t,o))}function C(t,o,u){(n.DEPRECATED_$isGridSelection(u)||D.$findMatchingParent(u.anchor.getNode(),x=>n.DEPRECATED_$isGridCellNode(x))!==null&&D.$findMatchingParent(u.focus.getNode(),x=>n.DEPRECATED_$isGridCellNode(x))!==null)&&o.length===1&&n.DEPRECATED_$isGridNode(o[0])?v(o,u,!1,t):$(o,u)}function $(t,o){let u=[],x=null;for(let p=0;p<t.length;p++){let R=t[p],S=n.$isLineBreakNode(R);if(S||n.$isDecoratorNode(R)&&R.isInline()||n.$isElementNode(R)&&R.isInline()||n.$isTextNode(R)||R.isParentRequired()){if(x===null&&(x=R.createParentElementNode(),u.push(x),S))continue;x!==null&&x.append(R)}else u.push(R),x=null}n.$isRangeSelection(o)?o.insertNodes(u):n.DEPRECATED_$isGridSelection(o)&&(t=o.anchor.getNode(),n.DEPRECATED_$isGridCellNode(t)||N(41),t.append(...u))}function v(t,o,u,x){t.length===1&&n.DEPRECATED_$isGridNode(t[0])||N(42);var p=t[0];t=p.getChildren(),u=p.getFirstChildOrThrow().getChildrenSize();var R=p.getChildrenSize(),S=D.$findMatchingParent(o.anchor.getNode(),O=>n.DEPRECATED_$isGridCellNode(O));o=(p=S&&D.$findMatchingParent(S,O=>n.DEPRECATED_$isGridRowNode(O)))&&D.$findMatchingParent(p,O=>n.DEPRECATED_$isGridNode(O)),n.DEPRECATED_$isGridCellNode(S)&&n.DEPRECATED_$isGridRowNode(p)&&n.DEPRECATED_$isGridNode(o)||N(43);var k=p.getIndexWithinParent(),I=Math.min(o.getChildrenSize()-1,k+R-1);R=S.getIndexWithinParent(),S=Math.min(p.getChildrenSize()-1,R+u-1),u=Math.min(R,S),p=Math.min(k,I),R=Math.max(R,S),k=Math.max(k,I),I=o.getChildren(),S=0;let P,T;for(let O=p;O<=k;O++){var c=I[O];n.DEPRECATED_$isGridRowNode(c)||N(24);var f=t[S];n.DEPRECATED_$isGridRowNode(f)||N(24),c=c.getChildren(),f=f.getChildren();let F=0;for(let j=u;j<=R;j++){let G=c[j];n.DEPRECATED_$isGridCellNode(G)||N(25);let L=f[F];n.DEPRECATED_$isGridCellNode(L)||N(25),O===p&&j===u?P=G.getKey():O===k&&j===R&&(T=G.getKey());let s=G.getChildren();L.getChildren().forEach(h=>{n.$isTextNode(h)&&n.$createParagraphNode().append(h),G.append(h)}),s.forEach(h=>h.remove()),F++}S++}P&&T&&(t=n.DEPRECATED_$createGridSelection(),t.set(o.getKey(),P,T),n.$setSelection(t),x.dispatchCommand(n.SELECTION_CHANGE_COMMAND,void 0))}function m(t,o,u,x=[]){let p=o!=null?u.isSelected(o):!0,R=n.$isElementNode(u)&&u.excludeFromCopy("html");var S=u;if(o!==null){var k=_.$cloneWithProperties(u);S=k=n.$isTextNode(k)&&o!=null?_.$sliceSelectedTextNodeContent(o,k):k}let I=n.$isElementNode(S)?S.getChildren():[];var P=S;k=P.exportJSON(),k.type!==P.constructor.getType()&&N(58);var T=k.children;for(n.$isElementNode(P)&&(Array.isArray(T)||N(59)),n.$isTextNode(S)&&(S=S.__text,0<S.length?k.text=S:p=!1),S=0;S<I.length;S++)P=I[S],T=m(t,o,P,k.children),!p&&n.$isElementNode(u)&&T&&u.extractWithChild(P,o,"clone")&&(p=!0);if(p&&!R)x.push(k);else if(Array.isArray(k.children))for(t=0;t<k.children.length;t++)x.push(k.children[t]);return p}function g(t,o){let u=[],x=n.$getRoot().getChildren();for(let p=0;p<x.length;p++)m(t,o,x[p],u);return{namespace:t._config.namespace,nodes:u}}function e(t){let o=[];for(let u=0;u<t.length;u++){let x=n.$parseSerializedNode(t[u]);n.$isTextNode(x)&&_.$addNodeStyle(x),o.push(x)}return o}let r=null;function i(t,o){var u=window.getSelection();if(!u)return!1;var x=u.anchorNode;if(u=u.focusNode,x!==null&&u!==null&&!n.isSelectionWithinEditor(t,x,u)||(o.preventDefault(),o=o.clipboardData,x=n.$getSelection(),o===null||x===null))return!1;u=a(t),t=d(t);let p="";return x!==null&&(p=x.getTextContent()),u!==null&&o.setData("text/html",u),t!==null&&o.setData("application/x-lexical-editor",t),o.setData("text/plain",p),!0}return J.$generateJSONFromSelectedNodes=g,J.$generateNodesFromSerializedNodes=e,J.$getHtmlContent=a,J.$getLexicalContent=d,J.$insertDataTransferForPlainText=function(t,o){t=t.getData("text/plain"),t!=null&&o.insertRawText(t)},J.$insertDataTransferForRichText=function(t,o,u){var x=t.getData("application/x-lexical-editor");if(x)try{let R=JSON.parse(x);if(R.namespace===u._config.namespace&&Array.isArray(R.nodes)){let S=e(R.nodes);return C(u,S,o)}}catch{}if(x=t.getData("text/html"))try{var p=new DOMParser().parseFromString(x,"text/html");let R=l.$generateNodesFromDOM(u,p);return C(u,R,o)}catch{}if(t=t.getData("text/plain"),t!=null)if(n.$isRangeSelection(o))for(t=t.split(/\r?\n/),u=t.length,p=0;p<u;p++)o.insertText(t[p]),p<u-1&&o.insertParagraph();else o.insertRawText(t)},J.$insertGeneratedNodes=C,J.copyToClipboard=async function(t,o){if(r!==null)return!1;if(o!==null)return new Promise(R=>{t.update(()=>{R(i(t,o))})});var u=t.getRootElement();let x=document.getSelection();if(u===null||x===null)return!1;let p=document.createElement("span");return p.style.cssText="position: fixed; top: -1000px;",p.append(document.createTextNode("#")),u.append(p),u=new Range,u.setStart(p,0),u.setEnd(p,1),x.removeAllRanges(),x.addRange(u),new Promise(R=>{let S=t.registerCommand(n.COPY_COMMAND,k=>(k instanceof ClipboardEvent&&(S(),r!==null&&(window.clearTimeout(r),r=null),R(i(t,k))),!0),n.COMMAND_PRIORITY_CRITICAL);r=window.setTimeout(()=>{S(),r=null,R(!1)},50),document.execCommand("copy"),p.remove()})},J}var ke,Ct;function hr(){return Ct||(Ct=1,ke=fr()),ke}var xt;function pr(){if(xt)return U;xt=1;var l=hr(),_=te(),D=X(),n=K();function N(T,c){return typeof document.caretRangeFromPoint<"u"?(T=document.caretRangeFromPoint(T,c),T===null?null:{node:T.startContainer,offset:T.startOffset}):document.caretPositionFromPoint!=="undefined"?(T=document.caretPositionFromPoint(T,c),T===null?null:{node:T.offsetNode,offset:T.offset}):null}let a=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",d=a&&"documentMode"in document?document.documentMode:null,C=a&&"InputEvent"in window&&!d?"getTargetRanges"in new window.InputEvent("input"):!1,$=a&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),v=a&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=a&&/^(?=.*Chrome).*/i.test(navigator.userAgent),g=a&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,e=n.createCommand("DRAG_DROP_PASTE_FILE");class r extends n.ElementNode{static getType(){return"quote"}static clone(c){return new r(c.__key)}constructor(c){super(c)}createDOM(c){let f=document.createElement("blockquote");return D.addClassNamesToElement(f,c.theme.quote),f}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:x,priority:0})}}static importJSON(c){let f=i();return f.setFormat(c.format),f.setIndent(c.indent),f.setDirection(c.direction),f}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(c,f){c=n.$createParagraphNode();let O=this.getDirection();return c.setDirection(O),this.insertAfter(c,f),c}collapseAtStart(){let c=n.$createParagraphNode();return this.getChildren().forEach(f=>c.append(f)),this.replace(c),!0}}function i(){return n.$applyNodeReplacement(new r)}class t extends n.ElementNode{static getType(){return"heading"}static clone(c){return new t(c.__tag,c.__key)}constructor(c,f){super(f),this.__tag=c}getTag(){return this.__tag}createDOM(c){let f=this.__tag,O=document.createElement(f);return c=c.theme.heading,c!==void 0&&D.addClassNamesToElement(O,c[f]),O}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:u,priority:0}),h2:()=>({conversion:u,priority:0}),h3:()=>({conversion:u,priority:0}),h4:()=>({conversion:u,priority:0}),h5:()=>({conversion:u,priority:0}),h6:()=>({conversion:u,priority:0}),p:c=>(c=c.firstChild,c!==null&&o(c)?{conversion:()=>({node:null}),priority:3}:null),span:c=>o(c)?{conversion:()=>({node:p("h1")}),priority:3}:null}}static importJSON(c){let f=p(c.tag);return f.setFormat(c.format),f.setIndent(c.indent),f.setDirection(c.direction),f}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(c,f=!0){c=c?c.anchor.offset:0,c=0<c&&c<this.getTextContentSize()?p(this.getTag()):n.$createParagraphNode();let O=this.getDirection();return c.setDirection(O),this.insertAfter(c,f),c}collapseAtStart(){let c=this.isEmpty()?n.$createParagraphNode():p(this.getTag());return this.getChildren().forEach(f=>c.append(f)),this.replace(c),!0}extractWithChild(){return!0}}function o(T){return T.nodeName.toLowerCase()==="span"?T.style.fontSize==="26pt":!1}function u(T){T=T.nodeName.toLowerCase();let c=null;return(T==="h1"||T==="h2"||T==="h3"||T==="h4"||T==="h5"||T==="h6")&&(c=p(T)),{node:c}}function x(){return{node:i()}}function p(T){return n.$applyNodeReplacement(new t(T))}function R(T,c){T.preventDefault(),c.update(()=>{let f=n.$getSelection(),O=T instanceof InputEvent||T instanceof KeyboardEvent?null:T.clipboardData;O!=null&&(n.$isRangeSelection(f)||n.DEPRECATED_$isGridSelection(f))&&l.$insertDataTransferForRichText(O,f,c)},{tag:"paste"})}async function S(T,c){await l.copyToClipboard(c,T instanceof ClipboardEvent?T:null),c.update(()=>{let f=n.$getSelection();n.$isRangeSelection(f)?f.removeText():n.$isNodeSelection(f)&&f.getNodes().forEach(O=>O.remove())})}function k(T){let c=null;if(T instanceof DragEvent?c=T.dataTransfer:T instanceof ClipboardEvent&&(c=T.clipboardData),c===null)return[!1,[],!1];var f=c.types;return T=f.includes("Files"),f=f.includes("text/html")||f.includes("text/plain"),[T,Array.from(c.files),f]}function I(T,c){var f=n.$getSelection();if(n.$isRangeSelection(f)){var O=new Set;f=f.getNodes();for(let F=0;F<f.length;F++){let j=f[F],G=j.getKey();if(O.has(G))continue;let L=D.$getNearestBlockElementAncestorOrThrow(j),s=L.getKey();L.canInsertTab()?(T(j),O.add(G)):L.canIndent()&&!O.has(s)&&(O.add(s),c(L))}}}function P(T){return T=n.$getNearestNodeFromDOMNode(T),n.$isDecoratorNode(T)}return U.$createHeadingNode=p,U.$createQuoteNode=i,U.$isHeadingNode=function(T){return T instanceof t},U.$isQuoteNode=function(T){return T instanceof r},U.DRAG_DROP_PASTE=e,U.HeadingNode=t,U.QuoteNode=r,U.eventFiles=k,U.registerRichText=function(T){return D.mergeRegister(T.registerCommand(n.CLICK_COMMAND,()=>{const c=n.$getSelection();return n.$isNodeSelection(c)?(c.clear(),!0):!1},0),T.registerCommand(n.DELETE_CHARACTER_COMMAND,c=>{const f=n.$getSelection();return n.$isRangeSelection(f)?(f.deleteCharacter(c),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.DELETE_WORD_COMMAND,c=>{const f=n.$getSelection();return n.$isRangeSelection(f)?(f.deleteWord(c),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.DELETE_LINE_COMMAND,c=>{const f=n.$getSelection();return n.$isRangeSelection(f)?(f.deleteLine(c),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.CONTROLLED_TEXT_INSERTION_COMMAND,c=>{const f=n.$getSelection();if(typeof c=="string")n.$isRangeSelection(f)?f.insertText(c):n.DEPRECATED_$isGridSelection(f);else{if(!n.$isRangeSelection(f)&&!n.DEPRECATED_$isGridSelection(f))return!1;const O=c.dataTransfer;O!=null?l.$insertDataTransferForRichText(O,f,T):n.$isRangeSelection(f)&&(c=c.data)&&f.insertText(c)}return!0},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.REMOVE_TEXT_COMMAND,()=>{const c=n.$getSelection();return n.$isRangeSelection(c)?(c.removeText(),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.FORMAT_TEXT_COMMAND,c=>{const f=n.$getSelection();return n.$isRangeSelection(f)?(f.formatText(c),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.FORMAT_ELEMENT_COMMAND,c=>{var f=n.$getSelection();if(!n.$isRangeSelection(f)&&!n.$isNodeSelection(f))return!1;f=f.getNodes();for(const O of f)D.$getNearestBlockElementAncestorOrThrow(O).setFormat(c);return!0},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.INSERT_LINE_BREAK_COMMAND,c=>{const f=n.$getSelection();return n.$isRangeSelection(f)?(f.insertLineBreak(c),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.INSERT_PARAGRAPH_COMMAND,()=>{const c=n.$getSelection();return n.$isRangeSelection(c)?(c.insertParagraph(),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.INDENT_CONTENT_COMMAND,()=>(I(()=>{T.dispatchCommand(n.CONTROLLED_TEXT_INSERTION_COMMAND," ")},c=>{const f=c.getIndent();f!==10&&c.setIndent(f+1)}),!0),n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>(I(c=>{n.$isTextNode(c)&&(c=c.getTextContent(),c[c.length-1]===" "&&T.dispatchCommand(n.DELETE_CHARACTER_COMMAND,!0))},c=>{const f=c.getIndent();f!==0&&c.setIndent(f-1)}),!0),n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ARROW_UP_COMMAND,c=>{var f=n.$getSelection();if(n.$isNodeSelection(f)&&!P(c.target)){if(c=f.getNodes(),0<c.length)return c[0].selectPrevious(),!0}else if(n.$isRangeSelection(f)){if(f=n.$getAdjacentNode(f.focus,!0),n.$isDecoratorNode(f)&&!f.isIsolated()&&!f.isInline())return f.selectPrevious(),c.preventDefault(),!0;if(n.$isElementNode(f)&&!f.isInline()&&!f.canBeEmpty())return f.select(),c.preventDefault(),!0}return!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ARROW_DOWN_COMMAND,c=>{var f=n.$getSelection();if(n.$isNodeSelection(f)){if(c=f.getNodes(),0<c.length)return c[0].selectNext(0,0),!0}else if(n.$isRangeSelection(f)){let O=f.focus;if(O.key==="root"&&O.offset===n.$getRoot().getChildrenSize())return c.preventDefault(),!0;if(f=n.$getAdjacentNode(f.focus,!1),n.$isDecoratorNode(f)&&!f.isIsolated()&&!f.isInline())return f.selectNext(),c.preventDefault(),!0}return!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ARROW_LEFT_COMMAND,c=>{const f=n.$getSelection();if(n.$isNodeSelection(f)){var O=f.getNodes();if(0<O.length)return c.preventDefault(),O[0].selectPrevious(),!0}return n.$isRangeSelection(f)&&_.$shouldOverrideDefaultCharacterSelection(f,!0)?(O=c.shiftKey,c.preventDefault(),_.$moveCharacter(f,O,!0),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ARROW_RIGHT_COMMAND,c=>{const f=n.$getSelection();if(n.$isNodeSelection(f)&&!P(c.target)){var O=f.getNodes();if(0<O.length)return c.preventDefault(),O[0].selectNext(0,0),!0}return n.$isRangeSelection(f)?(O=c.shiftKey,_.$shouldOverrideDefaultCharacterSelection(f,!1)?(c.preventDefault(),_.$moveCharacter(f,O,!1),!0):!1):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_BACKSPACE_COMMAND,c=>{if(P(c.target))return!1;const f=n.$getSelection();if(!n.$isRangeSelection(f))return!1;c.preventDefault(),{anchor:c}=f;const O=c.getNode();return f.isCollapsed()&&c.offset===0&&!n.$isRootNode(O)&&0<D.$getNearestBlockElementAncestorOrThrow(O).getIndent()?T.dispatchCommand(n.OUTDENT_CONTENT_COMMAND,void 0):T.dispatchCommand(n.DELETE_CHARACTER_COMMAND,!0)},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_DELETE_COMMAND,c=>{if(P(c.target))return!1;const f=n.$getSelection();return n.$isRangeSelection(f)?(c.preventDefault(),T.dispatchCommand(n.DELETE_CHARACTER_COMMAND,!1)):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ENTER_COMMAND,c=>{const f=n.$getSelection();if(!n.$isRangeSelection(f))return!1;if(c!==null){if((v||$||g)&&C)return!1;if(c.preventDefault(),c.shiftKey)return T.dispatchCommand(n.INSERT_LINE_BREAK_COMMAND,!1)}return T.dispatchCommand(n.INSERT_PARAGRAPH_COMMAND,void 0)},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.KEY_ESCAPE_COMMAND,()=>{const c=n.$getSelection();return n.$isRangeSelection(c)?(T.blur(),!0):!1},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.DROP_COMMAND,c=>{const[,f]=k(c);if(0<f.length){var O=N(c.clientX,c.clientY);if(O!==null){const{offset:j,node:G}=O;var F=n.$getNearestNodeFromDOMNode(G);if(F!==null){if(O=n.$createRangeSelection(),n.$isTextNode(F))O.anchor.set(F.getKey(),j,"text"),O.focus.set(F.getKey(),j,"text");else{const L=F.getParentOrThrow().getKey();F=F.getIndexWithinParent()+1,O.anchor.set(L,F,"element"),O.focus.set(L,F,"element")}O=n.$normalizeSelection__EXPERIMENTAL(O),n.$setSelection(O)}T.dispatchCommand(e,f)}return c.preventDefault(),!0}return c=n.$getSelection(),!!n.$isRangeSelection(c)},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.DRAGSTART_COMMAND,c=>{[c]=k(c);const f=n.$getSelection();return!(c&&!n.$isRangeSelection(f))},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.DRAGOVER_COMMAND,c=>{var[f]=k(c);const O=n.$getSelection();return f&&!n.$isRangeSelection(O)?!1:(f=N(c.clientX,c.clientY),f!==null&&(f=n.$getNearestNodeFromDOMNode(f.node),n.$isDecoratorNode(f)&&c.preventDefault()),!0)},n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.COPY_COMMAND,c=>(l.copyToClipboard(T,c instanceof ClipboardEvent?c:null),!0),n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.CUT_COMMAND,c=>(S(c,T),!0),n.COMMAND_PRIORITY_EDITOR),T.registerCommand(n.PASTE_COMMAND,c=>{const[,f,O]=k(c);if(0<f.length&&!O)return T.dispatchCommand(e,f),!0;if(n.isSelectionCapturedInDecoratorInput(c.target))return!1;const F=n.$getSelection();return n.$isRangeSelection(F)||n.DEPRECATED_$isGridSelection(F)?(R(c,T),!0):!1},n.COMMAND_PRIORITY_EDITOR))},U}var Ae,Et;function Dt(){return Et||(Et=1,Ae=pr()),Ae}var Nt;function mr(){if(Nt)return $e;Nt=1;var l=Z(),_=ar(),D=V(),n=dr(),N=X(),a=Mt(),d=gr(),C=Dt(),$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?D.useLayoutEffect:D.useEffect;function v(i){return i.getEditorState().read(n.$canShowPlaceholderCurry(i.isComposing()))}function m(i){let[t,o]=D.useState(()=>v(i));return $(()=>{function u(){let x=v(i);o(x)}return u(),N.mergeRegister(i.registerUpdateListener(()=>{u()}),i.registerEditableListener(()=>{u()}))},[i]),t}function g(i,t){let[o,u]=D.useState(()=>i.getDecorators());return $(()=>i.registerDecoratorListener(x=>{a.flushSync(()=>{u(x)})}),[i]),D.useEffect(()=>{u(i.getDecorators())},[i]),D.useMemo(()=>{let x=[],p=Object.keys(o);for(let S=0;S<p.length;S++){var R=p[S];let k=D.createElement(t,{onError:I=>i._onError(I)},D.createElement(D.Suspense,{fallback:null},o[R]));R=i.getElementByKey(R),R!==null&&x.push(a.createPortal(k,R))}return x},[t,o,i])}function e(i){$(()=>N.mergeRegister(C.registerRichText(i),d.registerDragonSupport(i)),[i])}function r({content:i}){var[t]=l.useLexicalComposerContext();t=m(t);let o=_();return t?typeof i=="function"?i(o):i:null}return $e.RichTextPlugin=function({contentEditable:i,placeholder:t,ErrorBoundary:o}){let[u]=l.useLexicalComposerContext();return o=g(u,o),e(u),D.createElement(D.Fragment,null,i,D.createElement(r,{content:t}),o)},$e}var Pe,Lt;function _r(){return Lt||(Lt=1,Pe=mr()),Pe}var Fr=_r(),qr=Dt(),Wr=te(),Br=X(),Y=K(),le={},vt;function Cr(){if(vt)return le;vt=1;var l=Ie(),_=Z(),D=X(),n=K(),N=V();function a(e,r){for(let i=0;i<r.length;i++){let t=r[i](e);if(t)return t}return null}let d=/[.,;\s]/;function C(e){e=e.getPreviousSibling(),n.$isElementNode(e)&&(e=e.getLastDescendant());var r;return!(r=e===null||n.$isLineBreakNode(e))&&(r=n.$isTextNode(e))&&(e=e.getTextContent(),r=d.test(e[e.length-1])),r}function $(e){return e=e.getNextSibling(),n.$isElementNode(e)&&(e=e.getFirstDescendant()),e===null||n.$isLineBreakNode(e)||n.$isTextNode(e)&&d.test(e.getTextContent()[0])}function v(e,r,i){var t=e.getChildren();let o=t.length;for(let u=0;u<o;u++){let x=t[u];if(!n.$isTextNode(x)||!x.isSimpleText()){m(e),i(null,e.getURL());return}}t=e.getTextContent(),r=a(t,r),r===null||r.text!==t?(m(e),i(null,e.getURL())):C(e)&&$(e)?(t=e.getURL(),t!==r.url&&(e.setURL(r.url),i(r.url,t)),r.attributes&&(t=e.getRel(),t!==r.attributes.rel&&(e.setRel(r.attributes.rel||null),i(r.attributes.rel||null,t)),t=e.getTarget(),t!==r.attributes.target&&(e.setTarget(r.attributes.target||null),i(r.attributes.target||null,t)))):(m(e),i(null,e.getURL()))}function m(e){let r=e.getChildren();var i=r.length;for(--i;0<=i;i--)e.insertAfter(r[i]);return e.remove(),r.map(t=>t.getLatest())}function g(e,r,i){N.useEffect(()=>{if(!e.hasNodes([l.AutoLinkNode]))throw Error("Minified Lexical error #77; visit https://lexical.dev/docs/error?code=77 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");let t=(o,u)=>{i&&i(o,u)};return D.mergeRegister(e.registerNodeTransform(n.TextNode,o=>{var u=o.getParentOrThrow(),x=o.getPreviousSibling();if(l.$isAutoLinkNode(u))v(u,r,t);else if(!l.$isLinkNode(u)){if(o.isSimpleText()&&(d.test(o.getTextContent()[0])||!l.$isAutoLinkNode(x))){x=u=o.getTextContent();let T=0,c=o;for(var p;(p=a(x,r))&&p!==null;){let f=p.index,O=p.length,F=f+O;var R=T+f,S=T+F,k=u,I=o;if((0<R?d.test(k[R-1]):C(I))&&(S<k.length?d.test(k[S]):$(I))){var P=void 0;T+f===0?[P,c]=c.splitText(T+O):[,P,c]=c.splitText(T+f,T+f+O),R=l.$createAutoLinkNode(p.url,p.attributes),S=n.$createTextNode(p.text),S.setFormat(P.getFormat()),S.setDetail(P.getDetail()),R.append(S),P.replace(R),i&&i(p.url,null),T=0}else T+=F;x=x.substring(F)}}u=o.getPreviousSibling(),p=o.getNextSibling(),P=o.getTextContent(),l.$isAutoLinkNode(u)&&!d.test(P[0])&&(u.append(o),v(u,r,t),o=u.getURL(),i&&i(null,o)),l.$isAutoLinkNode(p)&&!d.test(P[P.length-1])&&(m(p),v(p,r,t),o=p.getURL(),i&&i(null,o))}}))},[e,r,i])}return le.AutoLinkPlugin=function({matchers:e,onChange:r}){let[i]=_.useLexicalComposerContext();return g(i,e,r),null},le.createLinkMatcherWithRegExp=function(e,r=i=>i){return i=>{let t=e.exec(i);return t===null?null:{index:t.index,length:t[0].length,text:t[0],url:r(i)}}},le}var we,Tt;function xr(){return Tt||(Tt=1,we=Cr()),we}var Er=xr();const Nr=qt`
4
4
  from {