1var Hc=Object.defineProperty;var Vc=(n,t,e)=>t in n?Hc(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var T=(n,t,e)=>Vc(n,typeof t!="symbol"?t+"":t,e);import{j as N,a as L,r as Er,R as Qt}from"./RenderReact-D01794dB.js";import{u as Oa,L as Gc,B as J,Y as qc,V as Yc,a as Zc,T as Xc,b as Qc,P as eu,c as tu,d as nu,e as ru,f as iu,g as su,h as ou,i as au,O as lu,M as cu,j as uu,k as du,H as fu,G as gu,E as hu,C as pu,l as mu,m as _u,n as yu,o as bu,p as xu,q as Su}from"./YoutubeFields-DpXDgUUp.js";import{d as Ks}from"./dayjs.min-DGvHojZV.js";import{T as Js,U as vu,V as Hs,W as Cu,X as wu}from"./index-BrgB-2s_.js";import{c as La}from"./clsx-B7rjN5bm.js";import{I as Ee}from"./iconify-DOvuEbFR.js";import{c as vt}from"./refreshPreview-BuhiaIfi.js";import{L as Eu}from"./index-BVSdvhK8.js";import{u as Tu,C as ku}from"./CurrentSiteIdContext-MK8CVTxU.js";import{C as Nu}from"./ConfigTanstackQuery-vtCUV_at.js";import{g as Au,C as Fu}from"./getAuthenticityToken-CMfMkA-b.js";import{A as Ou}from"./index-CFcgNnu0.js";import{i as Vs}from"./inflection-CWKxl8AH.js";import{a as Lu,b as Ru,c as Iu}from"./config-DVYdRYYy.js";import"./index.prod-DA3Fci0A.js";import"./formik.esm-DBS4aoCG.js";import"./isEmpty-DlXo6s1t.js";import"./index.esm-BxfKy9L_.js";import"./JsErb-DabgBzwQ.js";import"./findPropertyMatch-Ch7iOhxA.js";import"./find-C0QuYxBI.js";import"./index-DVSp3ZRh.js";import"./_arrayEach-DpGxo2Of.js";import"./isObjectLike-nLWjQ9zq.js";import"./index-B6jTVFj0.js";import"./capitalize-N_VoQO5C.js";import"./_stringToArray-siYPoHCM.js";import"./index-4eUNG4Ql.js";import"./List-C5v-5Z_d.js";import"./index-BojVbZw0.js";import"./index-5X5g4BrD.js";import"./bundle.esm-CW22UBVJ.js";import"./MediaFilesApi-DUyjsAkq.js";import"./usePicture-LJLoIKae.js";import"./unsplash-js.esm-DJDHqe3T.js";import"./index-Dm56dulf.js";import"./index-D_yd_HrL.js";import"./usePictures-2GRCkcSR.js";import"./index-C9qlR54Q.js";import"./TileGrid-ubL13F6Z.js";import"./index-CXT21DDF.js";import"./times-D-RpD31p.js";import"./_castFunction-8GbB0kW9.js";function Mu({block:n,onUpdate:t}){const{setValue:e,getValues:r,register:i}=Oa({block:n,onUpdate:t,debouncedFields:["filters","orders","highlight_authors"]}),s=o=>{e("limit_count",o)};return N.jsxs("div",{children:[N.jsx("div",{className:"text-sm font-bold mb-2",children:"Limit Count"}),N.jsx(Gc,{limitCount:r("limit_count"),onUpdate:s})]})}const Ra=L.createContext(null);function Du(n,t){let e=null;return{getTheme:function(){return t??(e!=null?e.getTheme():null)}}}function Be(){const n=L.useContext(Ra);return n==null&&function(t,...e){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const s of e)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n}function O(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Ia(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);e.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ue=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Pu=Ue&&"documentMode"in document?document.documentMode:null,Pe=Ue&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ft=Ue&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Tr=!(!Ue||!("InputEvent"in window)||Pu)&&"getTargetRanges"in new window.InputEvent("input"),Gn=Ue&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),pn=Ue&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,$u=Ue&&/Android/.test(navigator.userAgent),Ma=Ue&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Gs=Ue&&$u&&Ma,qn=Ue&&/AppleWeb
1Kit\/[\d.]+/.test(navigator.userAgent)&&Pe&&!Ma;function Da(...n){const t=[];for(const e of n)if(e&&typeof e=="string")for(const[r]of e.matchAll(/\S+/g))t.push(r);return t}const zu=0,Bu=1,Uu=2,Pa=128,Wu=1,ju=2,Ku=3,Ju=4,Hu=5,Vu=6,jr=Gn||pn||qn?"Â ":"â",pt=` 2 3`,Gu=Ft?"Â ":jr,Ce={bold:1,capitalize:1024,code:16,highlight:Pa,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},qu={directionless:1,unmergeable:2},qs={center:2,end:6,justify:4,left:1,right:3,start:5},Yu={[ju]:"center",[Vu]:"end",[Ju]:"justify",[Wu]:"left",[Ku]:"right",[Hu]:"start"},Zu={normal:0,segmented:2,token:1},Xu={[zu]:"normal",[Uu]:"segmented",[Bu]:"token"},Ys="$config";function $a(n,t,e,r,i,s){let o=n.getFirstChild();for(;o!==null;){const a=o.__key;o.__parent===t&&(k(o)&&$a(o,a,e,r,i,s),e.has(a)||s.delete(a),i.push(a)),o=o.getNextSibling()}}let Ni=!1,cs=0;function Qu(n){cs=n.timeStamp}function si(n,t,e){const r=n.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Qr(n,e)!==void 0}function ed(n,t,e){const r=De(Me(e));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&Ts(t,o,i,s,!1)}function td(n,t,e){if(F(n)){const r=n.anchor.getNode();if(r.is(e)&&n.format!==r.getFormat())return!1}return at(t)&&e.isAttached()}function nd(n,t,e,r){for(let i=n;i&&!lf(i);i=er(i)){const s=Qr(i,t);if(s!==void 0){const o=oe(s,e);if(o)return K(o)||!X(i)?void 0:[i,o]}else if(i===r)return[r,Jl(e)]}}function za(n,t,e){Ni=!0;const r=performance.now()-cs>100;try{Ve(n,()=>{const i=R()||function(f){return f.getEditorState().read(()=>{const p=R();return p!==null?p.clone():null})}(n),s=new Map,o=n.getRootElement(),a=n._editorState,l=n._blockCursorElement;let c=!1,u="";for(let f=0;f<t.length;f++){const p=t[f],g=p.type,m=p.target,_=nd(m,n,a,o);if(!_)continue;const[b,h]=_;if(g==="characterData")r&&I(h)&&at(m)&&td(i,m,h)&&ed(m,h,n);else if(g==="childList"){c=!0;const y=p.addedNodes;for(let x=0;x<y.length;x++){const C=y[x],E=jl(C),v=C.parentNode;if(v!=null&&C!==l&&E===null&&!si(C,v,n)){if(Ft){const A=(X(C)?C.innerText:null)||C.nodeValue;A&&(u+=A)}v.removeChild(C)}}const S=p.removedNodes,w=S.length;if(w>0){let x=0;for(let C=0;C<w;C++){const E=S[C];(si(E,m,n)||l===E)&&(m.appendChild(E),x++)}w!==x&&s.set(b,h)}}}if(s.size>0)for(const[f,p]of s)p.reconcileObservedMutation(f,n);const d=e.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const p=d[f],g=p.addedNodes,m=p.target;for(let _=0;_<g.length;_++){const b=g[_],h=b.parentNode;h==null||b.nodeName!=="BR"||si(b,m,n)||h.removeChild(b)}}e.takeRecords()}i!==null&&(c&&xe(i),Ft&&ql(n)&&i.insertRawText(u))})}finally{Ni=!1}}function Ba(n){const t=n._observer;t!==null&&za(n,t.takeRecords(),t)}function Ua(n){(function(t){cs===0&&Me(t).addEventListener("textInput",Qu,!0)})(n),n._observer=new MutationObserver((t,e)=>{za(n,t,e)})}function rd(n){const t=new Map,e=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=ti(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&e.add(o.key)):o=s,t.set(o.key,o)}}return{flatKeys:e,sharedConfigMap:t}}let id=class Wa{constructor(t,e,r=void 0,i=new Map,s=void 0){T(this,"node");T(this,"knownState");T(this,"unknownState");T(this,"sharedNodeState");T(this,"size");this.node=t,this.sharedNodeState=e,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,a=s!==void 0?s:function(l,c,u){let d=u.size;if(c)for(const f in c){const p=l.get(f);p&&u.has(p)||d++}return d}(o,r,i);this.size=a}getValue(t){const e=this.knownState.get(t);if(e!==void 0)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(e[r]=t[r],delete t[r]);return Zs(t)&&(e.$=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:r}=this,i=new Map(this.knownState);return new Wa(t,e,function(s,o,a){let l;if(a)for(const[c,u]of Object.entries(a)){const d=s.get(c);d?o.has(d)||o.set(d,d.parse(u)):(l=l||{},l[c]=u)}return l}(e.sharedConfigMap,i,r),i,this.size)}updateFromKnown(t,e){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:s}=this;i.has(t)||s&&r in s||(s&&(delete s[r],this.unknownState=Zs(s)),this.size++),i.set(t,e)}updateFromUnknown(t,e){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const r of e.keys())e.set(r,r.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function sd(n){const t=n.getWritable(),e=t.__state?t.__state.getWritable(t):new id(t,ja(t));return t.__state=e,e}function ja(n){return n.__state?n.__state.sharedNodeState:zl(tr(),n.getType()).sharedNodeState}function Zs(n){if(n)for(const t in n)return n}function Xs(n,t,e){for(const[r,i]of t.knownState){if(n.has(r.key))continue;n.add(r.key);const s=e?e.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function Qs(n,t,e){const{unknownState:r}=t,i=e?e.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!n.has(s)&&(n.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function eo(n,t){const e=n.__state;return e&&e.node===n?e.getWritable(t):e}function to(n,t){const e=n.__mode,r=n.__format,i=n.__style,s=t.__mode,o=t.__format,a=t.__style,l=n.__state,c=t.__state;return(e===null||e===s)&&(r===null||r===o)&&(i===null||i===a)&&(n.__state===null||l===c||function(u,d){if(u===d)return!0;
3if(u&&d&&u.size!==d.size)return!1;const f=new Set;return!(u&&Xs(f,u,d)||d&&Xs(f,d,u)||u&&Qs(f,u,d)||d&&Qs(f,d,u))}(l,c))}function no(n,t){const e=n.mergeWithSibling(t),r=q()._normalizedNodes;return r.add(n.__key),r.add(t.__key),e}function ro(n){let t,e,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&I(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(to(t,r)){r=no(t,r);break}break}t.remove()}for(;(e=r.getNextSibling())!==null&&I(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(to(r,e)){r=no(r,e);break}break}e.remove()}}else r.remove()}function dn(n){return io(n.anchor),io(n.focus),n}function io(n){for(;n.type==="element";){const t=n.getNode(),e=n.offset;let r,i;if(e===t.getChildrenSize()?(r=t.getChildAtIndex(e-1),i=!0):(r=t.getChildAtIndex(e),i=!1),I(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!k(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Ot,ye,Bn,Kr,Ai,Fi,Lt,$e,Oi,Un,se="",Ke=null,Ct=null,tt="",Yt=!1,kr=!1;function Nr(n,t){const e=Lt.get(n);if(t!==null){const r=Mi(n);r.parentNode===t&&t.removeChild(r)}if($e.has(n)||ye._keyToDOMMap.delete(n),k(e)){const r=Fr(e,Lt);Li(r,0,r.length-1,null)}e!==void 0&&ks(Un,Bn,Kr,e,"destroyed")}function Li(n,t,e,r){let i=t;for(;i<=e;++i){const s=n[i];s!==void 0&&Nr(s,r)}}function St(n,t){n.setProperty("text-align",t)}const od="40px";function Ka(n,t){const e=Ot.theme.indent;if(typeof e=="string"){const i=n.classList.contains(e);t>0&&!i?n.classList.add(e):t<1&&i&&n.classList.remove(e)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||od;n.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Ja(n,t){const e=n.style;t===0?St(e,""):t===1?St(e,"left"):t===2?St(e,"center"):t===3?St(e,"right"):t===4?St(e,"justify"):t===5?St(e,"start"):t===6&&St(e,"end")}function Ri(n,t){const e=function(r){const i=r.__dir;if(i!==null)return i;if(re(r))return null;const s=r.getParentOrThrow();return re(s)&&s.__dir===null?"auto":null}(t);e!==null?n.dir=e:n.removeAttribute("dir")}function Ar(n,t){const e=$e.get(n);e===void 0&&O(60);const r=e.createDOM(Ot,ye);if(function(i,s,o){const a=o._keyToDOMMap;(function(l,c,u){const d=`__lexicalKey_${c._key}`;l[d]=u})(s,o,i),a.set(i,s)}(n,r,ye),I(e)?r.setAttribute("data-lexical-text","true"):K(e)&&r.setAttribute("data-lexical-decorator","true"),k(e)){const i=e.__indent,s=e.__size;if(Ri(r,e),i!==0&&Ka(r,i),s!==0){const a=s-1;Ii(Fr(e,$e),e,0,a,e.getDOMSlot(r))}const o=e.__format;o!==0&&Ja(r,o),e.isInline()||Ha(null,e,r),ei(e)&&(se+=pt,tt+=pt)}else{const i=e.getTextContent();if(K(e)){const s=e.decorate(ye,Ot);s!==null&&Va(n,s),r.contentEditable="false"}se+=i,tt+=i}return t!==null&&t.insertChild(r),ks(Un,Bn,Kr,e,"created"),r}function Ii(n,t,e,r,i){const s=se;se="";let o=e;for(;o<=r;++o){Ar(n[o],i);
3const a=$e.get(n[o]);a!==null&&I(a)&&Ke===null&&(Ke=a.getFormat(),Ct=a.getStyle())}ei(t)&&(se+=pt),i.element.__lexicalTextContent=se,se=s+se}function so(n,t){if(n){const e=n.__last;if(e){const r=t.get(e);if(r)return it(r)?"line-break":K(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Ha(n,t,e){const r=so(n,Lt),i=so(t,$e);r!==i&&t.getDOMSlot(e).setManagedLineBreak(i)}function ad(n,t,e){var r;Ke=null,Ct=null,function(i,s,o){const a=se,l=i.__size,c=s.__size;se="";const u=o.element;if(l===1&&c===1){const d=i.__first,f=s.__first;if(d===f)Fn(d,u);else{const g=Mi(d),m=Ar(f,null);try{u.replaceChild(m,g)}catch(_){if(typeof _=="object"&&_!=null){const b=`${_.toString()} Parent: ${u.tagName}, new child: {tag: ${m.tagName} key: ${f}}, old child: {tag: ${g.tagName}, key: ${d}}.`;throw new Error(b)}throw _}Nr(d,null)}const p=$e.get(f);I(p)&&Ke===null&&(Ke=p.getFormat(),Ct=p.getStyle())}else{const d=Fr(i,Lt),f=Fr(s,$e);if(d.length!==l&&O(227),f.length!==c&&O(228),l===0)c!==0&&Ii(f,s,0,c-1,o);else if(c===0){if(l!==0){const p=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;Li(d,0,l-1,p?null:u),p&&(u.textContent="")}}else(function(p,g,m,_,b,h){const y=_-1,S=b-1;let w,x,C=h.getFirstChild(),E=0,v=0;for(;E<=y&&v<=S;){const B=g[E],P=m[v];if(B===P)C=oi(Fn(P,h.element)),E++,v++;else{w===void 0&&(w=new Set(g)),x===void 0&&(x=new Set(m));const j=x.has(B),Q=w.has(P);if(j)if(Q){const ae=It(ye,P);ae===C?C=oi(Fn(P,h.element)):(h.withBefore(C).insertChild(ae),Fn(P,h.element)),E++,v++}else Ar(P,h.withBefore(C)),v++;else C=oi(Mi(B)),Nr(B,h.element),E++}const z=$e.get(P);z!==null&&I(z)&&Ke===null&&(Ke=z.getFormat(),Ct=z.getStyle())}const A=E>y,M=v>S;if(A&&!M){const B=m[S+1],P=B===void 0?null:ye.getElementByKey(B);Ii(m,p,v,S,h.withBefore(P))}else M&&!A&&Li(g,E,y,h.element)})(s,d,f,l,c,o)}ei(s)&&(se+=pt),u.__lexicalTextContent=se,se=a+se}(n,t,t.getDOMSlot(e)),r=t,Ke==null||Ke===r.__textFormat||kr||r.setTextFormat(Ke),function(i){Ct==null||Ct===i.__textStyle||kr||i.setTextStyle(Ct)}(t)}function Fr(n,t){const e=[];let r=n.__first;for(;r!==null;){const i=t.get(r);i===void 0&&O(101),e.push(r),r=i.__next}return e}function Fn(n,t){const e=Lt.get(n);let r=$e.get(n);e!==void 0&&r!==void 0||O(61);const i=Yt||Fi.has(n)||Ai.has(n),s=It(ye,n);if(e===r&&!i){if(k(e)){const o=s.__lexicalTextContent;o!==void 0&&(se+=o,tt+=o)}else{const o=e.getTextContent();tt+=o,se+=o}return s}if(e!==r&&i&&ks(Un,Bn,Kr,r,"updated"),r.updateDOM(e,s,Ot)){const o=Ar(n,null);return t===null&&O(62),t.replaceChild(o,s),Nr(n,null),o}if(k(e)&&k(r)){const o=r.__indent;(Yt||o!==e.__indent)&&Ka(s,o);const a=r.__format;if((Yt||a!==e.__format)&&Ja(s,a),i&&(ad(e,r,s),re(r)||r.isInline()||Ha(e,r,s)),ei(r)&&(se+=pt,tt+=pt),(Yt||r.__dir!==e.__dir)&&(Ri(s,r),re(r)&&!Yt))for(const l of r.getChildren())k(l)&&Ri(It(ye,l.getKey()),l)}else{const o=r.getTextContent();if(K(r)){const a=r.decorate(ye,Ot);a!==null&&Va(n,a)}se+=o,tt+=o}if(!kr&&re(r)&&r.__cachedText!==tt){const o=r.getWritable();o.__cachedText=tt,r=o}return s}function Va(n,t){let e=ye._pendingDecorators;const r=ye._decorators;if(e===null){if(r[n]===t)return;e=Kl(ye)}e[n]=t}function oi(n){let t=n.nextSibling;return t!==null&&t===ye._blockCursorElement&&(t=t.nextSibling),t}function ld(n,t,e,r,i,s){se="",tt="",Yt=r===2,ye=e,Ot=e._config,Bn=e._nodes,Kr=ye._listeners.mutation,Ai=i,Fi=s,Lt=n._nodeMap,$e=t._nodeMap,kr=t._readOnly,Oi=new Map(e._keyToDOMMap);const o=new Map;return Un=o,Fn("root",null),ye=void 0,Bn=void 0,Ai=void 0,Fi=void 0,Lt=void 0,$e=void 0,Ot=void 0,Oi=void 0,Un=void 0,o}function Mi(n){const t=Oi.get(n);return t===void 0&&O(75,n),t}function $(n){return{type:n}}const Yn=$("SELECTION_CHANGE_COMMAND"),cd=$("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),us=$("CLICK_COMMAND"),Ga=$("BEFORE_INPUT_COMMAND"),qa=$("INPUT_COMMAND"),Ya=$("COMPOSITION_START_COMMAND"),Za=$("COMPOSITION_END_COMMAND"),Et=$("DELETE_CHARACTER_COMMAND"),rn=$("INSERT_LINE_BREAK_COMMAND"),Wn=$("INSERT_PARAGRAPH_COMMAND"),sn=$("CONTROLLED_TEXT_INSERTION_COMMAND"),Jr=$("PASTE_COMMAND"),Di=$("REMOVE_TEXT_COMMAND"),jn=$("DELETE_WORD_COMMAND"),Kn=$("DELETE_LINE_COMMAND"),He=$("FORMAT_TEXT_COMMAND"),Hr=$("UNDO_COMMAND"),Vr=$("REDO_COMMAND"),Xa=$("KEYDOWN_COMMAND"),Qa=$("KEY_ARROW_RIGHT_COMMAND"),ud=$("MOVE_TO_END"),el=$("KEY_ARROW_LEFT_COMMAND"),dd=$("MOVE_TO_START"),tl=$("KEY_ARROW_UP_COMMAND"),nl=$("KEY_ARROW_DOWN_COMMAND"),Or=$("KEY_ENTER_COMMAND"),rl=$("KEY_SPACE_COMMAND"),il=$("KEY_BACKSPACE_COMMAND"),ds=$("KEY_ESCAPE_COMMAND"),sl=$("KEY_DELETE_COMMAND"),ol=$("KEY_TAB_COMMAND"),fd=$("INSERT_TAB_COMMAND"),gd=$("INDENT_CONTENT_COMMAND"),oo=$("OUTDENT_CONTENT_COMMAND"),al=$("DROP_COMMAND"),ll=$("FORMAT_ELEMENT_COMMAND"),cl=$("DRAGSTART_COMMAND"),ul=$("DRAGOVER_COMMAND"),hd=$("DRAGEND_COMMAND"),Gr=$("COPY_COMMAND"),fs=$("CUT_COMMAND"),Pi=$("SELECT_ALL_COMMAND"),pd=$("CLEAR_EDITOR_COMMAND"),md=$("CLEAR_HISTORY_COMMAND"),On=$("CAN_REDO_COMMAND"),Ln=$("CAN_UNDO_COMMAND"),dl=$("FOCUS_COMMAND"),fl=$("BLUR_COMMAND"),_d=$("KEY_MODIFIER_COMMAND"),Ze=Object.freeze({}),$i=[["keydown",function(n,t){Jn=n.timeStamp,gl=n.key,!t.isComposing()&&D(t,Xa,n)}],["pointerdown",function(n,t){const e=n.target,r=n.pointerType;Sn(e)&&r!=="touch"&&r!=="pen"&&n.button===0&&Ve(t,()=>{Bl(e)||(Ui=!0)})}],["compositionstart",function(n,t){D(t,Ya,n)}],["compositionend",function(n,t){Ft?Rn=!0:pn||!Gn&&!qn?D(t,Za,n):(Wi=!0,ji=n.data)}],["input",function(n,t){n.stopPropagation(),Ve(t,()=>{t.dispatchCommand(qa,n)},{event:n}),Zt=null}],["click",function(n,t){Ve(t,()=>{const e=R(),r=De(Me(t)),i=Wt();if(r){if(F(e)){const s=e.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&e.isCollapsed()&&!re(o)&&te().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&e.is(i))r.removeAllRanges(),e.dirty=!0;else if(n.detail===3&&!e.isCollapsed()&&o!==e.focus.getNode()){const a=fe(o,l=>k(l)&&!l.isInline());k(a)&&a.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const s=r.anchorNode;(X(s)||at(s))&&xe(hs(i,r,t,n))}}D(t,us,n)})}],["cut",Ze],["copy",Ze],["dragstart",Ze],["dragover",Ze],["dragend",Ze],["paste",Ze],["focus",Ze],["blur",Ze],["drop",Ze]];Tr&&$i.push(["beforeinput",(n,t)=>function(e,r){const i=e.inputType;i==="deleteCompositionText"||Ft&&ql(r)||i!=="insertCompositionText"&&D(r,Ga,e)}(n,t)]);let Jn=0,gl=null,hl=0,Zt=null;const zi=new WeakMap,Lr=new WeakMap;let Bi=!1,Ui=!1,Mn=!1,Rn=!1,Wi=!1,ji="",wt=null,pl=[0,"",0,"root",0];function ml(n,t,e,r,i){const s=n.anchor,o=n.focus,a=s.getNode(),l=q(),c=De(Me(l)),u=c!==null?c.anchorNode:null,d=s.key,f=l.getElementByKey(d),p=e.length;return d!==o.key||!I(a)||(!i&&(!Tr||hl<r+50)||a.isDirty()&&p<2||Hl(e))&&s.offset!==o.offset&&!a.isComposing()||et(a)||a.isDirty()&&p>1||(i||!Tr)&&f!==null&&!a.isComposing()&&u!==fn(f)||c!==null&&t!==null&&(!t.collapsed||t.startContainer!==c.anch
3orNode||t.startOffset!==c.anchorOffset)||a.getFormat()!==n.format||a.getStyle()!==n.style||function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const _=g.anchor.offset,b=m.getParentOrThrow(),h=kt(m);return _===0?!m.canInsertTextBefore()||!b.canInsertTextBefore()&&!m.isComposing()||h||function(y){const S=y.getPreviousSibling();return(I(S)||k(S)&&S.isInline())&&!S.canInsertTextAfter()}(m):_===m.getTextContentSize()&&(!m.canInsertTextAfter()||!b.canInsertTextAfter()&&!m.isComposing()||h)}(n,a)}function ao(n,t){return at(n)&&n.nodeValue!==null&&t!==0&&t!==n.nodeValue.length}function lo(n,t,e){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;Bi&&(Bi=!1,ao(r,i)&&ao(s,o)&&!wt)||Ve(t,()=>{if(!e)return void xe(null);if(!Qn(t,r,s))return;let a=R();if(wt&&F(a)&&a.isCollapsed()){const l=a.anchor,c=wt.anchor;(l.key===c.key&&l.offset===c.offset+1||l.offset===1&&c.getNode().is(l.getNode().getPreviousSibling()))&&(a=wt.clone(),xe(a))}if(wt=null,F(a)){const l=a.anchor,c=l.getNode();if(a.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(a.dirty=!0);const u=Me(t).event,d=u?u.timeStamp:performance.now(),[f,p,g,m,_]=pl,b=te(),h=t.isComposing()===!1&&b.getTextContent()==="";if(d<_+200&&l.offset===g&&l.key===m)xr(a,f,p);else if(l.type==="text")I(c)||O(141),_l(a,c);else if(l.type==="element"&&!h){k(c)||O(259);const y=l.getNode();y.isEmpty()?function(S,w){const x=w.getTextFormat(),C=w.getTextStyle();xr(S,x,C)}(a,y):xr(a,0,"")}}else{const u=l.key,d=a.focus.key,f=a.getNodes(),p=f.length,g=a.isBackward(),m=g?o:i,_=g?i:o,b=g?d:u,h=g?u:d;let y=2047,S=!1;for(let w=0;w<p;w++){const x=f[w],C=x.getTextContentSize();if(I(x)&&C!==0&&!(w===0&&x.__key===b&&m===C||w===p-1&&x.__key===h&&_===0)&&(S=!0,y&=x.getFormat(),y===0))break}a.format=S?y:0}}D(t,Yn,void 0)})}function xr(n,t,e){n.format===t&&n.style===e||(n.format=t,n.style=e,n.dirty=!0)}function _l(n,t){xr(n,t.getFormat(),t.getStyle())}function yl(n){if(!n.getTargetRanges)return null;const t=n.getTargetRanges();return t.length===0?null:t[0]}function yd(n){const t=n.inputType,e=yl(n),r=q(),i=R();if(t==="deleteContentBackward"){if(i===null){const d=Wt();if(!F(d))return!0;xe(d.clone())}if(F(i)){const d=i.anchor.key===i.focus.key;if(s=n.timeStamp,gl==="MediaLast"&&s<Jn+30&&r.isComposing()&&d){if(pe(null),Jn=0,setTimeout(()=>{Ve(r,()=>{pe(null)})},30),F(i)){const f=i.anchor.getNode();f.markDirty(),I(f)||O(142),_l(i,f)}}else{pe(null),n.preventDefault();const f=i.anchor.getNode(),p=f.getTextContent(),g=f.canInsertTextAfter(),m=i.anchor.offset===0&&i.focus.offset===p.length;let _=Gs&&d&&!m&&g;if(_&&i.isCollapsed()&&(_=!K(qi(i.anchor,!0))),!_){D(r,Et,!0);const b=R();Gs&&F(b)&&b.isCollapsed()&&(wt=b,setTimeout(()=>wt=null))}}return!0}}var s;if(!F(i))return!0;const o=n.data;Zt!==null&&Es(!1,r,Zt),i.dirty&&Zt===null||!i.isCollapsed()||re(i.anchor.getNode())||e===null||i.applyDOMRange(e),Zt=null;const a=i.anchor,l=i.focus,c=a.getNode(),u=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(o===` 4`)n.preventDefault(),D(r,rn,!1);else if(o===pt)n.preventDefault(),D(r,Wn,void 0);else if(o==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(d)}else o!=null&&ml(i,e,o,n.timeStamp,!0)?(n.preventDefault(),D(r,sn,o)):Zt=o;return hl=n.timeStamp,!0}switch(n.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":D(r,sn,n);break;case"insertFromComposition":pe(null),D(r,sn,n);break;case"insertLineBreak":pe(null),D(r,rn,!1);break;case"insertParagraph":pe(null),Mn&&!pn?(Mn=!1,D(r,rn,!1)):D(r,Wn,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":D(r,Jr,n);break;case"deleteByComposition":(function(d,f){return d!==f||k(d)||k(f)||!kt(d)||!kt(f)})(c,u)&&D(r,Di,n);break;case"deleteByDrag":case"deleteByCut":D(r,Di,n);break;case"deleteContent":D(r,Et,!1);break;case"deleteWordBackward":D(r,jn,!0);break;
4case"deleteWordForward":D(r,jn,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":D(r,Kn,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":D(r,Kn,!1);break;case"formatStrikeThrough":D(r,He,"strikethrough");break;case"formatBold":D(r,He,"bold");break;case"formatItalic":D(r,He,"italic");break;case"formatUnderline":D(r,He,"underline");break;case"historyUndo":D(r,Hr,void 0);break;case"historyRedo":D(r,Vr,void 0)}return!0}function bd(n){if(X(n.target)&&Bl(n.target))return!0;const t=q(),e=R(),r=n.data,i=yl(n);if(r!=null&&F(e)&&ml(e,i,r,n.timeStamp,!1)){Rn&&(Rr(t,r),Rn=!1);const s=e.anchor.getNode(),o=De(Me(t));if(o===null)return!0;const a=e.isBackward(),l=a?e.anchor.offset:e.focus.offset,c=a?e.focus.offset:e.anchor.offset;Tr&&!e.isCollapsed()&&I(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,l)+r+s.getTextContent().slice(l+c)===Gl(o.anchorNode)||D(t,sn,r);const u=r.length;Ft&&u>1&&n.inputType==="insertCompositionText"&&!t.isComposing()&&(e.anchor.offset-=u),Gn||pn||qn||!t.isComposing()||(Jn=0,pe(null))}else Es(!1,t,r!==null?r:void 0),Rn&&(Rr(t,r||void 0),Rn=!1);return function(){he();const s=q();Ba(s)}(),!0}function xd(n){const t=q(),e=R();if(F(e)&&!t.isComposing()){const r=e.anchor,i=e.anchor.getNode();pe(r.key),(n.timeStamp<Jn+30||r.type==="element"||!e.isCollapsed()||i.getFormat()!==e.format||I(i)&&i.getStyle()!==e.style)&&D(t,sn,Gu)}return!0}function Sd(n){return Rr(q(),n.data),!0}function Rr(n,t){const e=n._compositionKey;if(pe(null),e!==null&&t!=null){if(t===""){const r=oe(e),i=fn(n.getElementByKey(e));return void(i!==null&&i.nodeValue!==null&&I(r)&&Ts(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===` 5`){const r=R();if(F(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void D(n,Or,null)}}}Es(!0,n,t)}function vd(n){const t=q();if(n.key==null)return!0;if(Wi&&Mo(n))return Ve(t,()=>{Rr(t,ji)}),Wi=!1,ji="",!0;if(function(e){return G(e,"ArrowRight",{shiftKey:"any"})}(n))D(t,Qa,n);else if(function(e){return G(e,"ArrowRight",Qe)}(n))D(t,ud,n);else if(function(e){return G(e,"ArrowLeft",{shiftKey:"any"})}(n))D(t,el,n);else if(function(e){return G(e,"ArrowLeft",Qe)}(n))D(t,dd,n);else if(function(e){return G(e,"ArrowUp",{altKey:"any",shiftKey:"any"})}(n))D(t,tl,n);else if(function(e){return G(e,"ArrowDown",{altKey:"any",shiftKey:"any"})}(n))D(t,nl,n);else if(function(e){return G(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(n))Mn=!0,D(t,Or,n);else if(function(e){return e.key===" "}(n))D(t,rl,n);else if(function(e){return Pe&&G(e,"o",{ctrlKey:!0})}(n))n.preventDefault(),Mn=!0,D(t,rn,!0);else if(function(e){return G(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(n))Mn=!1,D(t,Or,n);else if(function(e){return G(e,"Backspace",{shiftKey:"any"})||Pe&&G(e,"h",{ctrlKey:!0})}(n))Mo(n)?D(t,il,n):(n.preventDefault(),D(t,Et,!0));else if(function(e){return e.key==="Escape"}(n))D(t,ds,n);else if(function(e){return G(e,"Delete",{})||Pe&&G(e,"d",{ctrlKey:!0})}(n))(function(e){return e.key==="Delete"})(n)?D(t,sl,n):(n.preventDefault(),D(t,Et,!1));else if(function(e){return G(e,"Backspace",Io)}(n))n.preventDefault(),D(t,jn,!0);else if(function(e){return G(e,"Delete",Io)}(n))n.preventDefault(),D(t,jn,!1);else if(function(e){return Pe&&G(e,"Backspace",{metaKey:!0})}(n))n.preventDefault(),D(t,Kn,!0);else if(function(e){return Pe&&(G(e,"Delete",{metaKey:!0})||G(e,"k",{ctrlKey:!0}))}(n))n.preventDefault(),D(t,Kn,!1);else if(function(e){return G(e,"b",Qe)}(n))n.preventDefault(),D(t,He,"bold");else if(function(e){return G(e,"u",Qe)}(n))n.preventDefault(),D(t,He,"underline");else if(function(e){return G(e,"i",Qe)}(n))n.preventDefault(),D(t,He,"italic");else if(function(e){return G(e,"Tab",{shiftKey:"any"})}(n))D(t,ol,n);else if(function(e){return G(e,"z",Qe)}(n))n.preventDefault(),D(t,Hr,void 0);else if(function(e){return Pe?G(e,"z",{metaKey:!0,shiftKey:!0}):G(e,"y",{ctrlKey:!0})||G(e,"z",{ctrlKey:!0,shiftKey:!0})}(n))n.preventDefault(),D(t,Vr,void 0);else{const e=t._editorState._selection;e===null||F(e)?Do(n)&&(n.preventDefault(),D(t,Pi,n)):function(r){return G(r,"c",Qe)}(n)?(n.preventDefault(),D(t,Gr,n)):function(r){return G(r,"x",Qe)}(n)?(n.preventDefault(),D(t,fs,n)):Do(n)&&(n.preventDefault(),D(t,Pi,n))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(n)&&t.dispatchCommand(_d,n),!0}function bl(n){let t=n.__lexicalEventHandles;return t===void 0&&(t=[],n.__lexicalEventHandles=t),t}const on=new Map;function xl(n){const t=rf(n.target);if(t===null)return;const e=Ul(t.anchorNode);
5if(e===null)return;Ui&&(Ui=!1,Ve(e,()=>{const l=Wt(),c=t.anchorNode;(X(c)||at(c))&&xe(hs(l,t,e,n))}));const r=ws(e),i=r[r.length-1],s=i._key,o=on.get(s),a=o||i;a!==e&&lo(t,a,!1),lo(t,e,!0),e!==i?on.set(s,e):o&&on.delete(s)}function co(n){n._lexicalHandled=!0}function uo(n){return n._lexicalHandled===!0}const fo=()=>{};function Cd(n){const t=zi.get(n);if(t===void 0)return void fo();const e=Lr.get(t);if(e===void 0)return void fo();const r=e-1;r>=0||O(164),zi.delete(n),Lr.set(t,r),r===0&&t.removeEventListener("selectionchange",xl);const i=Xr(n);vs(i)?(function(o){if(o._parentEditor!==null){const a=ws(o),l=a[a.length-1]._key;on.get(l)===o&&on.delete(l)}else on.delete(o._key)}(i),n.__lexicalEditor=null):i&&O(198);const s=bl(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function Ki(n,t,e){he();const r=n.__key,i=n.getParent();if(i===null)return;const s=function(a){const l=R();if(!F(l)||!k(a))return l;const{anchor:c,focus:u}=l,d=c.getNode(),f=u.getNode();return zr(d,a)&&c.set(a.__key,0,"element"),zr(f,a)&&u.set(a.__key,0,"element"),l}(n);let o=!1;if(F(s)&&t){const a=s.anchor,l=s.focus;a.key===r&&(Dr(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),l.key===r&&(Dr(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else ce(s)&&t&&n.isSelected()&&n.selectPrevious();if(F(s)&&t&&!o){const a=n.getIndexWithinParent();Nt(n),Mr(s,i,a,-1)}else Nt(n);e||ge(i)||i.canBeEmpty()||!i.isEmpty()||Ki(i,t),t&&s&&re(i)&&i.isEmpty()&&i.selectEnd()}const Sl=Symbol.for("ephemeral");function Ir(n){return n[Sl]||!1}class ze{constructor(t){T(this,"__type");T(this,"__key");T(this,"__parent");T(this,"__prev");T(this,"__next");T(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),qd(this,t)}static getType(){const{ownNodeType:t}=ti(this);return t===void 0&&O(64,this.name),t}static clone(t){O(65,this.name)}$config(){return{}}config(t,e){const r=e.extends||Object.getPrototypeOf(this.constructor);return Object.assign(e,{extends:r,type:t}),{[t]:e}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}getType(){return this.__type}isInline(){O(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const e=oe(t);if(e===null)break;t=e.__parent}return!1}isSelected(t){const e=t||R();if(e==null)return!1;const r=e.getNodes().some(i=>i.__key===this.__key);if(I(this))return r;if(F(e)&&e.anchor.type==="element"&&e.focus.type==="element"){if(e.isCollapsed())return!1;const i=this.getParent();if(K(this)&&this.isInline()&&i){const s=e.isBackward()?e.focus:e.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let e=t.getFirstChild(),r=0;for(;e!==null;){if(this.is(e))return r;r++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:oe(t)}getParentOrThrow(){const t=this.getParent();return t===null&&O(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const e=t.getParent();if(ge(e))return k(t)||t===this&&K(t)||O(194),t;t=e}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&O(67,this.__key),t}getParents(){const t=[];let e=this.getParent();for(;e!==null;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;e!==null;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:oe(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(e===null)return t;let r=e.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:oe(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;e!==null;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=k(this)?this:this.getParent(),r=k(t)?t:t.getParent(),i=e&&r?vr(e,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const e=vr(this,t);return e!==null&&(e.type==="descendant"||(e.type==="branch"?ec(e)===-1:(e.type!=="same"&&e.type!=="ancestor"&&O(279),!1)))}isParentOf(t){const e=vr(this,t);return e!==null&&e.type==="ancestor"}getNodesBetween(t){const e=this.isBefore(t),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;
5if(i.has(o)||(i.add(o),r.push(s)),s===t)break;const a=k(s)?e?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}const l=e?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}const c=s.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===t)break;let u=null,d=c;do{if(d===null&&O(68),u=e?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);s=u}return e||r.reverse(),r}isDirty(){const t=q()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(Ir(this))return this;const t=oe(this.__key);return t===null&&O(113),t}getWritable(){if(Ir(this))return this;he();const t=yt(),e=q(),r=t._nodeMap,i=this.__key,s=this.getLatest(),o=e._cloneNotNeeded,a=R();if(a!==null&&a.setCachedNodes(null),o.has(i))return $r(s),s;const l=Xl(s);return o.add(i),$r(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,e){O(70)}updateDOM(t,e,r){O(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){O(18,this.name)}updateFromJSON(t){return function(e,r){const i=e.getWritable(),s=r.$;let o=s;for(const a of ja(i).flatKeys)a in r&&(o!==void 0&&o!==s||(o={...s}),o[a]=r[a]);return(i.__state||o)&&sd(e).updateFromJSON(o),i}(this,t)}static transform(){return null}remove(t){Ki(this,!0,t)}replace(t,e){he();let r=R();r!==null&&(r=r.clone()),fi(this,t);const i=this.getLatest(),s=this.__key,o=t.__key,a=t.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size;Nt(a);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,p=i.__next,g=i.__parent;if(Ki(i,!1,!0),u===null?l.__first=o:u.getWritable().__next=o,a.__prev=f,d===null?l.__last=o:d.getWritable().__prev=o,a.__next=p,a.__parent=g,l.__size=c,e&&(k(this)&&k(a)||O(139),this.getChildren().forEac
5h(m=>{a.append(m)})),F(r)){xe(r);const m=r.anchor,_=r.focus;m.key===s&&mo(m,a),_.key===s&&mo(_,a)}return ut()===s&&pe(o),a}insertAfter(t,e=!0){he(),fi(this,t);const r=this.getWritable(),i=t.getWritable(),s=i.getParent(),o=R();let a=!1,l=!1;if(s!==null){const p=t.getIndexWithinParent();if(Nt(i),F(o)){const g=s.__key,m=o.anchor,_=o.focus;a=m.type==="element"&&m.key===g&&m.offset===p+1,l=_.type==="element"&&_.key===g&&_.offset===p+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,e&&F(o)){const p=this.getIndexWithinParent();Mr(o,u,p+1);const g=u.__key;a&&o.anchor.set(g,p+2,"element"),l&&o.focus.set(g,p+2,"element")}return t}insertBefore(t,e=!0){he(),fi(this,t);const r=this.getWritable(),i=t.getWritable(),s=i.__key;Nt(i);const o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=r.__prev,c=this.getIndexWithinParent();o===null?a.__first=s:o.getWritable().__next=s,a.__size++,r.__prev=s,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const u=R();return e&&F(u)&&Mr(u,this.getParentOrThrow(),c),t}isParentRequired(){return!1}createParentElementNode(){return Z()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){he();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(k(r))return r.select();if(!I(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(t,e)}selectNext(t,e){he();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(k(r))return r.select(0,0);if(!I(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}T(ze,"importDOM");const Ji="historic",wd="history-push",Tt="history-merge",Ed="paste",Td="collaboration",kd="skip-scroll-into-view",Nd="skip-dom-selection",Ad="skip-selection-focus";class mn extends ze{static getType(){return"linebreak"}static clone(t){return new mn(t.__key)}constructor(t){super(t)}getTextContent(){return` 6`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(e){const r=e.parentElement;if(r!==null&&Br(r)){const i=r.firstChild;if(i===e||i.nextSibling===e&&dr(i)){const s=r.lastChild;if(s===e||s.previousSibling===e&&dr(s))return!0}}return!1}(t)||function(e){const r=e.parentElement;if(r!==null&&Br(r)){const i=r.firstChild;if(i===e||i.nextSibling===e&&dr(i))return!1;const s=r.lastChild;if(s===e||s.previousSibling===e&&dr(s))return!0}return!1}(t)?null:{conversion:Fd,priority:0}}}static importJSON(t){return st().updateFromJSON(t)}}function Fd(n){return{node:st()}}function st(){return we(new mn)}function it(n){return n instanceof mn}function dr(n){return at(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function ai(n,t){return 16&t?"code":t&Pa?"mark":32&t?"sub":64&t?"sup":null}function li(n,t){return 1&t?"strong":2&t?"em":"span"}function vl(n,t,e,r,i){const s=r.classList;let o=an(i,"base");o!==void 0&&s.add(...o),o=an(i,"underlineStrikethrough");let a=!1;const l=8&t&&4&t;o!==void 0&&(8&e&&4&e?(a=!0,l||s.add(...o)):l&&s.remove(...o));for(const c in Ce){const u=Ce[c];if(o=an(i,c),o!==void 0)if(e&u){if(a&&(c==="underline"||c==="str
6ikethrough")){t&u&&s.remove(...o);continue}(!(t&u)||l&&c==="underline"||c==="strikethrough")&&s.add(...o)}else t&u&&s.remove(...o)}}function Cl(n,t,e){const r=t.firstChild,i=e.isComposing(),s=n+(i?jr:"");if(r==null)t.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||Ft){const[a,l,c]=function(u,d){const f=u.length,p=d.length;let g=0,m=0;for(;g<f&&g<p&&u[g]===d[g];)g++;for(;m+g<f&&m+g<p&&u[f-m-1]===d[p-m-1];)m++;return[g,f-g-m,d.slice(g,p-m)]}(o,s);l!==0&&r.deleteData(a,l),r.insertData(a,c)}else r.nodeValue=s}}function go(n,t,e,r,i,s){Cl(i,n,t);const o=s.theme.text;o!==void 0&&vl(0,0,r,n,o)}function fr(n,t){const e=document.createElement(t);return e.appendChild(n),e}class We extends ze{constructor(e="",r){super(r);T(this,"__text");T(this,"__format");T(this,"__style");T(this,"__mode");T(this,"__detail");this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(e){return new We(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Xu[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ut()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const r=Ce[e];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,r){return Pr(this.getLatest().__format,e,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,r){const i=this.__format,s=ai(0,i),o=li(0,i),a=s===null?o:s,l=document.createElement(a);let c=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),s!==null&&(c=document.createElement(o),l.appendChild(c)),go(c,this,0,i,this.__text,e);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(e,r,i){const s=this.__text,o=e.__format,a=this.__format,l=ai(0,o),c=ai(0,a),u=li(0,o),d=li(0,a);if((l===null?u:l)!==(c===null?d:c))return!0;if(l===c&&u!==d){const _=r.firstChild;_==null&&O(48);const b=document.createElement(d);return go(b,this,0,a,s,i),r.replaceChild(b,_),!1}let f=r;c!==null&&l!==null&&(f=r.firstChild,f==null&&O(49)),Cl(s,f,this);const p=i.theme.text;p!==void 0&&o!==a&&vl(0,o,a,f,p);const g=e.__style,m=this.__style;return g!==m&&(r.style.cssText=m),!1}static importDOM(){return{"#text":()=>({conversion:Id,priority:0}),b:()=>({conversion:Ld,priority:0}),code:()=>({conversion:Xe,priority:0}),em:()=>({conversion:Xe,priority:0}),i:()=>({conversion:Xe,priority:0}),mark:()=>({conversion:Xe,priority:0}),s:()=>({conversion:Xe,priority:0}),span:()=>({conversion:Od,priority:0}),strong:()=>({conversion:Xe,priority:0}),sub:()=>({conversion:Xe,priority:0}),sup:()=>({conversion:Xe,priority:0}),u:()=>({conversion:Xe,priority:0})}}static importJSON(e){return le().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
6exportDOM(e){let{element:r}=super.exportDOM(e);return X(r)||O(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=fr(r,"b")),this.hasFormat("italic")&&(r=fr(r,"i")),this.hasFormat("strikethrough")&&(r=fr(r,"s")),this.hasFormat("underline")&&(r=fr(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,r){}setFormat(e){const r=this.getWritable();return r.__format=typeof e=="string"?Ce[e]:e,r}setDetail(e){const r=this.getWritable();return r.__detail=typeof e=="string"?qu[e]:e,r}setStyle(e){const r=this.getWritable();return r.__style=e,r}toggleFormat(e){const r=Pr(this.getFormat(),e,null);return this.setFormat(r)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const r=Zu[e];if(this.__mode===r)return this;const i=this.getWritable();return i.__mode=r,i}setTextContent(e){if(this.__text===e)return this;const r=this.getWritable();return r.__text=e,r}select(e,r){he();let i=e,s=r;const o=R(),a=this.getTextContent(),l=this.__key;if(typeof a=="string"){const c=a.length;i===void 0&&(i=c),s===void 0&&(s=c)}else i=0,s=0;if(!F(o))return Tl(l,i,l,s,"text","text");{const c=ut();c!==o.anchor.key&&c!==o.focus.key||pe(l),o.setTextNodeRange(this,i,this,s)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,r,i,s){const o=this.getWritable(),a=o.__text,l=i.length;let c=e;c<0&&(c=l+c,c<0&&(c=0));const u=R();if(s&&F(u)){const f=e+l;u.setTextNodeRange(o,f,o,f)}const d=a.slice(0,c)+i+a.slice(c+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){he();const r=this.getLatest(),i=r.getTextContent();if(i==="")return[];const s=r.__key,o=ut(),a=i.length;e.sort((v,A)=>v-A),e.push(a);const l=[],c=e.length;for(let v=0,A=0;v<a&&A<=c;A++){const M=e[A];M>v&&(l.push(i.slice(v,M)),v=M)}const u=l.length;if(u===1)return[r];const d=l[0],f=r.getParent();let p;const g=r.getFormat(),m=r.getStyle(),_=r.__detail;let b=!1,h=null,y=null;const S=R();if(F(S)){const[v,A]=S.isBackward()?[S.focus,S.anchor]:[S.anchor,S.focus];v.type==="text"&&v.key===s&&(h=v),A.type==="text"&&A.key===s&&(y=A)}r.isSegmented()?(p=le(d),p.__format=g,p.__style=m,p.__detail=_,p.__state=eo(r,p),b=!0):p=r.setTextContent(d);const w=[p];for(let v=1;v<u;v++){const A=le(l[v]);A.__format=g,A.__style=m,A.__detail=_,A.__state=eo(r,A);const M=A.__key;o===s&&pe(M),w.push(A)}const x=h?h.offset:null,C=y?y.offset:null;let E=0;for(const v of w){if(!h&&!y)break;const A=E+v.getTextContentSize();if(h!==null&&x!==null&&x<=A&&x>=E&&(h.set(v.getKey(),x-E,"text"),x<A&&(h=null)),y!==null&&C!==null&&C<=A&&C>=E){y.set(v.getKey(),C-E,"text");break}E=A}if(f!==null){(function(M){const B=M.getPreviousSibling(),P=M.getNextSibling();B!==null&&$r(B),P!==null&&$r(P)})(this);const v=f.getWritable(),A=this.getIndexWithinParent();b?(v.splice(A,0,w),this.remove()):v.splice(A,1,w),F(S)&&Mr(S,f,A,u-1)}return w}mergeWithSibling(e){const r=e===this.getPreviousSibling();r||e===this.getNextSibling()||O(50);const i=this.__key,s=e.__key,o=this.__text,a=o.length;ut()===s&&pe(i);const l=R();if(F(l)){const f=l.anchor,p=l.focus;f!==null&&f.key===s&&Co(f,r,i,e,a),p!==null&&p.key===s&&Co(p,r,i,e,a)}const c=e.__text,u=r?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}}function Od(n){return{forChild:gs(n.style),node:null}}function Ld(n){const t=n,e=t.style.fontWeight==="normal";return{forChild:gs(t.style,e?void 0:"bold"),node:null}}const ho=new WeakMap;function Rd(n){if(!X(n))return!1;if(n.nodeName==="PRE")return!0;const t=n.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function Id(n){const t=n;n.parentElement===null&&O(129);let e=t.textContent||"";if(function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=ho.get(s))===void 0&&!Rd(s);)o.push(s),s=s.parentNode;const a=i===void 0?s:i;for(let l=0;l<o.length;l++)ho.set(o[l],a);return a}(t)!==null){const r=e.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;o++){const a=r[o];a===` 7`||a===`\r 8`?i.push(st()):a===" "?i.push(yn()):a!==""&&i.push(le(a))}return{node:i}}if(e=e.replace(/\r/g,"").replace(/[ \t\n]+/g," "),e==="")return{node:null};if(e[0]===" "){let r=t,i=!0;for(;r!==null&&(r=po(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(e=e.slice(1)),i=!1;break}}i&&(e=e.slice(1))}if(e[e.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=po(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(e=e.slice(0,e.length-1))}return e===""?{node:null}
8:{node:le(e)}}function po(n,t){let e=n;for(;;){let r;for(;(r=t?e.nextSibling:e.previousSibling)===null;){const s=e.parentElement;if(s===null)return null;e=s}if(e=r,X(e)){const s=e.style.display;if(s===""&&!Xi(e)||s!==""&&!s.startsWith("inline"))return null}let i=e;for(;(i=t?e.firstChild:e.lastChild)!==null;)e=i;if(at(e))return e;if(e.nodeName==="BR")return null}}const Md={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Xe(n){const t=Md[n.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:gs(n.style,t),node:null}}function le(n=""){return we(new We(n))}function I(n){return n instanceof We}function gs(n,t){const e=n.fontWeight,r=n.textDecoration.split(" "),i=e==="700"||e==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return c=>(I(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),a&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class _n extends We{static getType(){return"tab"}static clone(t){return new _n(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const e=super.createDOM(t),r=an(t.theme,"tab");return r!==void 0&&e.classList.add(...r),e}static importJSON(t){return yn().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&Ia(126),super.setTextContent(" ")}spliceText(t,e,r,i){return r===""&&e===0||r===" "&&e===1||O(286),this}setDetail(t){return t!==2&&O(127),this}setMode(t){return t!=="normal"&&O(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function yn(){return we(new _n)}function qr(n){return n instanceof _n}class Dd{constructor(t,e,r){T(this,"key");T(this,"offset");T(this,"type");T(this,"_selection");this._selection=null,this.key=t,this.offset=e,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:Ql(Le(ot(this,"next")),Le(ot(t,"next")))<0}getNode(){const t=oe(this.key);return t===null&&O(20),t}set(t,e,r,i){const s=this._selection,o=this.key;i&&this.key===t&&this.offset===e&&this.type===r||(this.key=t,this.offset=e,this.type=r,Zn()||(ut()===o&&pe(t),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function qe(n,t,e){return new Dd(n,t,e)}function ci(n,t){let e=t.__key,r=n.offset,i="element";if(I(t)){i="text";const s=t.getTextContentSize();r>s&&(r=s)}else if(!k(t)){const s=t.getNextSibling();if(I(s))e=s.__key,r=0,i="text";else{const o=t.getParent();o&&(e=o.__key,r=t.getIndexWithinParent()+1)}}n.set(e,r,i)}function mo(n,t){if(k(t)){const e=t.getLastDescendant();k(e)||I(e)?ci(n,e):ci(n,t)}else ci(n,t)}class Yr{constructor(t){T(this,"_nodes");T(this,"_cachedNodes");T(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ce(t))return!1;const e=this._nodes,r=t._nodes;return e.size===r.size&&Array.from(e).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Yr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes(),r=e.length,i=e[r-1];let s;if(I(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(t);for(let o=0;o<r;o++)e[o].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const e=this._nodes,r=[];for(const i of e){const s=oe(i);s!==null&&r.push(s)}return Zn()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let e="";for(let r=0;r<t.length;r++)e+=t[r].getTextContent();return e}deleteNodes(){const t=this.getNodes();if((R()||Wt())===this&&t[0]){const e=_e(t[0],"next");yf(_t(e,e))}for(const e of t)e.remove()}}function F(n){return n instanceof Ut}class Ut{constructor(t,e,r,i){T(this,"format");T(this,"style");T(this,"anchor");T(this,"focus");T(this,"_cachedNodes");T(this,"dirty");this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!F(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const e=function(r){const i=[],[s,o]=r.getTextSlices();s&&i.push(s.caret.origin);const a=new Set,l=new Set;for(const c of r)if(Ge(c)){const{origin:u}=c;i.length===0?a.add(u):(l.add(u),i.push(u))}else{const{origin:u}=c;k(u)&&l.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),Pt(r.focus)&&k(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=Re(r.focus.origin,"previous");Ge(c)&&a.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=Ls(c))a.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!k(c)||l.has(c)||c.isEmpty()||a.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=Le(r.anchor),u=Le(r.anchor.getFlipped()),d=p=>gt(p)?p.origin:p.getNodeAtCaret(),f=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i}(nc(Wo(this),"next"));return Zn()||(this._cachedNodes=e),e}setTextNodeRange(t,e,r,i){this.anchor.set(t.__key,e,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const e=t[0],r=t[t.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[a,l]=Hi(this);let c="",u=!0;for(let d=0;d<t.length;
8d++){const f=t[d];if(k(f)&&!f.isInline())u||(c+=` 9`),u=!f.isEmpty();else if(u=!1,I(f)){let p=f.getTextContent();f===e?f===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(p=a<l?p.slice(a,l):p.slice(l,a)):p=o?p.slice(a):p.slice(l):f===r&&(p=o?p.slice(0,l):p.slice(0,a)),c+=p}else!K(f)&&!it(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(t){const e=q(),r=e.getEditorState()._selection,i=El(t.startContainer,t.startOffset,t.endContainer,t.endOffset,e,r);if(i===null)return;const[s,o]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),dn(this)}clone(){const t=this.anchor,e=this.focus;return new Ut(qe(t.key,t.offset,t.type),qe(e.key,e.offset,e.type),this.format,this.style)}toggleFormat(t){this.format=Pr(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const e=Ce[t];return(this.format&e)!==0}insertRawText(t){const e=t.split(/(\r?\n|\t)/),r=[],i=e.length;for(let s=0;s<i;s++){const o=e[s];o===` 10`||o===`\r 11`?r.push(st()):o===" "?r.push(yn()):r.push(le(o))}this.insertNodes(r)}insertText(t){const e=this.anchor,r=this.focus,i=this.format,s=this.style;let o=e,a=r;!this.isCollapsed()&&r.isBefore(e)&&(o=r,a=e),o.type==="element"&&function(_,b,h,y){const S=_.getNode(),w=S.getChildAtIndex(_.offset),x=le();if(x.setFormat(h),x.setStyle(y),ys(w))w.splice(0,0,[x]);else{const C=re(S)?Z().append(x):x;w===null?S.append(C):w.insertBefore(C)}_.is(b)&&b.set(x.__key,0,"text"),_.set(x.__key,0,"text")}(o,a,i,s),a.type==="element"&&zt(a,Le(ot(a,"next")));const l=o.offset;let c=a.offset;const u=this.getNodes(),d=u.length;let f=u[0];I(f)||O(26);const p=f.getTextContent().length,g=f.getParentOrThrow();let m=u[d-1];if(d===1&&a.type==="element"&&(c=p,a.set(o.key,c,"text")),this.isCollapsed()&&l===p&&(et(f)||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&f.getNextSibling()===null)){let _=f.getNextSibling();if(I(_)&&_.canInsertTextBefore()&&!et(_)||(_=le(),_.setFormat(i),_.setStyle(s),g.canInsertTextAfter()?f.insertAfter(_):g.insertAfter(_)),_.select(0,0),f=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(et(f)||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&f.getPreviousSibling()===null)){let _=f.getPreviousSibling();if(I(_)&&!et(_)||(_=le(),_.setFormat(i),g.canInsertTextBefore()?f.insertBefore(_):g.insertBefore(_)),_.select(),f=_,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&l!==p){const _=le(f.getTextContent());_.setFormat(i),f.replace(_),f=_}else if(!this.isCollapsed()&&t!==""){const _=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||k(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),wl(this.anchor,this.focus,null),void this.insertText(t)}if(d===1){if(kt(f)){const y=le(t);return y.select(),void f.replace(y)}const _=f.getFormat(),b=f.getStyle();if(l!==c||_===i&&b===s){if(qr(f)){const y=le(t);return y.setFormat(i),y.setStyle(s),y.select(),void f.replace(y)}}else{if(f.getTextContent()!==""){const y=le(t);if(y.setFormat(i),y.setStyle(s),y.select(),l===0)f.insertBefore(y,!1);else{const[S]=f.splitText(l);S.insertAfter(y,!1)}return void(y.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(s)}const h=c-l;f=f.spliceText(l,h,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=t.length:(this.format=_,this.style=b))}else{const _=new Set([...f.getParentKeys(),...m.getParentKeys()]),b=k(f)?f:f.getParentOrThrow();let h=k(m)?m:m.getParentOrThrow(),y=m;if(!b.is(h)&&h.isInline())do y=h,h=h.getParentOrThrow();while(h.isInline());if(a.type==="text"&&(c!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<c)if(I(m)&&!kt(m)&&c!==m.getTextContentSize()){if(m.isSegmented()){const E=le(m.getTextContent());m.replace(E),m=E}re(a.getNode())||a.type!=="text"||(m=m.spliceText(0,c,"")),_.add(m.__key)}else{const E=m.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?m.remove():E.remove()}else _.add(m.__key);const S=h.getChildren(),w=new Set(u),x=b.is(h),C=b.isInline()&&f.getNextSibling()===null?b:f;for(let E=S.length-1;E>=0;E--){const v=S[E];if(v.is(f)||k(v)&&v.isParentOf(f))break;v.isAttached()&&(!w.has(v)||v.is(y)?x||C.insertAfter(v,!1):v.remove())}if(!x){let E=h,v=null;for(;E!==null;){const A=E.getChildren(),M=A.length;(M===0||A[M-1].is(v))&&(_.delete(E.__key),v=E),E=E.getParent()}}if(kt(f))if(l===p)f.select();else{const E=le(t);E.select(),f.replace(E)}else f=f.spliceText(l,p-l,t,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let E=1;E<d;E++){const v=u[E],A=v.__key;_.has(A)||v.remove()}}}removeText(){const t=R()===this;Cr(this,bf(Wo(this))),t&&R()!==this&&xe(this)}formatText(t,e=null){if(this.isCollapsed())return this.toggleFormat(t),void pe(null);const r=this.getNodes(),i=[];for(const S of r)I(S)&&i.push(S);const s=S=>{r.forEach(w=>{if(k(w)){const x=w.getFormatFlags(t,S);w.setTextFormat(x)}})},o=i.length;if(o===0)return this.toggleFormat(t),pe(null),void s(e);const a=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:a,d=c?a:l;let f=0,p=i[0],g=u.type==="element"?0:u.offset;if(u.type==="text"&&g===p.getTextContentSize()&&(f=1,p=i[1],g=0),p==null)return;const m=p.getFormatFlags(t,e);s(m);const _=o-1;let b=i[_];const h=d.type==="text"?d.offset:b.getTextContentSize();if(p.is(b)){if(g===h)return;
11if(et(p)||g===0&&h===p.getTextContentSize())p.setFormat(m);else{const S=p.splitText(g,h),w=g===0?S[0]:S[1];w.setFormat(m),u.type==="text"&&u.set(w.__key,0,"text"),d.type==="text"&&d.set(w.__key,h-g,"text")}return void(this.format=m)}g===0||et(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const y=b.getFormatFlags(t,m);h>0&&(h===b.getTextContentSize()||et(b)||([b]=b.splitText(h)),b.setFormat(y));for(let S=f+1;S<_;S++){const w=i[S],x=w.getFormatFlags(t,y);w.setFormat(x)}u.type==="text"&&u.set(p.__key,g,"text"),d.type==="text"&&d.set(b.__key,h,"text"),this.format=m|y}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=R();return F(g)||O(134),g.insertNodes(t)}const e=(this.isBackward()?this.focus:this.anchor).getNode(),r=fe(e,ct),i=t[t.length-1];if(k(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=ui(this);r.splice(g,0,t),i.selectEnd()}return}if(!t.some(g=>(k(g)||K(g))&&!g.isInline())){k(r)||O(211,e.constructor.name,e.getType());const g=ui(this);return r.splice(g,0,t),void i.selectEnd()}const s=function(g){const m=Z();let _=null;for(let b=0;b<g.length;b++){const h=g[b],y=it(h);if(y||K(h)&&h.isInline()||k(h)&&h.isInline()||I(h)||h.isParentRequired()){if(_===null&&(_=h.createParentElementNode(),m.append(_),y))continue;_!==null&&_.append(h)}else m.append(h),_=null}return m}(t),o=s.getLastDescendant(),a=s.getChildren(),l=!k(r)||!r.isEmpty()?this.insertParagraph():null,c=a[a.length-1];let u=a[0];var d;k(d=u)&&ct(d)&&!d.isEmpty()&&k(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(k(r)||O(211,e.constructor.name,e.getType()),r.append(...u.getChildren()),u=a[1]),u&&(r===null&&O(212,e.constructor.name,e.getType()),function(g,m){const _=m.getParentOrThrow().getLastChild();let b=m;const h=[m];for(;b!==_;)b.getNextSibling()||O(140),b=b.getNextSibling(),h.push(b);let y=g;for(const S of h)y=y.insertAfter(S)}(r,u));const f=fe(o,ct);l&&k(f)&&(l.canMergeWhenEmpty()||ct(c))&&(f.append(...l.getChildren()),l.remove()),k(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const p=k(r)?r.getLastChild():null;it(p)&&f!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=Z();return te().splice(this.anchor.offset,0,[o]),o.select(),o}const t=ui(this),e=fe(this.anchor.getNode(),ct);k(e)||O(213);const r=e.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],s=e.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const e=st();if(this.insertNodes([e]),t){const r=e.getParentOrThrow(),i=e.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],e=t.length;let r=t[0],i=t[e-1];const[s,o]=Hi(this),a=this.isBackward(),[l,c]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=a?[o,s]:[s,o];if(e===0)return[];if(e===1){if(I(r)&&!this.isCollapsed()){const f=r.splitText(u,d),p=u===0?f[0]:f[1];return p?(l.set(p.getKey(),0,"text"),c.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(I(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,l.set(r.getKey(),0,"text"))),I(i)){const f=i.getTextContent().length;d===0?t.pop():d!==f&&([i]=i.splitText(d),t[t.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,e,r){if(wo(this,t,e,r))return;const i=t==="move",s=q(),o=De(Me(s));if(!o)return;const a=s._blockCursorElement,l=s._rootElement,c=this.focus.getNode();if(l===null||a===null||!k(c)||c.isInline()||c.canBeEmpty()||Yi(a,s,l),this.dirty){let u=It(s,this.anchor.key),d=It(s,this.focus.key);this.anchor.type==="text"&&(u=fn(u)),this.focus.type==="text"&&(d=fn(d)),u&&d&&Al(o,u,this.anchor.offset,d,this.focus.offset)}if(function(u,d,f,p){u.modify(d,f,p)}(o,t,e?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),d=this.anchor.getNode(),f=re(d)?d:tf(d);if(this.applyDOMRange(u),this.dirty=!0,!i){const p=this.getNodes(),g=[];let m=!1;for(let _=0;_<p.length;_++){const b=p[_];zr(b,f)?g.push(b):m=!0}if(m&&g.length>0)if(e){const _=g[0];k(_)?_.selectStart():_.getParentOrThrow().selectStart()}else{const _=g[g.length-1];k(_)?_.selectEnd():_.getParentOrThrow().selectEnd()}
11o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||function(_){const b=_.focus,h=_.anchor,y=h.key,S=h.offset,w=h.type;h.set(b.key,b.offset,b.type,!0),b.set(y,S,w,!0)}(this)}}r==="lineboundary"&&wo(this,t,e,r,"decorators")}forwardDeletion(t,e,r){if(!r&&(t.type==="element"&&k(e)&&t.offset===e.getChildrenSize()||t.type==="text"&&t.offset===e.getTextContentSize())){const i=e.getParent(),s=e.getNextSibling()||(i===null?null:i.getNextSibling());if(k(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const s=Is(ot(r,t?"previous":"next"));if(s.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of s.iterNodeCarets("shadowRoot"))if(Ge(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(k(s.anchor.origin)&&s.anchor.origin.isEmpty()){const c=Le(l);Cr(this,_t(c,c)),s.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(Pt(l)){if(k(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(s.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(K(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&k(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const c=Nl();c.add(l.origin.getKey()),xe(c)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:c}=a;return Cr(this,_t(!l.origin.isEmpty()&&c.isEmpty()?Ds(_e(c,l.direction)):s.anchor,l)),this.removeText()}}const o=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&yo(this,r.getNode()))return}else{const a=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=o.offset,c=a.getTextContentSize();if(a.is(i)||t&&l!==c||!t&&l!==0)return void bo(a,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,c=i.getTextContentSize();if(i.is(a)||t&&l!==0||!t&&l!==c)return void bo(i,t,l)}(function(l,c){const u=l.anchor,d=l.focus,f=u.getNode(),p=d.getNode();if(f===p&&u.type==="text"&&d.type==="text"){const g=u.offset,m=d.offset,_=g<m,b=_?g:m,h=_?m:g,y=h-1;b!==y&&function(S){return!(Hl(S)||Pd(S))}(f.getTextContent().slice(b,h))&&(c?d.set(d.key,y,d.type):u.set(u.key,y,u.type))}})(this,t)}}if(this.removeText(),t&&!e&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&re(r.getParent())&&r.getPreviousSibling()===null&&yo(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const e=this.anchor,r=e.getNode();if(this.forwardDeletion(e,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ce(n){return n instanceof Yr}function _o(n){const t=n.offset;if(n.type==="text")return t;const e=n.getNode();return t===e.getChildrenSize()?e.getTextContent().length:0}function Hi(n){const t=n.getStartEndPoints();if(t===null)return[0,0];const[e,r]=t;return e.type==="element"&&r.type==="element"&&e.key===r.key&&e.offset===r.offset?[0,0]:[_o(e),_o(r)]}function yo(n,t){for(let e=t;e;e=e.getParent()){if(k(e)){if(e.collapseAtStart(n))return!0;if(ge(e))break}if(e.getPreviousSibling())break}return!1}const Pd=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),t=n.test.bind(n);if(t("â¤ï¸")&&t("#ï¸â£")&&t("ð"))return t}catch{}return()=>!1})();function bo(n,t,e){const r=n,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,a=0;for(let c=0;c<s;c++){const u=c===s-1;if(a=o,o+=i[c].length,t&&o===e||o>e||u){i.splice(c,1),u&&(a=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function xo(n,t,e,r){let i,s=t;if(X(n)){let o=!1;const a=n.childNodes,l=a.length,c=r._blockCursorElement;s===l&&(o=!0,s=l-1);let u=a[s],d=!1;if(u===c)u=a[s+1],d=!0;else if(c!==null){const f=c.parentNode;n===f&&t>Array.prototype.indexOf.call(f.children,c)&&s--}if(i=en(u),I(i))s=ht(i,o?"next":"previous");else{let f=en(n);if(f===null)return null;if(k(f)){const p=r.getElementByKey(f.getKey());p===null&&O(214),[f,s]=f.getDOMSlot(p).resolveChildIndex(f,p,n,t),k(f)||O(215),o&&s>=f.getChildrenSize()&&(s=Math.max(0,f.getChildrenSize()-1));let m=f.getChildAtIndex(s);if(k(m)&&function(_,b,h){const y=_.getParent();return h===null||y===null||!y.canBeEmpty()||y!==h.getNode()}(m,0,e)){const _=o?m.getLastDescendant():m.getFirstDescendant();_===null?f=m:(m=_,f=k(m)?m:m.getParentOrThrow()),s=0}I(m)?(i=m,f=null,s=ht(m,o?"next":"previous")):m!==f&&o&&!d&&(k(f)||O(216),s=Math.min(f.getChildrenSize(),s+1))}else{const p=f.getIndexWithinParent();s=t===0&&K(f)&&en(n)===f?p:p+1,f=f.getParentOrThrow()}if(k(f))return qe(f.__key,s,"element")}}else i=en(n);
11return I(i)?qe(i.__key,ht(i,s,"clamp"),"text"):null}function So(n,t,e){const r=n.offset,i=n.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(t){if((e||!t)&&s===null&&k(o)&&o.isInline()){const a=o.getPreviousSibling();I(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else k(s)&&!e&&s.isInline()?n.set(s.__key,s.getChildrenSize(),"element"):I(s)&&n.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(t&&k(s)&&s.isInline())n.set(s.__key,0,"element");else if((e||t)&&s===null&&k(o)&&o.isInline()&&!o.canInsertTextAfter()){const a=o.getNextSibling();I(a)&&n.set(a.__key,0,"text")}}}function wl(n,t,e){if(n.type==="text"&&t.type==="text"){const r=n.isBefore(t),i=n.is(t);So(n,r,i),So(t,!r,i),i&&t.set(n.key,n.offset,n.type);const s=q();if(s.isComposing()&&s._compositionKey!==n.key&&F(e)){const o=e.anchor,a=e.focus;n.set(o.key,o.offset,o.type,!0),t.set(a.key,a.offset,a.type,!0)}}}function El(n,t,e,r,i,s){if(n===null||e===null||!Qn(i,n,e))return null;const o=xo(n,t,F(s)?s.anchor:null,i);if(o===null)return null;const a=xo(e,r,F(s)?s.focus:null,i);if(a===null)return null;if(o.type==="element"&&a.type==="element"){const l=en(n),c=en(e);if(K(l)&&K(c))return null}return wl(o,a,s),[o,a]}function Vi(n){return k(n)&&!n.isInline()}function Tl(n,t,e,r,i,s){const o=yt(),a=new Ut(qe(n,t,i),qe(e,r,s),0,"");return a.dirty=!0,o._selection=a,a}function kl(){const n=qe("root",0,"element"),t=qe("root",0,"element");return new Ut(n,t,0,"")}function Nl(){return new Yr(new Set)}function hs(n,t,e,r){const i=e._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,a=o==="selectionchange",l=!Ni&&(a||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let c,u,d,f;if(F(n)&&!l)return n.clone();if(t===null)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(a||o===void 0)&&F(n)&&!Qn(e,c,u))return n.clone();const p=El(c,d,u,f,e,n);if(p===null)return null;const[g,m]=p;return new Ut(g,m,F(n)?n.format:0,F(n)?n.style:"")}function R(){return yt()._selection}function Wt(){return q()._editorState._selection}function Mr(n,t,e,r=1){const i=n.anchor,s=n.focus,o=i.getNode(),a=s.getNode();if(!t.is(o)&&!t.is(a))return;const l=t.__key;if(n.isCollapsed()){const c=i.offset;if(e<=c&&r>0||e<c&&r<0){const u=Math.max(0,c+r);i.set(l,u,"element"),s.set(l,u,"element"),vo(n)}}else{const c=n.isBackward(),u=c?s:i,d=u.getNode(),f=c?i:s,p=f.getNode();if(t.is(d)){const g=u.offset;(e<=g&&r>0||e<g&&r<0)&&u.set(l,Math.max(0,g+r),"element")}if(t.is(p)){const g=f.offset;(e<=g&&r>0||e<g&&r<0)&&f.set(l,Math.max(0,g+r),"element")}}vo(n)}function vo(n){const t=n.anchor,e=t.offset,r=n.focus,i=r.offset,s=t.getNode(),o=r.getNode();if(n.isCollapsed()){if(!k(s))return;const a=s.getChildrenSize(),l=e>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(e);if(I(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(k(s)){const a=s.getChildrenSize(),l=e>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(e);if(I(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text")}}if(k(o)){const a=o.getChildrenSize(),l=i>=a,c=l?o.getChildAtIndex(a-1):o.getChildAtIndex(i);if(I(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function Dr(n,t,e,r,i){let s=null,o=0,a=null;r!==null?(s=r.__key,I(r)?(o=r.getTextContentSize(),a="text"):k(r)&&(o=r.getChildrenSize(),a="element")):i!==null&&(s=i.__key,I(i)?a="text":k(i)&&(a="element")),s!==null&&a!==null?n.set(s,o,a):(o=t.getIndexWithinParent(),o===-1&&(o=e.getChildrenSize()),n.set(e.__key,o,"element"))}function Co(n,t,e,r,i){n.type==="text"?n.set(e,n.offset+(t?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function Al(n,t,e,r,i){try{n.setBaseAndExtent(t,e,r,i)}catch{}}function $d(n,t,e,r,i,s,o){const a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(Td)&&d!==s||d!==null&&Ss(d))return;if(!F(t))return void(n!==null&&Qn(e,a,l)&&r.removeAllRanges());const f=t.anchor,p=t.focus,g=f.key,m=p.key,_=It(e,g),b=It(e,m),h=f.offset,y=p.offset,S=t.format,w=t.style,x=t.isCollapsed();let C=_,E=b,v=!1;if(f.type==="text"){C=fn(_);const j=f.getNode();v=j.getFormat()!==S||j.getStyle()!==w}else F(n)&&n.anchor.type==="text"&&(v=!0);var A,M,B,P,z;if(p.type==="text"&&(E=fn(b)),C!==null&&E!==null&&(x&&(n===null||v||F(n)&&(n.format!==S||n.style!==w))&&(A=S,M=w,B=h,P=g,z=performance.now(),pl=[A,M,B,P,z]),c!==h||u!==y||a!==C||l!==E||r.type==="Range"&&x||(d!==null&&s.contains(d)||i.has(Ad)||s.focus({preventScroll:!0}),f.type==="element"))){if(Al(r,C,h,E,y),!i.has(kd)&&t.isCollapsed()&&s!==null&&s===document.activeElement){const j=F(t)&&t.anchor.type==="element"?C.childNodes[h]||null:r.rangeCount>0?r.getRangeAt(0):null;if(j!==null){let Q;if(j instanceof Text){const ae=document.createRange();ae.selectNode(j),Q=ae.getBoundingClientRect()}else Q=j.getBoundingClientRect();(function(ae,ee,ne){const Oe=Yl(ne),bt=Ns(Oe);if(Oe===null||bt===null)return;let{top:Se,bottom:En}=ee,ke=0,je=0,Ne=ne;for(;Ne!==null;){const lt=Ne===Oe.body;if(lt)ke=0,je=Me(ae).innerHeight;else{const xt=Ne.getBoundingClientRect();ke=xt.top,je=xt.bottom}let Ye=0;if(Se<ke?Ye=-(ke-Se):En>
11je&&(Ye=En-je),Ye!==0)if(lt)bt.scrollBy(0,Ye);else{const xt=Ne.scrollTop;Ne.scrollTop+=Ye;const Jt=Ne.scrollTop-xt;Se-=Jt,En-=Jt}if(lt)break;Ne=er(Ne)}})(e,Q,s)}}Bi=!0}}function zd(n){let t=R()||Wt();t===null&&(t=te().selectEnd()),t.insertNodes(n)}function ui(n){let t=n;n.isCollapsed()||t.removeText();const e=R();F(e)&&(t=e),F(t)||O(161);const r=t.anchor;let i=r.getNode(),s=r.offset;for(;!ct(i);){const o=i;if([i,s]=Bd(i,s),o.is(i))break}return s}function Bd(n,t){const e=n.getParent();if(!e){const i=Z();return te().append(i),i.select(),[te(),0]}if(I(n)){const i=n.splitText(t);if(i.length===0)return[e,n.getIndexWithinParent()];const s=t===0?0:1;return[e,i[0].getIndexWithinParent()+s]}if(!k(n)||t===0)return[e,n.getIndexWithinParent()];const r=n.getChildAtIndex(t);if(r){const i=new Ut(qe(n.__key,t,"element"),qe(n.__key,t,"element"),0,""),s=n.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[e,n.getIndexWithinParent()+1]}function wo(n,t,e,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!n.isCollapsed()){const[u,d]=e===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(u.key,u.offset,u.type),!0}const s=ot(n.focus,e?"previous":"next"),o=r==="lineboundary",a=t==="move";let l=s,c=i==="decorators-and-blocks";if(!tc(l)){for(const u of l){c=!1;const{origin:d}=u;if(!K(d)||d.isIsolated()||(l=u,!o||!d.isInline()))break}if(c)for(const u of Is(s).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Ge(u))u.origin.isInline()||(l=u);else{if(k(u.origin))continue;K(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===s)return!1;if(a&&!o&&K(l.origin)&&l.origin.isKeyboardSelectable()){const u=Nl();return u.add(l.origin.getKey()),xe(u),!0}return l=Le(l),a&&zt(n.anchor,l),zt(n.focus,l),c||!o}let ue=null,de=null,Te=!1,di=!1,Sr=0;const Eo={characterData:!0,childList:!0,subtree:!0};function Zn(){return Te||ue!==null&&ue._readOnly}function he(){Te&&O(13)}function Fl(){Sr>99&&O(14)}function yt(){return ue===null&&O(195,Ol()),ue}function q(){return de===null&&O(196,Ol()),de}function Ol(){let n=0;const t=new Set,e=Rt.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=Xr(i);if(vs(s))n++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===e&&(o+=" (separately built, likely a bundler configuration issue)"),t.add(o)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${e}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function Ud(){return de}function To(n,t,e){const r=t.__type,i=zl(n,r);let s=e.get(r);s===void 0&&(s=Array.from(i.transforms),e.set(r,s));const o=s.length;for(let a=0;a<o&&(s[a](t),t.isAttached());a++);}function ko(n,t){return n!==void 0&&n.__key!==t&&n.isAttached()}function Ll(n,t){if(!t)return;const e=n._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)e.add(i)}function Wd(n){return ps(n,q()._nodes)}function ps(n,t){const e=n.type,r=t.get(e);r===void 0&&O(17,e);const i=r.klass;n.type!==i.getType()&&O(18,i.name);const s=i.importJSON(n),o=n.children;if(k(s)&&Array.isArray(o))for(let a=0;a<o.length;a++){const l=ps(o[a],t);s.append(l)}return s}function No(n,t,e){const r=ue,i=Te,s=de;ue=t,Te=!0,de=n;try{return e()}finally{ue=r,Te=i,de=s}}function nt(n,t){const e=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(e===null)return;const s=n._editorState,o=s._selection,a=e._selection,l=n._dirtyType!==0,c=ue,u=Te,d=de,f=n._updating,p=n._observer;let g=null;if(n._pendingEditorState=null,n._editorState=e,!i&&l&&p!==null){de=n,ue=e,Te=!1,n._updating=!0;try{const x=n._dirtyType,C=n._dirtyElements,E=n._dirtyLeaves;p.disconnect(),g=ld(s,e,n,x,C,E)}catch(x){if(x instanceof Error&&n._onError(x),di)throw x;return Pl(n,null,r,e),Ua(n),n._dirtyType=2,di=!0,nt(n,s),void(di=!1)}finally{p.observe(r,Eo),n._updating=f,ue=c,Te=u,de=d}}e._readOnly||(e._readOnly=!0);const m=n._dirtyLeaves,_=n._dirtyElements,b=n._normalizedNodes,h=n._updateTags,y=n._deferred;l&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),function(x,C){const E=x._decorators;let v=x._pendingDecorators||E;const A=C._nodeMap;let M;for(M in v)A.has(M)||(v===E&&(v=Kl(x)),delete v[M])}(n,e);const S=i?null:De(Me(n));if(n._editable&&S!==null&&(l||a===null||a.dirty||!a.is(o))&&r!==null&&!h.has(Nd)
11){de=n,ue=e;try{if(p!==null&&p.disconnect(),l||a===null||a.dirty){const x=n._blockCursorElement;x!==null&&Yi(x,n,r),$d(o,a,n,S,h,r)}(function(x,C,E){let v=x._blockCursorElement;if(F(E)&&E.isCollapsed()&&E.anchor.type==="element"&&C.contains(document.activeElement)){const A=E.anchor,M=A.getNode(),B=A.offset;let P=!1,z=null;if(B===M.getChildrenSize())gi(M.getChildAtIndex(B-1))&&(P=!0);else{const j=M.getChildAtIndex(B);if(j!==null&&gi(j)){const Q=j.getPreviousSibling();(Q===null||gi(Q))&&(P=!0,z=x.getElementByKey(j.__key))}}if(P){const j=x.getElementByKey(M.__key);return v===null&&(x._blockCursorElement=v=function(Q){const ae=Q.theme,ee=document.createElement("div");ee.contentEditable="false",ee.setAttribute("data-lexical-cursor","true");let ne=ae.blockCursor;if(ne!==void 0){if(typeof ne=="string"){const Oe=Da(ne);ne=ae.blockCursor=Oe}ne!==void 0&&ee.classList.add(...ne)}return ee}(x._config)),C.style.caretColor="transparent",void(z===null?j.appendChild(v):j.insertBefore(v,z))}}v!==null&&Yi(v,x,C)})(n,r,a)}finally{p!==null&&p.observe(r,Eo),de=d,ue=c}}g!==null&&function(x,C,E,v,A){const M=Array.from(x._listeners.mutation),B=M.length;for(let P=0;P<B;P++){const[z,j]=M[P];for(const Q of j){const ae=C.get(Q);ae!==void 0&&z(ae,{dirtyLeaves:v,prevEditorState:A,updateTags:E})}}}(n,g,h,m,s),F(a)||a===null||o!==null&&o.is(a)||n.dispatchCommand(Yn,void 0);const w=n._pendingDecorators;w!==null&&(n._decorators=w,n._pendingDecorators=null,Dn("decorator",n,!0,w)),function(x,C,E){const v=Lo(C),A=Lo(E);v!==A&&Dn("textcontent",x,!0,A)}(n,t||s,e),Dn("update",n,!0,{dirtyElements:_,dirtyLeaves:m,editorState:e,mutatedNodes:g,normalizedNodes:b,prevEditorState:t||s,tags:h}),function(x,C){if(x._deferred=[],C.length!==0){const E=x._updating;x._updating=!0;try{for(let v=0;v<C.length;v++)C[v]()}finally{x._updating=E}}}(n,y),function(x){const C=x._updates;if(C.length!==0){const E=C.shift();if(E){const[v,A]=E;Zr(x,v,A)}}}(n)}function Dn(n,t,e,...r){const i=t._updating;t._updating=e;try{const s=Array.from(t._listeners[n]);for(let o=0;o<s.length;o++)s[o].apply(null,r)}finally{t._updating=i}}function Ao(n,t){const e=n._updates;let r=t||!1;for(;e.length!==0;){const i=e.shift();if(i){const[s,o]=i,a=n._pendingEditorState;let l;o!==void 0&&(l=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(a===null&&O(191),a._flushSync=!0),l&&n._deferred.push(l),Ll(n,o.tag)),a==null?Zr(n,s,o):s()}}return r}function Zr(n,t,e){const r=n._updateTags;let i,s=!1,o=!1;e!==void 0&&(i=e.onUpdate,Ll(n,e.tag),s=e.skipTransforms||!1,o=e.discrete||!1),i&&n._deferred.push(i);const a=n._editorState;let l=n._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=n._pendingEditorState=Il(l||a),c=!0),l._flushSync=o;const u=ue,d=Te,f=de,p=n._updating;ue=l,Te=!1,n._updating=!0,de=n;const g=n._headless||n.getRootElement()===null;bs(null);try{c&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=function(h,y){const S=h.getEditorState()._selection,w=De(Me(h));return F(S)||S==null?hs(S,w,h,y):S.clone()}(n,e&&e.event||null));const _=n._compositionKey;t(),s=Ao(n,s),function(h,y){const S=y.getEditorState()._selection,w=h._selection;if(F(w)){const x=w.anchor,C=w.focus;let E;if(x.type==="text"&&(E=x.getNode(),E.selectionTransform(S,w)),C.type==="text"){const v=C.getNode();E!==v&&v.selectionTransform(S,w)}}}(l,n),n._dirtyType!==0&&(s?function(h,y){const S=y._dirtyLeaves,w=h._nodeMap;for(const x of S){const C=w.get(x);I(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&ro(C)}}(l,n):function(h,y){const S=y._dirtyLeaves,w=y._dirtyElements,x=h._nodeMap,C=ut(),E=new Map;let v=S,A=v.size,M=w,B=M.size;for(;A>0||B>0;){if(A>0){y._dirtyLeaves=new Set;for(const P of v){const z=x.get(P);I(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&ro(z),z!==void 0&&ko(z,C)&&To(y,z,E),S.add(P)}if(v=y._dirtyLeaves,A=v.size,A>0){Sr++;continue}}y._dirtyLeaves=new Set,y._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const P of M){const z=P[0],j=P[1];if(w.set(z,j),!j)continue;const Q=x.get(z);Q!==void 0&&ko(Q,C)&&To(y,Q,E)}v=y._dirtyLeaves,A=v.size,M=y._dirtyElements,B=M.size,Sr++}y._dirtyLeaves=S,y._dirtyElements=w}(l,n),Ao(n),function(h,y,S,w){const x=h._nodeMap,C=y._nodeMap,E=[];for(const[v]of w){const A=C.get(v);A!==void 0&&(A.isAttached()||(k(A)&&$a(A,v,x,C,E,w),x.has(v)||w.delete(v),E.push(v)))}for(const v of E)C.delete(v);for(const v of S){const A=C.get(v);
11A===void 0||A.isAttached()||(x.has(v)||S.delete(v),C.delete(v))}}(a,l,n._dirtyLeaves,n._dirtyElements)),_!==n._compositionKey&&(l._flushSync=!0);const b=l._selection;if(F(b)){const h=l._nodeMap,y=b.anchor.key,S=b.focus.key;h.get(y)!==void 0&&h.get(S)!==void 0||O(19)}else ce(b)&&b._nodes.size===0&&(l._selection=null)}catch(_){return _ instanceof Error&&n._onError(_),n._pendingEditorState=a,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void nt(n)}finally{ue=u,Te=d,de=f,n._updating=p,Sr=0}n._dirtyType!==0||n._deferred.length>0||function(_,b){const h=b.getEditorState()._selection,y=_._selection;if(y!==null){if(y.dirty||!y.is(h))return!0}else if(h!==null)return!0;return!1}(l,n)?l._flushSync?(l._flushSync=!1,nt(n)):c&&Gd(()=>{nt(n)}):(l._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function Ve(n,t,e){de===n&&e===void 0?t():Zr(n,t,e)}class Pn{constructor(t,e,r){T(this,"element");T(this,"before");T(this,"after");this.element=t,this.before=e||null,this.after=r||null}withBefore(t){return new Pn(this.element,t,this.after)}withAfter(t){return new Pn(this.element,this.before,t)}withElement(t){return this.element===t?this:new Pn(t,this.before,this.after)}insertChild(t){const e=this.before||this.getManagedLineBreak();return e!==null&&e.parentElement!==this.element&&O(222),this.element.insertBefore(t,e),this}removeChild(t){return t.parentElement!==this.element&&O(223),this.element.removeChild(t),this}replaceChild(t,e){return e.parentElement!==this.element&&O(224),this.element.replaceChild(t,e),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const e=t==="decorator"&&(qn||pn||Gn);this.insertManagedLineBreak(e)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&e.removeChild(r),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===(e.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),t){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){let t=0;for(let e=this.after;e!==null;e=e.previousSibling)t++;return t}resolveChildIndex(t,e,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,i))]}const s=Fo(e,r);s.push(i);const o=Fo(e,this.element);let a=t.getIndexWithinParent();for(let l=0;l<o.length;l++){const c=s[l],u=o[l];if(c===void 0||c<u)break;if(c>u){a+=1;break}}return[t.getParentOrThrow(),a]}}function Fo(n,t){const e=[];let r=t;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;e.push(i)}return r!==n&&O(225),e.reverse()}class be extends ze{constructor(e){super(e);T(this,"__first");T(this,"__last");T(this,"__size");T(this,"__format");T(this,"__style");T(this,"__indent");T(this,"__dir");T(this,"__textFormat");T(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Yu[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let r=this.getFirstChild();for(;r!==null;)e.push(r),r=r.getNextSibling();return e}getChildrenKeys(){const e=[];let r=this.getFirstChild();for(;r!==null;)e.push(r.__key),r=r.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=q()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(e)}getAllTextNodes(){const e=[];let r=this.getFirstChild();for(;r!==null;){if(I(r)&&e.push(r),k(r)){const i=r.getAllTextNodes();e.push(...i)}r=r.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;k(e);){const r=e.getFirstChild();if(r===null)break;e=r}return e}getLastDescendant(){let e=this.getLastChild();for(;k(e);){const r=e.getLastChild();if(r===null)break;e=r}return e}getDescendantByIndex(e){const r=this.getChildren(),i=r.length;if(e>=i){const o=r[i-1];return k(o)&&o.getLastDescendant()||o||null}const s=r[e];return k(s)&&s.getFirstDescendant()||s||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:oe(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&O(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:oe(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&O(96,this.__key),e}getChildAtIndex(e){const r=this.getChildrenSize();let i,s;if(e<r/2){for(i=this.getFirstChild(),s=0;i!==null&&s<=e;){if(s===e)return i;i=i.getNextSibling(),s++}return null}for(i=this.getLastChild(),s=r-1;i!==null&&s>=e;){if(s===e)return i;i=i.getPreviousSibling(),s--}return null}getTextContent(){let e="";const r=this.getChildren(),i=r.length;for(let s=0;s<i;s++){const o=r[s];e+=o.getTextContent(),k(o)&&s!==i-1&&!o.isInline()&&(e+=pt)}return e}getTextContentSize(){let e=0;const r=this.getChildren(),i=r.length;for(let s=0;s<i;s++){const o=r[s];e+=o.getTextContentSize(),k(o)&&s!==i-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const r=qs[e];return(this.getFormat()&r)!==0}return!1}hasTextFormat(e){const r=Ce[e];return(this.getTextFormat()&r)!==0}getFormatFlags(e,r){return Pr(this.getLatest().__textFormat,e,r)}getTextStyle(){return this.getLatest().__textStyle}select(e,r){he();const i=R();let s=e,o=r;
11const a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&r===0){const c=this.getFirstChild();if(I(c)||k(c))return c.select(0,0)}else if(!(e!==void 0&&e!==a||r!==void 0&&r!==a)){const c=this.getLastChild();if(I(c)||k(c))return c.select()}}s===void 0&&(s=a),o===void 0&&(o=a);const l=this.__key;return F(i)?(i.anchor.set(l,s,"element"),i.focus.set(l,o,"element"),i.dirty=!0,i):Tl(l,s,l,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(r=>r.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const r=this.getWritable();return r.__dir=e,r}setFormat(e){return this.getWritable().__format=e!==""?qs[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const r=this.getWritable();return r.__textFormat=e,r}setTextStyle(e){const r=this.getWritable();return r.__textStyle=e,r}setIndent(e){return this.getWritable().__indent=e,this}splice(e,r,i){Ir(this)&&O(324,this.__key,this.__type);const s=this.getChildrenSize(),o=this.getWritable();e+r<=s||O(226,String(e),String(r),String(s));const a=o.__key,l=[],c=[],u=this.getChildAtIndex(e+r);let d=null,f=s-r+i.length;if(e!==0)if(e===s)d=this.getLastChild();else{const g=this.getChildAtIndex(e);g!==null&&(d=g.getPreviousSibling())}if(r>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){g===null&&O(100);const _=g.getNextSibling(),b=g.__key;Nt(g.getWritable()),c.push(b),g=_}}let p=d;for(const g of i){p!==null&&g.is(p)&&(d=p=p.getPreviousSibling());const m=g.getWritable();m.__parent===a&&f--,Nt(m);const _=g.__key;if(p===null)o.__first=_,m.__prev=null;else{const b=p.getWritable();b.__next=_,m.__prev=b.__key}g.__key===a&&O(76),m.__parent=a,l.push(_),p=g}if(e+r===s)p!==null&&(p.getWritable().__next=null,o.__last=p.__key);else if(u!==null){const g=u.getWritable();if(p!==null){const m=p.getWritable();g.__prev=p.__key,m.__next=u.__key}else g.__prev=null}if(o.__size=f,c.length){const g=R();if(F(g)){const m=new Set(c),_=new Set(l),{anchor:b,focus:h}=g;Oo(b,m,_)&&Dr(b,b.getNode(),this,d,u),Oo(h,m,_)&&Dr(h,h.getNode(),this,d,u),f!==0||this.canBeEmpty()||ge(this)||this.remove()}}return o}getDOMSlot(e){return new Pn(e)}exportDOM(e){const{element:r}=super.exportDOM(e);if(X(r)){const i=this.getIndent();i>0&&(r.style.paddingInlineStart=40*i+"px");const s=this.getDirection();s&&(r.dir=s)}return{element:r}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),i=this.getTextStyle();return r===0&&i===""||ge(this)||this.getChildren().some(I)||(r!==0&&(e.textFormat=r),i!==""&&(e.textStyle=i)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,r){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,r,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,r){const i=this.getDOMSlot(e);let s=i.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(s==null?(i.insertChild(a),s=a):s!==a&&i.replaceChild(a,s),s=s.nextSibling)}}}function k(n){return n instanceof be}function Oo(n,t,e){let r=n.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!e.has(i))return!0;r=r.getParent()}return!1}class Rl extends ze{decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function K(n){return n instanceof Rl}class bn extends be{constructor(){super("root");T(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new bn}getTopLevelElementOrThrow(){O(51)}getTextContent(){const e=this.__cachedText;return!Zn()&&q()._dirtyType!==0||e===null?super.getTextContent():e}remove(){O(52)}replace(e){O(53)}insertBefore(e){O(54)}insertAfter(e){O(55)}updateDOM(e,r){return!1}splice(e,r,i){for(const s of i)k(s)||K(s)||O(282);return super.splice(e,r,i)}static importJSON(e){return te().updateFromJSON(e)}collapseAtStart(){return!0}}function re(n){return n instanceof bn}function Il(n){return new Xn(new Map(n._nodeMap))}function ms(){return new Xn(new Map([["root",new bn]]))}function Ml(n){const t=n.exportJSON(),e=n.constructor;if(t.type!==e.getType()&&O(130,e.name),k(n)){const r=t.children;Array.isArray(r)||O(59,e.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const o=Ml(i[s]);r.push(o)}}return t}
11function jd(n){return n instanceof Xn}class Xn{constructor(t,e){T(this,"_nodeMap");T(this,"_selection");T(this,"_flushSync");T(this,"_readOnly");this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,e){return No(e&&e.editor||null,this,t)}clone(t){const e=new Xn(this._nodeMap,t===void 0?this._selection:t);return e._readOnly=!0,e}toJSON(){return No(null,this,()=>({root:Ml(te())}))}}class _s extends be{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class xn extends be{static getType(){return"paragraph"}static clone(t){return new xn(t.__key)}createDOM(t){const e=document.createElement("p"),r=an(t.theme,"paragraph");return r!==void 0&&e.classList.add(...r),e}updateDOM(t,e,r){return!1}static importDOM(){return{p:t=>({conversion:Kd,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(X(e)){this.isEmpty()&&e.append(document.createElement("br"));const r=this.getFormatType();r&&(e.style.textAlign=r)}return{element:e}}static importJSON(t){return Z().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const e=this.getChildren().find(I);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const r=Z();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,e),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||I(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Kd(n){const t=Z();return n.style&&(t.setFormat(n.style.textAlign),As(n,t)),{node:t}}function Z(){return we(new xn)}function ys(n){return n instanceof xn}const W=0,rt=1,Jd=3,Dl=4;function Pl(n,t,e,r){const i=n._keyToDOMMap;i.clear(),n._editorState=ms(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),t!==null&&(t.textContent=""),e!==null&&(e.textContent="",i.set("root",e))}function Hd(n){const t=new Set,e=new Set;let r=n;for(;r;){const{ownNodeConfig:i}=ti(r),s=r.transform;if(!e.has(s)){e.add(s);const o=r.transform();o&&t.add(o)}if(i){const o=i.$transform;o&&t.add(o),r=i.extends}else{const o=Object.getPrototypeOf(r);r=o.prototype instanceof ze&&o!==ze?o:void 0}}return t}function $l(n){const t=n||{},e=Ud(),r=t.theme||{},i=n===void 0?e:t.parentEditor||null,s=t.disableEvents||!1,o=ms(),a=t.namespace||(i!==null?i._config.namespace:Vl()),l=t.editorState,c=[bn,We,mn,_n,xn,_s,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable;let p;if(n===void 0&&e!==null)p=e._nodes;else{p=new Map;for(let m=0;m<c.length;m++){let _=c[m],b=null,h=null;if(typeof _!="function"){const w=_;_=w.replace,b=w.with,h=w.withKlass||null}ti(_);const y=_.getType(),S=Hd(_);p.set(y,{exportDOM:d&&d.export?d.export.get(_):void 0,klass:_,replace:b,replaceWithKlass:h,sharedNodeState:rd(c[m]),transforms:S})}}const g=new Rt(o,i,p,{disableEvents:s,namespace:a,theme:r},u||console.error,function(m,_){const b=new Map,h=new Set,y=S=>{Object.keys(S).forEach(w=>{let x=b.get(w);x===void 0&&(x=[],b.set(w,x)),x.push(S[w])})};return m.forEach(S=>{const w=S.klass.importDOM;if(w==null||h.has(w))return;h.add(w);const x=w.call(S.klass);x!==null&&y(x)}),_&&y(_),b}(p,d?d.import:void 0),f,n);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),function(m){m.registerCommand(Ga,yd,W),m.registerCommand(qa,bd,W),m.registerCommand(Ya,xd,W),m.registerCommand(Za,Sd,W),m.registerCommand(Xa,vd,W)}(g),g}class Rt{constructor(t,e,r,i,s,o,a,l){T(this,"_headless");T(this,"_parentEditor");T(this,"_rootElement");T(this,"_editorState");T(this,"_pendingEditorState");T(this,"_compositionKey");T(this,"_deferred");T(this,"_keyToDOMMap");T(this,"_updates");T(this,"_updating");T(this,"_listeners");T(this,"_commands");T(this,"_nodes");T(this,"_decorators");T(this,"_pendingDecorators");T(this,"_config");T(this,"_dirtyType");T(this,"_cloneNotNeeded");T(this,"_dirtyLeaves");T(this,"_dirtyElements");T(this,"_normalizedNodes");T(this,"_updateTags");T(this,"_observer");T(this,"_key");T(this,"_onError");T(this,"_htmlConversions");T(this,"_window");T(this,"_editable");T(this,"_blockCursorElement");T(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=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=i,this._nodes=r,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=Vl(),this._onError=s,this._htmlConversions=o,this._editable=a,this._headless=e!==null&&e._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const e=this._listeners.update;return e.add(t),()=>{e.delete(t)}}
11registerEditableListener(t){const e=this._listeners.editable;return e.add(t),()=>{e.delete(t)}}registerDecoratorListener(t){const e=this._listeners.decorator;return e.add(t),()=>{e.delete(t)}}registerTextContentListener(t){const e=this._listeners.textcontent;return e.add(t),()=>{e.delete(t)}}registerRootListener(t){const e=this._listeners.root;return t(this._rootElement,null),e.add(t),()=>{t(null,this._rootElement),e.delete(t)}}registerCommand(t,e,r){r===void 0&&O(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(t);s===void 0&&O(36,String(t));const o=s[r];return o.add(e),()=>{o.delete(e),s.every(a=>a.size===0)&&i.delete(t)}}registerMutationListener(t,e,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,s=this._listeners.mutation;let o=s.get(e);o===void 0&&(o=new Set,s.set(e,o)),o.add(i);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(e,i),()=>{o.delete(i),o.size===0&&s.delete(e)}}getRegisteredNode(t){const e=this._nodes.get(t.getType());return e===void 0&&O(37,t.name),e}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const r=this._editorState,i=zo(r).get(e.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&t(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const r=this.getRegisteredNode(t);return r.transforms.add(e),r}registerNodeTransform(t,e){const r=this.registerNodeTransformToKlass(t,e),i=[r],s=r.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,e);i.push(o)}return function(o,a){const l=zo(o.getEditorState()),c=[];for(const u of a){const d=l.get(u);d&&c.push(d)}c.length!==0&&o.update(()=>{for(const u of c)for(const d of u.keys()){const f=oe(d);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Tt}:void 0)}(this,i.map(o=>o.klass.getType())),()=>{i.forEach(o=>o.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return D(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const r=an(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Pl(this,e,t,i),e!==null&&(this._config.disableEvents||Cd(e),r!=null&&e.classList.remove(...r)),t!==null){const s=Ns(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=2,Ua(this),this._updateTags.add(Tt),nt(this),this._config.disableEvents||function(a,l){const c=a.ownerDocument;zi.set(a,c);const u=Lr.get(c)??0;u<1&&c.addEventListener("selectionchange",xl),Lr.set(c,u+1),a.__lexicalEditor=l;const d=bl(a);for(let f=0;f<$i.length;f++){const[p,g]=$i[f],m=typeof g=="function"?_=>{uo(_)||(co(_),(l.isEditable()||p==="click")&&g(_,l))}:_=>{if(uo(_))return;co(_);const b=l.isEditable();switch(p){case"cut":return b&&D(l,fs,_);case"copy":return D(l,Gr,_);case"paste":return b&&D(l,Jr,_);case"dragstart":return b&&D(l,cl,_);case"dragover":return b&&D(l,ul,_);case"dragend":return b&&D(l,hd,_);case"focus":return b&&D(l,dl,_);case"blur":return b&&D(l,fl,_);case"drop":return b&&D(l,al,_)}};a.addEventListener(p,m),d.push(()=>{a.removeEventListener(p,m)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(Tt),nt(this);Dn("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,e){t.isEmpty()&&O(38);let r=t;r._readOnly&&(r=Il(t),r._selection=t._selection?t._selection.clone():null),Ba(this);const i=this._pendingEditorState,s=this._updateTags,o=e!==void 0?e.tag:null;i===null||i.isEmpty()||(o!=null&&s.add(o),nt(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||nt(this)}parseEditorState(t,e){return function(r,i,s){const o=ms(),a=ue,l=Te,c=de,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,ue=o,Te=!1,de=i,bs(null);try{const g=i._nodes;ps(r.root,g),s&&s(),o._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=p,ue=a,Te=l,de=c}return o}(typeof t=="string"?JSON.parse(t):t,this,e)}read(t){return nt(this),this.getEditorState().read(t,{editor:this})}update(t,e){(function(r,i,s){r._updating?r._updates.push([i,s]):Zr(r,i,s)})(this,t,e)}focus(t,e={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Ve(this,()=>{const i=R(),s=te();i!==null?i.dirty||xe(i.clone()):s.getChildrenSize()!==0&&(e.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),Xd("focus"),Qd(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const e=De(this._window);e!==null&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Dn("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}T(Rt,"version");Rt.version="0.39.0+prod.esm";let Gi=null;function bs(n){Gi=n}let Vd=1;function zl(n,t){const e=xs(n,t);return e===void 0&&O(30,t),e}function xs(n,t){return n._nodes.get(t)}const Gd=typeof queueMicrotask=="function"?queueMicrotask:n=>
11{Promise.resolve().then(n)};function Bl(n){return K(mt(n))}function Ss(n){const t=document.activeElement;if(!X(t))return!1;const e=t.nodeName;return K(mt(n))&&(e==="INPUT"||e==="TEXTAREA"||t.contentEditable==="true"&&Xr(t)==null)}function Qn(n,t,e){const r=n.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(e)&&t!==null&&!Ss(t)&&Ul(t)===n}catch{return!1}}function vs(n){return n instanceof Rt}function Ul(n){let t=n;for(;t!=null;){const e=Xr(t);if(vs(e))return e;t=er(t)}return null}function Xr(n){return n?n.__lexicalEditor:null}function kt(n){return qr(n)||n.isToken()}function et(n){return kt(n)||n.isSegmented()}function at(n){return Sn(n)&&n.nodeType===3}function Wl(n){return Sn(n)&&n.nodeType===9}function fn(n){let t=n;for(;t!=null;){if(at(t))return t;t=t.firstChild}return null}function Pr(n,t,e){const r=Ce[t];if(e!==null&&(n&r)===(e&r))return n;let i=n^r;return t==="subscript"?i&=~Ce.superscript:t==="superscript"?i&=~Ce.subscript:t==="lowercase"?(i&=~Ce.uppercase,i&=~Ce.capitalize):t==="uppercase"?(i&=~Ce.lowercase,i&=~Ce.capitalize):t==="capitalize"&&(i&=~Ce.lowercase,i&=~Ce.uppercase),i}function Cs(n){return I(n)||it(n)||K(n)}function qd(n,t){const e=function(){const o=Gi;return Gi=null,o}();if((t=t||e&&e.__key)!=null)return void(n.__key=t);he(),Fl();const r=q(),i=yt(),s=""+Vd++;i._nodeMap.set(s,n),k(n)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=1,n.__key=s}function Nt(n){const t=n.getParent();if(t!==null){const e=n.getWritable(),r=t.getWritable(),i=n.getPreviousSibling(),s=n.getNextSibling(),o=s!==null?s.__key:null,a=i!==null?i.__key:null,l=i!==null?i.getWritable():null,c=s!==null?s.getWritable():null;i===null&&(r.__first=o),s===null&&(r.__last=a),l!==null&&(l.__next=o),c!==null&&(c.__prev=a),e.__prev=null,e.__next=null,e.__parent=null,r.__size--}}function $r(n){Fl(),Ir(n)&&O(323,n.__key,n.__type);const t=n.getLatest(),e=t.__parent,r=yt(),i=q(),s=r._nodeMap,o=i._dirtyElements;e!==null&&function(l,c,u){let d=l;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}}(e,s,o);const a=t.__key;i._dirtyType=1,k(n)?o.set(a,!0):i._dirtyLeaves.add(a)}function pe(n){he();const t=q(),e=t._compositionKey;if(n!==e){if(t._compositionKey=n,e!==null){const r=oe(e);r!==null&&r.getWritable()}if(n!==null){const r=oe(n);r!==null&&r.getWritable()}}}function ut(){return Zn()?null:q()._compositionKey}function oe(n,t){const e=(t||yt())._nodeMap.get(n);return e===void 0?null:e}function jl(n,t){const e=Qr(n,q());return e!==void 0?oe(e,t):null}function Qr(n,t){return n[`__lexicalKey_${t._key}`]}function mt(n,t){let e=n;for(;e!=null;){const r=jl(e,t);if(r!==null)return r;e=er(e)}return null}function Kl(n){const t=n._decorators,e=Object.assign({},t);return n._pendingDecorators=e,e}function Lo(n){return n.read(()=>te().getTextContent())}function te(){return Jl(yt())}function Jl(n){return n._nodeMap.get("root")}function xe(n){he();const t=yt();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),t._selection=n}function en(n){const t=q(),e=function(r,i){let s=r;for(;s!=null;){const o=Qr(s,i);if(o!==void 0)return o;s=er(s)}return null}(n,t);return e===null?n===t.getRootElement()?oe("root"):null:oe(e)}function Hl(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function ws(n){const t=[];let e=n;for(;e!==null;)t.push(e),e=e._parentEditor;return t}function Vl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Gl(n){return at(n)?n.nodeValue:null}function Es(n,t,e){const r=De(Me(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let a=Gl(i);const l=mt(i);if(a!==null&&I(l)){if(a===jr&&e){const c=e.length;a=e,s=c,o=c}a!==null&&Ts(l,a,s,o,n)}}}function Ts(n,t,e,r,i){let s=n;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let a=t;(o||i)&&t[t.length-1]===jr&&(a=t.slice(0,-1));const l=s.getTextContent();if(i||a!==l){if(a===""){if(pe(null),Gn||pn||qn)s.remove();else{const m=q();setTimeout(()=>{m.update(()=>{s.isAttached()&&s.remove()})},20)}return}const c=s.getParent(),u=Wt(),d=s.getTextContentSize(),f=ut(),p=s.getKey();if(s.isToken()||f!==null&&p===f&&!o||F(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!s.canInsertTextBefore()&&!o||u.focus.key===n.__key&&u.focus.offset===d&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const g=R();if(!F(g)||e===null||r===null)return void Ro(s,a,g);if(g.setTextNodeRange(s,e,s,r),s.isSegmented()){const m=le(s.getTextContent());s.replace(m),s=m}Ro(s,a,g)}}}function Ro(n,t,e){if(n.setTextContent(t),F(e)){const r=n.getKey();for(const i of["anchor","focus"]){const s=e[i];s.type==="text"&&s.key===r&&(s.offset=ht(n,s.offset,"clamp"))}}}function gr(n,t,e){const r=t[e]||!1;return r==="any"||r===n[e]}function Yd(n,t){return gr(n,t,"altKey")&&gr(n,t,"ctrlKey")&&gr(n,t,"shiftKey")&&gr(n,t,"metaKey")}function G(n,t,e){return Yd(n,e)&&n.key.toLowerCase()===t.toLowerCase()}const Qe={ctrlKey:!Pe,metaKey:Pe},Io={altKey:Pe,ctrlKey:!Pe};function Mo(n){return n.key==="Backspace"}function Do(n){return G(n,"a",Qe)}
11function Zd(n){const t=te();if(F(n)){const e=n.anchor,r=n.focus,i=e.getNode().getTopLevelElementOrThrow().getParentOrThrow();return e.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),dn(n),n}{const e=t.select(0,t.getChildrenSize());return xe(dn(e)),e}}function an(n,t){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const e=n.__lexicalClassNameCache,r=e[t];if(r!==void 0)return r;const i=n[t];if(typeof i=="string"){const s=Da(i);return e[t]=s,s}return i}function ks(n,t,e,r,i){if(e.size===0)return;const s=r.__type,o=r.__key,a=t.get(s);a===void 0&&O(33,s);const l=a.klass;let c=n.get(l);c===void 0&&(c=new Map,n.set(l,c));const u=c.get(o),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(o,d?"updated":i)}function Po(n,t,e){const r=n.getParent();let i=e,s=n;return r!==null&&(t&&e===0?(i=s.getIndexWithinParent(),s=r):t||e!==s.getChildrenSize()||(i=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(t?i-1:i)}function qi(n,t){const e=n.offset;if(n.type==="element")return Po(n.getNode(),t,e);{const r=n.getNode();if(t&&e===0||!t&&e===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Po(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function ql(n){const t=Me(n).event,e=t&&t.inputType;return e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function D(n,t,e){return function(r,i,s){const o=ws(r);for(let a=4;a>=0;a--)for(let l=0;l<o.length;l++){const c=o[l],u=c._commands.get(i);if(u!==void 0){const d=u[a];if(d!==void 0){const f=Array.from(d),p=f.length;let g=!1;if(Ve(c,()=>{for(let m=0;m<p;m++)if(f[m](s,r))return void(g=!0)}),g)return g}}}return!1}(n,t,e)}function ei(n){return!re(n)&&!n.isLastChild()&&!n.isInline()}function It(n,t){const e=n._keyToDOMMap.get(t);return e===void 0&&O(75,t),e}function er(n){const t=n.assignedSlot||n.parentElement;return Zi(t)?t.host:t}function Yl(n){return Wl(n)?n:X(n)?n.ownerDocument:null}function Xd(n){he(),q()._updateTags.add(n)}function Qd(n){he(),q()._deferred.push(n)}function zr(n,t){let e=n.getParent();for(;e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function Ns(n){const t=Yl(n);return t?t.defaultView:null}function Me(n){const t=n._window;return t===null&&O(78),t}function ef(n){return k(n)&&n.isInline()||K(n)&&n.isInline()}function tf(n){let t=n.getParentOrThrow();for(;t!==null;){if(ge(t))return t;t=t.getParentOrThrow()}return t}function ge(n){return re(n)||k(n)&&n.isShadowRoot()}function we(n){const t=q(),e=n.getType(),r=xs(t,e);r===void 0&&O(200,n.constructor.name,e);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const o=i(n),a=o.constructor;return s!==null?o instanceof s||O(201,s.name,s.getType(),a.name,a.getType(),n.constructor.name,e):o instanceof n.constructor&&a!==n.constructor||O(202,a.name,a.getType(),n.constructor.name,e),o.__key===n.__key&&O(203,n.constructor.name,e,a.name,a.getType()),o}return n}function fi(n,t){!re(n.getParent())||k(t)||K(t)||O(99)}function nf(n){const t=oe(n);return t===null&&O(63,n),t}function gi(n){return(K(n)||k(n)&&!n.canBeEmpty())&&!n.isInline()}function Yi(n,t,e){e.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function De(n){return Ue?(n||window).getSelection():null}function rf(n){const t=Ns(n);return t?t.getSelection():null}function Zl(n){return X(n)&&n.tagName==="A"}function X(n){return Sn(n)&&n.nodeType===1}function Sn(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function Zi(n){return Sn(n)&&n.nodeType===11}function Xi(n){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(t)!==null}function Br(n){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(t)!==null}function ct(n){if(K(n)&&!n.isInline())return!0;if(!k(n)||ge(n))return!1;const t=n.getFirstChild(),e=t===null||it(t)||I(t)||t.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&e}function tr(){return q()}const $o=new WeakMap,sf=new Map;function zo(n){if(!n._readOnly&&n.isEmpty())return sf;n._readOnly||O(192);let t=$o.get(n);return t||(t=function(e){const r=new Map;for(const[i,s]of e._nodeMap){const o=s.__type;let a=r.get(o);a||(a=new Map,r.set(o,a)),a.set(i,s)}return r}(n),$o.set(n,t)),t}function Xl(n){const t=n.constructor.clone(n);return t.afterCloneFrom(n),t}function of(n){return(t=Xl(n))[Sl]=!0,t;var t}function As(n,t){const e=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(e/40);t.setIndent(r)}function af(n){n.__lexicalUnmanaged=!0}function lf(n){return n.__lexicalUnmanaged===!0}function Tn(n,t){return function(e,r){return Object.prototype.hasOwnProperty.call(e,r)}(n,t)&&n[t]!==ze[t]}function ti(n){const t=Ys in n.prototype?n.prototype[Ys]():void 0,e=function(o){if
11(!(o===ze||o.prototype instanceof ze)){let a="<unknown>",l="<unknown>";try{a=o.getType()}catch{}try{Rt.version&&(l=JSON.parse(Rt.version))}catch{}O(290,o.name,a,l)}return o===Rl||o===be||o===ze}(n),r=!e&&Tn(n,"getType")?n.getType():void 0;let i,s=r;if(t)if(r)i=t[r];else for(const[o,a]of Object.entries(t))s=o,i=a;if(!e&&s&&(Tn(n,"getType")||(n.getType=()=>s),Tn(n,"clone")||(n.clone=o=>(bs(o),new n)),Tn(n,"importJSON")||(n.importJSON=i&&i.$importJSON||(o=>new n().updateFromJSON(o))),!Tn(n,"importDOM")&&i)){const{importDOM:o}=i;o&&(n.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:s}}function cf(n){const t=tr();return he(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(n))).klass}const fe=(n,t)=>{let e=n;for(;e!=null&&!re(e);){if(t(e))return e;e=e.getParent()}return null},uf={next:"previous",previous:"next"};class Fs{constructor(t){T(this,"origin");this.origin=t}[Symbol.iterator](){return Ms({hasNext:Pt,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return _e(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return _e(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,e)),this}splice(t,e,r="next"){const i=r===this.direction?e:Array.from(e).reverse();let s=this;const o=this.getParentAtCaret(),a=new Map;for(let l=s.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();a.set(c.getKey(),c)}for(const l of i){if(a.size>0){const c=s.getNodeAtCaret();if(c){if(a.delete(c.getKey()),a.delete(l.getKey()),!(c.is(l)||s.origin.is(l))){const u=l.getParent();u&&u.is(o)&&l.remove(),c.replace(l)}}else c===null&&O(263,Array.from(a).join(" "))}else s.insert(l);s=_e(l,this.direction)}for(const l of a.values())l.remove();return this}}class Hn extends Fs{constructor(){super(...arguments);T(this,"type","child")}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Re(e,this.direction)}getParentCaret(e="root"){return _e(Os(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vn(this.direction);return _e(this.getNodeAtCaret(),e)||Re(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof Hn&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const df={root:re,shadowRoot:ge};function vn(n){return uf[n]}function Os(n,t="root"){return df[t](n)?null:n}class Mt extends Fs{constructor(){super(...arguments);T(this,"type","sibling")}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:_e(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return k(this.origin)?Re(this.origin,this.direction):null}getParentCaret(e="root"){return _e(Os(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vn(this.direction);return _e(this.getNodeAtCaret(),e)||Re(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Mt&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Mt||e instanceof Dt)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Dt extends Fs{constructor(e,r){super(e);T(this,"type","text");T(this,"offset");this.offset=r}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:$t(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return _e(Os(this.getParentAtCaret(),e),this.direction)}getFlipped(){return $t(this.origin,vn(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Dt&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Mt||e instanceof Dt)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return _e(this.origin,this.direction)}}function gt(n){return n instanceof Dt}function Pt(n){return n instanceof Mt}function Ge(n){return n instanceof Hn}const ff={next:class extends Dt{constructor(){super(...arguments);T(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Dt{constructor(){super(...arguments);T(this,"direction","previous")}
11getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},gf={next:class extends Mt{constructor(){super(...arguments);T(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Mt{constructor(){super(...arguments);T(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},hf={next:class extends Hn{constructor(){super(...arguments);T(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends Hn{constructor(){super(...arguments);T(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function _e(n,t){return n?new gf[t](n):null}function $t(n,t,e){return n?new ff[t](n,ht(n,e)):null}function ht(n,t,e="error"){const r=n.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(e!=="clamp"&&Ia(284,String(t),String(r),n.getKey()),i=i<0?0:r),i}function Bo(n,t){return new mf(n,t)}function Re(n,t){return k(n)?new hf[t](n):null}function pf(n){return n&&n.getChildCaret()||n}function Ls(n){return n&&pf(n.getAdjacentCaret())}class Rs{constructor(t,e,r){T(this,"type","node-caret-range");T(this,"direction");T(this,"anchor");T(this,"focus");this.anchor=t,this.focus=e,this.direction=r}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new Rs(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const s=this[i].getLatest();return gt(s)?function(o,a){const{direction:l,origin:c}=o,u=ht(c,a==="focus"?vn(l):l);return Bo(o,u-o.offset)}(s,i):null},e=t("anchor"),r=t("focus");if(e&&r){const{caret:i}=e,{caret:s}=r;if(i.isSameNodeCaret(s))return[Bo(i,s.offset-i.offset),null]}return[e,r]}iterNodeCarets(t="root"){const e=gt(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=gt(r),s=o=>o.isSameNodeCaret(r)?null:Ls(o)||o.getParentCaret(t);return Ms({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:e.isSameNodeCaret(r)?null:s(e),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class mf{constructor(t,e){T(this,"type","slice");T(this,"caret");T(this,"distance");this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,r=e+t;return r<e?[r,e]:[e,r]}getTextContent(){const[t,e]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,e)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:e}}=this,[r,i]=this.getSliceIndices(),s=t.getTextContent();return $t(t.setTextContent(s.slice(0,r)+s.slice(i)),e,r)}}function Is(n){return _t(n,_e(te(),n.direction))}function _f(n){return _t(n,n)}function _t(n,t){return n.direction!==t.direction&&O(265),new Rs(n,t,n.direction)}function Ms(n){const{initial:t,hasNext:e,step:r,map:i}=n;let s=t;return{[Symbol.iterator](){return this},next(){if(!e(s))return{done:!0,value:void 0};const o={done:!1,value:i(s)};return s=r(s),o}}}function Ql(n,t){const e=vr(n.origin,t.origin);switch(e===null&&O(275,n.origin.getKey(),t.origin.getKey()),e.type){case"same":{const r=n.type==="text",i=t.type==="text";return r&&i?function(s,o){return Math.sign(s-o)}(n.offset,t.offset):n.type===t.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return ec(e)}}function ec(n){const{a:t,b:e}=n,r=t.__key,i=e.__key;let s=t,o=e;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===i)return-1;if(o.__key===r)return 1}return s===null?1:-1}function hr(n,t){return t.is(n)}function Uo(n){return k(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function vr(n,t){if(n.is(t))return{commonAncestor:n,type:"same"};const e=new Map;for(let[r,i]=Uo(n);r;i=r,r=r.getParent())e.set(r,i);for(let[r,i]=Uo(t);r;i=r,r=r.getParent()){const s=e.get(r);if(s!==void 0)return s===null?(hr(n,r)||O(276),{commonAncestor:r,type:"ancestor"}):i===null?(hr(t,r)||O(277),{commonAncestor:r,type:"descendant"}):((k(s)||hr(n,s))&&(k(i)||hr(t,i))&&r.is(s.getParent())&&r.is(i.getParent())||O(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function ot(n,t){const{type:e,key:r,offset:i}=n,s=nf(n.key);return e==="text"?(I(s)||O(266,s.getType(),r),$t(s,t,i)):(k(s)||O(267,s.getType(),r),xf(s,n.offset,t))}function zt(n,t){const{origin:e,direction:r}=t,i=r==="next";gt(t)?n.set(e.getKey(),t.offset,"text"):Pt(t)?I(e)?n.set(e.getKey(),ht(e,r),"text"):n.set(e.getParentOrThrow().getKey(),e.getIndexWithinParent()+(i?1:0),"element"):(Ge(t)&&k(e)||O(268),n.set(e.getKey(),i?0:e.getChildrenSize(),"element"))}function yf(n){const t=R(),e=F(t)?t:kl();return Cr(e,n),xe(e),e}
11function Cr(n,t){zt(n.anchor,t.anchor),zt(n.focus,t.focus)}function Wo(n){const{anchor:t,focus:e}=n,r=ot(t,"next"),i=ot(e,"next"),s=Ql(r,i)<=0?"next":"previous";return _t(gn(r,s),gn(i,s))}function Ds(n){const{direction:t,origin:e}=n,r=_e(e,vn(t)).getNodeAtCaret();return r?_e(r,t):Re(e.getParentOrThrow(),t)}function jo(n,t="root"){const e=[n];for(let r=Ge(n)?n.getParentCaret(t):n.getSiblingCaret();r!==null;r=r.getParentCaret(t))e.push(Ds(r));return e}function hi(n){return!!n&&n.origin.isAttached()}function bf(n,t="removeEmptySlices"){if(n.isCollapsed())return n;const e="root",r="next";let i=t;const s=nc(n,r),o=jo(s.anchor,e),a=jo(s.focus.getFlipped(),e),l=new Set,c=[];for(const g of s.iterNodeCarets(e))if(Ge(g))l.add(g.origin.getKey());else if(Pt(g)){const{origin:m}=g;k(m)&&!l.has(m.getKey())||c.push(m)}for(const g of c)g.remove();for(const g of s.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,_=m.getTextContentSize(),b=Ds(_e(m,r)),h=m.getMode();if(Math.abs(g.distance)===_&&i==="removeEmptySlices"||h==="token"&&g.distance!==0)b.remove();else if(g.distance!==0){i="removeEmptySlices";let y=g.removeTextSlice();const S=g.caret.origin;if(h==="segmented"){const w=y.origin,x=le(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());b.replaceOrInsert(x),y=$t(x,r,y.offset)}S.is(o[0].origin)&&(o[0]=y),S.is(a[0].origin)&&(a[0]=y.getFlipped())}}let u,d;for(const g of o)if(hi(g)){u=Le(g);break}for(const g of a)if(hi(g)){d=Le(g);break}const f=function(g,m,_){if(!g||!m)return null;const b=g.getParentAtCaret(),h=m.getParentAtCaret();if(!b||!h)return null;const y=b.getParents().reverse();y.push(b);const S=h.getParents().reverse();S.push(h);const w=Math.min(y.length,S.length);let x;for(x=0;x<w&&y[x]===S[x];x++);const C=(A,M)=>{let B;for(let P=x;P<A.length;P++){const z=A[P];if(ge(z))return;!B&&M(z)&&(B=z)}return B},E=C(y,ct),v=E&&C(S,A=>_.has(A.getKey())&&ct(A));return E&&v?[E,v]:null}(u,d,l);if(f){const[g,m]=f;Re(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[u,d,...o,...a].find(hi);if(p)return _f(gn(Le(p),n.direction));O(269,JSON.stringify(o.map(g=>g.origin.__key)))}function Le(n){const t=function(i){let s=i;for(;Ge(s);){const o=Ls(s);if(!Ge(o))break;s=o}return s}(n.getLatest()),{direction:e}=t;if(I(t.origin))return gt(t)?t:$t(t.origin,e,e);const r=t.getAdjacentCaret();return Pt(r)&&I(r.origin)?$t(r.origin,e,vn(e)):t}function tc(n){return gt(n)&&n.offset!==ht(n.origin,n.direction)}function gn(n,t){return n.direction===t?n:n.getFlipped()}function nc(n,t){return n.direction===t?n:_t(gn(n.focus,t),gn(n.anchor,t))}function xf(n,t,e){let r=Re(n,"next");for(let i=0;i<t;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return gn(r,e)}function Sf(n,t){if(!t||n===t)return n;for(const e in t)if(n[e]!==t[e])return{...n,...t};return n}const rc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,vf=rc?L.useLayoutEffect:L.useEffect,pr={tag:Tt};function Cf({initialConfig:n,children:t}){const e=L.useMemo(()=>{const{theme:r,namespace:i,nodes:s,onError:o,editorState:a,html:l}=n,c=Du(null,r),u=$l({editable:n.editable,html:l,namespace:i,nodes:s,onError:d=>o(d,u),theme:r});return function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const p=te();if(p.isEmpty()){const g=Z();p.append(g);const m=rc?document.activeElement:null;(R()!==null||m!==null&&m===d.getRootElement())&&g.select()}},pr);else if(f!==null)switch(typeof f){case"string":{const p=d.parseEditorState(f);d.setEditorState(p,pr);break}case"object":d.setEditorState(f,pr);break;case"function":d.update(()=>{te().isEmpty()&&f(d)},pr)}}}(u,a),[u,c]},[]);return vf(()=>{const r=n.editable,[i]=e;i.setEditable(r===void 0||r)},[]),N.jsx(Ra.Provider,{value:e,children:t})}const wf=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Ef(n){return{initialValueFn:()=>n.isEditable(),subscribe:t=>n.registerEditableListener(t)}}function Tf(){return function(n){const[t]=Be(),e=L.useMemo(()=>n(t),[t,n]),[r,i]=L.useState(()=>e.initialValueFn()),s=L.useRef(r);return wf(()=>{const{initialValueFn:o,subscribe:a}=e,l=o();return s.current!==l&&(s.current=l,i(l)),a(c=>{s.current=c,i(c)})},[e,n]),r}(Ef)}function ic(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Qi=new Map;function sc(n){const t={};if(!n)return t;const e=n.split(";");for(const r of e)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(t[i.trim()]=s.trim())}return t}function Ko(n){let t=Qi.get(n);return t===void 0&&(t=sc(n),Qi.set(n,t)),t}function oc(n){const t=tr().getElementByKey(n.getKey());if(t===null)return null;const e=t.ownerDocument.defaultView;return e===null?null:e.getComputedStyle(t)}function ac(n){return oc(re(n)?n:n.getParentOrThrow())}function Jo(n){const t=ac(n);return t!==null&&t.direction==="rtl"}function lc(n,t,e="self"){const r=n.getStartEndPoints();if(t.isSelected(n)&&!et(t)&&r!==null){const[i,s]=r,o=n.isBackward(),a=i.getNode(),l=s.getNode(),c=t.is(a),u=t.is(l);if(c||u){const[d,f]=Hi(n),p=a.is(l),g=t.is(o?l:a),m=t.is(o?a:l);let _,b=0;p?(b=d>f?f:d,_=d>f?d:f):g?(b=o?f:d,_=void 0):m&&(b=0,_=o?d:f);const h=t.__text.slice(b,_);h!==t.__text&&(e==="clone"&&(t=of(t)),t.__text=h)}}return t}function Ho(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();const t=n.getNode();return k(t)||ic(177),n.offset===t.getChildrenSize()}function kf(n){const t=n.getStyle(),e=sc(t);Qi.set(t,e)}function Vo(n){return n.getNode().isAttached()}function Nf(n){let t=n;for(;t!==null&&!ge(t);){const e=t.getLatest(),r=t.getParent();e.getChildrenSize()===0&&t.remove(!0),t=r}}function pi(n,t,e=null){const r=n.getStartEndPoints(),i=r?r[0]:null,s=n.getNodes(),o=s.length;if(i!==null&&(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0)){const c=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),u=c.getChildren();let d=t();return d.setFormat(c.getFormatType()),d.setIndent(c.getIndent()),u.forEach(f=>d.append(f)),e&&(d=e.append(d)),void c.replace(d)}let a=null,l=[];for(let c=0;c<o;c++){const u=s[c];ge(u)?(mi(n,l,l.length,t,e),l=[],a=u):a===null||a!==null&&zr(u,a)?l.push(u):(mi(n,l,l.length,t,e),l=[u])}mi(n,l,l.length,t,e)}function mi(n,t,e,r,i=null){if(t.length===0)return;const s=t[0],o=new Map,a=[];let l=k(s)?s:s.getParentOrThrow();l.isInline()&&(l=l.getParentOrThrow());let c=!1;for(;l!==null;){const g=l.getPreviousSibling();if(g!==null){l=g,c=!0;break}if(l=l.getParentOrThrow(),ge(l))break}const u=new Set;for(let g=0;g<e;g++){const m=t[g];k(m)&&m.getChildrenSize()===0&&u.add(m.getKey())}const d=new Set;for(let g=0;g<e;g++){const m=t[g];let _=m.getParent();if(_!==null&&_.isInline()&&(_=_.getParent()),_!==null&&Cs(m)&&!d.has(m.getKey())){const b=_.getKey();if(o.get(b)===void 0){const h=r();h.setFormat(_.getFormatType()),h.setIndent(_.getIndent()),a.push(h),o.set(b,h),_.getChildren().forEac
11h(y=>{h.append(y),d.add(y.getKey()),k(y)&&y.getChildrenKeys().forEach(S=>d.add(S))}),Nf(_)}}else if(u.has(m.getKey())){k(m)||ic(179);const b=r();b.setFormat(m.getFormatType()),b.setIndent(m.getIndent()),a.push(b),m.remove(!0)}}if(i!==null)for(let g=0;g<a.length;g++){const m=a[g];i.append(m)}let f=null;if(ge(l))if(c)if(i!==null)l.insertAfter(i);else for(let g=a.length-1;g>=0;g--){const m=a[g];l.insertAfter(m)}else{const g=l.getFirstChild();if(k(g)&&(l=g),g===null)if(i)l.append(i);else for(let m=0;m<a.length;m++){const _=a[m];l.append(_),f=_}else if(i!==null)g.insertBefore(i);else for(let m=0;m<a.length;m++){const _=a[m];g.insertBefore(_),f=_}}else if(i)l.insertAfter(i);else for(let g=a.length-1;g>=0;g--){const m=a[g];l.insertAfter(m),f=m}const p=Wt();F(p)&&Vo(p.anchor)&&Vo(p.focus)?xe(p.clone()):f!==null?f.selectEnd():n.dirty=!0}function cc(n){const t=uc(n);return t!==null&&t.writingMode==="vertical-rl"}function uc(n){const t=n.anchor.getNode();return k(t)?oc(t):ac(t)}function Go(n,t){let e=cc(n)?!t:t;dc(n)&&(e=!e);const r=ot(n.focus,e?"previous":"next");if(tc(r))return!1;for(const i of Is(r)){if(Ge(i))return!i.origin.isInline();if(!k(i.origin)){if(K(i.origin))return!0;break}}return!1}function Af(n,t,e,r){n.modify(t?"extend":"move",e,r)}function dc(n){const t=uc(n);return t!==null&&t.direction==="rtl"}function qo(n,t,e){const r=dc(n);let i;i=cc(n)||r?!e:e,Af(n,t,i,"character")}function Ff(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const fc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Of=fc&&"documentMode"in document?document.documentMode:null;!(!fc||!("InputEvent"in window)||Of)&&"getTargetRanges"in new window.InputEvent("input");function gc(...n){const t=[];for(const e of n)if(e&&typeof e=="string")for(const[r]of e.matchAll(/\S+/g))t.push(r);return t}function Fe(...n){return()=>{for(let t=n.length-1;t>=0;t--)n[t]();n.length=0}}function me(n,...t){const e=gc(...t);e.length>0&&n.classList.add(...e)}function At(n,...t){const e=gc(...t);e.length>0&&n.classList.remove(...e)}function Lf(n){return n?n.getAdjacentCaret():null}function hc(n,t){let e=n;for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null}function Rf(n){const t=fe(n,e=>k(e)&&!e.isInline());return k(t)||Ff(4,n.__key),t}function dt(n,t){return n!==null&&Object.getPrototypeOf(n).constructor.name===t.name}function pc(n,t){const e=[],r=Array.from(n).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(t(i))e.push(i);else if(k(i))for(const s of If(i))r.push(s);return e}function If(n){return Mf(Re(n,"previous"))}function Mf(n){return Ms({hasNext:Pt,initial:n.getAdjacentCaret(),map:t=>t.origin.getLatest(),step:t=>t.getAdjacentCaret()})}const Df=Symbol.for("preact-signals");function Ps(){if(ln>1)return void ln--;let n,t=!1;for(;$n!==void 0;){let e=$n;for($n=void 0,es++;e!==void 0;){const r=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&mc(e))try{e.c()}catch(i){t||(n=i,t=!0)}e=r}}if(es=0,ln--,t)throw n}let H,$n;function Yo(n){const t=H;H=void 0;try{return n()}finally{H=t}}let ln=0,es=0,wr=0;function Zo(n){if(H===void 0)return;let t=n.n;return t===void 0||t.t!==H?(t={i:0,S:n,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,n.n=t,32&H.f&&n.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t):void 0}function ve(n,t){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function Pf(n,t){return new ve(n,t)}function mc(n){for(let t=n.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Xo(n){for(let t=n.s;t!==void 0;t=t.n){const e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){n.s=t;break}}}function _c(n){let t,e=n.s;for(;e!==void 0;){const r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):t=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}n.s=t}function Ht(n,t){ve.call(this,void 0),this.x=n,this.s=void 0,this.g=wr-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function yc(n){const t=n.u;if(n.u=void 0,typeof t=="function"){ln++;const e=H;H=void 0;try{t()}catch(r){throw n.f&=-2,n.f|=8,$s(n),r}finally{H=e,Ps()}}}function $s(n){for(let t=n.s;t!==void 0;t=t.n)t.S.U(t);n.x=void 0,n.s=void 0,yc(n)}function $f(n){if(H!==this)throw new Error("Out-of-order effect");_c(this),H=n,this.f&=-2,8&this.f&&$s(this),Ps()}function Xt(n,t){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function ts(n,t){const e=new Xt(n,t);try{e.c()}catch(i){throw e.d(),i}const r=e.d.bind(e);return r[Symbol.dispose]=r,r}function zf(n,t={}){const e={};for(const r in n){const i=t[r],s=Pf(i===void 0?n[r]:i);e[r]=s}return e}ve.prototype.brand=Df,ve.prototype.h=function(){return!0},ve.prototype.S=function(n){const t=this.t;t!==n&&n.e===void 0&&(n.x=t,this.t=n,t!==void 0?t.e=n:Yo(()=>{var e;(e=this.W)==null||e.call(this)}))},ve.prototype.U=function(n){if(this.t!==void 0){const t=n.e,e=n.x;t!==void 0&&(t.x=e,n.e=void 0),e!==void 0&&(e.e=t,n.x=void 0),n===this.t&&(this.t=e,e===void 0&&Yo(()=>{var r;(r=this.Z)==null||r.call(this)}))}},ve.prototype.subscribe=function(n){return ts(()=>{const t=this.value,e=H;H=void 0;try{n(t)}finally{H=e}},{name:"sub"})},ve.prototype.valueOf=function(){return this.value},ve.prototype.toString=function(){return this.value+""},ve.prototype.toJSON=function(){return this.value},ve.prototype.peek=function(){const n=H;H=void 0;try{return this.value}finally{H=n}}
11,Object.defineProperty(ve.prototype,"value",{get(){const n=Zo(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(es>100)throw new Error("Cycle detected");this.v=n,this.i++,wr++,ln++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ps()}}}}),Ht.prototype=new ve,Ht.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===wr))return!0;if(this.g=wr,this.f|=1,this.i>0&&!mc(this))return this.f&=-2,!0;const n=H;try{Xo(this),H=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return H=n,_c(this),this.f&=-2,!0},Ht.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}ve.prototype.S.call(this,n)},Ht.prototype.U=function(n){if(this.t!==void 0&&(ve.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}}
11,Object.defineProperty(Ht.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=Zo(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),Xt.prototype.c=function(){const n=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{n()}},Xt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,yc(this),Xo(this),ln++;const n=H;return H=this,$f.bind(this,n)},Xt.prototype.N=function(){2&this.f||(this.f|=2,this.o=$n,$n=this)},Xt.prototype.d=function(){this.f|=8,1&this.f||$s(this)},Xt.prototype.dispose=function(){this.d()};function Bf(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function Y(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function bc(n,t){if(n&&t&&!Array.isArray(t)&&typeof n=="object"&&typeof t=="object"){const e=n,r=t;for(const i in r)e[i]=bc(e[i],r[i]);return n}return t}const zs=0,ns=1,xc=2,_i=3,mr=4,Vt=5,yi=6,kn=7;function bi(n){return n.id===zs}function Sc(n){return n.id===xc}function Uf(n){return function(t){return t.id===ns}(n)||Y(305,String(n.id),String(ns)),Object.assign(n,{id:xc})}const Wf=new Set;class jf{constructor(t,e){T(this,"builder");T(this,"configs");T(this,"_dependency");T(this,"_peerNameSet");T(this,"extension");T(this,"state");T(this,"_signal");this.builder=t,this.extension=e,this.configs=new Set,this.state={id:zs}}mergeConfigs(){let t=this.extension.config||{};const e=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Sf;for(const r of this.configs)t=e(t,r);return t}init(t){const e=this.state;Sc(e)||Y(306,String(e.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},s=function(a,l,c){return Object.assign(a,{config:l,id:_i,registerState:c})}(e,this.mergeConfigs(),r);let o;this.state=s,this.extension.init&&(o=this.extension.init(t,s.config,r)),this.state=function(a,l,c){return Object.assign(a,{id:mr,initResult:l,registerState:c})}(s,o,i)}build(t){const e=this.state;let r;e.id!==mr&&Y(307,String(e.id),String(Vt)),this.extension.build&&(r=this.extension.build(t,e.config,e.registerState));const i={...e.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=function(s,o,a){return Object.assign(s,{id:Vt,output:o,registerState:a})}(e,r,i)}register(t,e){this._signal=e;const r=this.state;r.id!==Vt&&Y(308,String(r.id),String(Vt));const i=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=function(s){return Object.assign(s,{id:yi})}(r),()=>{const s=this.state;s.id!==kn&&Y(309,String(r.id),String(kn)),this.state=function(o){return Object.assign(o,{id:Vt})}(s),i&&i()}}afterRegistration(t){const e=this.state;let r;return e.id!==yi&&Y(310,String(e.id),String(yi)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,e.config,e.registerState)),this.state=function(i){return Object.assign(i,{id:kn})}(e),r}getSignal(){return this._signal===void 0&&Y(311),this._signal}getInitResult(){this.extension.init===void 0&&Y(312,this.extension.name);const t=this.state;return function(e){return e.id>=mr}(t)||Y(313,String(t.id),String(mr)),t.initResult}getInitPeer(t){const e=this.builder.extensionNameMap.get(t);return e?e.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return function(e){return e.id>=_i}(t)||Y(314,String(t.id),String(_i)),{config:t.config}}getPeer(t){const e=this.builder.extensionNameMap.get(t);return e?e.getExtensionDependency():void 0}getInitDependency(t){const e=this.builder.getExtensionRep(t);return e===void 0&&Y(315,this.extension.name,t.name),e.getExtensionInitDependency()}getDependency(t){const e=this.builder.getExtensionRep(t);return e===void 0&&Y(315,this.extension.name,t.name),e.getExtensionDependency()}getState(){const t=this.state;return function(e){return e.id>=kn}(t)||Y(316,String(t.id),String(kn)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Wf}getPeerNameSet(){let t=this._peerNameSet;
11return t||(t=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(e){return e.id>=Vt})(t)||Y(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const Qo={tag:Tt};function Kf(){const n=te();n.isEmpty()&&n.append(Z())}const Jf={config:{setOptions:Qo,updateOptions:Qo},init:({$initialEditorState:n=Kf})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:t,setOptions:e},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:s}=i;if(jd(s))n.setEditorState(s,e);else if(typeof s=="function")n.update(()=>{s(n)},t);else if(s&&(typeof s=="string"||typeof s=="object")){const o=n.parseEditorState(s);n.setEditorState(o,e)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[bn,We,mn,_n,xn]},ea=Symbol.for("@lexical/extension/LexicalBuilder");function ta(){}function Hf(n){throw n}function _r(n){return Array.isArray(n)?n:[n]}const xi="0.39.0+prod.esm";class zn{constructor(t){T(this,"roots");T(this,"extensionNameMap");T(this,"outgoingConfigEdges");T(this,"incomingEdges");T(this,"conflicts");T(this,"_sortedExtensionReps");T(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=xi,this.roots=t;for(const e of t)this.addExtension(e)}static fromExtensions(t){const e=[_r(Jf)];for(const r of t)e.push(_r(r));return new zn(e)}static maybeFromEditor(t){const e=t[ea];return e&&(e.PACKAGE_VERSION!==xi&&Y(292,e.PACKAGE_VERSION,xi),e instanceof zn||Y(293)),e}static fromEditor(t){const e=zn.maybeFromEditor(t);return e===void 0&&Y(294),e}constructEditor(){const{$initialEditorState:t,onError:e,...r}=this.buildCreateEditorArgs(),i=Object.assign($l({...r,...e?{onError:s=>{e(s,i)}}:{}}),{[ea]:this});for(const s of this.sortedExtensionReps())s.build(i);return i}buildEditor(){let t=ta;function e(){try{t()}finally{t=ta}}const r=Object.assign(this.constructEditor(),{dispose:e,[Symbol.dispose]:e});
11return t=Fe(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const e=this.extensionNameMap.get(t.name);if(e)return e.extension!==t&&Y(295,t.name),e}addEdge(t,e,r){const i=this.outgoingConfigEdges.get(t);i?i.set(e,r):this.outgoingConfigEdges.set(t,new Map([[e,r]]));const s=this.incomingEdges.get(e);s?s.add(t):this.incomingEdges.set(e,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&Y(296);const e=_r(t),[r]=e;typeof r.name!="string"&&Y(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&Y(298,r.name),!i){i=new jf(this,r),this.extensionNameMap.set(r.name,i);const s=this.conflicts.get(r.name);typeof s=="string"&&Y(299,r.name,s);for(const o of r.conflictsWith||[])this.extensionNameMap.has(o)&&Y(299,r.name,o),this.conflicts.set(o,r.name);for(const o of r.dependencies||[]){const a=_r(o);this.addEdge(r.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[o,a]of r.peerDependencies||[])this.addEdge(r.name,o,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],e=(r,i)=>{let s=r.state;if(Sc(s))return;const o=r.extension.name;var a;bi(s)||Y(300,o,i||"[unknown]"),bi(a=s)||Y(304,String(a.id),String(zs)),s=Object.assign(a,{id:ns}),r.state=s;const l=this.outgoingConfigEdges.get(o);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&e(u,o)}s=Uf(s),r.state=s,t.push(r)};for(const r of this.extensionNameMap.values())bi(r.state)&&e(r);for(const r of t)for(const[i,s]of this.outgoingConfigEdges.get(r.extension.name)||[])if(s.length>0){const o=this.extensionNameMap.get(i);if(o)for(const a of s)o.configs.add(a)}for(const[r,...i]of this.roots)if(i.length>0){const s=this.extensionNameMap.get(r.name);s===void 0&&Y(301,r.name);for(const o of i)s.configs.add(o)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const e=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],s=r.signal;for(const o of e){const a=o.register(t,s);a&&i.push(a)}for(const o of e){const a=o.afterRegistration(t);a&&i.push(a)}return Fe(...i)}buildCreateEditorArgs(){const t={},e=new Set,r=new Map,i=new Map,s={},o={},a=this.sortedExtensionReps();for(const u of a){const{extension:d}=u;if(d.onError!==void 0&&(t.onError=d.onError),d.disableEvents!==void 0&&(t.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(t.parentEditor=d.parentEditor),d.editable!==void 0&&(t.editable=d.editable),d.namespace!==void 0&&(t.namespace=d.namespace),d.$initialEditorState!==void 0&&(t.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of Bf(d)){if(typeof f!="function"){const p=r.get(f.replace);p&&Y(302,d.name,f.replace.name,p.extension.name),r.set(f.replace,u)}e.add(f)}if(d.html){if(d.html.export)for(const[f,p]of d.html.export.entries())i.set(f,p);d.html.import&&Object.assign(s,d.html.import)}d.theme&&bc(o,d.theme)}Object.keys(o).length>0&&(t.theme=o),e.size&&(t.nodes=[...e]);const l=Object.keys(s).length>0,c=i.size>0;(l||c)&&(t.html={},l&&(t.html.import=s),c&&(t.html.export=i));for(const u of a)u.init(t);return t.onError||(t.onError=Hf),t}}const Vf={name:"@lexical/react/ReactProvider"};function Gf(){return te().getTextContent()}function qf(n,t=!0){if(n)return!1;let e=Gf();return t&&(e=e.trim()),e===""}function Yf(n){if(!qf(n,!1))return!1;const t=te().getChildren(),e=t.length;if(e>1)return!1;for(let r=0;r<e;r++){const i=t[r];if(K(i))return!1;if(k(i)){if(!ys(i)||i.__indent!==0)return!1;const s=i.getChildren(),o=s.length;for(let a=0;a<o;a++){const l=s[r];if(!I(l))return!1}}}return!0}function vc(n){return()=>Yf(n)}function Zf(n){const t=window.location.origin,e=r=>{if(r.origin!==t)return;const i=n.getRootElement();if(document.activeElement!==i)return;const s=r.data;if(typeof s=="string"){let o;try{o=JSON.parse(s)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const a=o.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[c,u,d,f,p]=l;n.update(()=>{const g=R();if(F(g)){const m=g.anchor;let _=m.getNode(),b=0,h=0;if(I(_)&&c>=0&&u>=0&&(b=c,h=c+u,g.setTextNodeRange(_,b,_,h)),b===h&&d===""||(g.insertRawText(d),_=m.getNode()),I(_)){b=f,h=f+p;const y=_.getTextContentSize();b=b>y?y:b,h=h>y?y:h,g.setTextNodeRange(_,b,_,h)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",e,!0),()=>{window.removeEventListener("message",e,!0)}}function Cc(n,t){const e=Wl(t)?t.body.childNodes:t.childNodes;let r=[];const i=[];for(const s of e)if(!Tc.has(s.nodeName)){const o=kc(s,n,i,!1);o!==null&&(r=r.concat(o))}return function(s){for(const o of s)o.getNextSibling()instanceof _s&&o.insertAfter(st());for(const o of s){const a=o.getChildren();for(const l of a)o.insertBefore(l);o.remove()}}(i),r}function wc(n,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const e=document.createElement("div"),r=te().getChildren();for(let i=0;i<r.length;i++)Ec(n,r[i],e,t);return e.innerHTML}function Ec(n,t,e,r=null){let i=r===null||t.isSelected(r);const s=k(t)&&t.excludeFromCopy("html");let o=t;r!==null&&I(t)&&(o=lc(r,t,"clone"));const a=k(o)?o.getChildren():[],l=xs(n,o.getType());let c;c=l&&l.exportDOM!==void 0?l.exportDOM(n,o):o.exportDOM(n);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let p=0;p<a.length;p++){const g=a[p],m=Ec(n,g,f,r);!i&&k(t)&&m&&t.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!s){if((X(u)||Zi(u))&&u.append(f),e.append(u),d){const p=d.call(o,u);p&&(Zi(u)?u.replaceChildren(p):u.replaceWith(p))}}
11else e.append(f);return i}const Tc=new Set(["STYLE","SCRIPT"]);function kc(n,t,e,r,i=new Map,s){let o=[];if(Tc.has(n.nodeName))return o;let a=null;const l=function(g,m){const{nodeName:_}=g,b=m._htmlConversions.get(_.toLowerCase());let h=null;if(b!==void 0)for(const y of b){const S=y(g);S!==null&&(h===null||(h.priority||0)<=(S.priority||0))&&(h=S)}return h!==null?h.conversion:null}(n,t),c=l?l(n):null;let u=null;if(c!==null){u=c.after;const g=c.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(const[,m]of i)if(a=m(a,s),!a)break;a&&o.push(...Array.isArray(g)?g:[a])}c.forChild!=null&&i.set(n.nodeName,c.forChild)}const d=n.childNodes;let f=[];const p=(a==null||!ge(a))&&(a!=null&&Vi(a)||r);for(let g=0;g<d.length;g++)f.push(...kc(d[g],t,e,p,new Map(i),a));return u!=null&&(f=u(f)),Br(n)&&(f=Xf(n,f,p?()=>{const g=new _s;return e.push(g),g}:Z)),a==null?f.length>0?o=o.concat(f):Br(n)&&function(g){return g.nextSibling==null||g.previousSibling==null?!1:Xi(g.nextSibling)&&Xi(g.previousSibling)}(n)&&(o=o.concat(st())):k(a)&&a.append(...f),o}function Xf(n,t,e){const r=n.style.textAlign,i=[];let s=[];for(let o=0;o<t.length;o++){const a=t[o];if(Vi(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(s.push(a),o===t.length-1||o<t.length-1&&Vi(t[o+1])){const l=e();l.setFormat(r),l.append(...s),i.push(l),s=[]}}return i}function Ur(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Qf(n,t=R()){return t==null&&Ur(166),F(t)&&t.isCollapsed()||t.getNodes().length===0?"":wc(n,t)}function eg(n,t=R()){return t==null&&Ur(166),F(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(tg(n,t))}function na(n,t,e){const r=n.getData("application/x-lexical-editor");if(r)try{const a=JSON.parse(r);if(a.namespace===e._config.namespace&&Array.isArray(a.nodes))return ra(e,ng(a.nodes),t)}catch(a){console.error(a)}const i=n.getData("text/html"),s=n.getData("text/plain");if(i&&s!==i)try{const a=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l}(i),"text/html");return ra(e,Cc(e,a),t)}catch(a){console.error(a)}const o=s||n.getData("text/uri-list");if(o!=null)if(F(t)){const a=o.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l<a.length;l++){const c=R();if(F(c)){const u=a[l];u===` 12`||u===`\r 13`?c.insertParagraph():u===" "?c.insertNodes([yn()]):c.insertText(u)}}}else t.insertRawText(o)}function ra(n,t,e){n.dispatchCommand(cd,{nodes:t,selection:e}
13)||(e.insertNodes(t),function(r){if(F(r)&&r.isCollapsed()){const i=r.anchor;let s=null;const o=ot(i,"previous");if(o)if(gt(o))s=o.origin;else{const a=_t(o,Re(te(),"next").getFlipped());for(const l of a){if(I(l.origin)){s=l.origin;break}if(k(l.origin)&&!l.origin.isInline())break}}if(s&&I(s)){const a=s.getFormat(),l=s.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}}(e))}function Nc(n,t,e,r=[]){let i=t===null||e.isSelected(t);const s=k(e)&&e.excludeFromCopy("html");let o=e;t!==null&&I(o)&&(o=lc(t,o,"clone"));const a=k(o)?o.getChildren():[],l=function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Ur(58,d.name),k(c)){const f=u.children;Array.isArray(f)||Ur(59,d.name)}return u}(o);I(o)&&o.getTextContentSize()===0&&(i=!1);for(let c=0;c<a.length;c++){const u=a[c],d=Nc(n,t,u,l.children);!i&&k(e)&&d&&e.extractWithChild(u,t,"clone")&&(i=!0)}if(i&&!s)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return i}function tg(n,t){const e=[],r=te().getChildren();for(let i=0;i<r.length;i++)Nc(n,t,r[i],e);return{namespace:n._config.namespace,nodes:e}}function ng(n){const t=[];for(let e=0;e<n.length;e++){const r=n[e],i=Wd(r);I(i)&&kf(i),t.push(i)}return t}let Gt=null;async function ia(n,t,e){if(Gt!==null)return!1;if(t!==null)return new Promise((c,u)=>{n.update(()=>{c(sa(n,t,e))})});const r=n.getRootElement(),i=n._window||window,s=i.document,o=De(i);if(r===null||o===null)return!1;const a=s.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(s.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),o.removeAllRanges(),o.addRange(l),new Promise((c,u)=>{const d=n.registerCommand(Gr,f=>(dt(f,ClipboardEvent)&&(d(),Gt!==null&&(i.clearTimeout(Gt),Gt=null),c(sa(n,f,e))),!0),Dl);Gt=i.setTimeout(()=>{d(),Gt=null,c(!1)},50),s.execCommand("copy"),a.remove()})}function sa(n,t,e){if(e===void 0){const i=De(n._window),s=R();if(!s||s.isCollapsed()||!i)return!1;const o=i.anchorNode,a=i.focusNode;if(o!==null&&a!==null&&!Qn(n,o,a))return!1;e=rg(s)}t.preventDefault();const r=t.clipboardData;return r!==null&&(ig(r,e),!0)}const Ac=[["text/html",Qf],["application/x-lexical-editor",eg]];function rg(n=R()){const t={"text/plain":n?n.getTextContent():""};if(n){const e=tr();for(const[r,i]of Ac){const s=i(e,n);s!==null&&(t[r]=s)}}return t}function ig(n,t){for(const[e]of Ac)t[e]===void 0&&n.setData(e,"");for(const e in t){const r=t[e];r!==void 0&&n.setData(e,r)}}function oa(n,t){if(document.caretRangeFromPoint!==void 0){const e=document.caretRangeFromPoint(n,t);return e===null?null:{node:e.startContainer,offset:e.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const e=document.caretPositionFromPoint(n,t);return e===null?null:{node:e.offsetNode,offset:e.offset}}return null}const jt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,sg=jt&&"documentMode"in document?document.documentMode:null,og=jt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ag=!(!jt||!("InputEvent"in window)||sg)&&"getTargetRanges"in new window.InputEvent("input"),lg=jt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),aa=jt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,cg=jt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ug=jt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&og&&!cg,la=$("DRAG_DROP_PASTE_FILE");class ni extends be{static getType(){return"quote"}static clone(t){return new ni(t.__key)}createDOM(t){const e=document.createElement("blockquote");return me(e,t.theme.quote),e}updateDOM(t,e){return!1}static importDOM(){return{blockquote:t=>({conversion:dg,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(X(e)){this.isEmpty()&&e.append(document.createElement("br"));const r=this.getFormatType();r&&(e.style.textAlign=r);const i=this.getDirection();i&&(e.dir=i)}return{element:e}}static importJSON(t){return Bs().updateFromJSON(t)}insertNewAfter(t,e){const r=Z(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,e),r}collapseAtStart(){const t=Z();
13return this.getChildren().forEach(e=>t.append(e)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Bs(){return we(new ni)}class nr extends be{constructor(e,r){super(r);T(this,"__tag");this.__tag=e}static getType(){return"heading"}static clone(e){return new nr(e.__tag,e.__key)}getTag(){return this.__tag}setTag(e){const r=this.getWritable();return this.__tag=e,r}createDOM(e){const r=this.__tag,i=document.createElement(r),s=e.theme.heading;if(s!==void 0){const o=s[r];me(i,o)}return i}updateDOM(e,r,i){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:qt,priority:0}),h2:e=>({conversion:qt,priority:0}),h3:e=>({conversion:qt,priority:0}),h4:e=>({conversion:qt,priority:0}),h5:e=>({conversion:qt,priority:0}),h6:e=>({conversion:qt,priority:0}),p:e=>{const r=e.firstChild;return r!==null&&ca(r)?{conversion:()=>({node:null}),priority:3}:null},span:e=>ca(e)?{conversion:r=>({node:tn("h1")}),priority:3}:null}}exportDOM(e){const{element:r}=super.exportDOM(e);if(X(r)){this.isEmpty()&&r.append(document.createElement("br"));const i=this.getFormatType();i&&(r.style.textAlign=i);const s=this.getDirection();s&&(r.dir=s)}return{element:r}}static importJSON(e){return tn(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,r=!0){const i=e?e.anchor.offset:0,s=this.getLastDescendant(),o=!s||e&&e.anchor.key===s.getKey()&&i===s.getTextContentSize()||!e?Z():tn(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),i===0&&!this.isEmpty()&&e){const l=Z();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const e=this.isEmpty()?Z():tn(this.getTag());
13return this.getChildren().forEach(r=>e.append(r)),this.replace(e),!0}extractWithChild(){return!0}}function ca(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function qt(n){const t=n.nodeName.toLowerCase();let e=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(e=tn(t),n.style!==null&&(As(n,e),e.setFormat(n.style.textAlign))),{node:e}}function dg(n){const t=Bs();return n.style!==null&&(t.setFormat(n.style.textAlign),As(n,t)),{node:t}}function tn(n="h1"){return we(new nr(n))}function fg(n){return n instanceof nr}function yr(n){let t=null;if(dt(n,DragEvent)?t=n.dataTransfer:dt(n,ClipboardEvent)&&(t=n.clipboardData),t===null)return[!1,[],!1];const e=t.types,r=e.includes("Files"),i=e.includes("text/html")||e.includes("text/plain");return[r,Array.from(t.files),i]}function ua(n){const t=R();if(!F(t))return!1;const e=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const s=r[i],o=s.getKey();if(e.has(o))continue;const a=fe(s,c=>k(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!e.has(l)&&(e.add(l),n(a))}return e.size>0}function da(n){const t=mt(n);return K(t)}function Si(n){for(const t of["lowercase","uppercase","capitalize"])n.hasFormat(t)&&n.toggleFormat(t)}function gg(n){return Fe(n.registerCommand(us,t=>{const e=R();return!!ce(e)&&(e.clear(),!0)},W),n.registerCommand(Et,t=>{const e=R();return F(e)?(e.deleteCharacter(t),!0):!!ce(e)&&(e.deleteNodes(),!0)},W),n.registerCommand(jn,t=>{const e=R();return!!F(e)&&(e.deleteWord(t),!0)},W),n.registerCommand(Kn,t=>{const e=R();return!!F(e)&&(e.deleteLine(t),!0)},W),n.registerCommand(sn,t=>{const e=R();if(typeof t=="string")e!==null&&e.insertText(t);else{if(e===null)return!1;const r=t.dataTransfer;if(r!=null)na(r,e,n);else if(F(e)){const i=t.data;return i&&e.insertText(i),!0}}return!0},W),n.registerCommand(Di,()=>{const t=R();return!!F(t)&&(t.removeText(),!0)},W),n.registerCommand(He,t=>{const e=R();return!!F(e)&&(e.formatText(t),!0)},W),n.registerCommand(ll,t=>{const e=R();if(!F(e)&&!ce(e))return!1;const r=e.getNodes();for(const i of r){const s=fe(i,o=>k(o)&&!o.isInline());s!==null&&s.setFormat(t)}return!0},W),n.registerCommand(rn,t=>{const e=R();return!!F(e)&&(e.insertLineBreak(t),!0)},W),n.registerCommand(Wn,()=>{const t=R();return!!F(t)&&(t.insertParagraph(),!0)},W),n.registerCommand(fd,()=>(zd([yn()]),!0),W),n.registerCommand(gd,()=>ua(t=>{const e=t.getIndent();t.setIndent(e+1)}),W),n.registerCommand(oo,()=>ua(t=>{const e=t.getIndent();e>0&&t.setIndent(Math.max(0,e-1))}),W),n.registerCommand(tl,t=>{const e=R();if(ce(e)){const r=e.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if(F(e)){const r=qi(e.focus,!0);if(!t.shiftKey&&K(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},W),n.registerCommand(nl,t=>{const e=R();if(ce(e)){const r=e.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if(F(e)){if(function(i){const s=i.focus;return s.key==="root"&&s.offset===te().getChildrenSize()}(e))return t.preventDefault(),!0;const r=qi(e.focus,!1);if(!t.shiftKey&&K(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},W),n.registerCommand(el,t=>{const e=R();if(ce(e)){const r=e.getNodes();if(r.length>0)return t.preventDefault(),Jo(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!F(e))return!1;if(Go(e,!0)){const r=t.shiftKey;return t.preventDefault(),qo(e,r,!0),!0}return!1},W),n.registerCommand(Qa,t=>{const e=R();if(ce(e)){const i=e.getNodes();if(i.length>0)return t.preventDefault(),Jo(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!F(e))return!1;const r=t.shiftKey;return!!Go(e,!1)&&(t.preventDefault(),qo(e,r,!1),!0)},W),n.registerCommand(il,t=>{if(da(t.target))return!1;const e=R();if(F(e)){if(function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const s=i.getNode();if(re(s))return!1;const o=Rf(s);return o.getIndent()>0&&(o.is(s)||s.is(o.getFirstDescendant()))}(e))return t.preventDefault(),n.dispatchCommand(oo,void 0);if(aa&&navigator.language==="ko-KR")return!1}else if(!ce(e))return!1;return t.preventDefault(),n.dispatchCommand(Et,!0)},W),n.registerCommand(sl,t=>{if(da(t.target))return!1;const e=R();return!(!F(e)&&!ce(e))&&(t.preventDefault(),n.dispatchCommand(Et,!1))},W),n.registerCommand(Or,t=>{const e=R();if(!F(e))return!1;if(Si(e),t!==null){if((aa||lg||ug)&&ag)return!1;if(t.preventDefault(),t.shiftKey)return n.dispatchCommand(rn,!1)}return n.dispatchCommand(Wn,void 0)},W),n.registerCommand(ds,()=>{const t=R();return!!F(t)&&(n.blur(),!0)},W),n.registerCommand(al,t=>{const[,e]=yr(t);if(e.length>0){const i=oa(t.clientX,t.clientY);if(i!==null){const{offset:s,node:o}
13=i,a=mt(o);if(a!==null){const l=kl();if(I(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{const u=a.getParentOrThrow().getKey(),d=a.getIndexWithinParent()+1;l.anchor.set(u,d,"element"),l.focus.set(u,d,"element")}const c=dn(l);xe(c)}n.dispatchCommand(la,e)}return t.preventDefault(),!0}const r=R();return!!F(r)},W),n.registerCommand(cl,t=>{const[e]=yr(t),r=R();return!(e&&!F(r))},W),n.registerCommand(ul,t=>{const[e]=yr(t),r=R();if(e&&!F(r))return!1;const i=oa(t.clientX,t.clientY);if(i!==null){const s=mt(i.node);K(s)&&t.preventDefault()}return!0},W),n.registerCommand(Pi,()=>(Zd(),!0),W),n.registerCommand(Gr,t=>(ia(n,dt(t,ClipboardEvent)?t:null),!0),W),n.registerCommand(fs,t=>(async function(e,r){await ia(r,dt(e,ClipboardEvent)?e:null),r.update(()=>{const i=R();F(i)?i.removeText():ce(i)&&i.getNodes().forEach(s=>s.remove())})}(t,n),!0),W),n.registerCommand(Jr,t=>{const[,e,r]=yr(t);return e.length>0&&!r?(n.dispatchCommand(la,e),!0):Sn(t.target)&&Ss(t.target)?!1:R()!==null&&(function(i,s){i.preventDefault(),s.update(()=>{const o=R(),a=dt(i,InputEvent)||dt(i,KeyboardEvent)?null:i.clipboardData;a!=null&&o!==null&&na(a,o,s)},{tag:Ed})}(t,n),!0)},W),n.registerCommand(rl,t=>{const e=R();return F(e)&&Si(e),!1},W),n.registerCommand(ol,t=>{const e=R();return F(e)&&Si(e),!1},W))}function hg(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Us=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function pg({editor:n,ErrorBoundary:t}){return function(e,r){const[i,s]=L.useState(()=>e.getDecorators());return Us(()=>e.registerDecoratorListener(o=>{Er.flushSync(()=>{s(o)})}),[e]),L.useEffect(()=>{s(e.getDecorators())},[e]),L.useMemo(()=>{const o=[],a=Object.keys(i);for(let l=0;l<a.length;l++){const c=a[l],u=N.jsx(r,{onError:f=>e._onError(f),children:N.jsx(L.Suspense,{fallback:null,children:i[c]})}),d=e.getElementByKey(c);d!==null&&o.push(Er.createPortal(u,d,c))}return o},[r,i,e])}(n,t)}function mg({editor:n,ErrorBoundary:t}){return function(e){const r=zn.maybeFromEditor(e);if(r&&r.hasExtensionByName(Vf.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&hg(320,i);return!0}return!1}(n)?null:N.jsx(pg,{editor:n,ErrorBoundary:t})}function fa(n){return n.getEditorState().read(vc(n.isComposing()))}function _g({contentEditable:n,placeholder:t=null,ErrorBoundary:e}){const[r]=Be();return function(i){Us(()=>Fe(gg(i),Zf(i)),[i])}(r),N.jsxs(N.Fragment,{children:[n,N.jsx(yg,{content:t}),N.jsx(mg,{editor:r,ErrorBoundary:e})]})}function yg({content:n}){const[t]=Be(),e=function(i){const[s,o]=L.useState(()=>fa(i));return Us(()=>{function a(){const l=fa(i);o(l)}return a(),Fe(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),s}(t),r=Tf();return e?typeof n=="function"?n(r):n:null}const Fc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function bg({editor:n,ariaActiveDescendant:t,ariaAutoComplete:e,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:s,ariaExpanded:o,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:g,id:m,role:_="textbox",spellCheck:b=!0,style:h,tabIndex:y,"data-testid":S,...w},x){const[C,E]=L.useState(n.isEditable()),v=L.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?n.setRootElement(M):n.setRootElement(null)},[n]),A=L.useMemo(()=>function(...M){return B=>{for(const P of M)typeof P=="function"?P(B):P!=null&&(P.current=B)}}(x,v),[v,x]);return Fc(()=>(E(n.isEditable()),n.registerEditableListener(M=>{E(M)})),[n]),N.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?e:"none","aria-controls":C?r:void 0,"aria-describedby":i,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":C&&_==="combobox"?!!o:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:p,className:g,contentEditable:C,"data-testid":S,id:m,ref:A,role:_,spellCheck:b,style:h,tabIndex:y,...w})}const xg=L.forwardRef(bg);function ga(n){return n.getEditorState().read(vc(n.isComposing()))}const Sg=L.forwardRef(vg);function vg(n,t){const{placeholder:e,...r}=n,[i]=Be();return N.jsxs(N.Fragment,{children:[N.jsx(xg,{editor:i,...r,ref:t}),e!=null&&N.jsx(Cg,{editor:i,content:e})]})}function Cg({content:n,editor:t}){const e=function(o){const[a,l]=L.useState(()=>ga(o));return Fc(()=>{function c(){const u=ga(o);l(u)}return c(),Fe(o.registerUpdateListener(()=>{c()}
13),o.registerEditableListener(()=>{c()}))},[o]),a}(t),[r,i]=L.useState(t.isEditable());if(L.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(o=>{i(o)})),[t]),!e)return null;let s=null;return typeof n=="function"?s=n(r):n!==null&&(s=n),s===null?null:N.jsx("div",{"aria-hidden":!0,children:s})}function wg(n,t,e,r,i){if(n===null||e.size===0&&r.size===0&&!i)return 0;const s=t._selection,o=n._selection;if(i)return 1;if(!(F(s)&&F(o)&&o.isCollapsed()&&s.isCollapsed()))return 0;const a=function(b,h,y){const S=b._nodeMap,w=[];for(const x of h){const C=S.get(x);C!==void 0&&w.push(C)}for(const[x,C]of y){if(!C)continue;const E=S.get(x);E===void 0||re(E)||w.push(E)}return w}(t,e,r);if(a.length===0)return 0;if(a.length>1){const b=t._nodeMap,h=b.get(s.anchor.key),y=b.get(o.anchor.key);return h&&y&&!n._nodeMap.has(h.__key)&&I(h)&&h.__text.length===1&&s.anchor.offset===1?2:0}const l=a[0],c=n._nodeMap.get(l.__key);if(!I(c)||!I(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=s.anchor,p=o.anchor;if(f.key!==p.key||f.type!=="text")return 0;const g=f.offset,m=p.offset,_=d.length-u.length;return _===1&&m===g-1?2:_===-1&&m===g+1?3:_===-1&&m===g?4:0}function Eg(n,t){let e=Date.now(),r=0;return(i,s,o,a,l,c)=>{const u=Date.now();if(c.has(Ji))return r=0,e=u,2;
13const d=wg(i,s,a,l,n.isComposing()),f=(()=>{const p=o===null||o.editor===n,g=c.has(wd);if(!g&&p&&c.has(Tt))return 0;if(i===null)return 1;const m=s._selection;if(!(a.size>0||l.size>0))return m!==null?0:2;const _=typeof t=="number"?t:t.peek();return g===!1&&d!==0&&d===r&&u<e+_&&p||a.size===1&&function(b,h,y){const S=h._nodeMap.get(b),w=y._nodeMap.get(b),x=h._selection,C=y._selection;return!(F(x)&&F(C)&&x.anchor.type==="element"&&x.focus.type==="element"&&C.anchor.type==="text"&&C.focus.type==="text"||!I(S)||!I(w)||S.__parent!==w.__parent)&&JSON.stringify(h.read(()=>S.exportJSON()))===JSON.stringify(y.read(()=>w.exportJSON()))}(Array.from(a)[0],i,s)?0:1})();return e=u,r=d,f}}function ha(n){n.undoStack=[],n.redoStack=[],n.current=null}function Tg(n,t,e){const r=Eg(n,e);return Fe(n.registerCommand(Hr,()=>(function(s,o){const a=o.redoStack,l=o.undoStack;if(l.length!==0){const c=o.current,u=l.pop();c!==null&&(a.push(c),s.dispatchCommand(On,!0)),l.length===0&&s.dispatchCommand(Ln,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Ji})}}(n,t),!0),W),n.registerCommand(Vr,()=>(function(s,o){const a=o.redoStack,l=o.undoStack;if(a.length!==0){const c=o.current;c!==null&&(l.push(c),s.dispatchCommand(Ln,!0));const u=a.pop();a.length===0&&s.dispatchCommand(On,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Ji})}}(n,t),!0),W),n.registerCommand(pd,()=>(ha(t),!1),W),n.registerCommand(md,()=>(ha(t),n.dispatchCommand(On,!1),n.dispatchCommand(Ln,!1),!0),W),n.registerUpdateListener(({editorState:s,prevEditorState:o,dirtyLeaves:a,dirtyElements:l,tags:c})=>{const u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&s===p)return;const g=r(o,s,u,a,l,c);if(g===1)d.length!==0&&(t.redoStack=[],n.dispatchCommand(On,!1)),u!==null&&(f.push({...u}),n.dispatchCommand(Ln,!0));else if(g===2)return;t.current={editor:n,editorState:s}}))}function kg(){return{current:null,redoStack:[],undoStack:[]}}function Ng({delay:n,externalHistoryState:t}){const[e]=Be();return function(r,i,s=1e3){const o=L.useMemo(()=>i||kg(),[i]);L.useEffect(()=>Tg(r,o,s),[s,r,o])}(e,t,n),null}function ft(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function rs(n){let t=1,e=n.getParent();for(;e!=null;){if(V(e)){const r=e.getParent();if(U(r)){t++,e=r.getParent();continue}ft(40)}return t}return t}function is(n){let t=n.getParent();U(t)||ft(40);let e=t;for(;e!==null;)e=e.getParent(),U(e)&&(t=e);return t}function Oc(n){let t=[];const e=n.getChildren().filter(V);for(let r=0;r<e.length;r++){const i=e[r],s=i.getFirstChild();U(s)?t=t.concat(Oc(s)):t.push(i)}return t}function Je(n){return V(n)&&U(n.getFirstChild())}function pa(n){return Ie().append(n)}function Lc(n,t){return V(n)&&(t.length===0||t.length===1&&n.is(t[0])&&n.getChildrenSize()===0)}function ma(n){const t=R();if(t!==null){let e=t.getNodes();if(F(t)){const i=t.getStartEndPoints();i===null&&ft(143);const[s]=i,o=s.getNode(),a=o.getParent();if(ge(o)){const l=o.getFirstChild();if(l)e=l.selectStart().getNodes();else{const c=Z();o.append(c),e=c.select().getNodes()}}else if(Lc(o,e)){const l=Ae(n);if(ge(a)){o.replace(l);const c=Ie();k(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),l.append(c)}else if(V(o)){const c=o.getParentOrThrow();Bt(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let i=0;i<e.length;i++){const s=e[i];if(k(s)&&s.isEmpty()&&!V(s)&&!r.has(s.getKey())){_a(s,n);continue}let o=Cs(s)?s.getParent():V(s)&&s.isEmpty()?s:null;for(;o!=null;){const a=o.getKey();if(U(o)){if(!r.has(a)){const l=Ae(n);Bt(l,o.getChildren()),o.replace(l),r.add(a)}break}{const l=o.getParent();if(ge(l)&&!r.has(a)){r.add(a),_a(o,n);break}o=l}}}}}function Bt(n,t){n.splice(n.getChildrenSize(),0,t)}function _a(n,t){if(U(n))return n;const e=n.getPreviousSibling(),r=n.getNextSibling(),i=Ie();let s;if(Bt(i,n.getChildren()),U(e)&&t===e.getListType())e.append(i),U(r)&&t===r.getListType()&&(Bt(e,r.getChildren()),r.remove()),s=e;else if(U(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),s=r;else{const o=Ae(t);o.append(i),n.replace(o),s=o}return i.setFormat(n.getFormatType()),i.setIndent(n.getIndent()),n.remove(),s}function Ws(n,t){const e=n.getLastChild(),r=t.getFirstChild();e&&r&&Je(e)&&Je(r)&&(Ws(e.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&n.append(...i),t.remove()}function Ag(){const n=R();if(F(n)){const t=new Set,e=n.getNodes(),r=n.anchor.getNode();if(Lc(r,e))t.add(is(r));else for(let i=0;i<e.length;i++){const s=e[i];if(Cs(s)){const o=hc(s,Cn);o!=null&&t.add(is(o))}}for(const i of t){let s=i;const o=Oc(i);for(const a of o){const l=Z().setTextStyle(n.style).setTextFormat(n.format);Bt(l,a.getChildren()),s.insertAfter(l),s=l,a.__key===n.anchor.key&&zt(n.anch
13or,Le(Re(l,"next"))),a.__key===n.focus.key&&zt(n.focus,Le(Re(l,"next"))),a.remove()}i.remove()}}}function Rc(n){const t=n.getListType()!=="check";let e=n.getStart();for(const r of n.getChildren())V(r)&&(r.getValue()!==e&&r.setValue(e),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),U(r.getFirstChild())||e++)}function Fg(n){const t=new Set;if(Je(n)||t.has(n.getKey()))return;const e=n.getParent(),r=n.getNextSibling(),i=n.getPreviousSibling();if(Je(r)&&Je(i)){const s=i.getFirstChild();if(U(s)){s.append(n);const o=r.getFirstChild();U(o)&&(Bt(s,o.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Je(r)){const s=r.getFirstChild();if(U(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(n)}}else if(Je(i)){const s=i.getFirstChild();U(s)&&s.append(n)}else if(U(e)){const s=Ie().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),o=Ae(e.getListType()).setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle());s.append(o),o.append(n),i?i.insertAfter(s):r?r.insertBefore(s):e.append(s)}}function Og(n){if(Je(n))return;const t=n.getParent(),e=t?t.getParent():void 0;if(U(e?e.getParent():void 0)&&V(e)&&U(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(n.is(r))e.insertBefore(n),t.isEmpty()&&e.remove();else if(n.is(i))e.insertAfter(n),t.isEmpty()&&e.remove();else{const s=t.getListType(),o=Ie(),a=Ae(s);
13o.append(a),n.getPreviousSiblings().forEach(u=>a.append(u));const l=Ie(),c=Ae(s);l.append(c),Bt(c,n.getNextSiblings()),e.insertBefore(o),e.insertAfter(l),e.replace(n)}}}function Lg(){const n=R();if(!F(n)||!n.isCollapsed())return!1;const t=n.anchor.getNode();if(!V(t)||t.getChildrenSize()!==0)return!1;const e=is(t),r=t.getParent();U(r)||ft(40);const i=r.getParent();let s;if(ge(i))s=Z(),e.insertAfter(s);else{if(!V(i))return!1;s=Ie(),i.insertAfter(s)}s.setTextStyle(n.style).setTextFormat(n.format).select();const o=t.getNextSiblings();if(o.length>0){const a=Ae(r.getListType());if(V(s)){const l=Ie();l.append(a),s.insertAfter(l)}else s.insertAfter(a);a.append(...o)}return function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const c=l.getParent();if(c==null||!V(c)&&!U(c))break;l=c}l.remove()}(t),!0}function Wr(...n){const t=[];for(const e of n)if(e&&typeof e=="string")for(const[r]of e.matchAll(/\S+/g))t.push(r);return t}let Cn=class extends be{constructor(e=1,r=void 0,i){super(i);T(this,"__value");T(this,"__checked");this.__value=e===void 0?1:e,this.__checked=r}$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const r=e.getParent();U(r)&&r.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:be,importDOM:{li:()=>({conversion:Rg,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const r=document.createElement("li");return this.updateListItemDOM(null,r,e),r}updateListItemDOM(e,r,i){(function(a,l,c){const u=l.getParent();!U(u)||u.getListType()!=="check"||U(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,e),r.value=this.__value,function(a,l,c){const u=[],d=[],f=l.list,p=f?f.listitem:void 0;let g;if(f&&f.nested&&(g=f.nested.listitem),p!==void 0&&u.push(...Wr(p)),f){const m=c.getParent(),_=U(m)&&m.getListType()==="check",b=c.getChecked();_&&!b||d.push(f.listitemUnchecked),_&&b||d.push(f.listitemChecked),_&&u.push(b?f.listitemChecked:f.listitemUnchecked)}if(g!==void 0){const m=Wr(g);c.getChildren().some(_=>U(_))?u.push(...m):d.push(...m)}d.length>0&&At(a,...d),u.length>0&&me(a,...u)}(r,i.theme,this);const s=e?e.__style:"",o=this.__style;s!==o&&(o===""?r.removeAttribute("style"):r.style.cssText=o),function(a,l,c){const u=Ko(l.__textStyle);for(const d in u)a.style.setProperty(`--listitem-marker-${d}`,u[d]);if(c)for(const d in Ko(c.__textStyle))d in u||a.style.removeProperty(`--listitem-marker-${d}`)}(r,this,e)}updateDOM(e,r,i){const s=r;return this.updateListItemDOM(e,s,i),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const r=this.createDOM(e._config),i=this.getFormatType();i&&(r.style.textAlign=i);const s=this.getDirection();return s&&(r.dir=s),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let r=0;r<e.length;r++){const i=e[r];if(k(i)&&this.canMergeWith(i)){const s=i.getChildren();this.append(...s),i.remove()}else super.append(i)}return this}replace(e,r){if(V(e))return super.replace(e);this.setIndent(0);const i=this.getParentOrThrow();if(!U(i))return e;if(i.__first===this.getKey())i.insertBefore(e);else if(i.__last===this.getKey())i.insertAfter(e);else{const s=Ae(i.getListType());let o=this.getNextSibling();for(;o;){const a=o;o=o.getNextSibling(),s.append(a)}i.insertAfter(e),e.insertAfter(s)}
13return r&&(k(e)||ft(139),this.getChildren().forEach(s=>{e.append(s)})),this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,r=!0){const i=this.getParentOrThrow();if(U(i)||ft(39),V(e))return super.insertAfter(e,r);const s=this.getNextSiblings();if(i.insertAfter(e,r),s.length!==0){const o=Ae(i.getListType());s.forEach(a=>o.append(a)),e.insertAfter(o,r)}return e}remove(e){const r=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),r&&i&&Je(r)&&Je(i)&&(Ws(r.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(e,r=!0){const i=Ie().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,r),i}collapseAtStart(e){const r=Z();this.getChildren().forEach(a=>r.append(a));const i=this.getParentOrThrow(),s=i.getParentOrThrow(),o=V(s);if(i.getChildrenSize()===1)if(o)i.remove(),s.select();else{i.insertBefore(r),i.remove();const a=e.anchor,l=e.focus,c=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else i.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const r=this.getWritable();return r.__value=e,r}getChecked(){const e=this.getLatest();let r;const i=this.getParent();return U(i)&&(r=i.getListType()),r==="check"?!!e.__checked:void 0}setChecked(e){const r=this.getWritable();return r.__checked=e,r}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let r=e.getParentOrThrow(),i=0;for(;V(r);)r=r.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){typeof e!="number"&&ft(117),(e=Math.floor(e))>=0||ft(199);let r=this.getIndent();for(;r!==e;)r<e?(Fg(this),r++):(Og(this),r--);return this}canInsertAfter(e){return V(e)}canReplaceWith(e){return V(e)}canMergeWith(e){return V(e)||ys(e)}extractWithChild(e,r){if(!F(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Ae("bullet")}canMergeWhenEmpty(){return!0}};function Rg(n){if(n.classList.contains("task-list-item")){for(const e of n.children)if(e.tagName==="INPUT")return ya(e)}if(n.classList.contains("joplin-checkbox")){for(const e of n.children)if(e.classList.contains("checkbox-wrapper")&&e.children.length>0&&e.children[0].tagName==="INPUT")return ya(e.children[0])}const t=n.getAttribute("aria-checked");return{node:Ie(t==="true"||t!=="false"&&void 0)}}function ya(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:Ie(n.hasAttribute("checked"))}}function Ie(n){return we(new Cn(void 0,n))}function V(n){return n instanceof Cn}class wn extends be{constructor(e="number",r=1,i){super(i);T(this,"__tag");T(this,"__start");T(this,"__listType");const s=Mg[e]||e;this.__listType=s,this.__tag=s==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:e=>{(function(r){const i=r.getNextSibling();U(i)&&r.getListType()===i.getListType()&&Ws(r,i)})(e),Rc(e)},extends:be,importDOM:{ol:()=>({conversion:xa,priority:0}),ul:()=>({conversion:xa,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const r=this.getWritable();return r.__listType=e,r.__tag=e==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const r=this.getWritable();return r.__start=e,r}createDOM(e,r){const i=this.__tag,s=document.createElement(i);return this.__start!==1&&s.setAttribute("start",String(this.__start)),s.__lexicalListType=this.__listType,ba(s,e.theme,this),s}updateDOM(e,r,i){return e.__tag!==this.__tag||e.__listType!==this.__listType||(ba(r,i.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const r=this.createDOM(e._config,e);return X(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,r,i){let s=i;for(let o=0;o<i.length;o++){const a=i[o];V(a)||(s===i&&(s=[...i]),s[o]=Ie().append(!k(a)||U(a)||a.isInline()?a:le(a.getTextContent())))}return super.splice(e,r,s)}extractWithChild(e){return V(e)}}function ba(n,t,e){const r=[],i=[],s=t.list;if(s!==void 0){const o=s[`${e.__tag}Depth`]||[],a=rs(e)-1,l=a%o.length,c=o[l],u=s[e.__tag];let d;const f=s.nested,p=s.checklist;if(f!==void 0&&f.list&&(d=f.list),u!==void 0&&r.push(u),p!==void 0&&e.__listType==="check"&&r.push(p),c!==void 0){r.push(...Wr(c));for(let g=0;g<o.length;g++)g!==l&&i.push(e.__tag+g)}if(d!==void 0){const g=Wr(d);a>1?r.push(...g):i.push(...g)}}i.length>0&&At(n,...i),r.length>0&&me(n,...r)}function Ig(n){const t=[];for(let e=0;e<n.length;e++){const r=n[e];if(V(r)){t.push(r);const i=r.getChildren();i.length>
131&&i.forEach(s=>{U(s)&&t.push(pa(s))})}else t.push(pa(r))}return t}function xa(n){const t=n.nodeName.toLowerCase();let e=null;return t==="ol"?e=Ae("number",n.start):t==="ul"&&(e=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(X(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(n)?Ae("check"):Ae("bullet")),{after:Ig,node:e}}const Mg={ol:"number",ul:"bullet"};function Ae(n="number",t=1){return we(new wn(n,t))}function U(n){return n instanceof wn}const Dg=$("UPDATE_LIST_START_COMMAND"),Ic=$("INSERT_UNORDERED_LIST_COMMAND"),Mc=$("INSERT_ORDERED_LIST_COMMAND"),ss=$("REMOVE_LIST_COMMAND");function Pg(n){return Fe(n.registerCommand(Mc,()=>(ma("number"),!0),rt),n.registerCommand(Dg,t=>{const{listNodeKey:e,newStart:r}=t,i=oe(e);return!!U(i)&&(i.getListType()==="number"&&(i.setStart(r),Rc(i)),!0)},rt),n.registerCommand(Ic,()=>(ma("bullet"),!0),rt),n.registerCommand(ss,()=>(Ag(),!0),rt),n.registerCommand(Wn,()=>Lg(),rt),n.registerNodeTransform(Cn,t=>{const e=t.getFirstChild();if(e){if(I(e)){const r=e.getStyle(),i=e.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=R();F(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),n.registerNodeTransform(We,t=>{const e=t.getParent();if(V(e)&&t.is(e.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===e.getTextStyle()&&i===e.getTextFormat()||e.setTextStyle(r).setTextFormat(i)}}))}function $g(n){const t=e=>{const r=e.getParent();if(U(e.getFirstChild())||!U(r))return;const i=fe(e,s=>V(s)&&U(s.getParent())&&V(s.getPreviousSibling()));if(i===null&&e.getIndent()>0)e.setIndent(0);else if(V(i)){const s=i.getPreviousSibling();if(V(s)){const o=function(l){let c=l,u=c.getFirstChild();for(;U(u);){const d=u.getLastChild();if(!V(d))break;c=d,u=c.getFirstChild()}return c}(s),a=o.getParent();if(U(a)){const l=rs(a);l+1<rs(r)&&e.setIndent(l)}}}};return n.registerNodeTransform(wn,e=>{const r=[e];for(;r.length>0;){const i=r.shift();if(U(i)){for(const s of i.getChildren())if(V(s)){t(s);const o=s.getFirstChild();U(o)&&r.push(o)}}}})}function zg({hasStrictIndent:n=!1}){const[t]=Be();return L.useEffect(()=>{if(!t.hasNodes([wn,Cn]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),L.useEffect(()=>{if(n)return $g(t)},[t,n]),function(e){L.useEffect(()=>Pg(e),[e])}(t),null}const Bg=new Set(["http:","https:","mailto:","sms:","tel:"]);class Kt extends be{constructor(e="",r={},i){super(i);T(this,"__url");T(this,"__target");T(this,"__rel");T(this,"__title");const{target:s=null,rel:o=null,title:a=null}=r;this.__url=e,this.__target=s,this.__rel=o,this.__title=a}static getType(){return"link"}static clone(e){return new Kt(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}createDOM(e){const r=document.createElement("a");return this.updateLinkDOM(null,r,e),me(r,e.theme.link),r}updateLinkDOM(e,r,i){if(Zl(r)){e&&e.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const s of["target","rel","title"]){const o=`__${s}`,a=this[o];e&&e[o]===a||(a?r[s]=a:r.removeAttribute(s))}}}updateDOM(e,r,i){return this.updateLinkDOM(e,r,i),!1}static importDOM(){return{a:e=>({conversion:Ug,priority:1})}}static importJSON(e){return cn().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Ca(e);try{const r=new URL(Ca(e));if(!Bg.has(r.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const r=this.getWritable();return r.__url=e,r}getTarget(){return this.getLatest().__target}setTarget(e){const r=this.getWritable();return r.__target=e,r}getRel(){return this.getLatest().__rel}setRel(e){const r=this.getWritable();return r.__rel=e,r}getTitle(){return this.getLatest().__title}setTitle(e){const r=this.getWritable();return r.__title=e,r}insertNewAfter(e,r=!0){const i=cn(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,r,i){if(!F(r))return!1;const s=r.anchor.getNode(),o=r.focus.getNode();return this.isParentOf(s)&&this.isParentOf(o)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function Ug(n){let t=null;if(Zl(n)){const e=n.textContent;(e!==null&&e!==""||n.children.length>0)&&(t=cn(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:t}}
13function cn(n="",t){return we(new Kt(n,t))}function ie(n){return n instanceof Kt}class rr extends Kt{constructor(e="",r={},i){super(e,r,i);T(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(e){return new rr(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const r=this.getWritable();return r.__isUnlinked=e,r}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,r,i){return super.updateDOM(e,r,i)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Sa().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,r=!0){const i=this.getParentOrThrow().insertNewAfter(e,r);if(k(i)){const s=Sa(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return i.append(s),s}return null}}function Sa(n="",t){return we(new rr(n,t))}function nn(n){return n instanceof rr}const hn=$("TOGGLE_LINK_COMMAND");function va(n,t){if(n.type==="element"){const e=n.getNode();return k(e)||function(r,...i){const s=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",r);for(const a of i)o.append("v",a);throw s.search=o.toString(),Error(`Minified Lexical error #${r}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),e.getChildren()[n.offset+t]||null}return null}function vi(n,t={}){let e;if(n&&typeof n=="object"){const{url:u,...d}=n;e=u,t={...d,...t}}else e=n;const{target:r,title:i}=t,s=t.rel===void 0?"noreferrer":t.rel,o=R();if(o===null||!F(o)&&!ce(o))return;if(ce(o)){const u=o.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(e===null){const f=fe(d,p=>!nn(p)&&ie(p));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=fe(d,p=>!nn(p)&&ie(p));if(f)f.setURL(e),r!==void 0&&f.setTarget(r),s!==void 0&&f.setRel(s);else{const p=cn(e,{rel:s,target:r});d.insertBefore(p),p.append(d)}}})}const a=o.extract();if(e===null){const u=new Set;return void a.forEach(d=>{const f=d.getParent();if(ie(f)&&!nn(f)){const p=f.getKey();if(u.has(p))return;(function(g,m){const _=new Set(m.filter(C=>g.isParentOf(C)).map(C=>C.getKey())),b=g.getChildren(),h=b.filter(C=>_.has(C.getKey()));if(h.length===b.length)return b.forEach(C=>g.insertBefore(C)),void g.remove();const y=b.findIndex(C=>_.has(C.getKey())),S=b.findLastIndex(C=>_.has(C.getKey())),w=y===0,x=S===b.length-1;if(w)h.forEach(C=>g.insertBefore(C));else if(x)for(let C=h.length-1;C>=0;C--)g.insertAfter(h[C]);else{for(let E=h.length-1;E>=0;E--)g.insertAfter(h[E]);const C=b.slice(S+1);if(C.length>0){const E=cn(g.getURL(),{rel:g.getRel(),target:g.getTarget(),title:g.getTitle()});h[h.length-1].insertAfter(E),C.forEach(v=>E.append(v))}}})(f,a),u.add(p)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(e),r!==void 0&&u.setTarget(r),s!==void 0&&u.setRel(s),i!==void 0&&u.setTitle(i))};if(a.length===1){const u=a[0],d=fe(u,ie);if(d!==null)return c(d)}(function(u){const d=R();if(!F(d))return u();const f=dn(d),p=f.isBackward(),g=va(f.anchor,p?-1:0),m=va(f.focus,p?0:-1);if(u(),g||m){const _=R();if(F(_)){const b=_.clone();if(g){const h=g.getParent();h&&b.anchor.set(h.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(m){const h=m.getParent();h&&b.focus.set(h.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}xe(dn(b))}}})(()=>{let u=null;for(const d of a){if(!d.isAttached())continue;const f=fe(d,ie);if(f){c(f);continue}if(k(d)){if(!d.isInline())continue;if(ie(d)){if(!(nn(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const g of d.getChildren())d.insertBefore(g);d.remove();continue}}const p=d.getPreviousSibling();ie(p)&&p.is(u)?p.append(d):(u=cn(e,{rel:s,target:r,title:i}),d.insertAfter(u),u.append(d))}})}const Wg=/^\+?[0-9\s()-]{5,}$/;function Ca(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Wg.test(n)?`tel:${n}`:`https://${n}`}function jg(n,t){return Fe(ts(()=>n.registerCommand(hn,e=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(e===null)return vi(null),!0;if(typeof e=="string")return!(r!==void 0&&!r(e))&&(vi(e,i),!0);{const{url:s,target:o,rel:a,title:l}=e;return vi(s,{...i,rel:a,target:o,title:l}),!0}},rt)),ts(()=>{const e=t.validateUrl.value;if(!e)return;const r=t.attributes.value;return n.registerCommand(Jr,i=>{const s=R();if(!F(s)||s.isCollapsed()||!dt(i,ClipboardEvent)||i.clipboardData===null)return!1;const o=i.clipboardData.getData("text");return!!e(o)&&!s.getNodes().some(a=>k(a))&&(n.dispatchCommand(hn,{...r,url:o}),i.preventDefault(),!0)},rt)}))}function Kg({validateUrl:n,attributes:t}){const[e]=Be();return L.useEffect(()=>{if(!e.hasNodes([Kt]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),L.useEffect(()=>jg(e,zf({attributes:t,validateUrl:n})),[e,n,t]),null}const Jg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Hg({ignoreHistoryMergeTagChange:n=!0,ignoreSelectionChange:t=!1,onChange:e}){const[r]=Be();return Jg(()=>{if(e)return r.registerUpdateListener(({editorState:i,dirtyElements:s,dirtyLeaves:o,prevEditorState:a,tags:l})=>{t&&s.size===0&&o.size===0||n&&l.has(Tt)||a.isEmpty()||e(i,r,l)})},[r,n,t,e]),null}const Vg=L.createContext(null),Ci={didCatch:!1,error:null};class Gg extends L.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ci}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,i;const{error:e}=this.state;e!==null&&((i=(r=this.props).onReset)==null||i.call(r,{args:t,reason:"imperative-api"}),this.setState(Ci))}componentDidCatch(t,e){var r,i;(i=(r=this.props).onError)==null||i.call(r,t,e)}componentDidUpdate(t,e){var s,o;const{didCatch:r}=this.state,{resetKeys:i}=this.props;r&&e.error!==null&&qg(t.resetKeys,i)&&((o=(s=this.props).onReset)==null||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Ci))}render(){const{children:t,fallbackRender:e,FallbackComponent:r,fallback:i}=this.props,{didCatch:s,error:o}=this.state;let a=t;if(s){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof e=="function")a=e(l);else if(r)a=L.createElement(r,l);else if(i!==void 0)a=i;else throw o}return L.createElement(Vg.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}}function qg(n=[],t=[]){return n.length!==t.length||n.some((e,r)=>!Object.is(e,t[r]))}function Yg({children:n,onError:t}){return N.jsx(Gg,{fallback:N.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:n})}const js=/^(\d+(?:\.\d+)?)px$/,un={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class ir extends be{constructor(e=un.NO_STATUS,r=1,i,s){super(s);T(this,"__colSpan");T(this,"__rowSpan");T(this,"__headerState");T(this,"__width");T(this,"__backgroundColor");T(this,"__verticalAlign");this.__colSpan=r,this.__rowSpan=1,this.__headerState=e,this.__width=i,this.__backgroundColor=null,this.__verticalAlign=void 0}static getType(){return"tablecell"}static clone(e){return new ir(e.__headerState,e.__colSpan,e.__width,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign}static importDOM(){return{td:e=>({conversion:wa,priority:0}),th:e=>({conversion:wa,priority:0})}}static importJSON(e){return Dc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroun
13dColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}createDOM(e){const r=document.createElement(this.getTag());return this.__width&&(r.style.width=`${this.__width}px`),this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(r.style.backgroundColor=this.__backgroundColor),os(this.__verticalAlign)&&(r.style.verticalAlign=this.__verticalAlign),me(r,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),r}exportDOM(e){const r=super.exportDOM(e);if(X(r.element)){const i=r.element;i.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),i.style.border="1px solid black",this.__colSpan>1&&(i.colSpan=this.__colSpan),this.__rowSpan>1&&(i.rowSpan=this.__rowSpan),i.style.width=`${this.getWidth()||75}px`,i.style.verticalAlign=this.getVerticalAlign()||"top",i.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(i.style.backgroundColor="#f2f3f5")}return r}exportJSON(){return{...super.exportJSON(),...os(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){const r=this.getWritable();return r.__colSpan=e,r}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){const r=this.getWritable();return r.__rowSpan=e,r}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,r=un.BOTH){const i=this.getWritable();return i.__headerState=e&r|i.__headerState&~r,i}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){const r=this.getWritable();return r.__width=e,r}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){const r=this.getWritable();return r.__backgroundColor=e,r}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){const r=this.getWritable();return r.__verticalAlign=e||void 0,r}toggleHeaderStyle(e){const r=this.getWritable();return(r.__headerState&e)===e?r.__headerState-=e:r.__headerState+=e,r}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==un.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function os(n){return n==="middle"||n==="bottom"}function wa(n){const t=n,e=n.nodeName.toLowerCase();let r;js.test(t.style.width)&&(r=parseFloat(t.style.width));const i=Dc(e==="th"?un.ROW:un.NO_STATUS,t.colSpan,r);i.__rowSpan=t.rowSpan;const s=t.style.backgroundColor;s!==""&&(i.__backgroundColor=s);const o=t.style.verticalAlign;os(o)&&(i.__verticalAlign=o);const a=t.style,l=(a&&a.textDecoration||"").split(" "),c=a.fontWeight==="700"||a.fontWeight==="bold",u=l.includes("line-through"),d=a.fontStyle==="italic",f=l.includes("underline");return{after:p=>{const g=[];let m=null;const _=()=>{if(m){const b=m.getFirstChild();it(b)&&m.getChildrenSize()===1&&b.remove()}};for(const b of p)ef(b)||I(b)||it(b)?(I(b)&&(c&&b.toggleFormat("bold"),u&&b.toggleFormat("strikethrough"),d&&b.toggleFormat("italic"),f&&b.toggleFormat("underline")),m?m.append(b):(m=Z().append(b),g.push(m))):(g.push(b),_(),m=null);return _(),g.length===0&&g.push(Z()),g},node:i}}function Dc(n=un.NO_STATUS,t=1,e){return we(new ir(n,t,e))}function Vn(n){return n instanceof ir}function as(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of t)r.append("v",i);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class sr extends be{constructor(e,r){super(r);T(this,"__height");this.__height=e}static getType(){return"tablerow"}static clone(e){return new sr(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:Zg,priority:0})}}static importJSON(e){return Pc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}exportJSON(){const e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){const r=document.createElement("tr");return this.__height&&(r.style.height=`${this.__height}px`),me(r,e.theme.tableRow),r}extractWithChild(e,r,i){return i==="html"}
13isShadowRoot(){return!0}setHeight(e){const r=this.getWritable();return r.__height=e,r}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function Zg(n){const t=n;let e;return js.test(t.style.height)&&(e=parseFloat(t.style.height)),{after:r=>pc(r,Vn),node:Pc(e)}}function Pc(n){return we(new sr(n))}function $c(n){return n instanceof sr}const zc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Xg=zc&&"documentMode"in document?document.documentMode:null;zc&&"InputEvent"in window&&!Xg&&new window.InputEvent("input");function Qg(n,t,e){const r=[];let i=null,s=null;function o(l){let c=r[l];return c===void 0&&(r[l]=c=[]),c}const a=n.getChildren();for(let l=0;l<a.length;l++){const c=a[l];$c(c)||as(209);const u=o(l);for(let d=c.getFirstChild(),f=0;d!=null;d=d.getNextSibling()){for(Vn(d)||as(147);u[f]!==void 0;)f++;const p={cell:d,startColumn:f,startRow:l},{__rowSpan:g,__colSpan:m}=d;for(let _=0;_<g&&!(l+_>=a.length);_++){const b=o(l+_);for(let h=0;h<m;h++)b[f+h]=p}}}return[r,i,s]}function Nn(n){return X(n)&&n.nodeName==="TABLE"}function eh(n,t){for(let e=t,r=null;e!==null;e=e.getParent()){if(n.is(e))return r;Vn(e)&&(r=e)}return null}function th(n,t,e){return eh(n,mt(t,e))}function Ea(n,t,e){if(!t.theme.tableAlignment)return;const r=[],i=[];for(const s of["center","right"]){const o=t.theme.tableAlignment[s];o&&(s===e?i:r).push(o)}At(n,...r),me(n,...i)}const nh=new WeakSet;function Ta(n=tr()){return nh.has(n)}class ri extends be{constructor(e){super(e);T(this,"__rowStriping");T(this,"__frozenColumnCount");T(this,"__frozenRowCount");T(this,"__colWidths");this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){const r=this.getWritable();return r.__colWidths=e,r}static clone(e){return new ri(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:rh,priority:1})}}static importJSON(e){return Bc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,r,i){return i==="html"}getDOMSlot(e){const r=Nn(e)?e:e.querySelector("table");return Nn(r)||as(229),super.getDOMSlot(e).withElement(r).withAfter(r.querySelector("colgroup"))}createDOM(e,r){const i=document.createElement("table");this.__style&&(i.style.cssText=this.__style);const s=document.createElement("colgroup");if(i.appendChild(s),af(s),me(i,e.theme.table),this.updateTableElement(null,i,e),Ta(r)){const o=document.createElement("div"),a=e.theme.tableScrollableWrapper;return a?me(o,a):o.style.cssText="overflow-x: auto;",o.appendChild(i),this.updateTableWrapper(null,o,i,e),o}return i}updateTableWrapper(e,r,i,s){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&function(o,a,l,c){c>0?(me(o,l.theme.tableFrozenColumn),a.setAttribute("data-lexical-frozen-column","true")):(At(o,l.theme.tableFrozenColumn),a.removeAttribute("data-lexical-frozen-column"))}(r,i,s,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&function(o,a,l,c){c>0?(me(o,l.theme.tableFrozenRow),a.setAttribute("data-lexical-frozen-row","true")):(At(o,l.theme.tableFrozenRow),a.removeAttribute("data-lexical-frozen-row"))}(r,i,s,this.__frozenRowCount)}updateTableElement(e,r,i){this.__style!==(e?e.__style:"")&&(r.style.cssText=this.__style),this.__rowStriping!==(!!e&&e.__rowStriping)&&function(s,o,a){a?(me(s,o.theme.tableRowStriping),s.setAttribute("data-lexical-row-striping","true")):(At(s,o.theme.tableRowStriping),s.removeAttribute("data-lexical-row-striping"))}(r,i,this.__rowStriping),function(s,o,a,l){const c=s.querySelector("colgroup");if(!c)return;const u=[];for(let d=0;d<a;d++){const f=document.createElement("col"),p=l&&l[d];p&&(f.style.width=`${p}px`),u.push(f)}c.replaceChildren(...u)}(r,0,this.getColumnCount(),this.getColWidths()),Ea(r,i,this.getFormatType())}updateDOM(e,r,i){const s=this.getDOMSlot(r).element;return r===s===Ta()||(X(o=r)&&o.nodeName==="DIV"&&this.updateTableWrapper(e,r,s,i),this.updateTableElement(e,s,i),!1);var o}exportDOM(e){const r=super.exportDOM(e),{element:i}=r;return{after:s=>{if(r.after&&(s=r.after(s)),!Nn(s)&&X(s)&&(s=s.querySelector("table")),!Nn(s))return null;Ea(s,e._config,this.getFormatType());const[o]=Qg(this),a=new Map;for(const d of o)for(const f of d){const p=f.cell.getKey();a.has(p)||a.set(p,{colSpan:f.cell.getColSpan(),startColumn:f.startColumn})}const l=new Set;for(const d of s.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const f=d.getAttribute("data-temporary-table-cell-lexical-key");if(f){const p=a.get(f);if(d.removeAttribute("data-temporary-table-cell-lexical-key"),p){a.delete(f);for(let g=0;g<p.colSpan;g++)l.add(g+p.startColumn)}}}const c=s.querySelector(":scope > colgroup");if(c){const d=Array.from(s.querySelectorAll(":scope > colgroup > col")).filter((f,p)=>l.has(p));c.replaceChildren(...d)}const u=s.querySelectorAll(":scope > tr");if(u.length>0){const d=document.createElement("tbody");for(const f of u)d.appendChild(f);s.append(d)}return s},element:!Nn(i)&&X(i)?i.querySelector("table"):i}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,r){const{rows:i,domRows:s}=r;for(let o=0;o<i;o++){const a=s[o];if(a!=null)for(let l=0;l<a.length;l++){const c=a[l];if(c==null)continue;const{elem:u}=c,d=th(this,u);if(d!==null&&e.is(d))return{x:l,y:o}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,r,i){const{domRows:s}=i,o=s[r];if(o==null)return null;const a=o[e<o.length?e:o.length-1];return a??null}getDOMCellFromCordsOrThrow(e,r,i){const s=this.getDOMCellFromCords(e,r,i);if(!s)throw new Error("Cell not found at cords.");return s}getCellNodeFromCords(e,r,i){const s=this.getDOMCellFromCords(e,r,i);if(s==null)return null;const o=mt(s.elem);return Vn(o)?o:null}getCellNodeFromCordsOrThrow(e,r,i){const s=this.getCellNodeFromCords(e,r,i);if(!s)throw new Error("Node at cords not TableCellNode.");return s}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){const r=this.getWritable();return r.__rowStriping=e,r}setFrozenColumns(e){const r=this.getWritable();return r.__frozenColumnCount=e,r}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){const r=this.getWritable();return r.__frozenRowCount=e,r}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const e=this.getFirstChild();if(!e)return 0;let r=0;
13return e.getChildren().forEach(i=>{Vn(i)&&(r+=i.getColSpan())}),r}}function rh(n){const t=Bc();n.hasAttribute("data-lexical-row-striping")&&t.setRowStriping(!0),n.hasAttribute("data-lexical-frozen-column")&&t.setFrozenColumns(1),n.hasAttribute("data-lexical-frozen-row")&&t.setFrozenRows(1);const e=n.querySelector(":scope > colgroup");if(e){let r=[];for(const i of e.querySelectorAll(":scope > col")){let s=i.style.width||"";if(!js.test(s)&&(s=i.getAttribute("width")||"",!/^\d+$/.test(s))){r=void 0;break}r.push(parseFloat(s))}r&&t.setColWidths(r)}return{after:r=>pc(r,$c),node:t}}function Bc(){return we(new ri)}var ih={exports:{}};(function(n){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** 14 * Prism: Lightweight, robust, elegant syntax highlighting 15 * 16 * @license MIT <https://opensource.org/licenses/MIT> 17 * @author Lea Verou <https://lea.verou.me> 18 * @namespace 19 * @public 20 */var e=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function h(y){return y instanceof l?new l(y.type,h(y.content),y.alias):Array.isArray(y)?y.map(h):y.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(h){return Object.prototype.toString.call(h).slice(8,-1)},objId:function(h){return h.__id||Object.defineProperty(h,"__id",{value:++s}),h.__id},clone:function h(y,S){S=S||{};var w,x;switch(a.util.type(y)){case"Object":if(x=a.util.objId(y),S[x])return S[x];w={},S[x]=w;for(var C in y)y.hasOwnProperty(C)&&(w[C]=h(y[C],S));return w;case"Array":return x=a.util.objId(y),S[x]?S[x]:(w=[],S[x]=w,y.forEach(function(E,v){w[v]=h(E,S)}),w);default:return y}},getLanguage:function(h){for(;h;){var y=i.exec(h.className);if(y)return y[1].toLowerCase();h=h.parentElement}return"none"},setLanguage:function(h,y){h.className=h.className.replace(RegExp(i,"gi"),""),h.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var h=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(h){var y=document.getElementsByTagName("script");for(var S in y)if(y[S].src==h)return y[S]}return null}},isActive:function(h,y,S){for(var w="no-"+y;h;){var x=h.classList;if(x.contains(y))return!0;if(x.contains(w))return!1;h=h.parentElement}return!!S}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(h,y){var S=a.util.clone(a.languages[h]);for(var w in y)S[w]=y[w];return S},insertBefore:function(h,y,S,w){w=w||a.languages;var x=w[h],C={};for(var E in x)if(x.hasOwnProperty(E)){if(E==y)for(var v in S)S.hasOwnProperty(v)&&(C[v]=S[v]);S.hasOwnProperty(E)||(C[E]=x[E])}var A=w[h];return w[h]=C,a.languages.DFS(a.languages,function(M,B){B===A&&M!=h&&(this[M]=C)}),C},DFS:function h(y,S,w,x){x=x||{};var C=a.util.objId;for(var E in y)if(y.hasOwnProperty(E)){S.call(y,E,y[E],w||E);var v=y[E],A=a.util.type(v);A==="Object"&&!x[C(v)]?(x[C(v)]=!0,h(v,S,null,x)):A==="Array"&&!x[C(v)]&&(x[C(v)]=!0,h(v,S,E,x))}}},plugins:{},highlightAll:function(h,y){a.highlightAllUnder(document,h,y)},highlightAllUnder:function(h,y,S){var w={callback:S,container:h,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),a.hooks.run("before-all-elements-highlight",w);for(var x=0,C;C=w.elements[x++];)a.highlightElement(C,y===!0,w.callback)},highlightElement:function(h,y,S){var w=a.util.getLanguage(h),x=a.languages[w];a.util.setLanguage(h,w);var C=h.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(C,w);var E=h.textContent,v={element:h,language:w,grammar:x,code:E};function A(B){v.highlightedCode=B,a.hooks.run("before-insert",v),v.element.innerHTML=v.highlightedCode,a.hooks.run("after-highlight",v),a.hooks.run("complete",v),S&&S.call(v.element)}if(a.hooks.run("before-sanity-check",v),C=v.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!v.code){a.hooks.run("complete",v),S&&S.call(v.element);return}if(a.hooks.run("before-highlight",v),!v.grammar){A(a.util.encode(v.code));return}if(y&&r.Worker){var M=new Worker(a.filename);M.onmessage=function(B){A(B.data)},M.postMessage(JSON.stringify({language:v.language,code:v.code,immediateClose:!0}))}else A(a.highlight(v.code,v.grammar,v.language))},highlight:function(h,y,S){var w={code:h,grammar:y,language:S};if(a.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=a.tokenize(w.code,w.grammar),a.hooks.run("after-tokenize",w),l.stringify(a.util.encode(w.tokens),w.language)},tokenize:function(h,y){var S=y.rest;if(S){for(var w in S)y[w]=S[w];delete y.rest}var x=new d;return f(x,x.head,h),u(h,x,y,x.head,0),g(x)},hooks:{all:{},add:function(h,y){var S=a.hooks.all;S[h]=S[h]||[],S[h].push(y)},run:function(h,y){var S=a.hooks.all[h];if(!(!S||!S.length))for(var w=0,x;x=S[w++];)x(y)}},Token:l};r.Prism=a;function l(h,y,S,w){this.type=h,this.content=y,this.alias=S,this.length=(w||"").length|0}l.stringify=function h(y,S){if(typeof y=="string")return y;if(Array.isArray(y)){var w="";
vendor: 5,116 bytes, line 20
20return y.forEach(function(A){w+=h(A,S)}),w}var x={type:y.type,content:h(y.content,S),tag:"span",classes:["token",y.type],attributes:{},language:S},C=y.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(x.classes,C):x.classes.push(C)),a.hooks.run("wrap",x);var E="";for(var v in x.attributes)E+=" "+v+'="'+(x.attributes[v]||"").replace(/"/g,""")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+E+">"+x.content+"</"+x.tag+">"};function c(h,y,S,w){h.lastIndex=y;var x=h.exec(S);if(x&&w&&x[1]){var C=x[1].length;x.index+=C,x[0]=x[0].slice(C)}return x}function u(h,y,S,w,x,C){for(var E in S)if(!(!S.hasOwnProperty(E)||!S[E])){var v=S[E];v=Array.isArray(v)?v:[v];for(var A=0;A<v.length;++A){if(C&&C.cause==E+","+A)return;var M=v[A],B=M.inside,P=!!M.lookbehind,z=!!M.greedy,j=M.alias;if(z&&!M.pattern.global){var Q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,Q+"g")}for(var ae=M.pattern||M,ee=w.next,ne=x;ee!==y.tail&&!(C&&ne>=C.reach);ne+=ee.value.length,ee=ee.next){var Oe=ee.value;if(y.length>h.length)return;if(!(Oe instanceof l)){var bt=1,Se;if(z){if(Se=c(ae,ne,h,P),!Se||Se.index>=h.length)break;var Ne=Se.index,En=Se.index+Se[0].length,ke=ne;for(ke+=ee.value.length;Ne>=ke;)ee=ee.next,ke+=ee.value.length;if(ke-=ee.value.length,ne=ke,ee.value instanceof l)continue;for(var je=ee;je!==y.tail&&(ke<En||typeof je.value=="string");je=je.next)bt++,ke+=je.value.length;bt--,Oe=h.slice(ne,ke),Se.index-=ne}else if(Se=c(ae,0,Oe,P),!Se)continue;var Ne=Se.index,lt=Se[0],Ye=Oe.slice(0,Ne),xt=Oe.slice(Ne+lt.length),Jt=ne+Oe.length;C&&Jt>C.reach&&(C.reach=Jt);var ur=ee.prev;Ye&&(ur=f(y,ur,Ye),ne+=Ye.length),p(y,ur,bt);var Jc=new l(E,B?a.tokenize(lt,B):lt,j,lt);if(ee=f(y,ur,Jc),xt&&f(y,ee,xt),bt>1){var ii={cause:E+","+A,reach:Jt};u(h,y,S,ee.prev,ne,ii),C&&ii.reach>C.reach&&(C.reach=ii.reach)}}}}}}function d(){var h={value:null,prev:null,next:null},y={value:null,prev:h,next:null};h.next=y,this.head=h,this.tail=y,this.length=0}function f(h,y,S){var w=y.next,x={value:S,prev:y,next:w};return y.next=x,w.prev=x,h.length++,x}function p(h,y,S){for(var w=y.next,x=0;x<S&&w!==h.tail;x++)w=w.next;y.next=w,w.prev=y,h.length-=x}function g(h){for(var y=[],S=h.head.next;S!==h.tail;)y.push(S.value),S=S.next;return y}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(h){var y=JSON.parse(h.data),S=y.language,w=y.code,x=y.immediateClose;r.postMessage(a.highlight(w,a.languages[S],S)),x&&r.close()},!1)),a;var m=a.util.currentScript();m&&(a.filename=m.src,m.hasAttribute("data-manual")&&(a.manual=!0));function _(){a.manual||a.highlightAll()}if(!a.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return a}(t);n.exports&&(n.exports=e),typeof Js<"u"&&(Js.Prism=e),e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(i,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};a["language-"+s]={pattern:/[\s\S]+/,inside:e.languages[s]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(r,i){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\
20s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:e.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(e),e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}
vendor: 5,131 bytes, lines 20-21
20/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript,function(){if(typeof e>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loadingâ¦",i=function(m,_){return"â Error "+m+" while fetching file: "+_},s="â Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",u="failed",d="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function f(m,_,b){var h=new XMLHttpRequest;h.open("GET",m,!0),h.onreadystatechange=function(){h.readyState==4&&(h.status<400&&h.responseText?_(h.responseText):h.status>=400?b(i(h.status,h.statusText)):b(s))},h.send(null)}function p(m){var _=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(_){var b=Number(_[1]),h=_[2],y=_[3];return h?y?[b,Number(y)]:[b,void 0]:[b,b]}}e.hooks.add("before-highlightall",function(m){m.selector+=", "+d}),e.hooks.add("before-sanity-check",function(m){var _=m.element;if(_.matches(d)){m.code="",_.setAttribute(a,l);var b=_.appendChild(document.createElement("CODE"));b.textContent=r;var h=_.getAttribute("data-src"),y=m.language;if(y==="none"){var S=(/\.(\w+)$/.exec(h)||[,"none"])[1];y=o[S]||S}e.util.setLanguage(b,y),e.util.setLanguage(_,y);var w=e.plugins.autoloader;w&&w.loadLanguages(y),f(h,function(x){_.setAttribute(a,c);var C=p(_.getAttribute("data-range"));if(C){var E=x.split(/\r\n?|\n/g),v=C[0],A=C[1]==null?E.length:C[1];v<0&&(v+=E.length),v=Math.max(0,Math.min(v-1,E.length)),A<0&&(A+=E.length),A=Math.max(0,Math.min(A,E.length)),x=E.slice(v,A).join(` 21`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(v+1))}b.textContent=x,e.highlightElement(b)},function(x){_.setAttribute(a,u),b.textContent=x})}}),e.plugins.fileHighlight={highlight:function(_){for(var b=(_||document).querySelectorAll(d),h=0,y;y=b[h++];)e.highlightElement(y)}};var g=!1;e.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(ih);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
21],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2}
21)*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,e){var r={};r["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function e(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}
21|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(n.languages.markdown[u].inside.content.inside[d]=n.languages.markdown[d])})}),n.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var p=0,g=f.length;p<g;p++){var m=f[p];if(m.type!=="code"){d(m.content);continue}var _=m.content[1],b=m.content[3];if(_&&b&&_.type==="code-language"&&b.type==="code-block"&&typeof _.content=="string"){var h=_.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");h=(/[a-z][\w-]*/i.exec(h)||[""])[0].toLowerCase();var y="language-"+h;b.alias?typeof b.alias=="string"?b.alias=[b.alias,y]:b.alias.push(y):b.alias=[y]}}}d(u.tokens)}),n.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var d="",f=0,p=u.classes.length;f<p;f++){var g=u.classes[f],m=/language-(.+)/.exec(g);if(m){d=m[1];break}}var _=n.languages[d];if(_)u.content=n.highlight(c(u.content),_,d);else if(d&&d!=="none"&&n.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=b,n.plugins.autoloader.loadLanguages(d,function(){var h=document.getElementById(b);h&&(h.innerHTML=n.highlight(h.textContent,n.languages[d],d))})}}});var o=RegExp(n.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(o,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,p){if(p=p.toLowerCase(),p[0]==="#"){var g;return p[1]==="x"?g=parseInt(p.slice(2),16):g=Number(p.slice(1)),l(g)}else{var m=a[p];return m||f}}),d}n.languages.md=n.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
21*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var e=n.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(n){var t=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}
vendor: 4,452 bytes, line 21
21],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,e=0;e<2;e++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
21],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift});(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(Prism);(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;
vendor: 4,511 bytes, line 21
21?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,e=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+e+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+e+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+e+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+e+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+e+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,e=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return e})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w
21*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(Prism);function Uc(n,t){for(const e of n.childNodes){if(X(e)&&e.tagName===t)return!0;Uc(e,t)}return!1}const In="data-language",An="data-highlight-language",br="data-theme";class or extends be{constructor(e,r){super(r);T(this,"__language");T(this,"__theme");T(this,"__isSyntaxHighlightSupported");this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(e){return new or(e.__language,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const r=document.createElement("code");me(r,e.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(In,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(An,i));const s=this.getTheme();s&&r.setAttribute(br,s);const o=this.getStyle();return o&&r.setAttribute("style",o),r}updateDOM(e,r,i){const s=this.__language,o=e.__language;s?s!==o&&r.setAttribute(In,s):o&&r.removeAttribute(In);const a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&o?a&&s?s!==o&&r.setAttribute(An,s):r.removeAttribute(An):a&&s&&r.setAttribute(An,s);const l=this.__theme,c=e.__theme;l?l!==c&&r.setAttribute(br,l):c&&r.removeAttribute(br);const u=this.__style,d=e.__style;return u?u!==d&&r.setAttribute("style",u):d&&r.removeAttribute("style"),!1}exportDOM(e){const r=document.createElement("pre");me(r,e._config.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(In,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(An,i));const s=this.getTheme();s&&r.setAttribute(br,s);const o=this.getStyle();return o&&r.setAttribute("style",o),{element:r}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||Uc(e,"BR"))?{conversion:ka,priority:1}:null,div:()=>({conversion:oh,priority:1}),pre:()=>({conversion:ka,priority:0}),table:e=>wi(e)?{conversion:ah,priority:3}:null,td:e=>{const r=e,i=r.closest("table");return r.classList.contains("js-file-line")||i&&wi(i)?{conversion:Na,priority:3}:null},tr:e=>{const r=e.closest("table");return r&&wi(r)?{conversion:Na,priority:3}:null}}}static importJSON(e){return ar().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,r=!0){const i=this.getChildren(),s=i.length;if(s>=2&&i[s-1].getTextContent()===` 22`&&i[s-2].getTextContent()===` 23`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===s){i[s-1].remove(),i[s-2].remove();const c=Z();return this.insertAfter(c,r),c}const{anchor:o,focus:a}=e,l=(o.isBefore(a)?o:a).getNode();if(I(l)){let c=ch(l);const u=[];for(;;)if(qr(c))u.push(yn()),c=c.getNextSibling();else{if(!jc(c))break;{let b=0;const h=c.getTextContent(),y=c.getTextContentSize();for(;b<y&&h[b]===" ";)b++;if(b!==0&&u.push(Wc(" ".repeat(b))),b!==y)break;c=c.getNextSibling()}}const d=l.splitText(o.offset)[0],f=o.offset===0?0:1,p=d.getIndexWithinParent()+f,g=l.getParentOrThrow(),m=[st(),...u];g.splice(p,0,m);const _=u[u.length-1];_?_.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(sh(l)){const{offset:c}=e.anchor;l.splice(c,0,[st()]),l.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Z();
23return this.getChildren().forEach(r=>e.append(r)),this.replace(e),!0}setLanguage(e){const r=this.getWritable();return r.__language=e||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const r=this.getWritable();return r.__isSyntaxHighlightSupported=e,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const r=this.getWritable();return r.__theme=e||void 0,r}getTheme(){return this.getLatest().__theme}}function ar(n,t){return cf(or).setLanguage(n).setTheme(t)}function sh(n){return n instanceof or}function ka(n){return{node:ar(n.getAttribute(In))}}function oh(n){const t=n,e=Aa(t);return e||function(r){let i=r.parentElement;for(;i!==null;){if(Aa(i))return!0;i=i.parentElement}return!1}(t)?{node:e?ar():null}:{node:null}}function ah(){return{node:ar()}}function Na(){return{node:null}}function Aa(n){return n.style.fontFamily.match("monospace")!==null}function wi(n){return n.classList.contains("js-file-line-container")}class lr extends We{constructor(e="",r,i){super(e,i);T(this,"__highlightType");this.__highlightType=r}static getType(){return"code-highlight"}static clone(e){return new lr(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const r=this.getWritable();return r.__highlightType=e||void 0,r}canHaveFormat(){return!1}createDOM(e){const r=super.createDOM(e),i=Ei(e.theme,this.__highlightType);return me(r,i),r}updateDOM(e,r,i){const s=super.updateDOM(e,r,i),o=Ei(i.theme,e.__highlightType),a=Ei(i.theme,this.__highlightType);return o!==a&&(o&&At(r,o),a&&me(r,a)),s}static importJSON(e){return Wc().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return ar()}}function Ei(n,t){return t&&n&&n.codeHighlight&&n.codeHighlight[t]}function Wc(n="",t){return we(new lr(n,t))}function jc(n){return n instanceof lr}function lh(n,t){let e=n;for(let r=_e(n,t);r&&(jc(r.origin)||qr(r.origin));r=Lf(r))e=r.origin;return e}function ch(n){return lh(n,"previous")}(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(e){var r=t[e],i=[];/^\w+$/.test(e)||i.push(/\w+/.exec(e)[0]),e==="diff"&&i.push("bold"),n.languages.diff[e]={pattern:RegExp("^(?:["+r+`].*(?:\r 24?| 25|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(e)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(Prism);class cr extends We{constructor(t,e,r){super(t,r),this.__className=e}static getType(){return"text-with-class"}static clone(t){return new cr(t.__text,t.__className,t.__key)}createDOM(t){const e=super.createDOM(t);return this.__className&&e.classList.add(...this.__className.split(" ")),e}updateDOM(t,e,r){const i=super.updateDOM(t,e,r);return t.__className!==this.__className&&(t.__className&&e.classList.remove(...t.__className.split(" ")),this.__className&&e.classList.add(...this.__className.split(" "))),i}static importJSON(t){const e=Kc(t.text,t.className);return e.setFormat(t.format),e.setDetail(t.detail),e.setMode(t.mode),e.setStyle(t.style),e}exportJSON(){return{...super.exportJSON(),className:this.__className,type:"text-with-class",version:1}}setClassName(t){const e=this.getWritable();e.__className=t}getClassName(){return this.getLatest().__className}}function Kc(n,t){return we(new cr(n,t))}function Ti(n){return n instanceof cr}function uh({editor:n,disabled:t}){const[e,r]=L.useState("text-base");L.useEffect(()=>n.registerUpdateListener(({editorState:o})=>{o.read(()=>{const a=R();if(F(a)){const l=a.getNodes();let c="";for(const u of l)if(Ti(u)){const d=u.getClassName();if(["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl"].includes(d)){c=d;break}}r(c)}})}),[n]);const i=L.useCallback(o=>{n.update(()=>{const a=R();if(F(a)&&a.getTextContent().length>
250){a.extract().forEach(d=>{if(I(d))if(Ti(d))d.setClassName(o);else{const f=d.getTextContent(),p=Kc(f,o);p.setFormat(d.getFormat()),p.setDetail(d.getDetail()),p.setMode(d.getMode()),p.setStyle(d.getStyle()),d.replace(p)}});const u=te().getAllTextNodes();for(const d of u)if(Ti(d)&&!d.getClassName()){const f=new We(d.getTextContent());f.setFormat(d.getFormat()),f.setDetail(d.getDetail()),f.setMode(d.getMode()),f.setStyle(d.getStyle()),d.replace(f)}}})},[n]),s=o=>{const a=o.target.value;i(a)};return N.jsxs("select",{disabled:t,className:"form-select text-sm p-1 rounded border-gray-300 bg-white w-14",value:e,onChange:s,title:"Font Size",children:[N.jsx("option",{value:"",children:e===""?"Size":"Reset"}),N.jsx("option",{value:"text-xs",children:"XS"}),N.jsx("option",{value:"text-sm",children:"S"}),N.jsx("option",{value:"text-base",children:"M"}),N.jsx("option",{value:"text-lg",children:"L"}),N.jsx("option",{value:"text-xl",children:"XL"}),N.jsx("option",{value:"text-2xl",children:"2XL"}),N.jsx("option",{value:"text-3xl",children:"3XL"}),N.jsx("option",{value:"text-4xl",children:"4XL"}),N.jsx("option",{value:"text-5xl",children:"5XL"})]})}function dh({editor:n,disabled:t}){const[e,r]=L.useState("");L.useEffect(()=>n.registerUpdateListener(({editorState:o})=>{o.read(()=>{const a=R();if(F(a)){const l=a.anchor.getNode(),c=l.getKey()==="root"?l:l.getTopLevelElementOrThrow(),u=k(c)?c.getFormatType():"";r(u)}})}),[n]);const i=L.useCallback(o=>{n.dispatchCommand(ll,o)},[n]),s=o=>{const a=o.target.value;i(a)};return N.jsxs("select",{disabled:t,className:"form-select text-sm p-1 rounded border-gray-300 bg-white w-16",value:e,onChange:s,title:"Text Alignment",children:[N.jsx("option",{value:"",children:e===""?"Align":"Reset"}),N.jsx("option",{value:"left",children:"Left"}),N.jsx("option",{value:"center",children:"Center"}),N.jsx("option",{value:"right",children:"Right"}),N.jsx("option",{value:"justify",children:"Justify"})]})}const ki=1,fh=new Set(["paragraph","quote","code","h1","h2","h3","h4","h5","h6","ul","ol"]);function gh({editor:n,setIsLinkEditMode:t}){const[e,r]=L.useState(n),[i,s]=L.useState("paragraph"),[o,a]=L.useState(null),[l,c]=L.useState(!1),[u,d]=L.useState(!1),[f,p]=L.useState(!1),[g,m]=L.useState(!1),[_,b]=L.useState(!1),h=L.useCallback(()=>{const v=R();if(F(v)){const A=v.anchor.getNode(),M=A.getKey()==="root"?A:A.getTopLevelElementOrThrow(),B=M.getKey(),P=e.getElementByKey(B);d(v.hasFormat("bold")),p(v.hasFormat("italic"));const z=v.anchor.getNode(),j=z.getParent();if(ie(j)||ie(z)?c(!0):c(!1),P!==null)if(a(B),U(M)){const Q=hc(A,wn),ae=Q?Q.getTag():M.getTag();s(ae)}else{const Q=fg(M)?M.getTag():M.getType();fh.has(Q)&&s(Q)}}},[e]);L.useEffect(()=>Fe(n.registerUpdateListener(({editorState:v})=>{v.read(()=>{h()})}),n.registerCommand(Yn,(v,A)=>(h(),r(A),!1),ki),n.registerCommand(Ln,v=>(m(v),!1),ki),n.registerCommand(On,v=>(b(v),!1),ki)),[n,h]);const y=()=>{i!=="paragraph"&&n.update(()=>{const v=R();F(v)&&pi(v,()=>Z())})},S=v=>{i!==v&&n.update(()=>{const A=R();F(A)&&pi(A,()=>tn(v))})},w=()=>{i!=="ul"?n.dispatchCommand(Ic,void 0):n.dispatchCommand(ss,void 0)},x=()=>{i!=="ol"?n.dispatchCommand(Mc,void 0):n.dispatchCommand(ss,void 0)},C=()=>{i!=="quote"&&n.update(()=>{const v=R();F(v)&&pi(v,()=>Bs())})},E=L.useCallback(()=>{l?(t(!1),n.dispatchCommand(hn,null)):(t(!0),n.dispatchCommand(hn,"https://"))},[n,l]);return N.jsxs(N.Fragment,{children:[N.jsxs("select",{className:"form-select text-sm p-1 rounded border-gray-300 bg-white",value:i,onChange:v=>{const A=v.target.value;A==="paragraph"?y():["h1","h2","h3","h4","h5","h6"].includes(A)&&S(A)},children:[N.jsx("option",{value:"paragraph",children:"Normal"}),N.jsx("option",{value:"h1",children:"Heading 1"}),N.jsx("option",{value:"h2",children:"Heading 2"}),N.jsx("option",{value:"h3",children:"Heading 3"}),N.jsx("option",{value:"h4",children:"Heading 4"}),N.jsx("option",{value:"h5",children:"Heading 5"}),N.jsx("option",{value:"h6",children:"Heading 6"})]}),N.jsx("div",{className:"flex-none w-px h-5 bg-gray-300 mx-1"}),N.jsx(uh,{editor:n,disabled:!1}),N.jsx("div",{className:"flex-none w-px h-5 bg-gray-300 mx-1"}),N.jsx("button",{onClick:()=>n.dispatchCommand(He,"bold"),className:vt("p-1 rounded hover:bg-gray-200",u&&"bg-gray-300"),title:"Bold",children:N.jsx(Ee,{icon:"mdi:format-bold",className:"w-5 h-5"})}),N.jsx("button",{onClick:()=>n.dispatchCommand(He,"italic"),className:vt("p-1 rounded hover:bg-gray-200",f&&"bg-gray-300"),title:"Italic",children:N.jsx(Ee,{icon:"mdi:format-italic",className:"w-5 h-5"})}),N.jsx("button",{onClick:E,className:vt("p-1 rounded hover:bg-gray-200",l&&"bg-gray-300"),title:"Link",children:N.jsx(Ee,{icon:"mdi:link",className:"w-5 h-5"})}),N.jsx("div",{className:"flex-none w-px h-5 bg-gray-300 mx-1"}),N.jsx(dh,{editor:n,disabled:!1}),N.jsx("div",{className:"flex-none w-px h-5 bg-gray-300 mx-1"}),N.jsx("button",{onClick:w,className:vt("p-1 rounded hover:bg-gray-200",i==="ul"&&"bg-gray-300"),title:"Bullet List",children:N.jsx(Ee,{icon:"mdi:format-list-bulleted",className:"w-5 h-5"})}),N.jsx("button",{onClick:x,className:vt("p-1 rounded hover:bg-gray-200",i==="ol"&&"bg-gray-300"),title:"Numbered List",children:N.jsx(Ee,{icon:"mdi:format-list-numbered",className:"w-5 h-5"})}),N.jsx("button",{onClick:C,className:vt("p-1 rounded hover:bg-gray-200",i==="quote"&&"bg-gray-300"),title:"Quote",children:N.jsx(Ee,{icon:"mdi:format-quote-close",className:"w-5 h-5"})}),N.jsx("div",{className:"flex-none w-px h-5 bg-gray-300 mx-1"}),N.jsx("button",{disabled:!g,onClick:()=>n.dispatchCommand(Hr,void 0),className:"p-1 rounded hover:bg-gray-200 disabled:opacity-50",title:"Undo",children:N.jsx(Ee,{icon:"mdi:undo",className:"w-5 h-5"})}),N.jsx("button",{disabled:!_,onClick:()=>n.dispatchCommand(Vr,void 0),className:"p-1 rounded hover:bg-gray-200 disabled:opacity-50",title:"Redo",children:N.jsx(Ee,{icon:"mdi:redo",className:"w-5 h-5"})})]})}const Fa=1;function hh({setIsLinkEditMode:n}){const[t]=Be(),[e,r]=L.useState(!1),[i,s]=L.useState({top:0,left:0,width:0}),[o,a]=L.useState(0),l=L.useRef(null),c=L.useRef(null);L.useLayoutEffect(()=>{const f=()=>{if(c.current){const g=c.current.getBoundingClientRect();let m=g.left+window.scrollX;if(l.current){const _=l.current.offsetWidth,b=document.documentElement.clientWidth;m+_>b&&(m=Math.max(8,b-_-8))}s({top:g.top+window.scrollY,left:m,width:g.width}),a(document.documentElement.clientWidth)}};f();const p=new ResizeObserver(f);return c.current&&p.observe(c.current),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f),p.disconnect()}},[e]);const u=L.useCallback(()=>{setTimeout(()=>{const f=t.getRootElement(),p=document.activeElement,g=f&&f.contains(p),m=l.current&&l.current.contains(p);r(g||m)},10)},[t]);L.useEffect(()=>(u(),Fe(t.registerCommand(fl,()=>(u(),!1),Fa),t.registerCommand(dl,()=>(u(),!1),Fa))),[t,u]);const d=N.jsx("div",{ref:l,onBlur:u,className:La("toolbar flex gap-1 p-2 h-11 max-w-[90vw] text-black bg-gray-100 border border-gray-300 rounded items-center overflow-x-auto font-owlstown",{"absolute z-30 transition-[top,left,width] duration-300 shadow":e,"opacity-50 pointer-events-none":!e}
25),style:{top:`${i.top}px`,left:`${i.left}px`,minWidth:`${i.width}px`},onMouseDown:f=>{f.target instanceof HTMLSelectElement||f.preventDefault()},children:N.jsx(gh,{editor:t,setIsLinkEditMode:n})});return N.jsx("div",{ref:c,className:"h-11 rounded overflow-hidden",style:{margin:"-1px"},onClick:f=>{if(f.target instanceof HTMLSelectElement)return;const p=t.getRootElement();p==null||p.focus()},children:e?Er.createPortal(d,document.body):d})}function ls(n){const t=n.anchor,e=n.focus,r=n.anchor.getNode(),i=n.focus.getNode();return r===i?r:n.isBackward()?Ho(e)?r:i:Ho(t)?r:i}const ph=10,mh=5;function _h(n,t,e,r=ph,i=mh){const s=e.parentElement;if(n===null||!s){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}const o=t.getBoundingClientRect(),a=e.getBoundingClientRect(),l=s.getBoundingClientRect();let c=n.top-r,u=n.left-i;c<l.top&&(c+=o.height+n.height+r*2),u+o.width>l.right&&(u=l.right-o.width-i);const d=Math.abs(l.top)-Math.abs(a.top);return c-=a.top-n.height-d-20,u-=a.left,{top:c,left:u}}function yh({anchorElem:n=document.body,isLinkEditMode:t,setIsLinkEditMode:e}){const[r]=Be();return bh(r,n,t,e)}function bh(n,t,e,r){const[i,s]=L.useState(n),[o,a]=L.useState(!1);return L.useEffect(()=>{function l(){const c=R();if(F(c)){const u=ls(c),d=fe(u,ie),f=fe(u,nn);if(!(d||f)){a(!1);return}const p=c.getNodes().filter(g=>!it(g)).find(g=>{const m=fe(g,ie),_=fe(g,nn);return d&&!d.is(m)||m&&!m.is(d)||f&&!f.is(_)||_&&(!_.is(f)||_.getIsUnlinked())});a(!p)}else if(ce(c)){const u=c.getNodes();if(u.length===0){a(!1);return}const d=u[0],f=d.getParent();ie(f)||ie(d)?a(!0):a(!1)}}return Fe(n.registerUpdateListener(({editorState:c})=>{c.read(()=>{l()})}),n.registerCommand(Yn,(c,u)=>(l(),s(u),!1),Dl),n.registerCommand(us,c=>{const u=R();if(F(u)){const d=ls(u),f=fe(d,ie);if(ie(f)&&(c.metaKey||c.ctrlKey))return window.open(f.getURL(),"_blank"),!0}return!1},rt))},[n]),Er.createPortal(N.jsx(xh,{editor:i,isLink:o,setIsLink:a,anchorElem:t,isLinkEditMode:e,setIsLinkEditMode:r}),t)}function xh({editor:n,isLink:t,setIsLink:e,anchorElem:r,isLinkEditMode:i,setIsLinkEditMode:s}){const{site_subdomain:o}=Tu(),a=L.useRef(null),l=L.useRef(null),[c,u]=L.useState(""),[d,f]=L.useState("https://"),[p,g]=L.useState(null),[m,_]=L.useState(null),b=L.useCallback(()=>{var M,B;const x=R();if(F(x)){const P=ls(x),z=fe(P,ie);z?u(z.getURL()):ie(P)?u(P.getURL()):u(""),i&&f(c)}else if(ce(x)){const P=x.getNodes();if(P.length>0){const z=P[0],j=z.getParent();ie(j)?u(j.getURL()):ie(z)?u(z.getURL()):u(""),i&&f(c)}}const C=a.current,E=De(n._window),v=document.activeElement;if(C===null)return;const A=n.getRootElement();if(x!==null&&A!==null&&n.isEditable()){let P;if(ce(x)){const z=x.getNodes();if(z.length>0){const j=n.getElementByKey(z[0].getKey());j&&(P=j.getBoundingClientRect())}}else E!==null&&A.contains(E.anchorNode)&&(P=(B=(M=E.focusNode)==null?void 0:M.parentElement)==null?void 0:B.getBoundingClientRect());if(P){console.log({domRect:P});const z=_h(P,C,r);_(z)}g(x)}else(!v||v.className!=="link-input")&&(g(null),s(!1),u(""));return!0},[r,n,s,i,c]);L.useEffect(()=>{const x=r.parentElement,C=()=>{n.getEditorState().read(()=>{b()})};return window.addEventListener("resize",C),x&&x.addEventListener("scroll",C),()=>{window.removeEventListener("resize",C),x&&x.removeEventListener("scroll",C)}},[r.parentElement,n,b]),L.useEffect(()=>Fe(n.registerUpdateListener(({editorState:x})=>{x.read(()=>{b()})}),n.registerCommand(Yn,()=>(b(),!0),rt),n.registerCommand(ds,()=>t?(e(!1),!0):!1,Jd)),[n,b,e,t]),L.useEffect(()=>{n.getEditorState().read(()=>{b()})},[n,b]),L.useEffect(()=>{i&&l.current&&l.current.focus()},[i,t]),L.useEffect(()=>{const x=a.current;if(x===null)return;const C=E=>{!x.contains(E.relatedTarget)&&t&&(e(!1),s(!1))};return x.addEventListener("focusout",C),()=>{x.removeEventListener("focusout",C)}},[a,e,s,t]);const h=c&&!/^(http|https):/.test(c),y=h?null:"_blank",S=`/preview/${o}`,w=h?`${S}${c}`:c;return N.jsxs(N.Fragment,{children:[N.jsxs("div",{ref:a,className:La("flex-row items-center gap-1 py-1 px-2 bg-white rounded-sm text-black",t?"flex flex-row":"hidden"),style:{to
25p:(m==null?void 0:m.top)||0,left:(m==null?void 0:m.left)||0,boxShadow:"0 1px 5px 0 rgba(0, 0, 0, 0.4)",position:"absolute",zIndex:1e3},children:[N.jsx("a",{className:"flex-1 block ml-2 mr-2 text-sm max-w-[500px] truncate",href:w,target:y,children:c}),N.jsx("div",{className:"btn btn-ghost btn-square btn-sm",role:"button",tabIndex:0,onMouseDown:x=>x.preventDefault(),onClick:x=>{x.preventDefault(),f(c),s(!0)},children:N.jsx(Ee,{icon:"material-symbols:edit",height:"20"})}),N.jsx("div",{className:"btn btn-ghost btn-square btn-sm",role:"button",tabIndex:0,onMouseDown:x=>x.preventDefault(),onClick:x=>{n.dispatchCommand(hn,null)},children:N.jsx(Ee,{icon:"material-symbols:delete",height:"20"})})]}),N.jsx(Eu,{initialUrl:c,open:i,onClose:()=>s(!1),onSubmit:x=>{n.dispatchCommand(hn,x),s(!1)},showTextField:!1})]})}const Sh=[nr,ni,wn,Cn,Kt,rr,or,lr,ri,ir,sr,cr];function vh({onChange:n,initialValue:t,v1Value:e}){const[r]=Be(),[i,s]=L.useState(!0);return L.useEffect(()=>{i&&(!t&&!e||(r.update(()=>{if(t){const o=JSON.parse(t),a=r.parseEditorState(o);r.setEditorState(a)}else if(e){const a=new DOMParser().parseFromString(e,"text/html"),l=Cc(r,a);te().clear().append(...l)}}),s(!1)))},[r,t,e,i]),N.jsx(Hg,{onChange:o=>{o.read(()=>{const a=wc(r,null),l=o.toJSON();n(JSON.stringify(l),a)})}})}function Ch({initialValue:n,v1Value:t,onChange:e,className:r,autoFocus:i}){const s={namespace:"MyEditor",onError:c=>console.error(c),nodes:Sh},[o,a]=L.useState(!1),l=(c,u)=>{e&&e(c,u)};return N.jsx("div",{className:vt("relative flex flex-col border border-gray-300 rounded bg-white",r),children:N.jsxs(Cf,{initialConfig:s,children:[N.jsx(hh,{setIsLinkEditMode:a}),N.jsxs("div",{className:"relative mt-0! p-2 flex-grow min-h-[200px]",children:[N.jsx(_g,{contentEditable:N.jsx(Sg,{className:"outline-none min-h-[150px] resize-y"}),placeholder:N.jsx("div",{className:"absolute top-2 left-2 mt-0! text-gray-400 pointer-events-none",children:"Enter some text..."}),ErrorBoundary:Yg}),N.jsx(Ng,{}),N.jsx(zg,{}),N.jsx(Kg,{}),N.jsx(yh,{anchorElem:document.body,setIsLinkEditMode:a,isLinkEditMode:o}),N.jsx(vh,{onChange:l,initialValue:n,v1Value:t})]})]})})}function wh({block:n,onUpdate:t,site_id:e}){const{setValue:r,getValues:i,register:s}=Oa({block:n,onUpdate:t,debouncedFields:["lexical_json","lexical_html"]}),o=(c,u)=>{r("lexical_json",c),r("lexical_html",u)},a=c=>{c.preventDefault(),t({_id:n._id,kind:J.VISUAL_TEXT,value:i("v1_value")||""})},l=!!i("v1_value")&&Ks().isBefore(Ks(i("converted_from_v1_at")).add(1,"hour"));return N.jsxs("div",{className:"flex flex-col gap-2",children:[N.jsx("div",{className:"flex items-center justify-between",children:l&&N.jsx("button",{type:"button",onClick:a,className:"px-2 py-1 text-sm bg-gray-200 hover:bg-gray-300 rounded border border-gray-400",children:"Revert to V1"})}),N.jsx(Ch,{autoFocus:!0,className:"theme-lexical-content",onChange:o,initialValue:i("lexical_json"),v1Value:i("v1_value")})]})}function Eh({block:n,block_id:t,record_type:e,record_id:r,site_id:i,site_subdomain:s,renderFields:o=()=>null}){const[a,l]=Qt.useState(!1),[c,u]=Qt.useState(!1),[d,f]=Qt.useState({}),p=Vs.underscore(Vs.pluralize(e)),[g,m]=Qt.useState({...Lu(n.kind),...n}),_=()=>{l(!0);const S=`/builder/${i}/${p}/${r}/blocks/${t}`;Hs(S,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})},b=S=>{u(!0);const w=`/builder/${i}/${p}/${r}/blocks/${t}.json`;Ou.patch(w,{block:S,authenticity_token:Au()}).then(x=>x.data).then(x=>{m(x),f({}),u(!1),new URLSearchParams({block_id:t,record_id:r,record_type:e}).toString();const E=`/builder/${i}/${p}/${r}/blocks/${t}/content`;Hs(E,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}).catch(x=>{f(x.response.data),u(!1)})},h=()=>{const S=`/builder/${i}/${p}/${r}/blocks/${t}`;Cu(S,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})},y=Ru(g.kind);return N.jsxs("div",{className:"flex flex-col gap-2 px-3 py-2 font-owlstown",children:[N.jsxs("div",{className:"flex flex-row items-center gap-4",children:[N.jsx("div",{className:"flex-none",children:N.jsx("div",{className:"text-sm text-gray-500",children:Iu(g.kind)||g.kind})}),y&&N.jsx("a",{className:"btn btn-sm btn-square btn-ghost !text-gray-400",href:y,target:"_blank",children:N.jsx(Ee,{icon:"material-symbols:help-outline",height:"24"})}),N.jsx("div",{className:"flex-1"}),N.jsx("button",{className:"btn btn-sm btn-square btn-ghost",onClick:h,children:N.jsx(Ee,{icon:"material-symbols:delete",height:"24"})}),c?N.jsxs("div",{className:"flex-none flex flex-row items-center gap-3",children:[N.jsx("div",{className:"loading loading-sm loading-spinner"}),N.jsx("div",{className:"text-sm text-gray-400",children:"Savingâ¦"})]}):N.jsx("div",{className:"tooltip tooltip-bottom","data-tip":"Your changes are auto-saved.",children:N.jsx(Ee,{icon:"material-symbols:task-alt",className:"text-gray-400",style:{display:"block",fontSize:"1.25rem"}})}),N.jsx("button",{className:"btn btn-sm btn-square btn-ghost",disabled:c,onClick:_,children:a?N.jsx("span",{className:"loading loading-spinner loading-xs"}):N.jsx(Ee,{icon:"material-symbols:close",height:"24"})})]}),vu(o)&&o({block:g,onUpdate:b,errors:d})]})}function bp(n){const[t,e]=Qt.useState(!1),{site_id:r,site_subdomain:i}=n;return Qt.useEffect(()=>{wu.connect(()=>{e(!0)})},[]),t?N.jsx(Nu,{children:N.jsx(Fu,{children:N.jsx(ku,{site_id:r,site_subdomain:i,children:N.jsx("div",{className:"mb-2 bg-gray-100 border border-gray-200 shadow rounded-lg",style:{minWidth:"200px",zIndex:1,position:"relative"},children:N.jsx(Th,{...n})})})})}):null}function Th({block:n,site_id:t,block_id:e,record_type:r,record_id:i,site_subdomain:s}){return N.jsx(Eh,{block:n,renderFields:({block:o,onUpdate:a,errors:l})=>{let c=null;switch(o.kind){case J.BUTTON_LINKS:c=Su;break;case J.BUYMEACOFFEE:c=xu;break;case J.CALLOUT:c=bu;break;case J.CODE:c=yu;break;case J.COLUMNS:c=_u;break;case J.CONTACT_FORM:c=mu;break;case J.CONTACT_INFO:c=pu;break;case J.EMBED:c=hu;break;case J.GOOGLE_DOCS:c=gu;break;case J.HIGHLIGHTS_LIST:c=Mu;break;case J.HTML:c=fu;break;case J.MARKDOWN:c=du;break;case J.MARKDOWN_FOOTNOTES:c=uu;break;case J.MENTOR_FIRST:c=cu;break;case J.OWLSTOWN_LIST:c=lu;break;case J.PAGES_LIST:c=au;break;case J.PDF:c=ou;break;case J.PEOPLE_LIST:c=su;break;case J.PICTURE:c=iu;break;case J.PICTURE_GALLERY:c=ru;break;case J.PUBLICATIONS_LIST:c=nu;break;case J.PUBLICATIONS_LIST_V2:c=tu;break;case J.PUBLICATIONS_LIST_V3:c=eu;break;case J.TIKTOK:c=Qc;break;case J.TWITTER_EMBED:c=Xc;break;case J.VIMEO:c=Zc;break;case J.VISUAL_TEXT:c=Yc;break;case J.VISUAL_TEXT_V2:c=wh;break;case J.YOUTUBE:c=qc;break;default:return N.jsx(kh,{})}return N.jsx(c,{block:o,site_id:t,onUpdate:a,errors:l})},block_id:e,record_type:r,record_id:i,site_id:t,site_subdomain:s})}function kh(){return null}export{bp as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.