@nebula.js/sn-text 1.3.3 → 1.3.4

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,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-text v1.3.3
2
+ * @nebula.js/sn-text v1.3.4
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,n,r,o,i,a,l,s,u,c,d,p,f,h,m,g,v,b,y,x,_,E,C,S,w,k,T;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useElement,o=e.useStaleLayout,i=e.useModel,a=e.useInteractionState,l=e.useEmitter,s=e.useTranslator,u=e.useState,c=e.useTheme,d=e.usePromise,p=e.useImperativeHandle},function(e){f=e.default,h=e},function(e){m=e.createContext,g=e.default,v=e,b=e.forwardRef,y=e.useContext,x=e.isValidElement,_=e.cloneElement,E=e.Children,C=e.useState,S=e.useEffect,w=e.useRef,k=e.useCallback,T=e.useMemo}],execute:function(){e("default",(function(e){const t=new WC,{flags:f}=e,h=[];return{qae:{properties:A,data:N(t)},component(){const e=r(),m=P(e),g=o(),v=i(),b=a(),y=l(),x=s(),[_,E]=u(!1),[C,S]=u(void 0),[w,k]=u(1),T=c(),[A,N]=u(!1),[R,M]=u(null);d((()=>new Promise((e=>{var t;const n={id:null==g||null===(t=g.qInfo)||void 0===t?void 0:t.qId,resolve:e};h.push(n)}))),[]);const L=e=>{e||k(0),uE(g)||(!0===e&&N(!0),E(e),y.emit("njs-internal-edit-change",e))};n((()=>{const e=e=>{!async function(e,t){!async function(e,t){try{if(e&&t){const n=t(await e.getProperties());await e.setProperties(n)}}catch(e){console.error(e)}}(e,(e=>{const{qHyperCubeDef:n}=e;if(n){var r;const e=null===(r=n.qMeasures)||void 0===r?void 0:r.filter((e=>!(null==t?void 0:t.find((t=>{var n;return t===(null==e||null===(n=e.qDef)||void 0===n?void 0:n.cId)})))));n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}}))}(v,e)};return y.on("onNodeDestroyed",e),()=>{y.removeListener("onNodeDestroyed",e)}}),[y,v]),n((()=>{2===w&&b.edit&&b.select&&L(!0)}),[w,b]),n((()=>{g&&void 0===C&&(S(g.text||null),M(null==g?void 0:g.text))}),[g,C]),n((()=>{const n=()=>{b.edit&&b.select&&k((e=>e+1))},r=t=>{const n=document.getElementById($C(v));e.contains(t.target)||null!=n&&n.contains(t.target)||(e=>{const t=document.getElementsByClassName("tekPopperMenu"),n=document.getElementById("tekTableMenu");if(null!=n&&n.contains(e))return!0;for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0;return!1})(t.target)||L(!1)};if(!b.edit||!b.select){var o;L(!1);const e=(null==v?void 0:v.id)&&(null===(o=t.getSnTexts()[v.id])||void 0===o?void 0:o.propertiesHaveBeenModified);(A||e)&&(y.emit("saveDocument"),t.setPropertiesHaveBeenModified(v.id,!1))}return e.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{e.removeEventListener("click",n),document.removeEventListener("mousedown",r)}}),[e,b,v]),n((()=>{FC({rootElement:m,layout:g,model:v,element:e,edit:_,initialData:C,emitter:y,lang:x.language(),flags:f,theme:T,interactionState:b,readyToPrint:h})}),[g,m,v,e,_,e,C,y,f,T,b]),n((()=>{!_&&A&&y.emit("saveDocument")}),[_,y,A]),n((()=>{if(g){const e=g;e.text&&e.text!==R&&(M(e.text),y.emit("reloadData",e.text))}}),[g,R,y]),p((()=>({updateActiveState(e){e?t.setSelectedModelId(v.id):v.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}})),[])},ext:{definition:{type:"items",component:"accordion",items:{data:HC,settings:jC}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}}));const A={version:"1.3.3",showTitles:!1,text:null,fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1},N=e=>{const t=()=>{e.setPropertiesHaveBeenModifiedForSelectedModel(!0)};return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:0,max:100,added(e){e.qDef={...e.qDef,qAggrFunc:"None"},t()},removed:t,replaced:t,moved:t}}]}};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var L,O={};var I=function(){if(L)return O;L=1;var e=f;return O.createRoot=e.createRoot,O.hydrateRoot=e.hydrateRoot,O}();const P=e=>{const r=t((()=>I.createRoot(e)),[e]);return n((()=>()=>{null==r||r.unmount()}),[r]),r},D=m({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,readyToPrint:[]});var $,z,B,F,H,j,W,G,K,Y,U,V,q={},Q={},J={},X={};function Z(){if($)return X;$=1;let e={},t={},n={},r={},o={},i={},a={},l={},s={},u={},c={},d={},p={},f={},h={},m={},g={},v={},b={},y={},x={},_={},E={},C={},S={},w={},k={},T={},A={},N={},R={},M={},L={},O={},I={};function P(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let D="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,z=D&&"documentMode"in document?document.documentMode:null,B=D&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),F=D&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),H=!(!D||!("InputEvent"in window)||z)&&"getTargetRanges"in new window.InputEvent("input"),j=D&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),W=D&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,G=D&&/^(?=.*Chrome).*/i.test(navigator.userAgent),K=D&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!G,Y=j||W||K?" ":"​",U=F?" ":Y,V=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,q=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,Q={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},J={directionless:1,unmergeable:2},Z={center:2,end:6,justify:4,left:1,right:3,start:5},ee={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},te={normal:0,segmented:2,token:1},ne={0:"normal",2:"segmented",1:"token"},re=!1,oe=0;function ie(e){oe=e.timeStamp}function ae(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function le(e,t,n){re=!0;let r=100<performance.now()-oe;try{kr(e,(()=>{let o=tr()||function(e){return e.getEditorState().read((()=>{let e=tr();return null!==e?e.clone():null}))}(e);var i=new Map,a=e.getRootElement(),l=e._editorState,s=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var p=t[d],f=p.type,h=p.target,m=Me(h,l);if(!(null===m&&h!==a||Ar(m)))if("characterData"===f){if(p=r&&Rn(m))e:{f=h;var g=m;if(Bn(p=o)){var v=p.anchor.getNode();if(v.is(g)&&p.format!==v.getFormat()){p=!1;break e}}p=3===f.nodeType&&g.isAttached()}p&&(f=p=null,null!==(g=at(e._window))&&g.anchorNode===h&&(p=g.anchorOffset,f=g.focusOffset),null!==(h=h.nodeValue)&&He(m,h,p,f,!1))}else if("childList"===f){for(u=!0,f=p.addedNodes,g=0;g<f.length;g++){var b=Re(v=f[g]),y=v.parentNode;null==y||v===s||null!==b||"BR"===v.nodeName&&ae(v,y,e)||(F&&(b=v.innerText||v.nodeValue)&&(c+=b),y.removeChild(v))}if(0<(f=(p=p.removedNodes).length)){for(g=0,v=0;v<f;v++)("BR"===(y=p[v]).nodeName&&ae(y,h,e)||s===y)&&(h.appendChild(y),g++);f!==g&&(h===a&&(m=l._nodeMap.get("root")),i.set(h,m))}}}if(0<i.size)for(let[t,n]of i)if(Rr(n))for(i=n.getChildrenKeys(),a=t.firstChild,l=0;l<i.length;l++)null!==(s=e.getElementByKey(i[l]))&&(null==a?(t.appendChild(s),a=s):a!==s&&t.replaceChild(s,a),a=a.nextSibling);else Rn(n)&&n.markDirty();if(0<(i=n.takeRecords()).length){for(a=0;a<i.length;a++)for(l=(s=i[a]).addedNodes,s=s.target,d=0;d<l.length;d++)null==(h=(m=l[d]).parentNode)||"BR"!==m.nodeName||ae(m,s,e)||h.removeChild(m);n.takeRecords()}null!==o&&(u&&(o.dirty=!0,Pe(o)),F&&Ue(e)&&o.insertRawText(c))}))}finally{re=!1}}function se(e){let t=e._observer;if(null!==t){le(e,t.takeRecords(),t)}}function ue(e){0===oe&&Xe(e).addEventListener("textInput",ie,!0),e._observer=new MutationObserver(((t,n)=>{le(e,t,n)}))}function ce(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,!(null!==n&&n!==o||null!==r&&r!==i||null!==e&&e!==t)}function de(e,t){let n=e.mergeWithSibling(t),r=vr()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function pe(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&Rn(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){ce(t,e)&&(e=de(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&Rn(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){ce(e,n)&&de(e,n);break}n.remove()}}}function fe(e){return he(e.anchor),he(e.focus),e}function he(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Rn(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Rr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let me=1,ge="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ve(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Ar(Me(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function be(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ve(t)&&ye(t)===e}catch(e){return!1}}function ye(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=Qe(e)}return null}function xe(e){return e.isToken()||e.isSegmented()}function _e(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ee(e,t,n){return!(e&(t=Q[t]))||null!==n&&n&t?null===n||n&t?e|t:e:e^t}function Ce(e){return Rn(e)||hn(e)||Ar(e)}function Se(e,t){if(null!=t)e.__key=t;else{mr(),99<pr&&P(14),t=vr();var n=gr(),r=""+me++;n._nodeMap.set(r,e),Rr(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function we(e){var t=e.getParent();if(null!==t){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;o.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function ke(e){99<pr&&P(14);var t=e.getLatest(),n=t.__parent,r=gr();let o=vr(),i=r._nodeMap;if(r=o._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=i.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,o._dirtyType=1,Rr(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Te(e){mr();var t=vr();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=Ne(n))&&t.getWritable()),null!==e&&(null!==(e=Ne(e))&&e.getWritable()))}function Ae(){return hr()?null:vr()._compositionKey}function Ne(e,t){return void 0===(e=(t||gr())._nodeMap.get(e))?null:e}function Re(e,t){return void 0!==(e=e[`__lexicalKey_${vr()._key}`])?Ne(e,t):null}function Me(e,t){for(;null!=e;){let n=Re(e,t);if(null!==n)return n;e=Qe(e)}return null}function Le(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Oe(e){return e.read((()=>Ie().getTextContent()))}function Ie(){return gr()._nodeMap.get("root")}function Pe(e){mr();let t=gr();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function De(e){var t,n=vr();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=Qe(t)}t=null}return null===t?e===(n=n.getRootElement())?Ne("root"):null:Ne(t)}function $e(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ze(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Be(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Fe(e,t,n){if(null!==(t=at(t._window))){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Me(r),null!==t&&Rn(r))){if(t===Y&&n){t=n,i=o=n.length}null!==t&&He(r,t,o,i,e)}}}function He(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===Y&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(""===c)if(Te(null),j||W||K)i.remove();else{let e=vr();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}else{o=i.getParent(),t=nr();var a=i.getTextContentSize(),l=Ae(),s=i.getKey();i.isToken()||null!==l&&s===l&&!u||Bn(t)&&(null!==o&&!o.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===a&&!i.canInsertTextAfter())?i.markDirty():(Bn(e=tr())&&null!==n&&null!==r&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=Nn(n=i.getTextContent()),i.replace(n),i=n)),i.setTextContent(c))}}}function je(){var e=Ie();Pe(fe(e=e.select(0,e.getChildrenSize())))}function We(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function Ge(e,t,n,r,o){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&P(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===o,(void 0===e||n)&&t.set(r,n?"updated":o))}function Ke(e,t,n){let r=e.getParent(),o=n;return null!==r&&(t&&0===n?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function Ye(e,t){var n=e.offset;return"element"===e.type?Ke(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?Ke(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ue(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ve(e){return!Or(e)&&!e.isLastChild()&&!e.isInline()}function qe(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&P(75,t),e}function Qe(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Je(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&P(78),e}function Ze(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Or(e)||Rr(e)&&e.isShadowRoot()}function tt(e){return Se(e=e.constructor.clone(e),null),e}function nt(e){var t=vr();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&P(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||P(98),t):e}function rt(e,t){!Or(e=e.getParent())||Rr(t)||Ar(t)||P(99)}function ot(e){return(Ar(e)||Rr(e)&&!e.canBeEmpty())&&!e.isInline()}function it(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function at(e){return D?(e||window).getSelection():null}function lt(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&P(102);let r=e=>{const t=e.getParentOrThrow(),o=et(t),i=e!==n||o?tt(e):e;if(o)return e.insertAfter(i),[e,i,i];const[a,l,s]=r(t);return e=e.getNextSiblings(),s.append(i,...e),[a,l,i]},[o,i]=r(n);return[o,i]}function st(e,t){for(;e!==Ie()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ut(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();void 0===r&&P(112),Rr(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function ct(e,t,n,r,o,i){for(e=e.getFirstChild();null!==e;){let a=e.__key;e.__parent===t&&(Rr(e)&&ct(e,a,n,r,o,i),n.has(a)||i.delete(a),o.push(a)),e=e.getNextSibling()}}let dt,pt,ft,ht,mt,gt,vt,bt,yt,xt,_t="",Et="",Ct="",St=!1,wt=!1,kt=null;function Tt(e,t){let n=vt.get(e);if(null!==t){let n=Ht(e);n.parentNode===t&&t.removeChild(n)}bt.has(e)||pt._keyToDOMMap.delete(e),Rr(n)&&At(e=$t(n,vt),0,e.length-1,null),void 0!==n&&Ge(xt,ft,ht,n,"destroyed")}function At(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&Tt(n,r)}}function Nt(e,t){e.setProperty("text-align",t)}function Rt(e,t){var n=dt.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Mt(e,t){e=e.style,0===t?Nt(e,""):1===t?Nt(e,"left"):2===t?Nt(e,"center"):3===t?Nt(e,"right"):4===t?Nt(e,"justify"):5===t?Nt(e,"start"):6===t&&Nt(e,"end")}function Lt(e,t,n){let r=bt.get(e);void 0===r&&P(60);let o=r.createDOM(dt,pt);var i=pt._keyToDOMMap;if(o["__lexicalKey_"+pt._key]=e,i.set(e,o),Rn(r)?o.setAttribute("data-lexical-text","true"):Ar(r)&&o.setAttribute("data-lexical-decorator","true"),Rr(r)){if(e=r.__indent,i=r.__size,0!==e&&Rt(o,e),0!==i){--i,e=$t(r,bt);var a=Et;Et="",Ot(e,r,0,i,o,null),Dt(r,o),Et=a}0!==(e=r.__format)&&Mt(o,e),r.isInline()||Pt(null,r,o),Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else i=r.getTextContent(),Ar(r)?(null!==(a=r.decorate(pt,dt))&&Bt(e,a),o.contentEditable="false"):Rn(r)&&(r.isDirectionless()||(Et+=i)),_t+=i,Ct+=i;return null!==t&&(null!=n?t.insertBefore(o,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(o,n):t.appendChild(o)),Ge(xt,ft,ht,r,"created"),o}function Ot(e,t,n,r,o,i){let a=_t;for(_t="";n<=r;++n)Lt(e[n],o,i);Ve(t)&&(_t+="\n\n"),o.__lexicalTextContent=_t,_t=a+_t}function It(e,t){return hn(e=t.get(e))||Ar(e)&&e.isInline()}function Pt(e,t,n){e=null!==e&&(0===e.__size||It(e.__last,vt)),t=0===t.__size||It(t.__last,bt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Dt(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Et||n!==kt){let i=""===Et;if(i)var r=kt;else r=Et,r=V.test(r)?"rtl":q.test(r)?"ltr":null;if(r!==n){let a=t.classList,l=dt.theme;var o=null!==n?l[n]:void 0;let s=null!==r?l[r]:void 0;void 0!==o&&("string"==typeof o&&(o=o.split(" "),o=l[n]=o),a.remove(...o)),null===r||i&&"ltr"===r?t.removeAttribute("dir"):(void 0!==s&&("string"==typeof s&&(n=s.split(" "),s=l[r]=n),void 0!==s&&a.add(...s)),t.dir=r),wt||(e.getWritable().__dir=r)}kt=r,t.__lexicalDirTextContent=Et,t.__lexicalDir=r}}function $t(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&P(101),n.push(e),e=r.__next}return n}function zt(e,t){var n=vt.get(e),r=bt.get(e);void 0!==n&&void 0!==r||P(61);var o=St||gt.has(e)||mt.has(e);let i=qe(pt,e);if(n===r&&!o)return Rr(n)?(void 0!==(r=i.__lexicalTextContent)&&(_t+=r,Ct+=r),void 0!==(r=i.__lexicalDirTextContent)&&(Et+=r)):(r=n.getTextContent(),Rn(n)&&!n.isDirectionless()&&(Et+=r),Ct+=r,_t+=r),i;if(n!==r&&o&&Ge(xt,ft,ht,r,"updated"),r.updateDOM(n,i,dt))return r=Lt(e,null,null),null===t&&P(62),t.replaceChild(r,i),Tt(e,null),r;if(Rr(n)&&Rr(r)){if((e=r.__indent)!==n.__indent&&Rt(i,e),(e=r.__format)!==n.__format&&Mt(i,e),o){e=r,o=Et,Et="",t=_t;var a=n.__size,l=e.__size;if(_t="",1===a&&1===l){var s=n.__first,u=e.__first;if(s===u)zt(s,i);else{var c=Ht(s);u=Lt(u,null,null),i.replaceChild(u,c),Tt(s,null)}}else{u=$t(n,vt);var d=$t(e,bt);if(0===a)0!==l&&Ot(d,e,0,l-1,i,null);else if(0===l)0!==a&&(At(u,0,a-1,(s=null==i.__lexicalLineBreak)?null:i),s&&(i.textContent=""));else{var p=u;u=d,d=a-1,a=l-1;let t=i.firstChild,n=0;for(l=0;n<=d&&l<=a;){var f=p[n];let e=u[l];if(f===e)t=Ft(zt(e,i)),n++,l++;else{void 0===s&&(s=new Set(p)),void 0===c&&(c=new Set(u));let r=c.has(f),o=s.has(e);r?(o?((f=qe(pt,e))===t?t=Ft(zt(e,i)):(null!=t?i.insertBefore(f,t):i.appendChild(f),zt(e,i)),n++):Lt(e,i,t),l++):(t=Ft(Ht(f)),Tt(f,i),n++)}}c=l>a,(s=n>d)&&!c?Ot(u,e,l,a,i,s=void 0===(s=u[a+1])?null:pt.getElementByKey(s)):c&&!s&&At(p,n,d,i)}}Ve(e)&&(_t+="\n\n"),i.__lexicalTextContent=_t,_t=t+_t,Dt(e,i),Et=o,Or(r)||r.isInline()||Pt(n,r,i)}Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else n=r.getTextContent(),Ar(r)?null!==(o=r.decorate(pt,dt))&&Bt(e,o):Rn(r)&&!r.isDirectionless()&&(Et+=n),_t+=n,Ct+=n;return!wt&&Or(r)&&r.__cachedText!==Ct&&((r=r.getWritable()).__cachedText=Ct),i}function Bt(e,t){let n=pt._pendingDecorators,r=pt._decorators;if(null===n){if(r[e]===t)return;n=Le(pt)}n[e]=t}function Ft(e){return null!==(e=e.nextSibling)&&e===pt._blockCursorElement&&(e=e.nextSibling),e}function Ht(e){let t=yt.get(e);return void 0===t&&P(75,e),t}let jt=Object.freeze({}),Wt=[["keydown",function(e,t){if(Gt=e.timeStamp,Kt=e.keyCode,!t.isComposing()){var{keyCode:o,shiftKey:i,ctrlKey:a,metaKey:l,altKey:k}=e;if(!Cr(t,f,e)){if(39!==o||a||l||k)if(39!==o||k||i||!a&&!l)if(37!==o||a||l||k)if(37!==o||k||i||!a&&!l)if(38!==o||a||l)if(40!==o||a||l)if(13===o&&i)Jt=!0,Cr(t,x,e);else if(32===o)Cr(t,_,e);else if(B&&a&&79===o)e.preventDefault(),Jt=!0,Cr(t,r,!0);else if(13!==o||i)if(B?k||l||!(8===o||72===o&&a):a||k||l||8!==o)if(27===o)Cr(t,C,e);else if(B?i||k||l||!(46===o||68===o&&a):a||k||l||46!==o)if(8===o&&(B?k:a))e.preventDefault(),Cr(t,s,!0);else if(46===o&&(B?k:a))e.preventDefault(),Cr(t,s,!1);else if(B&&l&&8===o)e.preventDefault(),Cr(t,u,!0);else if(B&&l&&46===o)e.preventDefault(),Cr(t,u,!1);else if(66===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"bold");else if(85===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"underline");else if(73===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"italic");else if(9!==o||k||a||l)if(90===o&&!i&&(B?l:a))e.preventDefault(),Cr(t,d,void 0);else{var T=B?90===o&&l&&i:89===o&&a||90===o&&a&&i;T?(e.preventDefault(),Cr(t,p,void 0)):Wn(t._editorState._selection)?(T=!i&&(67===o&&(B?l:a)))?(e.preventDefault(),Cr(t,R,e)):(T=!i&&(88===o&&(B?l:a)))?(e.preventDefault(),Cr(t,M,e)):65===o&&(B?l:a)&&(e.preventDefault(),t.update((()=>{je()}))):!F&&65===o&&(B?l:a)&&(e.preventDefault(),t.update((()=>{je()})))}else Cr(t,w,e);else 46===o?Cr(t,S,e):(e.preventDefault(),Cr(t,n,!1));else 8===o?Cr(t,E,e):(e.preventDefault(),Cr(t,n,!0));else Jt=!1,Cr(t,x,e);else Cr(t,y,e);else Cr(t,b,e);else Cr(t,v,e);else Cr(t,g,e);else Cr(t,m,e);else Cr(t,h,e);(a||i||k||l)&&Cr(t,I,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&kr(t,(()=>{Ar(Me(n))||(Qt=!0)}))}],["compositionstart",function(e,t){kr(t,(()=>{let n=tr();if(Bn(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Te(r.key),(e.timeStamp<Gt+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&Cr(t,i,U)}}))}],["compositionend",function(e,t){F?Xt=!0:kr(t,(()=>{on(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),kr(t,(()=>{var n=tr(),r=e.data,o=rn(e);if(null!=r&&Bn(n)&&en(n,o,r,e.timeStamp,!1)){Xt&&(on(t,r),Xt=!1);var a=n.anchor,l=a.getNode();if(null===(o=at(t._window)))return;let s=a.offset;(a=H&&!n.isCollapsed()&&Rn(l)&&null!==o.anchorNode)&&(a=(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset))===(3===(o=o.anchorNode).nodeType?o.nodeValue:null)),a||Cr(t,i,r),r=r.length,F&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),j||W||K||!t.isComposing()||(Gt=0,Te(null))}else Fe(!1,t,null!==r?r:void 0),Xt&&(on(t,r||void 0),Xt=!1);mr(),se(n=vr())})),Ut=null}],["click",function(e,n){kr(n,(()=>{let r=tr();var o=at(n._window);let i=nr();if(o)if(Bn(r)){let t=r.anchor;var a=t.getNode();"element"===t.type&&0===t.offset&&r.isCollapsed()&&!Or(a)&&1===Ie().getChildrenSize()&&a.getTopLevelElementOrThrow().isEmpty()&&null!==i&&r.is(i)?(o.removeAllRanges(),r.dirty=!0):3!==e.detail||r.isCollapsed()||a!==(o=r.focus.getNode())&&(Rr(a)?a.select(0):a.getParentOrThrow().select(0))}else"touch"===e.pointerType&&(null!==(a=o.anchorNode)&&(1===(a=a.nodeType)||3===a))&&Pe(o=er(i,o,n));Cr(n,t,e)}))}],["cut",jt],["copy",jt],["dragstart",jt],["dragover",jt],["dragend",jt],["paste",jt],["focus",jt],["blur",jt],["drop",jt]];H&&Wt.push(["beforeinput",(e,t)=>function(e,t){let f=e.inputType,h=rn(e);"deleteCompositionText"===f||F&&Ue(t)||"insertCompositionText"!==f&&kr(t,(()=>{let m=tr();if("deleteContentBackward"===f){if(null===m){var g=nr();if(!Bn(g))return;Pe(g.clone())}if(Bn(m))return void(229===Kt&&e.timeStamp<Gt+30&&t.isComposing()&&m.anchor.key===m.focus.key?(Te(null),Gt=0,setTimeout((()=>{kr(t,(()=>{Te(null)}))}),30),Bn(m)&&(g=m.anchor.getNode(),g.markDirty(),m.format=g.getFormat(),m.style=g.getStyle())):(e.preventDefault(),Cr(t,n,!0)))}if(Bn(m)){g=e.data,null!==Ut&&Fe(!1,t,Ut),m.dirty&&null===Ut||!m.isCollapsed()||Or(m.anchor.getNode())||null===h||m.applyDOMRange(h),Ut=null;var v=m.focus,b=m.anchor.getNode();if(v=v.getNode(),"insertText"===f||"insertTranspose"===f)"\n"===g?(e.preventDefault(),Cr(t,r,!1)):"\n\n"===g?(e.preventDefault(),Cr(t,o,void 0)):null==g&&e.dataTransfer?(g=e.dataTransfer.getData("text/plain"),e.preventDefault(),m.insertRawText(g)):null!=g&&en(m,h,g,e.timeStamp,!0)?(e.preventDefault(),Cr(t,i,g)):Ut=g,Yt=e.timeStamp;else switch(e.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Cr(t,i,e);break;case"insertFromComposition":Te(null),Cr(t,i,e);break;case"insertLineBreak":Te(null),Cr(t,r,!1);break;case"insertParagraph":Te(null),Jt&&!W?(Jt=!1,Cr(t,r,!1)):Cr(t,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Cr(t,a,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rr(e)||Rr(t)||!e.isToken()||!t.isToken()})(b,v)&&Cr(t,l,e);break;case"deleteByDrag":case"deleteByCut":Cr(t,l,e);break;case"deleteContent":Cr(t,n,!1);break;case"deleteWordBackward":Cr(t,s,!0);break;case"deleteWordForward":Cr(t,s,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Cr(t,u,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Cr(t,u,!1);break;case"formatStrikeThrough":Cr(t,c,"strikethrough");break;case"formatBold":Cr(t,c,"bold");break;case"formatItalic":Cr(t,c,"italic");break;case"formatUnderline":Cr(t,c,"underline");break;case"historyUndo":Cr(t,d,void 0);break;case"historyRedo":Cr(t,p,void 0)}}}))}(e,t)]);let Gt=0,Kt=0,Yt=0,Ut=null,Vt=0,qt=!1,Qt=!1,Jt=!1,Xt=!1,Zt=[0,"",0,"root",0];function en(e,t,n,r,o){let i=e.anchor,a=e.focus,l=i.getNode();var s=vr();let u=at(s._window),c=null!==u?u.anchorNode:null,d=i.key;s=s.getElementByKey(d);let p=n.length;return d!==a.key||!Rn(l)||(!o&&(!H||Yt<r+50)||l.isDirty()&&2>p||$e(n))&&i.offset!==a.offset&&!l.isComposing()||xe(l)||l.isDirty()&&1<p||(o||!H)&&null!==s&&!l.isComposing()&&c!==_e(s)||null!==u&&null!==t&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(Rn(t=t.getPreviousSibling())||Rr(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,l)}function tn(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function nn(t,n,r){let{anchorNode:o,anchorOffset:i,focusNode:a,focusOffset:l}=t;qt&&(qt=!1,tn(o,i)&&tn(a,l))||kr(n,(()=>{if(r){if(be(n,o,a)){var i=tr();if(Bn(i)){var l=i.anchor,s=l.getNode();if(i.isCollapsed()){"Range"===t.type&&t.anchorNode===t.focusNode&&(i.dirty=!0);var u=Xe(n).event;u=u?u.timeStamp:performance.now();let[e,r,o,a,c]=Zt;u<c+200&&l.offset===o&&l.key===a?(i.format=e,i.style=r):"text"===l.type?(i.format=s.getFormat(),i.style=s.getStyle()):"element"===l.type&&(i.format=0,i.style="")}else{l=255,s=!1;let e=(u=i.getNodes()).length;for(let t=0;t<e;t++){let e=u[t];if(Rn(e)&&(s=!0,0===(l&=e.getFormat())))break}i.format=s?l:0}}Cr(n,e,void 0)}}else Pe(null)}))}function rn(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function on(e,t){var n=e._compositionKey;if(Te(null),null!==n&&null!=t){if(""===t)return t=Ne(n),void(null!==(e=_e(e.getElementByKey(n)))&&null!==e.nodeValue&&Rn(t)&&He(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&Bn(n=tr()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Cr(e,x,null)}Fe(!0,e,t)}function an(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let ln=new Map;function sn(e){let t=at(null==(e=e.target)?null:9===e.nodeType?e.defaultView:e.ownerDocument.defaultView);if(null!==t){var n=ye(t.anchorNode);if(null!==n){Qt&&(Qt=!1,kr(n,(()=>{var e=nr(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&Pe(e=er(e,t,n))})));var r=(e=(e=ze(n))[e.length-1])._key,o=ln.get(r),i=o||e;i!==n&&nn(t,i,!1),nn(t,n,!0),n!==e?ln.set(r,n):o&&ln.delete(r)}}}function un(e,t,n){mr();var r=e.__key;let o=e.getParent();if(null!==o){var i=tr();if(Bn(i)&&Rr(e)){var{anchor:a,focus:l}=i,s=a.getNode(),u=l.getNode();Je(s,e)&&a.set(e.__key,0,"element"),Je(u,e)&&l.set(e.__key,0,"element")}if(u=!1,Bn(s=i)&&t){i=s.anchor;let t=s.focus;i.key===r&&(ir(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(ir(t,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Wn(s)&&t&&e.isSelected()&&e.selectPrevious();Bn(s)&&t&&!u?(r=e.getIndexWithinParent(),we(e),rr(s,o,r,-1)):we(e),n||et(o)||o.canBeEmpty()||!o.isEmpty()||un(o,t),t&&Or(o)&&o.isEmpty()&&o.selectEnd()}}class cn{static getType(){P(64,this.name)}static clone(){P(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Se(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=Ne(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||tr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(Rn(this)||!Bn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Ne(e)}getParentOrThrow(){let e=this.getParent();return null===e&&P(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&P(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:Ne(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Ne(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Rr(this)&&t.unshift(this),Rr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var o=this;;){var i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;if(null!==(i=Rr(o)?t?o.getFirstChild():o.getLastChild():null))o=i;else if(null!==(i=t?o.getNextSibling():o.getPreviousSibling()))o=i;else{if(o=o.getParentOrThrow(),r.has(o.__key)||n.push(o),o===e)break;i=o;do{null===i&&P(68),o=t?i.getNextSibling():i.getPreviousSibling(),null!==(i=i.getParent())&&(null!==o||r.has(i.__key)||n.push(i))}while(null===o)}}return t||n.reverse(),n}isDirty(){let e=vr()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=Ne(this.__key);return null===e&&P(113),e}getWritable(){mr();var e=gr(),t=vr();e=e._nodeMap;let n=this.__key,r=this.getLatest(),o=r.__parent;t=t._cloneNotNeeded;var i=tr();return null!==i&&(i._cachedNodes=null),t.has(n)?(ke(r),r):((i=r.constructor.clone(r)).__parent=o,i.__next=r.__next,i.__prev=r.__prev,Rr(r)&&Rr(i)?(i.__first=r.__first,i.__last=r.__last,i.__size=r.__size,i.__indent=r.__indent,i.__format=r.__format,i.__dir=r.__dir):Rn(r)&&Rn(i)&&(i.__format=r.__format,i.__style=r.__style,i.__mode=r.__mode,i.__detail=r.__detail),t.add(n),i.__key=n,ke(i),e.set(n,i),i)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){P(70)}updateDOM(){P(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){P(72)}static importJSON(){P(18,this.name)}static transform(){return null}remove(e){un(this,!0,e)}replace(e,t){mr();var n=tr();null!==n&&(n=n.clone()),rt(this,e);let r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),l=(e=this.getParentOrThrow().getWritable()).__size;we(a);let s=r.getPreviousSibling(),u=r.getNextSibling(),c=r.__prev,d=r.__next,p=r.__parent;return un(r,!1,!0),null===s?e.__first=i:s.getWritable().__next=i,a.__prev=c,null===u?e.__last=i:u.getWritable().__prev=i,a.__next=d,a.__parent=p,e.__size=l,t&&this.getChildren().forEach((e=>{a.append(e)})),Bn(n)&&(Pe(n),t=n.anchor,n=n.focus,t.key===o&&Pn(t,a),n.key===o&&Pn(n,a)),Ae()===o&&Te(i),a}insertAfter(e,t=!0){mr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var o=r.getParent();let i=tr();var a=!1,l=!1;if(null!==o){var s=e.getIndexWithinParent();we(r),Bn(i)&&(l=o.__key,a=i.anchor,o=i.focus,a="element"===a.type&&a.key===l&&a.offset===s+1,l="element"===o.type&&o.key===l&&o.offset===s+1)}o=this.getNextSibling(),s=this.getParentOrThrow().getWritable();let u=r.__key,c=n.__next;return null===o?s.__last=u:o.getWritable().__prev=u,s.__size++,n.__next=u,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,t&&Bn(i)&&(rr(i,s,(t=this.getIndexWithinParent())+1),n=s.__key,a&&i.anchor.set(n,t+2,"element"),l&&i.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){mr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),o=r.__key;we(r);let i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=n.__prev,s=this.getIndexWithinParent();return null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=l,r.__next=n.__key,r.__parent=n.__parent,n=tr(),t&&Bn(n)&&rr(n,t=this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return Br()}selectPrevious(e,t){mr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Rr(n)?n.select():Rn(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){mr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Rr(n)?n.select(0,0):Rn(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class dn extends cn{static getType(){return"linebreak"}static clone(e){return new dn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^[\s|\r?\n|\t]+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^[\s|\r?\n|\t]+$/))?null:{conversion:pn,priority:0}}}}static importJSON(){return fn()}exportJSON(){return{type:"linebreak",version:1}}}function pn(){return{node:fn()}}function fn(){return nt(new dn)}function hn(e){return e instanceof dn}function mn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function gn(e,t){return 1&t?"strong":2&t?"em":"span"}function vn(e,t,n,r,o){e=r.classList,void 0!==(r=We(o,"base"))&&e.add(...r);let i=!1,a=8&t&&4&t;var l=8&n&&4&n;void 0!==(r=We(o,"underlineStrikethrough"))&&(l?(i=!0,a||e.add(...r)):a&&e.remove(...r));for(let s in Q)l=Q[s],void 0!==(r=We(o,s))&&(n&l&&(!i||"underline"!==s&&"strikethrough"!==s)?(!(t&l)||a&&"underline"===s||"strikethrough"===s)&&e.add(...r):t&l&&e.remove(...r))}function bn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?Y:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||F){n=t.length;let o=e.length,i=0,a=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;a+i<n&&a+i<o&&t[n-a-1]===e[o-a-1];)a++;e=[i,n-i-a,e.slice(i,o-a)];let[l,s,u]=e;0!==s&&r.deleteData(l,s),r.insertData(l,u)}else r.nodeValue=e}function yn(e,t){return(t=document.createElement(t)).appendChild(e),t}class xn extends cn{static getType(){return"text"}static clone(e){return new xn(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return ne[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Ae()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){return e=Q[e],!!(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ee(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=mn(0,t);let r=gn(0,t),o=document.createElement(null===n?r:n),i=o;return null!==n&&(i=document.createElement(r),o.appendChild(i)),n=i,bn(this.__text,n,this),void 0!==(e=e.theme.text)&&vn(r,0,t,n,e),""!==(t=this.__style)&&(o.style.cssText=t),o}updateDOM(e,t,n){let r=this.__text;var o=e.__format,i=this.__format,a=mn(0,o);let l=mn(0,i);var s=gn(0,o);let u=gn(0,i);return(null===a?s:a)!==(null===l?u:l)||(a===l&&s!==u?(null==(o=t.firstChild)&&P(48),bn(r,e=a=document.createElement(u),this),void 0!==(n=n.theme.text)&&vn(u,0,i,e,n),t.replaceChild(a,o),!1):(s=t,null!==l&&null!==a&&(null==(s=t.firstChild)&&P(49)),bn(r,s,this),void 0!==(n=n.theme.text)&&o!==i&&vn(u,o,i,s,n),i=this.__style,e.__style!==i&&(t.style.cssText=i),!1))}static importDOM(){return{"#text":()=>({conversion:Sn,priority:0}),b:()=>({conversion:En,priority:0}),code:()=>({conversion:An,priority:0}),em:()=>({conversion:An,priority:0}),i:()=>({conversion:An,priority:0}),s:()=>({conversion:An,priority:0}),span:()=>({conversion:_n,priority:0}),strong:()=>({conversion:An,priority:0}),sub:()=>({conversion:An,priority:0}),sup:()=>({conversion:An,priority:0}),u:()=>({conversion:An,priority:0})}}static importJSON(e){let t=Nn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&(this.hasFormat("bold")&&(e=yn(e,"b")),this.hasFormat("italic")&&(e=yn(e,"i")),this.hasFormat("strikethrough")&&(e=yn(e,"s")),this.hasFormat("underline")&&(e=yn(e,"u"))),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?Q[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?J[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=Q[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=te[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){mr();let n=tr();var r=this.getTextContent();let o=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Bn(n)?((r=Ae())!==n.anchor.key&&r!==n.focus.key||Te(o),n.setTextNodeRange(this,e,this,t),n):Xn(o,e,o,t,"text","text")}spliceText(e,t,n,r){let o=this.getWritable(),i=o.__text,a=n.length,l=e;0>l&&(l=a+l,0>l&&(l=0));let s=tr();return r&&Bn(s)&&(e+=a,s.setTextNodeRange(o,e,o,e)),t=i.slice(0,l)+n+i.slice(l+t),o.__text=t,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){mr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=Ae(),i=new Set(e);e=[];for(var a=n.length,l="",s=0;s<a;s++)""!==l&&i.has(s)&&(e.push(l),l=""),l+=n[s];if(""!==l&&e.push(l),0===(i=e.length))return[];if(e[0]===n)return[t];var u=e[0];n=t.getParentOrThrow(),s=t.getFormat();let c=t.getStyle(),d=t.__detail;a=!1,t.isSegmented()?((l=Nn(u)).__format=s,l.__style=c,l.__detail=d,a=!0):(l=t.getWritable()).__text=u,t=tr(),l=[l],u=u.length;for(let n=1;n<i;n++){var p=e[n],f=p.length;(p=Nn(p).getWritable()).__format=s,p.__style=c,p.__detail=d;let i=p.__key;if(f=u+f,Bn(t)){let e=t.anchor,n=t.focus;e.key===r&&"text"===e.type&&e.offset>u&&e.offset<=f&&(e.key=i,e.offset-=u,t.dirty=!0),n.key===r&&"text"===n.type&&n.offset>u&&n.offset<=f&&(n.key=i,n.offset-=u,t.dirty=!0)}o===r&&Te(i),u=f,l.push(p)}return r=this.getPreviousSibling(),o=this.getNextSibling(),null!==r&&ke(r),null!==o&&ke(o),r=n.getWritable(),o=this.getIndexWithinParent(),a?(r.splice(o,0,l),this.remove()):r.splice(o,1,l),Bn(t)&&rr(t,n,o,i-1),l}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||P(50);var n=this.__key;let r=e.__key,o=this.__text,i=o.length;Ae()===r&&Te(n);let a=tr();if(Bn(a)){let o=a.anchor,l=a.focus;null!==o&&o.key===r&&(ar(o,t,n,e,i),a.dirty=!0),null!==l&&l.key===r&&(ar(l,t,n,e,i),a.dirty=!0)}return n=e.__text,this.setTextContent(t?n+o:o+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function _n(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,o="underline"===e.style.textDecoration,i=e.style.verticalAlign;return{forChild:e=>Rn(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),o&&e.toggleFormat("underline"),"sub"===i&&e.toggleFormat("subscript"),"super"===i&&e.toggleFormat("superscript"),e):e,node:null}}function En(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(Rn(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Cn=new WeakMap;function Sn(e){null===e.parentElement&&P(129);for(var t,n=e.textContent||"",r=e.parentNode,o=[e];null!==r&&void 0===(t=Cn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r<o.length;r++)Cn.set(o[r],t);if(null!==t){for(e=[],o=(n=n.split(/(\r?\n|\t)/)).length,t=0;t<o;t++)"\n"===(r=n[t])||"\r\n"===r?e.push(fn()):"\t"===r?e.push(Ln()):""!==r&&e.push(Nn(r));return{node:e}}if(""===(n=n.replace(/\r?\n|\t/gm," ").replace("\r","").replace(/\s+/g," ")))return{node:null};if(" "===n[0]){for(o=e,t=!0;null!==o&&null!==(o=kn(o,!1));)if(0<(r=o.textContent||"").length){r.match(/(?:\s|\r?\n|\t)$/)&&(n=n.slice(1)),t=!1;break}t&&(n=n.slice(1))}if(" "===n[n.length-1]){for(o=!0;null!==e&&null!==(e=kn(e,!0));)if(0<(e.textContent||"").replace(/^[\s|\r?\n|\t]+/,"").length){o=!1;break}o&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nn(n)}}let wn=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function kn(e,t){for(;;){for(var n=void 0;null===(n=t?e.nextSibling:e.previousSibling);)if(null===(e=e.parentElement))return null;if(1===(e=n).nodeType&&(""===(n=e.style.display)&&null===e.nodeName.match(wn)||""!==n&&!n.startsWith("inline")))return null;for(;null!==(n=t?e.firstChild:e.lastChild);)e=n;if(3===e.nodeType)return e;if("BR"===e.nodeName)return null}}let Tn={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function An(e){let t=Tn[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(Rn(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Nn(e=""){return nt(new xn(e))}function Rn(e){return e instanceof xn}class Mn extends xn{static getType(){return"tab"}static clone(e){let t=new Mn(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Ln();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){P(126)}setDetail(){P(127)}setMode(){P(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ln(){return nt(new Mn)}class On{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Rr(t)){var o=t.getDescendantByIndex(r);t=null!=o?o:t}return Rr(n)&&(o=n.getDescendantByIndex(e),n=null!=o?o:n),t===n?r<e:t.isBefore(n)}getNode(){let e=Ne(this.key);return null===e&&P(20),e}set(e,t,n){let r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,hr()||(Ae()===o&&Te(e),null!==r&&(r._cachedNodes=null,r.dirty=!0))}}function In(e,t){let n=t.__key,r=e.offset,o="element";if(Rn(t))o="text",r>(t=t.getTextContentSize())&&(r=t);else if(!Rr(t)){var i=t.getNextSibling();Rn(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function Pn(e,t){if(Rr(t)){let n=t.getLastDescendant();Rr(n)||Rn(n)?In(e,n):In(e,t)}else In(e,t)}function Dn(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Nn(),l=Or(o)?Br().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(l):(i.insertBefore(l),"element"===t.type&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}function $n(e,t,n,r){e.key=t,e.offset=n,e.type=r}class zn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!Wn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var o=n[r-1];if(Rn(o))o=o.select();else{let e=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(e,e)}for(o.insertNodes(e,t),e=0;e<r;e++)n[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=Ne(n))&&e.push(t);return hr()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Bn(e){return e instanceof jn}class Fn{constructor(e,t,n){this.gridKey=e,this.anchor=t,this.focus=n,this.dirty=!1,this._cachedNodes=null,t._selection=this,n._selection=this}is(e){return!!Hn(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new Fn(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Kn(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.focus.getNode();return fe(n.select(0,n.getChildrenSize())).insertNodes(e,t)}getShape(){var e=Ne(this.anchor.key);null===e&&P(21);var t=e.getIndexWithinParent();e=e.getParentOrThrow().getIndexWithinParent();var n=Ne(this.focus.key);null===n&&P(22);var r=n.getIndexWithinParent();let o=n.getParentOrThrow().getIndexWithinParent();return n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,o),e=Math.max(e,o),{fromX:Math.min(n,t),fromY:Math.min(r,e),toX:Math.max(n,t),toY:Math.max(r,e)}}getNodes(){function e(e){let{cell:t,startColumn:n,startRow:r}=e;l=Math.min(l,n),s=Math.min(s,r),u=Math.max(u,n+t.__colSpan-1),c=Math.max(c,r+t.__rowSpan-1)}var t=this._cachedNodes;if(null!==t)return t;var n=this.anchor.getNode();t=this.focus.getNode(),n=st(n,Wr);var r=st(t,Wr);Wr(n)||P(103),Wr(r)||P(104),Ur(t=n.getParent())||P(105),Kr(t=t.getParent())||P(106);let[o,i,a]=lr(t,n,r),l=Math.min(i.startColumn,a.startColumn),s=Math.min(i.startRow,a.startRow),u=Math.max(i.startColumn+i.cell.__colSpan-1,a.startColumn+a.cell.__colSpan-1),c=Math.max(i.startRow+i.cell.__rowSpan-1,a.startRow+a.cell.__rowSpan-1);n=l,r=s;for(var d=l,p=s;l<n||s<r||u>d||c>p;){if(l<n){var f=p-r;--n;for(var h=0;h<=f;h++)e(o[r+h][n])}if(s<r)for(f=d-n,--r,h=0;h<=f;h++)e(o[r][n+h]);if(u>d)for(f=p-r,d+=1,h=0;h<=f;h++)e(o[r+h][d]);if(c>p)for(f=d-n,p+=1,h=0;h<=f;h++)e(o[p][n+h])}for(t=[t],n=null,r=s;r<=c;r++)for(d=l;d<=u;d++)({cell:p}=o[r][d]),Ur(f=p.getParent())||P(107),f!==n&&t.push(f),t.push(p,...ut(p)),n=f;return hr()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Hn(e){return e instanceof Fn}class jn{constructor(e,t,n,r){this.anchor=e,this.focus=t,this.dirty=!1,this.format=n,this.style=r,this._cachedNodes=null,e._selection=this,t._selection=this}is(e){return!!Bn(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let o=r.offset;return r=n.offset,Rr(e)&&(n=e.getDescendantByIndex(o),e=null!=n?n:e),Rr(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=null!=n?n:t),e=e.is(t)?Rr(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),hr()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){$n(this.anchor,e.__key,t,"text"),$n(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,l]=Kn(this),s="",u=!0;for(let c=0;c<e.length;c++){let d=e[c];if(Rr(d)&&!d.isInline())u||(s+="\n"),u=!d.isEmpty();else if(u=!1,Rn(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<l?e.slice(a,l):e.slice(l,a)):e=i?e.slice(a):e.slice(l):d===n&&(e=i?e.slice(0,l):e.slice(0,a)),s+=e}else!Ar(d)&&!hn(d)||d===n&&this.isCollapsed()||(s+=d.getTextContent())}return s}applyDOMRange(e){let t=vr(),n=t.getEditorState()._selection;if(null!==(e=Qn(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,o]=e;$n(this.anchor,r.key,r.offset,r.type),$n(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new jn(new On(e.key,e.offset,e.type),new On(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ee(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return!!(this.format&Q[e])}insertRawText(e){let t=[],n=(e=e.split(/(\r?\n|\t)/)).length;for(let r=0;r<n;r++){let n=e[r];"\n"===n||"\r\n"===n?t.push(fn()):"\t"===n?t.push(Ln()):t.push(Nn(n))}this.insertNodes(t)}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),o=this.format,i=this.style;r&&"element"===t.type?Dn(t,n,o,i):r||"element"!==n.type||Dn(n,t,o,i);var a=this.getNodes(),l=a.length,s=r?n:t;n=(r?t:n).offset;var u=s.offset;Rn(t=a[0])||P(26),r=t.getTextContent().length;var c=t.getParentOrThrow(),d=a[l-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!c.canInsertTextAfter()&&null===t.getNextSibling())){var p=t.getNextSibling();if(Rn(p)&&p.canInsertTextBefore()&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextAfter()?t.insertAfter(p):c.insertAfter(p)),p.select(0,0),t=p,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!c.canInsertTextBefore()&&null===t.getPreviousSibling())){if(Rn(p=t.getPreviousSibling())&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextBefore()?t.insertBefore(p):c.insertBefore(p)),p.select(),t=p,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(c=Nn(t.getTextContent())).setFormat(o),t.replace(c),t=c;else if(!(this.isCollapsed()||""===e||(p=d.getParent(),c.canInsertTextBefore()&&c.canInsertTextAfter()&&(!Rr(p)||p.canInsertTextBefore()&&p.canInsertTextAfter()))))return this.insertText(""),qn(this.anchor,this.focus,null),void this.insertText(e);if(1===l)if(t.isToken())(e=Nn(e)).select(),t.replace(e);else{if(a=t.getFormat(),l=t.getStyle(),n===u&&(a!==o||l!==i)){if(""!==t.getTextContent())return(a=Nn(e)).setFormat(o),a.setStyle(i),a.select(),0===n?t.insertBefore(a,!1):([l]=t.splitText(n),l.insertAfter(a,!1)),void(a.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(o),t.setStyle(i)}""===(t=t.spliceText(n,u-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=a,this.style=l))}else{if(o=new Set([...t.getParentKeys(),...d.getParentKeys()]),p=Rr(t)?t:t.getParentOrThrow(),i=Rr(d)?d:d.getParentOrThrow(),c=d,!p.is(i)&&i.isInline())do{c=i,i=i.getParentOrThrow()}while(i.isInline());"text"===s.type&&(0!==u||""===d.getTextContent())||"element"===s.type&&d.getIndexWithinParent()<u?Rn(d)&&!d.isToken()&&u!==d.getTextContentSize()?(d.isSegmented()&&(s=Nn(d.getTextContent()),d.replace(s),d=s),d=d.spliceText(0,u,""),o.add(d.__key)):(s=d.getParentOrThrow()).canBeEmpty()||1!==s.getChildrenSize()?d.remove():s.remove():o.add(d.__key),s=i.getChildren(),u=new Set(a),d=p.is(i),p=p.isInline()&&null===t.getNextSibling()?p:t;for(let e=s.length-1;0<=e;e--){let n=s[e];if(n.is(t)||Rr(n)&&n.isParentOf(t))break;n.isAttached()&&(!u.has(n)||n.is(c)?d||p.insertAfter(n,!1):n.remove())}if(!d)for(s=i,u=null;null!==s;)(0===(d=(i=s.getChildren()).length)||i[d-1].is(u))&&(o.delete(s.__key),u=s),s=s.getParent();for(t.isToken()?n===r?t.select():((e=Nn(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<l;e++)t=a[e],o.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),Te(null);else{var t=this.getNodes(),n=[];for(var r of t)Rn(r)&&n.push(r);var o=n.length;if(0===o)this.toggleFormat(e),Te(null);else{r=this.anchor;var i=this.focus,a=this.isBackward();t=a?i:r,r=a?r:i;var l=0,s=n[0];if(i="element"===t.type?0:t.offset,"text"===t.type&&i===s.getTextContentSize()&&(l=1,s=n[1],i=0),null!=s){a=s.getFormatFlags(e,null);var u=o-1,c=n[u];if(o="text"===r.type?r.offset:c.getTextContentSize(),s.is(c))i!==o&&(0===i&&o===s.getTextContentSize()?s.setFormat(a):(e=s.splitText(i,o),(e=0===i?e[0]:e[1]).setFormat(a),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,o-i,"text")),this.format=a);else{0!==i&&([,s]=s.splitText(i),i=0),s.setFormat(a);var d=c.getFormatFlags(e,a);for(0<o&&(o!==c.getTextContentSize()&&([c]=c.splitText(o)),c.setFormat(d)),l+=1;l<u;l++){let t=n[l];if(!t.isToken()){let n=t.getFormatFlags(e,d);t.setFormat(n)}}"text"===t.type&&t.set(s.__key,i,"text"),"text"===r.type&&r.set(c.__key,o,"text"),this.format=a|d}}}}}insertNodes(e,t){if(!this.isCollapsed()){var n=this.isBackward()?this.anchor:this.focus,r=n.getNode().getNextSibling();if(r=r?r.getKey():null,n=(n=n.getNode().getPreviousSibling())?n.getKey():null,this.removeText(),this.isCollapsed()&&"element"===this.focus.type){if(this.focus.key===r&&0===this.focus.offset){var o=Nn();this.focus.getNode().insertBefore(o)}else this.focus.key===n&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Nn(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}n=(o=this.anchor).offset;var i=o.getNode();r=i,"element"===o.type&&(r=null===(r=(o=o.getNode()).getChildAtIndex(n-1))?o:r),o=[];var a=i.getNextSiblings(),l=et(i)?null:i.getTopLevelElementOrThrow();if(Rn(i))if(r=i.getTextContent().length,0===n&&0!==r)r=null!==(r=i.getPreviousSibling())?r:i.getParentOrThrow(),o.push(i);else if(n===r)r=i;else{if(i.isToken())return!1;[r,i]=i.splitText(n),o.push(i)}i=r,o.push(...a),a=e[0];var s=!1,u=null;for(let t=0;t<e.length;t++){var c=e[t];if(et(r)||Ar(r)||!Rr(c)||c.isInline())s&&!Rr(c)&&!Ar(c)&&et(r.getParent())&&P(28);else{if(c.is(a)){if(Rr(r)&&r.isEmpty()&&r.canReplaceWith(c)){r.replace(c),r=c,s=!0;continue}if(Ce(s=c.getFirstDescendant())){for(var d=s.getParentOrThrow();d.isInline();)d=d.getParentOrThrow();if(s=(u=d.getChildren()).length,Rr(r)){var p=r.getFirstChild();for(let e=0;e<s;e++){let t=u[e];null===p?r.append(t):p.insertAfter(t),p=t}}else{for(p=s-1;0<=p;p--)r.insertAfter(u[p]);r=r.getParentOrThrow()}if(u=u[s-1],d.remove(),s=!0,d.is(c))continue}}Rn(r)&&(null===l&&P(27),r=l)}s=!1,Rr(r)&&!r.isInline()?(u=c,Ar(c)&&!c.isInline()?r=r.insertAfter(c,!1):Rr(c)?!c.canBeEmpty()&&c.isEmpty()||(Or(r)?(null!==(d=r.getChildAtIndex(n))?d.insertBefore(c):r.append(c),r=c):c.isInline()?(r.append(c),r=c):r=r.insertAfter(c,!1)):(null!==(d=r.getFirstChild())?d.insertBefore(c):r.append(c),r=c)):!Rr(c)||Rr(c)&&c.isInline()||Ar(r)&&!r.isInline()?(u=c,Bn(this)&&Ar(c)&&(Rr(r)||Rn(r))&&!c.isInline()?(Rn(r)?(d=r.getParentOrThrow(),[r]=r.splitText(n),r=r.getIndexWithinParent()+1):(d=r,r=n),[,r]=lt(d,r),r=r.insertBefore(c)):r=r.insertAfter(c,!1)):(c=r.getParentOrThrow(),hn(r)&&r.remove(),r=c,t--)}if(t&&(Rn(i)?i.select():Rn(e=r.getPreviousSibling())?e.select():(e=r.getIndexWithinParent(),r.getParentOrThrow().select(e,e))),Rr(r)){if(e=Rn(u)?u:Rr(u)&&u.isInline()?u.getLastDescendant():r.getLastDescendant(),t||(null===e?r.select():Rn(e)?""===e.getTextContent()?e.selectPrevious():e.select():e.selectNext()),0!==o.length)for(t=r,e=o.length-1;0<=e;e--)l=(n=o[e]).getParentOrThrow(),!Rr(r)||Jn(n)||Ar(n)&&(!n.isInline()||n.isIsolated())?Rr(r)||Jn(n)?Rr(n)&&!n.canInsertAfter(r)?(Rr(i=l.constructor.clone(l))||P(29),i.append(n),r.insertAfter(i)):r.insertAfter(n):(r.insertBefore(n),r=n):(t===r?r.append(n):r.insertBefore(n),r=n),l.isEmpty()&&!l.canBeEmpty()&&l.remove()}else t||(Rn(r)?r.select():(t=r.getParentOrThrow(),e=r.getIndexWithinParent()+1,t.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,t=e.offset,n=[];if("text"===e.type){var r=e.getNode(),o=r.getNextSiblings().reverse(),i=r.getParentOrThrow(),a=i.isInline(),l=a?i.getTextContentSize():r.getTextContentSize();0===t?o.push(r):(a&&(n=i.getNextSiblings()),t===l||a&&t===r.getTextContentSize()||([,r]=r.splitText(t),o.push(r)))}else{if(et(i=e.getNode()))return o=Br(),n=i.getChildAtIndex(t),o.select(),void(null!==n?n.insertBefore(o,!1):i.append(o));o=i.getChildren().slice(t).reverse()}if(r=o.length,0===t&&0<r&&i.isInline()){if(Rr(o=(n=i.getParentOrThrow()).insertNewAfter(this,!1)))for(n=n.getChildren(),i=0;i<n.length;i++)o.append(n[i])}else if(null===(a=i.insertNewAfter(this,!1)))this.insertLineBreak();else if(Rr(a))if(l=i.getFirstChild(),0===t&&(i.is(e.getNode())||l&&l.is(e.getNode()))&&0<r)i.insertBefore(a);else{if(i=null,t=n.length,e=a.getParentOrThrow(),0<t)for(l=0;l<t;l++)e.append(n[l]);if(0!==r)for(n=0;n<r;n++)t=o[n],null===i?a.append(t):i.insertBefore(t),i=t;a.canBeEmpty()||0!==a.getChildrenSize()?a.selectStart():(a.selectPrevious(),a.remove())}}insertLineBreak(e){let t=fn();var n=this.anchor;"element"===n.type&&(Or(n=n.getNode())&&this.insertParagraph()),e?this.insertNodes([t],!0):this.insertNodes([t])&&t.selectNext(0,0)}getCharacterOffsets(){return Kn(this)}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let o=this.focus;var i=e[0];let a=e[n],[l,s]=Kn(this);return 0===t?[]:1===t?Rn(i)&&!this.isCollapsed()?(e=l>s?s:l,n=i.splitText(e,l>s?l:s),null!=(e=0===e?n[0]:n[1])?[e]:[]):[i]:(t=r.isBefore(o),Rn(i)&&((r=t?l:s)===i.getTextContentSize()?e.shift():0!==r&&([,i]=i.splitText(r),e[0]=i)),Rn(a)&&(i=a.getTextContent().length,0===(t=t?s:l)?e.pop():t!==i&&([a]=a.splitText(t),e[n]=a)),e)}modify(e,t,n){var r=this.focus,o=this.anchor,i="move"===e,a=Ye(r,t);if(Ar(a)&&!a.isIsolated())i&&a.isKeyboardSelectable()?((t=Zn()).add(a.__key),Pe(t)):Rn(e=t?a.getPreviousSibling():a.getNextSibling())?(a=e.__key,t=t?e.getTextContent().length:0,r.set(a,t,"text"),i&&o.set(a,t,"text")):(n=a.getParentOrThrow(),Rr(e)?(n=e.__key,a=t?e.getChildrenSize():0):(a=a.getIndexWithinParent(),n=n.__key,t||a++),r.set(n,a,"element"),i&&o.set(n,a,"element"));else if(r=at((o=vr())._window)){var l=o._blockCursorElement,s=o._rootElement;if(null===s||null===l||!Rr(a)||a.isInline()||a.canBeEmpty()||it(l,o,s),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(a=r.getRangeAt(0),o=Or(o=this.anchor.getNode())?o:Ze(o),this.applyDOMRange(a),this.dirty=!0,!i)){for(i=this.getNodes(),e=[],n=!1,l=0;l<i.length;l++)Je(s=i[l],o)?e.push(s):n=!0;n&&0<e.length&&(t?Rr(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():Rr(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),r.anchorNode===a.startContainer&&r.anchorOffset===a.startOffset||(t=this.focus,r=(i=this.anchor).key,a=i.offset,o=i.type,$n(i,t.key,t.offset,t.type),$n(t,r,a,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&("element"===r.type&&Rr(i)&&r.offset===i.getChildrenSize()||"text"===r.type&&r.offset===i.getTextContentSize())){var a=i.getParent();if(Rr(a=i.getNextSibling()||(null===a?null:a.getNextSibling()))&&a.isShadowRoot())return}if(Ar(a=Ye(o,t))&&!a.isIsolated())return void(a.isKeyboardSelectable()&&Rr(i)&&0===i.getChildrenSize()?(i.remove(),t=Zn(),t.add(a.__key),Pe(t)):(a.remove(),vr().dispatchCommand(e,void 0)));if(!t&&Rr(a)&&Rr(i)&&i.isEmpty())return i.remove(),void a.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&0===r.offset&&("element"===r.type?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(a="text"===o.type?o.getNode():null,i="text"===r.type?r.getNode():null,null!==a&&a.isSegmented()){if(r=o.offset,o=a.getTextContentSize(),a.is(i)||t&&r!==o||!t&&0!==r)return void Yn(a,t,r)}else if(null!==i&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(a)||t&&0!==r||!t&&r!==o))return void Yn(i,t,r);if(i=this.anchor,a=this.focus,(r=i.getNode())===(o=a.getNode())&&"text"===i.type&&"text"===a.type){var l=i.offset,s=a.offset;let e=l<s;(o=e?l:s)!==(l=(s=e?s:l)-1)&&($e(r=r.getTextContent().slice(o,s))||(t?a.offset=l:i.offset=l))}}}this.removeText(),t&&!n&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((t=this.anchor.getNode()).isEmpty()&&Or(t.getParent())&&0===t.getIndexWithinParent()&&t.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function Wn(e){return e instanceof zn}function Gn(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function Kn(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[Gn(t),Gn(e)]}function Yn(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,a=0;for(let e=0;e<o;e++){let l=e===o-1;if(a=i,i+=r[e].length,t&&i===n||i>n||l){r.splice(e,1),l&&(a=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(a,a))}function Un(e,t,n,r){var o=t;if(1===e.nodeType){let l=!1;var i=e.childNodes,a=i.length;o===a&&(l=!0,o=a-1);let s=i[o];if(a=!1,s===r._blockCursorElement?(s=i[o+1],a=!0):null!==r._blockCursorElement&&o--,Rn(r=De(s)))o=l?r.getTextContentSize():0;else{if(null===(i=De(e)))return null;if(Rr(i)?((t=Rr(e=i.getChildAtIndex(o)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=l?e.getLastDescendant():e.getFirstDescendant())?(i=e,o=0):i=Rr(e=n)?e:e.getParentOrThrow()),Rn(e)?(r=e,i=null,o=l?e.getTextContentSize():0):e!==i&&l&&!a&&o++):(o=i.getIndexWithinParent(),o=0===t&&Ar(i)&&De(e)===i?o:o+1,i=i.getParentOrThrow()),Rr(i))return new On(i.__key,o,"element")}}else r=De(e);return Rn(r)?new On(r.__key,o,"text"):null}function Vn(e,t,n){var r=e.offset,o=e.getNode();0===r?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&null===r&&Rr(o)&&o.isInline()&&(Rn(t=o.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):Rr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rn(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&Rr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Rr(o)&&o.isInline()&&!o.canInsertTextAfter()&&(Rn(t=o.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function qn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let o=e.is(t);Vn(e,r,o),Vn(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=vr()).isComposing()&&r._compositionKey!==e.key&&Bn(n)&&(r=n.anchor,n=n.focus,$n(e,r.key,r.offset,r.type),$n(t,n.key,n.offset,n.type))}}function Qn(e,t,n,r,o,i){return null!==e&&null!==n&&be(o,e,n)?null===(t=Un(e,t,Bn(i)?i.anchor:null,o))||null===(r=Un(n,r,Bn(i)?i.focus:null,o))||"element"===t.type&&"element"===r.type&&(e=De(e),n=De(n),Ar(e)&&Ar(n))?null:(qn(t,r,i),[t,r]):null}function Jn(e){return Rr(e)&&!e.isInline()}function Xn(e,t,n,r,o,i){let a=gr();return(e=new jn(new On(e,t,o),new On(n,r,i),0,"")).dirty=!0,a._selection=e}function Zn(){return new zn(new Set)}function er(e,t,n){var r=n._window;if(null===r)return null;var o=r.event,i=o?o.type:void 0;let a;if(r="selectionchange"===i,o=!re&&(r||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&o&&3===o.detail||"drop"===i||void 0===i),Bn(e)&&!o)return e.clone();if(null===t)return null;if(o=t.anchorNode,i=t.focusNode,a=t.anchorOffset,t=t.focusOffset,r&&Bn(e)&&!be(n,o,i))return e.clone();if(null===(n=Qn(o,a,i,t,n,e)))return null;let[l,s]=n;return new jn(l,s,Bn(e)?e.format:0,Bn(e)?e.style:"")}function tr(){return gr()._selection}function nr(){return vr()._editorState._selection}function rr(e,t,n,r=1){var o=e.anchor,i=e.focus,a=o.getNode(),l=i.getNode();if(t.is(a)||t.is(l)){if(a=t.__key,e.isCollapsed())(n<=(t=o.offset)&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(a,n,"element"),i.set(a,n,"element"),or(e));else{let u=e.isBackward();var s=(l=u?i:o).getNode();i=(o=u?o:i).getNode(),t.is(s)&&((n<=(s=l.offset)&&0<r||n<s&&0>r)&&l.set(a,Math.max(0,s+r),"element")),t.is(i)&&((n<=(t=o.offset)&&0<r||n<t&&0>r)&&o.set(a,Math.max(0,t+r),"element"))}or(e)}}function or(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed())Rr(i)&&(Rn(a=(o=n>=(a=i.getChildrenSize()))?i.getChildAtIndex(a-1):i.getChildAtIndex(n))&&(n=0,o&&(n=a.getTextContentSize()),t.set(a.__key,n,"text"),r.set(a.__key,n,"text")));else{if(Rr(i)){let r=i.getChildrenSize();Rn(n=(e=n>=r)?i.getChildAtIndex(r-1):i.getChildAtIndex(n))&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}Rr(a)&&(Rn(o=(t=o>=(n=a.getChildrenSize()))?a.getChildAtIndex(n-1):a.getChildAtIndex(o))&&(a=0,t&&(a=o.getTextContentSize()),r.set(o.__key,a,"text")))}}function ir(e,t,n,r,o){let i=null,a=0,l=null;null!==r?(i=r.__key,Rn(r)?(a=r.getTextContentSize(),l="text"):Rr(r)&&(a=r.getChildrenSize(),l="element")):null!==o&&(i=o.__key,Rn(o)?l="text":Rr(o)&&(l="element")),null!==i&&null!==l?e.set(i,a,l):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function ar(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function lr(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var a=e[c];Ur(a)||P(108);var l=a.getChildren();a=0;for(let e of l){for(Wr(e)||P(109);void 0!==r[c]&&void 0!==r[c][a];)a++;var s=a,u=e;let d={cell:u,startColumn:s,startRow:l=c},p=u.__rowSpan,f=u.__colSpan;for(let e=0;e<p;e++){void 0===r[l+e]&&(r[l+e]=[]);for(let t=0;t<f;t++)r[l+e][s+t]=d}t.is(u)&&(o=d),n.is(u)&&(i=d),a+=e.__colSpan}}return null===o&&P(110),null===i&&P(111),[r,o,i]}let sr=null,ur=null,cr=!1,dr=!1,pr=0,fr={characterData:!0,childList:!0,subtree:!0};function hr(){return cr||null!==sr&&sr._readOnly}function mr(){cr&&P(13)}function gr(){return null===sr&&P(15),sr}function vr(){return null===ur&&P(16),ur}function br(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(void 0===o&&P(30,r),void 0===(e=n.get(r))&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function yr(e,t){var n=e.type,r=t.get(n);if(void 0===r&&P(17,n),n=r.klass,e.type!==n.getType()&&P(18,n.name),n=n.importJSON(e),e=e.children,Rr(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=yr(e[r],t);n.append(o)}return n}function xr(e,t){let n=sr,r=cr,o=ur;sr=e,cr=!0,ur=null;try{return t()}finally{sr=n,cr=r,ur=o}}function _r(t,n){let r=t._pendingEditorState,o=t._rootElement,i=t._headless||null===o;if(null!==r){var a=t._editorState,l=a._selection,s=r._selection,u=0!==t._dirtyType,c=sr,d=cr,p=ur,f=t._updating,h=t._observer,m=null;if(t._pendingEditorState=null,t._editorState=r,!i&&u&&null!==h){ur=t,sr=r,cr=!1,t._updating=!0;try{let e=t._dirtyType,n=t._dirtyElements,o=t._dirtyLeaves;h.disconnect();var g=n,v=o;Et=Ct=_t="",St=2===e,kt=null,pt=t,dt=t._config,ft=t._nodes,ht=pt._listeners.mutation,mt=g,gt=v,vt=a._nodeMap,bt=r._nodeMap,wt=r._readOnly,yt=new Map(t._keyToDOMMap);let i=new Map;xt=i,zt("root",null),xt=yt=dt=bt=vt=gt=mt=ft=pt=void 0,m=i}catch(e){if(e instanceof Error&&t._onError(e),dr)throw e;return Fr(t,null,o,r),ue(t),t._dirtyType=2,dr=!0,_r(t,a),void(dr=!1)}finally{h.observe(o,fr),t._updating=f,sr=c,cr=d,ur=p}}r._readOnly||(r._readOnly=!0);var b=t._dirtyLeaves,y=t._dirtyElements,x=t._normalizedNodes,_=t._updateTags,E=t._deferred;u&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var C,S=t._decorators,w=t._pendingDecorators||S,k=r._nodeMap;for(C in w)k.has(C)||(w===S&&(w=Le(t)),delete w[C]);var T=i?null:at(t._window);if(t._editable&&null!==T&&(u||null===s||s.dirty)){ur=t,sr=r;try{if(null!==h&&h.disconnect(),u||null===s||s.dirty){let e=t._blockCursorElement;null!==e&&it(e,t,o);e:{let e=T.anchorNode,n=T.focusNode,r=T.anchorOffset,i=T.focusOffset,a=document.activeElement;if(!(_.has("collaboration")&&a!==o||null!==a&&ve(a)))if(Bn(s)){var A=s.anchor,N=s.focus,R=A.key,M=N.key,L=qe(t,R),O=qe(t,M),I=A.offset,P=N.offset,D=s.format,$=s.style,z=s.isCollapsed(),B=L,F=O,H=!1;if("text"===A.type){B=_e(L);let e=A.getNode();H=e.getFormat()!==D||e.getStyle()!==$}else Bn(l)&&"text"===l.anchor.type&&(H=!0);if("text"===N.type&&(F=_e(O)),null!==B&&null!==F){if(z&&(null===l||H||Bn(l)&&(l.format!==D||l.style!==$))){var j=performance.now();Zt=[D,$,I,R,j]}if(r===I&&i===P&&e===B&&n===F&&("Range"!==T.type||!z)&&(null!==a&&o.contains(a)||o.focus({preventScroll:!0}),"element"!==A.type))break e;try{T.setBaseAndExtent(B,I,F,P)}catch(e){}if(!_.has("skip-scroll-into-view")&&s.isCollapsed()&&null!==o&&o===document.activeElement){let e=s instanceof jn&&"element"===s.anchor.type?B.childNodes[I]||null:0<T.rangeCount?T.getRangeAt(0):null;if(null!==e){let n;if(e instanceof Text){let t=document.createRange();t.selectNode(e),n=t.getBoundingClientRect()}else n=e.getBoundingClientRect();let r=o.ownerDocument,i=r.defaultView;if(null!==i)for(var W,G,{top:K,bottom:Y}=n,U=o;null!==U;){let e=U===r.body;if(e)W=0,G=Xe(t).innerHeight;else{let e=U.getBoundingClientRect();W=e.top,G=e.bottom}let n=0;if(K<W?n=-(W-K):Y>G&&(n=Y-G),0!==n)if(e)i.scrollBy(0,n);else{let e=U.scrollTop;U.scrollTop+=n;let t=U.scrollTop-e;K-=t,Y-=t}if(e)break;U=Qe(U)}}}qt=!0}}else null!==l&&be(t,e,n)&&T.removeAllRanges()}}e:{let e=t._blockCursorElement;if(Bn(s)&&s.isCollapsed()&&"element"===s.anchor.type&&o.contains(document.activeElement)){let n=s.anchor,r=n.getNode(),i=n.offset,a=r.getChildrenSize(),l=!1,u=null;if(i===a){ot(r.getChildAtIndex(i-1))&&(l=!0)}else{let e=r.getChildAtIndex(i);if(ot(e)){let n=e.getPreviousSibling();(null===n||ot(n))&&(l=!0,u=t.getElementByKey(e.__key))}}if(l){let n=t.getElementByKey(r.__key);if(null===e){let n=t._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let o=n.blockCursor;if(void 0!==o){if("string"==typeof o){let e=o.split(" ");o=n.blockCursor=e}void 0!==o&&r.classList.add(...o)}t._blockCursorElement=e=r}o.style.caretColor="transparent",null===u?n.appendChild(e):n.insertBefore(e,u);break e}}null!==e&&it(e,t,o)}null!==h&&h.observe(o,fr)}finally{ur=p,sr=c}}if(null!==m){var V=m;let e=Array.from(t._listeners.mutation),n=e.length;for(let t=0;t<n;t++){let[n,r]=e[t],o=V.get(r);void 0!==o&&n(o,{dirtyLeaves:b,updateTags:_})}}Bn(s)||null===s||null!==l&&l.is(s)||t.dispatchCommand(e,void 0);var q=t._pendingDecorators;null!==q&&(t._decorators=q,t._pendingDecorators=null,Er("decorator",t,!0,q));var Q=Oe(n||a),J=Oe(r);if(Q!==J&&Er("textcontent",t,!0,J),Er("update",t,!0,{dirtyElements:y,dirtyLeaves:b,editorState:r,normalizedNodes:x,prevEditorState:n||a,tags:_}),t._deferred=[],0!==E.length){let e=t._updating;t._updating=!0;try{for(let e=0;e<E.length;e++)E[e]()}finally{t._updating=e}}var X=t._updates;if(0!==X.length){let e=X.shift();if(e){let[n,r]=e;wr(t,n,r)}}}}function Er(e,t,n,...r){let o=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Cr(e,t,n){if(!1===e._updating||ur!==e){let r=!1;return e.update((()=>{r=Cr(e,t,n)})),r}let r=ze(e);for(let i=4;0<=i;i--)for(let a=0;a<r.length;a++){var o=r[a]._commands.get(t);if(void 0!==o&&void 0!==(o=o[i])){let t=(o=Array.from(o)).length;for(let r=0;r<t;r++)if(!0===o[r](n,e))return!0}}return!1}function Sr(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[o,i]=r;void 0!==i&&(r=i.onUpdate,n=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),o()}}return t}function wr(e,t,n){let r=e._updateTags;var o,i=o=!1;if(void 0!==n){var a=n.onUpdate;null!=(o=n.tag)&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}a&&e._deferred.push(a),n=e._editorState;let l=!1;(null===(a=e._pendingEditorState)||a._readOnly)&&(a=e._pendingEditorState=new Dr(new Map((a||n)._nodeMap)),l=!0),a._flushSync=i,i=sr;let s=cr,u=ur,c=e._updating;sr=a,cr=!1,e._updating=!0,ur=e;try{l&&(e._headless?null!=n._selection&&(a._selection=n._selection.clone()):a._selection=function(e){let t=e.getEditorState()._selection,n=at(e._window);return Wn(t)||Hn(t)?t.clone():er(t,n,e)}(e));let r=e._compositionKey;t(),o=Sr(e,o),function(e,t){if(t=t.getEditorState()._selection,Bn(e=e._selection)){var n=e.anchor;let r,o=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===o.type&&r!==(n=o.getNode())&&n.selectionTransform(t,e)}}(a,e),0!==e._dirtyType&&(o?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)Rn(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&pe(t)}(a,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=Ae(),i=new Map;var a=n;let l=a.size;for(var s=r,u=s.size;0<l||0<u;){if(0<l){t._dirtyLeaves=new Set;for(let r of a)Rn(a=e.get(r))&&a.isAttached()&&a.isSimpleText()&&!a.isUnmergeable()&&pe(a),void 0!==a&&void 0!==a&&a.__key!==o&&a.isAttached()&&br(t,a,i),n.add(r);if(l=(a=t._dirtyLeaves).size,0<l){pr++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of s)s=n[0],u=n[1],("root"===s||u)&&(void 0!==(a=e.get(s))&&void 0!==a&&a.__key!==o&&a.isAttached()&&br(t,a,i),r.set(s,u));l=(a=t._dirtyLeaves).size,u=(s=t._dirtyElements).size,pr++}t._dirtyLeaves=n,t._dirtyElements=r}(a,e),Sr(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[n]of r){let i=t.get(n);void 0===i||i.isAttached()||(Rr(i)&&ct(i,n,e,t,o,r),e.has(n)||r.delete(n),o.push(n))}for(let e of o)t.delete(e);for(let o of n)void 0===(r=t.get(o))||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}(n,a,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(a._flushSync=!0);let i=a._selection;if(Bn(i)){let e=a._nodeMap,t=i.focus.key;void 0!==e.get(i.anchor.key)&&void 0!==e.get(t)||P(19)}else Wn(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void _r(e)}finally{sr=i,cr=s,ur=u,e._updating=c,pr=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,e=e._selection,null!==e){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,_r(e)):l&&ge((()=>{_r(e)})):(a._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kr(e,t,n){e._updating?e._updates.push([t,n]):wr(e,t,n)}class Tr extends cn{constructor(e){super(e)}decorate(){P(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ar(e){return e instanceof Tr}class Nr extends cn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return ee[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=vr()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(Rn(t)&&e.push(t),Rr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Rr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Rr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Rr(e=t[n-1])&&e.getLastDescendant()||e||null:Rr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Ne(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&P(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Ne(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&P(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContent(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContentSize(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Z[e],!!(this.getFormat()&e))}select(e,t){mr();let n=tr(),r=e,o=t;var i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(Rn(e=this.getFirstChild())||Rr(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)&&(Rn(e=this.getLastChild())||Rr(e)))return e.select();return void 0===r&&(r=i),void 0===o&&(o=i),i=this.__key,Bn(n)?(n.anchor.set(i,r,"element"),n.focus.set(i,o,"element"),n.dirty=!0,n):Xn(i,r,i,o,"element","element")}selectStart(){let e=this.getFirstDescendant();return Rr(e)||Rn(e)?e.select(0,0):null!==e?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return Rr(e)||Rn(e)?e.select():null!==e?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Z[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key;var l=[],s=[];let u=this.getChildAtIndex(e+t),c=null,d=o-t+r;if(0!==e)if(e===o)c=this.getLastChild();else{var p=this.getChildAtIndex(e);null!==p&&(c=p.getPreviousSibling())}if(0<t){var f=null===c?this.getFirstChild():c.getNextSibling();for(p=0;p<t;p++){null===f&&P(100);var h=f.getNextSibling(),m=f.__key;we(f=f.getWritable()),s.push(m),f=h}}for(p=c,h=0;h<r;h++){m=n[h],null!==p&&m.is(p)&&(c=p=p.getPreviousSibling()),(f=m.getWritable()).__parent===a&&d--,we(f);let e=m.__key;null===p?(i.__first=e,f.__prev=null):((p=p.getWritable()).__next=e,f.__prev=p.__key),m.__key===a&&P(76),f.__parent=a,l.push(e),p=m}if(e+t===o?null!==p&&(p.getWritable().__next=null,i.__last=p.__key):null!==u&&(e=u.getWritable(),null!==p?(t=p.getWritable(),e.__prev=p.__key,t.__next=u.__key):e.__prev=null),i.__size=d,s.length&&Bn(e=tr())){s=new Set(s),l=new Set(l);let{anchor:t,focus:n}=e;Mr(t,s,l)&&ir(t,t.getNode(),this,c,u),Mr(n,s,l)&&ir(n,n.getNode(),this,c,u),0!==d||this.canBeEmpty()||et(this)||this.remove()}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Rr(e){return e instanceof Nr}function Mr(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Lr extends Nr{static getType(){return"root"}static clone(){return new Lr}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){P(51)}getTextContent(){let e=this.__cachedText;return!hr()&&0!==vr()._dirtyType||null===e?super.getTextContent():e}remove(){P(52)}replace(){P(53)}insertBefore(){P(54)}insertAfter(){P(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];Rr(n)||Ar(n)||P(56)}return super.append(...e)}static importJSON(e){let t=Ie();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Or(e){return e instanceof Lr}function Ir(){return new Dr(new Map([["root",new Lr]]))}function Pr(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&P(130,n.name);let r=t.children;if(Rr(e))for(Array.isArray(r)||P(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let t=Pr(e[n]);r.push(t)}return t}class Dr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return xr(this,e)}clone(e){return(e=new Dr(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return xr(this,(()=>({root:Pr(Ie())})))}}class $r extends Nr{static getType(){return"paragraph"}static clone(e){return new $r(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=We(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:zr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Br();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Br();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||Rn(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function zr(e){let t=Br();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Br(){return nt(new $r)}function Fr(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=Ir(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Hr{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Be(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&P(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=r.get(e);void 0===o&&P(36,String(e));let i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&P(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&P(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){kr(e,(()=>{var e=gr();if(!e.isEmpty())if("root"===t)Ie().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.getType()),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Cr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=We(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Fr(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==Vt&&(Vt--,0===Vt&&t.ownerDocument.removeEventListener("selectionchange",sn));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var o=ze(r);o=o[o.length-1]._key,ln.get(o)===r&&ln.delete(o)}else ln.delete(r._key);t.__lexicalEditor=null}for(r=an(t),o=0;o<r.length;o++)r[o]();t.__lexicalEventHandles=[]}null!=i&&t.classList.remove(...i)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ue(this),this._updateTags.add("history-merge"),_r(this),this._config.disableEvents||function(e,t){0===Vt&&e.ownerDocument.addEventListener("selectionchange",sn),Vt++,e.__lexicalEditor=t;let n=an(e);for(let r=0;r<Wt.length;r++){let[o,i]=Wt[r],l="function"==typeof i?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&i(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return Cr(t,M,e);case"copy":return Cr(t,R,e);case"paste":return Cr(t,a,e);case"dragstart":return Cr(t,T,e);case"dragover":return Cr(t,A,e);case"dragend":return Cr(t,N,e);case"focus":return Cr(t,L,e);case"blur":return Cr(t,O,e);case"drop":return Cr(t,k,e)}};e.addEventListener(o,l),n.push((()=>{e.removeEventListener(o,l)}))}}(e,this),null!=i&&e.classList.add(...i)):(this._editorState=n,this._window=this._pendingEditorState=null),Er("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&P(38),se(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),_r(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),_r(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Ir(),r=sr,o=cr,i=ur,a=this._dirtyElements,l=this._dirtyLeaves,s=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,sr=n,cr=!1,ur=this;try{yr(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(e){e instanceof Error&&this._onError(e)}finally{this._dirtyElements=a,this._dirtyLeaves=l,this._cloneNotNeeded=s,this._dirtyType=u,sr=r,cr=o,ur=i}return n}update(e,t){kr(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),kr(this,(()=>{let e=tr(),n=Ie();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=at(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Er("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class jr extends Nr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Wr(e){return e instanceof jr}class Gr extends Nr{}function Kr(e){return e instanceof Gr}class Yr extends Nr{}function Ur(e){return e instanceof Yr}return X.$addUpdateTag=function(e){mr(),vr()._updateTags.add(e)},X.$applyNodeReplacement=nt,X.$copyNode=tt,X.$createLineBreakNode=fn,X.$createNodeSelection=Zn,X.$createParagraphNode=Br,X.$createRangeSelection=function(){let e=new On("root",0,"element"),t=new On("root",0,"element");return new jn(e,t,0,"")},X.$createTabNode=Ln,X.$createTextNode=Nn,X.$getAdjacentNode=Ye,X.$getNearestNodeFromDOMNode=Me,X.$getNearestRootOrShadowRoot=Ze,X.$getNodeByKey=Ne,X.$getPreviousSelection=nr,X.$getRoot=Ie,X.$getSelection=tr,X.$getTextContent=function(){let e=tr();return null===e?"":e.getTextContent()},X.$hasAncestor=Je,X.$hasUpdateTag=function(e){return vr()._updateTags.has(e)},X.$insertNodes=function(e,t){let n=tr()||nr();return null===n&&(n=Ie().selectEnd()),n.insertNodes(e,t)},X.$isBlockElementNode=Jn,X.$isDecoratorNode=Ar,X.$isElementNode=Rr,X.$isInlineElementOrDecoratorNode=function(e){return Rr(e)&&e.isInline()||Ar(e)&&e.isInline()},X.$isLeafNode=Ce,X.$isLineBreakNode=hn,X.$isNodeSelection=Wn,X.$isParagraphNode=function(e){return e instanceof $r},X.$isRangeSelection=Bn,X.$isRootNode=Or,X.$isRootOrShadowRoot=et,X.$isTabNode=function(e){return e instanceof Mn},X.$isTextNode=Rn,X.$nodesOfType=function(e){var t=gr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o},X.$normalizeSelection__EXPERIMENTAL=fe,X.$parseSerializedNode=function(e){return yr(e,vr()._nodes)},X.$setCompositionKey=Te,X.$setSelection=Pe,X.$splitNode=lt,X.BLUR_COMMAND=O,X.CAN_REDO_COMMAND={},X.CAN_UNDO_COMMAND={},X.CLEAR_EDITOR_COMMAND={},X.CLEAR_HISTORY_COMMAND={},X.CLICK_COMMAND=t,X.COMMAND_PRIORITY_CRITICAL=4,X.COMMAND_PRIORITY_EDITOR=0,X.COMMAND_PRIORITY_HIGH=3,X.COMMAND_PRIORITY_LOW=1,X.COMMAND_PRIORITY_NORMAL=2,X.CONTROLLED_TEXT_INSERTION_COMMAND=i,X.COPY_COMMAND=R,X.CUT_COMMAND=M,X.DELETE_CHARACTER_COMMAND=n,X.DELETE_LINE_COMMAND=u,X.DELETE_WORD_COMMAND=s,X.DEPRECATED_$computeGridMap=lr,X.DEPRECATED_$createGridSelection=function(){let e=new On("root",0,"element"),t=new On("root",0,"element");return new Fn("root",e,t)},X.DEPRECATED_$getNodeTriplet=function(e){e instanceof jr||(e instanceof cn?Wr(e=st(e,Wr))||P(114):Wr(e=st(e.getNode(),Wr))||P(114));let t=e.getParent();Ur(t)||P(115);let n=t.getParent();return Kr(n)||P(116),[e,t,n]},X.DEPRECATED_$isGridCellNode=Wr,X.DEPRECATED_$isGridNode=Kr,X.DEPRECATED_$isGridRowNode=Ur,X.DEPRECATED_$isGridSelection=Hn,X.DEPRECATED_GridCellNode=jr,X.DEPRECATED_GridNode=Gr,X.DEPRECATED_GridRowNode=Yr,X.DRAGEND_COMMAND=N,X.DRAGOVER_COMMAND=A,X.DRAGSTART_COMMAND=T,X.DROP_COMMAND=k,X.DecoratorNode=Tr,X.ElementNode=Nr,X.FOCUS_COMMAND=L,X.FORMAT_ELEMENT_COMMAND={},X.FORMAT_TEXT_COMMAND=c,X.INDENT_CONTENT_COMMAND={},X.INSERT_LINE_BREAK_COMMAND=r,X.INSERT_PARAGRAPH_COMMAND=o,X.INSERT_TAB_COMMAND={},X.KEY_ARROW_DOWN_COMMAND=y,X.KEY_ARROW_LEFT_COMMAND=g,X.KEY_ARROW_RIGHT_COMMAND=h,X.KEY_ARROW_UP_COMMAND=b,X.KEY_BACKSPACE_COMMAND=E,X.KEY_DELETE_COMMAND=S,X.KEY_DOWN_COMMAND=f,X.KEY_ENTER_COMMAND=x,X.KEY_ESCAPE_COMMAND=C,X.KEY_MODIFIER_COMMAND=I,X.KEY_SPACE_COMMAND=_,X.KEY_TAB_COMMAND=w,X.LineBreakNode=dn,X.MOVE_TO_END=m,X.MOVE_TO_START=v,X.OUTDENT_CONTENT_COMMAND={},X.PASTE_COMMAND=a,X.ParagraphNode=$r,X.REDO_COMMAND=p,X.REMOVE_TEXT_COMMAND=l,X.RootNode=Lr,X.SELECTION_CHANGE_COMMAND=e,X.TabNode=Mn,X.TextNode=xn,X.UNDO_COMMAND=d,X.createCommand=function(){return{}},X.createEditor=function(e){var t=e||{},n=ur,r=t.theme||{};let o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=Ir(),l=t.namespace||(null!==o?o._config.namespace:Be()),s=t.editorState,u=[Lr,xn,dn,Mn,$r,...t.nodes||[]],c=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let t=u[n],r=null;var d=null;"function"!=typeof t&&(t=(d=t).replace,r=d.with,d=d.withKlass?d.withKlass:null);let o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),e.set(o,{klass:t,replace:r,replaceWithKlass:d,transforms:a})}return r=new Hr(a,o,e,{disableEvents:i,namespace:l,theme:r},c||console.error,function(e){let t=new Map,n=new Set;return e.forEach((e=>{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==s&&(r._pendingEditorState=s,r._dirtyType=2),r},X.getNearestEditorFromDOMNode=ye,X.isSelectionCapturedInDecoratorInput=ve,X.isSelectionWithinEditor=be,X}function ee(){if(B)return z;B=1;const e=Z();return z=e}function te(){if(j)return H;j=1;const e=function(){if(F)return J;F=1;var e=ee();let t=new Map;function n(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function r(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function o(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function i(e){let n=t.get(e);return void 0===n&&(n=o(e),t.set(e,n)),n}function a(e,n){var r=i("getStyle"in e?e.getStyle():e.style);n=Object.entries(n).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...r}),r=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(n),e.setStyle(r),t.set(r,n)}function l(t){for(;null!==t&&!e.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function s(t,n,r,o,i=null){if(0!==n.length){var a=n[0],s=new Map,u=[];(a=e.$isElementNode(a)?a:a.getParentOrThrow()).isInline()&&(a=a.getParentOrThrow());for(var c=!1;null!==a;){var d=a.getPreviousSibling();if(null!==d){a=d,c=!0;break}if(a=a.getParentOrThrow(),e.$isRootOrShadowRoot(a))break}d=new Set;for(var p=0;p<r;p++){var f=n[p];e.$isElementNode(f)&&0===f.getChildrenSize()&&d.add(f.getKey())}var h=new Set;for(p=0;p<r;p++){var m=(f=n[p]).getParent();if(null!==m&&m.isInline()&&(m=m.getParent()),null!==m&&e.$isLeafNode(f)&&!h.has(f.getKey())){if(f=m.getKey(),void 0===s.get(f)){let t=o();t.setFormat(m.getFormatType()),t.setIndent(m.getIndent()),u.push(t),s.set(f,t),m.getChildren().forEach((n=>{t.append(n),h.add(n.getKey()),e.$isElementNode(n)&&n.getChildrenKeys().forEach((e=>h.add(e)))})),l(m)}}else d.has(f.getKey())&&((m=o()).setFormat(f.getFormatType()),m.setIndent(f.getIndent()),u.push(m),f.remove(!0))}if(null!==i)for(n=0;n<u.length;n++)i.append(u[n]);if(n=null,e.$isRootOrShadowRoot(a))if(c)if(null!==i)a.insertAfter(i);else for(i=u.length-1;0<=i;i--)a.insertAfter(u[i]);else if(c=a.getFirstChild(),e.$isElementNode(c)&&(a=c),null===c)if(i)a.append(i);else for(i=0;i<u.length;i++)c=u[i],a.append(c),n=c;else if(null!==i)c.insertBefore(i);else for(a=0;a<u.length;a++)i=u[a],c.insertBefore(i),n=i;else if(i)a.insertAfter(i);else for(i=u.length-1;0<=i;i--)c=u[i],a.insertAfter(c),n=c;u=e.$getPreviousSelection(),e.$isRangeSelection(u)&&u.anchor.getNode().isAttached()&&u.focus.getNode().isAttached()?e.$setSelection(u.clone()):null!==n?n.selectEnd():t.dirty=!0}}function u(e,t,n,r){e.modify(t?"extend":"move",n,r)}function c(t){return t=t.anchor.getNode(),"rtl"===(e.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()}return J.$addNodeStyle=function(e){let n=o(e=e.getStyle());t.set(e,n)},J.$cloneWithProperties=function(t){let n=(t=t.getLatest()).constructor.clone(t);return n.__parent=t.__parent,n.__next=t.__next,n.__prev=t.__prev,e.$isElementNode(t)&&e.$isElementNode(n)?(n.__first=t.__first,n.__last=t.__last,n.__size=t.__size,n.__format=t.__format,n.__indent=t.__indent,n.__dir=t.__dir,n):(e.$isTextNode(t)&&e.$isTextNode(n)&&(n.__format=t.__format,n.__style=t.__style,n.__mode=t.__mode,n.__detail=t.__detail),n)},J.$getSelectionStyleValueForProperty=function(t,n,r=""){let o=null,a=t.getNodes();var l=t.anchor,s=t.focus,u=t.isBackward();let c=u?s.offset:l.offset;if(l=u?s.getNode():l.getNode(),""!==t.style&&null!==(t=i(t.style))&&n in t)return t[n];for(t=0;t<a.length;t++){var d=a[t];if((0===t||0!==c||!d.is(l))&&e.$isTextNode(d))if(s=n,u=r,s=null!==(d=i(d=d.getStyle()))&&d[s]||u,null===o)o=s;else if(o!==s){o="";break}}return null===o?r:o},J.$isAtNodeEnd=function(e){return"text"===e.type?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},J.$isParentElementRTL=c,J.$moveCaretSelection=u,J.$moveCharacter=function(e,t,n){let r=c(e);u(e,t,n?!r:r,"character")},J.$patchStyleText=function(t,n){var r=t.getNodes();let o=r.length-1,i=r[0],l=r[o];if(t.isCollapsed())a(t,n);else{var s=t.anchor,u=t.focus,c=i.getTextContent().length,d=u.offset,p=s.offset,f=s.isBefore(u),h=f?p:d;t=f?d:p;var m=f?s.type:u.type,g=f?u.type:s.type;if(s=f?u.key:s.key,e.$isTextNode(i)&&h===c&&(u=i.getNextSibling(),e.$isTextNode(u)&&(h=p=0,i=u)),1===r.length)e.$isTextNode(i)&&(h="element"===m?0:p>d?d:p)!==(t="element"===g?c:p>d?p:d)&&(0===h&&t===c?(a(i,n),i.select(h,t)):(r=i.splitText(h,t),a(r=0===h?r[0]:r[1],n),r.select(0,t-h)));else for(e.$isTextNode(i)&&h<i.getTextContentSize()&&(0!==h&&(i=i.splitText(h)[1]),a(i,n)),e.$isTextNode(l)&&(h=l.getTextContent().length,l.__key!==s&&0!==t&&(t=h),t!==h&&([l]=l.splitText(t)),0!==t&&a(l,n)),t=1;t<o;t++)c=(h=r[t]).getKey(),e.$isTextNode(h)&&c!==i.getKey()&&c!==l.getKey()&&!h.isToken()&&a(h,n)}},J.$selectAll=function(t){let n=t.anchor;t=t.focus;var r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();let o=r.getFirstDescendant();r=r.getLastDescendant();let i="element",a="element",l=0;e.$isTextNode(o)?i="text":e.$isElementNode(o)||null===o||(o=o.getParentOrThrow()),e.$isTextNode(r)?(a="text",l=r.getTextContentSize()):e.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),o&&r&&(n.set(o.getKey(),0,i),t.set(r.getKey(),l,a))},J.$setBlocksType=function(t,n){if("root"===t.anchor.key){n=n();var r=e.$getRoot();(t=r.getFirstChild())?t.replace(n,!0):r.append(n)}else for(r=t.getNodes(),t=t.anchor.getNode().getParentOrThrow(),-1===r.indexOf(t)&&r.push(t),t.isInline()&&(t=t.getParentOrThrow(),-1===r.indexOf(t)&&r.push(t)),t=0;t<r.length;t++){let a=r[t];var o=a;if(!e.$isElementNode(o)||e.$isRootOrShadowRoot(o))o=!1;else{var i=o.getFirstChild();i=null===i||e.$isTextNode(i)||i.isInline(),o=!o.isInline()&&!1!==o.canBeEmpty()&&i}o&&((o=n()).setFormat(a.getFormatType()),o.setIndent(a.getIndent()),a.replace(o,!0))}},J.$shouldOverrideDefaultCharacterSelection=function(t,n){return t=e.$getAdjacentNode(t.focus,n),e.$isDecoratorNode(t)&&!t.isIsolated()||e.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()},J.$sliceSelectedTextNodeContent=function(t,n){if(n.isSelected()&&!n.isSegmented()&&!n.isToken()&&(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t))){var r=t.anchor.getNode(),o=t.focus.getNode(),i=n.is(r),a=n.is(o);if(i||a){i=t.isBackward();let e,[l,s]=t.getCharacterOffsets();t=r.is(o),a=n.is(i?o:r),o=n.is(i?r:o),r=0,t?(r=l>s?s:l,e=l>s?l:s):a?(r=i?s:l,e=void 0):o&&(r=0,e=i=i?l:s),n.__text=n.__text.slice(r,e)}}return n},J.$wrapNodes=function(t,n,r=null){var o=t.getNodes();let i=o.length;var a=t.anchor;if(0===i||1===i&&"element"===a.type&&0===a.getNode().getChildrenSize()){o=(t="text"===a.type?a.getNode().getParentOrThrow():a.getNode()).getChildren();let e=n();e.setFormat(t.getFormatType()),e.setIndent(t.getIndent()),o.forEach((t=>e.append(t))),r&&(e=r.append(e)),t.replace(e)}else{a=null;var l=[];for(let u=0;u<i;u++){let i=o[u];e.$isRootOrShadowRoot(i)?(s(t,l,l.length,n,r),l=[],a=i):null===a||null!==a&&e.$hasAncestor(i,a)?l.push(i):(s(t,l,l.length,n,r),l=[i])}s(t,l,l.length,n,r)}},J.createDOMRange=function(t,o,i,a,l){let s=o.getKey(),u=a.getKey(),c=document.createRange(),d=t.getElementByKey(s);if(t=t.getElementByKey(u),e.$isTextNode(o)&&(d=n(d)),e.$isTextNode(a)&&(t=n(t)),void 0===o||void 0===a||null===d||null===t)return null;"BR"===d.nodeName&&([d,i]=r(d)),"BR"===t.nodeName&&([t,l]=r(t)),o=d.firstChild,d===t&&null!=o&&"BR"===o.nodeName&&0===i&&0===l&&(l=1);try{c.setStart(d,i),c.setEnd(t,l)}catch(e){return null}return!c.collapsed||i===l&&s===u||(c.setStart(t,l),c.setEnd(d,i)),c},J.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,o=(t=Array.from(t.getClientRects())).length;t.sort(((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let i=0;i<o;i++){let a=t[i],l=a.width+n===e.width;r&&r.top<=a.top&&r.top+r.height>a.top&&r.left+r.width>a.left||l?(t.splice(i--,1),o--):r=a}return t},J.getStyleObjectFromCSS=i,J.trimTextContentFromAnchor=function(t,n,r){let o=n.getNode();if(e.$isElementNode(o)){var i=o.getDescendantByIndex(n.offset);null!==i&&(o=i)}for(;0<r&&null!==o;){var a=o.getPreviousSibling(),l=0;if(null===a){for(var s=(i=o.getParentOrThrow()).getPreviousSibling();null===s;){if(null===(i=i.getParent())){a=null;break}s=i.getPreviousSibling()}null!==i&&(l=i.isInline()?0:2,a=e.$isElementNode(s)?s.getLastDescendant():s)}if(""===(s=o.getTextContent())&&e.$isElementNode(o)&&!o.isInline()&&(s="\n\n"),i=o.getTextContentSize(),!e.$isTextNode(o)||r>=i)s=o.getParent(),o.remove(),null==s||0!==s.getChildrenSize()||e.$isRootNode(s)||s.remove(),r-=i+l,o=a;else{let u=o.getKey();l=t.getEditorState().read((()=>{const t=e.$getNodeByKey(u);return e.$isTextNode(t)&&t.isSimpleText()?t.getTextContent():null})),a=i-r;let c=s.slice(0,a);null!==l&&l!==s?(r=e.$getPreviousSelection(),i=o,o.isSimpleText()?o.setTextContent(l):(i=e.$createTextNode(l),o.replace(i)),e.$isRangeSelection(r)&&r.isCollapsed()&&(r=r.anchor.offset,i.select(r,r))):o.isSimpleText()?(l=n.key===u,(s=n.offset)<r&&(s=i),r=l?s-r:0,i=l?s:a,l&&0===r?([r]=o.splitText(r,i),r.remove()):([,r]=o.splitText(r,i),r.remove())):(r=e.$createTextNode(c),o.replace(r)),r=0}}},J}();return H=e}function ne(){if(W)return Q;W=1;var e=te(),t=ee();function n(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function r(e,n){for(;e!==t.$getRoot()&&null!=e;){if(n(e))return e;e=e.getParent()}return null}function o(e){return 1===e.nodeType}return Q.$splitNode=t.$splitNode,Q.$dfs=function(e,n){let r=[];e=(e||t.$getRoot()).getLatest(),n=n||(t.$isElementNode(e)?e.getLastDescendant():e);for(var o=e,i=0;null!==(o=o.getParent());)i++;for(o=i;null!==e&&!e.is(n);)if(r.push({depth:o,node:e}),t.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),o++;else for(i=null;null===i&&null!==e;)null===(i=e.getNextSibling())?(e=e.getParent(),o--):e=i;return null!==e&&e.is(n)&&r.push({depth:o,node:e}),r},Q.$findMatchingParent=r,Q.$getNearestBlockElementAncestorOrThrow=function(e){let n=r(e,(e=>t.$isElementNode(e)&&!e.isInline()));return t.$isElementNode(n)||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(4,e.__key),n},Q.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},Q.$insertNodeToNearestRoot=function(e){var n=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(n)){var{focus:r}=n;if(n=r.getNode(),r=r.offset,t.$isRootOrShadowRoot(n))null==(r=n.getChildAtIndex(r))?n.append(e):r.insertBefore(e),e.selectNext();else{let o,i;t.$isTextNode(n)?(o=n.getParentOrThrow(),i=n.getIndexWithinParent(),0<r&&(i+=1,n.splitText(r))):(o=n,i=r),[,n]=t.$splitNode(o,i),n.insertBefore(e),n.selectStart()}}else t.$isNodeSelection(n)||t.DEPRECATED_$isGridSelection(n)?(n=n.getNodes())[n.length-1].getTopLevelElementOrThrow().insertAfter(e):t.$getRoot().append(e),n=t.$createParagraphNode(),e.insertAfter(n),n.select();return e.getLatest()},Q.$restoreEditorState=function(n,r){let o=new Map,i=n._pendingEditorState;for(let[n,i]of r._nodeMap){let r=e.$cloneWithProperties(i);t.$isTextNode(r)&&(r.__text=i.__text),o.set(n,r)}i&&(i._nodeMap=o),n._dirtyType=2,n=r._selection,t.$setSelection(null===n?null:n.clone())},Q.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t},Q.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},Q.isHTMLAnchorElement=function(e){return o(e)&&"A"===e.tagName},Q.isHTMLElement=o,Q.isMimeType=n,Q.mediaFileReader=function(e,t){let r=e[Symbol.iterator]();return new Promise(((e,o)=>{let i=[],a=()=>{const{done:l,value:s}=r.next();if(l)return e(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",(()=>{const e=u.result;"string"==typeof e&&i.push({file:s,result:e}),a()})),n(s,t)?u.readAsDataURL(s):a()};a()}))},Q.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}},Q.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},Q.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var o=e.getChildren(),i=0;i<o.length;i++)if(o[i]instanceof t){o=null;break e}for(o=e;null!==o;)if(i=o,(o=o.getParent())instanceof t){o={child:i,parent:o};break e}o=null}if(null!==o){const{child:t,parent:a}=o;if(t.is(e)){if(r(a,e),o=(e=t.getNextSiblings()).length,a.insertAfter(t),0!==o){i=n(a),t.insertAfter(i);for(let t=0;t<o;t++)i.append(e[t])}a.canBeEmpty()||0!==a.getChildrenSize()||a.remove()}}}))},Q.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))},Q}function re(){if(K)return G;K=1;const e=ne();return G=e}function oe(){if(V)return U;V=1;const e=function(){if(Y)return q;Y=1;var e=re(),t=ee();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(e){return new r(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),null!==this.__target&&(n.target=this.__target),null!==this.__rel&&(n.rel=this.__rel),null!==this.__title&&(n.title=this.__title),e.addClassNamesToElement(n,t.theme.link),n}updateDOM(e,t){let n=this.__url,r=this.__target,o=this.__rel,i=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(e){let t=i(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!n.has(t.protocol))return"about:blank"}catch(e){}return 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(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!t.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function o(t){let n=null;if(e.isHTMLAnchorElement(t)){let e=t.textContent;null!==e&&""!==e&&(n=i(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:n}}function i(e,n){return t.$applyNodeReplacement(new r(e,n))}function a(e){return e instanceof r}class l extends r{static getType(){return"autolink"}static clone(e){return new l(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let t=s(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=s(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function s(e,n){return t.$applyNodeReplacement(new l(e,n))}let u=t.createCommand("TOGGLE_LINK_COMMAND");return q.$createAutoLinkNode=s,q.$createLinkNode=i,q.$isAutoLinkNode=function(e){return e instanceof l},q.$isLinkNode=a,q.AutoLinkNode=l,q.LinkNode=r,q.TOGGLE_LINK_COMMAND=u,q.toggleLink=function(e,n={}){let{target:r,title:o}=n,l=void 0===n.rel?"noreferrer":n.rel;if(n=t.$getSelection(),t.$isRangeSelection(n))if(n=n.extract(),null===e)n.forEach((e=>{if(a(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===n.length){var s=n[0];if(s=a(s)?s:function(e,t){for(;null!==e&&null!==(e=e.getParent())&&!t(e););return e}(s,a),null!==s)return s.setURL(e),void 0!==r&&s.setTarget(r),null!==l&&s.setRel(l),void(void 0!==o&&s.setTitle(o))}let u=null,c=null;n.forEach((n=>{var s=n.getParent();if(s!==c&&null!==s&&(!t.$isElementNode(n)||n.isInline()))if(a(s))c=s,s.setURL(e),void 0!==r&&s.setTarget(r),null!==l&&c.setRel(l),void 0!==o&&c.setTitle(o);else if(s.is(u)||(u=s,c=i(e,{rel:l,target:r}),a(s)?null===n.getPreviousSibling()?s.insertBefore(c):s.insertAfter(c):n.insertBefore(c)),a(n)){if(!n.is(c)){if(null!==c){s=n.getChildren();for(let e=0;e<s.length;e++)c.append(s[e])}n.remove()}}else null!==c&&c.append(n)}))}},q}();return U=e}var ie,ae,le,se=oe(),ue={};function ce(){if(ie)return ue;ie=1;var e=ee(),t=re();function n(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e){let t=1;for(e=e.getParent();null!=e;){if(y(e)){if(k(e=e.getParent())){t++,e=e.getParent();continue}n(40)}break}return t}function o(e){k(e=e.getParent())||n(40);let t=e;for(;null!==t;)t=t.getParent(),k(t)&&(e=t);return e}function i(e){let t=[];e=e.getChildren().filter(y);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();k(o)?t=t.concat(i(o)):t.push(r)}return t}function a(e){return y(e)&&k(e.getFirstChild())}function l(e){return b().append(e)}function s(e,t){return y(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function u(e,t){e.splice(e.getChildrenSize(),0,t)}function c(e,t){if(k(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=b();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),u(o,e.getChildren()),k(n)&&t===n.getListType()?(n.append(o),e.remove(),k(r)&&t===r.getListType()&&(u(n,r.getChildren()),r.remove()),n):k(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):((t=w(t)).append(o),e.replace(t),p(t),t)}function d(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&a(n)&&a(r)&&(d(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),p(e)),t.remove()}function p(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let a=e[t];if(y(a)){let e=a.getValue();var r=a,o=r.getParent(),i=1;for(null!=o&&(k(o)?i=o.getStart():n(44)),r=r.getPreviousSiblings(),o=0;o<r.length;o++){let e=r[o];y(e)&&!k(e.getFirstChild())&&i++}e!==i&&a.setValue(i)}}}function f(e){if(!a(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(k(r)&&y(n)&&k(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=b();let r=w(l);o.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),i=b(),l=w(l),i.append(l),u(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}p(t),p(r)}}}class h extends e.ElementNode{static getType(){return"listitem"}static clone(e){return new h(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return k(n)&&"check"===n.getListType()&&g(t,this,null),t.value=this.__value,m(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return k(r)&&"check"===r.getListType()&&g(t,this,e),t.value=this.__value,m(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();k(t)&&(p(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:v,priority:0})}}static importJSON(e){let t=b();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(e.$isElementNode(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(y(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!k(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=w(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&this.getChildren().forEach((t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var r=this.getParentOrThrow();k(r)||n(39);var o=this.getNextSiblings();if(y(e))return t=super.insertAfter(e,t),k(e=e.getParentOrThrow())&&p(e),t;if(k(e)){for(r=e,o=(e=e.getChildren()).length-1;0<=o;o--)r=e[o],this.insertAfter(r,t);return r}if(r.insertAfter(e,t),0!==o.length){let n=w(r.getListType());o.forEach((e=>n.append(e))),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&a(t)&&a(n)?(d(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(k(e=n.getParent())&&p(e))}insertNewAfter(e,t=!0){return e=b(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(t){let n=e.$createParagraphNode();this.getChildren().forEach((e=>n.append(e)));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=y(o);return 1===r.getChildrenSize()?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),"element"===r.type&&r.getNode().is(this)&&r.set(o,r.offset,"element"),"element"===t.type&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;y(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1<e||n(117);let t=this.getIndent();for(;t!==e;)if(t<e){e:{var r=new Set;if(a(this)||r.has(this.getKey()))break e;let e=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(a(o)&&a(i)){if(k(i=i.getFirstChild())){i.append(this);var l=o.getFirstChild();k(l)&&(u(i,l=l.getChildren()),o.remove(),r.add(o.getKey())),p(i)}}else a(o)?k(o=o.getFirstChild())&&(null!==(r=o.getFirstChild())&&r.insertBefore(this),p(o)):a(i)?k(o=i.getFirstChild())&&(o.append(this),p(o)):k(e)&&(r=b(),l=w(e.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):e.append(r),p(l));k(e)&&p(e)}t++}else f(this),t--;return this}insertBefore(e){if(y(e)){let e=this.getParentOrThrow();if(k(e)){p(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return y(e)}canReplaceWith(e){return y(e)}canMergeWith(t){return e.$isParagraphNode(t)||y(t)}extractWithChild(t,n){if(!e.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return w("bullet")}}function m(e,n,r){let o=[],i=[];var a=(n=n.list)?n.listitem:void 0;if(n&&n.nested)var l=n.nested.listitem;if(void 0!==a&&(a=a.split(" "),o.push(...a)),n){a=k(a=r.getParent())&&"check"===a.getListType();let e=r.getChecked();a&&!e||i.push(n.listitemUnchecked),a&&e||i.push(n.listitemChecked),a&&o.push(e?n.listitemChecked:n.listitemUnchecked)}void 0!==l&&(l=l.split(" "),r.getChildren().some((e=>k(e)))?o.push(...l):i.push(...l)),0<i.length&&t.removeClassNamesFromElement(e,...i),0<o.length&&t.addClassNamesToElement(e,...o)}function g(e,t,n){k(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function v(e){return{node:b(e=t.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function b(t){return e.$applyNodeReplacement(new h(void 0,t))}function y(e){return e instanceof h}class x extends e.ElementNode{static getType(){return"list"}static clone(e){return new x(e.__listType||S[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=S[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();t.__listType=e,t.__tag="number"===e?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,_(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(_(t,n.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:C,priority:0}),ul:()=>({conversion:C,priority:0})}}static importJSON(e){let t=w(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(y(n))super.append(n);else{let t=b();k(n)?t.append(n):e.$isElementNode(n)?(n=e.$createTextNode(n.getTextContent()),t.append(n)):t.append(n),super.append(t)}}return p(this),this}extractWithChild(e){return y(e)}}function _(e,n,o){let i=[],a=[];var l=n.list;if(void 0!==l){let e=l[`${o.__tag}Depth`]||[],t=(n=r(o)-1)%e.length;var s=e[t];let u,c=l[o.__tag];if(void 0!==(l=l.nested)&&l.list&&(u=l.list),void 0!==c&&i.push(c),void 0!==s)for(s=s.split(" "),i.push(...s),s=0;s<e.length;s++)s!==t&&a.push(o.__tag+s);void 0!==u&&(o=u.split(" "),1<n?i.push(...o):a.push(...o))}0<a.length&&t.removeClassNamesFromElement(e,...a),0<i.length&&t.addClassNamesToElement(e,...i)}function E(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];y(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{k(e)&&t.push(l(e))}))):t.push(l(n))}return t}function C(e){let n=e.nodeName.toLowerCase(),r=null;return"ol"===n?r=w("number",e.start):"ul"===n&&(r=t.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?w("check"):w("bullet")),{after:E,node:r}}let S={ol:"number",ul:"bullet"};function w(t,n=1){return e.$applyNodeReplacement(new x(t,n))}function k(e){return e instanceof x}let T=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),N=e.createCommand("INSERT_CHECK_LIST_COMMAND"),R=e.createCommand("REMOVE_LIST_COMMAND");return ue.$createListItemNode=b,ue.$createListNode=w,ue.$getListDepth=r,ue.$handleListInsertParagraph=function(){var t=e.$getSelection();if(!e.$isRangeSelection(t)||!t.isCollapsed())return!1;if(!y(t=t.anchor.getNode())||""!==t.getTextContent())return!1;var r=o(t),i=t.getParent();k(i)||n(40);let a,l=i.getParent();if(e.$isRootOrShadowRoot(l))a=e.$createParagraphNode(),r.insertAfter(a);else{if(!y(l))return!1;a=b(),l.insertAfter(a)}if(a.select(),0<(r=t.getNextSiblings()).length){let t=w(i.getListType());e.$isParagraphNode(a)?a.insertAfter(t):((i=b()).append(t),a.insertAfter(i)),r.forEach((e=>{e.remove(),t.append(e)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!y(e)&&!k(e))break;e=t}e.remove()}(t),!0},ue.$isListItemNode=y,ue.$isListNode=k,ue.INSERT_CHECK_LIST_COMMAND=N,ue.INSERT_ORDERED_LIST_COMMAND=A,ue.INSERT_UNORDERED_LIST_COMMAND=T,ue.ListItemNode=h,ue.ListNode=x,ue.REMOVE_LIST_COMMAND=R,ue.insertList=function(t,n){t.update((()=>{var t=e.$getSelection();if(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t)){var r=t.getNodes(),o=(t=t.anchor.getNode()).getParent();if(s(t,r))r=w(n),e.$isRootOrShadowRoot(o)?(t.replace(r),o=b(),e.$isElementNode(t)&&(o.setFormat(t.getFormatType()),o.setIndent(t.getIndent())),r.append(o)):y(t)&&(u(r,(t=t.getParentOrThrow()).getChildren()),t.replace(r));else for(t=new Set,o=0;o<r.length;o++){var i=r[o];if(e.$isElementNode(i)&&i.isEmpty()&&!t.has(i.getKey()))c(i,n);else if(e.$isLeafNode(i))for(i=i.getParent();null!=i;){let r=i.getKey();if(k(i)){if(!t.has(r)){var a=w(n);u(a,i.getChildren()),i.replace(a),p(a),t.add(r)}break}if(a=i.getParent(),e.$isRootOrShadowRoot(a)&&!t.has(r)){t.add(r),c(i,n);break}i=a}}}}))},ue.removeList=function(n){n.update((()=>{let n=e.$getSelection();if(e.$isRangeSelection(n)){var r=new Set,a=n.getNodes(),l=n.anchor.getNode();if(s(l,a))r.add(o(l));else for(l=0;l<a.length;l++){var c=a[l];e.$isLeafNode(c)&&(null!=(c=t.$getNearestNodeOfType(c,h))&&r.add(o(c)))}for(let t of r){r=t,a=i(t);for(let t of a)u(a=e.$createParagraphNode(),t.getChildren()),r.insertAfter(a),r=a,t.__key===n.anchor.key&&n.anchor.set(a.getKey(),0,"element"),t.__key===n.focus.key&&n.focus.set(a.getKey(),0,"element"),t.remove();t.remove()}}}))},ue}function de(){if(le)return ae;le=1;const e=ce();return ae=e}var pe,fe,he,me,ge,ve,be=de(),ye={},xe={};function _e(){if(pe)return xe;pe=1;var e=g;let t=e.createContext(null);return xe.LexicalComposerContext=t,xe.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}},xe.useLexicalComposerContext=function(){let n=e.useContext(t);return null==n&&function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n},xe}function Ee(){if(he)return fe;he=1;const e=_e();return fe=e}function Ce(){if(me)return ye;me=1;var e=Ee(),t=ee(),n=g;let r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};return ye.LexicalComposer=function({initialConfig:a,children:l}){let s=n.useMemo((()=>{const{theme:n,namespace:o,editor__DEPRECATED:l,nodes:s,onError:u,editorState:c}=a,d=e.createLexicalComposerContext(null,n);let p=l||null;if(null===p){const e=t.createEditor({editable:a.editable,namespace:o,nodes:s,onError:t=>u(t,e),theme:n});!function(e,n){if(null!==n)if(void 0===n)e.update((()=>{var n=t.$getRoot();if(n.isEmpty()){let o=t.$createParagraphNode();n.append(o),n=r?document.activeElement:null,(null!==t.$getSelection()||null!==n&&n===e.getRootElement())&&o.select()}}),i);else if(null!==n)switch(typeof n){case"string":let r=e.parseEditorState(n);e.setEditorState(r,i);break;case"object":e.setEditorState(n,i);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&n(e)}),i)}}(e,c),p=e}return[p,d]}),[]);return o((()=>{let e=a.editable,[t]=s;t.setEditable(void 0===e||e)}),[]),n.createElement(e.LexicalComposerContext.Provider,{value:s},l)},ye}var Se,we,ke,Te,Ae,Ne,Re=function(){if(ve)return ge;ve=1;const e=Ce();return ge=e}(),Me={},Le={};function Oe(){if(Se)return Le;Se=1;var e=re(),t=ee();function n(e,n){let r=Date.now(),o=0;return(i,a,l,s,u,c)=>{let d=Date.now();if(c.has("historic"))return o=0,r=d,2;let p=function(e,n,r,o,i){if(null===e||0===r.size&&0===o.size&&!i)return 0;var a=n._selection,l=e._selection;if(i)return 1;if(!(t.$isRangeSelection(a)&&t.$isRangeSelection(l)&&l.isCollapsed()&&a.isCollapsed()))return 0;i=n._nodeMap;let s=[];for(let e of r)void 0!==(r=i.get(e))&&s.push(r);for(let[e,n]of o)n&&(void 0===(o=i.get(e))||t.$isRootNode(o)||s.push(o));return 0===s.length?0:1<s.length?(n=(o=n._nodeMap).get(a.anchor.key),l=o.get(l.anchor.key),n&&l&&!e._nodeMap.has(n.__key)&&t.$isTextNode(n)&&1===n.__text.length&&1===a.anchor.offset?2:0):(n=s[0],e=e._nodeMap.get(n.__key),t.$isTextNode(e)&&t.$isTextNode(n)&&e.__mode===n.__mode?(e=e.__text)===(n=n.__text)?0:(a=a.anchor,l=l.anchor,a.key!==l.key||"text"!==a.type?0:(a=a.offset,l=l.offset,1==(e=n.length-e.length)&&l===a-1?2:-1===e&&l===a+1?3:-1===e&&l===a?4:0)):0)}(i,a,s,u,e.isComposing()),f=(()=>{var f=null===l||l.editor===e,h=c.has("history-push");if(!h&&f&&c.has("history-merge"))return 0;if(null===i)return 1;var m=a._selection;if(!(0<s.size||0<u.size))return null!==m?0:2;if(!1===h&&0!==p&&p===o&&d<r+n&&f)return 0;if(1===s.size){{h=Array.from(s)[0],f=i._nodeMap.get(h),h=a._nodeMap.get(h),m=i._selection;let e=a._selection,n=!1;t.$isRangeSelection(m)&&t.$isRangeSelection(e)&&(n="element"===m.anchor.type&&"element"===m.focus.type&&"text"===e.anchor.type&&"text"===e.focus.type),f=!(n||!t.$isTextNode(f)||!t.$isTextNode(h))&&(f.__type===h.__type&&f.__text===h.__text&&f.__mode===h.__mode&&f.__detail===h.__detail&&f.__style===h.__style&&f.__format===h.__format&&f.__parent===h.__parent)}if(f)return 0}return 1})();return r=d,o=p,f}}return Le.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},Le.registerHistory=function(r,o,i){let a=n(r,i);i=({editorState:e,prevEditorState:n,dirtyLeaves:i,dirtyElements:l,tags:s})=>{const u=o.current,c=o.redoStack,d=o.undoStack,p=null===u?null:u.editorState;if(null===u||e!==p){if(1===(n=a(n,e,u,i,l,s)))0!==c.length&&(o.redoStack=[],r.dispatchCommand(t.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0));else if(2===n)return;o.current={editor:r,editorState:e}}};let l=e.mergeRegister(r.registerCommand(t.UNDO_COMMAND,(()=>{let e=o.redoStack,n=o.undoStack;if(0!==n.length){let i=o.current,a=n.pop();null!==i&&(e.push(i),r.dispatchCommand(t.CAN_REDO_COMMAND,!0)),0===n.length&&r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),o.current=a||null,a&&a.editor.setEditorState(a.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.REDO_COMMAND,(()=>{let e=o.redoStack;var n=o.undoStack;if(0!==e.length){let i=o.current;null!==i&&(n.push(i),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0)),n=e.pop(),0===e.length&&r.dispatchCommand(t.CAN_REDO_COMMAND,!1),o.current=n||null,n&&n.editor.setEditorState(n.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_EDITOR_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,!1)),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_HISTORY_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,r.dispatchCommand(t.CAN_REDO_COMMAND,!1),r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),!0)),t.COMMAND_PRIORITY_EDITOR),r.registerUpdateListener(i)),s=r.registerUpdateListener(i);return()=>{l(),s()}},Le}function Ie(){if(Te)return Me;Te=1;var e=Ee(),t=function(){if(ke)return we;ke=1;const e=Oe();return we=e}(),n=g;return Me.createEmptyHistoryState=t.createEmptyHistoryState,Me.HistoryPlugin=function({externalHistoryState:r}){let[o]=e.useLexicalComposerContext();return function(e,r,o=1e3){let i=n.useMemo((()=>r||t.createEmptyHistoryState()),[r]);n.useEffect((()=>t.registerHistory(e,i,o)),[o,e,i])}(o,r),null},Me}var Pe,De,$e,ze=function(){if(Ne)return Ae;Ne=1;const e=Ie();return Ae=e}(),Be={};function Fe(){if(Pe)return Be;Pe=1;var e=de(),t=Ee(),n=g,r=re(),o=ee();return Be.ListPlugin=function(){let[i]=t.useLexicalComposerContext();return n.useEffect((()=>{if(!i.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[i]),function(t){n.useEffect((()=>r.mergeRegister(t.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,(()=>(e.insertList(t,"number"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,(()=>(e.insertList(t,"bullet"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.REMOVE_LIST_COMMAND,(()=>(e.removeList(t),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(o.INSERT_PARAGRAPH_COMMAND,(()=>!!e.$handleListInsertParagraph()),o.COMMAND_PRIORITY_LOW))),[t])}(i),null},Be}var He,je,We,Ge=function(){if($e)return De;$e=1;const e=Fe();return De=e}(),Ke={};function Ye(){if(He)return Ke;He=1;var e=Ee(),t=re(),n=ee(),r=g;function o(e){return e.registerCommand(n.KEY_TAB_COMMAND,(r=>{let o=n.$getSelection();return!!n.$isRangeSelection(o)&&(r.preventDefault(),r=function(e){var r=e.getNodes();if(0<function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);null!==o&&n.push(o)}return n}(r,(e=>n.$isBlockElementNode(e)&&e.canIndent()?e:null)).length)return!0;if(r=e.anchor,r=(e=(e=e.focus).isBefore(r)?e:r).getNode(),(r=t.$getNearestBlockElementAncestorOrThrow(r)).canIndent()){r=r.getKey();let t=n.$createRangeSelection();if(t.anchor.set(r,0,"element"),t.focus.set(r,0,"element"),t=n.$normalizeSelection__EXPERIMENTAL(t),t.anchor.is(e))return!0}return!1}(o)?r.shiftKey?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,e.dispatchCommand(r,void 0))}),n.COMMAND_PRIORITY_EDITOR)}return Ke.TabIndentationPlugin=function(){let[t]=e.useLexicalComposerContext();return r.useEffect((()=>o(t))),null},Ke.registerTabIndentation=o,Ke}var Ue,Ve,qe,Qe,Je,Xe,Ze,et,tt,nt=function(){if(We)return je;We=1;const e=Ye();return je=e}(),rt={},ot={},it={};function at(){if(qe)return Ve;qe=1;const e=function(){if(Ue)return it;Ue=1;var e=te(),t=ee();function n(r,o,i,a=null){let l=null==a||o.isSelected(a),s=t.$isElementNode(o)&&o.excludeFromCopy("html");var u=o;null!==a&&(u=e.$cloneWithProperties(o),u=t.$isTextNode(u)&&null!=a?e.$sliceSelectedTextNodeContent(a,u):u);let c=t.$isElementNode(u)?u.getChildren():[],{element:d,after:p}=u.exportDOM(r);if(!d)return!1;let f=document.createDocumentFragment();for(let e=0;e<c.length;e++){let i=c[e],s=n(r,i,f,a);!l&&t.$isElementNode(o)&&s&&o.extractWithChild(i,a,"html")&&(l=!0)}return l&&!s?(d.append(f),i.append(d),p&&(r=p.call(u,d))&&d.replaceWith(r)):i.append(f),l}let r=new Set(["STYLE","SCRIPT"]);function o(e,n,i=new Map,a){let l=[];if(r.has(e.nodeName))return l;let s=null;var u,{nodeName:c}=e,d=n._htmlConversions.get(c.toLowerCase());if(c=null,void 0!==d)for(u of d)null!==(d=u(e))&&(null===c||c.priority<d.priority)&&(c=d);if(c=(u=null!==c?c.conversion:null)?u(e):null,u=null,null!==c){if(u=c.after,d=c.node,s=Array.isArray(d)?d[d.length-1]:d,null!==s){for(var[,p]of i)if(s=p(s,a),!s)break;s&&l.push(...Array.isArray(d)?d:[s])}null!=c.forChild&&i.set(e.nodeName,c.forChild)}for(e=e.childNodes,a=[],p=0;p<e.length;p++)a.push(...o(e[p],n,new Map(i),s));return null!=u&&(a=u(a)),null==s?l=l.concat(a):t.$isElementNode(s)&&s.append(...a),l}return it.$generateHtmlFromNodes=function(e,r){if("undefined"==typeof document||"undefined"==typeof window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let o=document.createElement("div"),i=t.$getRoot().getChildren();for(let t=0;t<i.length;t++)n(e,i[t],o,r);return o.innerHTML},it.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let a=0;a<t.length;a++){var i=t[a];r.has(i.nodeName)||null!==(i=o(i,e))&&(n=n.concat(i))}return n},it}();return Ve=e}function lt(){if(Qe)return ot;Qe=1;var e=at(),t=te(),n=re(),r=ee();function o(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(t){let n=r.$getSelection();if(null==n)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(n)&&n.isCollapsed()||0===n.getNodes().length?"":e.$generateHtmlFromNodes(t,n)}function l(e){let t=r.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(c(e,t))}function s(e,t,i){(r.DEPRECATED_$isGridSelection(i)||null!==n.$findMatchingParent(i.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)))&&null!==n.$findMatchingParent(i.focus.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&r.DEPRECATED_$isGridNode(t[0])?function(e,t,i,a){1===e.length&&r.DEPRECATED_$isGridNode(e[0])||o(42);var l=e[0];e=l.getChildren(),i=l.getFirstChildOrThrow().getChildrenSize();var s=l.getChildrenSize(),u=n.$findMatchingParent(t.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)));t=(l=u&&n.$findMatchingParent(u,(e=>r.DEPRECATED_$isGridRowNode(e))))&&n.$findMatchingParent(l,(e=>r.DEPRECATED_$isGridNode(e))),r.DEPRECATED_$isGridCellNode(u)&&r.DEPRECATED_$isGridRowNode(l)&&r.DEPRECATED_$isGridNode(t)||o(43);var c=l.getIndexWithinParent(),d=Math.min(t.getChildrenSize()-1,c+s-1);let p,f;s=u.getIndexWithinParent(),u=Math.min(l.getChildrenSize()-1,s+i-1),i=Math.min(s,u),l=Math.min(c,d),s=Math.max(s,u),c=Math.max(c,d),d=t.getChildren(),u=0;for(let t=l;t<=c;t++){var h=d[t];r.DEPRECATED_$isGridRowNode(h)||o(24);var m=e[u];r.DEPRECATED_$isGridRowNode(m)||o(24),h=h.getChildren(),m=m.getChildren();let n=0;for(let e=i;e<=s;e++){let a=h[e];r.DEPRECATED_$isGridCellNode(a)||o(25);let u=m[n];r.DEPRECATED_$isGridCellNode(u)||o(25),t===l&&e===i?p=a.getKey():t===c&&e===s&&(f=a.getKey());let d=a.getChildren();u.getChildren().forEach((e=>{r.$isTextNode(e)&&r.$createParagraphNode().append(e),a.append(e)})),d.forEach((e=>e.remove())),n++}u++}p&&f&&(e=r.DEPRECATED_$createGridSelection(),e.set(t.getKey(),p,f),r.$setSelection(e),a.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}(t,i,!1,e):function(e,t){let n=[],i=null;for(let t=0;t<e.length;t++){let o=e[t],a=r.$isLineBreakNode(o);if(a||r.$isDecoratorNode(o)&&o.isInline()||r.$isElementNode(o)&&o.isInline()||r.$isTextNode(o)||o.isParentRequired()){if(null===i&&(i=o.createParentElementNode(),n.push(i),a))continue;null!==i&&i.append(o)}else n.push(o),i=null}r.$isRangeSelection(t)?t.insertNodes(n):r.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),r.DEPRECATED_$isGridCellNode(e)||o(41),e.append(...n))}(t,i)}function u(e,n,i,a=[]){let l=null==n||i.isSelected(n),s=r.$isElementNode(i)&&i.excludeFromCopy("html");var c=i;if(null!==n){var d=t.$cloneWithProperties(i);c=d=r.$isTextNode(d)&&null!=n?t.$sliceSelectedTextNodeContent(n,d):d}let p=r.$isElementNode(c)?c.getChildren():[];var f=c;d=f.exportJSON();var h=f.constructor;d.type!==h.getType()&&o(58,h.name);let m=d.children;for(r.$isElementNode(f)&&(Array.isArray(m)||o(59,h.name)),r.$isTextNode(c)&&(0<(c=c.__text).length?d.text=c:l=!1),c=0;c<p.length;c++)h=u(e,n,f=p[c],d.children),!l&&r.$isElementNode(i)&&h&&i.extractWithChild(f,n,"clone")&&(l=!0);if(l&&!s)a.push(d);else if(Array.isArray(d.children))for(e=0;e<d.children.length;e++)a.push(d.children[e]);return l}function c(e,t){let n=[],o=r.$getRoot().getChildren();for(let r=0;r<o.length;r++)u(e,t,o[r],n);return{namespace:e._config.namespace,nodes:n}}function d(e){let n=[];for(let o=0;o<e.length;o++){let i=r.$parseSerializedNode(e[o]);r.$isTextNode(i)&&t.$addNodeStyle(i),n.push(i)}return n}let p=null;function f(e,t){var n=i?(e._window||window).getSelection():null;if(!n)return!1;var o=n.anchorNode;if(n=n.focusNode,null!==o&&null!==n&&!r.isSelectionWithinEditor(e,o,n))return!1;if(t.preventDefault(),t=t.clipboardData,o=r.$getSelection(),null===t||null===o)return!1;n=a(e),e=l(e);let s="";return null!==o&&(s=o.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",s),!0}return ot.$generateJSONFromSelectedNodes=c,ot.$generateNodesFromSerializedNodes=d,ot.$getHtmlContent=a,ot.$getLexicalContent=l,ot.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain")||e.getData("text/uri-list"))&&t.insertRawText(e)},ot.$insertDataTransferForRichText=function(t,n,o){var i=t.getData("application/x-lexical-editor");if(i)try{let e=JSON.parse(i);if(e.namespace===o._config.namespace&&Array.isArray(e.nodes)){return s(o,d(e.nodes),n)}}catch(e){}if(i=t.getData("text/html"))try{var a=(new DOMParser).parseFromString(i,"text/html"),l=e.$generateNodesFromDOM(o,a);return s(o,l,n)}catch(e){}if(null!=(t=t.getData("text/plain")||t.getData("text/uri-list")))if(r.$isRangeSelection(n))for(o=(t=t.split(/(\r?\n|\t)/)).length,a=0;a<o;a++)"\n"===(l=t[a])||"\r\n"===l?n.insertParagraph():"\t"===l?n.insertNodes([r.$createTabNode()]):n.insertText(l);else n.insertRawText(t)},ot.$insertGeneratedNodes=s,ot.copyToClipboard=async function(e,t){if(null!==p)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(f(e,t))}))}));var o=e.getRootElement();let a=null==e._window?window.document:e._window.document,l=i?(e._window||window).getSelection():null;if(null===o||null===l)return!1;let s=a.createElement("span");return s.style.cssText="position: fixed; top: -1000px;",s.append(a.createTextNode("#")),o.append(s),(o=new Range).setStart(s,0),o.setEnd(s,1),l.removeAllRanges(),l.addRange(o),new Promise((t=>{let o=e.registerCommand(r.COPY_COMMAND,(r=>(n.objectKlassEquals(r,ClipboardEvent)&&(o(),null!==p&&(window.clearTimeout(p),p=null),t(f(e,r))),!0)),r.COMMAND_PRIORITY_CRITICAL);p=window.setTimeout((()=>{o(),p=null,t(!1)}),50),a.execCommand("copy"),s.remove()}))},ot}function st(){if(Ze)return rt;Ze=1;var e=function(){if(Xe)return Je;Xe=1;const e=lt();return Je=e}(),t=te(),n=re(),r=ee();function o(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,a=i&&"documentMode"in document?document.documentMode:null,l=!(!i||!("InputEvent"in window)||a)&&"getTargetRanges"in new window.InputEvent("input"),s=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),u=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!c,p=r.createCommand("DRAG_DROP_PASTE_FILE");class f extends r.ElementNode{static getType(){return"quote"}static clone(e){return new f(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return n.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:b,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=h();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=r.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function h(){return r.$applyNodeReplacement(new f)}class m extends r.ElementNode{static getType(){return"heading"}static clone(e){return new m(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,r=document.createElement(t);return void 0!==(e=e.theme.heading)&&n.addClassNamesToElement(r,e[t]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:v,priority:0}),h2:()=>({conversion:v,priority:0}),h3:()=>({conversion:v,priority:0}),h4:()=>({conversion:v,priority:0}),h5:()=>({conversion:v,priority:0}),h6:()=>({conversion:v,priority:0}),p:e=>null!==(e=e.firstChild)&&g(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>g(e)?{conversion:()=>({node:y("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=y(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&e<this.getTextContentSize()?y(this.getTag()):r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.isEmpty()?r.$createParagraphNode():y(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function g(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function v(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=y(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function b(e){let t=h();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function y(e){return r.$applyNodeReplacement(new m(e))}function x(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function _(e){var t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;let o=new Set;t=t.getNodes();for(let r=0;r<t.length;r++){var i=t[r],a=i.getKey();o.has(a)||(a=(i=n.$getNearestBlockElementAncestorOrThrow(i)).getKey(),i.canIndent()&&!o.has(a)&&(o.add(a),e(i)))}return 0<o.size}function E(e){return e=r.$getNearestNodeFromDOMNode(e),r.$isDecoratorNode(e)}return rt.$createHeadingNode=y,rt.$createQuoteNode=h,rt.$isHeadingNode=function(e){return e instanceof m},rt.$isQuoteNode=function(e){return e instanceof f},rt.DRAG_DROP_PASTE=p,rt.HeadingNode=m,rt.QuoteNode=f,rt.eventFiles=x,rt.registerRichText=function(i){return n.mergeRegister(i.registerCommand(r.CLICK_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isNodeSelection(e)&&(e.clear(),!0)}),0),i.registerCommand(r.DELETE_CHARACTER_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_WORD_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_LINE_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=r.$getSelection();if("string"==typeof t)r.$isRangeSelection(n)?n.insertText(t):r.DEPRECATED_$isGridSelection(n);else{if(!r.$isRangeSelection(n)&&!r.DEPRECATED_$isGridSelection(n))return!1;const o=t.dataTransfer;null!=o?e.$insertDataTransferForRichText(o,n,i):r.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.REMOVE_TEXT_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.removeText(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_TEXT_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.formatText(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_ELEMENT_COMMAND,(e=>{var t=r.$getSelection();if(!r.$isRangeSelection(t)&&!r.$isNodeSelection(t))return!1;t=t.getNodes();for(const o of t)t=n.$findMatchingParent(o,(e=>r.$isElementNode(e)&&!e.isInline())),null!==t&&t.setFormat(e);return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_LINE_BREAK_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_PARAGRAPH_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_TAB_COMMAND,(()=>(r.$insertNodes([r.$createTabNode()]),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();e.setIndent(t+1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.OUTDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();0<t&&e.setIndent(t-1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_UP_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)&&!E(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(r.$isRangeSelection(t)&&(t=r.$getAdjacentNode(t.focus,!0),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(r.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===r.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=r.$getAdjacentNode(t.focus,!1),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectPrevious(),!0}return!!r.$isRangeSelection(n)&&(!!t.$shouldOverrideDefaultCharacterSelection(n,!0)&&(o=e.shiftKey,e.preventDefault(),t.$moveCharacter(n,o,!0),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)&&!E(e.target)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectNext(0,0),!0}return!!r.$isRangeSelection(n)&&(o=e.shiftKey,!!t.$shouldOverrideDefaultCharacterSelection(n,!1)&&(e.preventDefault(),t.$moveCharacter(n,o,!1),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_BACKSPACE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;e.preventDefault(),({anchor:e}=t);const o=e.getNode();return t.isCollapsed()&&0===e.offset&&!r.$isRootNode(o)&&0<n.$getNearestBlockElementAncestorOrThrow(o).getIndent()?i.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_DELETE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(e.preventDefault(),i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ENTER_COMMAND,(e=>{const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;if(null!==e){if((u||s||d)&&l)return!1;if(e.preventDefault(),e.shiftKey)return i.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return i.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ESCAPE_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(i.blur(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DROP_COMMAND,(e=>{const[,t]=x(e);if(0<t.length){var n=o(e.clientX,e.clientY);if(null!==n){const{offset:e,node:o}=n;var a=r.$getNearestNodeFromDOMNode(o);if(null!==a){if(n=r.$createRangeSelection(),r.$isTextNode(a))n.anchor.set(a.getKey(),e,"text"),n.focus.set(a.getKey(),e,"text");else{const e=a.getParentOrThrow().getKey();a=a.getIndexWithinParent()+1,n.anchor.set(e,a,"element"),n.focus.set(e,a,"element")}n=r.$normalizeSelection__EXPERIMENTAL(n),r.$setSelection(n)}i.dispatchCommand(p,t)}return e.preventDefault(),!0}return e=r.$getSelection(),!!r.$isRangeSelection(e)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGSTART_COMMAND,(e=>{[e]=x(e);const t=r.$getSelection();return!(e&&!r.$isRangeSelection(t))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGOVER_COMMAND,(e=>{var[t]=x(e);const n=r.$getSelection();return!(t&&!r.$isRangeSelection(n))&&(null!==(t=o(e.clientX,e.clientY))&&(t=r.$getNearestNodeFromDOMNode(t.node),r.$isDecoratorNode(t)&&e.preventDefault()),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.COPY_COMMAND,(t=>(e.copyToClipboard(i,n.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CUT_COMMAND,(t=>(async function(t,o){await e.copyToClipboard(o,n.objectKlassEquals(t,ClipboardEvent)?t:null),o.update((()=>{let e=r.$getSelection();r.$isRangeSelection(e)?e.removeText():r.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,i),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.PASTE_COMMAND,(t=>{const[,n,o]=x(t);if(0<n.length&&!o)return i.dispatchCommand(p,n),!0;if(r.isSelectionCapturedInDecoratorInput(t.target))return!1;const a=r.$getSelection();return!(!r.$isRangeSelection(a)&&!r.DEPRECATED_$isGridSelection(a))&&(function(t,n){t.preventDefault(),n.update((()=>{let o=r.$getSelection(),i=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;null!=i&&(r.$isRangeSelection(o)||r.DEPRECATED_$isGridSelection(o))&&e.$insertDataTransferForRichText(i,o,n)}),{tag:"paste"})}(t,i),!0)}),r.COMMAND_PRIORITY_EDITOR))},rt}function ut(){if(tt)return et;tt=1;const e=st();return et=e}var ct,dt,pt,ft=ut(),ht={};function mt(){if(ct)return ht;ct=1;var e=oe(),t=Ee(),n=re(),r=ee(),o=g;function i(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let a=/[.,;\s]/;function l(e){var t;return e=e.getPreviousSibling(),r.$isElementNode(e)&&(e=e.getLastDescendant()),!(t=null===e||r.$isLineBreakNode(e))&&(t=r.$isTextNode(e))&&(e=e.getTextContent(),t=a.test(e[e.length-1])),t}function s(e){return e=e.getNextSibling(),r.$isElementNode(e)&&(e=e.getFirstDescendant()),null===e||r.$isLineBreakNode(e)||r.$isTextNode(e)&&a.test(e.getTextContent()[0])}function u(e,t,n){var o=e.getChildren();let a=o.length;for(let t=0;t<a;t++){let i=o[t];if(!r.$isTextNode(i)||!i.isSimpleText())return c(e),void n(null,e.getURL())}null===(t=i(o=e.getTextContent(),t))||t.text!==o?(c(e),n(null,e.getURL())):l(e)&&s(e)?((o=e.getURL())!==t.url&&(e.setURL(t.url),n(t.url,o)),t.attributes&&((o=e.getRel())!==t.attributes.rel&&(e.setRel(t.attributes.rel||null),n(t.attributes.rel||null,o)),(o=e.getTarget())!==t.attributes.target&&(e.setTarget(t.attributes.target||null),n(t.attributes.target||null,o)))):(c(e),n(null,e.getURL()))}function c(e){let t=e.getChildren();var n=t.length;for(--n;0<=n;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}function d(t,d,p){o.useEffect((()=>{t.hasNodes([e.AutoLinkNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);let o=(e,t)=>{p&&p(e,t)};return n.mergeRegister(t.registerNodeTransform(r.TextNode,(t=>{var n=t.getParentOrThrow(),f=t.getPreviousSibling();if(e.$isAutoLinkNode(n))u(n,d,o);else if(!e.$isLinkNode(n)){if(t.isSimpleText()&&(a.test(t.getTextContent()[0])||!e.$isAutoLinkNode(f))){f=n=t.getTextContent();let o=0,u=t;for(var h;(h=i(f,d))&&null!==h;){let i=h.index,c=h.length,d=i+c;var m=o+i,g=o+d,v=n,b=t;if((0<m?a.test(v[m-1]):l(b))&&(g<v.length?a.test(v[g]):s(b))){var y=void 0;0===o+i?[y,u]=u.splitText(o+c):[,y,u]=u.splitText(o+i,o+i+c),m=e.$createAutoLinkNode(h.url,h.attributes),(g=r.$createTextNode(h.text)).setFormat(y.getFormat()),g.setDetail(y.getDetail()),m.append(g),y.replace(m),p&&p(h.url,null),o=0}else o+=d;f=f.substring(d)}}n=t.getPreviousSibling(),h=t.getNextSibling(),y=t.getTextContent(),e.$isAutoLinkNode(n)&&!a.test(y[0])&&(n.append(t),u(n,d,o),t=n.getURL(),p&&p(null,t)),e.$isAutoLinkNode(h)&&!a.test(y[y.length-1])&&(c(h),u(h,d,o),t=h.getURL(),p&&p(null,t))}})))}),[t,d,p])}return ht.AutoLinkPlugin=function({matchers:e,onChange:n}){let[r]=t.useLexicalComposerContext();return d(r,e,n),null},ht.createLinkMatcherWithRegExp=function(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}},ht}var gt,vt,bt,yt,xt=function(){if(pt)return dt;pt=1;const e=mt();return dt=e}(),_t=Ee();function Et(){if(vt)return gt;vt=1;var e=Ee(),t=g,n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function r(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}return gt=function(){return function(r){let[o]=e.useLexicalComposerContext(),i=t.useMemo((()=>r(o)),[o,r]),a=t.useRef(i.initialValueFn()),[l,s]=t.useState(a.current);return n((()=>{let{initialValueFn:e,subscribe:t}=i,n=e();return a.current!==n&&(a.current=n,s(n)),t((e=>{a.current=e,s(e)}))}),[i,r]),l}(r)},gt}function Ct(){if(yt)return bt;yt=1;const e=Et();return bt=e}var St=R(Ct()),wt=re(),kt=ee(),Tt=te();const At={black:"#000",white:"#fff"},Nt="#e57373",Rt="#ef5350",Mt="#f44336",Lt="#d32f2f",Ot="#c62828",It="#f3e5f5",Pt="#ce93d8",Dt="#ba68c8",$t="#ab47bc",zt="#9c27b0",Bt="#7b1fa2",Ft="#e3f2fd",Ht="#90caf9",jt="#42a5f5",Wt="#1976d2",Gt="#1565c0",Kt="#4fc3f7",Yt="#29b6f6",Ut="#03a9f4",Vt="#0288d1",qt="#01579b",Qt="#81c784",Jt="#66bb6a",Xt="#4caf50",Zt="#388e3c",en="#2e7d32",tn="#1b5e20",nn="#ffb74d",rn="#ffa726",on="#ff9800",an="#f57c00",ln="#e65100",sn={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function un(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var cn=Object.freeze({__proto__:null,default:un}),dn="$$material";function pn(){return pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pn.apply(null,arguments)}function fn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var hn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0!==e.speedy&&e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1],n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);if(n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n,this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(t){/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0,this._alreadyInsertedOrderInsensitiveRule=!1},e}(),mn="-ms-",gn="-moz-",vn="-webkit-",bn="comm",yn="rule",xn="decl",_n="@keyframes",En=Math.abs,Cn=String.fromCharCode,Sn=Object.assign;function wn(e){return e.trim()}function kn(e,t,n){return e.replace(t,n)}function Tn(e,t){return e.indexOf(t)}function An(e,t){return 0|e.charCodeAt(t)}function Nn(e,t,n){return e.slice(t,n)}function Rn(e){return e.length}function Mn(e){return e.length}function Ln(e,t){return t.push(e),e}var On=1,In=1,Pn=0,Dn=0,$n=0,zn="";function Bn(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:On,column:In,length:a,return:""}}function Fn(e,t){return Sn(Bn("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hn(){return $n=Dn>0?An(zn,--Dn):0,In--,10===$n&&(In=1,On--),$n}function jn(){return $n=Dn<Pn?An(zn,Dn++):0,In++,10===$n&&(In=1,On++),$n}function Wn(){return An(zn,Dn)}function Gn(){return Dn}function Kn(e,t){return Nn(zn,e,t)}function Yn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Un(e){return On=In=1,Pn=Rn(zn=e),Dn=0,[]}function Vn(e){return zn="",e}function qn(e){return wn(Kn(Dn-1,Xn(91===e?e+2:40===e?e+1:e)))}function Qn(e){for(;($n=Wn())&&$n<33;)jn();return Yn(e)>2||Yn($n)>3?"":" "}function Jn(e,t){for(;--t&&jn()&&!($n<48||$n>102||$n>57&&$n<65||$n>70&&$n<97););return Kn(e,Gn()+(t<6&&32==Wn()&&32==jn()))}function Xn(e){for(;jn();)switch($n){case e:return Dn;case 34:case 39:34!==e&&39!==e&&Xn($n);break;case 40:41===e&&Xn(e);break;case 92:jn()}return Dn}function Zn(e,t){for(;jn()&&e+$n!==57&&(e+$n!==84||47!==Wn()););return"/*"+Kn(t,Dn-1)+"*"+Cn(47===e?e:jn())}function er(e){for(;!Yn(Wn());)jn();return Kn(e,Dn)}function tr(e){return Vn(nr("",null,null,null,[""],e=Un(e),0,[0],e))}function nr(e,t,n,r,o,i,a,l,s){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,_=i,E=r,C=y;g;)switch(h=b,b=jn()){case 40:if(108!=h&&58==An(C,d-1)){-1!=Tn(C+=kn(qn(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=qn(b);break;case 9:case 10:case 13:case 32:C+=Qn(h);break;case 92:C+=Jn(Gn()-1,7);continue;case 47:switch(Wn()){case 42:case 47:Ln(or(Zn(jn(),Gn()),t,n),s);break;default:C+="/"}break;case 123*m:l[u++]=Rn(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:-1==v&&(C=kn(C,/\f/g,"")),f>0&&Rn(C)-d&&Ln(f>32?ir(C+";",r,n,d-1):ir(kn(C," ","")+";",r,n,d-2),s);break;case 59:C+=";";default:if(Ln(E=rr(C,t,n,u,c,o,l,y,x=[],_=[],d),i),123===b)if(0===c)nr(C,t,E,E,x,i,d,l,_);else switch(99===p&&110===An(C,3)?100:p){case 100:case 108:case 109:case 115:nr(e,E,E,r&&Ln(rr(e,E,E,0,0,o,l,y,o,x=[],d),_),o,_,d,l,r?x:_);break;default:nr(C,E,E,E,[""],_,0,l,_)}}u=c=f=0,m=v=1,y=C="",d=a;break;case 58:d=1+Rn(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Hn())continue;switch(C+=Cn(b),b*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:l[u++]=(Rn(C)-1)*v,v=1;break;case 64:45===Wn()&&(C+=qn(jn())),p=Wn(),c=d=Rn(y=C+=er(Gn())),b++;break;case 45:45===h&&2==Rn(C)&&(m=0)}}return i}function rr(e,t,n,r,o,i,a,l,s,u,c){for(var d=o-1,p=0===o?i:[""],f=Mn(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=Nn(e,d+1,d=En(m=a[h])),y=e;v<f;++v)(y=wn(m>0?p[v]+" "+b:kn(b,/&\f/g,p[v])))&&(s[g++]=y);return Bn(e,t,n,0===o?yn:l,s,u,c)}function or(e,t,n){return Bn(e,t,n,bn,Cn($n),Nn(e,2,-2),0)}function ir(e,t,n,r){return Bn(e,t,n,xn,Nn(e,0,r),Nn(e,r+1,-1),r)}function ar(e,t){for(var n="",r=Mn(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function lr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xn:return e.return=e.return||e.value;case bn:return"";case _n:return e.return=e.value+"{"+ar(e.children,r)+"}";case yn:e.value=e.props.join(",")}return Rn(n=ar(e.children,r))?e.return=e.value+"{"+n+"}":""}function sr(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ur=function(e,t,n){for(var r=0,o=0;r=o,o=Wn(),38===r&&12===o&&(t[n]=1),!Yn(o);)jn();return Kn(e,Dn)},cr=function(e,t){return Vn(function(e,t){var n=-1,r=44;do{switch(Yn(r)){case 0:38===r&&12===Wn()&&(t[n]=1),e[n]+=ur(Dn-1,t,n);break;case 2:e[n]+=qn(r);break;case 4:if(44===r){e[++n]=58===Wn()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Cn(r)}}while(r=jn());return e}(Un(e),t))},dr=new WeakMap,pr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dr.get(n))&&!r){dr.set(e,!0);for(var o=[],i=cr(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var u=0;u<a.length;u++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[u]):a[u]+" "+i[l]}}},fr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},hr=function(e){return"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1},mr=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},gr=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},vr=function(e,t,n){mr(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),gr(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!mr(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),gr(e)))};function br(e,t){switch(function(e,t){return 45^An(e,0)?(((t<<2^An(e,0))<<2^An(e,1))<<2^An(e,2))<<2^An(e,3):0}(e,t)){case 5103:return vn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return vn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return vn+e+gn+e+mn+e+e;case 6828:case 4268:return vn+e+mn+e+e;case 6165:return vn+e+mn+"flex-"+e+e;case 5187:return vn+e+kn(e,/(\w+).+(:[^]+)/,vn+"box-$1$2"+mn+"flex-$1$2")+e;case 5443:return vn+e+mn+"flex-item-"+kn(e,/flex-|-self/,"")+e;case 4675:return vn+e+mn+"flex-line-pack"+kn(e,/align-content|flex-|-self/,"")+e;case 5548:return vn+e+mn+kn(e,"shrink","negative")+e;case 5292:return vn+e+mn+kn(e,"basis","preferred-size")+e;case 6060:return vn+"box-"+kn(e,"-grow","")+vn+e+mn+kn(e,"grow","positive")+e;case 4554:return vn+kn(e,/([^-])(transform)/g,"$1"+vn+"$2")+e;case 6187:return kn(kn(kn(e,/(zoom-|grab)/,vn+"$1"),/(image-set)/,vn+"$1"),e,"")+e;case 5495:case 3959:return kn(e,/(image-set\([^]*)/,vn+"$1$`$1");case 4968:return kn(kn(e,/(.+:)(flex-)?(.*)/,vn+"box-pack:$3"+mn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+vn+e+e;case 4095:case 3583:case 4068:case 2532:return kn(e,/(.+)-inline(.+)/,vn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rn(e)-1-t>6)switch(An(e,t+1)){case 109:if(45!==An(e,t+4))break;case 102:return kn(e,/(.+:)(.+)-([^]+)/,"$1"+vn+"$2-$3$1"+gn+(108==An(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tn(e,"stretch")?br(kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==An(e,t+1))break;case 6444:switch(An(e,Rn(e)-3-(~Tn(e,"!important")&&10))){case 107:return kn(e,":",":"+vn)+e;case 101:return kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+vn+(45===An(e,14)?"inline-":"")+"box$3$1"+vn+"$2$3$1"+mn+"$2box$3")+e}break;case 5936:switch(An(e,t+11)){case 114:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return vn+e+mn+e+e}return e}var yr,xr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xn:e.return=br(e.value,e.length);break;case _n:return ar([Fn(e,{value:kn(e.value,"@","@"+vn)})],r);case yn:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ar([Fn(e,{props:[kn(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ar([Fn(e,{props:[kn(t,/:(plac\w+)/,":"+vn+"input-$1")]}),Fn(e,{props:[kn(t,/:(plac\w+)/,":-moz-$1")]}),Fn(e,{props:[kn(t,/:(plac\w+)/,mn+"input-$1")]})],r)}return""}))}}],_r=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;yr=function(e){var t=e.match(_r);if(t)return t[t.length-1]};var Er,Cr,Sr,wr,kr=function(e){var t=e.key;if(!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||xr;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var o,i,a={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var s=[pr,fr];s.push(function(e){return function(t,n,r){if("rule"===t.type&&!e.compat){var o=t.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var i=t.parent?t.parent.children:r,a=i.length-1;a>=0;a--){var l=i[a];if(l.line<t.line)break;if(l.column<t.column){if(hr(l))return;break}}o.forEach((function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')}))}}}}({get compat(){return p.compat}}),vr);var u,c=[lr,function(e){e.root||(e.return?u.insert(e.return):e.value&&e.type!==bn&&u.insert(e.value+"{}"))}],d=function(e){var t=Mn(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}(s.concat(r,c));i=function(e,t,n,r){if(u=n,yr){var o=yr(t.styles);o&&(u={insert:function(e){n.insert(e+o)}})}!function(e){ar(tr(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new hn({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(l),p},Tr={exports:{}},Ar={};function Nr(){return Cr||(Cr=1,Tr.exports=function(){if(Er)return Ar;Er=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case u:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case f:case a:return e;default:return p}}case n:return p}}}function x(e){return y(e)===u}return Ar.AsyncMode=s,Ar.ConcurrentMode=u,Ar.ContextConsumer=l,Ar.ContextProvider=a,Ar.Element=t,Ar.ForwardRef=c,Ar.Fragment=r,Ar.Lazy=h,Ar.Memo=f,Ar.Portal=n,Ar.Profiler=i,Ar.StrictMode=o,Ar.Suspense=d,Ar.isAsyncMode=function(e){return x(e)||y(e)===s},Ar.isConcurrentMode=x,Ar.isContextConsumer=function(e){return y(e)===l},Ar.isContextProvider=function(e){return y(e)===a},Ar.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ar.isForwardRef=function(e){return y(e)===c},Ar.isFragment=function(e){return y(e)===r},Ar.isLazy=function(e){return y(e)===h},Ar.isMemo=function(e){return y(e)===f},Ar.isPortal=function(e){return y(e)===n},Ar.isProfiler=function(e){return y(e)===i},Ar.isStrictMode=function(e){return y(e)===o},Ar.isSuspense=function(e){return y(e)===d},Ar.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Ar.typeOf=y,Ar}()),Tr.exports}!function(){if(wr)return Sr;wr=1;var e=Nr(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var a=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;Sr=function e(t,r,o){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,o)}var f=l(r);s&&(f=f.concat(s(r)));for(var h=i(t),m=i(r),g=0;g<f.length;++g){var v=f[g];if(!(n[v]||o&&o[v]||m&&m[v]||h&&h[v])){var b=u(r,v);try{a(t,v,b)}catch(e){}}}}return t}}();function Rr(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var Mr=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Lr=function(e,t,n){Mr(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Or={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ir="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Pr="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Dr=/[A-Z]|^ms/g,$r=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zr=function(e){return 45===e.charCodeAt(1)},Br=function(e){return null!=e&&"boolean"!=typeof e},Fr=sr((function(e){return zr(e)?e:e.replace(Dr,"-$&").toLowerCase()})),Hr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace($r,(function(e,t,n){return Qr={name:t,styles:n,next:Qr},t}))}return 1===Or[e]||zr(e)||"number"!=typeof t||0===t?t:t+"px"},jr=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Wr=["normal","none","initial","inherit","unset"],Gr=Hr,Kr=/^-ms-/,Yr=/-(.)/g,Ur={};Hr=function(e,t){if("content"===e&&("string"!=typeof t||-1===Wr.indexOf(t)&&!jr.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=Gr(e,t);return""===n||zr(e)||-1===e.indexOf("-")||void 0!==Ur[e]||(Ur[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(Kr,"ms-").replace(Yr,(function(e,t){return t.toUpperCase()}))+"?")),n};var Vr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function qr(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles){if("NO_COMPONENT_SELECTOR"===String(r))throw new Error(Vr);return r}switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Qr={name:o.name,styles:o.styles,next:Qr},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Qr={name:a.name,styles:a.styles,next:Qr},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=qr(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":Br(l)&&(r+=Fr(i)+":"+Hr(i,l)+";")}else{if("NO_COMPONENT_SELECTOR"===i)throw new Error(Vr);if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=qr(e,t,a);switch(i){case"animation":case"animationName":r+=Fr(i)+":"+s+";";break;default:"undefined"===i&&console.error(Pr),r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)Br(a[u])&&(r+=Fr(i)+":"+Hr(i,a[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=Qr,s=n(e);return Qr=l,qr(e,t,s)}console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":var u=[],c=n.replace($r,(function(e,t,n){var r="animation"+u.length;return u.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"}));u.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(u,["`"+c+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+c+"`")}var d=n;if(null==t)return d;var p=t[d];return void 0!==p?p:d}var Qr,Jr=/label:\s*([^\s;{]+)\s*(;|$)/g;function Xr(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Qr=void 0;var i=e[0];if(null==i||void 0===i.raw)r=!1,o+=qr(n,t,i);else{var a=i;void 0===a[0]&&console.error(Ir),o+=a[0]}for(var l=1;l<e.length;l++)if(o+=qr(n,t,e[l]),r){var s=i;void 0===s[l]&&console.error(Ir),o+=s[l]}Jr.lastIndex=0;for(var u,c="";null!==(u=Jr.exec(o));)c+="-"+u[1];var d=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:d,styles:o,next:Qr,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}}var Zr=!!v.useInsertionEffect&&v.useInsertionEffect,eo=Zr||function(e){return e()},to=Zr||v.useLayoutEffect,no=v.createContext("undefined"!=typeof HTMLElement?kr({key:"css"}):null);no.displayName="EmotionCacheContext";var ro=no.Provider,oo=function(e){return b((function(t,n){var r=y(no);return e(t,r,n)}))},io=v.createContext({});io.displayName="EmotionThemeContext";var ao={}.hasOwnProperty,lo=function(e){var t=e.split(".");return t[t.length-1]},so=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?lo(t[1]):void 0},uo=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),co=function(e){return e.replace(/\$/g,"-")},po="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fo="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",ho=function(e,t){if("string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var r in t)ao.call(t,r)&&(n[r]=t[r]);if(n[po]=e,"undefined"!=typeof globalThis&&globalThis.EMOTION_RUNTIME_AUTO_LABEL&&t.css&&("object"!=typeof t.css||!("name"in t.css)||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var o=function(e){if(e)for(var t=e.split("\n"),n=0;n<t.length;n++){var r=so(t[n]);if(r){if(uo.has(r))break;if(/^[A-Z]/.test(r))return co(r)}}}((new Error).stack);o&&(n[fo]=o)}return n},mo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Mr(t,n,r),eo((function(){return Lr(t,n,r)})),null},go=oo((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[po],i=[r],a="";"string"==typeof e.className?a=Rr(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var l=Xr(i,void 0,v.useContext(io));if(-1===l.name.indexOf("-")){var s=e[fo];s&&(l=Xr([l,"label:"+s+";"]))}a+=t.key+"-"+l.name;var u={};for(var c in e)ao.call(e,c)&&"css"!==c&&c!==po&&c!==fo&&(u[c]=e[c]);return u.className=a,n&&(u.ref=n),v.createElement(v.Fragment,null,v.createElement(mo,{cache:t,serialized:l,isStringTag:"string"==typeof o}),v.createElement(o,u))}));go.displayName="EmotionCssPropInternal";var vo,bo,yo=go,xo=function(e,t){var n=arguments;if(null==t||!ao.call(t,"css"))return v.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=yo,o[1]=ho(e,t);for(var i=2;i<r;i++)o[i]=n[i];return v.createElement.apply(null,o)};vo=xo||(xo={}),bo||(bo=vo.JSX||(vo.JSX={}));var _o=!1,Eo=oo((function(e,t){!_o&&("className"in e&&e.className||"css"in e&&e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),_o=!0);var n=Xr([e.styles],void 0,v.useContext(io)),r=v.useRef();return to((function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}}),[t]),to((function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Lr(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}}),[t,n.name]),null}));function Co(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xr(t)}function So(){var e=Co.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}Eo.displayName="EmotionGlobal";var wo=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var l in void 0!==i.styles&&void 0!==i.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),a="",i)i[l]&&l&&(a&&(a+=" "),a+=l);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};var ko=function(e){var t=e.cache,n=e.serializedArr;return eo((function(){for(var e=0;e<n.length;e++)Lr(t,n[e],!1)})),null},To=oo((function(e,t){var n=!1,r=[],o=function(){if(n)throw new Error("css can only be used during render");for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var a=Xr(o,t.registered);return r.push(a),Mr(t,a,!1),t.key+"-"+a.name},i={css:o,cx:function(){if(n)throw new Error("cx can only be used during render");for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return function(e,t,n){var r=[],o=Rr(e,r,n);return r.length<2?n:o+t(r)}(t.registered,o,wo(r))},theme:v.useContext(io)},a=e.children(i);return n=!0,v.createElement(v.Fragment,null,v.createElement(ko,{cache:t,serializedArr:r}),a)}));To.displayName="EmotionClassNames";var Ao="undefined"!=typeof document,No="undefined"!=typeof jest||"undefined"!=typeof vi;if(Ao&&!No){var Ro="undefined"!=typeof globalThis?globalThis:Ao?window:global,Mo="__EMOTION_REACT_"+"11.14.0".split(".")[0]+"__";Ro[Mo]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Ro[Mo]=!0}var Lo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Oo=sr((function(e){return Lo.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Io=function(e){return"theme"!==e},Po=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Oo:Io},Do=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},$o="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",zo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Mr(t,n,r),eo((function(){return Lr(t,n,r)})),null},Bo=function e(t,n){if(void 0===t)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Do(t,n,i),s=l||Po(a),u=!s("as");return function(){var c=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{var p=c[0];void 0===p[0]&&console.error($o),d.push(p[0]);for(var f=c.length,h=1;h<f;h++)void 0===p[h]&&console.error($o),d.push(c[h],p[h])}var m=oo((function(e,t,n){var r=u&&e.as||a,i="",c=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=v.useContext(io)}"string"==typeof e.className?i=Rr(t.registered,c,e.className):null!=e.className&&(i=e.className+" ");var h=Xr(d.concat(c),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=u&&void 0===l?Po(r):s,g={};for(var b in e)u&&"as"===b||m(b)&&(g[b]=e[b]);return g.className=i,n&&(g.ref=n),v.createElement(v.Fragment,null,v.createElement(zo,{cache:t,serialized:h,isStringTag:"string"==typeof r}),v.createElement(r,g))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=l,Object.defineProperty(m,"toString",{value:function(){return void 0===o?"NO_COMPONENT_SELECTOR":"."+o}}),m.withComponent=function(t,r){return e(t,pn({},n,r,{shouldForwardProp:Do(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Bo[e]=Bo(e)}));var Fo,Ho,jo={exports:{}},Wo={};var Go=(Ho||(Ho=1,jo.exports=function(){if(Fo)return Wo;Fo=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var l,s={},u=null,c=null;for(l in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,l)&&!i.hasOwnProperty(l)&&(s[l]=n[l]);if(e&&e.defaultProps)for(l in n=e.defaultProps)void 0===s[l]&&(s[l]=n[l]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:o.current}}return Wo.Fragment=n,Wo.jsx=a,Wo.jsxs=a,Wo}()),jo.exports);let Ko;function Yo(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Go.jsx(Eo,{styles:r})}
7
+ System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,n,r,o,i,a,l,s,u,c,d,p,f,h,m,g,v,b,y,x,_,E,C,S,w,k,T;return{setters:[function(e){t=e.useMemo,n=e.useEffect,r=e.useElement,o=e.useStaleLayout,i=e.useModel,a=e.useInteractionState,l=e.useEmitter,s=e.useTranslator,u=e.useState,c=e.useTheme,d=e.usePromise,p=e.useImperativeHandle},function(e){f=e.default,h=e},function(e){m=e.createContext,g=e.default,v=e,b=e.forwardRef,y=e.useContext,x=e.isValidElement,_=e.cloneElement,E=e.Children,C=e.useState,S=e.useEffect,w=e.useRef,k=e.useCallback,T=e.useMemo}],execute:function(){e("default",(function(e){const t=new WC,{flags:f}=e,h=[];return{qae:{properties:A,data:N(t)},component(){const e=r(),m=P(e),g=o(),v=i(),b=a(),y=l(),x=s(),[_,E]=u(!1),[C,S]=u(void 0),[w,k]=u(1),T=c(),[A,N]=u(!1),[R,M]=u(null);d((()=>new Promise((e=>{var t;const n={id:null==g||null===(t=g.qInfo)||void 0===t?void 0:t.qId,resolve:e};h.push(n)}))),[]);const L=e=>{e||k(0),uE(g)||(!0===e&&N(!0),E(e),y.emit("njs-internal-edit-change",e))};n((()=>{const e=e=>{!async function(e,t){!async function(e,t){try{if(e&&t){const n=t(await e.getProperties());await e.setProperties(n)}}catch(e){console.error(e)}}(e,(e=>{const{qHyperCubeDef:n}=e;if(n){var r;const e=null===(r=n.qMeasures)||void 0===r?void 0:r.filter((e=>!(null==t?void 0:t.find((t=>{var n;return t===(null==e||null===(n=e.qDef)||void 0===n?void 0:n.cId)})))));n.qMeasures=e,n.qInterColumnSortOrder=[]}return{...e,qHyperCubeDef:n}}))}(v,e)};return y.on("onNodeDestroyed",e),()=>{y.removeListener("onNodeDestroyed",e)}}),[y,v]),n((()=>{2===w&&b.edit&&b.select&&L(!0)}),[w,b]),n((()=>{g&&void 0===C&&(S(g.text||null),M(null==g?void 0:g.text))}),[g,C]),n((()=>{const n=()=>{b.edit&&b.select&&k((e=>e+1))},r=t=>{const n=document.getElementById($C(v));e.contains(t.target)||null!=n&&n.contains(t.target)||(e=>{const t=document.getElementsByClassName("tekPopperMenu"),n=document.getElementById("tekTableMenu");if(null!=n&&n.contains(e))return!0;for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0;return!1})(t.target)||L(!1)};if(!b.edit||!b.select){var o;L(!1);const e=(null==v?void 0:v.id)&&(null===(o=t.getSnTexts()[v.id])||void 0===o?void 0:o.propertiesHaveBeenModified);(A||e)&&(y.emit("saveDocument"),t.setPropertiesHaveBeenModified(v.id,!1))}return e.addEventListener("click",n),document.addEventListener("mousedown",r),()=>{e.removeEventListener("click",n),document.removeEventListener("mousedown",r)}}),[e,b,v]),n((()=>{FC({rootElement:m,layout:g,model:v,element:e,edit:_,initialData:C,emitter:y,lang:x.language(),flags:f,theme:T,interactionState:b,readyToPrint:h})}),[g,m,v,e,_,e,C,y,f,T,b]),n((()=>{!_&&A&&y.emit("saveDocument")}),[_,y,A]),n((()=>{if(g){const e=g;e.text&&e.text!==R&&(M(e.text),y.emit("reloadData",e.text))}}),[g,R,y]),p((()=>({updateActiveState(e){e?t.setSelectedModelId(v.id):v.id===t.getSelectedModelId()&&t.setSelectedModelId(void 0)}})),[])},ext:{definition:{type:"items",component:"accordion",items:{data:HC,settings:jC}},exportProperties:null,importProperties:null,support:{snapshot:!0,export:!0,sharing:!0,exportData:!0,viewData:!1}}}}));const A={version:"1.3.4",showTitles:!1,text:null,fontsUsed:[],components:[],qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressZero:!1,qSuppressMissing:!0,qInitialDataFetch:[{qWidth:500,qHeight:10}]},disableNavMenu:!0,showDetails:!1},N=e=>{const t=()=>{e.setPropertiesHaveBeenModifiedForSelectedModel(!0)};return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:0,max:100,added(e){e.qDef={...e.qDef,qAggrFunc:"None"},t()},removed:t,replaced:t,moved:t}}]}};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var L,O={};var I=function(){if(L)return O;L=1;var e=f;return O.createRoot=e.createRoot,O.hydrateRoot=e.hydrateRoot,O}();const P=e=>{const r=t((()=>I.createRoot(e)),[e]);return n((()=>()=>{null==r||r.unmount()}),[r]),r},D=m({layout:void 0,model:void 0,element:void 0,edit:!1,initialData:void 0,emitter:void 0,lang:"en",flags:{isEnabled:()=>!1},theme:null,readyToPrint:[]});var $,z,B,F,H,j,W,G,K,Y,U,V,q={},Q={},J={},X={};function Z(){if($)return X;$=1;let e={},t={},n={},r={},o={},i={},a={},l={},s={},u={},c={},d={},p={},f={},h={},m={},g={},v={},b={},y={},x={},_={},E={},C={},S={},w={},k={},T={},A={},N={},R={},M={},L={},O={},I={};function P(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let D="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,z=D&&"documentMode"in document?document.documentMode:null,B=D&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),F=D&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),H=!(!D||!("InputEvent"in window)||z)&&"getTargetRanges"in new window.InputEvent("input"),j=D&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),W=D&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,G=D&&/^(?=.*Chrome).*/i.test(navigator.userAgent),K=D&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!G,Y=j||W||K?" ":"​",U=F?" ":Y,V=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,q=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,Q={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},J={directionless:1,unmergeable:2},Z={center:2,end:6,justify:4,left:1,right:3,start:5},ee={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},te={normal:0,segmented:2,token:1},ne={0:"normal",2:"segmented",1:"token"},re=!1,oe=0;function ie(e){oe=e.timeStamp}function ae(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function le(e,t,n){re=!0;let r=100<performance.now()-oe;try{kr(e,(()=>{let o=tr()||function(e){return e.getEditorState().read((()=>{let e=tr();return null!==e?e.clone():null}))}(e);var i=new Map,a=e.getRootElement(),l=e._editorState,s=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var p=t[d],f=p.type,h=p.target,m=Me(h,l);if(!(null===m&&h!==a||Ar(m)))if("characterData"===f){if(p=r&&Rn(m))e:{f=h;var g=m;if(Bn(p=o)){var v=p.anchor.getNode();if(v.is(g)&&p.format!==v.getFormat()){p=!1;break e}}p=3===f.nodeType&&g.isAttached()}p&&(f=p=null,null!==(g=at(e._window))&&g.anchorNode===h&&(p=g.anchorOffset,f=g.focusOffset),null!==(h=h.nodeValue)&&He(m,h,p,f,!1))}else if("childList"===f){for(u=!0,f=p.addedNodes,g=0;g<f.length;g++){var b=Re(v=f[g]),y=v.parentNode;null==y||v===s||null!==b||"BR"===v.nodeName&&ae(v,y,e)||(F&&(b=v.innerText||v.nodeValue)&&(c+=b),y.removeChild(v))}if(0<(f=(p=p.removedNodes).length)){for(g=0,v=0;v<f;v++)("BR"===(y=p[v]).nodeName&&ae(y,h,e)||s===y)&&(h.appendChild(y),g++);f!==g&&(h===a&&(m=l._nodeMap.get("root")),i.set(h,m))}}}if(0<i.size)for(let[t,n]of i)if(Rr(n))for(i=n.getChildrenKeys(),a=t.firstChild,l=0;l<i.length;l++)null!==(s=e.getElementByKey(i[l]))&&(null==a?(t.appendChild(s),a=s):a!==s&&t.replaceChild(s,a),a=a.nextSibling);else Rn(n)&&n.markDirty();if(0<(i=n.takeRecords()).length){for(a=0;a<i.length;a++)for(l=(s=i[a]).addedNodes,s=s.target,d=0;d<l.length;d++)null==(h=(m=l[d]).parentNode)||"BR"!==m.nodeName||ae(m,s,e)||h.removeChild(m);n.takeRecords()}null!==o&&(u&&(o.dirty=!0,Pe(o)),F&&Ue(e)&&o.insertRawText(c))}))}finally{re=!1}}function se(e){let t=e._observer;if(null!==t){le(e,t.takeRecords(),t)}}function ue(e){0===oe&&Xe(e).addEventListener("textInput",ie,!0),e._observer=new MutationObserver(((t,n)=>{le(e,t,n)}))}function ce(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,!(null!==n&&n!==o||null!==r&&r!==i||null!==e&&e!==t)}function de(e,t){let n=e.mergeWithSibling(t),r=vr()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function pe(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&Rn(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){ce(t,e)&&(e=de(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&Rn(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){ce(e,n)&&de(e,n);break}n.remove()}}}function fe(e){return he(e.anchor),he(e.focus),e}function he(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Rn(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Rr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let me=1,ge="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ve(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Ar(Me(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function be(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ve(t)&&ye(t)===e}catch(e){return!1}}function ye(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=Qe(e)}return null}function xe(e){return e.isToken()||e.isSegmented()}function _e(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ee(e,t,n){return!(e&(t=Q[t]))||null!==n&&n&t?null===n||n&t?e|t:e:e^t}function Ce(e){return Rn(e)||hn(e)||Ar(e)}function Se(e,t){if(null!=t)e.__key=t;else{mr(),99<pr&&P(14),t=vr();var n=gr(),r=""+me++;n._nodeMap.set(r,e),Rr(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function we(e){var t=e.getParent();if(null!==t){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;o.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function ke(e){99<pr&&P(14);var t=e.getLatest(),n=t.__parent,r=gr();let o=vr(),i=r._nodeMap;if(r=o._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=i.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,o._dirtyType=1,Rr(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Te(e){mr();var t=vr();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=Ne(n))&&t.getWritable()),null!==e&&(null!==(e=Ne(e))&&e.getWritable()))}function Ae(){return hr()?null:vr()._compositionKey}function Ne(e,t){return void 0===(e=(t||gr())._nodeMap.get(e))?null:e}function Re(e,t){return void 0!==(e=e[`__lexicalKey_${vr()._key}`])?Ne(e,t):null}function Me(e,t){for(;null!=e;){let n=Re(e,t);if(null!==n)return n;e=Qe(e)}return null}function Le(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Oe(e){return e.read((()=>Ie().getTextContent()))}function Ie(){return gr()._nodeMap.get("root")}function Pe(e){mr();let t=gr();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function De(e){var t,n=vr();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=Qe(t)}t=null}return null===t?e===(n=n.getRootElement())?Ne("root"):null:Ne(t)}function $e(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ze(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Be(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Fe(e,t,n){if(null!==(t=at(t._window))){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Me(r),null!==t&&Rn(r))){if(t===Y&&n){t=n,i=o=n.length}null!==t&&He(r,t,o,i,e)}}}function He(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===Y&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(""===c)if(Te(null),j||W||K)i.remove();else{let e=vr();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}else{o=i.getParent(),t=nr();var a=i.getTextContentSize(),l=Ae(),s=i.getKey();i.isToken()||null!==l&&s===l&&!u||Bn(t)&&(null!==o&&!o.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===a&&!i.canInsertTextAfter())?i.markDirty():(Bn(e=tr())&&null!==n&&null!==r&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=Nn(n=i.getTextContent()),i.replace(n),i=n)),i.setTextContent(c))}}}function je(){var e=Ie();Pe(fe(e=e.select(0,e.getChildrenSize())))}function We(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function Ge(e,t,n,r,o){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&P(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===o,(void 0===e||n)&&t.set(r,n?"updated":o))}function Ke(e,t,n){let r=e.getParent(),o=n;return null!==r&&(t&&0===n?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function Ye(e,t){var n=e.offset;return"element"===e.type?Ke(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?Ke(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ue(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ve(e){return!Or(e)&&!e.isLastChild()&&!e.isInline()}function qe(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&P(75,t),e}function Qe(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Je(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&P(78),e}function Ze(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Or(e)||Rr(e)&&e.isShadowRoot()}function tt(e){return Se(e=e.constructor.clone(e),null),e}function nt(e){var t=vr();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&P(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||P(98),t):e}function rt(e,t){!Or(e=e.getParent())||Rr(t)||Ar(t)||P(99)}function ot(e){return(Ar(e)||Rr(e)&&!e.canBeEmpty())&&!e.isInline()}function it(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function at(e){return D?(e||window).getSelection():null}function lt(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&P(102);let r=e=>{const t=e.getParentOrThrow(),o=et(t),i=e!==n||o?tt(e):e;if(o)return e.insertAfter(i),[e,i,i];const[a,l,s]=r(t);return e=e.getNextSiblings(),s.append(i,...e),[a,l,i]},[o,i]=r(n);return[o,i]}function st(e,t){for(;e!==Ie()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ut(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();void 0===r&&P(112),Rr(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function ct(e,t,n,r,o,i){for(e=e.getFirstChild();null!==e;){let a=e.__key;e.__parent===t&&(Rr(e)&&ct(e,a,n,r,o,i),n.has(a)||i.delete(a),o.push(a)),e=e.getNextSibling()}}let dt,pt,ft,ht,mt,gt,vt,bt,yt,xt,_t="",Et="",Ct="",St=!1,wt=!1,kt=null;function Tt(e,t){let n=vt.get(e);if(null!==t){let n=Ht(e);n.parentNode===t&&t.removeChild(n)}bt.has(e)||pt._keyToDOMMap.delete(e),Rr(n)&&At(e=$t(n,vt),0,e.length-1,null),void 0!==n&&Ge(xt,ft,ht,n,"destroyed")}function At(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&Tt(n,r)}}function Nt(e,t){e.setProperty("text-align",t)}function Rt(e,t){var n=dt.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Mt(e,t){e=e.style,0===t?Nt(e,""):1===t?Nt(e,"left"):2===t?Nt(e,"center"):3===t?Nt(e,"right"):4===t?Nt(e,"justify"):5===t?Nt(e,"start"):6===t&&Nt(e,"end")}function Lt(e,t,n){let r=bt.get(e);void 0===r&&P(60);let o=r.createDOM(dt,pt);var i=pt._keyToDOMMap;if(o["__lexicalKey_"+pt._key]=e,i.set(e,o),Rn(r)?o.setAttribute("data-lexical-text","true"):Ar(r)&&o.setAttribute("data-lexical-decorator","true"),Rr(r)){if(e=r.__indent,i=r.__size,0!==e&&Rt(o,e),0!==i){--i,e=$t(r,bt);var a=Et;Et="",Ot(e,r,0,i,o,null),Dt(r,o),Et=a}0!==(e=r.__format)&&Mt(o,e),r.isInline()||Pt(null,r,o),Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else i=r.getTextContent(),Ar(r)?(null!==(a=r.decorate(pt,dt))&&Bt(e,a),o.contentEditable="false"):Rn(r)&&(r.isDirectionless()||(Et+=i)),_t+=i,Ct+=i;return null!==t&&(null!=n?t.insertBefore(o,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(o,n):t.appendChild(o)),Ge(xt,ft,ht,r,"created"),o}function Ot(e,t,n,r,o,i){let a=_t;for(_t="";n<=r;++n)Lt(e[n],o,i);Ve(t)&&(_t+="\n\n"),o.__lexicalTextContent=_t,_t=a+_t}function It(e,t){return hn(e=t.get(e))||Ar(e)&&e.isInline()}function Pt(e,t,n){e=null!==e&&(0===e.__size||It(e.__last,vt)),t=0===t.__size||It(t.__last,bt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Dt(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Et||n!==kt){let i=""===Et;if(i)var r=kt;else r=Et,r=V.test(r)?"rtl":q.test(r)?"ltr":null;if(r!==n){let a=t.classList,l=dt.theme;var o=null!==n?l[n]:void 0;let s=null!==r?l[r]:void 0;void 0!==o&&("string"==typeof o&&(o=o.split(" "),o=l[n]=o),a.remove(...o)),null===r||i&&"ltr"===r?t.removeAttribute("dir"):(void 0!==s&&("string"==typeof s&&(n=s.split(" "),s=l[r]=n),void 0!==s&&a.add(...s)),t.dir=r),wt||(e.getWritable().__dir=r)}kt=r,t.__lexicalDirTextContent=Et,t.__lexicalDir=r}}function $t(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&P(101),n.push(e),e=r.__next}return n}function zt(e,t){var n=vt.get(e),r=bt.get(e);void 0!==n&&void 0!==r||P(61);var o=St||gt.has(e)||mt.has(e);let i=qe(pt,e);if(n===r&&!o)return Rr(n)?(void 0!==(r=i.__lexicalTextContent)&&(_t+=r,Ct+=r),void 0!==(r=i.__lexicalDirTextContent)&&(Et+=r)):(r=n.getTextContent(),Rn(n)&&!n.isDirectionless()&&(Et+=r),Ct+=r,_t+=r),i;if(n!==r&&o&&Ge(xt,ft,ht,r,"updated"),r.updateDOM(n,i,dt))return r=Lt(e,null,null),null===t&&P(62),t.replaceChild(r,i),Tt(e,null),r;if(Rr(n)&&Rr(r)){if((e=r.__indent)!==n.__indent&&Rt(i,e),(e=r.__format)!==n.__format&&Mt(i,e),o){e=r,o=Et,Et="",t=_t;var a=n.__size,l=e.__size;if(_t="",1===a&&1===l){var s=n.__first,u=e.__first;if(s===u)zt(s,i);else{var c=Ht(s);u=Lt(u,null,null),i.replaceChild(u,c),Tt(s,null)}}else{u=$t(n,vt);var d=$t(e,bt);if(0===a)0!==l&&Ot(d,e,0,l-1,i,null);else if(0===l)0!==a&&(At(u,0,a-1,(s=null==i.__lexicalLineBreak)?null:i),s&&(i.textContent=""));else{var p=u;u=d,d=a-1,a=l-1;let t=i.firstChild,n=0;for(l=0;n<=d&&l<=a;){var f=p[n];let e=u[l];if(f===e)t=Ft(zt(e,i)),n++,l++;else{void 0===s&&(s=new Set(p)),void 0===c&&(c=new Set(u));let r=c.has(f),o=s.has(e);r?(o?((f=qe(pt,e))===t?t=Ft(zt(e,i)):(null!=t?i.insertBefore(f,t):i.appendChild(f),zt(e,i)),n++):Lt(e,i,t),l++):(t=Ft(Ht(f)),Tt(f,i),n++)}}c=l>a,(s=n>d)&&!c?Ot(u,e,l,a,i,s=void 0===(s=u[a+1])?null:pt.getElementByKey(s)):c&&!s&&At(p,n,d,i)}}Ve(e)&&(_t+="\n\n"),i.__lexicalTextContent=_t,_t=t+_t,Dt(e,i),Et=o,Or(r)||r.isInline()||Pt(n,r,i)}Ve(r)&&(_t+="\n\n",Ct+="\n\n")}else n=r.getTextContent(),Ar(r)?null!==(o=r.decorate(pt,dt))&&Bt(e,o):Rn(r)&&!r.isDirectionless()&&(Et+=n),_t+=n,Ct+=n;return!wt&&Or(r)&&r.__cachedText!==Ct&&((r=r.getWritable()).__cachedText=Ct),i}function Bt(e,t){let n=pt._pendingDecorators,r=pt._decorators;if(null===n){if(r[e]===t)return;n=Le(pt)}n[e]=t}function Ft(e){return null!==(e=e.nextSibling)&&e===pt._blockCursorElement&&(e=e.nextSibling),e}function Ht(e){let t=yt.get(e);return void 0===t&&P(75,e),t}let jt=Object.freeze({}),Wt=[["keydown",function(e,t){if(Gt=e.timeStamp,Kt=e.keyCode,!t.isComposing()){var{keyCode:o,shiftKey:i,ctrlKey:a,metaKey:l,altKey:k}=e;if(!Cr(t,f,e)){if(39!==o||a||l||k)if(39!==o||k||i||!a&&!l)if(37!==o||a||l||k)if(37!==o||k||i||!a&&!l)if(38!==o||a||l)if(40!==o||a||l)if(13===o&&i)Jt=!0,Cr(t,x,e);else if(32===o)Cr(t,_,e);else if(B&&a&&79===o)e.preventDefault(),Jt=!0,Cr(t,r,!0);else if(13!==o||i)if(B?k||l||!(8===o||72===o&&a):a||k||l||8!==o)if(27===o)Cr(t,C,e);else if(B?i||k||l||!(46===o||68===o&&a):a||k||l||46!==o)if(8===o&&(B?k:a))e.preventDefault(),Cr(t,s,!0);else if(46===o&&(B?k:a))e.preventDefault(),Cr(t,s,!1);else if(B&&l&&8===o)e.preventDefault(),Cr(t,u,!0);else if(B&&l&&46===o)e.preventDefault(),Cr(t,u,!1);else if(66===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"bold");else if(85===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"underline");else if(73===o&&!k&&(B?l:a))e.preventDefault(),Cr(t,c,"italic");else if(9!==o||k||a||l)if(90===o&&!i&&(B?l:a))e.preventDefault(),Cr(t,d,void 0);else{var T=B?90===o&&l&&i:89===o&&a||90===o&&a&&i;T?(e.preventDefault(),Cr(t,p,void 0)):Wn(t._editorState._selection)?(T=!i&&(67===o&&(B?l:a)))?(e.preventDefault(),Cr(t,R,e)):(T=!i&&(88===o&&(B?l:a)))?(e.preventDefault(),Cr(t,M,e)):65===o&&(B?l:a)&&(e.preventDefault(),t.update((()=>{je()}))):!F&&65===o&&(B?l:a)&&(e.preventDefault(),t.update((()=>{je()})))}else Cr(t,w,e);else 46===o?Cr(t,S,e):(e.preventDefault(),Cr(t,n,!1));else 8===o?Cr(t,E,e):(e.preventDefault(),Cr(t,n,!0));else Jt=!1,Cr(t,x,e);else Cr(t,y,e);else Cr(t,b,e);else Cr(t,v,e);else Cr(t,g,e);else Cr(t,m,e);else Cr(t,h,e);(a||i||k||l)&&Cr(t,I,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&kr(t,(()=>{Ar(Me(n))||(Qt=!0)}))}],["compositionstart",function(e,t){kr(t,(()=>{let n=tr();if(Bn(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Te(r.key),(e.timeStamp<Gt+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&Cr(t,i,U)}}))}],["compositionend",function(e,t){F?Xt=!0:kr(t,(()=>{on(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),kr(t,(()=>{var n=tr(),r=e.data,o=rn(e);if(null!=r&&Bn(n)&&en(n,o,r,e.timeStamp,!1)){Xt&&(on(t,r),Xt=!1);var a=n.anchor,l=a.getNode();if(null===(o=at(t._window)))return;let s=a.offset;(a=H&&!n.isCollapsed()&&Rn(l)&&null!==o.anchorNode)&&(a=(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset))===(3===(o=o.anchorNode).nodeType?o.nodeValue:null)),a||Cr(t,i,r),r=r.length,F&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),j||W||K||!t.isComposing()||(Gt=0,Te(null))}else Fe(!1,t,null!==r?r:void 0),Xt&&(on(t,r||void 0),Xt=!1);mr(),se(n=vr())})),Ut=null}],["click",function(e,n){kr(n,(()=>{let r=tr();var o=at(n._window);let i=nr();if(o)if(Bn(r)){let t=r.anchor;var a=t.getNode();"element"===t.type&&0===t.offset&&r.isCollapsed()&&!Or(a)&&1===Ie().getChildrenSize()&&a.getTopLevelElementOrThrow().isEmpty()&&null!==i&&r.is(i)?(o.removeAllRanges(),r.dirty=!0):3!==e.detail||r.isCollapsed()||a!==(o=r.focus.getNode())&&(Rr(a)?a.select(0):a.getParentOrThrow().select(0))}else"touch"===e.pointerType&&(null!==(a=o.anchorNode)&&(1===(a=a.nodeType)||3===a))&&Pe(o=er(i,o,n));Cr(n,t,e)}))}],["cut",jt],["copy",jt],["dragstart",jt],["dragover",jt],["dragend",jt],["paste",jt],["focus",jt],["blur",jt],["drop",jt]];H&&Wt.push(["beforeinput",(e,t)=>function(e,t){let f=e.inputType,h=rn(e);"deleteCompositionText"===f||F&&Ue(t)||"insertCompositionText"!==f&&kr(t,(()=>{let m=tr();if("deleteContentBackward"===f){if(null===m){var g=nr();if(!Bn(g))return;Pe(g.clone())}if(Bn(m))return void(229===Kt&&e.timeStamp<Gt+30&&t.isComposing()&&m.anchor.key===m.focus.key?(Te(null),Gt=0,setTimeout((()=>{kr(t,(()=>{Te(null)}))}),30),Bn(m)&&(g=m.anchor.getNode(),g.markDirty(),m.format=g.getFormat(),m.style=g.getStyle())):(e.preventDefault(),Cr(t,n,!0)))}if(Bn(m)){g=e.data,null!==Ut&&Fe(!1,t,Ut),m.dirty&&null===Ut||!m.isCollapsed()||Or(m.anchor.getNode())||null===h||m.applyDOMRange(h),Ut=null;var v=m.focus,b=m.anchor.getNode();if(v=v.getNode(),"insertText"===f||"insertTranspose"===f)"\n"===g?(e.preventDefault(),Cr(t,r,!1)):"\n\n"===g?(e.preventDefault(),Cr(t,o,void 0)):null==g&&e.dataTransfer?(g=e.dataTransfer.getData("text/plain"),e.preventDefault(),m.insertRawText(g)):null!=g&&en(m,h,g,e.timeStamp,!0)?(e.preventDefault(),Cr(t,i,g)):Ut=g,Yt=e.timeStamp;else switch(e.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Cr(t,i,e);break;case"insertFromComposition":Te(null),Cr(t,i,e);break;case"insertLineBreak":Te(null),Cr(t,r,!1);break;case"insertParagraph":Te(null),Jt&&!W?(Jt=!1,Cr(t,r,!1)):Cr(t,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Cr(t,a,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rr(e)||Rr(t)||!e.isToken()||!t.isToken()})(b,v)&&Cr(t,l,e);break;case"deleteByDrag":case"deleteByCut":Cr(t,l,e);break;case"deleteContent":Cr(t,n,!1);break;case"deleteWordBackward":Cr(t,s,!0);break;case"deleteWordForward":Cr(t,s,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Cr(t,u,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Cr(t,u,!1);break;case"formatStrikeThrough":Cr(t,c,"strikethrough");break;case"formatBold":Cr(t,c,"bold");break;case"formatItalic":Cr(t,c,"italic");break;case"formatUnderline":Cr(t,c,"underline");break;case"historyUndo":Cr(t,d,void 0);break;case"historyRedo":Cr(t,p,void 0)}}}))}(e,t)]);let Gt=0,Kt=0,Yt=0,Ut=null,Vt=0,qt=!1,Qt=!1,Jt=!1,Xt=!1,Zt=[0,"",0,"root",0];function en(e,t,n,r,o){let i=e.anchor,a=e.focus,l=i.getNode();var s=vr();let u=at(s._window),c=null!==u?u.anchorNode:null,d=i.key;s=s.getElementByKey(d);let p=n.length;return d!==a.key||!Rn(l)||(!o&&(!H||Yt<r+50)||l.isDirty()&&2>p||$e(n))&&i.offset!==a.offset&&!l.isComposing()||xe(l)||l.isDirty()&&1<p||(o||!H)&&null!==s&&!l.isComposing()&&c!==_e(s)||null!==u&&null!==t&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(Rn(t=t.getPreviousSibling())||Rr(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,l)}function tn(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function nn(t,n,r){let{anchorNode:o,anchorOffset:i,focusNode:a,focusOffset:l}=t;qt&&(qt=!1,tn(o,i)&&tn(a,l))||kr(n,(()=>{if(r){if(be(n,o,a)){var i=tr();if(Bn(i)){var l=i.anchor,s=l.getNode();if(i.isCollapsed()){"Range"===t.type&&t.anchorNode===t.focusNode&&(i.dirty=!0);var u=Xe(n).event;u=u?u.timeStamp:performance.now();let[e,r,o,a,c]=Zt;u<c+200&&l.offset===o&&l.key===a?(i.format=e,i.style=r):"text"===l.type?(i.format=s.getFormat(),i.style=s.getStyle()):"element"===l.type&&(i.format=0,i.style="")}else{l=255,s=!1;let e=(u=i.getNodes()).length;for(let t=0;t<e;t++){let e=u[t];if(Rn(e)&&(s=!0,0===(l&=e.getFormat())))break}i.format=s?l:0}}Cr(n,e,void 0)}}else Pe(null)}))}function rn(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function on(e,t){var n=e._compositionKey;if(Te(null),null!==n&&null!=t){if(""===t)return t=Ne(n),void(null!==(e=_e(e.getElementByKey(n)))&&null!==e.nodeValue&&Rn(t)&&He(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&Bn(n=tr()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Cr(e,x,null)}Fe(!0,e,t)}function an(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let ln=new Map;function sn(e){let t=at(null==(e=e.target)?null:9===e.nodeType?e.defaultView:e.ownerDocument.defaultView);if(null!==t){var n=ye(t.anchorNode);if(null!==n){Qt&&(Qt=!1,kr(n,(()=>{var e=nr(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&Pe(e=er(e,t,n))})));var r=(e=(e=ze(n))[e.length-1])._key,o=ln.get(r),i=o||e;i!==n&&nn(t,i,!1),nn(t,n,!0),n!==e?ln.set(r,n):o&&ln.delete(r)}}}function un(e,t,n){mr();var r=e.__key;let o=e.getParent();if(null!==o){var i=tr();if(Bn(i)&&Rr(e)){var{anchor:a,focus:l}=i,s=a.getNode(),u=l.getNode();Je(s,e)&&a.set(e.__key,0,"element"),Je(u,e)&&l.set(e.__key,0,"element")}if(u=!1,Bn(s=i)&&t){i=s.anchor;let t=s.focus;i.key===r&&(ir(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(ir(t,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Wn(s)&&t&&e.isSelected()&&e.selectPrevious();Bn(s)&&t&&!u?(r=e.getIndexWithinParent(),we(e),rr(s,o,r,-1)):we(e),n||et(o)||o.canBeEmpty()||!o.isEmpty()||un(o,t),t&&Or(o)&&o.isEmpty()&&o.selectEnd()}}class cn{static getType(){P(64,this.name)}static clone(){P(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Se(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=Ne(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||tr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(Rn(this)||!Bn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Ne(e)}getParentOrThrow(){let e=this.getParent();return null===e&&P(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&P(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:Ne(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Ne(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Rr(this)&&t.unshift(this),Rr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var o=this;;){var i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;if(null!==(i=Rr(o)?t?o.getFirstChild():o.getLastChild():null))o=i;else if(null!==(i=t?o.getNextSibling():o.getPreviousSibling()))o=i;else{if(o=o.getParentOrThrow(),r.has(o.__key)||n.push(o),o===e)break;i=o;do{null===i&&P(68),o=t?i.getNextSibling():i.getPreviousSibling(),null!==(i=i.getParent())&&(null!==o||r.has(i.__key)||n.push(i))}while(null===o)}}return t||n.reverse(),n}isDirty(){let e=vr()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=Ne(this.__key);return null===e&&P(113),e}getWritable(){mr();var e=gr(),t=vr();e=e._nodeMap;let n=this.__key,r=this.getLatest(),o=r.__parent;t=t._cloneNotNeeded;var i=tr();return null!==i&&(i._cachedNodes=null),t.has(n)?(ke(r),r):((i=r.constructor.clone(r)).__parent=o,i.__next=r.__next,i.__prev=r.__prev,Rr(r)&&Rr(i)?(i.__first=r.__first,i.__last=r.__last,i.__size=r.__size,i.__indent=r.__indent,i.__format=r.__format,i.__dir=r.__dir):Rn(r)&&Rn(i)&&(i.__format=r.__format,i.__style=r.__style,i.__mode=r.__mode,i.__detail=r.__detail),t.add(n),i.__key=n,ke(i),e.set(n,i),i)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){P(70)}updateDOM(){P(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){P(72)}static importJSON(){P(18,this.name)}static transform(){return null}remove(e){un(this,!0,e)}replace(e,t){mr();var n=tr();null!==n&&(n=n.clone()),rt(this,e);let r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),l=(e=this.getParentOrThrow().getWritable()).__size;we(a);let s=r.getPreviousSibling(),u=r.getNextSibling(),c=r.__prev,d=r.__next,p=r.__parent;return un(r,!1,!0),null===s?e.__first=i:s.getWritable().__next=i,a.__prev=c,null===u?e.__last=i:u.getWritable().__prev=i,a.__next=d,a.__parent=p,e.__size=l,t&&this.getChildren().forEach((e=>{a.append(e)})),Bn(n)&&(Pe(n),t=n.anchor,n=n.focus,t.key===o&&Pn(t,a),n.key===o&&Pn(n,a)),Ae()===o&&Te(i),a}insertAfter(e,t=!0){mr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var o=r.getParent();let i=tr();var a=!1,l=!1;if(null!==o){var s=e.getIndexWithinParent();we(r),Bn(i)&&(l=o.__key,a=i.anchor,o=i.focus,a="element"===a.type&&a.key===l&&a.offset===s+1,l="element"===o.type&&o.key===l&&o.offset===s+1)}o=this.getNextSibling(),s=this.getParentOrThrow().getWritable();let u=r.__key,c=n.__next;return null===o?s.__last=u:o.getWritable().__prev=u,s.__size++,n.__next=u,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,t&&Bn(i)&&(rr(i,s,(t=this.getIndexWithinParent())+1),n=s.__key,a&&i.anchor.set(n,t+2,"element"),l&&i.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){mr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),o=r.__key;we(r);let i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=n.__prev,s=this.getIndexWithinParent();return null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=l,r.__next=n.__key,r.__parent=n.__parent,n=tr(),t&&Bn(n)&&rr(n,t=this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return Br()}selectPrevious(e,t){mr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Rr(n)?n.select():Rn(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){mr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Rr(n)?n.select(0,0):Rn(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class dn extends cn{static getType(){return"linebreak"}static clone(e){return new dn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^[\s|\r?\n|\t]+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^[\s|\r?\n|\t]+$/))?null:{conversion:pn,priority:0}}}}static importJSON(){return fn()}exportJSON(){return{type:"linebreak",version:1}}}function pn(){return{node:fn()}}function fn(){return nt(new dn)}function hn(e){return e instanceof dn}function mn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function gn(e,t){return 1&t?"strong":2&t?"em":"span"}function vn(e,t,n,r,o){e=r.classList,void 0!==(r=We(o,"base"))&&e.add(...r);let i=!1,a=8&t&&4&t;var l=8&n&&4&n;void 0!==(r=We(o,"underlineStrikethrough"))&&(l?(i=!0,a||e.add(...r)):a&&e.remove(...r));for(let s in Q)l=Q[s],void 0!==(r=We(o,s))&&(n&l&&(!i||"underline"!==s&&"strikethrough"!==s)?(!(t&l)||a&&"underline"===s||"strikethrough"===s)&&e.add(...r):t&l&&e.remove(...r))}function bn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?Y:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||F){n=t.length;let o=e.length,i=0,a=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;a+i<n&&a+i<o&&t[n-a-1]===e[o-a-1];)a++;e=[i,n-i-a,e.slice(i,o-a)];let[l,s,u]=e;0!==s&&r.deleteData(l,s),r.insertData(l,u)}else r.nodeValue=e}function yn(e,t){return(t=document.createElement(t)).appendChild(e),t}class xn extends cn{static getType(){return"text"}static clone(e){return new xn(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return ne[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Ae()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){return e=Q[e],!!(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ee(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=mn(0,t);let r=gn(0,t),o=document.createElement(null===n?r:n),i=o;return null!==n&&(i=document.createElement(r),o.appendChild(i)),n=i,bn(this.__text,n,this),void 0!==(e=e.theme.text)&&vn(r,0,t,n,e),""!==(t=this.__style)&&(o.style.cssText=t),o}updateDOM(e,t,n){let r=this.__text;var o=e.__format,i=this.__format,a=mn(0,o);let l=mn(0,i);var s=gn(0,o);let u=gn(0,i);return(null===a?s:a)!==(null===l?u:l)||(a===l&&s!==u?(null==(o=t.firstChild)&&P(48),bn(r,e=a=document.createElement(u),this),void 0!==(n=n.theme.text)&&vn(u,0,i,e,n),t.replaceChild(a,o),!1):(s=t,null!==l&&null!==a&&(null==(s=t.firstChild)&&P(49)),bn(r,s,this),void 0!==(n=n.theme.text)&&o!==i&&vn(u,o,i,s,n),i=this.__style,e.__style!==i&&(t.style.cssText=i),!1))}static importDOM(){return{"#text":()=>({conversion:Sn,priority:0}),b:()=>({conversion:En,priority:0}),code:()=>({conversion:An,priority:0}),em:()=>({conversion:An,priority:0}),i:()=>({conversion:An,priority:0}),s:()=>({conversion:An,priority:0}),span:()=>({conversion:_n,priority:0}),strong:()=>({conversion:An,priority:0}),sub:()=>({conversion:An,priority:0}),sup:()=>({conversion:An,priority:0}),u:()=>({conversion:An,priority:0})}}static importJSON(e){let t=Nn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&(this.hasFormat("bold")&&(e=yn(e,"b")),this.hasFormat("italic")&&(e=yn(e,"i")),this.hasFormat("strikethrough")&&(e=yn(e,"s")),this.hasFormat("underline")&&(e=yn(e,"u"))),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?Q[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?J[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=Q[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=te[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){mr();let n=tr();var r=this.getTextContent();let o=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Bn(n)?((r=Ae())!==n.anchor.key&&r!==n.focus.key||Te(o),n.setTextNodeRange(this,e,this,t),n):Xn(o,e,o,t,"text","text")}spliceText(e,t,n,r){let o=this.getWritable(),i=o.__text,a=n.length,l=e;0>l&&(l=a+l,0>l&&(l=0));let s=tr();return r&&Bn(s)&&(e+=a,s.setTextNodeRange(o,e,o,e)),t=i.slice(0,l)+n+i.slice(l+t),o.__text=t,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){mr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=Ae(),i=new Set(e);e=[];for(var a=n.length,l="",s=0;s<a;s++)""!==l&&i.has(s)&&(e.push(l),l=""),l+=n[s];if(""!==l&&e.push(l),0===(i=e.length))return[];if(e[0]===n)return[t];var u=e[0];n=t.getParentOrThrow(),s=t.getFormat();let c=t.getStyle(),d=t.__detail;a=!1,t.isSegmented()?((l=Nn(u)).__format=s,l.__style=c,l.__detail=d,a=!0):(l=t.getWritable()).__text=u,t=tr(),l=[l],u=u.length;for(let n=1;n<i;n++){var p=e[n],f=p.length;(p=Nn(p).getWritable()).__format=s,p.__style=c,p.__detail=d;let i=p.__key;if(f=u+f,Bn(t)){let e=t.anchor,n=t.focus;e.key===r&&"text"===e.type&&e.offset>u&&e.offset<=f&&(e.key=i,e.offset-=u,t.dirty=!0),n.key===r&&"text"===n.type&&n.offset>u&&n.offset<=f&&(n.key=i,n.offset-=u,t.dirty=!0)}o===r&&Te(i),u=f,l.push(p)}return r=this.getPreviousSibling(),o=this.getNextSibling(),null!==r&&ke(r),null!==o&&ke(o),r=n.getWritable(),o=this.getIndexWithinParent(),a?(r.splice(o,0,l),this.remove()):r.splice(o,1,l),Bn(t)&&rr(t,n,o,i-1),l}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||P(50);var n=this.__key;let r=e.__key,o=this.__text,i=o.length;Ae()===r&&Te(n);let a=tr();if(Bn(a)){let o=a.anchor,l=a.focus;null!==o&&o.key===r&&(ar(o,t,n,e,i),a.dirty=!0),null!==l&&l.key===r&&(ar(l,t,n,e,i),a.dirty=!0)}return n=e.__text,this.setTextContent(t?n+o:o+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function _n(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,o="underline"===e.style.textDecoration,i=e.style.verticalAlign;return{forChild:e=>Rn(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),o&&e.toggleFormat("underline"),"sub"===i&&e.toggleFormat("subscript"),"super"===i&&e.toggleFormat("superscript"),e):e,node:null}}function En(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(Rn(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Cn=new WeakMap;function Sn(e){null===e.parentElement&&P(129);for(var t,n=e.textContent||"",r=e.parentNode,o=[e];null!==r&&void 0===(t=Cn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r<o.length;r++)Cn.set(o[r],t);if(null!==t){for(e=[],o=(n=n.split(/(\r?\n|\t)/)).length,t=0;t<o;t++)"\n"===(r=n[t])||"\r\n"===r?e.push(fn()):"\t"===r?e.push(Ln()):""!==r&&e.push(Nn(r));return{node:e}}if(""===(n=n.replace(/\r?\n|\t/gm," ").replace("\r","").replace(/\s+/g," ")))return{node:null};if(" "===n[0]){for(o=e,t=!0;null!==o&&null!==(o=kn(o,!1));)if(0<(r=o.textContent||"").length){r.match(/(?:\s|\r?\n|\t)$/)&&(n=n.slice(1)),t=!1;break}t&&(n=n.slice(1))}if(" "===n[n.length-1]){for(o=!0;null!==e&&null!==(e=kn(e,!0));)if(0<(e.textContent||"").replace(/^[\s|\r?\n|\t]+/,"").length){o=!1;break}o&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Nn(n)}}let wn=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function kn(e,t){for(;;){for(var n=void 0;null===(n=t?e.nextSibling:e.previousSibling);)if(null===(e=e.parentElement))return null;if(1===(e=n).nodeType&&(""===(n=e.style.display)&&null===e.nodeName.match(wn)||""!==n&&!n.startsWith("inline")))return null;for(;null!==(n=t?e.firstChild:e.lastChild);)e=n;if(3===e.nodeType)return e;if("BR"===e.nodeName)return null}}let Tn={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function An(e){let t=Tn[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(Rn(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Nn(e=""){return nt(new xn(e))}function Rn(e){return e instanceof xn}class Mn extends xn{static getType(){return"tab"}static clone(e){let t=new Mn(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Ln();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){P(126)}setDetail(){P(127)}setMode(){P(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ln(){return nt(new Mn)}class On{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Rr(t)){var o=t.getDescendantByIndex(r);t=null!=o?o:t}return Rr(n)&&(o=n.getDescendantByIndex(e),n=null!=o?o:n),t===n?r<e:t.isBefore(n)}getNode(){let e=Ne(this.key);return null===e&&P(20),e}set(e,t,n){let r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,hr()||(Ae()===o&&Te(e),null!==r&&(r._cachedNodes=null,r.dirty=!0))}}function In(e,t){let n=t.__key,r=e.offset,o="element";if(Rn(t))o="text",r>(t=t.getTextContentSize())&&(r=t);else if(!Rr(t)){var i=t.getNextSibling();Rn(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function Pn(e,t){if(Rr(t)){let n=t.getLastDescendant();Rr(n)||Rn(n)?In(e,n):In(e,t)}else In(e,t)}function Dn(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Nn(),l=Or(o)?Br().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(l):(i.insertBefore(l),"element"===t.type&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}function $n(e,t,n,r){e.key=t,e.offset=n,e.type=r}class zn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!Wn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var o=n[r-1];if(Rn(o))o=o.select();else{let e=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(e,e)}for(o.insertNodes(e,t),e=0;e<r;e++)n[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=Ne(n))&&e.push(t);return hr()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Bn(e){return e instanceof jn}class Fn{constructor(e,t,n){this.gridKey=e,this.anchor=t,this.focus=n,this.dirty=!1,this._cachedNodes=null,t._selection=this,n._selection=this}is(e){return!!Hn(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new Fn(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Kn(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.focus.getNode();return fe(n.select(0,n.getChildrenSize())).insertNodes(e,t)}getShape(){var e=Ne(this.anchor.key);null===e&&P(21);var t=e.getIndexWithinParent();e=e.getParentOrThrow().getIndexWithinParent();var n=Ne(this.focus.key);null===n&&P(22);var r=n.getIndexWithinParent();let o=n.getParentOrThrow().getIndexWithinParent();return n=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,o),e=Math.max(e,o),{fromX:Math.min(n,t),fromY:Math.min(r,e),toX:Math.max(n,t),toY:Math.max(r,e)}}getNodes(){function e(e){let{cell:t,startColumn:n,startRow:r}=e;l=Math.min(l,n),s=Math.min(s,r),u=Math.max(u,n+t.__colSpan-1),c=Math.max(c,r+t.__rowSpan-1)}var t=this._cachedNodes;if(null!==t)return t;var n=this.anchor.getNode();t=this.focus.getNode(),n=st(n,Wr);var r=st(t,Wr);Wr(n)||P(103),Wr(r)||P(104),Ur(t=n.getParent())||P(105),Kr(t=t.getParent())||P(106);let[o,i,a]=lr(t,n,r),l=Math.min(i.startColumn,a.startColumn),s=Math.min(i.startRow,a.startRow),u=Math.max(i.startColumn+i.cell.__colSpan-1,a.startColumn+a.cell.__colSpan-1),c=Math.max(i.startRow+i.cell.__rowSpan-1,a.startRow+a.cell.__rowSpan-1);n=l,r=s;for(var d=l,p=s;l<n||s<r||u>d||c>p;){if(l<n){var f=p-r;--n;for(var h=0;h<=f;h++)e(o[r+h][n])}if(s<r)for(f=d-n,--r,h=0;h<=f;h++)e(o[r][n+h]);if(u>d)for(f=p-r,d+=1,h=0;h<=f;h++)e(o[r+h][d]);if(c>p)for(f=d-n,p+=1,h=0;h<=f;h++)e(o[p][n+h])}for(t=[t],n=null,r=s;r<=c;r++)for(d=l;d<=u;d++)({cell:p}=o[r][d]),Ur(f=p.getParent())||P(107),f!==n&&t.push(f),t.push(p,...ut(p)),n=f;return hr()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Hn(e){return e instanceof Fn}class jn{constructor(e,t,n,r){this.anchor=e,this.focus=t,this.dirty=!1,this.format=n,this.style=r,this._cachedNodes=null,e._selection=this,t._selection=this}is(e){return!!Bn(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let o=r.offset;return r=n.offset,Rr(e)&&(n=e.getDescendantByIndex(o),e=null!=n?n:e),Rr(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=null!=n?n:t),e=e.is(t)?Rr(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),hr()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){$n(this.anchor,e.__key,t,"text"),$n(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,l]=Kn(this),s="",u=!0;for(let c=0;c<e.length;c++){let d=e[c];if(Rr(d)&&!d.isInline())u||(s+="\n"),u=!d.isEmpty();else if(u=!1,Rn(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<l?e.slice(a,l):e.slice(l,a)):e=i?e.slice(a):e.slice(l):d===n&&(e=i?e.slice(0,l):e.slice(0,a)),s+=e}else!Ar(d)&&!hn(d)||d===n&&this.isCollapsed()||(s+=d.getTextContent())}return s}applyDOMRange(e){let t=vr(),n=t.getEditorState()._selection;if(null!==(e=Qn(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,o]=e;$n(this.anchor,r.key,r.offset,r.type),$n(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new jn(new On(e.key,e.offset,e.type),new On(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ee(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return!!(this.format&Q[e])}insertRawText(e){let t=[],n=(e=e.split(/(\r?\n|\t)/)).length;for(let r=0;r<n;r++){let n=e[r];"\n"===n||"\r\n"===n?t.push(fn()):"\t"===n?t.push(Ln()):t.push(Nn(n))}this.insertNodes(t)}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),o=this.format,i=this.style;r&&"element"===t.type?Dn(t,n,o,i):r||"element"!==n.type||Dn(n,t,o,i);var a=this.getNodes(),l=a.length,s=r?n:t;n=(r?t:n).offset;var u=s.offset;Rn(t=a[0])||P(26),r=t.getTextContent().length;var c=t.getParentOrThrow(),d=a[l-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!c.canInsertTextAfter()&&null===t.getNextSibling())){var p=t.getNextSibling();if(Rn(p)&&p.canInsertTextBefore()&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextAfter()?t.insertAfter(p):c.insertAfter(p)),p.select(0,0),t=p,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!c.canInsertTextBefore()&&null===t.getPreviousSibling())){if(Rn(p=t.getPreviousSibling())&&!xe(p)||((p=Nn()).setFormat(o),c.canInsertTextBefore()?t.insertBefore(p):c.insertBefore(p)),p.select(),t=p,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(c=Nn(t.getTextContent())).setFormat(o),t.replace(c),t=c;else if(!(this.isCollapsed()||""===e||(p=d.getParent(),c.canInsertTextBefore()&&c.canInsertTextAfter()&&(!Rr(p)||p.canInsertTextBefore()&&p.canInsertTextAfter()))))return this.insertText(""),qn(this.anchor,this.focus,null),void this.insertText(e);if(1===l)if(t.isToken())(e=Nn(e)).select(),t.replace(e);else{if(a=t.getFormat(),l=t.getStyle(),n===u&&(a!==o||l!==i)){if(""!==t.getTextContent())return(a=Nn(e)).setFormat(o),a.setStyle(i),a.select(),0===n?t.insertBefore(a,!1):([l]=t.splitText(n),l.insertAfter(a,!1)),void(a.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(o),t.setStyle(i)}""===(t=t.spliceText(n,u-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=a,this.style=l))}else{if(o=new Set([...t.getParentKeys(),...d.getParentKeys()]),p=Rr(t)?t:t.getParentOrThrow(),i=Rr(d)?d:d.getParentOrThrow(),c=d,!p.is(i)&&i.isInline())do{c=i,i=i.getParentOrThrow()}while(i.isInline());"text"===s.type&&(0!==u||""===d.getTextContent())||"element"===s.type&&d.getIndexWithinParent()<u?Rn(d)&&!d.isToken()&&u!==d.getTextContentSize()?(d.isSegmented()&&(s=Nn(d.getTextContent()),d.replace(s),d=s),d=d.spliceText(0,u,""),o.add(d.__key)):(s=d.getParentOrThrow()).canBeEmpty()||1!==s.getChildrenSize()?d.remove():s.remove():o.add(d.__key),s=i.getChildren(),u=new Set(a),d=p.is(i),p=p.isInline()&&null===t.getNextSibling()?p:t;for(let e=s.length-1;0<=e;e--){let n=s[e];if(n.is(t)||Rr(n)&&n.isParentOf(t))break;n.isAttached()&&(!u.has(n)||n.is(c)?d||p.insertAfter(n,!1):n.remove())}if(!d)for(s=i,u=null;null!==s;)(0===(d=(i=s.getChildren()).length)||i[d-1].is(u))&&(o.delete(s.__key),u=s),s=s.getParent();for(t.isToken()?n===r?t.select():((e=Nn(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<l;e++)t=a[e],o.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),Te(null);else{var t=this.getNodes(),n=[];for(var r of t)Rn(r)&&n.push(r);var o=n.length;if(0===o)this.toggleFormat(e),Te(null);else{r=this.anchor;var i=this.focus,a=this.isBackward();t=a?i:r,r=a?r:i;var l=0,s=n[0];if(i="element"===t.type?0:t.offset,"text"===t.type&&i===s.getTextContentSize()&&(l=1,s=n[1],i=0),null!=s){a=s.getFormatFlags(e,null);var u=o-1,c=n[u];if(o="text"===r.type?r.offset:c.getTextContentSize(),s.is(c))i!==o&&(0===i&&o===s.getTextContentSize()?s.setFormat(a):(e=s.splitText(i,o),(e=0===i?e[0]:e[1]).setFormat(a),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,o-i,"text")),this.format=a);else{0!==i&&([,s]=s.splitText(i),i=0),s.setFormat(a);var d=c.getFormatFlags(e,a);for(0<o&&(o!==c.getTextContentSize()&&([c]=c.splitText(o)),c.setFormat(d)),l+=1;l<u;l++){let t=n[l];if(!t.isToken()){let n=t.getFormatFlags(e,d);t.setFormat(n)}}"text"===t.type&&t.set(s.__key,i,"text"),"text"===r.type&&r.set(c.__key,o,"text"),this.format=a|d}}}}}insertNodes(e,t){if(!this.isCollapsed()){var n=this.isBackward()?this.anchor:this.focus,r=n.getNode().getNextSibling();if(r=r?r.getKey():null,n=(n=n.getNode().getPreviousSibling())?n.getKey():null,this.removeText(),this.isCollapsed()&&"element"===this.focus.type){if(this.focus.key===r&&0===this.focus.offset){var o=Nn();this.focus.getNode().insertBefore(o)}else this.focus.key===n&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Nn(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}n=(o=this.anchor).offset;var i=o.getNode();r=i,"element"===o.type&&(r=null===(r=(o=o.getNode()).getChildAtIndex(n-1))?o:r),o=[];var a=i.getNextSiblings(),l=et(i)?null:i.getTopLevelElementOrThrow();if(Rn(i))if(r=i.getTextContent().length,0===n&&0!==r)r=null!==(r=i.getPreviousSibling())?r:i.getParentOrThrow(),o.push(i);else if(n===r)r=i;else{if(i.isToken())return!1;[r,i]=i.splitText(n),o.push(i)}i=r,o.push(...a),a=e[0];var s=!1,u=null;for(let t=0;t<e.length;t++){var c=e[t];if(et(r)||Ar(r)||!Rr(c)||c.isInline())s&&!Rr(c)&&!Ar(c)&&et(r.getParent())&&P(28);else{if(c.is(a)){if(Rr(r)&&r.isEmpty()&&r.canReplaceWith(c)){r.replace(c),r=c,s=!0;continue}if(Ce(s=c.getFirstDescendant())){for(var d=s.getParentOrThrow();d.isInline();)d=d.getParentOrThrow();if(s=(u=d.getChildren()).length,Rr(r)){var p=r.getFirstChild();for(let e=0;e<s;e++){let t=u[e];null===p?r.append(t):p.insertAfter(t),p=t}}else{for(p=s-1;0<=p;p--)r.insertAfter(u[p]);r=r.getParentOrThrow()}if(u=u[s-1],d.remove(),s=!0,d.is(c))continue}}Rn(r)&&(null===l&&P(27),r=l)}s=!1,Rr(r)&&!r.isInline()?(u=c,Ar(c)&&!c.isInline()?r=r.insertAfter(c,!1):Rr(c)?!c.canBeEmpty()&&c.isEmpty()||(Or(r)?(null!==(d=r.getChildAtIndex(n))?d.insertBefore(c):r.append(c),r=c):c.isInline()?(r.append(c),r=c):r=r.insertAfter(c,!1)):(null!==(d=r.getFirstChild())?d.insertBefore(c):r.append(c),r=c)):!Rr(c)||Rr(c)&&c.isInline()||Ar(r)&&!r.isInline()?(u=c,Bn(this)&&Ar(c)&&(Rr(r)||Rn(r))&&!c.isInline()?(Rn(r)?(d=r.getParentOrThrow(),[r]=r.splitText(n),r=r.getIndexWithinParent()+1):(d=r,r=n),[,r]=lt(d,r),r=r.insertBefore(c)):r=r.insertAfter(c,!1)):(c=r.getParentOrThrow(),hn(r)&&r.remove(),r=c,t--)}if(t&&(Rn(i)?i.select():Rn(e=r.getPreviousSibling())?e.select():(e=r.getIndexWithinParent(),r.getParentOrThrow().select(e,e))),Rr(r)){if(e=Rn(u)?u:Rr(u)&&u.isInline()?u.getLastDescendant():r.getLastDescendant(),t||(null===e?r.select():Rn(e)?""===e.getTextContent()?e.selectPrevious():e.select():e.selectNext()),0!==o.length)for(t=r,e=o.length-1;0<=e;e--)l=(n=o[e]).getParentOrThrow(),!Rr(r)||Jn(n)||Ar(n)&&(!n.isInline()||n.isIsolated())?Rr(r)||Jn(n)?Rr(n)&&!n.canInsertAfter(r)?(Rr(i=l.constructor.clone(l))||P(29),i.append(n),r.insertAfter(i)):r.insertAfter(n):(r.insertBefore(n),r=n):(t===r?r.append(n):r.insertBefore(n),r=n),l.isEmpty()&&!l.canBeEmpty()&&l.remove()}else t||(Rn(r)?r.select():(t=r.getParentOrThrow(),e=r.getIndexWithinParent()+1,t.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,t=e.offset,n=[];if("text"===e.type){var r=e.getNode(),o=r.getNextSiblings().reverse(),i=r.getParentOrThrow(),a=i.isInline(),l=a?i.getTextContentSize():r.getTextContentSize();0===t?o.push(r):(a&&(n=i.getNextSiblings()),t===l||a&&t===r.getTextContentSize()||([,r]=r.splitText(t),o.push(r)))}else{if(et(i=e.getNode()))return o=Br(),n=i.getChildAtIndex(t),o.select(),void(null!==n?n.insertBefore(o,!1):i.append(o));o=i.getChildren().slice(t).reverse()}if(r=o.length,0===t&&0<r&&i.isInline()){if(Rr(o=(n=i.getParentOrThrow()).insertNewAfter(this,!1)))for(n=n.getChildren(),i=0;i<n.length;i++)o.append(n[i])}else if(null===(a=i.insertNewAfter(this,!1)))this.insertLineBreak();else if(Rr(a))if(l=i.getFirstChild(),0===t&&(i.is(e.getNode())||l&&l.is(e.getNode()))&&0<r)i.insertBefore(a);else{if(i=null,t=n.length,e=a.getParentOrThrow(),0<t)for(l=0;l<t;l++)e.append(n[l]);if(0!==r)for(n=0;n<r;n++)t=o[n],null===i?a.append(t):i.insertBefore(t),i=t;a.canBeEmpty()||0!==a.getChildrenSize()?a.selectStart():(a.selectPrevious(),a.remove())}}insertLineBreak(e){let t=fn();var n=this.anchor;"element"===n.type&&(Or(n=n.getNode())&&this.insertParagraph()),e?this.insertNodes([t],!0):this.insertNodes([t])&&t.selectNext(0,0)}getCharacterOffsets(){return Kn(this)}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let o=this.focus;var i=e[0];let a=e[n],[l,s]=Kn(this);return 0===t?[]:1===t?Rn(i)&&!this.isCollapsed()?(e=l>s?s:l,n=i.splitText(e,l>s?l:s),null!=(e=0===e?n[0]:n[1])?[e]:[]):[i]:(t=r.isBefore(o),Rn(i)&&((r=t?l:s)===i.getTextContentSize()?e.shift():0!==r&&([,i]=i.splitText(r),e[0]=i)),Rn(a)&&(i=a.getTextContent().length,0===(t=t?s:l)?e.pop():t!==i&&([a]=a.splitText(t),e[n]=a)),e)}modify(e,t,n){var r=this.focus,o=this.anchor,i="move"===e,a=Ye(r,t);if(Ar(a)&&!a.isIsolated())i&&a.isKeyboardSelectable()?((t=Zn()).add(a.__key),Pe(t)):Rn(e=t?a.getPreviousSibling():a.getNextSibling())?(a=e.__key,t=t?e.getTextContent().length:0,r.set(a,t,"text"),i&&o.set(a,t,"text")):(n=a.getParentOrThrow(),Rr(e)?(n=e.__key,a=t?e.getChildrenSize():0):(a=a.getIndexWithinParent(),n=n.__key,t||a++),r.set(n,a,"element"),i&&o.set(n,a,"element"));else if(r=at((o=vr())._window)){var l=o._blockCursorElement,s=o._rootElement;if(null===s||null===l||!Rr(a)||a.isInline()||a.canBeEmpty()||it(l,o,s),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(a=r.getRangeAt(0),o=Or(o=this.anchor.getNode())?o:Ze(o),this.applyDOMRange(a),this.dirty=!0,!i)){for(i=this.getNodes(),e=[],n=!1,l=0;l<i.length;l++)Je(s=i[l],o)?e.push(s):n=!0;n&&0<e.length&&(t?Rr(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():Rr(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),r.anchorNode===a.startContainer&&r.anchorOffset===a.startOffset||(t=this.focus,r=(i=this.anchor).key,a=i.offset,o=i.type,$n(i,t.key,t.offset,t.type),$n(t,r,a,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&("element"===r.type&&Rr(i)&&r.offset===i.getChildrenSize()||"text"===r.type&&r.offset===i.getTextContentSize())){var a=i.getParent();if(Rr(a=i.getNextSibling()||(null===a?null:a.getNextSibling()))&&a.isShadowRoot())return}if(Ar(a=Ye(o,t))&&!a.isIsolated())return void(a.isKeyboardSelectable()&&Rr(i)&&0===i.getChildrenSize()?(i.remove(),t=Zn(),t.add(a.__key),Pe(t)):(a.remove(),vr().dispatchCommand(e,void 0)));if(!t&&Rr(a)&&Rr(i)&&i.isEmpty())return i.remove(),void a.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&0===r.offset&&("element"===r.type?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(a="text"===o.type?o.getNode():null,i="text"===r.type?r.getNode():null,null!==a&&a.isSegmented()){if(r=o.offset,o=a.getTextContentSize(),a.is(i)||t&&r!==o||!t&&0!==r)return void Yn(a,t,r)}else if(null!==i&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(a)||t&&0!==r||!t&&r!==o))return void Yn(i,t,r);if(i=this.anchor,a=this.focus,(r=i.getNode())===(o=a.getNode())&&"text"===i.type&&"text"===a.type){var l=i.offset,s=a.offset;let e=l<s;(o=e?l:s)!==(l=(s=e?s:l)-1)&&($e(r=r.getTextContent().slice(o,s))||(t?a.offset=l:i.offset=l))}}}this.removeText(),t&&!n&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((t=this.anchor.getNode()).isEmpty()&&Or(t.getParent())&&0===t.getIndexWithinParent()&&t.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function Wn(e){return e instanceof zn}function Gn(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function Kn(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[Gn(t),Gn(e)]}function Yn(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,a=0;for(let e=0;e<o;e++){let l=e===o-1;if(a=i,i+=r[e].length,t&&i===n||i>n||l){r.splice(e,1),l&&(a=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(a,a))}function Un(e,t,n,r){var o=t;if(1===e.nodeType){let l=!1;var i=e.childNodes,a=i.length;o===a&&(l=!0,o=a-1);let s=i[o];if(a=!1,s===r._blockCursorElement?(s=i[o+1],a=!0):null!==r._blockCursorElement&&o--,Rn(r=De(s)))o=l?r.getTextContentSize():0;else{if(null===(i=De(e)))return null;if(Rr(i)?((t=Rr(e=i.getChildAtIndex(o)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=l?e.getLastDescendant():e.getFirstDescendant())?(i=e,o=0):i=Rr(e=n)?e:e.getParentOrThrow()),Rn(e)?(r=e,i=null,o=l?e.getTextContentSize():0):e!==i&&l&&!a&&o++):(o=i.getIndexWithinParent(),o=0===t&&Ar(i)&&De(e)===i?o:o+1,i=i.getParentOrThrow()),Rr(i))return new On(i.__key,o,"element")}}else r=De(e);return Rn(r)?new On(r.__key,o,"text"):null}function Vn(e,t,n){var r=e.offset,o=e.getNode();0===r?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&null===r&&Rr(o)&&o.isInline()&&(Rn(t=o.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):Rr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rn(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&Rr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Rr(o)&&o.isInline()&&!o.canInsertTextAfter()&&(Rn(t=o.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function qn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let o=e.is(t);Vn(e,r,o),Vn(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=vr()).isComposing()&&r._compositionKey!==e.key&&Bn(n)&&(r=n.anchor,n=n.focus,$n(e,r.key,r.offset,r.type),$n(t,n.key,n.offset,n.type))}}function Qn(e,t,n,r,o,i){return null!==e&&null!==n&&be(o,e,n)?null===(t=Un(e,t,Bn(i)?i.anchor:null,o))||null===(r=Un(n,r,Bn(i)?i.focus:null,o))||"element"===t.type&&"element"===r.type&&(e=De(e),n=De(n),Ar(e)&&Ar(n))?null:(qn(t,r,i),[t,r]):null}function Jn(e){return Rr(e)&&!e.isInline()}function Xn(e,t,n,r,o,i){let a=gr();return(e=new jn(new On(e,t,o),new On(n,r,i),0,"")).dirty=!0,a._selection=e}function Zn(){return new zn(new Set)}function er(e,t,n){var r=n._window;if(null===r)return null;var o=r.event,i=o?o.type:void 0;let a;if(r="selectionchange"===i,o=!re&&(r||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&o&&3===o.detail||"drop"===i||void 0===i),Bn(e)&&!o)return e.clone();if(null===t)return null;if(o=t.anchorNode,i=t.focusNode,a=t.anchorOffset,t=t.focusOffset,r&&Bn(e)&&!be(n,o,i))return e.clone();if(null===(n=Qn(o,a,i,t,n,e)))return null;let[l,s]=n;return new jn(l,s,Bn(e)?e.format:0,Bn(e)?e.style:"")}function tr(){return gr()._selection}function nr(){return vr()._editorState._selection}function rr(e,t,n,r=1){var o=e.anchor,i=e.focus,a=o.getNode(),l=i.getNode();if(t.is(a)||t.is(l)){if(a=t.__key,e.isCollapsed())(n<=(t=o.offset)&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(a,n,"element"),i.set(a,n,"element"),or(e));else{let u=e.isBackward();var s=(l=u?i:o).getNode();i=(o=u?o:i).getNode(),t.is(s)&&((n<=(s=l.offset)&&0<r||n<s&&0>r)&&l.set(a,Math.max(0,s+r),"element")),t.is(i)&&((n<=(t=o.offset)&&0<r||n<t&&0>r)&&o.set(a,Math.max(0,t+r),"element"))}or(e)}}function or(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed())Rr(i)&&(Rn(a=(o=n>=(a=i.getChildrenSize()))?i.getChildAtIndex(a-1):i.getChildAtIndex(n))&&(n=0,o&&(n=a.getTextContentSize()),t.set(a.__key,n,"text"),r.set(a.__key,n,"text")));else{if(Rr(i)){let r=i.getChildrenSize();Rn(n=(e=n>=r)?i.getChildAtIndex(r-1):i.getChildAtIndex(n))&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}Rr(a)&&(Rn(o=(t=o>=(n=a.getChildrenSize()))?a.getChildAtIndex(n-1):a.getChildAtIndex(o))&&(a=0,t&&(a=o.getTextContentSize()),r.set(o.__key,a,"text")))}}function ir(e,t,n,r,o){let i=null,a=0,l=null;null!==r?(i=r.__key,Rn(r)?(a=r.getTextContentSize(),l="text"):Rr(r)&&(a=r.getChildrenSize(),l="element")):null!==o&&(i=o.__key,Rn(o)?l="text":Rr(o)&&(l="element")),null!==i&&null!==l?e.set(i,a,l):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function ar(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function lr(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var a=e[c];Ur(a)||P(108);var l=a.getChildren();a=0;for(let e of l){for(Wr(e)||P(109);void 0!==r[c]&&void 0!==r[c][a];)a++;var s=a,u=e;let d={cell:u,startColumn:s,startRow:l=c},p=u.__rowSpan,f=u.__colSpan;for(let e=0;e<p;e++){void 0===r[l+e]&&(r[l+e]=[]);for(let t=0;t<f;t++)r[l+e][s+t]=d}t.is(u)&&(o=d),n.is(u)&&(i=d),a+=e.__colSpan}}return null===o&&P(110),null===i&&P(111),[r,o,i]}let sr=null,ur=null,cr=!1,dr=!1,pr=0,fr={characterData:!0,childList:!0,subtree:!0};function hr(){return cr||null!==sr&&sr._readOnly}function mr(){cr&&P(13)}function gr(){return null===sr&&P(15),sr}function vr(){return null===ur&&P(16),ur}function br(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(void 0===o&&P(30,r),void 0===(e=n.get(r))&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function yr(e,t){var n=e.type,r=t.get(n);if(void 0===r&&P(17,n),n=r.klass,e.type!==n.getType()&&P(18,n.name),n=n.importJSON(e),e=e.children,Rr(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=yr(e[r],t);n.append(o)}return n}function xr(e,t){let n=sr,r=cr,o=ur;sr=e,cr=!0,ur=null;try{return t()}finally{sr=n,cr=r,ur=o}}function _r(t,n){let r=t._pendingEditorState,o=t._rootElement,i=t._headless||null===o;if(null!==r){var a=t._editorState,l=a._selection,s=r._selection,u=0!==t._dirtyType,c=sr,d=cr,p=ur,f=t._updating,h=t._observer,m=null;if(t._pendingEditorState=null,t._editorState=r,!i&&u&&null!==h){ur=t,sr=r,cr=!1,t._updating=!0;try{let e=t._dirtyType,n=t._dirtyElements,o=t._dirtyLeaves;h.disconnect();var g=n,v=o;Et=Ct=_t="",St=2===e,kt=null,pt=t,dt=t._config,ft=t._nodes,ht=pt._listeners.mutation,mt=g,gt=v,vt=a._nodeMap,bt=r._nodeMap,wt=r._readOnly,yt=new Map(t._keyToDOMMap);let i=new Map;xt=i,zt("root",null),xt=yt=dt=bt=vt=gt=mt=ft=pt=void 0,m=i}catch(e){if(e instanceof Error&&t._onError(e),dr)throw e;return Fr(t,null,o,r),ue(t),t._dirtyType=2,dr=!0,_r(t,a),void(dr=!1)}finally{h.observe(o,fr),t._updating=f,sr=c,cr=d,ur=p}}r._readOnly||(r._readOnly=!0);var b=t._dirtyLeaves,y=t._dirtyElements,x=t._normalizedNodes,_=t._updateTags,E=t._deferred;u&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var C,S=t._decorators,w=t._pendingDecorators||S,k=r._nodeMap;for(C in w)k.has(C)||(w===S&&(w=Le(t)),delete w[C]);var T=i?null:at(t._window);if(t._editable&&null!==T&&(u||null===s||s.dirty)){ur=t,sr=r;try{if(null!==h&&h.disconnect(),u||null===s||s.dirty){let e=t._blockCursorElement;null!==e&&it(e,t,o);e:{let e=T.anchorNode,n=T.focusNode,r=T.anchorOffset,i=T.focusOffset,a=document.activeElement;if(!(_.has("collaboration")&&a!==o||null!==a&&ve(a)))if(Bn(s)){var A=s.anchor,N=s.focus,R=A.key,M=N.key,L=qe(t,R),O=qe(t,M),I=A.offset,P=N.offset,D=s.format,$=s.style,z=s.isCollapsed(),B=L,F=O,H=!1;if("text"===A.type){B=_e(L);let e=A.getNode();H=e.getFormat()!==D||e.getStyle()!==$}else Bn(l)&&"text"===l.anchor.type&&(H=!0);if("text"===N.type&&(F=_e(O)),null!==B&&null!==F){if(z&&(null===l||H||Bn(l)&&(l.format!==D||l.style!==$))){var j=performance.now();Zt=[D,$,I,R,j]}if(r===I&&i===P&&e===B&&n===F&&("Range"!==T.type||!z)&&(null!==a&&o.contains(a)||o.focus({preventScroll:!0}),"element"!==A.type))break e;try{T.setBaseAndExtent(B,I,F,P)}catch(e){}if(!_.has("skip-scroll-into-view")&&s.isCollapsed()&&null!==o&&o===document.activeElement){let e=s instanceof jn&&"element"===s.anchor.type?B.childNodes[I]||null:0<T.rangeCount?T.getRangeAt(0):null;if(null!==e){let n;if(e instanceof Text){let t=document.createRange();t.selectNode(e),n=t.getBoundingClientRect()}else n=e.getBoundingClientRect();let r=o.ownerDocument,i=r.defaultView;if(null!==i)for(var W,G,{top:K,bottom:Y}=n,U=o;null!==U;){let e=U===r.body;if(e)W=0,G=Xe(t).innerHeight;else{let e=U.getBoundingClientRect();W=e.top,G=e.bottom}let n=0;if(K<W?n=-(W-K):Y>G&&(n=Y-G),0!==n)if(e)i.scrollBy(0,n);else{let e=U.scrollTop;U.scrollTop+=n;let t=U.scrollTop-e;K-=t,Y-=t}if(e)break;U=Qe(U)}}}qt=!0}}else null!==l&&be(t,e,n)&&T.removeAllRanges()}}e:{let e=t._blockCursorElement;if(Bn(s)&&s.isCollapsed()&&"element"===s.anchor.type&&o.contains(document.activeElement)){let n=s.anchor,r=n.getNode(),i=n.offset,a=r.getChildrenSize(),l=!1,u=null;if(i===a){ot(r.getChildAtIndex(i-1))&&(l=!0)}else{let e=r.getChildAtIndex(i);if(ot(e)){let n=e.getPreviousSibling();(null===n||ot(n))&&(l=!0,u=t.getElementByKey(e.__key))}}if(l){let n=t.getElementByKey(r.__key);if(null===e){let n=t._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let o=n.blockCursor;if(void 0!==o){if("string"==typeof o){let e=o.split(" ");o=n.blockCursor=e}void 0!==o&&r.classList.add(...o)}t._blockCursorElement=e=r}o.style.caretColor="transparent",null===u?n.appendChild(e):n.insertBefore(e,u);break e}}null!==e&&it(e,t,o)}null!==h&&h.observe(o,fr)}finally{ur=p,sr=c}}if(null!==m){var V=m;let e=Array.from(t._listeners.mutation),n=e.length;for(let t=0;t<n;t++){let[n,r]=e[t],o=V.get(r);void 0!==o&&n(o,{dirtyLeaves:b,updateTags:_})}}Bn(s)||null===s||null!==l&&l.is(s)||t.dispatchCommand(e,void 0);var q=t._pendingDecorators;null!==q&&(t._decorators=q,t._pendingDecorators=null,Er("decorator",t,!0,q));var Q=Oe(n||a),J=Oe(r);if(Q!==J&&Er("textcontent",t,!0,J),Er("update",t,!0,{dirtyElements:y,dirtyLeaves:b,editorState:r,normalizedNodes:x,prevEditorState:n||a,tags:_}),t._deferred=[],0!==E.length){let e=t._updating;t._updating=!0;try{for(let e=0;e<E.length;e++)E[e]()}finally{t._updating=e}}var X=t._updates;if(0!==X.length){let e=X.shift();if(e){let[n,r]=e;wr(t,n,r)}}}}function Er(e,t,n,...r){let o=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Cr(e,t,n){if(!1===e._updating||ur!==e){let r=!1;return e.update((()=>{r=Cr(e,t,n)})),r}let r=ze(e);for(let i=4;0<=i;i--)for(let a=0;a<r.length;a++){var o=r[a]._commands.get(t);if(void 0!==o&&void 0!==(o=o[i])){let t=(o=Array.from(o)).length;for(let r=0;r<t;r++)if(!0===o[r](n,e))return!0}}return!1}function Sr(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[o,i]=r;void 0!==i&&(r=i.onUpdate,n=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),o()}}return t}function wr(e,t,n){let r=e._updateTags;var o,i=o=!1;if(void 0!==n){var a=n.onUpdate;null!=(o=n.tag)&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}a&&e._deferred.push(a),n=e._editorState;let l=!1;(null===(a=e._pendingEditorState)||a._readOnly)&&(a=e._pendingEditorState=new Dr(new Map((a||n)._nodeMap)),l=!0),a._flushSync=i,i=sr;let s=cr,u=ur,c=e._updating;sr=a,cr=!1,e._updating=!0,ur=e;try{l&&(e._headless?null!=n._selection&&(a._selection=n._selection.clone()):a._selection=function(e){let t=e.getEditorState()._selection,n=at(e._window);return Wn(t)||Hn(t)?t.clone():er(t,n,e)}(e));let r=e._compositionKey;t(),o=Sr(e,o),function(e,t){if(t=t.getEditorState()._selection,Bn(e=e._selection)){var n=e.anchor;let r,o=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===o.type&&r!==(n=o.getNode())&&n.selectionTransform(t,e)}}(a,e),0!==e._dirtyType&&(o?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)Rn(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&pe(t)}(a,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=Ae(),i=new Map;var a=n;let l=a.size;for(var s=r,u=s.size;0<l||0<u;){if(0<l){t._dirtyLeaves=new Set;for(let r of a)Rn(a=e.get(r))&&a.isAttached()&&a.isSimpleText()&&!a.isUnmergeable()&&pe(a),void 0!==a&&void 0!==a&&a.__key!==o&&a.isAttached()&&br(t,a,i),n.add(r);if(l=(a=t._dirtyLeaves).size,0<l){pr++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of s)s=n[0],u=n[1],("root"===s||u)&&(void 0!==(a=e.get(s))&&void 0!==a&&a.__key!==o&&a.isAttached()&&br(t,a,i),r.set(s,u));l=(a=t._dirtyLeaves).size,u=(s=t._dirtyElements).size,pr++}t._dirtyLeaves=n,t._dirtyElements=r}(a,e),Sr(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[n]of r){let i=t.get(n);void 0===i||i.isAttached()||(Rr(i)&&ct(i,n,e,t,o,r),e.has(n)||r.delete(n),o.push(n))}for(let e of o)t.delete(e);for(let o of n)void 0===(r=t.get(o))||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}(n,a,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(a._flushSync=!0);let i=a._selection;if(Bn(i)){let e=a._nodeMap,t=i.focus.key;void 0!==e.get(i.anchor.key)&&void 0!==e.get(t)||P(19)}else Wn(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void _r(e)}finally{sr=i,cr=s,ur=u,e._updating=c,pr=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,e=e._selection,null!==e){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,_r(e)):l&&ge((()=>{_r(e)})):(a._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kr(e,t,n){e._updating?e._updates.push([t,n]):wr(e,t,n)}class Tr extends cn{constructor(e){super(e)}decorate(){P(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ar(e){return e instanceof Tr}class Nr extends cn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return ee[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=vr()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(Rn(t)&&e.push(t),Rr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Rr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Rr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Rr(e=t[n-1])&&e.getLastDescendant()||e||null:Rr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Ne(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&P(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Ne(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&P(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContent(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let o=t[r];e+=o.getTextContentSize(),Rr(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Z[e],!!(this.getFormat()&e))}select(e,t){mr();let n=tr(),r=e,o=t;var i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(Rn(e=this.getFirstChild())||Rr(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)&&(Rn(e=this.getLastChild())||Rr(e)))return e.select();return void 0===r&&(r=i),void 0===o&&(o=i),i=this.__key,Bn(n)?(n.anchor.set(i,r,"element"),n.focus.set(i,o,"element"),n.dirty=!0,n):Xn(i,r,i,o,"element","element")}selectStart(){let e=this.getFirstDescendant();return Rr(e)||Rn(e)?e.select(0,0):null!==e?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return Rr(e)||Rn(e)?e.select():null!==e?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Z[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key;var l=[],s=[];let u=this.getChildAtIndex(e+t),c=null,d=o-t+r;if(0!==e)if(e===o)c=this.getLastChild();else{var p=this.getChildAtIndex(e);null!==p&&(c=p.getPreviousSibling())}if(0<t){var f=null===c?this.getFirstChild():c.getNextSibling();for(p=0;p<t;p++){null===f&&P(100);var h=f.getNextSibling(),m=f.__key;we(f=f.getWritable()),s.push(m),f=h}}for(p=c,h=0;h<r;h++){m=n[h],null!==p&&m.is(p)&&(c=p=p.getPreviousSibling()),(f=m.getWritable()).__parent===a&&d--,we(f);let e=m.__key;null===p?(i.__first=e,f.__prev=null):((p=p.getWritable()).__next=e,f.__prev=p.__key),m.__key===a&&P(76),f.__parent=a,l.push(e),p=m}if(e+t===o?null!==p&&(p.getWritable().__next=null,i.__last=p.__key):null!==u&&(e=u.getWritable(),null!==p?(t=p.getWritable(),e.__prev=p.__key,t.__next=u.__key):e.__prev=null),i.__size=d,s.length&&Bn(e=tr())){s=new Set(s),l=new Set(l);let{anchor:t,focus:n}=e;Mr(t,s,l)&&ir(t,t.getNode(),this,c,u),Mr(n,s,l)&&ir(n,n.getNode(),this,c,u),0!==d||this.canBeEmpty()||et(this)||this.remove()}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Rr(e){return e instanceof Nr}function Mr(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Lr extends Nr{static getType(){return"root"}static clone(){return new Lr}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){P(51)}getTextContent(){let e=this.__cachedText;return!hr()&&0!==vr()._dirtyType||null===e?super.getTextContent():e}remove(){P(52)}replace(){P(53)}insertBefore(){P(54)}insertAfter(){P(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];Rr(n)||Ar(n)||P(56)}return super.append(...e)}static importJSON(e){let t=Ie();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Or(e){return e instanceof Lr}function Ir(){return new Dr(new Map([["root",new Lr]]))}function Pr(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&P(130,n.name);let r=t.children;if(Rr(e))for(Array.isArray(r)||P(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let t=Pr(e[n]);r.push(t)}return t}class Dr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return xr(this,e)}clone(e){return(e=new Dr(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return xr(this,(()=>({root:Pr(Ie())})))}}class $r extends Nr{static getType(){return"paragraph"}static clone(e){return new $r(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=We(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:zr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Br();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Br();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||Rn(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function zr(e){let t=Br();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Br(){return nt(new $r)}function Fr(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=Ir(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Hr{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Be(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&P(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=r.get(e);void 0===o&&P(36,String(e));let i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&P(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&P(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){kr(e,(()=>{var e=gr();if(!e.isEmpty())if("root"===t)Ie().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.getType()),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Cr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=We(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Fr(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==Vt&&(Vt--,0===Vt&&t.ownerDocument.removeEventListener("selectionchange",sn));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var o=ze(r);o=o[o.length-1]._key,ln.get(o)===r&&ln.delete(o)}else ln.delete(r._key);t.__lexicalEditor=null}for(r=an(t),o=0;o<r.length;o++)r[o]();t.__lexicalEventHandles=[]}null!=i&&t.classList.remove(...i)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ue(this),this._updateTags.add("history-merge"),_r(this),this._config.disableEvents||function(e,t){0===Vt&&e.ownerDocument.addEventListener("selectionchange",sn),Vt++,e.__lexicalEditor=t;let n=an(e);for(let r=0;r<Wt.length;r++){let[o,i]=Wt[r],l="function"==typeof i?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&i(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return Cr(t,M,e);case"copy":return Cr(t,R,e);case"paste":return Cr(t,a,e);case"dragstart":return Cr(t,T,e);case"dragover":return Cr(t,A,e);case"dragend":return Cr(t,N,e);case"focus":return Cr(t,L,e);case"blur":return Cr(t,O,e);case"drop":return Cr(t,k,e)}};e.addEventListener(o,l),n.push((()=>{e.removeEventListener(o,l)}))}}(e,this),null!=i&&e.classList.add(...i)):(this._editorState=n,this._window=this._pendingEditorState=null),Er("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&P(38),se(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),_r(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),_r(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Ir(),r=sr,o=cr,i=ur,a=this._dirtyElements,l=this._dirtyLeaves,s=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,sr=n,cr=!1,ur=this;try{yr(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(e){e instanceof Error&&this._onError(e)}finally{this._dirtyElements=a,this._dirtyLeaves=l,this._cloneNotNeeded=s,this._dirtyType=u,sr=r,cr=o,ur=i}return n}update(e,t){kr(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),kr(this,(()=>{let e=tr(),n=Ie();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=at(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Er("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class jr extends Nr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Wr(e){return e instanceof jr}class Gr extends Nr{}function Kr(e){return e instanceof Gr}class Yr extends Nr{}function Ur(e){return e instanceof Yr}return X.$addUpdateTag=function(e){mr(),vr()._updateTags.add(e)},X.$applyNodeReplacement=nt,X.$copyNode=tt,X.$createLineBreakNode=fn,X.$createNodeSelection=Zn,X.$createParagraphNode=Br,X.$createRangeSelection=function(){let e=new On("root",0,"element"),t=new On("root",0,"element");return new jn(e,t,0,"")},X.$createTabNode=Ln,X.$createTextNode=Nn,X.$getAdjacentNode=Ye,X.$getNearestNodeFromDOMNode=Me,X.$getNearestRootOrShadowRoot=Ze,X.$getNodeByKey=Ne,X.$getPreviousSelection=nr,X.$getRoot=Ie,X.$getSelection=tr,X.$getTextContent=function(){let e=tr();return null===e?"":e.getTextContent()},X.$hasAncestor=Je,X.$hasUpdateTag=function(e){return vr()._updateTags.has(e)},X.$insertNodes=function(e,t){let n=tr()||nr();return null===n&&(n=Ie().selectEnd()),n.insertNodes(e,t)},X.$isBlockElementNode=Jn,X.$isDecoratorNode=Ar,X.$isElementNode=Rr,X.$isInlineElementOrDecoratorNode=function(e){return Rr(e)&&e.isInline()||Ar(e)&&e.isInline()},X.$isLeafNode=Ce,X.$isLineBreakNode=hn,X.$isNodeSelection=Wn,X.$isParagraphNode=function(e){return e instanceof $r},X.$isRangeSelection=Bn,X.$isRootNode=Or,X.$isRootOrShadowRoot=et,X.$isTabNode=function(e){return e instanceof Mn},X.$isTextNode=Rn,X.$nodesOfType=function(e){var t=gr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o},X.$normalizeSelection__EXPERIMENTAL=fe,X.$parseSerializedNode=function(e){return yr(e,vr()._nodes)},X.$setCompositionKey=Te,X.$setSelection=Pe,X.$splitNode=lt,X.BLUR_COMMAND=O,X.CAN_REDO_COMMAND={},X.CAN_UNDO_COMMAND={},X.CLEAR_EDITOR_COMMAND={},X.CLEAR_HISTORY_COMMAND={},X.CLICK_COMMAND=t,X.COMMAND_PRIORITY_CRITICAL=4,X.COMMAND_PRIORITY_EDITOR=0,X.COMMAND_PRIORITY_HIGH=3,X.COMMAND_PRIORITY_LOW=1,X.COMMAND_PRIORITY_NORMAL=2,X.CONTROLLED_TEXT_INSERTION_COMMAND=i,X.COPY_COMMAND=R,X.CUT_COMMAND=M,X.DELETE_CHARACTER_COMMAND=n,X.DELETE_LINE_COMMAND=u,X.DELETE_WORD_COMMAND=s,X.DEPRECATED_$computeGridMap=lr,X.DEPRECATED_$createGridSelection=function(){let e=new On("root",0,"element"),t=new On("root",0,"element");return new Fn("root",e,t)},X.DEPRECATED_$getNodeTriplet=function(e){e instanceof jr||(e instanceof cn?Wr(e=st(e,Wr))||P(114):Wr(e=st(e.getNode(),Wr))||P(114));let t=e.getParent();Ur(t)||P(115);let n=t.getParent();return Kr(n)||P(116),[e,t,n]},X.DEPRECATED_$isGridCellNode=Wr,X.DEPRECATED_$isGridNode=Kr,X.DEPRECATED_$isGridRowNode=Ur,X.DEPRECATED_$isGridSelection=Hn,X.DEPRECATED_GridCellNode=jr,X.DEPRECATED_GridNode=Gr,X.DEPRECATED_GridRowNode=Yr,X.DRAGEND_COMMAND=N,X.DRAGOVER_COMMAND=A,X.DRAGSTART_COMMAND=T,X.DROP_COMMAND=k,X.DecoratorNode=Tr,X.ElementNode=Nr,X.FOCUS_COMMAND=L,X.FORMAT_ELEMENT_COMMAND={},X.FORMAT_TEXT_COMMAND=c,X.INDENT_CONTENT_COMMAND={},X.INSERT_LINE_BREAK_COMMAND=r,X.INSERT_PARAGRAPH_COMMAND=o,X.INSERT_TAB_COMMAND={},X.KEY_ARROW_DOWN_COMMAND=y,X.KEY_ARROW_LEFT_COMMAND=g,X.KEY_ARROW_RIGHT_COMMAND=h,X.KEY_ARROW_UP_COMMAND=b,X.KEY_BACKSPACE_COMMAND=E,X.KEY_DELETE_COMMAND=S,X.KEY_DOWN_COMMAND=f,X.KEY_ENTER_COMMAND=x,X.KEY_ESCAPE_COMMAND=C,X.KEY_MODIFIER_COMMAND=I,X.KEY_SPACE_COMMAND=_,X.KEY_TAB_COMMAND=w,X.LineBreakNode=dn,X.MOVE_TO_END=m,X.MOVE_TO_START=v,X.OUTDENT_CONTENT_COMMAND={},X.PASTE_COMMAND=a,X.ParagraphNode=$r,X.REDO_COMMAND=p,X.REMOVE_TEXT_COMMAND=l,X.RootNode=Lr,X.SELECTION_CHANGE_COMMAND=e,X.TabNode=Mn,X.TextNode=xn,X.UNDO_COMMAND=d,X.createCommand=function(){return{}},X.createEditor=function(e){var t=e||{},n=ur,r=t.theme||{};let o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=Ir(),l=t.namespace||(null!==o?o._config.namespace:Be()),s=t.editorState,u=[Lr,xn,dn,Mn,$r,...t.nodes||[]],c=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let t=u[n],r=null;var d=null;"function"!=typeof t&&(t=(d=t).replace,r=d.with,d=d.withKlass?d.withKlass:null);let o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),e.set(o,{klass:t,replace:r,replaceWithKlass:d,transforms:a})}return r=new Hr(a,o,e,{disableEvents:i,namespace:l,theme:r},c||console.error,function(e){let t=new Map,n=new Set;return e.forEach((e=>{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==s&&(r._pendingEditorState=s,r._dirtyType=2),r},X.getNearestEditorFromDOMNode=ye,X.isSelectionCapturedInDecoratorInput=ve,X.isSelectionWithinEditor=be,X}function ee(){if(B)return z;B=1;const e=Z();return z=e}function te(){if(j)return H;j=1;const e=function(){if(F)return J;F=1;var e=ee();let t=new Map;function n(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function r(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function o(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function i(e){let n=t.get(e);return void 0===n&&(n=o(e),t.set(e,n)),n}function a(e,n){var r=i("getStyle"in e?e.getStyle():e.style);n=Object.entries(n).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...r}),r=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(n),e.setStyle(r),t.set(r,n)}function l(t){for(;null!==t&&!e.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function s(t,n,r,o,i=null){if(0!==n.length){var a=n[0],s=new Map,u=[];(a=e.$isElementNode(a)?a:a.getParentOrThrow()).isInline()&&(a=a.getParentOrThrow());for(var c=!1;null!==a;){var d=a.getPreviousSibling();if(null!==d){a=d,c=!0;break}if(a=a.getParentOrThrow(),e.$isRootOrShadowRoot(a))break}d=new Set;for(var p=0;p<r;p++){var f=n[p];e.$isElementNode(f)&&0===f.getChildrenSize()&&d.add(f.getKey())}var h=new Set;for(p=0;p<r;p++){var m=(f=n[p]).getParent();if(null!==m&&m.isInline()&&(m=m.getParent()),null!==m&&e.$isLeafNode(f)&&!h.has(f.getKey())){if(f=m.getKey(),void 0===s.get(f)){let t=o();t.setFormat(m.getFormatType()),t.setIndent(m.getIndent()),u.push(t),s.set(f,t),m.getChildren().forEach((n=>{t.append(n),h.add(n.getKey()),e.$isElementNode(n)&&n.getChildrenKeys().forEach((e=>h.add(e)))})),l(m)}}else d.has(f.getKey())&&((m=o()).setFormat(f.getFormatType()),m.setIndent(f.getIndent()),u.push(m),f.remove(!0))}if(null!==i)for(n=0;n<u.length;n++)i.append(u[n]);if(n=null,e.$isRootOrShadowRoot(a))if(c)if(null!==i)a.insertAfter(i);else for(i=u.length-1;0<=i;i--)a.insertAfter(u[i]);else if(c=a.getFirstChild(),e.$isElementNode(c)&&(a=c),null===c)if(i)a.append(i);else for(i=0;i<u.length;i++)c=u[i],a.append(c),n=c;else if(null!==i)c.insertBefore(i);else for(a=0;a<u.length;a++)i=u[a],c.insertBefore(i),n=i;else if(i)a.insertAfter(i);else for(i=u.length-1;0<=i;i--)c=u[i],a.insertAfter(c),n=c;u=e.$getPreviousSelection(),e.$isRangeSelection(u)&&u.anchor.getNode().isAttached()&&u.focus.getNode().isAttached()?e.$setSelection(u.clone()):null!==n?n.selectEnd():t.dirty=!0}}function u(e,t,n,r){e.modify(t?"extend":"move",n,r)}function c(t){return t=t.anchor.getNode(),"rtl"===(e.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()}return J.$addNodeStyle=function(e){let n=o(e=e.getStyle());t.set(e,n)},J.$cloneWithProperties=function(t){let n=(t=t.getLatest()).constructor.clone(t);return n.__parent=t.__parent,n.__next=t.__next,n.__prev=t.__prev,e.$isElementNode(t)&&e.$isElementNode(n)?(n.__first=t.__first,n.__last=t.__last,n.__size=t.__size,n.__format=t.__format,n.__indent=t.__indent,n.__dir=t.__dir,n):(e.$isTextNode(t)&&e.$isTextNode(n)&&(n.__format=t.__format,n.__style=t.__style,n.__mode=t.__mode,n.__detail=t.__detail),n)},J.$getSelectionStyleValueForProperty=function(t,n,r=""){let o=null,a=t.getNodes();var l=t.anchor,s=t.focus,u=t.isBackward();let c=u?s.offset:l.offset;if(l=u?s.getNode():l.getNode(),""!==t.style&&null!==(t=i(t.style))&&n in t)return t[n];for(t=0;t<a.length;t++){var d=a[t];if((0===t||0!==c||!d.is(l))&&e.$isTextNode(d))if(s=n,u=r,s=null!==(d=i(d=d.getStyle()))&&d[s]||u,null===o)o=s;else if(o!==s){o="";break}}return null===o?r:o},J.$isAtNodeEnd=function(e){return"text"===e.type?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()},J.$isParentElementRTL=c,J.$moveCaretSelection=u,J.$moveCharacter=function(e,t,n){let r=c(e);u(e,t,n?!r:r,"character")},J.$patchStyleText=function(t,n){var r=t.getNodes();let o=r.length-1,i=r[0],l=r[o];if(t.isCollapsed())a(t,n);else{var s=t.anchor,u=t.focus,c=i.getTextContent().length,d=u.offset,p=s.offset,f=s.isBefore(u),h=f?p:d;t=f?d:p;var m=f?s.type:u.type,g=f?u.type:s.type;if(s=f?u.key:s.key,e.$isTextNode(i)&&h===c&&(u=i.getNextSibling(),e.$isTextNode(u)&&(h=p=0,i=u)),1===r.length)e.$isTextNode(i)&&(h="element"===m?0:p>d?d:p)!==(t="element"===g?c:p>d?p:d)&&(0===h&&t===c?(a(i,n),i.select(h,t)):(r=i.splitText(h,t),a(r=0===h?r[0]:r[1],n),r.select(0,t-h)));else for(e.$isTextNode(i)&&h<i.getTextContentSize()&&(0!==h&&(i=i.splitText(h)[1]),a(i,n)),e.$isTextNode(l)&&(h=l.getTextContent().length,l.__key!==s&&0!==t&&(t=h),t!==h&&([l]=l.splitText(t)),0!==t&&a(l,n)),t=1;t<o;t++)c=(h=r[t]).getKey(),e.$isTextNode(h)&&c!==i.getKey()&&c!==l.getKey()&&!h.isToken()&&a(h,n)}},J.$selectAll=function(t){let n=t.anchor;t=t.focus;var r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();let o=r.getFirstDescendant();r=r.getLastDescendant();let i="element",a="element",l=0;e.$isTextNode(o)?i="text":e.$isElementNode(o)||null===o||(o=o.getParentOrThrow()),e.$isTextNode(r)?(a="text",l=r.getTextContentSize()):e.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),o&&r&&(n.set(o.getKey(),0,i),t.set(r.getKey(),l,a))},J.$setBlocksType=function(t,n){if("root"===t.anchor.key){n=n();var r=e.$getRoot();(t=r.getFirstChild())?t.replace(n,!0):r.append(n)}else for(r=t.getNodes(),t=t.anchor.getNode().getParentOrThrow(),-1===r.indexOf(t)&&r.push(t),t.isInline()&&(t=t.getParentOrThrow(),-1===r.indexOf(t)&&r.push(t)),t=0;t<r.length;t++){let a=r[t];var o=a;if(!e.$isElementNode(o)||e.$isRootOrShadowRoot(o))o=!1;else{var i=o.getFirstChild();i=null===i||e.$isTextNode(i)||i.isInline(),o=!o.isInline()&&!1!==o.canBeEmpty()&&i}o&&((o=n()).setFormat(a.getFormatType()),o.setIndent(a.getIndent()),a.replace(o,!0))}},J.$shouldOverrideDefaultCharacterSelection=function(t,n){return t=e.$getAdjacentNode(t.focus,n),e.$isDecoratorNode(t)&&!t.isIsolated()||e.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()},J.$sliceSelectedTextNodeContent=function(t,n){if(n.isSelected()&&!n.isSegmented()&&!n.isToken()&&(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t))){var r=t.anchor.getNode(),o=t.focus.getNode(),i=n.is(r),a=n.is(o);if(i||a){i=t.isBackward();let e,[l,s]=t.getCharacterOffsets();t=r.is(o),a=n.is(i?o:r),o=n.is(i?r:o),r=0,t?(r=l>s?s:l,e=l>s?l:s):a?(r=i?s:l,e=void 0):o&&(r=0,e=i=i?l:s),n.__text=n.__text.slice(r,e)}}return n},J.$wrapNodes=function(t,n,r=null){var o=t.getNodes();let i=o.length;var a=t.anchor;if(0===i||1===i&&"element"===a.type&&0===a.getNode().getChildrenSize()){o=(t="text"===a.type?a.getNode().getParentOrThrow():a.getNode()).getChildren();let e=n();e.setFormat(t.getFormatType()),e.setIndent(t.getIndent()),o.forEach((t=>e.append(t))),r&&(e=r.append(e)),t.replace(e)}else{a=null;var l=[];for(let u=0;u<i;u++){let i=o[u];e.$isRootOrShadowRoot(i)?(s(t,l,l.length,n,r),l=[],a=i):null===a||null!==a&&e.$hasAncestor(i,a)?l.push(i):(s(t,l,l.length,n,r),l=[i])}s(t,l,l.length,n,r)}},J.createDOMRange=function(t,o,i,a,l){let s=o.getKey(),u=a.getKey(),c=document.createRange(),d=t.getElementByKey(s);if(t=t.getElementByKey(u),e.$isTextNode(o)&&(d=n(d)),e.$isTextNode(a)&&(t=n(t)),void 0===o||void 0===a||null===d||null===t)return null;"BR"===d.nodeName&&([d,i]=r(d)),"BR"===t.nodeName&&([t,l]=r(t)),o=d.firstChild,d===t&&null!=o&&"BR"===o.nodeName&&0===i&&0===l&&(l=1);try{c.setStart(d,i),c.setEnd(t,l)}catch(e){return null}return!c.collapsed||i===l&&s===u||(c.setStart(t,l),c.setEnd(d,i)),c},J.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,o=(t=Array.from(t.getClientRects())).length;t.sort(((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let i=0;i<o;i++){let a=t[i],l=a.width+n===e.width;r&&r.top<=a.top&&r.top+r.height>a.top&&r.left+r.width>a.left||l?(t.splice(i--,1),o--):r=a}return t},J.getStyleObjectFromCSS=i,J.trimTextContentFromAnchor=function(t,n,r){let o=n.getNode();if(e.$isElementNode(o)){var i=o.getDescendantByIndex(n.offset);null!==i&&(o=i)}for(;0<r&&null!==o;){var a=o.getPreviousSibling(),l=0;if(null===a){for(var s=(i=o.getParentOrThrow()).getPreviousSibling();null===s;){if(null===(i=i.getParent())){a=null;break}s=i.getPreviousSibling()}null!==i&&(l=i.isInline()?0:2,a=e.$isElementNode(s)?s.getLastDescendant():s)}if(""===(s=o.getTextContent())&&e.$isElementNode(o)&&!o.isInline()&&(s="\n\n"),i=o.getTextContentSize(),!e.$isTextNode(o)||r>=i)s=o.getParent(),o.remove(),null==s||0!==s.getChildrenSize()||e.$isRootNode(s)||s.remove(),r-=i+l,o=a;else{let u=o.getKey();l=t.getEditorState().read((()=>{const t=e.$getNodeByKey(u);return e.$isTextNode(t)&&t.isSimpleText()?t.getTextContent():null})),a=i-r;let c=s.slice(0,a);null!==l&&l!==s?(r=e.$getPreviousSelection(),i=o,o.isSimpleText()?o.setTextContent(l):(i=e.$createTextNode(l),o.replace(i)),e.$isRangeSelection(r)&&r.isCollapsed()&&(r=r.anchor.offset,i.select(r,r))):o.isSimpleText()?(l=n.key===u,(s=n.offset)<r&&(s=i),r=l?s-r:0,i=l?s:a,l&&0===r?([r]=o.splitText(r,i),r.remove()):([,r]=o.splitText(r,i),r.remove())):(r=e.$createTextNode(c),o.replace(r)),r=0}}},J}();return H=e}function ne(){if(W)return Q;W=1;var e=te(),t=ee();function n(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function r(e,n){for(;e!==t.$getRoot()&&null!=e;){if(n(e))return e;e=e.getParent()}return null}function o(e){return 1===e.nodeType}return Q.$splitNode=t.$splitNode,Q.$dfs=function(e,n){let r=[];e=(e||t.$getRoot()).getLatest(),n=n||(t.$isElementNode(e)?e.getLastDescendant():e);for(var o=e,i=0;null!==(o=o.getParent());)i++;for(o=i;null!==e&&!e.is(n);)if(r.push({depth:o,node:e}),t.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),o++;else for(i=null;null===i&&null!==e;)null===(i=e.getNextSibling())?(e=e.getParent(),o--):e=i;return null!==e&&e.is(n)&&r.push({depth:o,node:e}),r},Q.$findMatchingParent=r,Q.$getNearestBlockElementAncestorOrThrow=function(e){let n=r(e,(e=>t.$isElementNode(e)&&!e.isInline()));return t.$isElementNode(n)||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(4,e.__key),n},Q.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},Q.$insertNodeToNearestRoot=function(e){var n=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(n)){var{focus:r}=n;if(n=r.getNode(),r=r.offset,t.$isRootOrShadowRoot(n))null==(r=n.getChildAtIndex(r))?n.append(e):r.insertBefore(e),e.selectNext();else{let o,i;t.$isTextNode(n)?(o=n.getParentOrThrow(),i=n.getIndexWithinParent(),0<r&&(i+=1,n.splitText(r))):(o=n,i=r),[,n]=t.$splitNode(o,i),n.insertBefore(e),n.selectStart()}}else t.$isNodeSelection(n)||t.DEPRECATED_$isGridSelection(n)?(n=n.getNodes())[n.length-1].getTopLevelElementOrThrow().insertAfter(e):t.$getRoot().append(e),n=t.$createParagraphNode(),e.insertAfter(n),n.select();return e.getLatest()},Q.$restoreEditorState=function(n,r){let o=new Map,i=n._pendingEditorState;for(let[n,i]of r._nodeMap){let r=e.$cloneWithProperties(i);t.$isTextNode(r)&&(r.__text=i.__text),o.set(n,r)}i&&(i._nodeMap=o),n._dirtyType=2,n=r._selection,t.$setSelection(null===n?null:n.clone())},Q.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t},Q.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},Q.isHTMLAnchorElement=function(e){return o(e)&&"A"===e.tagName},Q.isHTMLElement=o,Q.isMimeType=n,Q.mediaFileReader=function(e,t){let r=e[Symbol.iterator]();return new Promise(((e,o)=>{let i=[],a=()=>{const{done:l,value:s}=r.next();if(l)return e(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",(()=>{const e=u.result;"string"==typeof e&&i.push({file:s,result:e}),a()})),n(s,t)?u.readAsDataURL(s):a()};a()}))},Q.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}},Q.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},Q.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var o=e.getChildren(),i=0;i<o.length;i++)if(o[i]instanceof t){o=null;break e}for(o=e;null!==o;)if(i=o,(o=o.getParent())instanceof t){o={child:i,parent:o};break e}o=null}if(null!==o){const{child:t,parent:a}=o;if(t.is(e)){if(r(a,e),o=(e=t.getNextSiblings()).length,a.insertAfter(t),0!==o){i=n(a),t.insertAfter(i);for(let t=0;t<o;t++)i.append(e[t])}a.canBeEmpty()||0!==a.getChildrenSize()||a.remove()}}}))},Q.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))},Q}function re(){if(K)return G;K=1;const e=ne();return G=e}function oe(){if(V)return U;V=1;const e=function(){if(Y)return q;Y=1;var e=re(),t=ee();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(e){return new r(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),null!==this.__target&&(n.target=this.__target),null!==this.__rel&&(n.rel=this.__rel),null!==this.__title&&(n.title=this.__title),e.addClassNamesToElement(n,t.theme.link),n}updateDOM(e,t){let n=this.__url,r=this.__target,o=this.__rel,i=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(e){let t=i(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!n.has(t.protocol))return"about:blank"}catch(e){}return 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(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!t.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function o(t){let n=null;if(e.isHTMLAnchorElement(t)){let e=t.textContent;null!==e&&""!==e&&(n=i(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:n}}function i(e,n){return t.$applyNodeReplacement(new r(e,n))}function a(e){return e instanceof r}class l extends r{static getType(){return"autolink"}static clone(e){return new l(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let t=s(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=s(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function s(e,n){return t.$applyNodeReplacement(new l(e,n))}let u=t.createCommand("TOGGLE_LINK_COMMAND");return q.$createAutoLinkNode=s,q.$createLinkNode=i,q.$isAutoLinkNode=function(e){return e instanceof l},q.$isLinkNode=a,q.AutoLinkNode=l,q.LinkNode=r,q.TOGGLE_LINK_COMMAND=u,q.toggleLink=function(e,n={}){let{target:r,title:o}=n,l=void 0===n.rel?"noreferrer":n.rel;if(n=t.$getSelection(),t.$isRangeSelection(n))if(n=n.extract(),null===e)n.forEach((e=>{if(a(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===n.length){var s=n[0];if(s=a(s)?s:function(e,t){for(;null!==e&&null!==(e=e.getParent())&&!t(e););return e}(s,a),null!==s)return s.setURL(e),void 0!==r&&s.setTarget(r),null!==l&&s.setRel(l),void(void 0!==o&&s.setTitle(o))}let u=null,c=null;n.forEach((n=>{var s=n.getParent();if(s!==c&&null!==s&&(!t.$isElementNode(n)||n.isInline()))if(a(s))c=s,s.setURL(e),void 0!==r&&s.setTarget(r),null!==l&&c.setRel(l),void 0!==o&&c.setTitle(o);else if(s.is(u)||(u=s,c=i(e,{rel:l,target:r}),a(s)?null===n.getPreviousSibling()?s.insertBefore(c):s.insertAfter(c):n.insertBefore(c)),a(n)){if(!n.is(c)){if(null!==c){s=n.getChildren();for(let e=0;e<s.length;e++)c.append(s[e])}n.remove()}}else null!==c&&c.append(n)}))}},q}();return U=e}var ie,ae,le,se=oe(),ue={};function ce(){if(ie)return ue;ie=1;var e=ee(),t=re();function n(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e){let t=1;for(e=e.getParent();null!=e;){if(y(e)){if(k(e=e.getParent())){t++,e=e.getParent();continue}n(40)}break}return t}function o(e){k(e=e.getParent())||n(40);let t=e;for(;null!==t;)t=t.getParent(),k(t)&&(e=t);return e}function i(e){let t=[];e=e.getChildren().filter(y);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();k(o)?t=t.concat(i(o)):t.push(r)}return t}function a(e){return y(e)&&k(e.getFirstChild())}function l(e){return b().append(e)}function s(e,t){return y(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function u(e,t){e.splice(e.getChildrenSize(),0,t)}function c(e,t){if(k(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=b();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),u(o,e.getChildren()),k(n)&&t===n.getListType()?(n.append(o),e.remove(),k(r)&&t===r.getListType()&&(u(n,r.getChildren()),r.remove()),n):k(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):((t=w(t)).append(o),e.replace(t),p(t),t)}function d(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&a(n)&&a(r)&&(d(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),p(e)),t.remove()}function p(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let a=e[t];if(y(a)){let e=a.getValue();var r=a,o=r.getParent(),i=1;for(null!=o&&(k(o)?i=o.getStart():n(44)),r=r.getPreviousSiblings(),o=0;o<r.length;o++){let e=r[o];y(e)&&!k(e.getFirstChild())&&i++}e!==i&&a.setValue(i)}}}function f(e){if(!a(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(k(r)&&y(n)&&k(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=b();let r=w(l);o.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),i=b(),l=w(l),i.append(l),u(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}p(t),p(r)}}}class h extends e.ElementNode{static getType(){return"listitem"}static clone(e){return new h(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return k(n)&&"check"===n.getListType()&&g(t,this,null),t.value=this.__value,m(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return k(r)&&"check"===r.getListType()&&g(t,this,e),t.value=this.__value,m(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();k(t)&&(p(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:v,priority:0})}}static importJSON(e){let t=b();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(e.$isElementNode(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(y(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!k(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=w(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&this.getChildren().forEach((t=>{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var r=this.getParentOrThrow();k(r)||n(39);var o=this.getNextSiblings();if(y(e))return t=super.insertAfter(e,t),k(e=e.getParentOrThrow())&&p(e),t;if(k(e)){for(r=e,o=(e=e.getChildren()).length-1;0<=o;o--)r=e[o],this.insertAfter(r,t);return r}if(r.insertAfter(e,t),0!==o.length){let n=w(r.getListType());o.forEach((e=>n.append(e))),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&a(t)&&a(n)?(d(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(k(e=n.getParent())&&p(e))}insertNewAfter(e,t=!0){return e=b(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(t){let n=e.$createParagraphNode();this.getChildren().forEach((e=>n.append(e)));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=y(o);return 1===r.getChildrenSize()?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),"element"===r.type&&r.getNode().is(this)&&r.set(o,r.offset,"element"),"element"===t.type&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;y(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1<e||n(117);let t=this.getIndent();for(;t!==e;)if(t<e){e:{var r=new Set;if(a(this)||r.has(this.getKey()))break e;let e=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(a(o)&&a(i)){if(k(i=i.getFirstChild())){i.append(this);var l=o.getFirstChild();k(l)&&(u(i,l=l.getChildren()),o.remove(),r.add(o.getKey())),p(i)}}else a(o)?k(o=o.getFirstChild())&&(null!==(r=o.getFirstChild())&&r.insertBefore(this),p(o)):a(i)?k(o=i.getFirstChild())&&(o.append(this),p(o)):k(e)&&(r=b(),l=w(e.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):e.append(r),p(l));k(e)&&p(e)}t++}else f(this),t--;return this}insertBefore(e){if(y(e)){let e=this.getParentOrThrow();if(k(e)){p(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return y(e)}canReplaceWith(e){return y(e)}canMergeWith(t){return e.$isParagraphNode(t)||y(t)}extractWithChild(t,n){if(!e.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return w("bullet")}}function m(e,n,r){let o=[],i=[];var a=(n=n.list)?n.listitem:void 0;if(n&&n.nested)var l=n.nested.listitem;if(void 0!==a&&(a=a.split(" "),o.push(...a)),n){a=k(a=r.getParent())&&"check"===a.getListType();let e=r.getChecked();a&&!e||i.push(n.listitemUnchecked),a&&e||i.push(n.listitemChecked),a&&o.push(e?n.listitemChecked:n.listitemUnchecked)}void 0!==l&&(l=l.split(" "),r.getChildren().some((e=>k(e)))?o.push(...l):i.push(...l)),0<i.length&&t.removeClassNamesFromElement(e,...i),0<o.length&&t.addClassNamesToElement(e,...o)}function g(e,t,n){k(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function v(e){return{node:b(e=t.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function b(t){return e.$applyNodeReplacement(new h(void 0,t))}function y(e){return e instanceof h}class x extends e.ElementNode{static getType(){return"list"}static clone(e){return new x(e.__listType||S[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=S[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();t.__listType=e,t.__tag="number"===e?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,_(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(_(t,n.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:C,priority:0}),ul:()=>({conversion:C,priority:0})}}static importJSON(e){let t=w(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(y(n))super.append(n);else{let t=b();k(n)?t.append(n):e.$isElementNode(n)?(n=e.$createTextNode(n.getTextContent()),t.append(n)):t.append(n),super.append(t)}}return p(this),this}extractWithChild(e){return y(e)}}function _(e,n,o){let i=[],a=[];var l=n.list;if(void 0!==l){let e=l[`${o.__tag}Depth`]||[],t=(n=r(o)-1)%e.length;var s=e[t];let u,c=l[o.__tag];if(void 0!==(l=l.nested)&&l.list&&(u=l.list),void 0!==c&&i.push(c),void 0!==s)for(s=s.split(" "),i.push(...s),s=0;s<e.length;s++)s!==t&&a.push(o.__tag+s);void 0!==u&&(o=u.split(" "),1<n?i.push(...o):a.push(...o))}0<a.length&&t.removeClassNamesFromElement(e,...a),0<i.length&&t.addClassNamesToElement(e,...i)}function E(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];y(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{k(e)&&t.push(l(e))}))):t.push(l(n))}return t}function C(e){let n=e.nodeName.toLowerCase(),r=null;return"ol"===n?r=w("number",e.start):"ul"===n&&(r=t.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?w("check"):w("bullet")),{after:E,node:r}}let S={ol:"number",ul:"bullet"};function w(t,n=1){return e.$applyNodeReplacement(new x(t,n))}function k(e){return e instanceof x}let T=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),N=e.createCommand("INSERT_CHECK_LIST_COMMAND"),R=e.createCommand("REMOVE_LIST_COMMAND");return ue.$createListItemNode=b,ue.$createListNode=w,ue.$getListDepth=r,ue.$handleListInsertParagraph=function(){var t=e.$getSelection();if(!e.$isRangeSelection(t)||!t.isCollapsed())return!1;if(!y(t=t.anchor.getNode())||""!==t.getTextContent())return!1;var r=o(t),i=t.getParent();k(i)||n(40);let a,l=i.getParent();if(e.$isRootOrShadowRoot(l))a=e.$createParagraphNode(),r.insertAfter(a);else{if(!y(l))return!1;a=b(),l.insertAfter(a)}if(a.select(),0<(r=t.getNextSiblings()).length){let t=w(i.getListType());e.$isParagraphNode(a)?a.insertAfter(t):((i=b()).append(t),a.insertAfter(i)),r.forEach((e=>{e.remove(),t.append(e)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!y(e)&&!k(e))break;e=t}e.remove()}(t),!0},ue.$isListItemNode=y,ue.$isListNode=k,ue.INSERT_CHECK_LIST_COMMAND=N,ue.INSERT_ORDERED_LIST_COMMAND=A,ue.INSERT_UNORDERED_LIST_COMMAND=T,ue.ListItemNode=h,ue.ListNode=x,ue.REMOVE_LIST_COMMAND=R,ue.insertList=function(t,n){t.update((()=>{var t=e.$getSelection();if(e.$isRangeSelection(t)||e.DEPRECATED_$isGridSelection(t)){var r=t.getNodes(),o=(t=t.anchor.getNode()).getParent();if(s(t,r))r=w(n),e.$isRootOrShadowRoot(o)?(t.replace(r),o=b(),e.$isElementNode(t)&&(o.setFormat(t.getFormatType()),o.setIndent(t.getIndent())),r.append(o)):y(t)&&(u(r,(t=t.getParentOrThrow()).getChildren()),t.replace(r));else for(t=new Set,o=0;o<r.length;o++){var i=r[o];if(e.$isElementNode(i)&&i.isEmpty()&&!t.has(i.getKey()))c(i,n);else if(e.$isLeafNode(i))for(i=i.getParent();null!=i;){let r=i.getKey();if(k(i)){if(!t.has(r)){var a=w(n);u(a,i.getChildren()),i.replace(a),p(a),t.add(r)}break}if(a=i.getParent(),e.$isRootOrShadowRoot(a)&&!t.has(r)){t.add(r),c(i,n);break}i=a}}}}))},ue.removeList=function(n){n.update((()=>{let n=e.$getSelection();if(e.$isRangeSelection(n)){var r=new Set,a=n.getNodes(),l=n.anchor.getNode();if(s(l,a))r.add(o(l));else for(l=0;l<a.length;l++){var c=a[l];e.$isLeafNode(c)&&(null!=(c=t.$getNearestNodeOfType(c,h))&&r.add(o(c)))}for(let t of r){r=t,a=i(t);for(let t of a)u(a=e.$createParagraphNode(),t.getChildren()),r.insertAfter(a),r=a,t.__key===n.anchor.key&&n.anchor.set(a.getKey(),0,"element"),t.__key===n.focus.key&&n.focus.set(a.getKey(),0,"element"),t.remove();t.remove()}}}))},ue}function de(){if(le)return ae;le=1;const e=ce();return ae=e}var pe,fe,he,me,ge,ve,be=de(),ye={},xe={};function _e(){if(pe)return xe;pe=1;var e=g;let t=e.createContext(null);return xe.LexicalComposerContext=t,xe.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}},xe.useLexicalComposerContext=function(){let n=e.useContext(t);return null==n&&function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n},xe}function Ee(){if(he)return fe;he=1;const e=_e();return fe=e}function Ce(){if(me)return ye;me=1;var e=Ee(),t=ee(),n=g;let r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};return ye.LexicalComposer=function({initialConfig:a,children:l}){let s=n.useMemo((()=>{const{theme:n,namespace:o,editor__DEPRECATED:l,nodes:s,onError:u,editorState:c}=a,d=e.createLexicalComposerContext(null,n);let p=l||null;if(null===p){const e=t.createEditor({editable:a.editable,namespace:o,nodes:s,onError:t=>u(t,e),theme:n});!function(e,n){if(null!==n)if(void 0===n)e.update((()=>{var n=t.$getRoot();if(n.isEmpty()){let o=t.$createParagraphNode();n.append(o),n=r?document.activeElement:null,(null!==t.$getSelection()||null!==n&&n===e.getRootElement())&&o.select()}}),i);else if(null!==n)switch(typeof n){case"string":let r=e.parseEditorState(n);e.setEditorState(r,i);break;case"object":e.setEditorState(n,i);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&n(e)}),i)}}(e,c),p=e}return[p,d]}),[]);return o((()=>{let e=a.editable,[t]=s;t.setEditable(void 0===e||e)}),[]),n.createElement(e.LexicalComposerContext.Provider,{value:s},l)},ye}var Se,we,ke,Te,Ae,Ne,Re=function(){if(ve)return ge;ve=1;const e=Ce();return ge=e}(),Me={},Le={};function Oe(){if(Se)return Le;Se=1;var e=re(),t=ee();function n(e,n){let r=Date.now(),o=0;return(i,a,l,s,u,c)=>{let d=Date.now();if(c.has("historic"))return o=0,r=d,2;let p=function(e,n,r,o,i){if(null===e||0===r.size&&0===o.size&&!i)return 0;var a=n._selection,l=e._selection;if(i)return 1;if(!(t.$isRangeSelection(a)&&t.$isRangeSelection(l)&&l.isCollapsed()&&a.isCollapsed()))return 0;i=n._nodeMap;let s=[];for(let e of r)void 0!==(r=i.get(e))&&s.push(r);for(let[e,n]of o)n&&(void 0===(o=i.get(e))||t.$isRootNode(o)||s.push(o));return 0===s.length?0:1<s.length?(n=(o=n._nodeMap).get(a.anchor.key),l=o.get(l.anchor.key),n&&l&&!e._nodeMap.has(n.__key)&&t.$isTextNode(n)&&1===n.__text.length&&1===a.anchor.offset?2:0):(n=s[0],e=e._nodeMap.get(n.__key),t.$isTextNode(e)&&t.$isTextNode(n)&&e.__mode===n.__mode?(e=e.__text)===(n=n.__text)?0:(a=a.anchor,l=l.anchor,a.key!==l.key||"text"!==a.type?0:(a=a.offset,l=l.offset,1==(e=n.length-e.length)&&l===a-1?2:-1===e&&l===a+1?3:-1===e&&l===a?4:0)):0)}(i,a,s,u,e.isComposing()),f=(()=>{var f=null===l||l.editor===e,h=c.has("history-push");if(!h&&f&&c.has("history-merge"))return 0;if(null===i)return 1;var m=a._selection;if(!(0<s.size||0<u.size))return null!==m?0:2;if(!1===h&&0!==p&&p===o&&d<r+n&&f)return 0;if(1===s.size){{h=Array.from(s)[0],f=i._nodeMap.get(h),h=a._nodeMap.get(h),m=i._selection;let e=a._selection,n=!1;t.$isRangeSelection(m)&&t.$isRangeSelection(e)&&(n="element"===m.anchor.type&&"element"===m.focus.type&&"text"===e.anchor.type&&"text"===e.focus.type),f=!(n||!t.$isTextNode(f)||!t.$isTextNode(h))&&(f.__type===h.__type&&f.__text===h.__text&&f.__mode===h.__mode&&f.__detail===h.__detail&&f.__style===h.__style&&f.__format===h.__format&&f.__parent===h.__parent)}if(f)return 0}return 1})();return r=d,o=p,f}}return Le.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},Le.registerHistory=function(r,o,i){let a=n(r,i);i=({editorState:e,prevEditorState:n,dirtyLeaves:i,dirtyElements:l,tags:s})=>{const u=o.current,c=o.redoStack,d=o.undoStack,p=null===u?null:u.editorState;if(null===u||e!==p){if(1===(n=a(n,e,u,i,l,s)))0!==c.length&&(o.redoStack=[],r.dispatchCommand(t.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0));else if(2===n)return;o.current={editor:r,editorState:e}}};let l=e.mergeRegister(r.registerCommand(t.UNDO_COMMAND,(()=>{let e=o.redoStack,n=o.undoStack;if(0!==n.length){let i=o.current,a=n.pop();null!==i&&(e.push(i),r.dispatchCommand(t.CAN_REDO_COMMAND,!0)),0===n.length&&r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),o.current=a||null,a&&a.editor.setEditorState(a.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.REDO_COMMAND,(()=>{let e=o.redoStack;var n=o.undoStack;if(0!==e.length){let i=o.current;null!==i&&(n.push(i),r.dispatchCommand(t.CAN_UNDO_COMMAND,!0)),n=e.pop(),0===e.length&&r.dispatchCommand(t.CAN_REDO_COMMAND,!1),o.current=n||null,n&&n.editor.setEditorState(n.editorState,{tag:"historic"})}return!0}),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_EDITOR_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,!1)),t.COMMAND_PRIORITY_EDITOR),r.registerCommand(t.CLEAR_HISTORY_COMMAND,(()=>(o.undoStack=[],o.redoStack=[],o.current=null,r.dispatchCommand(t.CAN_REDO_COMMAND,!1),r.dispatchCommand(t.CAN_UNDO_COMMAND,!1),!0)),t.COMMAND_PRIORITY_EDITOR),r.registerUpdateListener(i)),s=r.registerUpdateListener(i);return()=>{l(),s()}},Le}function Ie(){if(Te)return Me;Te=1;var e=Ee(),t=function(){if(ke)return we;ke=1;const e=Oe();return we=e}(),n=g;return Me.createEmptyHistoryState=t.createEmptyHistoryState,Me.HistoryPlugin=function({externalHistoryState:r}){let[o]=e.useLexicalComposerContext();return function(e,r,o=1e3){let i=n.useMemo((()=>r||t.createEmptyHistoryState()),[r]);n.useEffect((()=>t.registerHistory(e,i,o)),[o,e,i])}(o,r),null},Me}var Pe,De,$e,ze=function(){if(Ne)return Ae;Ne=1;const e=Ie();return Ae=e}(),Be={};function Fe(){if(Pe)return Be;Pe=1;var e=de(),t=Ee(),n=g,r=re(),o=ee();return Be.ListPlugin=function(){let[i]=t.useLexicalComposerContext();return n.useEffect((()=>{if(!i.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[i]),function(t){n.useEffect((()=>r.mergeRegister(t.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,(()=>(e.insertList(t,"number"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,(()=>(e.insertList(t,"bullet"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.REMOVE_LIST_COMMAND,(()=>(e.removeList(t),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(o.INSERT_PARAGRAPH_COMMAND,(()=>!!e.$handleListInsertParagraph()),o.COMMAND_PRIORITY_LOW))),[t])}(i),null},Be}var He,je,We,Ge=function(){if($e)return De;$e=1;const e=Fe();return De=e}(),Ke={};function Ye(){if(He)return Ke;He=1;var e=Ee(),t=re(),n=ee(),r=g;function o(e){return e.registerCommand(n.KEY_TAB_COMMAND,(r=>{let o=n.$getSelection();return!!n.$isRangeSelection(o)&&(r.preventDefault(),r=function(e){var r=e.getNodes();if(0<function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);null!==o&&n.push(o)}return n}(r,(e=>n.$isBlockElementNode(e)&&e.canIndent()?e:null)).length)return!0;if(r=e.anchor,r=(e=(e=e.focus).isBefore(r)?e:r).getNode(),(r=t.$getNearestBlockElementAncestorOrThrow(r)).canIndent()){r=r.getKey();let t=n.$createRangeSelection();if(t.anchor.set(r,0,"element"),t.focus.set(r,0,"element"),t=n.$normalizeSelection__EXPERIMENTAL(t),t.anchor.is(e))return!0}return!1}(o)?r.shiftKey?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,e.dispatchCommand(r,void 0))}),n.COMMAND_PRIORITY_EDITOR)}return Ke.TabIndentationPlugin=function(){let[t]=e.useLexicalComposerContext();return r.useEffect((()=>o(t))),null},Ke.registerTabIndentation=o,Ke}var Ue,Ve,qe,Qe,Je,Xe,Ze,et,tt,nt=function(){if(We)return je;We=1;const e=Ye();return je=e}(),rt={},ot={},it={};function at(){if(qe)return Ve;qe=1;const e=function(){if(Ue)return it;Ue=1;var e=te(),t=ee();function n(r,o,i,a=null){let l=null==a||o.isSelected(a),s=t.$isElementNode(o)&&o.excludeFromCopy("html");var u=o;null!==a&&(u=e.$cloneWithProperties(o),u=t.$isTextNode(u)&&null!=a?e.$sliceSelectedTextNodeContent(a,u):u);let c=t.$isElementNode(u)?u.getChildren():[],{element:d,after:p}=u.exportDOM(r);if(!d)return!1;let f=document.createDocumentFragment();for(let e=0;e<c.length;e++){let i=c[e],s=n(r,i,f,a);!l&&t.$isElementNode(o)&&s&&o.extractWithChild(i,a,"html")&&(l=!0)}return l&&!s?(d.append(f),i.append(d),p&&(r=p.call(u,d))&&d.replaceWith(r)):i.append(f),l}let r=new Set(["STYLE","SCRIPT"]);function o(e,n,i=new Map,a){let l=[];if(r.has(e.nodeName))return l;let s=null;var u,{nodeName:c}=e,d=n._htmlConversions.get(c.toLowerCase());if(c=null,void 0!==d)for(u of d)null!==(d=u(e))&&(null===c||c.priority<d.priority)&&(c=d);if(c=(u=null!==c?c.conversion:null)?u(e):null,u=null,null!==c){if(u=c.after,d=c.node,s=Array.isArray(d)?d[d.length-1]:d,null!==s){for(var[,p]of i)if(s=p(s,a),!s)break;s&&l.push(...Array.isArray(d)?d:[s])}null!=c.forChild&&i.set(e.nodeName,c.forChild)}for(e=e.childNodes,a=[],p=0;p<e.length;p++)a.push(...o(e[p],n,new Map(i),s));return null!=u&&(a=u(a)),null==s?l=l.concat(a):t.$isElementNode(s)&&s.append(...a),l}return it.$generateHtmlFromNodes=function(e,r){if("undefined"==typeof document||"undefined"==typeof window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let o=document.createElement("div"),i=t.$getRoot().getChildren();for(let t=0;t<i.length;t++)n(e,i[t],o,r);return o.innerHTML},it.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let a=0;a<t.length;a++){var i=t[a];r.has(i.nodeName)||null!==(i=o(i,e))&&(n=n.concat(i))}return n},it}();return Ve=e}function lt(){if(Qe)return ot;Qe=1;var e=at(),t=te(),n=re(),r=ee();function o(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(t){let n=r.$getSelection();if(null==n)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(n)&&n.isCollapsed()||0===n.getNodes().length?"":e.$generateHtmlFromNodes(t,n)}function l(e){let t=r.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(c(e,t))}function s(e,t,i){(r.DEPRECATED_$isGridSelection(i)||null!==n.$findMatchingParent(i.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)))&&null!==n.$findMatchingParent(i.focus.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&r.DEPRECATED_$isGridNode(t[0])?function(e,t,i,a){1===e.length&&r.DEPRECATED_$isGridNode(e[0])||o(42);var l=e[0];e=l.getChildren(),i=l.getFirstChildOrThrow().getChildrenSize();var s=l.getChildrenSize(),u=n.$findMatchingParent(t.anchor.getNode(),(e=>r.DEPRECATED_$isGridCellNode(e)));t=(l=u&&n.$findMatchingParent(u,(e=>r.DEPRECATED_$isGridRowNode(e))))&&n.$findMatchingParent(l,(e=>r.DEPRECATED_$isGridNode(e))),r.DEPRECATED_$isGridCellNode(u)&&r.DEPRECATED_$isGridRowNode(l)&&r.DEPRECATED_$isGridNode(t)||o(43);var c=l.getIndexWithinParent(),d=Math.min(t.getChildrenSize()-1,c+s-1);let p,f;s=u.getIndexWithinParent(),u=Math.min(l.getChildrenSize()-1,s+i-1),i=Math.min(s,u),l=Math.min(c,d),s=Math.max(s,u),c=Math.max(c,d),d=t.getChildren(),u=0;for(let t=l;t<=c;t++){var h=d[t];r.DEPRECATED_$isGridRowNode(h)||o(24);var m=e[u];r.DEPRECATED_$isGridRowNode(m)||o(24),h=h.getChildren(),m=m.getChildren();let n=0;for(let e=i;e<=s;e++){let a=h[e];r.DEPRECATED_$isGridCellNode(a)||o(25);let u=m[n];r.DEPRECATED_$isGridCellNode(u)||o(25),t===l&&e===i?p=a.getKey():t===c&&e===s&&(f=a.getKey());let d=a.getChildren();u.getChildren().forEach((e=>{r.$isTextNode(e)&&r.$createParagraphNode().append(e),a.append(e)})),d.forEach((e=>e.remove())),n++}u++}p&&f&&(e=r.DEPRECATED_$createGridSelection(),e.set(t.getKey(),p,f),r.$setSelection(e),a.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}(t,i,!1,e):function(e,t){let n=[],i=null;for(let t=0;t<e.length;t++){let o=e[t],a=r.$isLineBreakNode(o);if(a||r.$isDecoratorNode(o)&&o.isInline()||r.$isElementNode(o)&&o.isInline()||r.$isTextNode(o)||o.isParentRequired()){if(null===i&&(i=o.createParentElementNode(),n.push(i),a))continue;null!==i&&i.append(o)}else n.push(o),i=null}r.$isRangeSelection(t)?t.insertNodes(n):r.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),r.DEPRECATED_$isGridCellNode(e)||o(41),e.append(...n))}(t,i)}function u(e,n,i,a=[]){let l=null==n||i.isSelected(n),s=r.$isElementNode(i)&&i.excludeFromCopy("html");var c=i;if(null!==n){var d=t.$cloneWithProperties(i);c=d=r.$isTextNode(d)&&null!=n?t.$sliceSelectedTextNodeContent(n,d):d}let p=r.$isElementNode(c)?c.getChildren():[];var f=c;d=f.exportJSON();var h=f.constructor;d.type!==h.getType()&&o(58,h.name);let m=d.children;for(r.$isElementNode(f)&&(Array.isArray(m)||o(59,h.name)),r.$isTextNode(c)&&(0<(c=c.__text).length?d.text=c:l=!1),c=0;c<p.length;c++)h=u(e,n,f=p[c],d.children),!l&&r.$isElementNode(i)&&h&&i.extractWithChild(f,n,"clone")&&(l=!0);if(l&&!s)a.push(d);else if(Array.isArray(d.children))for(e=0;e<d.children.length;e++)a.push(d.children[e]);return l}function c(e,t){let n=[],o=r.$getRoot().getChildren();for(let r=0;r<o.length;r++)u(e,t,o[r],n);return{namespace:e._config.namespace,nodes:n}}function d(e){let n=[];for(let o=0;o<e.length;o++){let i=r.$parseSerializedNode(e[o]);r.$isTextNode(i)&&t.$addNodeStyle(i),n.push(i)}return n}let p=null;function f(e,t){var n=i?(e._window||window).getSelection():null;if(!n)return!1;var o=n.anchorNode;if(n=n.focusNode,null!==o&&null!==n&&!r.isSelectionWithinEditor(e,o,n))return!1;if(t.preventDefault(),t=t.clipboardData,o=r.$getSelection(),null===t||null===o)return!1;n=a(e),e=l(e);let s="";return null!==o&&(s=o.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",s),!0}return ot.$generateJSONFromSelectedNodes=c,ot.$generateNodesFromSerializedNodes=d,ot.$getHtmlContent=a,ot.$getLexicalContent=l,ot.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain")||e.getData("text/uri-list"))&&t.insertRawText(e)},ot.$insertDataTransferForRichText=function(t,n,o){var i=t.getData("application/x-lexical-editor");if(i)try{let e=JSON.parse(i);if(e.namespace===o._config.namespace&&Array.isArray(e.nodes)){return s(o,d(e.nodes),n)}}catch(e){}if(i=t.getData("text/html"))try{var a=(new DOMParser).parseFromString(i,"text/html"),l=e.$generateNodesFromDOM(o,a);return s(o,l,n)}catch(e){}if(null!=(t=t.getData("text/plain")||t.getData("text/uri-list")))if(r.$isRangeSelection(n))for(o=(t=t.split(/(\r?\n|\t)/)).length,a=0;a<o;a++)"\n"===(l=t[a])||"\r\n"===l?n.insertParagraph():"\t"===l?n.insertNodes([r.$createTabNode()]):n.insertText(l);else n.insertRawText(t)},ot.$insertGeneratedNodes=s,ot.copyToClipboard=async function(e,t){if(null!==p)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(f(e,t))}))}));var o=e.getRootElement();let a=null==e._window?window.document:e._window.document,l=i?(e._window||window).getSelection():null;if(null===o||null===l)return!1;let s=a.createElement("span");return s.style.cssText="position: fixed; top: -1000px;",s.append(a.createTextNode("#")),o.append(s),(o=new Range).setStart(s,0),o.setEnd(s,1),l.removeAllRanges(),l.addRange(o),new Promise((t=>{let o=e.registerCommand(r.COPY_COMMAND,(r=>(n.objectKlassEquals(r,ClipboardEvent)&&(o(),null!==p&&(window.clearTimeout(p),p=null),t(f(e,r))),!0)),r.COMMAND_PRIORITY_CRITICAL);p=window.setTimeout((()=>{o(),p=null,t(!1)}),50),a.execCommand("copy"),s.remove()}))},ot}function st(){if(Ze)return rt;Ze=1;var e=function(){if(Xe)return Je;Xe=1;const e=lt();return Je=e}(),t=te(),n=re(),r=ee();function o(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,a=i&&"documentMode"in document?document.documentMode:null,l=!(!i||!("InputEvent"in window)||a)&&"getTargetRanges"in new window.InputEvent("input"),s=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),u=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!c,p=r.createCommand("DRAG_DROP_PASTE_FILE");class f extends r.ElementNode{static getType(){return"quote"}static clone(e){return new f(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return n.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:b,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=h();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=r.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function h(){return r.$applyNodeReplacement(new f)}class m extends r.ElementNode{static getType(){return"heading"}static clone(e){return new m(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,r=document.createElement(t);return void 0!==(e=e.theme.heading)&&n.addClassNamesToElement(r,e[t]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:v,priority:0}),h2:()=>({conversion:v,priority:0}),h3:()=>({conversion:v,priority:0}),h4:()=>({conversion:v,priority:0}),h5:()=>({conversion:v,priority:0}),h6:()=>({conversion:v,priority:0}),p:e=>null!==(e=e.firstChild)&&g(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>g(e)?{conversion:()=>({node:y("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&this.isEmpty()&&e.append(document.createElement("br")),e){var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=y(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&e<this.getTextContentSize()?y(this.getTag()):r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.isEmpty()?r.$createParagraphNode():y(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function g(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function v(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=y(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function b(e){let t=h();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function y(e){return r.$applyNodeReplacement(new m(e))}function x(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function _(e){var t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;let o=new Set;t=t.getNodes();for(let r=0;r<t.length;r++){var i=t[r],a=i.getKey();o.has(a)||(a=(i=n.$getNearestBlockElementAncestorOrThrow(i)).getKey(),i.canIndent()&&!o.has(a)&&(o.add(a),e(i)))}return 0<o.size}function E(e){return e=r.$getNearestNodeFromDOMNode(e),r.$isDecoratorNode(e)}return rt.$createHeadingNode=y,rt.$createQuoteNode=h,rt.$isHeadingNode=function(e){return e instanceof m},rt.$isQuoteNode=function(e){return e instanceof f},rt.DRAG_DROP_PASTE=p,rt.HeadingNode=m,rt.QuoteNode=f,rt.eventFiles=x,rt.registerRichText=function(i){return n.mergeRegister(i.registerCommand(r.CLICK_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isNodeSelection(e)&&(e.clear(),!0)}),0),i.registerCommand(r.DELETE_CHARACTER_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_WORD_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DELETE_LINE_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=r.$getSelection();if("string"==typeof t)r.$isRangeSelection(n)?n.insertText(t):r.DEPRECATED_$isGridSelection(n);else{if(!r.$isRangeSelection(n)&&!r.DEPRECATED_$isGridSelection(n))return!1;const o=t.dataTransfer;null!=o?e.$insertDataTransferForRichText(o,n,i):r.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.REMOVE_TEXT_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.removeText(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_TEXT_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.formatText(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.FORMAT_ELEMENT_COMMAND,(e=>{var t=r.$getSelection();if(!r.$isRangeSelection(t)&&!r.$isNodeSelection(t))return!1;t=t.getNodes();for(const o of t)t=n.$findMatchingParent(o,(e=>r.$isElementNode(e)&&!e.isInline())),null!==t&&t.setFormat(e);return!0}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_LINE_BREAK_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_PARAGRAPH_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INSERT_TAB_COMMAND,(()=>(r.$insertNodes([r.$createTabNode()]),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.INDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();e.setIndent(t+1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.OUTDENT_CONTENT_COMMAND,(()=>_((e=>{const t=e.getIndent();0<t&&e.setIndent(t-1)}))),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_UP_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)&&!E(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(r.$isRangeSelection(t)&&(t=r.$getAdjacentNode(t.focus,!0),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(r.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===r.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=r.$getAdjacentNode(t.focus,!1),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectPrevious(),!0}return!!r.$isRangeSelection(n)&&(!!t.$shouldOverrideDefaultCharacterSelection(n,!0)&&(o=e.shiftKey,e.preventDefault(),t.$moveCharacter(n,o,!0),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)&&!E(e.target)){var o=n.getNodes();if(0<o.length)return e.preventDefault(),o[0].selectNext(0,0),!0}return!!r.$isRangeSelection(n)&&(o=e.shiftKey,!!t.$shouldOverrideDefaultCharacterSelection(n,!1)&&(e.preventDefault(),t.$moveCharacter(n,o,!1),!0))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_BACKSPACE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;e.preventDefault(),({anchor:e}=t);const o=e.getNode();return t.isCollapsed()&&0===e.offset&&!r.$isRootNode(o)&&0<n.$getNearestBlockElementAncestorOrThrow(o).getIndent()?i.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_DELETE_COMMAND,(e=>{if(E(e.target))return!1;const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(e.preventDefault(),i.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ENTER_COMMAND,(e=>{const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;if(null!==e){if((u||s||d)&&l)return!1;if(e.preventDefault(),e.shiftKey)return i.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return i.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.KEY_ESCAPE_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(i.blur(),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DROP_COMMAND,(e=>{const[,t]=x(e);if(0<t.length){var n=o(e.clientX,e.clientY);if(null!==n){const{offset:e,node:o}=n;var a=r.$getNearestNodeFromDOMNode(o);if(null!==a){if(n=r.$createRangeSelection(),r.$isTextNode(a))n.anchor.set(a.getKey(),e,"text"),n.focus.set(a.getKey(),e,"text");else{const e=a.getParentOrThrow().getKey();a=a.getIndexWithinParent()+1,n.anchor.set(e,a,"element"),n.focus.set(e,a,"element")}n=r.$normalizeSelection__EXPERIMENTAL(n),r.$setSelection(n)}i.dispatchCommand(p,t)}return e.preventDefault(),!0}return e=r.$getSelection(),!!r.$isRangeSelection(e)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGSTART_COMMAND,(e=>{[e]=x(e);const t=r.$getSelection();return!(e&&!r.$isRangeSelection(t))}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.DRAGOVER_COMMAND,(e=>{var[t]=x(e);const n=r.$getSelection();return!(t&&!r.$isRangeSelection(n))&&(null!==(t=o(e.clientX,e.clientY))&&(t=r.$getNearestNodeFromDOMNode(t.node),r.$isDecoratorNode(t)&&e.preventDefault()),!0)}),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.COPY_COMMAND,(t=>(e.copyToClipboard(i,n.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.CUT_COMMAND,(t=>(async function(t,o){await e.copyToClipboard(o,n.objectKlassEquals(t,ClipboardEvent)?t:null),o.update((()=>{let e=r.$getSelection();r.$isRangeSelection(e)?e.removeText():r.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,i),!0)),r.COMMAND_PRIORITY_EDITOR),i.registerCommand(r.PASTE_COMMAND,(t=>{const[,n,o]=x(t);if(0<n.length&&!o)return i.dispatchCommand(p,n),!0;if(r.isSelectionCapturedInDecoratorInput(t.target))return!1;const a=r.$getSelection();return!(!r.$isRangeSelection(a)&&!r.DEPRECATED_$isGridSelection(a))&&(function(t,n){t.preventDefault(),n.update((()=>{let o=r.$getSelection(),i=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;null!=i&&(r.$isRangeSelection(o)||r.DEPRECATED_$isGridSelection(o))&&e.$insertDataTransferForRichText(i,o,n)}),{tag:"paste"})}(t,i),!0)}),r.COMMAND_PRIORITY_EDITOR))},rt}function ut(){if(tt)return et;tt=1;const e=st();return et=e}var ct,dt,pt,ft=ut(),ht={};function mt(){if(ct)return ht;ct=1;var e=oe(),t=Ee(),n=re(),r=ee(),o=g;function i(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let a=/[.,;\s]/;function l(e){var t;return e=e.getPreviousSibling(),r.$isElementNode(e)&&(e=e.getLastDescendant()),!(t=null===e||r.$isLineBreakNode(e))&&(t=r.$isTextNode(e))&&(e=e.getTextContent(),t=a.test(e[e.length-1])),t}function s(e){return e=e.getNextSibling(),r.$isElementNode(e)&&(e=e.getFirstDescendant()),null===e||r.$isLineBreakNode(e)||r.$isTextNode(e)&&a.test(e.getTextContent()[0])}function u(e,t,n){var o=e.getChildren();let a=o.length;for(let t=0;t<a;t++){let i=o[t];if(!r.$isTextNode(i)||!i.isSimpleText())return c(e),void n(null,e.getURL())}null===(t=i(o=e.getTextContent(),t))||t.text!==o?(c(e),n(null,e.getURL())):l(e)&&s(e)?((o=e.getURL())!==t.url&&(e.setURL(t.url),n(t.url,o)),t.attributes&&((o=e.getRel())!==t.attributes.rel&&(e.setRel(t.attributes.rel||null),n(t.attributes.rel||null,o)),(o=e.getTarget())!==t.attributes.target&&(e.setTarget(t.attributes.target||null),n(t.attributes.target||null,o)))):(c(e),n(null,e.getURL()))}function c(e){let t=e.getChildren();var n=t.length;for(--n;0<=n;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}function d(t,d,p){o.useEffect((()=>{t.hasNodes([e.AutoLinkNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);let o=(e,t)=>{p&&p(e,t)};return n.mergeRegister(t.registerNodeTransform(r.TextNode,(t=>{var n=t.getParentOrThrow(),f=t.getPreviousSibling();if(e.$isAutoLinkNode(n))u(n,d,o);else if(!e.$isLinkNode(n)){if(t.isSimpleText()&&(a.test(t.getTextContent()[0])||!e.$isAutoLinkNode(f))){f=n=t.getTextContent();let o=0,u=t;for(var h;(h=i(f,d))&&null!==h;){let i=h.index,c=h.length,d=i+c;var m=o+i,g=o+d,v=n,b=t;if((0<m?a.test(v[m-1]):l(b))&&(g<v.length?a.test(v[g]):s(b))){var y=void 0;0===o+i?[y,u]=u.splitText(o+c):[,y,u]=u.splitText(o+i,o+i+c),m=e.$createAutoLinkNode(h.url,h.attributes),(g=r.$createTextNode(h.text)).setFormat(y.getFormat()),g.setDetail(y.getDetail()),m.append(g),y.replace(m),p&&p(h.url,null),o=0}else o+=d;f=f.substring(d)}}n=t.getPreviousSibling(),h=t.getNextSibling(),y=t.getTextContent(),e.$isAutoLinkNode(n)&&!a.test(y[0])&&(n.append(t),u(n,d,o),t=n.getURL(),p&&p(null,t)),e.$isAutoLinkNode(h)&&!a.test(y[y.length-1])&&(c(h),u(h,d,o),t=h.getURL(),p&&p(null,t))}})))}),[t,d,p])}return ht.AutoLinkPlugin=function({matchers:e,onChange:n}){let[r]=t.useLexicalComposerContext();return d(r,e,n),null},ht.createLinkMatcherWithRegExp=function(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}},ht}var gt,vt,bt,yt,xt=function(){if(pt)return dt;pt=1;const e=mt();return dt=e}(),_t=Ee();function Et(){if(vt)return gt;vt=1;var e=Ee(),t=g,n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function r(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}return gt=function(){return function(r){let[o]=e.useLexicalComposerContext(),i=t.useMemo((()=>r(o)),[o,r]),a=t.useRef(i.initialValueFn()),[l,s]=t.useState(a.current);return n((()=>{let{initialValueFn:e,subscribe:t}=i,n=e();return a.current!==n&&(a.current=n,s(n)),t((e=>{a.current=e,s(e)}))}),[i,r]),l}(r)},gt}function Ct(){if(yt)return bt;yt=1;const e=Et();return bt=e}var St=R(Ct()),wt=re(),kt=ee(),Tt=te();const At={black:"#000",white:"#fff"},Nt="#e57373",Rt="#ef5350",Mt="#f44336",Lt="#d32f2f",Ot="#c62828",It="#f3e5f5",Pt="#ce93d8",Dt="#ba68c8",$t="#ab47bc",zt="#9c27b0",Bt="#7b1fa2",Ft="#e3f2fd",Ht="#90caf9",jt="#42a5f5",Wt="#1976d2",Gt="#1565c0",Kt="#4fc3f7",Yt="#29b6f6",Ut="#03a9f4",Vt="#0288d1",qt="#01579b",Qt="#81c784",Jt="#66bb6a",Xt="#4caf50",Zt="#388e3c",en="#2e7d32",tn="#1b5e20",nn="#ffb74d",rn="#ffa726",on="#ff9800",an="#f57c00",ln="#e65100",sn={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function un(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var cn=Object.freeze({__proto__:null,default:un}),dn="$$material";function pn(){return pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pn.apply(null,arguments)}function fn(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var hn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0!==e.speedy&&e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1],n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);if(n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n,this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(t){/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0,this._alreadyInsertedOrderInsensitiveRule=!1},e}(),mn="-ms-",gn="-moz-",vn="-webkit-",bn="comm",yn="rule",xn="decl",_n="@keyframes",En=Math.abs,Cn=String.fromCharCode,Sn=Object.assign;function wn(e){return e.trim()}function kn(e,t,n){return e.replace(t,n)}function Tn(e,t){return e.indexOf(t)}function An(e,t){return 0|e.charCodeAt(t)}function Nn(e,t,n){return e.slice(t,n)}function Rn(e){return e.length}function Mn(e){return e.length}function Ln(e,t){return t.push(e),e}var On=1,In=1,Pn=0,Dn=0,$n=0,zn="";function Bn(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:On,column:In,length:a,return:""}}function Fn(e,t){return Sn(Bn("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hn(){return $n=Dn>0?An(zn,--Dn):0,In--,10===$n&&(In=1,On--),$n}function jn(){return $n=Dn<Pn?An(zn,Dn++):0,In++,10===$n&&(In=1,On++),$n}function Wn(){return An(zn,Dn)}function Gn(){return Dn}function Kn(e,t){return Nn(zn,e,t)}function Yn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Un(e){return On=In=1,Pn=Rn(zn=e),Dn=0,[]}function Vn(e){return zn="",e}function qn(e){return wn(Kn(Dn-1,Xn(91===e?e+2:40===e?e+1:e)))}function Qn(e){for(;($n=Wn())&&$n<33;)jn();return Yn(e)>2||Yn($n)>3?"":" "}function Jn(e,t){for(;--t&&jn()&&!($n<48||$n>102||$n>57&&$n<65||$n>70&&$n<97););return Kn(e,Gn()+(t<6&&32==Wn()&&32==jn()))}function Xn(e){for(;jn();)switch($n){case e:return Dn;case 34:case 39:34!==e&&39!==e&&Xn($n);break;case 40:41===e&&Xn(e);break;case 92:jn()}return Dn}function Zn(e,t){for(;jn()&&e+$n!==57&&(e+$n!==84||47!==Wn()););return"/*"+Kn(t,Dn-1)+"*"+Cn(47===e?e:jn())}function er(e){for(;!Yn(Wn());)jn();return Kn(e,Dn)}function tr(e){return Vn(nr("",null,null,null,[""],e=Un(e),0,[0],e))}function nr(e,t,n,r,o,i,a,l,s){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,_=i,E=r,C=y;g;)switch(h=b,b=jn()){case 40:if(108!=h&&58==An(C,d-1)){-1!=Tn(C+=kn(qn(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=qn(b);break;case 9:case 10:case 13:case 32:C+=Qn(h);break;case 92:C+=Jn(Gn()-1,7);continue;case 47:switch(Wn()){case 42:case 47:Ln(or(Zn(jn(),Gn()),t,n),s);break;default:C+="/"}break;case 123*m:l[u++]=Rn(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:-1==v&&(C=kn(C,/\f/g,"")),f>0&&Rn(C)-d&&Ln(f>32?ir(C+";",r,n,d-1):ir(kn(C," ","")+";",r,n,d-2),s);break;case 59:C+=";";default:if(Ln(E=rr(C,t,n,u,c,o,l,y,x=[],_=[],d),i),123===b)if(0===c)nr(C,t,E,E,x,i,d,l,_);else switch(99===p&&110===An(C,3)?100:p){case 100:case 108:case 109:case 115:nr(e,E,E,r&&Ln(rr(e,E,E,0,0,o,l,y,o,x=[],d),_),o,_,d,l,r?x:_);break;default:nr(C,E,E,E,[""],_,0,l,_)}}u=c=f=0,m=v=1,y=C="",d=a;break;case 58:d=1+Rn(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Hn())continue;switch(C+=Cn(b),b*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:l[u++]=(Rn(C)-1)*v,v=1;break;case 64:45===Wn()&&(C+=qn(jn())),p=Wn(),c=d=Rn(y=C+=er(Gn())),b++;break;case 45:45===h&&2==Rn(C)&&(m=0)}}return i}function rr(e,t,n,r,o,i,a,l,s,u,c){for(var d=o-1,p=0===o?i:[""],f=Mn(p),h=0,m=0,g=0;h<r;++h)for(var v=0,b=Nn(e,d+1,d=En(m=a[h])),y=e;v<f;++v)(y=wn(m>0?p[v]+" "+b:kn(b,/&\f/g,p[v])))&&(s[g++]=y);return Bn(e,t,n,0===o?yn:l,s,u,c)}function or(e,t,n){return Bn(e,t,n,bn,Cn($n),Nn(e,2,-2),0)}function ir(e,t,n,r){return Bn(e,t,n,xn,Nn(e,0,r),Nn(e,r+1,-1),r)}function ar(e,t){for(var n="",r=Mn(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function lr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xn:return e.return=e.return||e.value;case bn:return"";case _n:return e.return=e.value+"{"+ar(e.children,r)+"}";case yn:e.value=e.props.join(",")}return Rn(n=ar(e.children,r))?e.return=e.value+"{"+n+"}":""}function sr(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ur=function(e,t,n){for(var r=0,o=0;r=o,o=Wn(),38===r&&12===o&&(t[n]=1),!Yn(o);)jn();return Kn(e,Dn)},cr=function(e,t){return Vn(function(e,t){var n=-1,r=44;do{switch(Yn(r)){case 0:38===r&&12===Wn()&&(t[n]=1),e[n]+=ur(Dn-1,t,n);break;case 2:e[n]+=qn(r);break;case 4:if(44===r){e[++n]=58===Wn()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Cn(r)}}while(r=jn());return e}(Un(e),t))},dr=new WeakMap,pr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dr.get(n))&&!r){dr.set(e,!0);for(var o=[],i=cr(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var u=0;u<a.length;u++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[u]):a[u]+" "+i[l]}}},fr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},hr=function(e){return"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1},mr=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},gr=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},vr=function(e,t,n){mr(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),gr(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!mr(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),gr(e)))};function br(e,t){switch(function(e,t){return 45^An(e,0)?(((t<<2^An(e,0))<<2^An(e,1))<<2^An(e,2))<<2^An(e,3):0}(e,t)){case 5103:return vn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return vn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return vn+e+gn+e+mn+e+e;case 6828:case 4268:return vn+e+mn+e+e;case 6165:return vn+e+mn+"flex-"+e+e;case 5187:return vn+e+kn(e,/(\w+).+(:[^]+)/,vn+"box-$1$2"+mn+"flex-$1$2")+e;case 5443:return vn+e+mn+"flex-item-"+kn(e,/flex-|-self/,"")+e;case 4675:return vn+e+mn+"flex-line-pack"+kn(e,/align-content|flex-|-self/,"")+e;case 5548:return vn+e+mn+kn(e,"shrink","negative")+e;case 5292:return vn+e+mn+kn(e,"basis","preferred-size")+e;case 6060:return vn+"box-"+kn(e,"-grow","")+vn+e+mn+kn(e,"grow","positive")+e;case 4554:return vn+kn(e,/([^-])(transform)/g,"$1"+vn+"$2")+e;case 6187:return kn(kn(kn(e,/(zoom-|grab)/,vn+"$1"),/(image-set)/,vn+"$1"),e,"")+e;case 5495:case 3959:return kn(e,/(image-set\([^]*)/,vn+"$1$`$1");case 4968:return kn(kn(e,/(.+:)(flex-)?(.*)/,vn+"box-pack:$3"+mn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+vn+e+e;case 4095:case 3583:case 4068:case 2532:return kn(e,/(.+)-inline(.+)/,vn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rn(e)-1-t>6)switch(An(e,t+1)){case 109:if(45!==An(e,t+4))break;case 102:return kn(e,/(.+:)(.+)-([^]+)/,"$1"+vn+"$2-$3$1"+gn+(108==An(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tn(e,"stretch")?br(kn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==An(e,t+1))break;case 6444:switch(An(e,Rn(e)-3-(~Tn(e,"!important")&&10))){case 107:return kn(e,":",":"+vn)+e;case 101:return kn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+vn+(45===An(e,14)?"inline-":"")+"box$3$1"+vn+"$2$3$1"+mn+"$2box$3")+e}break;case 5936:switch(An(e,t+11)){case 114:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vn+e+mn+kn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return vn+e+mn+e+e}return e}var yr,xr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xn:e.return=br(e.value,e.length);break;case _n:return ar([Fn(e,{value:kn(e.value,"@","@"+vn)})],r);case yn:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ar([Fn(e,{props:[kn(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ar([Fn(e,{props:[kn(t,/:(plac\w+)/,":"+vn+"input-$1")]}),Fn(e,{props:[kn(t,/:(plac\w+)/,":-moz-$1")]}),Fn(e,{props:[kn(t,/:(plac\w+)/,mn+"input-$1")]})],r)}return""}))}}],_r=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;yr=function(e){var t=e.match(_r);if(t)return t[t.length-1]};var Er,Cr,Sr,wr,kr=function(e){var t=e.key;if(!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||xr;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var o,i,a={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var s=[pr,fr];s.push(function(e){return function(t,n,r){if("rule"===t.type&&!e.compat){var o=t.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var i=t.parent?t.parent.children:r,a=i.length-1;a>=0;a--){var l=i[a];if(l.line<t.line)break;if(l.column<t.column){if(hr(l))return;break}}o.forEach((function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')}))}}}}({get compat(){return p.compat}}),vr);var u,c=[lr,function(e){e.root||(e.return?u.insert(e.return):e.value&&e.type!==bn&&u.insert(e.value+"{}"))}],d=function(e){var t=Mn(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}(s.concat(r,c));i=function(e,t,n,r){if(u=n,yr){var o=yr(t.styles);o&&(u={insert:function(e){n.insert(e+o)}})}!function(e){ar(tr(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new hn({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(l),p},Tr={exports:{}},Ar={};function Nr(){return Cr||(Cr=1,Tr.exports=function(){if(Er)return Ar;Er=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case u:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case f:case a:return e;default:return p}}case n:return p}}}function x(e){return y(e)===u}return Ar.AsyncMode=s,Ar.ConcurrentMode=u,Ar.ContextConsumer=l,Ar.ContextProvider=a,Ar.Element=t,Ar.ForwardRef=c,Ar.Fragment=r,Ar.Lazy=h,Ar.Memo=f,Ar.Portal=n,Ar.Profiler=i,Ar.StrictMode=o,Ar.Suspense=d,Ar.isAsyncMode=function(e){return x(e)||y(e)===s},Ar.isConcurrentMode=x,Ar.isContextConsumer=function(e){return y(e)===l},Ar.isContextProvider=function(e){return y(e)===a},Ar.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ar.isForwardRef=function(e){return y(e)===c},Ar.isFragment=function(e){return y(e)===r},Ar.isLazy=function(e){return y(e)===h},Ar.isMemo=function(e){return y(e)===f},Ar.isPortal=function(e){return y(e)===n},Ar.isProfiler=function(e){return y(e)===i},Ar.isStrictMode=function(e){return y(e)===o},Ar.isSuspense=function(e){return y(e)===d},Ar.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Ar.typeOf=y,Ar}()),Tr.exports}!function(){if(wr)return Sr;wr=1;var e=Nr(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var a=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;Sr=function e(t,r,o){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,o)}var f=l(r);s&&(f=f.concat(s(r)));for(var h=i(t),m=i(r),g=0;g<f.length;++g){var v=f[g];if(!(n[v]||o&&o[v]||m&&m[v]||h&&h[v])){var b=u(r,v);try{a(t,v,b)}catch(e){}}}}return t}}();function Rr(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var Mr=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Lr=function(e,t,n){Mr(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Or={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ir="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Pr="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Dr=/[A-Z]|^ms/g,$r=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zr=function(e){return 45===e.charCodeAt(1)},Br=function(e){return null!=e&&"boolean"!=typeof e},Fr=sr((function(e){return zr(e)?e:e.replace(Dr,"-$&").toLowerCase()})),Hr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace($r,(function(e,t,n){return Qr={name:t,styles:n,next:Qr},t}))}return 1===Or[e]||zr(e)||"number"!=typeof t||0===t?t:t+"px"},jr=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Wr=["normal","none","initial","inherit","unset"],Gr=Hr,Kr=/^-ms-/,Yr=/-(.)/g,Ur={};Hr=function(e,t){if("content"===e&&("string"!=typeof t||-1===Wr.indexOf(t)&&!jr.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=Gr(e,t);return""===n||zr(e)||-1===e.indexOf("-")||void 0!==Ur[e]||(Ur[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(Kr,"ms-").replace(Yr,(function(e,t){return t.toUpperCase()}))+"?")),n};var Vr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function qr(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles){if("NO_COMPONENT_SELECTOR"===String(r))throw new Error(Vr);return r}switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Qr={name:o.name,styles:o.styles,next:Qr},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Qr={name:a.name,styles:a.styles,next:Qr},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=qr(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":Br(l)&&(r+=Fr(i)+":"+Hr(i,l)+";")}else{if("NO_COMPONENT_SELECTOR"===i)throw new Error(Vr);if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=qr(e,t,a);switch(i){case"animation":case"animationName":r+=Fr(i)+":"+s+";";break;default:"undefined"===i&&console.error(Pr),r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)Br(a[u])&&(r+=Fr(i)+":"+Hr(i,a[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=Qr,s=n(e);return Qr=l,qr(e,t,s)}console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":var u=[],c=n.replace($r,(function(e,t,n){var r="animation"+u.length;return u.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"}));u.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(u,["`"+c+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+c+"`")}var d=n;if(null==t)return d;var p=t[d];return void 0!==p?p:d}var Qr,Jr=/label:\s*([^\s;{]+)\s*(;|$)/g;function Xr(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Qr=void 0;var i=e[0];if(null==i||void 0===i.raw)r=!1,o+=qr(n,t,i);else{var a=i;void 0===a[0]&&console.error(Ir),o+=a[0]}for(var l=1;l<e.length;l++)if(o+=qr(n,t,e[l]),r){var s=i;void 0===s[l]&&console.error(Ir),o+=s[l]}Jr.lastIndex=0;for(var u,c="";null!==(u=Jr.exec(o));)c+="-"+u[1];var d=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:d,styles:o,next:Qr,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}}var Zr=!!v.useInsertionEffect&&v.useInsertionEffect,eo=Zr||function(e){return e()},to=Zr||v.useLayoutEffect,no=v.createContext("undefined"!=typeof HTMLElement?kr({key:"css"}):null);no.displayName="EmotionCacheContext";var ro=no.Provider,oo=function(e){return b((function(t,n){var r=y(no);return e(t,r,n)}))},io=v.createContext({});io.displayName="EmotionThemeContext";var ao={}.hasOwnProperty,lo=function(e){var t=e.split(".");return t[t.length-1]},so=function(e){var t=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(e);return t||(t=/^([A-Za-z0-9$.]+)@/.exec(e))?lo(t[1]):void 0},uo=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),co=function(e){return e.replace(/\$/g,"-")},po="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fo="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",ho=function(e,t){if("string"==typeof t.css&&-1!==t.css.indexOf(":"))throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+t.css+"`");var n={};for(var r in t)ao.call(t,r)&&(n[r]=t[r]);if(n[po]=e,"undefined"!=typeof globalThis&&globalThis.EMOTION_RUNTIME_AUTO_LABEL&&t.css&&("object"!=typeof t.css||!("name"in t.css)||"string"!=typeof t.css.name||-1===t.css.name.indexOf("-"))){var o=function(e){if(e)for(var t=e.split("\n"),n=0;n<t.length;n++){var r=so(t[n]);if(r){if(uo.has(r))break;if(/^[A-Z]/.test(r))return co(r)}}}((new Error).stack);o&&(n[fo]=o)}return n},mo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Mr(t,n,r),eo((function(){return Lr(t,n,r)})),null},go=oo((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[po],i=[r],a="";"string"==typeof e.className?a=Rr(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var l=Xr(i,void 0,v.useContext(io));if(-1===l.name.indexOf("-")){var s=e[fo];s&&(l=Xr([l,"label:"+s+";"]))}a+=t.key+"-"+l.name;var u={};for(var c in e)ao.call(e,c)&&"css"!==c&&c!==po&&c!==fo&&(u[c]=e[c]);return u.className=a,n&&(u.ref=n),v.createElement(v.Fragment,null,v.createElement(mo,{cache:t,serialized:l,isStringTag:"string"==typeof o}),v.createElement(o,u))}));go.displayName="EmotionCssPropInternal";var vo,bo,yo=go,xo=function(e,t){var n=arguments;if(null==t||!ao.call(t,"css"))return v.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=yo,o[1]=ho(e,t);for(var i=2;i<r;i++)o[i]=n[i];return v.createElement.apply(null,o)};vo=xo||(xo={}),bo||(bo=vo.JSX||(vo.JSX={}));var _o=!1,Eo=oo((function(e,t){!_o&&("className"in e&&e.className||"css"in e&&e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),_o=!0);var n=Xr([e.styles],void 0,v.useContext(io)),r=v.useRef();return to((function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}}),[t]),to((function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Lr(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}}),[t,n.name]),null}));function Co(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xr(t)}function So(){var e=Co.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}Eo.displayName="EmotionGlobal";var wo=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var l in void 0!==i.styles&&void 0!==i.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),a="",i)i[l]&&l&&(a&&(a+=" "),a+=l);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};var ko=function(e){var t=e.cache,n=e.serializedArr;return eo((function(){for(var e=0;e<n.length;e++)Lr(t,n[e],!1)})),null},To=oo((function(e,t){var n=!1,r=[],o=function(){if(n)throw new Error("css can only be used during render");for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var a=Xr(o,t.registered);return r.push(a),Mr(t,a,!1),t.key+"-"+a.name},i={css:o,cx:function(){if(n)throw new Error("cx can only be used during render");for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return function(e,t,n){var r=[],o=Rr(e,r,n);return r.length<2?n:o+t(r)}(t.registered,o,wo(r))},theme:v.useContext(io)},a=e.children(i);return n=!0,v.createElement(v.Fragment,null,v.createElement(ko,{cache:t,serializedArr:r}),a)}));To.displayName="EmotionClassNames";var Ao="undefined"!=typeof document,No="undefined"!=typeof jest||"undefined"!=typeof vi;if(Ao&&!No){var Ro="undefined"!=typeof globalThis?globalThis:Ao?window:global,Mo="__EMOTION_REACT_"+"11.14.0".split(".")[0]+"__";Ro[Mo]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Ro[Mo]=!0}var Lo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Oo=sr((function(e){return Lo.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Io=function(e){return"theme"!==e},Po=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Oo:Io},Do=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},$o="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",zo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Mr(t,n,r),eo((function(){return Lr(t,n,r)})),null},Bo=function e(t,n){if(void 0===t)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Do(t,n,i),s=l||Po(a),u=!s("as");return function(){var c=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==c[0]||void 0===c[0].raw)d.push.apply(d,c);else{var p=c[0];void 0===p[0]&&console.error($o),d.push(p[0]);for(var f=c.length,h=1;h<f;h++)void 0===p[h]&&console.error($o),d.push(c[h],p[h])}var m=oo((function(e,t,n){var r=u&&e.as||a,i="",c=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=v.useContext(io)}"string"==typeof e.className?i=Rr(t.registered,c,e.className):null!=e.className&&(i=e.className+" ");var h=Xr(d.concat(c),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var m=u&&void 0===l?Po(r):s,g={};for(var b in e)u&&"as"===b||m(b)&&(g[b]=e[b]);return g.className=i,n&&(g.ref=n),v.createElement(v.Fragment,null,v.createElement(zo,{cache:t,serialized:h,isStringTag:"string"==typeof r}),v.createElement(r,g))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=l,Object.defineProperty(m,"toString",{value:function(){return void 0===o?"NO_COMPONENT_SELECTOR":"."+o}}),m.withComponent=function(t,r){return e(t,pn({},n,r,{shouldForwardProp:Do(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Bo[e]=Bo(e)}));var Fo,Ho,jo={exports:{}},Wo={};var Go=(Ho||(Ho=1,jo.exports=function(){if(Fo)return Wo;Fo=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var l,s={},u=null,c=null;for(l in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,l)&&!i.hasOwnProperty(l)&&(s[l]=n[l]);if(e&&e.defaultProps)for(l in n=e.defaultProps)void 0===s[l]&&(s[l]=n[l]);return{$$typeof:t,type:e,key:u,ref:c,props:s,_owner:o.current}}return Wo.Fragment=n,Wo.jsx=a,Wo.jsxs=a,Wo}()),jo.exports);let Ko;function Yo(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Go.jsx(Eo,{styles:r})}
8
8
  /**
9
9
  * @mui/styled-engine v5.16.14
10
10
  *