1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7844],{31746:function(e,t,n){let r,i,l;var o=n(54201),s=n(9382);let a=Symbol.for("preact-signals");function u(){if(h>1)return void h--;let e,t=!1;for(!function(){let e=c;for(c=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==i;){let n=i;for(i=void 0,g++;void 0!==n;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&S(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(g=0,h--,t)throw e}function f(e){if(h>0)return e();_=++p,h++;try{return e()}finally{u()}}function d(e){let t=r;r=void 0;try{return e()}finally{r=t}}let c,h=0,g=0,p=0,_=0,m=0;function y(e){if(void 0===r)return;let t=e.n;return void 0===t||t.t!==r?(t={i:0,S:e,p:r.s,n:void 0,t:r,e:void 0,x:void 0,r:t},void 0!==r.s&&(r.s.n=t),r.s=t,e.n=t,32&r.f&&e.S(t),t):-1===t.i?(t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=r.s,t.n=void 0,r.s.n=t,r.s=t),t):void 0}function x(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function v(e,t){return new x(e,t)}function S(e){for(let t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function C(e){for(let t=e.s;void 0!==t;t=t.n){let n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function b(e){let t,n=e.s;for(;void 0!==n;){let e=n.p;-1===n.i?(n.S.U(n),void 0!==e&&(e.n=n.n),void 0!==n.n&&(n.n.p=e)):t=n,n.S.n=n.r,void 0!==n.r&&(n.r=void 0),n=e}e.s=t}function T(e,t){x.call(this,void 0),this.x=e,this.s=void 0,this.g=m-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function k(e){let t=e.m;if(e.m=void 0,"function"==typeof t){h++;let n=r;r=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,N(e),t}finally{r=n,u()}}}function N(e){for(let t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,k(e)}function E(e){if(r!==this)throw Error("Out-of-order effect");b(this),r=e,this.f&=-2,8&this.f&&N(this),u()}function w(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function O(e,t){let n=new w(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function P(e,t={}){let n={};for(let r in e){let i=t[r],l=v(void 0===i?e[r]:i);n[r]=l}return n}function M(e){let t=new Set,n=new Set;for(let r of A(e)){let e="function"==typeof r?r:r.replace;(0,o.TSH)(e),t.add(e.getType()),n.add(e)}return{nodes:n,types:t}}function A(e){return("function"==typeof e.nodes?e.nodes():e.nodes)||[]}function D(e,t){let n;return v(e(),{unwatched(){n&&(n(),n=void 0)},watched(){this.value=e(),n=t(this)}})}x.prototype.brand=a,x.prototype.h=function(){return!0},x.prototype.S=function(e){let t=this.t;t!==e&&void 0===e.e&&(e.x=t,this.t=e,void 0!==t?t.e=e:d(()=>{var e;null==(e=this.W)||e.call(this)}))},x.prototype.U=function(e){if(void 0!==this.t){let t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&d(()=>{var e;null==(e=this.Z)||e.call(this)}))}},x.prototype.subscribe=function(e){return O(()=>{let t=this.value,n=r;r=void 0;try{e(t)}finally{r=n}},{name:"sub"})},x.prototype.valueOf=function(){return this.value},x.prototype.toString=function(){return this.value+""},x.prototype.toJSON=function(){return this.value},x.prototype.peek=function(){let e=r;r=void 0;try{return this.value}finally{r=e}},Object.defineProperty(x.prototype,"value",{get(){let e=y(this);return void 0!==e&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(g>100)throw Error("Cycle detected");0!==h&&0===g&&this.l!==_&&(this.l=_,c={S:this,v:this.v,i:this.i,o:c}),this.v=e,this.i++,m++,h++;try{for(let e=this.t;void 0!==e;e=e.x)e.t.N()}finally{u()}}}}),T.prototype=new x,T.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f)||(this.f&=-5,this.g===m))return!0;if(this.g=m,this.f|=1,this.i>0&&!S(this))return this.f&=-2,!0;let e=r;try{C(this),r=this;let e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return r=e,b(this),this.f&=-2,!0},T.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(let e=this.s;void 0!==e;
1e=e.n)e.S.S(e)}x.prototype.S.call(this,e)},T.prototype.U=function(e){if(void 0!==this.t&&(x.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(let e=this.s;void 0!==e;e=e.n)e.S.U(e)}},T.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(T.prototype,"value",{get(){if(1&this.f)throw Error("Cycle detected");let e=y(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),w.prototype.c=function(){let e=this.S();try{if(8&this.f||void 0===this.x)return;let e=this.x();"function"==typeof e&&(this.m=e)}finally{e()}},w.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,k(this),C(this),h++;let e=r;return r=this,E.bind(this,e)},w.prototype.N=function(){2&this.f||(this.f|=2,this.u=i,i=this)},w.prototype.d=function(){this.f|=8,1&this.f||N(this)},w.prototype.dispose=function(){this.d()};let I=(0,o.vE9)({build:e=>D(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:"@lexical/extension/EditorState"});function F(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}try{l="0.46.0+prod.esm"}catch(e){}let L=l??'"<unknown>+source"',R=new Set(["__proto__","constructor","prototype"]),K=new Set;class B{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:0}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):o.Tc1;for(let n of this.configs)e=t(e,n);return e}init(e){let t,n=this.state;2===n.id||F(306,String(n.id));let 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)},l=Object.assign(n,{config:this.mergeConfigs(),id:3,registerState:r});this.state=l,this.extension.init&&(t=this.extension.init(e,l.config,r)),this.state=Object.assign(l,{id:4,initResult:t,registerState:i})}build(e){let t,n=this.state;4!==n.id&&F(307,String(n.id),String(5)),this.extension.build&&(t=this.extension.build(e,n.config,n.registerState));let r={...n.registerState,getOutput:()=>t,getSignal:this.getSignal.bind(this)};this.state=Object.assign(n,{id:5,output:t,registerState:r})}register(e,t){this._signal=t;let n=this.state;5!==n.id&&F(308,String(n.id),String(5));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=Object.assign(n,{id:6}),()=>{let e=this.state;7!==e.id&&F(309,String(n.id),String(7)),this.state=Object.assign(e,{id:5}),r&&r()}}afterRegistration(e){let t,n=this.state;return 6!==n.id&&F(310,String(n.id),String(6)),this.extension.afterRegistration&&(t=this.extension.afterRegistration(e,n.config,n.registerState)),this.state=Object.assign(n,{id:7}),t}getSignal(){return void 0===this._signal&&F(311),this._signal}getInitResult(){void 0===this.extension.init&&F(312,this.extension.name);let e=this.state;return e.id>=4||F(313,String(e.id),String(4)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return e.id>=3||F(314,String(e.id),String(3)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return void 0===t&&F(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return void 0===t&&F(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return e.id>=7||F(316,String(e.id),String(7)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||K}getPeerNameSet(){let e=this._peerNameSet;
1return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;e.id>=5||F(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}}let z={tag:o.T40};function W(){let e=(0,o.NiT)();e.isEmpty()&&e.append((0,o.lJ7)())}let $=(0,o.vE9)({config:(0,o.lVE)({setOptions:z,updateOptions:z}),init:({$initialEditorState:e=W})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if((0,o.v0B)(r))e.setEditorState(r,n);else if("function"==typeof r)e.update(()=>{r(e)},t);else if(r&&("string"==typeof r||"object"==typeof r)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[o.haT,o.Ey8,o.GRK,o.MZu,o.fD3]}),U=Symbol.for("@lexical/extension/LexicalBuilder");function J(){}function q(e){throw e}function j(e){return Array.isArray(e)?e:[e]}class H{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){for(const t of(this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=L,this.roots=e,e))this.addExtension(t)}static fromExtensions(e){let t=[j($)];for(let n of e)t.push(j(n));return new H(t)}static maybeFromEditor(e){let t=e[U];return t&&(t.PACKAGE_VERSION!==L&&F(292,t.PACKAGE_VERSION,L),t instanceof H||F(293)),t}static fromEditor(e){let t=H.maybeFromEditor(e);return void 0===t&&F(294),t}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign((0,o.ieJ)({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[U]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=J;function t(){try{e()}finally{e=J}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});
1return e=(0,o.Sdt)(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&F(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){void 0!==this._sortedExtensionReps&&F(296);let[t]=j(e);"string"!=typeof t.name&&F(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(void 0!==n&&n.extension!==t&&F(298,t.name),!n){n=new B(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);for(let n of("string"==typeof e&&F(299,t.name,e),t.conflictsWith||[]))this.extensionNameMap.has(n)&&F(299,t.name,n),this.conflicts.set(n,t.name);for(let e of t.dependencies||[]){let n=j(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{var i,l;let o=n.state;if(2===o.id)return;let s=n.extension.name;0===o.id||F(300,s,r||"[unknown]"),0===(i=o).id||F(304,String(i.id),String(0)),n.state=o=Object.assign(i,{id:1});let a=this.outgoingConfigEdges.get(s);if(a)for(let e of a.keys()){let n=this.extensionNameMap.get(e);n&&t(n,s)}1===(l=o).id||F(305,String(l.id),String(1)),n.state=o=Object.assign(l,{id:2}),e.push(n)};for(let e of this.extensionNameMap.values())0===e.state.id&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);for(let r of(void 0===n&&F(301,e.name),t))n.configs.add(r)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return(0,o.Sdt)(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},l={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(void 0!==o.onError&&(e.onError=o.onError),void 0!==o.onWarn&&(e.onWarn=o.onWarn),void 0!==o.disableEvents&&(e.disableEvents=o.disableEvents),void 0!==o.parentEditor&&(e.parentEditor=o.parentEditor),void 0!==o.editable&&(e.editable=o.editable),void 0!==o.namespace&&(e.namespace=o.namespace),void 0!==o.$initialEditorState&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of A(o)){if("function"!=typeof e){let t=n.get(e.replace);t&&F(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&function e(t,n){if(t&&n&&!Array.isArray(n)&&"object"==typeof t&&"object"==typeof n){for(let r in n)!R.has(r)&&Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=e(t[r],n[r]));return t}return n}(l,o.theme)}Object.keys(l).length>0&&(e.theme=l),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,a=r.size>0;for(let t of((s||a)&&(e.html={},s&&(e.html.import=i),a&&(e.html.export=r)),o))t.init(e);return e.onError||(e.onError=q),e}}function V(e,t){let n=H.fromEditor(e).getExtensionRep(t);return void 0===n&&F(303,t.name),n.getExtensionDependency()}function Z(e,t){let n=H.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function G(e){return V((0,o.i0_)(),e).output}function Y(e){return Z((0,o.i0_)(),e)}let Q=new Set,X=(0,o.vE9)({build(e,t,n){let r=n.getDependency(I).output,i=v({watchedNodeKeys:new Map}),l=D(()=>{},()=>O(()=>{let e=l.peek(),{watchedNodeKeys:t}=i.value,n,s=!1;r.value.read(()=>{if((0,o.vJq)())for(let[r,i]of t.entries()){if(0===i.size){t.delete(r);continue}let l=(0,o.nsf)(r),a=l&&l.isSelected()||!1;s=s||a!==(!!e&&e.has(r)),a&&(n=n||new Set).add(r)}}),!s&&n&&e&&n.size===e.size||(l.value=n)}));
1return{watchNodeKey:function(e){let t=new T(()=>(l.value||Q).has(e),void 0),{watchedNodeKeys:n}=i.peek(),r=n.get(e),o=void 0!==r;return(r=r||new Set).add(t),o||(n.set(e,r),i.value={watchedNodeKeys:n}),t}}},dependencies:[I],name:"@lexical/extension/NodeSelection"}),ee=(0,o.guI)("INSERT_HORIZONTAL_RULE_COMMAND");class et extends o.Kp7{static getType(){return"horizontalrule"}static clone(e){return new et(e.__key)}static importJSON(e){return er().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:en,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){let t=document.createElement("hr");return(0,o.ZB7)(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}}function en(){return{node:er()}}function er(){return(0,o.phO)(et)}let ei=(0,o.vE9)({dependencies:[I,X],name:"@lexical/extension/HorizontalRule",nodes:()=>[et],register(e,t,n){let{watchNodeKey:r}=n.getDependency(X).output,i=v({nodeSelections:new Map}),l=e._config.theme.hrSelected??"selected";return(0,o.Sdt)(e.registerCommand(ee,e=>{let t=(0,o.vJq)();if(!(0,o.I2P)(t))return!1;if(null!==t.focus.getNode()){let e=er();(0,s.Pe)(e)}return!0},0),e.registerCommand(o.d8p,e=>{if((0,o.vAA)(e.target)){let t=(0,o.pJU)(e.target);if(t instanceof et)return function(e,t=!1){let n,r=(0,o.vJq)(),i=e.isSelected(),l=e.getKey();t&&(0,o.RTZ)(r)?n=r:(n=(0,o.rUs)(),(0,o.n1P)(n)),i?n.delete(l):n.add(l)}(t,e.shiftKey),!0}return!1},1),e.registerMutationListener(et,(t,n)=>{f(()=>{let n=!1,{nodeSelections:l}=i.peek();for(let[i,o]of t.entries())if("destroyed"===o)l.delete(i),n=!0;else{let t=l.get(i),o=e.getElementByKey(i);t?t.domNode.value=o:(n=!0,l.set(i,{domNode:v(o),selectedSignal:r(i)}))}n&&(i.value={nodeSelections:l})})}),O(()=>{let e=[];for(let{domNode:t,selectedSignal:n}of i.value.nodeSelections.values())e.push(O(()=>{let e=t.value;e&&(n.value?(0,o.ZB7)(e,l):(0,o.HEf)(e,l))}));return(0,o.Sdt)(...e)}))}});function el(e){(0,o.ff4)(e)&&e.isInline()&&e.isEmpty()&&e.remove()}let eo=(0,o.vE9)({build:(e,t,n)=>P(t),config:(0,o.lVE)({disabled:!1}),name:"@lexical/NormalizeInlineElements",register:(e,t,n)=>{let r=n.getOutput();return O(()=>{if(!r.disabled.value){let t=[];for(let{klass:n,transforms:r}of e._nodes.values())n.prototype instanceof o.fGB&&n.prototype.isInline!==o.fGB.prototype.isInline&&(r.add(el),t.push(()=>r.delete(el)));return()=>t.forEach(e=>e())}})}}),es=new Set([o.XI_,o.OQi]),ea=(0,o.vE9)({build:(e,t,n)=>P(t),config:(0,o.lVE)({$fixFocusOverselection:function(){let e=(0,o.vJq)();if((0,o.I2P)(e)&&!e.isCollapsed()){let t=(0,o.NZv)((0,o.$iu)(e),"next"),n=t.focus;for((0,o.rN)(n)&&t.anchor.origin!==n.origin&&0===n.offset&&(n=(0,o.NG9)(n.getSiblingCaret())),(0,o.OpE)(n)&&t.anchor.origin!==n.origin&&(0,o.wH$)(n.origin)&&(n=(0,o.NG9)(n));(0,o.cmH)(n)&&t.anchor.origin!==n.origin;)n=(0,o.NG9)((0,o.IlV)(n.origin,"next"));if((0,o.OpE)(n)&&(0,o.ff4)(n.origin)&&(n=(0,o.lSZ)((0,o.uwZ)(n.origin,"previous")).getFlipped()),!(n=(0,o.lSZ)(n)).isSamePointCaret(t.focus)){let e=(0,o.xQ8)((0,o.TJt)(t.anchor,n)),r=(0,o.i0_)().getRootElement(),i=r&&(0,o.peL)(r.ownerDocument.defaultView);i&&(0,o.mYE)((0,o.S1w)(),e,(0,o.i0_)(),i,es,r)}}},dateNow:Date.now,disabled:!1,thresholdMsec:100}),name:"@lexical/NormalizeTripleClickSelection",register:(e,t,n)=>O(()=>{let t=n.getOutput();if(!t.disabled.value)return e.registerRootListener(n=>{let r;if(!n)return;let i=0,l=e=>{if(e?3===e.detail:i>0){let n=t.dateNow.peek()();i=e&&"mousedown"===e.type||n-i<=t.thresholdMsec.peek()?n:0}return i};return(0,o.Sdt)(e.registerCommand(o.MvL,()=>(l(null)&&(i=0,t.$fixFocusOverselection.peek()()),!1),-4),((r=["mouseup","mousedown"]).forEach(e=>n.addEventListener(e,l,!0)),()=>r.forEach(e=>n.removeEventListener(e,l,!0))))})})});function eu(e){return e.canIndent()}let ef=(0,o.vE9)({build:(e,t,n)=>P(t),config:(0,o.lVE)({$canIndent:eu,disabled:!1,maxIndent:null}),name:"@lexical/extension/TabIndentation",register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:l}=n.getOutput();return O(()=>{if(!r.value)return function(e,t,n=eu){return(0,o.Sdt)(e.registerCommand(o.OXk,t=>{let n=(0,o.vJq)();if(!(0,o.I2P)(n))return!1;t.preventDefault();let r=!function(e){if(e.getNodes().filter(e=>(0,o.y68)(e)&&e.canIndent()).length>0)return!0;let t=e.anchor,n=e.focus,r=n.isBefore(t)?n:t,i=r.getNode(),l=(0,s.mB)(i);if(l.canIndent()){let e=l.getKey(),t=(0,o.uTE)();
1if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),(t=(0,o.CaD)(t)).anchor.is(r))return!0}return!1}(n)?o.YW5:t.shiftKey?o.sik:o.PiT;return e.dispatchCommand(r,void 0)},0),e.registerCommand(o.PiT,()=>{let e="number"==typeof t?t:t?t.peek():null,r=(0,o.vJq)();if(!(0,o.I2P)(r))return!1;let i="function"==typeof n?n:n.peek();return(0,s.Jy)(t=>{if(i(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},4))}(e,i,l)})}});n.d(t,{PL:function(){return er},QZ:function(){return O},XT:function(){return M},cP:function(){return Y},fS:function(){return et},fU:function(){return G},iZ:function(){return H},jX:function(){return D},v:function(){return P},vA:function(){return f},vP:function(){return v},wD:function(){return V},xT:function(){return Z}},{Bw:eo,SY:ei,mm:ef,s0:ee,vw:ea})},8874:function(e,t,n){var r=n(31746),i=n(54201);function l(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}let o=(0,i.vE9)({build:(e,{delay:t,createInitialHistoryState:n,disabled:i,maxDepth:l,now:o},s)=>({...(0,r.v)({delay:t,disabled:i,historyState:n(e),maxDepth:l,now:o}),...s.getInitResult()}),config:(0,i.lVE)({createInitialHistoryState:function(){return{current:null,redoStack:[],undoStack:[]}},delay:300,disabled:"u"<typeof window,maxDepth:null,now:Date.now}),init:()=>({canRedo:(0,r.vP)(!1),canUndo:(0,r.vP)(!1)}),name:"@lexical/history/History",register:(e,t,n)=>{let{canUndo:o,canRedo:s}=n.getInitResult(),a=n.getOutput(),u=e=>(0,r.vA)(()=>{o.value=null!=e&&e.undoStack.length>0,s.value=null!=e&&e.redoStack.length>0});return(0,r.QZ)(()=>{if(!a.disabled.value)return function(e,t,n,r=Date.now,o,s=null){let a,u,f,d,c,h=(a=r(),u=0,f=a,d=0,c=null,(t,l,o,s,h,g)=>{let p=r();if(g.has(i.xKE)&&(f=a,d=u,c=t),g.has(i.n0X))return u=0,a=p,2;g.has(i.sne)&&c&&(a=f,u=d,t=c);let _=g.has("paste")||g.has("cut")?0:function(e,t,n,r,l){if(null===e||0===n.size&&0===r.size&&!l)return 0;let o=t._selection,s=e._selection;if(l)return 1;if(!((0,i.I2P)(o)&&(0,i.I2P)(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;let a=function(e,t,n){let r=e._nodeMap,l=[];for(let e of t){let t=r.get(e);void 0!==t&&l.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);void 0===n||(0,i.hVZ)(n)||l.push(n)}return l}(t,n,r);if(0===a.length)return 0;if(a.length>1){let n=t._nodeMap,r=n.get(o.anchor.key),l=n.get(s.anchor.key);return r&&l&&!e._nodeMap.has(r.__key)&&(0,i.kFe)(r)&&1===r.__text.length&&1===o.anchor.offset?2:0}let u=a[0],f=e._nodeMap.get(u.__key);if(!(0,i.kFe)(f)||!(0,i.kFe)(u)||f.__mode!==u.__mode)return 0;let d=f.__text,c=u.__text;if(d===c)return 0;let h=o.anchor,g=s.anchor;if(h.key!==g.key||"text"!==h.type)return 0;let p=h.offset,_=g.offset,m=c.length-d.length;return 1===m&&_===p-1?2:-1===m&&_===p+1?3:4*(-1===m&&_===p)}(t,l,s,h,e.isComposing()),m=(()=>{var r,f;let d,c,m,y,x=null===o||o.editor===e,v=g.has(i.bMH);if(!v&&x&&g.has(i.T40))return 0;if(1===_)return 2;if(null===t)return 1;let S=l._selection;if(!(s.size>0||h.size>0))return 2*(null===S);let C="number"==typeof n?n:n.peek();return!1===v&&0!==_&&_===u&&p<a+C&&x?0:1!==s.size||(r=Array.from(s)[0],d=(f=t)._nodeMap.get(r),c=l._nodeMap.get(r),m=f._selection,y=l._selection,(0,i.I2P)(m)&&(0,i.I2P)(y)&&"element"===m.anchor.type&&"element"===m.focus.type&&"text"===y.anchor.type&&"text"===y.focus.type||!(0,i.kFe)(d)||!(0,i.kFe)(c)||d.__parent!==c.__parent||JSON.stringify(f.read(()=>d.exportJSON()))!==JSON.stringify(l.read(()=>c.exportJSON())))?1:0})();return a=p,u=_,m}),g=()=>{o&&o(t)};return g(),(0,i.Sdt)(e.registerCommand(i.ZKf,()=>((function(e,t,n){let r=t.redoStack,l=t.undoStack;if(0!==l.length){let o=t.current,s=l.pop();null!==o&&(r.push(o),e.dispatchCommand(i.WWb,!0)),0===l.length&&e.dispatchCommand(i.KfJ,!1),t.current=s||null,n&&n(t),s&&s.editor.setEditorState(s.editorState,{tag:i.n0X})}})(e,t,o),!0),0),e.registerCommand(i.V30,()=>((function(e,t,n){let r=t.redoStack,l=t.undoStack;if(0!==r.length){let o=t.current;null!==o&&(l.push(o),e.dispatchCommand(i.KfJ,!0));let s=r.pop();0===r.length&&e.dispatchCommand(i.WWb,!1),t.current=s||null,n&&n(t),s&&s.editor.setEditorState(s.editorState,{tag:i.n0X})}})(e,t,o),!0),0),e.registerCommand(i.SKc,()=>(l(t,o),!1),0),e.registerCommand(i.t5V,()=>(l(t,o),e.dispatchCommand(i.WWb,!1),e.dispatchCommand(i.KfJ,!1),!0),0
1),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:l,dirtyElements:o,tags:a})=>{let u=t.current,f=t.redoStack,d=t.undoStack,c=null===u?null:u.editorState;if(null!==u&&n===c)return;let p=h(r,n,u,l,o,a);if(1===p){if(0!==f.length&&(t.redoStack=[],e.dispatchCommand(i.WWb,!1)),null!==u){d.push({...u});let t="number"==typeof s||null===s?s:s.peek();null!==t&&d.length>t&&d.splice(0,d.length-t),e.dispatchCommand(i.KfJ,!0)}}else if(2===p)return;t.current={editor:e,editorState:n},g()}))}(e,a.historyState.value,a.delay,()=>a.now.peek()(),u,a.maxDepth);u(null)})}});n.d(t,{},{We:o})},89268:function(e,t,n){let r;var i=n(66714),l=n(54201),o=n(9382),s=n(31746);function a(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function u(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function f(e){return r&&r.editor===e?r:void 0}function d(e,t){let n=f(t);return n&&n[e]}function c(e,t){let n=t;for(let r of e){let[e,i]=function(e,t){if("cfg"in t){let{cfg:n,updater:r}=t;return[n,r(u(e,n))]}return t}(n,r),l=e.key;if(n===t&&u(n,e)===i)continue;let o=n===t||void 0===n?Object.create(t||null):n;o[l]=i,n=o}return n}function h(e,t){return[e,t]}function g(e,t,n,i=(0,l.i0_)()){let o=r,s=f(i);try{return r={...s,editor:i,[e]:t},n()}finally{r=o}}function p(e,t=()=>{}){return(n,r=(0,l.i0_)())=>i=>{let l=f(r),o=l&&l[e],s=c(n,o||t(r));return s&&s!==o?g(e,s,i,r):i()}}function _(e,t,n,r){return Object.assign((0,l.urt)(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}function m(e){if(!(0,l.mB$)(e)||null===e.querySelector("style"))return;let t=new Map;try{for(let n of Array.from(e.styleSheets)){let r;try{r=n.cssRules}catch(e){continue}for(let n of Array.from(r)){let r;if((0,o.xj)(n,CSSStyleRule)){try{r=e.querySelectorAll(n.selectorText)}catch(e){continue}for(let e of Array.from(r)){if(!(0,l.sby)(e))continue;let r=function(e){let n=t.get(e);if(void 0===n){n=new Set;for(let t=0;t<e.style.length;t++)n.add(e.style[t]);t.set(e,n)}return n}(e);for(let t=0;t<n.style.length;t++){let i=n.style[t];r.has(i)||e.style.setProperty(i,n.style.getPropertyValue(i),n.style.getPropertyPriority(i))}}}}}}catch(e){}}let y="@lexical/html/DOM",x=Symbol.for("@lexical/html/DOMExportContext"),v="@lexical/html/DOMImport",S=Symbol.for("@lexical/html/DOMImportContext"),C=_(x,"isExport",Boolean,void 0),b=p(x,function(e){let t=(0,s.xT)(e,y);return t?t.output.defaults:void 0});l.haT;let T=Symbol.for("@lexical/html/SelectorImpl");function k(e,t){let n={kind:"element",predicate:0===t.length?l.sby:1===t.length?t[0]:(e,n)=>{for(let r of t)if(!r(e,n))return!1;return!0},tags:e},r=n=>k(e,[...t,n]);return{[T]:n,attr:(e,t,n)=>r(w(e,t,n)),classAll:(...e)=>r(E(e)),classAny:(...e)=>{let t;return r(0===(t=N(e)).length?()=>!1:e=>{if(!(0,l.sby)(e))return!1;let n=e.classList;for(let e of t)if(n.contains(e))return!0;return!1})},styleAny:(e,t,n)=>r(function(e,t,n){if("string"==typeof t)return n=>(0,l.sby)(n)&&n.style.getPropertyValue(e)===t;if(t instanceof RegExp){let r=n&&n.capture;return(n,i)=>{if(!(0,l.sby)(n))return!1;let o=n.style.getPropertyValue(e);if(!o)return!1;let s=o.match(t);return null!==s&&(void 0!==r&&(i[r]=s),!0)}}a(362,JSON.stringify(e))}(e,t,n))}}function N(e){let t=[];for(let n of e)n&&t.push(n);return t}function E(e){let t=N(e);return 0===t.length?()=>!0:e=>{if(!(0,l.sby)(e))return!1;let n=e.classList;for(let e of t)if(!n.contains(e))return!1;return!0}}function w(e,t,n){if(!0===t)return t=>(0,l.sby)(t)&&t.hasAttribute(e);if("string"==typeof t)return n=>(0,l.sby)(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){let r=n&&n.capture;return(n,i)=>{if(!(0,l.sby)(n))return!1;let o=n.getAttribute(e);if(null==o)return!1;let s=o.match(t);return null!==s&&(void 0!==r&&(i[r]=s),!0)}}a(361,JSON.stringify(e))}let O={[T]:{kind:"text",predicate:l.YPs,tags:new Set}},P={[T]:{kind:"comment",predicate:e=>8===e.nodeType,tags:new Set}},M={any:()=>k(new Set,[]),comment:()=>P,tag(...e){e.length>0||a(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return k(t,[])},text:()=>O};function A(e,t){return(0,l.sby)(e)&&e.nodeName===t.toUpperCase()}let D=/[A-Za-z0-9_-]/;class I{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&D.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert('"'===e||"'"===e,"expected quote");let t=this.pos;for(;!this.eof()&&this.peek()!==e;)"\\"===this.peek()?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(e,t){e||a(364,String(this.pos+1),t,this.source)}}function F(e){return e}let L=_(S,"importSource",()=>"unknown",void 0),R=_(S,"importSourceDataTransfer",()=>null,void 0),K=_(S,"textFormat",()=>0,void 0),B=_(S,"textStyle",()=>({}),void 0);function z(e){if(!(0,l.sby)(e))return!1;
1if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function W(e){if((0,l.YPs)(e))return!0;if(!(0,l.sby)(e))return!1;let t=e.style.display;return t?t.startsWith("inline"):!(0,l.a9V)(e)&&(0,l._On)(e)}let $=_(S,"whitespaceConfig",()=>({isInline:W,preservesWhitespace:z}),void 0),U=_(S,"importOverlays",()=>[],void 0);class J{constructor(e){this.record=e}get(e){return u(this.record,e)}set(e,t){this.record[e.key]=t}update(e,t){this.record[e.key]=t(u(this.record,e))}has(e){return Object.prototype.hasOwnProperty.call(this.record,e.key)}}function q(e){let t=(0,s.xT)(e,v);return t?t.output.defaults:void 0}let j=p(S,q);function H(e){return(0,l.y68)(e)||(0,l.Cyw)(e)&&!e.isInline()}function V(e,t){var n;if(!(0,l.sby)(t))return e;let r=t.style.textAlign;if(n=r,!Q.has(n))return e;for(let t of e)(0,l.y68)(t)&&""===t.getFormatType()&&t.setFormat(r);return e}function Z(e,t,n){1===e.length&&(0,l.wH$)(e[0])&&(e=[]);let r=(0,l.lJ7)();if((0,l.sby)(n)){var i;let e=n.style.textAlign;i=e,Q.has(i)&&r.setFormat(e)}return[r.splice(0,0,e)]}let G={$accepts:H,$packageRun:Z,name:"BlockSchema"},Y={$accepts:H,$packageRun:Z,name:"RootSchema"},Q=new Set(["center","end","justify","left","right","start"]),X={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},ee={CODE:16,MARK:128},et=new Set(["font-weight","font-style","text-decoration","vertical-align"]),en={$import:(e,t)=>{var n;let r=e.get(K),i=X[t.nodeName],l={fontStyle:t.style.fontStyle,fontWeight:t.style.fontWeight,textDecoration:t.style.textDecoration,verticalAlign:t.style.verticalAlign},o=r&~(n=function(e){let t=0,n=0,{fontWeight:r,fontStyle:i,textDecoration:l,verticalAlign:o}=e;if("700"===r||"bold"===r?t|=1:"normal"!==r&&"400"!==r||(n|=1),"italic"===i?t|=2:"normal"===i&&(n|=2),l){let e=l.split(" ");e.includes("underline")&&(t|=8),e.includes("line-through")&&(t|=4),e.includes("none")&&(n|=12)}return"sub"===o?(t|=32,n|=64):"super"===o?(t|=64,n|=32):"baseline"===o&&(n|=96),{clear:n,set:t}}(i?{fontStyle:l.fontStyle||i.fontStyle,fontWeight:l.fontWeight||i.fontWeight,textDecoration:l.textDecoration||i.textDecoration,verticalAlign:l.verticalAlign||i.verticalAlign}:l)).clear|n.set,s=ee[t.nodeName];return s&&(o|=s),o===r?e.$importChildren(t):e.$importChildren(t,{context:[[K,o]]})},match:M.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function er(e,t,n){let r=e;for(;;){let e=null;for(;null===(e=t?r.nextSibling:r.previousSibling);){let e=r.parentNode;if(null===e)return null;r=e}if(r=e,!n.isInline(r))return null;let i=r;for(;null!==(i=t?r.firstChild:r.lastChild);)r=i;if((0,l.YPs)(r))return r;if("BR"===r.nodeName)return null}}function ei(e,t){return 0!==t&&(0,l.kFe)(e)?e.setFormat(t):e}function el(e,t){if((0,l.kFe)(e)){let n=function(e){let t="";for(let n in e)et.has(n)||(t+=`${n}: ${e[n]}; `);return t.trimEnd()}(t);""!==n&&e.setStyle(n)}return e}let eo={$import:(e,t)=>{let n=e.get(K),r=e.get(B),i=e.get($);if(function(e,t){let n=e.parentNode;for(;null!==n;){if(t.preservesWhitespace(n))return!0;n=n.parentNode}return!1}(t,i)){let e=(0,l._jw)(t.textContent||"");for(let t of e)ei(t,n),el(t,r);return e}let o=function(e,t){let n=(e.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(0===n.length)return"";if(" "===n[0]){let r=e,i=!0;for(;null!==r&&null!==(r=er(r,!1,t));){let e=r.textContent||"";if(e.length>0){/[ \t\n]$/.test(e)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n.length>0&&" "===n[n.length-1]){let r=e,i=!0;for(;null!==r&&null!==(r=er(r,!0,t));)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,-1))}return n}(t,i);if(""===o)return[];let s=(0,l.sTu)(o);return ei(s,n),el(s,r),[s]},match:M.text(),name:"@lexical/html/#text"},es={$import:()=>[],match:M.tag("script","style"),name:"@lexical/html/script-style-ignore"},ea={$import:(e,t)=>(0,l.J_T)(t)||(0,l.RB3)(t)?[]:[(0,l.WKo)()],match:M.tag("br"),name:"@lexical/html/br"},eu=[es,{$import:(e,t)=>{let n=(0,l.lJ7)();if((0,l.Sz2)(n,t),(0,l.dxY)(t,n),""===n.getFormatType()){let e=t.getAttribute("align");e&&Q.has(e)&&n.setFormat(e)}return(0,l.q3P)(n,t),[n.splice(0,0,e.$importChildren(t))]},match:M.tag("p"),name:"@lexical/html/p"},{$import:(e,t,n)=>(0,l.i0_)().hasNode(s.fS)?[(0,s.PL)()]:n(),match:M.tag("hr"),name:"@lexical/html/hr"},{$import:(e,t,n)=>(0,l.a9V)(t)?V(e.$importChildren(t,{schema:G}
1),t):n(),match:M.any(),name:"@lexical/html/transparent-block"},eo,ea,en];function ef(e,t){return(0,l.YPs)(t)?e.textIndices:8===t.nodeType?e.commentIndices:(0,l.sby)(t)?e.byTag.get(t.nodeName)||e.wildcardIndices:ed}let ed=Object.freeze([]),ec=Object.freeze({});function eh(e,t,n){let r=n&&n.$onChild,i=[];for(let n of Array.from(t.childNodes))for(let t of eg(e,n,void 0)){let e=r?r(t):t;null!=e&&i.push(e)}let l=n&&n.$after?n.$after(i):i,o=n&&n.schema;return o?function(e,t,n){let r=[],i=null,l=()=>{if(null===i)return;let t=i;if(i=null,e.$packageRun){let i=e.$packageRun(t,null,n);if(i.length>0){for(let e of i)r.push(e);return}}if("hoist"===e.onReject)for(let e of t)r.push(e)};for(let n of t)e.$accepts(n,null)?(l(),r.push(n)):(null===i&&(i=[]),i.push(n));return l(),e.$finalize?e.$finalize(r,null):r}(o,l,t):l}function eg(e,t,n){let r=()=>(function(e,t){let n=function(e,t){let n=[];for(let r=e.overlays.length-1;r>=0;r--){let i=e.overlays[r],l=ef(i,t);l.length>0&&n.push({dispatch:i,indices:l})}let r=ef(e.dispatch,t);return r.length>0&&n.push({dispatch:e.dispatch,indices:r}),n}(e,t);if(0===n.length)return ep(e,t);let r=0,i=0,o=()=>{for(;r<n.length;){let{dispatch:s,indices:a}=n[r];for(;i<a.length;){let n=a[i++],r=s.rules[n],f={};if(r.predicate(t,f)){let n=function(e,t){return{$importChildren:(t,n)=>(function(e,t,n){let r=n&&n.rules?n.rules.dispatch:void 0;r&&e.overlays.push(r);try{let r=()=>eh(e,t,n);return n&&n.context?j(n.context,e.editor)(r):r()}finally{r&&e.overlays.pop()}})(e,t,n),$importOne:(t,n)=>eg(e,t,n),captures:t,get:t=>(function(e,t=(0,l.i0_)()){return u(d(S,t)||q(t),e)})(t,e.editor),session:e.session}}(e,0===Object.keys(f).length?ec:f);try{return r.$import(n,t,o)}catch(e){throw e}}}r++,i=0}return ep(e,t)};return o()})(e,t);return n&&n.context?j(n.context,e.editor)(r):r()}function ep(e,t){if(0===t.childNodes.length)return[];let n=[];for(let r of Array.from(t.childNodes))for(let t of eg(e,r,void 0))n.push(t);return n}let e_={$import:(e,t)=>e.$importChildren(t),match:M.any(),name:"@lexical/html/default-hoist"},em=(0,l.vE9)({build(e,t){let n=function(e){let t=[],n=new Map,r=[],i=[],l=[],o=new Set;e.forEach((e,s)=>{let u,f=(void 0===(u=e.match[T])&&a(360),u),d=e.name||function(e,t){if("text"===e.kind)return`#text@${t}`;if("comment"===e.kind)return`#comment@${t}`;if(0===e.tags.size)return`*@${t}`;let n=Array.from(e.tags).join(",").toLowerCase();return`${n}@${t}`}(f,s);if(e.name&&o.add(e.name),t.push({$import:e.$import,name:d,predicate:f.predicate}),"text"===f.kind)i.push(s);else if("comment"===f.kind)l.push(s);else if(0===f.tags.size)r.push(s);else for(let e of f.tags){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(s)}});let s=new Map;if(0===r.length)for(let[e,t]of n)s.set(e,t);else for(let[e,t]of n)s.set(e,function(e,t){let n=[],r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}(t,r));return{byTag:s,commentIndices:l,rules:t,textIndices:i,wildcardIndices:r}}(function(e){let t=[];for(let r of e){var n;if("object"==typeof(n=r)&&null!==n&&"__type"in n&&"CompiledOverlayRules"===n.__type)for(let e of r.rules)t.push(e);else t.push(r)}return t}(t.rules)),r=c(t.contextDefaults,void 0),i=t.preprocess;return{$generateNodesFromDOM:(t,o)=>{var s,a;let u,f,d=o&&o.context?c(o.context,r):r,h=void 0!==d&&d!==r?d:Object.create(r||null),p=new J(h);return s=o&&o.preprocess?[...i,...o.preprocess]:i,a={session:p},u=s.length-1,(f=()=>{for(;u>=0;)return void(0,s[u--])(t,a,f)})(),g(S,h,()=>eh({dispatch:n,editor:e,overlays:p.get(U).map(e=>e.dispatch),session:p},(0,l.mB$)(t)?t.body:t,{schema:Y}),e)},defaults:r}},config:{contextDefaults:[],preprocess:[(e,t,n)=>{m(e),n()}],rules:[e_]},mergeConfig:(e,t)=>(0,l.Tc1)(e,{...t,...t.contextDefaults&&{contextDefaults:[...e.contextDefaults,...t.contextDefaults]},...t.preprocess&&{preprocess:[...e.preprocess,...t.preprocess]},...t.rules&&{rules:[...t.rules,...e.rules]}}),name:v});function ey(e,t){return(0,s.fU)(em).$generateNodesFromDOM(e,t)}let ex=(0,l.vE9)({dependencies:[(0,l.O0w)(em,{rules:eu})],name:"@lexical/html/CoreImport"}),ev={any:M.any,comment:M.comment,css:function(e){let t=new I(e,0),n=[];for(;;){let e=function(e){let t=new Set,n=[],r=[];if(e.skipWhitespace(),"*"===e.peek())e.consume();else if(D.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if("."===t){e.consume();let t=e.readIdent();e.assert(""!==t,'expected class name after "."'),r.push(t)}else if("#"===t){e.consume();let t=e.readIdent();e.assert(""!==t,'expected id after "#"'),n.push(w("id",t))}else{if("["!==t)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(""!==t,'expected attribute name after "["'),e.skipWhitespace();let r=!0;if("="===e.peek()){e.consume(),e.skipWhitespace();let t=e.peek();'"'===t||"'"===t?r=e.readQuoted():(r=e.readIdent(),e.assert(""!==r,"expected attribute value")),e.skipWhitespace()}e.assert("]"===e.peek(),'expected "]"'),e.consume(),n.push(w(t,r))}}}return r.length>0&&n.push(E(r)),{predicates:n,tags:t}}(t);if(n.push(e),t.skipWhitespace(),t.eof())break;t.assert(","===t.peek(),'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(1===n.length)return k(n[0].tags,n[0].predicates);let r=new Set;for(let e of n)for(let t of e.tags)r.add(t);return k(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])},tag:M.tag,text:M.text},eS=new Set(["STYLE","SCRIPT"]);function eC(e,t){m(t);let n=(0,l.mB$)(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!eS.has(t.nodeName)){let n=function e(t,n,r,i,o=new Map,s){let a=[];if(eS.has(t.nodeName))return a;let u=null,f=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(void 0!==r)for(let t of r){let n=t(e);null!==n&&(null===i||(i.priority||0)<=(n.priority||0))&&(i=n)}return null!==i?i.conversion:null}(t,n),d=f?f(t):null,c=null;if(null!==d){c=d.after;let e=d.node;if(null!==(u=Array.isArray(e)?e[e.length-1]:e)){for(let[,e]of o)if(!(u=e(u,s)))break;u&&a.push(...Array.isArray(e)?e:[u])}null!=d.forChild&&o.set(t.nodeName,d.forChild)}let h=t.childNodes,g=[],p=(null==u||!(0,l.IqF)(u))&&(null!=u&&(0,l.y68)(u)||i);for(let t=0;t<h.length;t++)g.push(...e(h[t],n,r,p,new Map(o),u));if(null!=c&&(g=c(g)),(0,l.a9V)(t)&&(g=function(e,t,n){let r=e.style.textAlign,i=[],o=[];for(let e=0;e<t.length;e++){let s=t[e];if((0,l.y68)(s))r&&!s.getFormat()&&s.setFormat(r),i.push(s);else if(o.push(s),e===t.length-1||e<t.length-1&&(0,l.y68)(t[e+1])){let e=n();e.setFormat(r),e.append(...o),i.push(e),o=[]}}return i}(t,g,p?()=>{let e=new l.A7V;return r.push(e),e}:l.lJ7)),null==u)if(g.length>0)for(let e of g)a.push(e);else(0,l.a9V)(t)&&null!=t.nextSibling&&null!=t.previousSibling&&(0,l._On)(t.nextSibling)&&(0,l._On)(t.previousSibling)&&a.push((0,l.WKo)());else(0,l.ff4)(u)&&u.append(...g);return a}(t,e,i,!1);if(null!==n)for(let e of n)r.push(e)}return function(e){for(let t of e)t.getParent()&&t.getNextSibling()instanceof l.A7V&&t.insertAfter((0,l.WKo)());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(i),r}function eb(e,t=null){return("u"<typeof document||"u"<typeof window&&void 0===global.window)&&a(338),(0,l.Q2o)(e),function(e,t=null,n=(0,l.i0_)()){return b([[C,!0]],n)(()=>{let r=(0,l.NiT)(),o=function(e=(0,l.i0_)()){let t,n=(t=(0,s.xT)(e,y))?t.output.runtime:void 0;return n?n.getSessionConfig():(0,l.MSq)(e)}(n),a=(0,l.I2P)(t)?(0,l.ex6)(t.anchor.getNode()):null,u=e.append.bind(e);for(let e of((0,l.ff4)(a)?a:r).getChildren())!function e(t,n,r,o=null,s=(0,l.MSq)(t)){let a=s.$shouldInclude(n,o,t),u=s.$shouldExclude(n,o,t),f=n;null!==o&&(0,l.kFe)(n)&&(f=(0,i.SD)(o,n,"clone"));let{element:d,after:c,append:h,$getChildNodes:g}=s.$exportDOM(f,t);if(!d)return!1;let p=document.createDocumentFragment(),_=g?g():(0,l.ff4)(f)?f.getChildren():[],m=a&&(0,l.RTZ)(o)&&(0,l.ff4)(n)?null:o,y=p.append.bind(p);for(let r of _){let i=e(t,r,y,m,s);!a&&i&&s.$extractWithChild(n,r,o,"html",t)&&(a=!0)}if(a&&!u){if(((0,l.sby)(d)||(0,l.K8K)(d))&&(h?h(p):d.append(p)),r(d),c){let e=c.
1call(f,d);e&&((0,l.K8K)(d)?d.replaceChildren(e):d.replaceWith(e))}}else r(p);return a}(n,e,u,t,o);return e})}(document.createElement("div"),t,e).innerHTML}n.d(t,{Ah:function(){return function e(t,n){let r=[],i=[],o=()=>{0!==i.length&&(r.push(n().splice(0,0,i)),i=[])};for(let s of t)if(H(s)){if(o(),(0,l.ff4)(s)){let t=e(s.getChildren(),n);s.splice(0,s.getChildrenSize(),t)}r.push(s)}else i.push(s);return o(),r}},Bu:function(){return F},FD:function(){return V},S$:function(){return A},dA:function(){return h},dh:function(){return eC},g2:function(){return eb},k4:function(){return H},up:function(){return ey}},{VR:ev,Zj:em,_e:ex,_l:R,vT:L})},95338:function(e,t,n){var r=n(31746),i=n(54201),l=n(89268),o=n(9382);let s=new Set(["http:","https:","mailto:","sms:","tel:"]);class a extends i.fGB{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new a(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:i=null,title:l=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=l}afterCloneFrom(e){super.afterCloneFrom(e),this.__url=e.__url,this.__rel=e.__rel,this.__target=e.__target,this.__title=e.__title}createDOM(e){let t=document.createElement("a");return this.updateLinkDOM(null,t,e),(0,i.ZB7)(t,e.theme.link),t}updateLinkDOM(e,t,n){if((0,i.nYP)(t))for(let n of(e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url)),["target","rel","title"])){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:c,priority:1})}}static importJSON(e){return h().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=C(e);try{let t=new URL(C(e));if(!s.has(t.protocol))return"about:blank"}catch(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){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=(0,i.CHU)(this);return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!(0,i.I2P)(t))return!1;let r=t.anchor.getNode(),l=t.focus.getNode();return(this.is(r)||this.isParentOf(r))&&(this.is(l)||this.isParentOf(l))&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.__url===e.__url&&this.__target===e.__target&&this.__rel===e.__rel&&this.__title===e.__title}}function u(e){let t=(0,i.Ave)(e,"next");return[t,t.getFlipped()]}function f(e,t){for(let n of t)if(n.origin.isAttached()){let t=(0,i.lSZ)(n);return void(0,i.wp6)(e,t)}}function d(e){let t=(0,i.vJq)(),n=null,r=null;function l(){(0,i.I2P)(t)&&(f(t.anchor,n),f(t.focus,r),(0,i.CaD)(t))}(0,i.I2P)(t)&&(n=u(t.anchor),r=u(t.focus));let o=!1;for(let t of(0,i.uwZ)(e,"next")){let n=t.origin;if((0,i.ff4)(n)&&!n.isInline()){let r=n.getChildren();if(r.length>0){let t=(0,i.CHU)(e);t.append(...r),n.append(t),o=!0}(0,i.rdQ)(n,(0,i.NG9)(t),{$shouldSplit:()=>!1})}}function s(e,t,n){let[r,l]=e,o=e=>(0,i.OpE)(e)&&e.origin.is(t);if(!o(r)&&!o(l))return e;let s=(0,i.lSZ)((0,i.uwZ)(n,"next"));return[s,s.getFlipped()]}if(e.isAttached()){let t=e.getPreviousSibling();if(g(t)&&t.shouldMergeAdjacentLink(e))return n&&(n=s(n,t,e)),r&&(r=s(r,t,e)),t.append(...e.getChildren()),e.remove(),void l();let i=e.getNextSibling();g(i)&&e.shouldMergeAdjacentLink(i)&&(n&&(n=s(n,e,i)),r&&(r=s(r,e,i)),e.append(...i.getChildren()),i.remove(),o=!0)}if(o){if(!e.canBeEmpty()&&e.isEmpty()){let t=e.getParent();e.remove(),t&&t.isEmpty()&&t.remove()}l()}}function c(e){let t=null;if((0,i.nYP)(e)){let n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=h(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function h(e="",t){return(0,i.pTq)(new a(e,t))}function g(e){return e instanceof a}class p extends a{__isUnlinked;constructor(e="",t={},n){super(e,t,n),this.__isUnlinked=void 0!==t.isUnlinked&&null!==t.isUnlinked&&t.isUnlinked}afterCloneFrom(e){super.afterCloneFrom(e),this.__isUnlinked=e.__isUnlinked}static getType(){return"autolink"}static clone(e){return new p(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return _().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,t=!0){let n=_(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}}function _(e="",t){return(0,i.pTq)(new p(e,t))}function m(e){return e instanceof p}let y=(0,i.guI)("TOGGLE_LINK_COMMAND");function x(e,t){if("element"===e.type){let n=e.getNode();return(0,i.ff4)(n)||function(...e){let t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let t of(n.append("code",252),e))n.append("v",t);throw t.search=n.toString(),Error(`Minified Lexical error #252; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(),n.getChildren()[e.offset+t]||null}return null}function v(e,t={}){let n;if(e&&"object"==typeof e){let{url:r,...i}=e;n=r,t={...i,...t}}else n=e;let{target:r,title:l}=t,o=void 0===t.rel?"noreferrer":t.rel,s=(0,i.vJq)();if(null===s||!(0,i.I2P)(s)&&!(0,i.RTZ)(s))return;if((0,i.RTZ)(s)){let e=s.getNodes();if(0===e.length)return;
1return void e.forEach(e=>{if(null===n){let t=(0,i.BtT)(e,e=>!m(e)&&g(e));t&&(t.insertBefore(e),0===t.getChildren().length&&t.remove())}else{let t=(0,i.BtT)(e,e=>!m(e)&&g(e));if(t)t.setURL(n),void 0!==r&&t.setTarget(r),void 0!==o&&t.setRel(o);else{let t=h(n,{rel:o,target:r});e.insertBefore(t),t.append(e)}}})}if(s.isCollapsed()&&null===n)for(let e of s.getNodes()){let t=(0,i.BtT)(e,e=>!m(e)&&g(e));return void(null!==t&&(t.getParentOrThrow().splice(t.getIndexWithinParent(),0,t.getChildren()),t.remove()))}let a=s.extract();if(null===n){let e=new Set;return void a.forEach(t=>{let n=(0,i.BtT)(t,e=>!m(e)&&g(e));if(null!==n){let t=n.getKey();if(e.has(t))return;!function(e,t){let n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),l=r=>n.has(r.getKey())||(0,i.ff4)(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),o=r.filter(l);if(o.length===r.length)return r.forEach(t=>e.insertBefore(t)),e.remove();let s=r.findIndex(l),a=r.findLastIndex(l),u=a===r.length-1;if(0===s)o.forEach(t=>e.insertBefore(t));else if(u)for(let t=o.length-1;t>=0;t--)e.insertAfter(o[t]);else{for(let t=o.length-1;t>=0;t--)e.insertAfter(o[t]);let t=r.slice(a+1);if(t.length>0){let n=(0,i.CHU)(e);o[o.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}}(n,a),e.add(t)}})}let u=new Set,f=e=>{u.has(e.getKey())||(u.add(e.getKey()),e.setURL(n),void 0!==r&&e.setTarget(r),void 0!==o&&e.setRel(o),void 0!==l&&e.setTitle(l))};if(1===a.length){let e=a[0],t=(0,i.BtT)(e,g);if(null!==t)return f(t)}!function(e){let t=(0,i.vJq)();if(!(0,i.I2P)(t))return e();let n=(0,i.CaD)(t),r=n.isBackward(),l=x(n.anchor,r?-1:0),o=x(n.focus,r?0:-1);if(e(),l||o){let e=(0,i.vJq)();if((0,i.I2P)(e)){let t=e.clone();if(l){let e=l.getParent();e&&t.anchor.set(e.getKey(),l.getIndexWithinParent()+ +!!r,"element")}if(o){let e=o.getParent();e&&t.focus.set(e.getKey(),o.getIndexWithinParent()+ +!r,"element")}(0,i.n1P)((0,i.CaD)(t))}}}(()=>{let e=null;for(let t of a){if(!t.isAttached())continue;let s=(0,i.BtT)(t,g);if(s){f(s);continue}if((0,i.ff4)(t)){if(!t.isInline())continue;if(g(t)){if(!(m(t)||null!==e&&e.getParentOrThrow().isParentOf(t))){f(t),e=t;continue}for(let e of t.getChildren())t.insertBefore(e);t.remove();continue}}let a=t.getPreviousSibling();g(a)&&a.is(e)?a.append(t):(e=h(n,{rel:o,target:r,title:l}),t.insertAfter(e),e.append(t))}})}let S=/^\+?[0-9\s()-]{5,}$/;function C(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:S.test(e)?`tel:${e}`:`https://${e}`}let b=[(0,l.Bu)({$import:(e,t)=>{if(!t.textContent&&0===t.children.length)return[];let n=t.getAttribute("href")||"",r={rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")};return(0,l.Ah)(e.$importChildren(t),()=>h(n,r))},match:l.VR.tag("a"),name:"@lexical/link/a"})],T=(0,i.vE9)({build:(e,t,n)=>(0,r.v)(t),config:{attributes:void 0,validateUrl:void 0},dependencies:[l._e,(0,i.O0w)(l.Zj,{rules:b})],mergeConfig(e,t){let n=(0,i.Tc1)(e,t);return e.attributes&&(n.attributes=(0,i.Tc1)(e.attributes,n.attributes)),n},name:"@lexical/link/Link",nodes:()=>[a],register:(e,t,n)=>{var l;return l=n.getOutput(),(0,i.Sdt)(e.registerNodeTransform(a,d),e.registerCommand(y,e=>{let t=l.validateUrl.peek(),n=l.attributes.peek();if(null===e)return v(null),!0;if("string"==typeof e)return!(void 0!==t&&!t(e))&&(v(e,n),!0);{let{url:t,target:r,rel:i,title:l}=e;return v(t,{...n,rel:i,target:r,title:l}),!0}}
1,0),(0,r.QZ)(()=>{let t=l.validateUrl.value;if(!t)return;let n=l.attributes.value;return e.registerCommand(i.waI,r=>{let l=(0,i.vJq)();if(!(0,i.I2P)(l)||l.isCollapsed()||!(0,o.xj)(r,ClipboardEvent)||null===r.clipboardData)return!1;let s=r.clipboardData.getData("text");return!!t(s)&&!l.getNodes().some(e=>(0,i.ff4)(e)||(0,i.kFe)(e)&&!e.isSimpleText())&&(e.dispatchCommand(y,{...n,url:s}),r.preventDefault(),!0)},1)}))}});function k(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function N(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let E=/[.,;\s]/;function w(e,t){var n;return n=e[e.length-1],t.test(n)}function O(e,t){var n;return n=e[0],t.test(n)}function P(e,t){let n=e.getPreviousSibling();return(0,i.ff4)(n)&&(n=n.getLastDescendant()),null===n||(0,i.wH$)(n)||(0,i.kFe)(n)&&w(n.getTextContent(),t)}function M(e,t){let n=e.getNextSibling();return(0,i.ff4)(n)&&(n=n.getFirstDescendant()),null===n||(0,i.wH$)(n)||(0,i.kFe)(n)&&O(n.getTextContent(),t)}function A(e,t,n,r){let l=e.getChildren(),o=l.length;for(let t=0;t<o;t++){let r=l[t];if(!(0,i.kFe)(r)||!r.isSimpleText())return D(e),void n(null,e.getURL())}let s=e.getTextContent(),a=N(s,t);if(null===a||a.text!==s||!P(e,r)||!M(e,r))return D(e),void n(null,e.getURL());let u=e.getURL();if(u!==a.url&&(e.setURL(a.url),n(a.url,u)),a.attributes){let t=e.getRel();t!==a.attributes.rel&&(e.setRel(a.attributes.rel||null),n(a.attributes.rel||null,t));let r=e.getTarget();r!==a.attributes.target&&(e.setTarget(a.attributes.target||null),n(a.attributes.target||null,r))}}function D(e){let t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}let I={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:E},F=(0,i.vE9)({config:I,dependencies:[T],mergeConfig(e,t){let n=(0,i.Tc1)(e,t);for(let r of["matchers","changeHandlers","excludeParents"]){let i=t[r];Array.isArray(i)&&(n[r]=[...e[r],...i])}return n},name:"@lexical/link/AutoLink",nodes:[p],register:function(e,t=I){let{matchers:n,changeHandlers:r,excludeParents:l,separatorRegex:o=E}=t,s=(e,t)=>{for(let n of r)n(e,t)};return(0,i.Sdt)(e.registerNodeTransform(i.Ey8,e=>{let t=e.getParentOrThrow(),r=e.getPreviousSibling();m(t)?A(t,n,s,o):g(t)||l.some(e=>e(t))||(e.isSimpleText()&&(O(e.getTextContent(),o)||!m(r))&&function(e,t,n,r){for(let t of e){let e=t.getParent();if(m(e)&&!e.getIsUnlinked())return}let l=[...e],o=l.map(e=>e.getTextContent()).join(""),s,a=o,u=0;for(;(s=N(a,t))&&null!==s;){let e=s.index,t=e+s.length;if(function(e,t,n,r,i){var l,o;return!!(e>0?(l=r[e-1],n.test(l)):P(i[0],n))&&(t<r.length?(o=r[t],n.test(o)):M(i[i.length-1],n))}(u+e,u+t,r,o,l)){let[r,,o,f]=function(e,t,n){let r=[],i=[],l=[],o=0,s=0,a=[...e];for(;a.length>0;){let e=a[0],u=e.getTextContent().length,f=s;s+u<=t?(r.push(e),o+=u):f>=n?l.push(e):i.push(e),s+=u,a.shift()}return[o,r,i,l]}(l,u+e,u+t),d=!1;for(let e of o){let t=e.getParent();if(m(t)&&!t.getIsUnlinked()){d=!0;break}}if(d){u+=t,a=a.substring(t);continue}let c=function(e,t,n,r){let l=_(r.url,r.attributes);if(1===e.length){let o,s=e[0];0===t?[o,s]=s.splitText(n):[,o,s]=s.splitText(t,n);let a=(0,i.sTu)(r.text);return a.setFormat(o.getFormat()),a.setDetail(o.getDetail()),a.setStyle(o.getStyle()),l.append(a),o.replace(l),s}if(e.length>1){let r,o=e[0],s,a=o.getTextContent().length;0===t?s=o:[,s]=o.splitText(t);let u=[];for(let t=1;t<e.length;t++){let i=e[t],l=i.getTextContent().length,o=a;if(o<n)if(a+l<=n)u.push(i);else{let[e,t]=i.splitText(n-o);u.push(e),r=t}a+=l}let f=(0,i.vJq)(),d=f?f.getNodes().find(i.kFe):void 0,c=(0,i.sTu)(s.getTextContent());return c.setFormat(s.getFormat()),c.setDetail(s.getDetail()),c.setStyle(s.getStyle()),l.append(c,...u),d&&d===s&&((0,i.I2P)(f)?c.select(f.anchor.offset,f.focus.offset):(0,i.RTZ)(f)&&c.select(0,c.getTextContent().length)),s.replace(l),r}}(o,u+e-r,u+t-r,s);l=c?[c,...f]:f,n(s.url,null),u=0}else u+=t;a=a.substring(t)}}(function(e){let t=[e],n=e.getNextSibling();for(;null!==n&&(0,i.kFe)(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e),n,s,o),function(e,t,n,r){let i=e.getParent(),l=e.getPreviousSibling(),o=e.getNextSibling(),s=e.getTextContent();if(!m(i)||i.getIsUnlinked()){if(m(l)&&!l.getIsUnlinked()&&l.is(e.getPreviousSibling())&&e.getParent()===l.getParent()){if(!O(s,r))return D(l),n(null,l.getURL());if(l.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(s):/^\.[a-zA-Z0-9]{1,}/.test(s)){let i=l.getTextContent()+s,o=N(i,t);null!==o&&o.text===i&&(l.append(e),A(l,t,n,r),n(null,l.getURL()))}}!m(o)||o.getIsUnlinked()||w(s,r)||o.is(e.getNextSibling())&&e.getParent()===o.getParent()&&
1(D(o),n(null,o.getURL()))}}(e,n,s,o))}),e.registerCommand(y,e=>{let t=(0,i.vJq)();return null===e&&!!(0,i.I2P)(t)&&(t.extract().forEach(e=>{let t=e.getParent();m(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1)},1))}});n.d(t,{FJ:function(){return g},iK:function(){return m},oP:function(){return k}},{O$:T,RN:F,yW:y})},62586:function(e,t,n){var r=n(9382),i=n(54201),l=n(31746),o=n(89268);function s(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function a(e){let t=1,n=e.getParent();for(;null!=n;){if(C(n)){let e=n.getParent();if(w(e)){t++,n=e.getParent();continue}s(40)}break}return t}function u(e){let t=e.getParent();w(t)||s(40);let n=t,r=t;for(;null!==r;)w(r=r.getParent())&&(n=r);return n}function f(e){return C(e)&&w(e.getFirstChild())}function d(e,t){return C(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function c(e){let t=(0,i.vJq)();if(null!==t){let n=t.getNodes();if((0,i.I2P)(t)){let[r]=t.getStartEndPoints(),l=r.getNode(),o=l.getParent();if((0,i.IqF)(l)){let e=l.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=(0,i.lJ7)();l.append(e),n=e.select().getNodes()}}else if(d(l,n)){let t=E(e);if((0,i.IqF)(o)){l.replace(t);let e=S();(0,i.ff4)(l)&&(e.setFormat(l.getFormatType()),e.setIndent(l.getIndent())),t.append(e)}else if(C(l)){let e=l.getParentOrThrow();h(t,e.getChildren()),e.replace(t)}return}}let r=new Set;for(let t=0;t<n.length;t++){let l=n[t];if((0,i.ff4)(l)&&l.isEmpty()&&!C(l)&&!r.has(l.getKey())){g(l,e);continue}let o=(0,i.jG6)(l)?l.getParent():C(l)&&l.isEmpty()?l:null;for(;null!=o;){let t=o.getKey();if(w(o)){if(!r.has(t)){let n=E(e);h(n,o.getChildren()),o.replace(n),r.add(t)}break}{let n=o.getParent();if((0,i.IqF)(n)&&!r.has(t)){r.add(t),g(o,e);break}o=n}}}}}function h(e,t){e.splice(e.getChildrenSize(),0,t)}function g(e,t){let n;if(w(e))return e;let r=e.getPreviousSibling(),l=e.getNextSibling(),o=S();
1if(h(o,e.getChildren()),w(r)&&t===r.getListType())r.append(o),w(l)&&t===l.getListType()&&(h(r,l.getChildren()),l.remove()),n=r;else if(w(l)&&t===l.getListType())l.getFirstChildOrThrow().insertBefore(o),n=l;else{let r=E(t);r.append(o),e.replace(r),n=r}o.setFormat(e.getFormatType()),o.setIndent(e.getIndent());let s=(0,i.vJq)();return(0,i.I2P)(s)&&(n.getKey()===s.anchor.key&&s.anchor.set(o.getKey(),s.anchor.offset,"element"),n.getKey()===s.focus.key&&s.focus.set(o.getKey(),s.focus.offset,"element")),e.remove(),n}function p(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&f(n)&&f(r)&&(p(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function _(e){let t="check"!==e.getListType(),n=e.getStart();for(let r of e.getChildren())C(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),w(r.getFirstChild())||n++)}class m extends i.fGB{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{let t=e.getParent();if(w(t))"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0);else if(t){let n=e.createParentElementNode();w(n)||s(340);let r=[e];for(let t of["previous","next"])for(let{origin:n}of(r.reverse(),(0,i.IlV)(e,t))){if(!C(n))break;r.push(n)}e.insertBefore(n),n.splice(0,0,r),(0,i.IqF)(t)||((0,i.rdQ)(n,(0,i.NG9)((0,i.IlV)(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:i.fGB,importDOM:(0,i.kBm)({li:()=>({conversion:y,priority:0})})})}constructor(e=1,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){let r;!w(r=this.getParent())||"check"!==r.getListType()||w(this.getFirstChild())?(t.removeAttribute("role"),t.removeAttribute("tabIndex"),t.removeAttribute("aria-checked")):(t.setAttribute("role","checkbox"),t.setAttribute("tabIndex","-1"),t.setAttribute("aria-checked",this.getChecked()?"true":"false")),t.value=this.__value,function(e,t,n){let r=t.list;if(!r)return;let l=r.listitem,o=r.nested&&r.nested.listitem,s=n.getParent(),a=w(s)&&"check"===s.getListType(),u=n.getChecked(),f=n.getChildren().some(e=>w(e)),d=[];void 0!==r.listitemChecked&&d.push(r.listitemChecked),void 0!==r.listitemUnchecked&&d.push(r.listitemUnchecked),void 0!==o&&d.push(...(0,i.GYG)(o)),d.length>0&&(0,i.HEf)(e,...d);let c=[];if(void 0!==l&&c.push(...(0,i.GYG)(l)),a){let e=u?r.listitemChecked:r.listitemUnchecked;void 0!==e&&c.push(e)}void 0!==o&&f&&c.push(...(0,i.GYG)(o)),c.length>0&&(0,i.ZB7)(e,...c)}(t,n.theme,this);let l=e?e.__style:"",o=this.__style;l!==o&&(0,i.brn)(t.style,o,l),function(e,t,n){let r=t.__textStyle,l=n?n.__textStyle:"";if(null!==n&&l===r)return;let o=(0,i.WhU)(r);for(let t in o)e.style.setProperty(`--listitem-marker-${t}`,o[t]);if(""!==l)for(let t in(0,i.WhU)(l))t in o||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){return this.updateListItemDOM(e,t,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),f(this)?{after(e){if((0,i.sby)(e)){let t=e.previousElementSibling;if((0,i.sby)(t)&&"LI"===t.nodeName){for(;e.firstChild;)t.append(e.firstChild);e.remove()}}return e},element:t}:{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if((0,i.ff4)(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(C(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!w(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=(0,i.CHU)(n),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}let r=this.__key,l=0;if(t&&((0,i.ff4)(e)||s(139),l=e.getChildrenSize(),e.splice(l,0,this.getChildren())),t&&(0,i.ff4)(e)){let t=(0,i.vJq)();if((0,i.I2P)(t))for(let n of t.getStartEndPoints())n.key===r&&"element"===n.type&&n.set(e.getKey(),l+n.offset,"element")}return this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if(w(n)||s(39),C(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){let l=(0,i.CHU)(n);
1r.forEach(e=>l.append(e)),e.insertAfter(l,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&f(t)&&f(n)&&(p(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){let n=(0,i.CHU)(this);return this.insertAfter(n,t),n}collapseAtStart(e){let t=(0,i.lJ7)();this.getChildren().forEach(e=>t.append(e));let n=this.getParentOrThrow(),r=n.getParentOrThrow(),l=C(r);if(1===n.getChildrenSize())if(l)n.remove(),r.select();else{n.insertBefore(t),n.remove();let r=e.anchor,i=e.focus,l=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(l,r.offset,"element"),"element"===i.type&&i.getNode().is(this)&&i.set(l,i.offset,"element")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e,t=this.getLatest(),n=this.getParent();return w(n)&&(e=n.getListType()),"check"===e?!!t.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;C(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&s(117),(e=Math.floor(e))>=0||s(199);let t=this.getIndent();for(;t!==e;)t<e?(function(e){let t=new Set;if(f(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),l=e.getPreviousSibling();if(f(r)&&f(l)){let n=l.getFirstChild();if(w(n)){n.append(e);let i=r.getFirstChild();w(i)&&(h(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(f(r)){let t=r.getFirstChild();if(w(t)){let n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if(f(l)){let t=l.getFirstChild();w(t)&&t.append(e)}else if(w(n)){let t=(0,i.CHU)(e),o=(0,i.CHU)(n);t.append(o),o.append(e),l?l.insertAfter(t):r?r.insertBefore(t):n.append(t)}}(this),t++):(function(e){if(f(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if(w(n?n.getParent():void 0)&&C(n)&&w(t)){let r=t?t.getFirstChild():void 0,l=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(l))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=(0,i.CHU)(e),l=(0,i.CHU)(t);
1r.append(l),e.getPreviousSiblings().forEach(e=>l.append(e));let o=(0,i.CHU)(e),s=(0,i.CHU)(t);o.append(s),h(s,e.getNextSiblings()),n.insertBefore(r),n.insertAfter(o),n.replace(e)}}}(this),t--);return this}canInsertAfter(e){return C(e)}canReplaceWith(e){return C(e)}canMergeWith(e){return C(e)||(0,i.bSg)(e)}extractWithChild(e,t){if(!(0,i.I2P)(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return E("bullet")}canMergeWhenEmpty(){return!0}}function y(e){if(e.classList.contains("task-list-item")){for(let t of e.children)if("INPUT"===t.tagName)return x(t)}if(e.classList.contains("joplin-checkbox")){for(let t of e.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&"INPUT"===t.children[0].tagName)return x(t.children[0])}let t=e.getAttribute("aria-checked"),n=S("true"===t||"false"!==t&&void 0);return(0,i.Sz2)(n,e),{after:v.bind(null,n),node:(0,i.q3P)(n,e)}}function x(e){if("checkbox"!==e.getAttribute("type"))return{node:null};let t=S(e.hasAttribute("checked"));return{after:v.bind(null,t),node:t}}function v(e,t){let n=t[0];return 1===t.length&&(0,i.bSg)(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function S(e){return(0,i.pTq)(new m(void 0,e))}function C(e){return e instanceof m}class b extends i.fGB{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{let t;w(t=e.getNextSibling())&&e.getListType()===t.getListType()&&p(e,t),_(e)},extends:i.fGB,importDOM:(0,i.kBm)({ol:()=>({conversion:k,priority:0}),ul:()=>({conversion:k,priority:0})})})}constructor(e="number",t=1,n){super(n);const r=N[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,T(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(T(t,n.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return(0,i.sby)(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];C(t)||(r===n&&(r=[...n]),r[e]=this.createListItemNode().append(!(0,i.ff4)(t)||w(t)||t.isInline()?t:(0,i.sTu)(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return C(e)}createListItemNode(){return S()}}function T(e,t,n){let r=[],l=[],o=t.list;if(void 0!==o){let e,t=o[`${n.__tag}Depth`]||[],s=a(n)-1,u=s%t.length,f=t[u],d=o[n.__tag],c=o.nested,h=o.checklist;if(void 0!==c&&c.list&&(e=c.list),void 0!==d&&r.push(d),void 0!==h&&"check"===n.__listType&&r.push(h),void 0!==f){r.push(...(0,i.GYG)(f));for(let e=0;e<t.length;e++)e!==u&&l.push(n.__tag+e)}if(void 0!==e){let t=(0,i.GYG)(e);s>1?r.push(...t):l.push(...t)}}l.length>0&&(0,i.HEf)(e,...l),r.length>0&&(0,i.ZB7)(e,...r)}function k(e){let t;return t=(0,i.sby)(e)&&"ol"===e.nodeName.toLowerCase()?E("number",e.start):!function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list")||"1"===e.getAttribute("data-is-checklist"))return!0;for(let t of e.childNodes)if((0,i.sby)(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?E("bullet"):E("check"),(0,i.q3P)(t,e),{after:e=>(function(e,t){let n=t.createListItemNode.bind(t),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(C(i)){r.push(i);let e=i.getChildren();e.length>
11&&e.forEach(e=>{w(e)&&r.push(n().append(e))})}else r.push(n().append(i))}return r})(e,t),node:t}}let N={ol:"number",ul:"bullet"};function E(e="number",t=1){return(0,i.pTq)(new b(e,t))}function w(e){return e instanceof b}let O=(0,o.Bu)({$import:(e,t)=>{let n;return n=(0,o.S$)(t,"ol")?E("number",t.start):t.matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||null!==t.querySelector(":scope > [aria-checked]")?E("check"):E("bullet"),(0,i.q3P)(n,t),[n.splice(0,0,(0,o.FD)(function(e){let t=[];for(let n of e)if(C(n)){t.push(n);let e=n.getChildren();if(e.length>1)for(let n of e)w(n)&&t.push(S().append(n))}else t.push(S().append(n));return t}(e.$importChildren(t)),t))]},match:o.VR.tag("ol","ul"),name:"@lexical/list/list"});function P(e,t){if(1!==t.length)return t;let n=t[0];return(0,i.bSg)(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function M(e){let t=e=>(0,o.k4)(e)&&!w(e);if(!e.some(t))return e;let n=[],r=[],l=()=>{r.length>0&&(n.push(r),r=[])};for(let o of e)t(o)?(l(),n.push((0,i.ff4)(o)?o.getChildren():[o])):r.push(o);l();let s=[];for(let e of n)s.length>0&&s.push((0,i.WKo)()),s.push(...e);return s}let A=(0,o.Bu)({$import:(e,t)=>{let n=t.getAttribute("aria-checked"),r=S("true"===n||"false"!==n&&void 0);return(0,i.Sz2)(r,t),(0,i.q3P)(r,t),[r.splice(0,0,M(P(r,e.$importChildren(t))))]},match:o.VR.tag("li"),name:"@lexical/list/li"});function D(e,t,n){let r=(0,o.S$)(n,"input")?n:n.querySelector('input[type="checkbox"]');if(!r||"checkbox"!==r.getAttribute("type"))return[];let l=S(r.hasAttribute("checked"));return(0,i.Sz2)(l,t),(0,i.q3P)(l,t),[l.splice(0,0,M(P(l,e.$importChildren(t))))]}let I=[(0,o.Bu)({$import:(e,t,n)=>{let r=t.querySelector(':scope > input[type="checkbox"]');return r?D(e,t,r):n()},match:o.VR.tag("li").classAll("task-list-item"),name:"@lexical/list/li-task-list-item"}),(0,o.Bu)({$import:(e,t,n)=>{let r=t.querySelector(":scope > .checkbox-wrapper");if(!r)return n();let i=r.querySelector(':scope > input[type="checkbox"]');return i?D(e,t,i):n()},match:o.VR.tag("li").classAll("joplin-checkbox"),name:"@lexical/list/li-joplin-checkbox"}),O,A],F=(0,i.guI)("UPDATE_LIST_START_COMMAND"),L=(0,i.guI)("INSERT_UNORDERED_LIST_COMMAND"),R=(0,i.guI)("INSERT_ORDERED_LIST_COMMAND"),K=(0,i.guI)("REMOVE_LIST_COMMAND"),B=(0,i.vE9)({build:(e,t,n)=>(0,l.v)(t),config:(0,i.lVE)({hasStrictIndent:!1,shouldPreserveNumbering:!1}),dependencies:[o._e,(0,i.O0w)(o.Zj,{rules:I})],name:"@lexical/list/List",nodes:()=>[b,m],register(e,t,n){let o=n.getOutput();return(0,i.Sdt)((0,l.QZ)(()=>{var t;return t={restoreNumbering:o.shouldPreserveNumbering.value},(0,i.Sdt)(e.registerCommand(R,()=>(c("number"),!0),1),e.registerCommand(F,e=>{let{listNodeKey:t,newStart:n}=e,r=(0,i.nsf)(t);return!!w(r)&&("number"===r.getListType()&&(r.setStart(n),_(r)),!0)},1),e.registerCommand(L,()=>(c("bullet"),!0),1),e.registerCommand(K,()=>((function(){let e=(0,i.vJq)();if((0,i.I2P)(e)){let t=new Set,n=e.getNodes(),l=e.anchor.getNode();if(d(l,n))t.add(u(l));else for(let e=0;e<n.length;e++){let l=n[e];if((0,i.jG6)(l)){let e=(0,r.eu)(l,m);null!=e&&t.add(u(e))}}for(let n of t){let t=n;for(let r of function e(t){let n=[],r=t.getChildren().filter(C);for(let t=0;t<r.length;t++){let i=r[t],l=i.getFirstChild();w(l)?n=n.concat(e(l)):n.push(i)}return n}(n)){let n=(0,i.lJ7)().setTextStyle(e.style).setTextFormat(e.format);h(n,r.getChildren()),t.insertAfter(n),t=n,r.__key===e.anchor.key&&(0,i.wp6)(e.anchor,(0,i.lSZ)((0,i.uwZ)(n,"next"))),r.__key===e.focus.key&&(0,i.wp6)(e.focus,(0,i.lSZ)((0,i.uwZ)(n,"next"))),r.remove()}n.remove()}}})(),!0),1),e.registerCommand(i.XKQ,()=>(function(e=!1){let t,n=(0,i.vJq)();if(!(0,i.I2P)(n)||!n.isCollapsed())return!1;let r=n.anchor.getNode(),l=null;if(C(r)&&0===r.getChildrenSize())l=r;else if((0,i.kFe)(r)){let e=r.getParent();C(e)&&e.getChildren().every(e=>(0,i.kFe)(e)&&""===e.getTextContent().trim())&&(l=e)}if(null===l)return!1;let o=u(l),a=l.getParent();w(a)||s(40);let f=a.getParent();if((0,i.IqF)(f))t=(0,i.lJ7)(),o.insertAfter(t);else{if(!C(f))return!1;t=(0,i.CHU)(f),f.insertAfter(t)}t.setTextStyle(n.style).setTextFormat(n.format).select();let d=l.getNextSiblings();if(d.length>0){var c;let n=e?(c=l,a.getStart()+c.getIndexWithinParent()):1,r=(0,i.CHU)(a).setStart(n);if(C(t)){let e=(0,i.CHU)(t);e.append(r),t.insertAfter(e)}else t.insertAfter(r);r.append(...d)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){let e=t.getParent();if(null==e||!C(e)&&!w(e))break;t=e}t.remove()}(l),!0})(!!(t&&t.restoreNumbering)),1),e.registerCommand(i.gCZ,e=>!!function(){let e=(0,i.vJq)();if(!(0,i.I2P)(e)||!e.isCollapsed()||0!==e.anchor.offset)return!1;let t=e.anchor.getNode(),n=(0,i.BtT)(t,C);if(!C(n))return!1;let r=n.getFirstDescendant();if(null===r||!n.is(t)&&!r.is(t))return!1;let l=n.getParent();if(!w(l)||!n.is(l.getFirstChild()))return!1;let o=l.getPreviousSibling();if(!(0,i.Cyw)(o)||o.isIsolated()||!o.isKeyboardSelectable()&&o.isInline())return!1;let s=(0,i.lJ7)().append(...n.getChildren());return l.insertBefore(s),n.remove(),l.isEmpty()&&l.remove(),s.selectStart(),!0}()&&(e.preventDefault(),!0),-8),e.registerNodeTransform(m,e=>{let t=e.getFirstChild();if(t){if((0,i.kFe)(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=(0,i.vJq)();(0,i.I2P)(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(i.Ey8,e=>{let t=e.getParent();if(C(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}),(0,l.QZ)(()=>{let t;return o.hasStrictIndent.value?(t=e=>{let t=e.getParent();if(w(e.getFirstChild())||!w(t))return;let n=(0,i.BtT)(e,e=>C(e)&&w(e.getParent())&&C(e.getPreviousSibling()));if(null===n&&e.getIndent()>0)e.setIndent(0);else if(C(n)){let r=n.getPreviousSibling();if(C(r)){let n=(function(e){let t=e,n=t.getFirstChild();for(;w(n);){let e=n.getLastChild();if(!C(e))break;n=(t=e).getFirstChild()}return t})(r).getParent();if(w(n)){let r=a(n);r+1<a(t)&&e.setIndent(r)}}}},e.registerNodeTransform(b,e=>{let n=[e];for(;n.length>0;){let e=n.shift();if(w(e)){for(let r of e.getChildren())if(C(r)){t(r);let e=r.getFirstChild();w(e)&&n.push(e)}}}})):void 0}))}});n.d(t,{},{_5:B,q7:L,x:R})},35588:function(e,t,n){var r=n(96540);let i=(0,r.createContext)(null);function l(){let e=(0,r.useContext)(i);return null==e&&function(...e){let t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let t of(n.append("code",8),e))n.append("v",t);throw t.search=n.toString(),Error(`Minified Lexical error #8; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(),e}n.d(t,{DF:function(){return l}},{Gu:i})},21433:function(e,t,n){n.d(t,{a:function(){return f}});var r=n(35588),i=n(96540),l=n(54201),o=n(74848);let s=l.qxK?i.useLayoutEffect:i.useEffect,a=(0,i.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControl
1s:r,ariaDescribedBy:l,ariaErrorMessage:a,ariaExpanded:u,ariaInvalid:f,ariaLabel:d,ariaLabelledBy:c,ariaMultiline:h,ariaOwns:g,ariaRequired:p,autoCapitalize:_,className:m,id:y,role:x="textbox",spellCheck:v=!0,style:S,tabIndex:C,"data-testid":b,...T},k){let[N,E]=(0,i.useState)(e.isEditable()),w=(0,i.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),O=(0,i.useMemo)(()=>(function(...e){return t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}})(k,w),[w,k]);return s(()=>(E(e.isEditable()),e.registerEditableListener(e=>{E(e)})),[e]),(0,o.jsx)("div",{"aria-activedescendant":N?t:void 0,"aria-autocomplete":N?n:"none","aria-controls":N?r:void 0,"aria-describedby":l,...null!=a?{"aria-errormessage":a}:{},"aria-expanded":N&&"combobox"===x?!!u:void 0,...null!=f?{"aria-invalid":f}:{},"aria-label":d,"aria-labelledby":c,"aria-multiline":h,"aria-owns":N?g:void 0,"aria-readonly":!N||void 0,"aria-required":p,autoCapitalize:_,className:m,contentEditable:N,"data-testid":b,id:y,ref:O,role:x,spellCheck:v,style:S,tabIndex:C,...T})});function u(e){var t;return e.read("latest",(t=e.isComposing(),()=>(function(e){if(!function(e,t=!0){if(e)return!1;let n=(0,l.NiT)().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;let t=(0,l.NiT)().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if((0,l.Cyw)(n))return!1;if((0,l.ff4)(n)){if(!(0,l.bSg)(n)||0!==n.__indent)return!1;let t=n.getChildren(),r=t.length;for(let n=0;n<r;n++){let n=t[e];if(!(0,l.kFe)(n))return!1}}}return!0})(t)))}let f=(0,i.forwardRef)(function(e,t){let{placeholder:n,...i}=e,[l]=(0,r.DF)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a,{editor:l,...i,ref:t}),null!=n&&(0,o.jsx)(d,{editor:l,content:n})]})});function d({content:e,editor:t}){let n=function(e){let[t,n]=(0,i.useState)(()=>u(e));return s(()=>{function t(){n(u(e))}return t(),(0,l.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,a]=(0,i.useState)(t.isEditable());if((0,i.useLayoutEffect)(()=>(a(t.isEditable()),t.registerEditableListener(e=>{a(e)})),[t]),!n)return null;let f=null;return"function"==typeof e?f=e(r):null!==e&&(f=e),null===f?null:(0,o.jsx)("div",{"aria-hidden":!0,children:f})}},4070:function(e,t,n){n.d(t,{u:function(){return g}});var r=n(31746),i=n(21433),l=n(96540),o=n(74848);class s extends l.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}var a=n(54201);let u=(0,a.vE9)({name:"@lexical/react/ReactProvider"});var f=n(35588),d=n(40961);let c={EditorChildrenComponent:function({contentEditable:e,children:t}){return(0,o.jsxs)(o.Fragment,{children:[e,t]})},ErrorBoundary:function({children:e,fallback:t,onError:n}){return(0,o.jsx)(s,{fallback:void 0===t?(0,o.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):t,onError:n,children:e})},contentEditable:(0,o.jsx)(i.a,{}),decorators:[]},h=(0,a.vE9)({build(e,t,n){n.getPeer(u.name)||function(...e){let t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let t of(n.append("code",321),e))n.append("v",t);throw t.search=n.toString(),Error(`Minified Lexical error #321; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}([...n.getDirectDependentNames()].join(" "));let r=[e,{getTheme:()=>e._config.theme}];return{Component:function(e,t){let[n]=t,r=e.decorators.map(e=>"function"==typeof e?(0,o.jsx)(e,{context:t}):e);return function(i){let{EditorChildrenComponent:s=e.EditorChildrenComponent,ErrorBoundary:a=e.ErrorBoundary,contentEditable:u=e.contentEditable,children:c}=i,h=function(e,t){let[n,r]=(0,l.useMemo)(()=>[t=>e.registerDecoratorListener(t),()=>e.getDecorators()],[e]),i=(0,l.useSyncExternalStore)(n,r,r);return(0,l.useMemo)(()=>{let n=[];for(let r in i){let s=e.getElementByKey(r);if(null!==s){let a=(0,o.jsx)(t,{onError:t=>{e._onError(t)},children:(0,o.jsx)(l.Suspense,{fallback:null,children:i[r]})});n.push((0,d.createPortal)(a,s,r))}}return n},[t,i,e])}(n,a),g=(0,l.useMemo)(()=>r.map((e,t)=>(0,o.jsx)(a,{onError:e=>{n._onError(e)},children:(0,o.jsx)(l.Suspense,{fallback:null,children:e})},t)),[a]);return(0,o.jsx)(f.Gu.Provider,{value:t,children:(0,o.jsxs)(s,{context:t,contentEditable:u,children:[c,g,h]})})}}(t,r),context:r}}
1,config:c,mergeConfig(e,t){let n=(0,a.Tc1)(e,t);return t.decorators&&(n.decorators=t.decorators.length>0?[...e.decorators,...t.decorators]:e.decorators),n},name:"@lexical/react/React",peerDependencies:[(0,a.aif)(u.name)]});function g({extension:e,children:t,contentEditable:n}){let i=(0,l.useMemo)(()=>r.iZ.fromExtensions([u,(0,a.O0w)(h,void 0===n?{}:{contentEditable:n}),e]).buildEditor(),[n,e]);(0,l.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{e=!0}),()=>{e&&i.dispose()}},[i]);let{Component:s}=(0,r.wD)(i,h).output;return(0,o.jsx)(s,{children:t})}},60383:function(e,t,n){var r=n(35588),i=n(54201),l=n(96540);let o=i.qxK?l.useLayoutEffect:l.useEffect;function s({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){let[l]=(0,r.DF)();return o(()=>{if(n)return l.registerUpdateListener(({editorState:r,dirtyElements:o,dirtyLeaves:s,prevEditorState:a,tags:u})=>{t&&0===o.size&&0===s.size||e&&u.has(i.T40)||a.isEmpty()||n(r,l,u)})},[l,e,t,n]),null}n.d(t,{D:function(){return s}})},21910:function(e,t,n){n.d(t,{fi:function(){return J},xi:function(){return B},d2:function(){return L}});var r=n(54201),i=n(31746),l=n(89268),o=n(66714),s=n(9382);function a(e,t,n=null){let i=(0,r.nAs)(n),l=n?(0,r.IWk)(n):[],o=null!==n&&l.length>0;if(o&&"function"==typeof i.caretPositionFromPoint){let o=i.caretPositionFromPoint(e,t,{shadowRoots:l});if(null!==o&&function(e,t){for(let n=e;null!==n;){if(n===t)return!0;n=(0,r.dCx)(n)}return!1}(o.offsetNode,n))return{node:o.offsetNode,offset:o.offset}}if(o){let l=n.getRootNode();if((0,r.R3g)(l)){let r=l.elementFromPoint(e,t);if(null!==r&&n.contains(r)){let n=function(e,t,n,r){let i=r.createRange(),l=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),a=null,u=1/0,f=1/0;for(let e=s.nextNode();e;e=s.nextNode())for(let t of(i.selectNodeContents(e),i.getClientRects())){let n=l(t),r=o(t);(n<u||n===u&&r<f)&&(u=n,f=r,a=e)}if(null===a)return null;let d=0,c=1/0,h=1/0;for(let t=0;t<=a.length;t++){i.setStart(a,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=l(n),o=Math.abs(e-n.left);(r<c||r===c&&o<h)&&(c=r,h=o,d=t)}return{node:a,offset:d}}(e,t,r,i);if(null!==n)return n}}}if("function"==typeof i.caretRangeFromPoint){let n=i.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("function"==typeof i.caretPositionFromPoint){let n=i.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}function u(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let f={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30},d=(e,t)=>{if(!(0,r.I2P)(t))return t.insertRawText(e),!0;let n=e=>{let t=(0,r.vJq)();(0,r.I2P)(t)&&e(t)};return(0,r.NEy)(e,{linebreak:()=>n(e=>e.insertParagraph()),tab:()=>n(e=>e.insertNodes([(0,r.ev7)()])),text:e=>n(t=>t.insertText(e))}),!0},c={"application/x-lexical-editor":[(e,t,n)=>{try{let n=(0,r.i0_)(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return v(n,function(e){let t=[];for(let n of e)t.push((0,r.GMe)(n));return t}(i.nodes),t),!0}catch(e){console.error(e)}return n()}],"text/html":[(e,t,n)=>{try{var i;let n=(0,r.i0_)(),o=(new DOMParser).parseFromString((i=e,window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(i):i),"text/html");return v(n,(0,l.dh)(n,o),t),!0}catch(e){return console.error(e),n()}}],"text/plain":[d],"text/uri-list":[d]};function h(e,t,n){let r=t.getData("text/plain");for(let i of Object.keys(e.$importMimeType).filter(t=>void 0!==e.$importMimeType[t]).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return void 0===r&&void 0===i?t<n?-1:+(t>n):void 0===r?1:void 0===i?-1:r-i})){let l=t.getData(i);if(l&&("text/html"!==i||l!==r)&&function(e,t,n,r){if(!e)return!1;let i=l=>!!e[l]&&e[l](t,n,i.bind(null,l-1),r);return i(e.length-1)}(e.$importMimeType[i],l,n,t))return!0}return!1}let g={$importMimeType:c,$insertDataTransfer:(e,t)=>h({$importMimeType:c,priority:f},e,t),priority:f},p=(0,r.vE9)({build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>h(t,e,n),priority:t.priority}),config:(0,r.lVE)({$importMimeType:c,priority:f}),mergeConfig(e,t){let n=(0,r.Tc1)(e,t);if(t.$importMimeType){let r={...e.$importMimeType};for(let[e,n]of Object.entries(t.$importMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:"@lexical/clipboard/Import"});function _(e,t=(0,r.vJq)()){return null==t&&u(166),(0,r.I2P)(t)&&t.isCollapsed()||0===t.getNodes().length?"":(0,l.g2)(e,t)}function m(e,t=(0,r.vJq)()){return null==t&&u(166),(0,r.I2P)(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){let n=[],i=(0,r.NiT)(),l=(0,r.I2P)(t)?t.anchor.getNode():(0,r.RTZ)(t)?t.getNodes()[0]??null:null,s=null!==l?(0,r.ex6)(l):null,a=((0,r.ff4)(s)?s:i).getChildren();for(let i=0;i<a.length;i++)!function e(t,n,i,l=[]){var s;let a,f,d=null===n||i.isSelected(n),c=(0,r.ff4)(i)&&i.excludeFromCopy("html"),h=i;null!==n&&(0,r.kFe)(h)&&(h=(0,o.SD)(n,h,"clone"));let g=(0,r.ff4)(h)?h.getChildren():[],p=(a=(s=h).exportJSON(),f=s.constructor,a.t
1ype!==f.getType()&&u(58,f.name),(0,r.ff4)(s)&&(Array.isArray(a.children)||u(59,f.name)),a);(0,r.kFe)(h)&&0===h.getTextContentSize()&&(d=!1);let _=d&&(0,r.RTZ)(n)&&(0,r.ff4)(i)?null:n;for(let l=0;l<g.length;l++){let o=g[l],s=e(t,_,o,p.children);!d&&(0,r.ff4)(i)&&s&&i.extractWithChild(o,n,"clone")&&(d=!0)}if(d&&!c){let n=(0,r.vU2)(h);if(n.length>0){let i={};for(let l of n){let n=(0,r.DTJ)(h,l);null===n&&u(366,h.constructor.name,l);let o=[];e(t,null,n,o),1===o.length&&o[0].type===n.getType()||u(385,l,h.constructor.name,String(o.length),String(o.length>0?o[0].type:"none")),i[l]=o[0]}p.$slots=i}}if(d&&!c)l.push(p);else if(Array.isArray(p.children))for(let e=0;e<p.children.length;e++){let t=p.children[e];l.push(t)}return d}(e,t,a[i],n);return{namespace:e._config.namespace,nodes:n}}(e,t))}function y(e,t,n){let r;((r=(0,i.cP)(p.name))?r.output:g).$insertDataTransfer(e,t)}l._e;let x="application/x-lexical-drag";function v(e,t,n){e.dispatchCommand(r.oqR,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if((0,r.I2P)(e)&&e.isCollapsed()){let t=e.anchor,n=null,i=(0,r.Ave)(t,"previous");if(i)if((0,r.rN)(i))n=i.origin;else for(let e of(0,r.TJt)(i,(0,r.uwZ)((0,r.NiT)(),"next").getFlipped())){if((0,r.kFe)(e.origin)){n=e.origin;break}if((0,r.ff4)(e.origin)&&!e.origin.isInline())break}if(n&&(0,r.kFe)(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}let S=null;async function C(e,t,n){if(null!==S)return!1;if(null!==t)return new Promise((r,i)=>{e.update(()=>{r(b(e,t,n))})});let i=e.getRootElement(),l=e._window||window,o=l.document,a=(0,r.peL)(l);if(null===i||null===a)return!1;let u=o.createElement("span");u.style.position="fixed",u.style.top="-1000px",u.append(o.createTextNode("#")),i.append(u);let f=o.createRange();return f.setStart(u,0),f.setEnd(u,1),a.removeAllRanges(),a.addRange(f),new Promise((t,i)=>{let a=e.registerCommand(r.u5G,r=>((0,s.xj)(r,ClipboardEvent)&&(a(),null!==S&&(l.clearTimeout(S),S=null),t(b(e,r,n))),!0),4);S=l.setTimeout(()=>{a(),S=null,t(!1)},50),o.execCommand("copy"),u.remove()})}function b(e,t,n){if(void 0===n){let t=(0,r.peL)(e._window),i=(0,r.vJq)();if(!i||i.isCollapsed()||!t)return!1;let l=(0,r.Mgk)(t,e.getRootElement()),o=l.anchorNode,s=l.focusNode;if(null!==o&&null!==s&&!(0,r.LYZ)(e,o,s))return!1;n=k(i)}t.preventDefault();let i=t.clipboardData;return null!==i&&(N(i,n),!0)}let T=[["text/html",_],["application/x-lexical-editor",m]];function k(e=(0,r.vJq)()){var t=function(e=(0,r.i0_)()){let t=(0,i.xT)(e,w.name);return t?t.output:E}();let n={"text/plain":""};for(let[r,i]of Object.entries(t))if(i){let t=function(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}(i,e);null!==t&&(n[r]=t)}return n}function N(e,t){for(let[n]of T)void 0===t[n]&&e.setData(n,"");for(let n in t){let r=t[n];void 0!==r&&e.setData(n,r)}}let E={"application/x-lexical-editor":[(e,t)=>e?m((0,r.i0_)(),e):t()],"text/html":[(e,t)=>e?_((0,r.i0_)(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]},w=(0,r.vE9)({build:(e,t,n)=>t.$exportMimeType,config:(0,r.lVE)({$exportMimeType:E}),mergeConfig(e,t){let n=(0,r.Tc1)(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$exportMimeType=r}return n},name:"@lexical/clipboard/GetClipboardData"}),O={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},P=Symbol.for("@lexical/dragon/WindowState");function M(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&0===e.size&&t.editors.delete(r)}t.installs.delete(n)&&0===t.installs.size&&(t.dispose(),delete e[P])}function A(e){return e&&e.ownerDocument.defaultView}function D(e){if(e.origin!==this.location.origin)return;let t=function(e){let t=e[P];if(void 0===t)return null;let n=(0,r.lue)((0,r.v39)(e.document));return(0,r.Uqh)(n)&&t.editors.has(n)?n:null}(this);if(null===t)return;let n=e.data;if("string"==typeof n){let i;try{i=JSON.parse(n)}catch(e){return}if(i&&"nuanria_messaging"===i.protocol&&"request"===i.type){let n=i.payload;if(n&&"makeChanges"===n.functionId){let i=n.args;if(Array.isArray(i)){let[n,l,o,s,a,u]=i;if(![n,l,s,a].every(Number.isFinite)||"string"!=typeof o&&-1!==o)return;t.update(()=>{let t=(0,r.vJq)();if((0,r.I2P)(t)){let i=t.anchor,f=i.getNode(),d=0,c=0;if((0,r.kFe)(f)&&n>=0&&l>
1=0&&(d=n,c=n+l,t.setTextNodeRange(f,d,f,c)),"string"!=typeof o||d===c&&""===o||(t.insertRawText(o),f=i.getNode()),(0,r.kFe)(f)){let e=f.getTextContentSize();d=Math.min(Math.max(s,0),e),c=s<0||a<0?d:Math.min(s+a,e),t.setTextNodeRange(f,d,f,c)}if("string"==typeof u&&a>0&&!t.isCollapsed()){let e=O[u];void 0!==e&&t.formatText(e)}e.stopImmediatePropagation()}})}}}}}let I=(0,r.vE9)({build:(e,t,n)=>(0,i.v)(t),config:(0,r.lVE)({disabled:"u"<typeof window}),name:"@lexical/dragon",register:(e,t,n)=>(0,i.QZ)(()=>{let t;return n.getOutput().disabled.value?void 0:(t=(0,i.jX)(()=>A(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=A(e)})),(0,i.QZ)(()=>{let n=t.value;if(n)return function(e,t,n){let r,i=(void 0===(r=e[P])&&(r={dispose:()=>{},editors:new Map,installs:new Set},e[P]=r),r);if(0===i.installs.size){let t=D.bind(e);e.addEventListener("message",t,!0),i.dispose=()=>{e.removeEventListener("message",t,!0)}}if(i.installs.add(t),n){let e=i.editors.get(n)||new Set;e.add(t),i.editors.set(n,e)}return M.bind(null,e,i,t,n)}(n,Symbol("@lexical/dragon/editorInstall"),e)}))})}),F=[(0,l.Bu)({$import:(e,t)=>{let n=J(t.nodeName.toLowerCase());return(0,r.dxY)(t,n),(0,r.Sz2)(n,t),(0,r.q3P)(n,t),[n.splice(0,0,e.$importChildren(t))]},match:l.VR.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"}),(0,l.Bu)({$import:(e,t)=>{let n=B();return(0,r.Sz2)(n,t),(0,r.dxY)(t,n),(0,r.q3P)(n,t),[n.splice(0,0,e.$importChildren(t))]},match:l.VR.tag("blockquote"),name:"@lexical/rich-text/blockquote"}),(0,l.Bu)({$import:(e,t,n)=>{let i=t.firstChild;return i&&(0,r.sby)(i)&&"SPAN"===i.nodeName&&"26pt"===i.style.fontSize?e.$importChildren(t):n()},match:l.VR.tag("p"),name:"@lexical/rich-text/google-docs-title-p"}),(0,l.Bu)({$import:(e,t,n)=>"26pt"!==t.style.fontSize?n():[J("h1").splice(0,0,e.$importChildren(t))],match:l.VR.tag("span"),name:"@lexical/rich-text/google-docs-title-span"})],L=(0,r.vE9)({build:(e,t)=>(0,i.v)(t),config:(0,r.lVE)({escapeFormatTriggers:{capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}}}),conflictsWith:["@lexical/plain-text"],dependencies:[I,i.Bw,i.vw,l._e,(0,r.O0w)(l.Zj,{rules:F})],mergeConfig:function(e,t){let n=(0,r.Tc1)(e,t);return t.escapeFormatTriggers&&(n.escapeFormatTriggers=function(e,t){let n=(0,r.Tc1)(e,t);for(let o of Object.keys(t)){var i,l;n[o]=(i=e[o],l=t[o],i&&null!==l?(0,r.Tc1)(i,l):l)}return n}(e.escapeFormatTriggers,t.escapeFormatTriggers)),n},name:"@lexical/rich-text",nodes:()=>[z,K],register:(e,t,n)=>(0,i.QZ)(()=>(function(e,t=(0,i.vP)(H)){return(0,r.Sdt)(e.registerCommand(r.d8p,()=>{let e=(0,r.vJq)();return(0,r.RTZ)(e)?(e.clear(),!0):((0,r.I2P)(e)&&j(e,"click","both",t.peek()),!1)},0),e.registerCommand(r.WuB,e=>{let t=(0,r.vJq)();return(0,r.I2P)(t)?(t.deleteCharacter(e),!0):!!(0,r.RTZ)(t)&&(t.deleteNodes(),!0)},0),e.registerCommand(r.hi0,e=>{let t=(0,r.vJq)();return!!(0,r.I2P)(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(r.viC,e=>{let t=(0,r.vJq)();return!!(0,r.I2P)(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(r.bM3,t=>{let n=(0,r.vJq)();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;let i=t.dataTransfer;if(null!=i)y(i,n,e);else if((0,r.I2P)(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},0),e.registerCommand(r.$ey,()=>{let e=(0,r.vJq)();return!!(0,r.I2P)(e)&&(e.removeText(),!0)},0),e.registerCommand(r.mB,e=>{let t=(0,r.vJq)();return!!(0,r.I2P)(t)&&(t.formatText(e),!0)},0),e.registerCommand(r.fUS,e=>{let t=(0,r.vJq)();if(!(0,r.I2P)(t)&&!(0,r.RTZ)(t))return!1;for(let n of t.getNodes()){let t=(0,r.BtT)(n,e=>(0,r.ff4)(e)&&!e.isInline());null!==t&&t.setFormat(e)}return!0},0),e.registerCommand(r.FEN,e=>{let t=(0,r.vJq)();return!!(0,r.I2P)(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(r.XKQ,()=>{let e=(0,r.vJq)();return!!(0,r.I2P)(e)&&(e.insertParagraph(),!0)},0),e.registerCommand(r.YW5,()=>{let e=(0,r.ev7)(),t=(0,r.vJq)();return(0,r.I2P)(t)&&(e.setFormat(t.format),e.setStyle(t.style)),(0,r.H2A)([e]),!0},0),e.registerCommand(r.PiT,()=>(0,s.Jy)(e=>{let t=e.getIndent();e.setIndent(t+1)}),0),e.registerCommand(r.sik,()=>(0,s.Jy)(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),0),e.registerCommand(r.UDz,e=>{let t=(0,r.vJq)();if((0,r.RTZ)(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if((0,r.I2P)(t)){let n=(0,r.B$P)(t.focus,!0);if(!e.shiftKey&&(0,r.Cyw)(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},0),e.registerCommand(r.bbF,e=>{let t=(0,r.vJq)();if((0,r.RTZ)(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if((0,r.I2P)(t)){let n;if("root"===(n=t.focus).key&&n.offset===(0,r.NiT)().getChildrenSize())return e.preventDefault(),!0;let i=(0,r.B$P)(t.focus,!1);if(!e.shiftKey&&(0,r.Cyw)(i)&&!i.isIsolated()&&!i.isInline())return i.selectNext(),e.preventDefault(),!0}return!1},0),e.registerCommand(r.AX0,e=>{let n=(0,r.vJq)();if((0,r.RTZ)(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),(0,o.dt)(t[0])?t[0].selectNext(0,0):t[0].selectPrevious(),!0}if(!(0,r.I2P)(n))return!1;if(e.shiftKey||j(n,"arrow","start",t.peek()),(0,o.Cb)(n,!0)){let t=e.shiftKey;return e.preventDefault(),(0,o.Rk)(n,t,!0),!0}return!1},0),e.registerCommand(r.JM3,e=>{let n=(0,r.vJq)();if((0,r.RTZ)(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),(0,o.dt)(t[0])?t[0].selectPrevious():t[0].selectNext(0,0),!0}if(!(0,r.I2P)(n))return!1;if(e.shiftKey||j(n,"arrow","end",t.peek()),(0,o.Cb)(n,!1)){let t=e.shiftKey;return e.preventDefault(),(0,o.Rk)(n,t,!1),!0}return!1},0),e.registerCommand(r.gCZ,t=>{let n=(0,r.vJq)();if(!(0,r.RTZ)(n)&&q(t.target))return!1;if((0,r.I2P)(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(0!==t.offset)return!1;let n=t.getNode();if((0,r.hVZ)(n))return!1;let i=(0,s.mB)(n);return i.getIndent()>0&&(i.is(n)||n.is(i.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(r.sik,void 0);if(r.pz6&&r.aT4)return!1}else if(!(0,r.RTZ)(n))return!1;return t.preventDefault(),e.dispatchCommand(r.WuB,!0)},0),e.registerCommand(r.w$Z,t=>{let n=(0,r.vJq)();return!(!(0,r.RTZ)(n)&&q(t.target))&&!(!(0,r.I2P)(n)&&!(0,r.RTZ)(n))&&(t.preventDefault(),e.dispatchCommand(r.WuB,!1))},0),e.registerCommand(r.RTo,n=>{let i=(0,r.vJq)();if((0,r.RTZ)(i)){let e=i.getNodes();1===e.length&&(0,r.Cyw)(e[0])&&!e[0].isInline()&&(i=e[0].selectNext())}if(!(0,r.I2P)(i))return!1;if(j(i,"enter","both",t.peek()),null!==n){if((r.pz6||r.YwR||r.DzG)&&r.aT4)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(r.FEN,!1)}return e.dispatchCommand(r.XKQ,void 0)}
1,0),e.registerCommand(r.Q$N,()=>{let t=(0,r.vJq)();return!!(0,r.I2P)(t)&&(e.blur(),!0)},0),e.registerCommand(r.Sr4,t=>{let[,n]=(0,s.gA)(t);if(n.length>0){let i=a(t.clientX,t.clientY,e.getRootElement());if(null!==i){let{offset:t,node:l}=i,o=(0,r.xL4)(l);if(null!==o){let e=(0,r.uTE)();if((0,r.kFe)(o))e.anchor.set(o.getKey(),t,"text"),e.focus.set(o.getKey(),t,"text");else{let t=o.getParentOrThrow().getKey(),n=o.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}let n=(0,r.CaD)(e);(0,r.n1P)(n)}e.dispatchCommand(R,n)}return t.preventDefault(),!0}return function(e,t,n){let i=e.dataTransfer;if(null===i)return!1;let l=function(e){var t;let n,r=e.getData(x);if(!r)return null;try{n=JSON.parse(r)}catch(e){return null}return null!==(t=n)&&"object"==typeof t&&"editorKey"in t&&"string"==typeof t.editorKey?n:null}(i);if(null===l)return!1;let o=function(e,t){let n=a(e.clientX,e.clientY,t.getRootElement());if(null===n)return null;let i=(0,r.xL4)(n.node);if(null===i)return null;if((0,r.kFe)(i))return(0,r.T8n)(i,"next",n.offset);if((0,r.ff4)(i))return(0,r.hdR)(i,n.offset,"next");let l=i.getParent();return null===l?null:(0,r.hdR)(l,i.getIndexWithinParent()+1,"next")}(e,t);if(null===o)return!1;let s=(0,r.k1Q)(o);if(null===s)return!1;let u=l.editorKey===t.getKey(),f=(0,r.vJq)();if(u){if(!(0,r.I2P)(f)||f.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:i}=(0,r.NZv)((0,r.$iu)(t),"next");return 0>(0,r.AcB)(n,e)&&0>(0,r.AcB)(e,i)}(o,f))return e.preventDefault(),!0;f.removeText()}if(!s.origin.isAttached())return e.preventDefault(),!0;if(n(i,(0,r.xQ8)((0,r.sWS)(s)),t),!u){let e=t.getRootElement(),n=e?e.ownerDocument:null,i=n?function(e,t){for(let n of(0,r.CMH)(t)){let t=(0,r.lue)(n);if((0,r.Uqh)(t)&&t.getKey()===e&&(0,r.sby)(n))return n}return null}(l.editorKey,n):null;null!==i&&i.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}(t,e,y)},0),e.registerCommand(r.TgX,t=>{var n;let i,[l]=(0,s.gA)(t),o=(0,r.vJq)();return!(l&&!(0,r.I2P)(o))&&((0,r.I2P)(o)&&!o.isCollapsed()&&null!==t.dataTransfer&&(N(t.dataTransfer,k(o)),n=t.dataTransfer,i={editorKey:e.getKey()},n.setData(x,JSON.stringify(i))),!0)},0),e.registerCommand(r.riq,e=>{let[t]=(0,s.gA)(e),n=(0,r.vJq)();return!(t&&!(0,r.I2P)(n))&&(e.preventDefault(),!0)},0),e.registerCommand(r.HYn,()=>{let e=(0,r.vJq)();return(0,r.e1k)((0,r.I2P)(e)&&null!==(0,r.ex6)(e.anchor.getNode())?e:null),!0},0),e.registerCommand(r.u5G,t=>(C(e,(0,s.xj)(t,ClipboardEvent)?t:null),!0),0),e.registerCommand(r.VSO,t=>((async function(e,t){await C(t,(0,s.xj)(e,ClipboardEvent)?e:null),t.update(()=>{let e=(0,r.vJq)();(0,r.I2P)(e)?e.removeText():(0,r.RTZ)(e)&&e.getNodes().forEach(e=>e.remove())},{tag:"cut"})})(t,e),!0),0),e.registerCommand(r.waI,t=>{let[,n,i]=(0,s.gA)(t);return n.length>0&&!i?(e.dispatchCommand(R,n),!0):!((0,r.vAA)(t.target)&&(0,r.Pl0)(t.target))&&null!==(0,r.vJq)()&&(t.preventDefault(),e.update(()=>{let n=(0,r.vJq)(),i=(0,s.xj)(t,InputEvent)||(0,s.xj)(t,KeyboardEvent)?null:t.clipboardData;null!=i&&null!==n&&y(i,n,e)},{tag:"paste"}),!0)},0),e.registerCommand(r.Huu,()=>{let e=(0,r.vJq)();return(0,r.I2P)(e)&&j(e,"space","both",t.peek()),!1},0),e.registerCommand(r.OXk,()=>{let e=(0,r.vJq)();return(0,r.I2P)(e)&&j(e,"tab","both",t.peek()),!1},0),e.registerCommand(r.A6j,e=>{let t=(0,r.vJq)();if((0,r.RTZ)(t))return V(t,!1,e);if(!(0,r.I2P)(t))return!1;let{anchor:n}=t;if("element"!==n.type||0!==n.offset)return!1;let i=n.getNode();if(!(0,r.ff4)(i))return!1;let l=i.getFirstChild();if(!(0,r.Cyw)(l)||!l.isInline())return!1;let o=i.getKey(),s=i.selectEnd();return e.shiftKey&&s.anchor.set(o,0,"element"),e.preventDefault(),e.stopPropagation(),!0},0),e.registerCommand(r.RpX,e=>{let t=(0,r.vJq)();if((0,r.RTZ)(t))return V(t,!0,e);if(!(0,r.I2P)(t))return!1;let{anchor:n,focus:i}=t,l=(0,r.BtT)(i.getNode(),e=>(0,r.ff4)(e)&&!e.isInline());if(null===l)return!1;let o=l.getFirstChild();if(!(0,r.Cyw)(o)||!o.isInline()||(0,r.BtT)(n.getNode(),e=>(0,r.ff4)(e)&&!e.isInline())!==l)return!1;let s=l.getKey();
1return("element"!==i.type||i.key!==s||0!==i.offset)&&(t.focus.set(s,0,"element"),e.shiftKey||t.anchor.set(s,0,"element"),e.preventDefault(),e.stopPropagation(),!0)},0))})(e,n.getOutput().escapeFormatTriggers))}),R=(0,r.guI)("DRAG_DROP_PASTE_FILE");class K extends r.fGB{static getType(){return"quote"}static clone(e){return new K(e.__key)}createDOM(e){let t=document.createElement("blockquote");return(0,r.ZB7)(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:U,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,r.sby)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return B().updateFromJSON(e)}insertNewAfter(e,t){let n=(0,r.lJ7)(),i=this.getDirection();return n.setDirection(i),this.insertAfter(n,t),n}collapseAtStart(){let e=(0,r.lJ7)();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function B(){return(0,r.pTq)(new K)}class z extends r.fGB{__tag;static getType(){return"heading"}static clone(e){return new z(e.__tag,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__tag=e.__tag}constructor(e="h1",t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){let t=this.getWritable();return t.__tag=e,t}createDOM(e){let t=this.__tag,n=document.createElement(t),i=e.theme.heading;if(void 0!==i){let e=i[t];(0,r.ZB7)(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:$,priority:0}),h2:e=>({conversion:$,priority:0}),h3:e=>({conversion:$,priority:0}),h4:e=>({conversion:$,priority:0}),h5:e=>({conversion:$,priority:0}),h6:e=>({conversion:$,priority:0}),p:e=>{let t=e.firstChild;return null!==t&&W(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>W(e)?{conversion:e=>({node:J("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,r.sby)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return J(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,i=this.getLastDescendant(),l=i&&(!e||e.anchor.key!==i.getKey()||n!==i.getTextContentSize())&&e?J(this.getTag()):(0,r.lJ7)(),o=this.getDirection();if(l.setDirection(o),this.insertAfter(l,t),0===n&&!this.isEmpty()&&e){let e=(0,r.lJ7)();e.select(),this.replace(e,!0)}return l}collapseAtStart(){if(this.isEmpty()){let e=(0,r.lJ7)();
1this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}}function W(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function $(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=J(t),(0,r.dxY)(e,n),(0,r.Sz2)(n,e),(0,r.q3P)(n,e)),{node:n}}function U(e){let t=B();return(0,r.Sz2)(t,e),(0,r.dxY)(e,t),(0,r.q3P)(t,e),{node:t}}function J(e="h1"){return(0,r.pTq)(new z(e))}function q(e){let t=(0,r.xL4)(e);return(0,r.Cyw)(t)}function j(e,t,n,i){let l=!1,o=null;if(e.isCollapsed()&&"text"===e.anchor.type){let t=e.anchor.getNode();if((0,r.kFe)(t)){o=t;let r=e.anchor.offset,i=r===t.getTextContentSize()&&null===t.getNextSibling(),s=0===r&&null===t.getPreviousSibling();l="end"===n&&i||"start"===n&&s||"both"===n&&(i||s)}}let s=!1;for(let[n,a]of Object.entries(i))if(null!=a&&a[t]){if(a.onlyAtBoundary){if(!(l&&o&&(0,r.kFe)(o)&&o.hasFormat(n)))continue;s=!0}e.hasFormat(n)&&e.toggleFormat(n)}s&&e.setStyle("")}let H={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function V(e,t,n){n.preventDefault(),n.stopPropagation();let i=e.getNodes();if(0===i.length)return!0;let l=i.map(e=>(0,r.IlV)(e,"next")).sort(r.AcB),o=(t?l[0]:l[l.length-1]).origin,s=(0,r.BtT)(o,e=>e!==o&&(0,r.ff4)(e)&&!e.isInline())??(0,r.NiT)(),a=t?0:s.getChildrenSize();return s.select(a,a),!0}},66714:function(e,t,n){var r=n(54201);function i(e,t){let n=e.getRootElement();if(null===n)return[];let r=n.getBoundingClientRect(),i=getComputedStyle(n),l=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=Array.from(t.getClientRects()),s,a=o.length;o.sort((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n});for(let e=0;e<a;e++){let t=o[e],n=s&&s.top<=t.top&&s.top+s.height>t.top&&s.left+s.width>t.left,i=t.width+l===r.width;n||i?(o.splice(e--,1),a--):s=t}return o}function l(e){let t=(0,r.i0_)().getElementByKey(e.getKey());if(null===t)return null;let n=t.ownerDocument.defaultView;return null===n?null:n.getComputedStyle(t)}function o(e){return l((0,r.hVZ)(e)?e:e.getParentOrThrow())}function s(e){let t=o(e);return null!==t&&"rtl"===t.direction}function a(e,t,n="self"){let i=e.getStartEndPoints();if(t.isSelected(e)&&!(0,r.Rb_)(t)&&null!==i){let[l,o]=i,s=e.isBackward(),a=l.getNode(),u=o.getNode(),f=t.is(a),d=t.is(u);if(f||d){let[i,l]=(0,r.Cku)(e),o=a.is(u),f=t.is(s?u:a),d=t.is(s?a:u),c,h=0;o?(h=i>l?l:i,c=i>l?i:l):f?(h=s?l:i,c=void 0):d&&(h=0,c=s?i:l);let g=t.__text.slice(h,c);g!==t.__text&&("clone"===n&&(t=(0,r.U5P)(t)),t.__text=g)}}return t}function u(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function f(e,t,n=u){if(!e)return;let i=e.getStartEndPoints(),l=!1,o=null,s=new Map;if(i){let[e,t]=i,n=(0,r.BtT)(e.getNode(),r.w3H);o=(0,r.BtT)(t.getNode(),r.w3H),l=(0,r.ff4)(o)&&!o.is(n)&&function(e,t){if(0!==e.offset)return!1;let n=e.getNode();if((0,r.ff4)(n)&&n.isEmpty())return!1;for(;!n.is(t);){if(null!==n.getPreviousSibling())return!1;let e=n.getParent();if(null===e)return!1;n=e}return!0}(t,o),(0,r.ff4)(n)&&s.set(n.getKey(),n),(0,r.ff4)(o)&&!l&&s.set(o.getKey(),o)}for(let t of e.getNodes())if((0,r.ff4)(t)&&(0,r.w3H)(t)){if(l&&t.is(o))continue;s.set(t.getKey(),t)}else if(!i){let e=(0,r.BtT)(t,r.w3H);(0,r.ff4)(e)&&s.set(e.getKey(),e)}for(let e of s.values()){let r=t();n(e,r),e.replace(r,!0)}}function d(e){let t=c(e);return null!==t&&"vertical-rl"===t.writingMode}function c(e){let t=e.anchor.getNode();return(0,r.ff4)(t)?l(t):o(t)}function h(e,t){let n=d(e)?!t:t;g(e)&&(n=!n);let i=(0,r.Ave)(e.focus,n?"previous":"next");if((0,r.pGK)(i))return!1;for(let e of(0,r.mWO)(i)){if((0,r.cmH)(e))return!e.origin.isInline();if(!(0,r.ff4)(e.origin)){if((0,r.Cyw)(e.origin))return!0;break}}return!1}function g(e){let t=c(e);return null!==t&&"rtl"===t.direction}function p(e,t,n){let r,i=g(e);r=d(e)||i?!n:n,e.modify(t?"extend":"move",r,"character")}n.d(t,{Cb:function(){return h},Rk:function(){return p},SD:function(){return a},dt:function(){return s},zI:function(){return f},zT:function(){return i}})},9382:function(e,t,n){var r=n(66714),i=n(54201);function l(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function o(e){return`${e}px`}let s={attributes:!0,characterData:!0,childList:!0,subtree:!0};function a(e,t,n,r){if("text"!==t.type&&(0,i.ff4)(n)){let l=(0,i.FfB)(n,r,e);return[l.element,l.getFirstChildOffset()+t.offset]}return[((0,i.kFe)(n)?(0,i.OCP)(n,r,e):(0,i.c_R)(r))||r,t.offset]}function u(e,t){let n=null,u=()=>{let u=e.getRootElement(),f=null!==u?u.ownerDocument.defaultView:null,d=null!==f?f.getSelection():null,c=null!==d?(0,i.Mgk)(d,u).anch
1orNode:null;null!==c&&null!==u&&u.contains(c)?null!==n&&(n(),n=null):null===n&&(n=function(e,t=function(e){for(let t of e){let e=t.style;"Highlight"!==e.background&&(e.background="Highlight"),"HighlightText"!==e.color&&(e.color="HighlightText"),e.marginTop!==o(-1.5)&&(e.marginTop=o(-1.5)),e.paddingTop!==o(4)&&(e.paddingTop=o(4)),e.paddingBottom!==o(0)&&(e.paddingBottom=o(0))}}){let n=null,u=null,f=null,d=null,c=null,h=null,g=()=>{};function p(p){p.read(()=>{let p,_=(0,i.vJq)();if(!(0,i.I2P)(_))return n=null,f=null,d=null,h=null,g(),void(g=()=>{});let[m,y]=(p=_.getStartEndPoints(),_.isBackward()?[p[1],p[0]]:p),x=m.getNode(),v=x.getKey(),S=m.offset,C=y.getNode(),b=C.getKey(),T=y.offset,k=e.getElementByKey(v),N=e.getElementByKey(b),E=null===n||k!==u||S!==f||v!==n.getKey(),w=null===d||N!==c||T!==h||b!==d.getKey();if((E||w)&&null!==k&&null!==N){let n,u=((n=(e._window?e._window.document:document).createRange()).setStart(...a(e,m,x,k)),n.setEnd(...a(e,y,C,N)),n);g(),g=function(e,t,n){let a=null,u=null,f=null,d=[],c=document.createElement("div");function h(){var i;null===a&&l(182),null===u&&l(183);let{left:s,top:f}=u.getBoundingClientRect(),h=function(e){let t=(e,t)=>t.left>=e.left-1&&t.top>=e.top-1&&t.right<=e.right+1&&t.bottom<=e.bottom+1,n=[];for(let r of Array.from(e))if(!(r.width<.5||r.height<.5||n.some(e=>t(r,e)))){for(let e=n.length-1;e>=0;e--)t(n[e],r)&&n.splice(e,1);n.push(r)}return n}((0,r.zT)(e,t));c.isConnected||(i=u).insertBefore(c,i.firstChild);let g=!1;for(let e=0;e<h.length;e++){let t=h[e],n=d[e]||document.createElement("div"),r=n.style;"absolute"!==r.position&&(r.position="absolute",g=!0);let i=o(t.left-s);r.left!==i&&(r.left=i,g=!0);let l=o(t.top-f);r.top!==l&&(n.style.top=l,g=!0);let a=o(t.width);r.width!==a&&(n.style.width=a,g=!0);let u=o(t.height);r.height!==u&&(n.style.height=u,g=!0),n.parentNode!==c&&(c.append(n),g=!0),d[e]=n}for(;d.length>h.length;)d.pop();g&&n(d)}function g(){for(let e of(u=null,a=null,null!==f&&f.disconnect(),f=null,c.remove(),d))e.remove();d=[]}c.style.position="relative";let p=e.registerRootListener(function t(){let n=e.getRootElement();if(null===n)return g();let r=n.parentElement;if(!(0,i.sby)(r))return g();g(),a=n,u=r,(f=new MutationObserver(n=>{let r=e.getRootElement(),i=r&&r.parentElement;if(r!==a||i!==u)return t();for(let e of n)if(!c.contains(e.target))return h()})).observe(r,s),h()});return()=>{p(),g()}}(e,u,t)}n=x,u=k,f=S,d=C,c=N,h=T},{editor:e})}return p(e.getEditorState()),(0,i.Sdt)(e.registerUpdateListener(({editorState:e})=>p(e)),()=>{g()})}(e,t))};return e.registerRootListener(e=>{if(e){let t=e.ownerDocument;return t.addEventListener("selectionchange",u),u(),()=>{null!==n&&n(),t.removeEventListener("selectionchange",u)}}})}function f(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function d(e){let t=(0,i.BtT)(e,e=>(0,i.ff4)(e)&&!e.isInline());return(0,i.ff4)(t)||l(4,e.__key),t}function c(e,t){let n=(0,i.NZv)((0,i.I2P)(t)?(0,i.$iu)(t):t,"next"),r=(0,i.ex6)(n.anchor.origin),l=(0,i.ex6)(e.getLatest());if(null===r?null!==l:!r.is(l))return!1;let o=(0,i.lSZ)((0,i.uwZ)(e,"next")),s=(0,i.Csq)((0,i.lSZ)((0,i.uwZ)(e,"previous")),"next");return 0>=(0,i.AcB)(n.anchor,o)&&(0,i.AcB)(n.focus,s)>=0}function h(e){let t,n=(0,i.vJq)()||(0,i.S1w)();if((0,i.I2P)(n))t=(0,i.Ave)(n.focus,"next");else{if(null!=n){let e=n.getNodes(),r=e[e.length-1];r&&(t=(0,i.IlV)(r,"next"))}t=t||(0,i.uwZ)((0,i.NiT)(),"previous").getFlipped().insert((0,i.lJ7)())}let r=(0,i.rdQ)(e,t),l=(0,i.erb)(r),o=(0,i.cmH)(l)?(0,i.lSZ)(l):r;return(0,i.xQ8)((0,i.sWS)(o)),e.getLatest()}function g(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function p(e){let t=null;if(g(e,DragEvent)?t=e.dataTransfer:g(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];let n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function _(e){let t=(0,i.vJq)();if(!(0,i.I2P)(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let l=r[t],o=l.getKey();if(n.has(o))continue;let s=(0,i.BtT)(l,e=>(0,i.ff4)(e)&&!e.isInline());if(null===s)continue;let a=s.getKey();s.canIndent()&&!n.has(a)&&(n.add(a),e(s))}return n.size>0}let m=!(i.$Mp||!i.qxK)&&void 0;function y(e,t=!1){let n=1;if(function(){if(void 0===m){let e=document.createElement("div");
1e.style.position="absolute",e.style.opacity="0",e.style.width="100px",e.style.left="-1000px",document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),m=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return m}()||t){let t=e&&e.ownerDocument.defaultView||window;for(;e;)n*=Number(t.getComputedStyle(e).getPropertyValue("zoom")),e=(0,i.dCx)(e)}return n}n.d(t,{Jy:function(){return _},OV:function(){return y},Pe:function(){return h},RM:function(){return c},V0:function(){return u},eu:function(){return f},gA:function(){return p},mB:function(){return d},xj:function(){return g}})},54201:function(e,t,n){let r;function i(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function l(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let o="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,s=o&&"documentMode"in document?document.documentMode:null,a=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),u=o&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),f=!(!o||!("InputEvent"in window)||s)&&"getTargetRanges"in new window.InputEvent("input"),d=o&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=o&&/Android/.test(navigator.userAgent),h=o&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,g=o&&/^(?=.*Chrome).*/i.test(navigator.userAgent),p=o&&c&&g,_=o&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&a&&!g,m=h||d||_?" ":"â",y=u?" ":m,x="Ö-ß¿ï¬-﷽ﹰ-ﻼ",v="A-Za-zÃ-ÃÃ-öø-ʸÌ-Öà -á¿¿ââ°-ï¬ï¸-﹯﻽-ï¿¿",S=(RegExp("^[^"+v+"]*["+x+"]"),RegExp("^[^"+x+"]*["+v+"]"),{bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512}),C={directionless:1,unmergeable:2},b={center:2,end:6,justify:4,left:1,right:3,start:5},T={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},k={normal:0,segmented:2,token:1},N={0:"normal",2:"segmented",1:"token"},E="$config";function w(){return lq()._blockCursorElement}class O{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new O(this.element,e,this.after)}withAfter(e){return new O(this.element,this.before,e)}withElement(e){return this.element===e?this:new O(e,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return null!==t&&t.parentElement!==this.element&&i(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&i(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&i(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&0===n?"before":"after";let r=P(e,this.element);if(null===r)return"after";let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return"after";if(t===e)return n<=i?"before":"after";let l=P(e,t);if(null===l)return"after";let o=Array.prototype.indexOf.call(e.childNodes,l);return o>=0&&o<=i?"before":"after"}getInsertionAnchor(){return this.before}}function P(e,t){let n=t;for(;null!==n&&n.parentNode!==e;)n=n.parentNode;return n}class M extends O{withBefore(e){return new M(this.element,e,this.after)}withAfter(e){return new M(this.element,this.before,e)}withElement(e){return this.element===e?this:new M(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){var e;let t=super.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;for(;null!==(e=n)&&1===e.nodeType&&e.hasAttribute("data-lexical-slot");)t=n,n=n.nextSibling;let r=t?t.nextSibling:this.element.firstChild;return null!==r&&r===w()?r:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,null===e)this.removeManagedLineBreak();else{let t="decorator"===e&&(_||d||h);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=document.createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(i,r),e){let e=document.createElement("img");e.setAttribute("data-lexical-managed-linebreak","true"),e.style.setProperty("display","inline","important"),e.style.setProperty("border","0px","important"),e.style.setProperty("margin","0px","important"),e.alt="",n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;null!==r&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=w(),i=this.element.childNodes,l=Math.min(r,i.length),o=0;for(let e=t;e<l;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=A(t,n);i.push(r);let l=A(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<l.length;e++){let t=i[e],n=l[e];
1if(void 0===t||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}}function A(e,t){let n=[],r=t;for(;r!==e&&null!==r;r=r.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=t.previousSibling)e++;n.push(e)}return r!==e&&i(225),n.reverse()}try{r="0.46.0+prod.esm"}catch(e){}let D=r??'"<unknown>+source"';class I{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}function F(e,t=1e3){return e instanceof L?e.clone():e.size<t?new Map(e):(new L).init(new Map(e),void 0,e.size)}class L{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,(new L).init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return void 0!==this.get(e)}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return void 0!==t?t:this._old&&this._old.get(e)}get(e){let t=this.getWithTombstone(e);return null===t?void 0:t}shouldCompact(){return void 0!==this._nursery&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)null!==n?e.set(t,n):e.delete(t);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return null!=n||(this._size++,null===n&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,null),this._size--),t}getOrInsert(e,t){let n=this.get(e);return void 0!==n?n:(this.set(e,t),t)}getOrInsertComputed(e,t){let n=this.get(e);if(void 0!==n)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(t)for(let n of t){let t=n[0],r=e?e.get(t):void 0;null!==r&&(void 0!==r&&(n[1]=r),yield n)}if(e)for(let n of e)null===n[1]||t&&t.has(n[0])||(yield n)}forEach(e,t){for(let[n,r]of(void 0!==t&&(e=e.bind(t)),this.entries()))e(r,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function R(e,t,n,r,i,l){if(r4(e)){let o=e.getFirstChild();for(;null!==o;){let e=o.__key;o.__parent===t&&((r4(o)||ol(o)&&null!==o.__slots)&&R(o,e,n,r,i,l),n.has(e)||l.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of ol(e)&&null!==e.__slots?e.__slots.values():[]){let e=r.get(o);void 0!==e&&oo(e)&&e.__slotHost===t&&((r4(e)||ol(e)&&null!==e.__slots)&&R(e,o,n,r,i,l),n.has(o)||l.delete(o),i.push(o))}}let K=!1,B=0;function z(e){B=e.timeStamp}function W(e,t,n){let r="BR"===e.nodeName,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&void 0!==iG(e,n)}function $(e,t,n){K=!0;let r=performance.now()-B>100;try{r1(e,()=>{let i=rd()||e.read("latest",()=>{let e=rd();return null!==e?e.clone():null}),l=new Map,o=e._editorState,s=e._blockCursorElement,a=!1,f="";for(let n=0;n<t.length;n++){let d=t[n],c=d.type,h=d.target,g=function(e,t,n){for(let r=e;r&&!l3(r);r=lh(r)){let e=iG(r,t);if(void 0!==e){let t=iH(e,n);if(t)return r5(t)||!lR(r)?void 0:[r,t]}}}(h,e,o);if(!g)continue;let[p,_]=g;if("characterData"===c)r&&nq(_)&&iR(h)&&function(e,t,n){if(n1(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return iR(t)&&n.isAttached()}(i,h,_)&&function(e,t,n){let r=lk(ly(n)),i=r&&lA(r,n._rootElement),l=null,o=null;null!==i&&i.anchorNode===e&&(l=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;null!==s&&i9(t,s,l,o,!1)}(h,_,e);else if("childList"===c){a=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=iV(r),l=r.parentNode;if(!(null==l||r===s||null!==i||W(r,l,e)||e._slotsUsed&&lR(r)&&r.hasAttribute("data-lexical-slot")||l3(r))){if(u){let e=(lR(r)?r.innerText:null)||r.nodeValue;e&&(f+=e)}l.removeChild(r)}}let n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(W(r,h,e)||s===r)&&(h.appendChild(r),t++)}r!==t&&l.set(p,_)}}}if(l.size>0)for(let[t,n]of l)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],l=n.parentNode;null==l||"BR"!==n.nodeName||W(n,i,e)||l.removeChild(n)}}n.takeRecords()}null!==i&&(a&&i1(i),u&&lf(e)&&i.insertRawText(f))})}finally{K=!1}}function U(e){let t=e._observer;null!==t&&$(e,t.takeRecords(),t)}function J(e){0===B&&ly(e).addEventListener("textInput",z,!0),e._observer=new MutationObserver((t,n)=>{$(e,t,n)})}class q{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Y).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}}function j(e,t){return new q(e,t)}let H=new Set(["__proto__","constructor","prototype"]);class V{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n,r=new Map,i){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:l}=this.sharedNodeState,o=void 0!==i?i:function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(l,n,r);this.size=o}getValue(e){let t=this.knownState.get(e);if(void 0!==t)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];void 0!==t&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return G(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new V(e,t,function(e,t,n){let r;if(n)for(let[i,l]of Object.entries(n)){if(H.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(l)):(r=r||{})[i]=l}return r}(t.sharedConfigMap,r,n),r,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=G(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(H.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function Z(e){return e.__state?e.__state.sharedNodeState:iE(lq(),e.getType()).sharedNodeState}function G(e){if(e)for(let t in e)return e}function Y(e){return e}function Q(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;
1if(t!==i&&!r.isEqual(t,i))return!0}return!1}function X(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function ee(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function et(e,t){let n=e.__mode,r=e.__format,i=e.__style,l=t.__mode,o=t.__format,s=t.__style,a=e.__state,u=t.__state;return(null===n||n===l)&&(null===r||r===o)&&(null===i||i===s)&&(null===e.__state||a===u||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Q(n,e,t)||t&&Q(n,t,e)||e&&X(n,e,t)||t&&X(n,t,e))}(a,u))}function en(e,t){let n=e.mergeWithSibling(t),r=rW()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function er(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&nq(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){et(t,r)&&(r=en(t,r));break}t.remove()}for(;null!==(n=r.getNextSibling())&&nq(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){et(r,n)&&(r=en(r,n));break}n.remove()}}else r.remove()}function ei(e){return el(e.anchor),el(e.focus),e}function el(e){for(;"element"===e.type;){let t,n,r=e.getNode(),i=e.offset;if(i===r.getChildrenSize()?(t=r.getChildAtIndex(i-1),n=!0):(t=r.getChildAtIndex(i),n=!1),nq(t)){e.set(t.__key,n?t.getTextContentSize():0,"text",!0);break}if(!r4(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element",!0)}}let eo=Symbol.for("@lexical/CachedTextSize");function es(e,t){return eb.read(()=>{let n=0,r=e;for(let e=0;e<t&&null!==r;e++){let l=eC.get(r);if(void 0===l&&i(345,r),r4(l)){let o=eT.get(r);if(void 0!==o&&r4(o)&&o.__parent!==l.__parent)n+=l.getTextContentSize();else{let e=ek.get(r),t=e&&e.__lexicalTextContent;"string"!=typeof t&&i(346,l.getType()),n+=t.length}e<t-1&&!l.isInline()&&(n+=2)}else{let e=l[eo];void 0===e&&i(347,l.getType(),r),n+=e}r=l.__next}return n},{editor:ef})}function ea(e){r4(e)||void 0===e[eo]&&(e[eo]=nq(e)?e.__text.length:e.getTextContentSize())}let eu,ef,ed,ec="",eh=null,eg=null,ep=null;function e_(){return{firstTextKey:ep,format:eh,style:eg}}function em(e){null!==e.firstTextKey&&(eh=e.format,eg=e.style,ep=e.firstTextKey)}function ey(e){if(null!==ep)return;let t=e.__lexicalFirstTextKey;if(void 0===t&&i(348),null===t)return;let n=eT.get(t);nq(n)&&(eh=n.getFormat(),eg=n.getStyle(),ep=t)}let ex,ev,eS,eC,eb,eT,ek,eN,eE,ew,eO=!1,eP=!1;function eM(e,t){let n=eC.get(e),r=eT.has(e);if(null!==t){let n=eQ(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(ef._keyToDOMMap.delete(e),r4(n)){let e=on(n,eC);eA(e,0,e.length-1,null)}if(void 0!==n){for(let e of ez(n).values()){let t=e$(e);eM(e,null),null!==t&&t.remove()}ls(eE,ed,ex,n,"destroyed")}}}function eA(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];void 0!==t&&eM(t,r)}}function eD(e,t){e.setProperty("text-align",t)}function eI(e,t){let n=eu.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * var(--lexical-indent-base-value, 40px))`)}function eF(e,t){let n=e.style;0===t?eD(n,""):1===t?eD(n,"left"):2===t?eD(n,"center"):3===t?eD(n,"right"):4===t?eD(n,"justify"):5===t?eD(n,"start"):6===t&&eD(n,"end")}function eL(e,t){let n=function(e){let t=e.__dir;if(null!==t)return t;if(r7(e))return null;let n=e.getParent();return null===n||lx(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function eR(e){let t=document.createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function eK(e,t,n){t||"false"===e.contentEditable?function(e,t=lq()){let n=t.isEditable();e.contentEditable=n?"true":"false",n?e.__lexicalEditor=t:delete e.__lexicalEditor}(n,ef):n.removeAttribute("contenteditable")}function eB(e,t,n){let r=ec,i=e_();ec="";let l="",o=r5(e);for(let[r,i]of n){let n=eR(r);eK(t,o,n),t.appendChild(n),ec="";let s=e_();eJ(i,lH(e,n,ef)),em(s),eW(e,r,t,n),l+=ec}return em(i),ec=r,l}function ez(e){return ol(e)&&null!==e.__slots?e.__slots:oi}function eW(e,t,n,r){let i=ew.$getSlotTargetElement(e,t,n,ef);null!==i&&(r.parentElement!==i&&i.appendChild(r),r.style.display="")}function e$(e){let t=ek.get(e);return void 0!==t?t.parentElement:null}
1function eU(e,t,n){let r=ez(e),i=ez(t);for(let[e,t]of r)if(!i.has(e)){let e=e$(t);eM(t,null),null!==e&&e.remove()}let l=ec,o=e_(),s="",a=null,u=r5(t);for(let[e,l]of i){let i=r.get(e),o=void 0!==i?e$(i):null;ec="";let f=e_();if(null===o){o=eR(e);let r=null;for(let e of n.children)if(!e.hasAttribute("data-lexical-slot")){r=e;break}n.insertBefore(o,r),eJ(l,lH(t,o,ef))}else i===l?eV(l,o):(void 0!==i&&eM(i,o),eJ(l,lH(t,o,ef)));if(em(f),eK(n,u,o),eW(t,e,n,o),s+=ec,o.parentElement===n){let e=null===a?n.firstChild:a.nextSibling;e!==o&&n.insertBefore(o,e),a=o}}return em(o),ec=l,s}function eJ(e,t){var n,r,l;let o,s=eT.get(e);if(void 0===s&&i(60),null!==t){let n=eC.get(e);if(void 0!==n){let r=ek.get(e);if(void 0!==r){let i=oo(n)?n.__slotHost:null,l=oo(s)?s.__slotHost:null,o=n.__parent!==s.__parent||i!==l,a=null!==l&&r.parentElement!==t.element;if(o||a)return t.insertChild(r),eV(e,t.element)}}}let a=ew.$createDOM(s,ef);if(o=(n=ef)._keyToDOMMap,iZ(a,n,e),o.set(e,a),nq(s)?a.setAttribute("data-lexical-text","true"):r5(s)&&(a.setAttribute("data-lexical-decorator","true"),l={captureSelection:!0}
1,(r=a).__lexicalUnmanaged=!0,l&&void 0!==l.captureSelection&&(r.__lexicalCapturedSelection=l.captureSelection)),r4(s)){let e=s.__indent,t=s.__size;eL(a,s),0!==e&&eI(a,e);let n=ez(s),r=n.size>0?eB(s,a,n):"";if(0===t)a.__lexicalTextContent=r,a.__lexicalFirstTextKey=null,ec+=r,n.size>0&&(a.__lexicalSlotTextLength=r.length);else{let e=ec;if(eq(on(s,eT),s,0,t-1,lH(s,a,ef)),""!==r){let t=a.__lexicalTextContent||"";a.__lexicalTextContent=r+t,ec=e+r+t}n.size>0&&(a.__lexicalSlotTextLength=r.length)}let i=s.__format;0!==i&&eF(a,i),s.isInline()||ej(null,s,a)}else{let t=s.getTextContent();if(r5(s)){let t=s.decorate(ef,eu);null!==t&&eZ(e,t),a.contentEditable="false";let n=ez(s);n.size>0&&eB(s,a,n)}ec+=t}return null!==t&&t.insertChild(a),ew.$decorateDOM(s,null,a,ef),ea(s),ls(eE,ed,ex,s,"created"),a}function eq(e,t,n,r,l){let o=ec,s=e_();ec="",eh=null,eg=null,ep=null;let a=n;for(;a<=r;++a){let t=e_();eJ(e[a],l);let n=eT.get(e[a]);null!==n&&nq(n)?null===eh&&(eh=n.getFormat(),eg=n.getStyle(),ep=n.__key):r4(n)&&a<r&&!n.isInline()&&(ec+="\n\n"),em(t)}let u=ef._keyToDOMMap.get(t.__key);void 0===u&&i(349,t.__key),u.__lexicalTextContent=ec,u.__lexicalFirstTextKey=ep,ec=o+ec,em(s)}function ej(e,t,n){let r=lH(t,n,ef),i=r.element.__lexicalLastChildKind??null,l=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return iu(e)?"line-break":r5(e)&&e.isInline()?"decorator":null}return ez(e).size>0?null:"empty"}return null}(t,eT);i!==l&&r.setManagedLineBreak(l)}function eH(e,t,n){let r=t.__lexicalFirstTextKey;if(null!=r){let t=e.__key,i=r;for(;null!==i;){let e=eT.get(i);if(void 0===e){i=null;break}if(e.__parent===t)break;i=e.__parent}if(null!==i&&!n.has(i)){let e=eT.get(r);if(nq(e))return eh=e.getFormat(),void(eg=e.getStyle())}}t.__lexicalFirstTextKey=ep}function eV(e,t){let n=eC.get(e),r=eT.get(e);void 0!==n&&void 0!==r||i(61);let l=eO||eS.has(e)||ev.has(e),o=lc(ef,e);if(n===r&&!l){let e;if(r4(n)){let t=o.__lexicalTextContent;"string"!=typeof t&&i(355,n.getType()),e=t,ey(o)}else e=n.getTextContent();return ec+=e,o}if(n!==r&&l&&ls(eE,ed,ex,r,"updated"),ew.$updateDOM(r,n,o,ef)){let n=eJ(e,null);return null===t&&i(62),t.replaceChild(n,o),eM(e,null),n}if(r4(n)){r4(r)||i(334,e);let t=r.__indent;(eO||t!==n.__indent)&&eI(o,t);let s=r.__format;(eO||s!==n.__format)&&eF(o,s);let a=l&&(ez(r).size>0||ez(n).size>0)?eU(n,r,o):"";if(l){let e=ec;if(function(e,t,n){eh=null,eg=null,ep=null,function(e,t,n){let r=ec,l=e.__size,o=t.__size;ec="";let s=n.element,a=ef._keyToDOMMap.get(t.__key);void 0===a&&i(351,t.__key);let u=o-l;if(!eO&&1>=Math.abs(u)&&l>=4&&e.__first===t.__first&&(0!==u||!ef._cloneNotNeeded.has(e.__key))){let l=a.__lexicalTextContent,f=eN.get(e.__key);if(!eO&&"string"==typeof l&&void 0!==f){let o=function(e,t){let n=t.size;if(0===n||n>=e.__size)return null;let r=e.__last,i=null,l=0;for(;null!==r&&l<n;){if(!t.has(r))return null;i=r;let e=eT.get(r);if(void 0===e)return null;r=e.__prev,l++}return l!==n||null!==r&&t.has(r)?null:i}(t,f);if(null!==o){let d=f.size;if(0===u){let e=es(o,d),n=o,u=0;for(;null!==n&&u<d;){let e=eT.get(n);if(void 0===e)break;let t=e_();eV(n,s),nq(e)&&null===eh&&(eh=e.getFormat(),eg=e.getStyle(),ep=e.__key),em(t),n=e.__next,u++}let c="";for(n=o,u=0;null!==n&&u<d;){let e,t=eT.get(n);if(void 0===t)break;if(r4(t)){let r=ef._keyToDOMMap.get(n),l=r&&r.__lexicalTextContent;"string"!=typeof l&&i(352,t.getType()),e=l}else e=t.getTextContent();c+=e,u<d-1&&r4(t)&&!t.isInline()&&(c+="\n\n"),n=t.__next,u++}let h=a.__lexicalSlotTextLength||0,g=h>0?l.slice(h):l,p=g.slice(0,g.length-e)+c;return a.__lexicalTextContent=p,ec=r+p,eH(t,a,f)}if(function(e,t,n,r,l,o,s){if(1!==s&&-1!==s||o!==(1===s?2:1))return!1;let a=o-s,u=e.__last;for(let e=0;e<a-1;e++){if(null===u)return!1;let e=eC.get(u);if(void 0===e)return!1;u=e.__prev}if(null===u)return!1;let f=eT.get(l),d=eC.get(u);if(void 0===f||void 0===d||f.__prev!==d.__prev)return!1;let c=[],h=l;for(let e=0;e<o;e++){if(null===h)return!1;c.push(h);let e=eT.get(h);h=e?e.__next:null}let g=[];h=u;for(let e=0;e<a;e++){if(null===h)return!1;g.push(h);let e=eC.get(h);h=e?e.__next:null}let p=new Set(g),_=new Set(c),m=[],y=0,x=0;for(;y<a&&x<o;
1)if(c[x]===g[y])m.push({key:c[x],kind:"reconcile"}),y++,x++;else if(_.has(g[y])){if(p.has(c[x]))return!1;m.push({key:c[x],kind:"create",nextIndex:x}),x++}else m.push({key:g[y],kind:"destroy"}),y++;for(;y<a;)m.push({key:g[y++],kind:"destroy"});for(;x<o;)m.push({key:c[x],kind:"create",nextIndex:x}),x++;let v=es(u,a);for(let e of m){let n=e_();if("reconcile"===e.kind)eV(e.key,t.element);else if("destroy"===e.kind)eM(e.key,t.element);else{let n=null;for(let t=e.nextIndex+1;t<o;t++){let e=ef._keyToDOMMap.get(c[t]);if(void 0!==e){n=e;break}}eJ(e.key,t.withBefore(n??t.before))}if("destroy"!==e.kind){let t=eT.get(e.key);t&&nq(t)&&null===eh&&(eh=t.getFormat(),eg=t.getStyle(),ep=t.__key)}em(n)}let S="";for(let e=0;e<o;e++){let t,n=eT.get(c[e]);if(void 0===n)return!1;if(r4(n)){let r=ef._keyToDOMMap.get(c[e]),l=r&&r.__lexicalTextContent;"string"!=typeof l&&i(350,n.getType()),t=l}else t=n.getTextContent();S+=t,e<o-1&&r4(n)&&!n.isInline()&&(S+="\n\n")}let C=n.__lexicalSlotTextLength||0,b=C>0?r.slice(C):r;return n.__lexicalTextContent=b.slice(0,b.length-v)+S,!0}(e,n,a,l,o,d,u)){let e=a.__lexicalTextContent;return"string"!=typeof e&&i(353),ec=r+e,eH(t,a,f)}}}if(0===u){let t=e.__first,n=0;for(;null!==t;){let e=eT.get(t);if(void 0===e)break;let r=eO||eS.has(t)||ev.has(t),l=e_();if(r)eV(t,s);else{let n,r;if(r4(e)){let l=(r=ek.get(t))&&r.__lexicalTextContent;"string"!=typeof l&&i(354,e.getType()),n=l}else n=e.getTextContent();ec+=n,void 0!==r&&ey(r)}nq(e)?null===eh&&(eh=e.getFormat(),eg=e.getStyle(),ep=e.__key):r4(e)&&n<o-1&&!e.isInline()&&(ec+="\n\n"),em(l),t=e.__next,n++}return a.__lexicalTextContent=ec,a.__lexicalFirstTextKey=ep,ec=r+ec}}if(1===l&&1===o){let r=e.__first,i=t.__first;if(r===i)eV(r,s);else{let e=eQ(r),t=eJ(i,null);try{e.parentNode===s?s.replaceChild(t,e):n.insertChild(t)}catch(n){if("object"==typeof n&&null!=n)throw Error(`${n.toString()} Parent: ${s.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`);throw n}eM(r,null)}let l=eT.get(i);nq(l)&&null===eh&&(eh=l.getFormat(),eg=l.getStyle(),ep=l.__key)}else{let r=on(e,eC),a=on(t,eT);if(r.length!==l&&i(227),a.length!==o&&i(228),0===l)0!==o&&eq(a,t,0,o-1,n);else if(0===o){if(0!==l){let e=null==n.after&&null==n.before&&0===ez(t).size&&null==n.element.__lexicalLineBreak;eA(r,0,l-1,e?null:s),e&&(s.textContent="")}}else!function(e,t,n,r,i,l){let o=r-1,s=i-1,a,u,f=l.getFirstChild(),d=0,c=0;for(;d<=o&&c<=s;){let e=t[d],r=n[c],i=e_();if(e===r)f=eG(eV(r,l.element)),d++,c++;else{if(void 0===u&&(u=eY(n,c)),void 0===a)a=eY(t,d);else if(!a.has(e)){d++,em(i);continue}if(!u.has(e)){f=eG(eQ(e)),eM(e,l.element),d++,a.delete(e),em(i);continue}if(a.has(r)){let e=lc(ef,r);e!==f&&l.withBefore(f??l.before).insertChild(e),f=eG(eV(r,l.element)),d++,c++}else eJ(r,l.withBefore(f??l.before)),c++}let o=eT.get(r);
1null!==o&&nq(o)?null===eh&&(eh=o.getFormat(),eg=o.getStyle(),ep=o.__key):r4(o)&&c<=s&&!o.isInline()&&(ec+="\n\n"),em(i)}let h=d>o,g=c>s;if(h&&!g){let t=n[s+1],r=void 0===t?null:ef.getElementByKey(t);eq(n,e,c,s,l.withBefore(r??l.before))}else g&&!h&&eA(t,d,o,l.element)}(t,r,a,l,o,n)}a.__lexicalTextContent=ec,a.__lexicalFirstTextKey=ep,ec=r+ec}(e,t,lH(t,n,ef)),lx(t)||(null==eh||eh===t.__textFormat||eP||t.setTextFormat(eh),null==eg||eg===t.__textStyle||eP||t.setTextStyle(eg))}(n,r,o),r7(r)||r.isInline()||ej(0,r,o),""!==a){let t=o.__lexicalTextContent||"";o.__lexicalTextContent=a+t,ec=e+a+t,o.__lexicalSlotTextLength=a.length}else(ez(r).size>0||ez(n).size>0)&&(o.__lexicalSlotTextLength=0)}else{let e=o.__lexicalTextContent;"string"!=typeof e&&i(356,n.getType()),ec+=e,ey(o)}if((eO||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(eL(o,r),r7(r)&&!eO))for(let e of r.getChildren())r4(e)&&eL(lc(ef,e.getKey()),e)}else{let t=r.getTextContent();if(r5(r)){let t=r.decorate(ef,eu);null!==t&&eZ(e,t),l&&(ez(r).size>0||ez(n).size>0)&&eU(n,r,o)}ec+=t}if(!eP&&r7(r)){let e=r.getLatest();if(e.__cachedText!==ec){let t=e.getWritable();t.__cachedText=ec,r=t}}return ew.$decorateDOM(r,n,o,ef),ea(r),o}function eZ(e,t){let n=ef._pendingDecorators,r=ef._decorators;if(null===n){if(r[e]===t)return;n=iQ(ef)}n[e]=t}function eG(e){let t=e.nextSibling;return null!==t&&t===ef._blockCursorElement&&(t=t.nextSibling),t}function eY(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function eQ(e){let t=ek.get(e);return void 0===t&&i(75,e),t}function eX(e){return{type:e}}let e0=eX("SELECTION_CHANGE_COMMAND"),e1=eX("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),e2=eX("CLICK_COMMAND"),e3=eX("BEFORE_INPUT_COMMAND"),e4=eX("INPUT_COMMAND"),e6=eX("COMPOSITION_START_COMMAND"),e8=eX("COMPOSITION_END_COMMAND"),e5=eX("DELETE_CHARACTER_COMMAND"),e9=eX("INSERT_LINE_BREAK_COMMAND"),e7=eX("INSERT_PARAGRAPH_COMMAND"),te=eX("CONTROLLED_TEXT_INSERTION_COMMAND"),tt=eX("PASTE_COMMAND"),tn=eX("REMOVE_TEXT_COMMAND"),tr=eX("DELETE_WORD_COMMAND"),ti=eX("DELETE_LINE_COMMAND"),tl=eX("FORMAT_TEXT_COMMAND"),to=eX("UNDO_COMMAND"),ts=eX("REDO_COMMAND"),ta=eX("KEYDOWN_COMMAND"),tu=eX("KEY_ARROW_RIGHT_COMMAND"),tf=eX("MOVE_TO_END"),td=eX("KEY_ARROW_LEFT_COMMAND"),tc=eX("MOVE_TO_START"),th=eX("KEY_ARROW_UP_COMMAND"),tg=eX("KEY_ARROW_DOWN_COMMAND"),tp=eX("KEY_ENTER_COMMAND"),t_=eX("KEY_SPACE_COMMAND"),tm=eX("KEY_BACKSPACE_COMMAND"),ty=eX("KEY_ESCAPE_COMMAND"),tx=eX("KEY_DELETE_COMMAND"),tv=eX("KEY_TAB_COMMAND"),tS=eX("INSERT_TAB_COMMAND"),tC=eX("INDENT_CONTENT_COMMAND"),tb=eX("OUTDENT_CONTENT_COMMAND"),tT=eX("DROP_COMMAND"),tk=eX("FORMAT_ELEMENT_COMMAND"),tN=eX("DRAGSTART_COMMAND"),tE=eX("DRAGOVER_COMMAND"),tw=eX("DRAGEND_COMMAND"),tO=eX("COPY_COMMAND"),tP=eX("CUT_COMMAND"),tM=eX("SELECT_ALL_COMMAND"),tA=eX("CLEAR_EDITOR_COMMAND"),tD=eX("CLEAR_HISTORY_COMMAND"),tI=eX("CAN_REDO_COMMAND"),tF=eX("CAN_UNDO_COMMAND"),tL=eX("FOCUS_COMMAND"),tR=eX("BLUR_COMMAND"),tK=eX("KEY_MODIFIER_COMMAND"),tB=Object.freeze({}),tz=[["keydown",function(e,t){tW=e.timeStamp,t$=e.key,"Backspace"!==e.key&&ne(),t.isComposing()||ld(t,ta,e)}],["pointerdown",function(e,t){let n=lF(e),r=e.pointerType;lK(n)&&"touch"!==r&&"pen"!==r&&0===e.button&&r1(t,()=>{l4(n,t)||(tG=!0)})}],["compositionstart",function(e,t){ld(t,e6,e)}],["compositionend",function(e,t){u?tQ=!0:!d&&(h||_)?(tX=!0,t0=e.data):ld(t,e8,e)}],["input",function(e,t){e.stopPropagation(),ne(),r1(t,()=>{nn(e,t)||t.dispatchCommand(e4,e)},{event:e}),tJ=null}],["click",function(e,t){r1(t,()=>{let n=rd(),r=lk(ly(t)),i=rc();if(r){if(n1(n)){let e=n.anchor,t=e.getNode();"element"===e.type&&0===e.offset&&n.isCollapsed()&&!r7(t)&&1===i0().getChildrenSize()&&t.getTopLevelElementOrThrow().isEmpty()&&null!==i&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if("touch"===e.pointerType||"pen"===e.pointerType){let n=lA(r,t._rootElement).anchorNode;(lR(n)||iR(n))&&i1(rf(i,r,t,e))}}ld(t,e2,e)})}],["cut",tB],["copy",tB],["dragstart",tB],["dragover",tB],["dragend",tB],["paste",tB],["focus",tB],["blur",tB],["drop",tB]];f&&tz.push(["beforeinput",(e,t)=>{let n;"deleteCompositionText"===(n=e.inputType)||u&&lf(t)||"insertCompositionText"!==n&&r1(t,()=>{nn(e,t)||ld(t,e3,e)},{event:e})}]);let tW=0,t$=null,tU=0,tJ=null,tq=!1,tj=null,tH=new WeakMap,tV=new WeakMap,tZ=!1,tG=!1,tY=!1,tQ=!1,tX=!1,t0="",t1=null,t2=[0,"",0,"root",0];function t3(e,t,n,r,i,l){let o,s=e.anchor,a=e.focus,u=s.getNode(),d=rW();if(void 0!==l)o=l;else{let e=lk(ly(d));o=null!==e?lA(e,d._rootElement):null}let c=null!==o?o.anchorNode:null,h=s.key,g=d.getElementByKey(h),p=n.length;return h!==a.key||!nq(u)||(!i&&(!f||tU<r+50)||u.isDirty()&&p<2||i3(n))&&s.offset!==a.offset&&!u.isComposing()||iL(u)||u.isDirty()&&p>1||(i||!f)&&null!==g&&!u.isComposing()&&c!==lV(u,g,d)||null!==o&&null!==t&&(!t.collapsed||t.startContainer!==o.anchorNode||t.startOffset!==o.anchorOffset)||!u.isComposing()&&(u.getFormat()!==e.format||u.getStyle()!==e.style)||function(e,t){let n;if(t.isSegmented())return!0;
1if(!e.isCollapsed())return!1;let r=e.anchor.offset,i=t.getParentOrThrow(),l=iF(t);return 0===r?!t.canInsertTextBefore()||!i.canInsertTextBefore()&&!t.isComposing()||l||(nq(n=t.getPreviousSibling())||r4(n)&&n.isInline())&&!n.canInsertTextAfter():r===t.getTextContentSize()&&(!t.canInsertTextAfter()||!i.canInsertTextAfter()&&!t.isComposing()||l)}(e,u)}function t4(e,t){return iR(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function t6(e,t,n){let{anchorNode:r,anchorOffset:l,focusNode:o,focusOffset:s}=lA(e,t._rootElement);tZ&&(tZ=!1,t4(r,l)&&t4(o,s)&&!t1)||r1(t,()=>{if(!n)return void i1(null);if(!iM(t,r,o))return;let a=rd();if(t1&&n1(a)&&a.isCollapsed()){let e=a.anchor,t=t1.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&i1(a=t1.clone())}if(t1=null,n1(a)){let n=a.anchor,u=n.getNode();if(a.isCollapsed()){"Range"===e.type&&r===o&&(a.dirty=!0);let l=ly(t).event,s=l?l.timeStamp:performance.now(),[f,d,c,h,g]=t2,p=i0(),_=!1===t.isComposing()&&""===p.getTextContent();if(s<g+200&&n.offset===c&&n.key===h)t8(a,f,d);else if("text"===n.type)nq(u)||i(141),t5(a,u);else if("element"===n.type&&!_){r4(u)||i(259);let e=n.getNode();e.isEmpty()?t8(a,e.getTextFormat(),e.getTextStyle()):t8(a,a.format,"")}}else{let e=n.key,t=a.focus.key,r=a.getNodes(),i=r.length,o=a.isBackward(),u=o?s:l,f=o?l:s,d=o?t:e,c=o?e:t,h=2047,g=!1;for(let e=0;e<i;e++){let t=r[e],n=t.getTextContentSize();if(nq(t)&&0!==n&&(0!==e||t.__key!==d||u!==n)&&(e!==i-1||t.__key!==c||0!==f)&&(g=!0,0==(h&=t.getFormat())))break}a.format=g?h:0}}ld(t,e0,void 0)})}function t8(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function t5(e,t){t8(e,t.getFormat(),t.getStyle())}function t9(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function t7(e){if(null==e||e.length<=1||null==t$)return;let t=1===t$.length?t$:"Enter"===t$?"\n":"Tab"===t$?" ":null;if(!t)return;let n=rd();if(!n1(n)||!n.isCollapsed())return;let r=n.anchor.getNode();if(!nq(r))return;let{offset:i}=n.anchor;if(r.getTextContentSize()===i){let e=r.getNextSibling();if("\n"===t){if(iu(e))e.selectEnd();else if(!e){let e=ot(r,ro),t=e&&e.getNextSibling();r4(t)&&t.selectStart()}}else" "===t?nZ(e)&&e.selectEnd():nq(e)&&e.getTextContent()[0]===t&&e.select(1,1)}else r.getTextContent()[i]===t&&r.select(i+1,i+1)}function ne(){tq=!1,null!==tj&&(clearTimeout(tj),tj=null)}function nt(){ne(),tq=!0,tj=setTimeout(ne,0)}function nn(e,t){let n=lF(e);if(lR(n)&&l4(n,t))return!0;let r=t.getRootElement();if(null===r)return!1;let i=lI(r.ownerDocument);return null!==i&&r.contains(i)&&l4(i,t)}function nr(e){var t;let n=e.inputType,r=t9(e),l=rW(),o=rd();if("insertText"===n&&e.data&&tq){if(ne(),e.preventDefault(),n1(o)&&!o.isCollapsed()){let e=o.isBackward()?o.anchor:o.focus;o.anchor.set(e.key,e.offset,e.type),o.focus.set(e.key,e.offset,e.type)}return!0}if("deleteContentBackward"===n){if(null===o){let e=rc();if(!n1(e))return!0;i1(e.clone())}if(n1(o)){let n=o.anchor.key===o.focus.key;if(t=e.timeStamp,"MediaLast"===t$&&t<tW+30&&l.isComposing()&&n){if(iq(null),tW=0,setTimeout(()=>{r1(l,()=>{iq(null)})},30),n1(o)){let e=o.anchor.getNode();e.markDirty(),nq(e)||i(142),t5(o,e)}}else{if(iq(null),d&&null!==r&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();let t=o.anchor.getNode(),i=t.getTextContent(),s=t.canInsertTextAfter(),a=0===o.anchor.offset&&o.focus.offset===i.length,u=p&&n&&!a&&s;if(u&&o.isCollapsed()&&(u=!r5(lu(o.anchor,!0))),!u){ld(l,e5,!0);let e=rd();p&&n1(e)&&e.isCollapsed()&&(t1=e,setTimeout(()=>t1=null))}}return!0}}if(!n1(o))return!0;let s=e.data;null!==tJ&&i5(!1,l,tJ),o.dirty&&null===tJ||!o.isCollapsed()||r7(o.anchor.getNode())||null===r||o.applyDOMRange(r),tJ=null;let a=o.anchor,u=o.focus,f=a.getNode(),c=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===s)e.preventDefault(),ld(l,e9,!1);else if("\n\n"===s)e.preventDefault(),ld(l,e7,void 0);else if(null==s&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=s&&t3(o,r,s,e.timeStamp,!0)?(e.preventDefault(),ld(l,te,s),t7(s)):tJ=s;return tU=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":ld(l,te,e),t7((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":iq(null),ld(l,te,e);break;case"insertLineBreak":iq(null),ld(l,e9,!1);break;case"insertParagraph":iq(null),tY&&!d?(tY=!1,ld(l,e9,!1)):ld(l,e7,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":ld(l,tt,e);break;
1case"deleteByComposition":(f!==c||r4(f)||r4(c)||!iF(f)||!iF(c))&&ld(l,tn,e);break;case"deleteByDrag":lp(nk),ld(l,tn,e);break;case"deleteByCut":ld(l,tn,e);break;case"deleteContent":ld(l,e5,!1);break;case"deleteWordBackward":ld(l,tr,!0);break;case"deleteWordForward":ld(l,tr,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":ld(l,ti,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":ld(l,ti,!1);break;case"formatStrikeThrough":ld(l,tl,"strikethrough");break;case"formatBold":ld(l,tl,"bold");break;case"formatItalic":ld(l,tl,"italic");break;case"formatUnderline":ld(l,tl,"underline");break;case"historyUndo":ld(l,to,void 0);break;case"historyRedo":ld(l,ts,void 0)}return!0}function ni(e){let t=rW(),n=rd(),r=e.data,i=t9(e),l=!1;if(null!=r&&n1(n)){let o=lk(ly(t)),s=null!==o?lA(o,t._rootElement):null;if(t3(n,i,r,e.timeStamp,!1,s)){l=!0,tQ&&(ns(t,r),tQ=!1);let i=n.anchor.getNode();if(null===o||null===s)return!0;let a=n.isBackward(),d=a?n.anchor.offset:n.focus.offset,c=a?n.focus.offset:n.anchor.offset;f&&!n.isCollapsed()&&nq(i)&&null!==s.anchorNode&&i.getTextContent().slice(0,d)+r+i.getTextContent().slice(d+c)===i8(s.anchorNode)||ld(t,te,r);let h=r.length;u&&h>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=h,n._cachedNodes=null,n._cachedIsBackward=null),p&&t.isComposing()&&(tW=0,iq(null))}}return!l&&(i5(!1,t,null!==r?r:void 0),tQ&&(ns(t,r||void 0),lp(nE),tQ=!1)),rR(),U(rW()),!0}function nl(e){let t=rW(),n=rd();if(n1(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();iq(r.key),lp(nN),(e.timeStamp<tW+30||"element"===r.type||!n.isCollapsed()||i.getFormat()!==n.format||nq(i)&&i.getStyle()!==n.style)&&ld(t,te,y)}return!0}function no(e){return ns(rW(),e.data),lp(nE),!0}function ns(e,t){let n=e._compositionKey;if(iq(null),null!==n&&null!=t){if(""===t){let t=iH(n),r=e.getElementByKey(n),i=null!==r&&nq(t)?lV(t,r,e):null;if(null!==i&&null!==i.nodeValue&&nq(t)){let n=lk(ly(e)),r=n&&lA(n,e._rootElement),l=null,o=null;null!==r&&r.anchorNode===i&&(l=r.anchorOffset,o=r.focusOffset),i9(t,i.nodeValue,l,o,!0)}return}if("\n"===t[t.length-1]){let t=rd();if(n1(t)||n3(t)){if(n1(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return void ld(e,tp,null)}}}i5(!0,e,t)}function na(e){let t=rW();if(null==e.key)return!0;if(tX){if(li(e))return r1(t,()=>{ns(t,t0)}),tX=!1,t0="",!0;tX=!1,t0=""}if(lt(e,"ArrowRight",{shiftKey:"any"}))ld(t,tu,e);else if(lt(e,"ArrowRight",{...ln,shiftKey:"any"}))ld(t,tf,e);else if(lt(e,"ArrowLeft",{shiftKey:"any"}))ld(t,td,e);else if(lt(e,"ArrowLeft",{...ln,shiftKey:"any"}))ld(t,tc,e);else if(lt(e,"ArrowUp",{altKey:"any",shiftKey:"any"}))ld(t,th,e);else if(lt(e,"ArrowDown",{altKey:"any",shiftKey:"any"}))ld(t,tg,e);else if(lt(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0}))tY=!0,ld(t,tp,e);else if(" "===e.key)ld(t,t_,e);else if(a&<(e,"o",{ctrlKey:!0}))e.preventDefault(),tY=!0,ld(t,e9,!0);else if(lt(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"}))tY=!1,ld(t,tp,e);else if(lt(e,"Backspace",{shiftKey:"any"})||a&<(e,"h",{ctrlKey:!0}))li(e)?ld(t,tm,e)&&nt():(e.preventDefault(),ld(t,e5,!0));else if("Escape"===e.key)ld(t,ty,e);else if(lt(e,"Delete",{})||a&<(e,"d",{ctrlKey:!0}))"Delete"!==e.key?(e.preventDefault(),ld(t,e5,!1)):ld(t,tx,e);else if(lt(e,"Backspace",lr))e.preventDefault(),ld(t,tr,!0);else if(lt(e,"Delete",lr))e.preventDefault(),ld(t,tr,!1);else if(a&<(e,"Backspace",{metaKey:!0}))e.preventDefault(),ld(t,ti,!0);else if(a&&(lt(e,"Delete",{metaKey:!0})||lt(e,"k",{ctrlKey:!0})))e.preventDefault(),ld(t,ti,!1);else if(lt(e,"b",ln))e.preventDefault(),ld(t,tl,"bold");else if(lt(e,"u",ln))e.preventDefault(),ld(t,tl,"underline");else if(lt(e,"i",ln))e.preventDefault(),ld(t,tl,"italic");else if(lt(e,"Tab",{shiftKey:"any"}))ld(t,tv,e);else if(lt(e,"z",ln))e.preventDefault(),ld(t,to,void 0);else if(a?lt(e,"z",{metaKey:!0,shiftKey:!0}):lt(e,"y",{ctrlKey:!0})||lt(e,"z",{ctrlKey:!0,shiftKey:!0}))e.preventDefault(),ld(t,ts,void 0);else{let n=t._editorState._selection;lt(e,"a",ln)?(e.preventDefault(),ld(t,tM,e)&&nt()):null===n||n1(n)||(lt(e,"c",ln)?(e.preventDefault(),ld(t,tO,e)):lt(e,"x",ln)&&(e.preventDefault(),ld(t,tP,e)))}return(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)&&t.dispatchCommand(tK,e),!0}function nu(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let nf=new Map;
1function nd(e){let t,n=(t=lm(e.target))?t.getSelection():null;if(null===n)return;let r=lg(e.target),i=null,l=null;if(null!==r){let e=tV.get(r);if(void 0!==e){let t=e.editors,r=e.hasShadowEditor;if(void 0===r){for(let e of(r=!1,t))if(null!==e._rootElement&&lN(e._rootElement.getRootNode())){r=!0;break}e.hasShadowEditor=r}if(r){let e=null,r=null;for(let o of t){let t=o._rootElement;if(null===t)continue;let s=lA(n,t).anchorNode;if(null!==s&&iD(s)===o){if(lN(t.getRootNode())){i=o,l=s;break}null===e&&(e=o,r=s)}}null===i&&null!==e&&(i=e,l=r)}else{let e=n.anchorNode;null===e||lR(e)&&null!==e.shadowRoot||null!==(i=iD(e))&&(l=e)}}if(null===i){let e=lI(r);i=null!==e?iD(e):null}}if(null===i)return;tG&&(tG=!1,r1(i,()=>{let t=rc(),r=l??lA(n,i._rootElement).anchorNode;(lR(r)||iR(r))&&i1(rf(t,n,i,e))}));let o=i4(i),s=o[o.length-1],a=s._key,u=nf.get(a),f=u||s;f!==i&&t6(n,f,!1),t6(n,i,!0),i!==s?nf.set(a,i):u&&nf.delete(a)}function nc(e){e._lexicalHandled=!0}function nh(e){return!0===e._lexicalHandled}let ng=()=>{};function np(e,t,n){rR();let r=e.__key,l=e.getParent();if(null===l)return void(null!==os(e)&&i(367,r,String(os(e))));let o=function(e){let t=rd();if(!n1(t)||!r4(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),l=r.getNode();return l_(i,e)&&n.set(e.__key,0,"element"),l_(l,e)&&r.set(e.__key,0,"element"),t}(e),s=!1;if(n1(o)&&t){let t=o.anchor,n=o.focus;t.key===r&&(rp(t,e,l,e.getPreviousSibling(),e.getNextSibling()),s=!0),n.key===r&&(rp(n,e,l,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else n3(o)&&t&&e.isSelected()&&e.selectPrevious();if(n1(o)&&t&&!s){let t=e.getIndexWithinParent();iU(e),rh(o,l,t,-1)}else iU(e);n||lx(l)||l.canBeEmpty()||!l.isEmpty()||np(l,t),t&&o&&r7(l)&&l.isEmpty()&&l.selectEnd()}function n_(e){return e}let nm=Symbol.for("ephemeral");function ny(e){return e[nm]||!1}let nx={configurable:!0,enumerable:!1,value:void 0,writable:!0};class nv{__type;__key;__parent;__prev;__next;__state;[eo];static getType(){let{ownNodeType:e}=l5(this);return void 0===e&&i(64,this.name),e}static clone(e){i(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||or(this.constructor);return Object.assign(t,{extends:n}),"string"==typeof e&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",nx),Object.defineProperty(this,eo,nx),i$(this,e)}getType(){return this.__type}isInline(){i(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=iH(e);if(null===t)break;e=null!==t.__parent?t.__parent:os(t)}return!1}isSelected(e){let t=e||rd();if(null==t)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(nq(this))return n;if(n1(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(r5(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(null===e)return -1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return -1}getParent(){let e=this.getLatest().__parent;return null===e?null:iH(e)}getParentOrThrow(){let e=this.getParent();return null===e&&i(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(lx(t)||null!==os(e))return r4(e)||e===this&&r5(e)||i(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&i(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:iH(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:iH(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=r4(this)?this:this.getParent(),n=r4(e)?e:e.getParent(),r=t&&n?oZ(t,n):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=oZ(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===oH(t):("same"!==t.type&&"ancestor"!==t.type&&i(279),!1)))}isParentOf(e){let t=oZ(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,l=this;for(;null!==l;){let o=l.__key;
1if(r.has(o)||(r.add(o),n.push(l)),l===e)break;let s=r4(l)?t?l.getFirstChild():l.getLastChild():null;if(null!==s){l=s;continue}let a=t?l.getNextSibling():l.getPreviousSibling();if(null!==a){l=a;continue}let u=l.getParentOrThrow();if(r.has(u.__key)||n.push(u),u===e)break;let f=null,d=u;do{if(null===d&&i(68),f=t?d.getNextSibling():d.getPreviousSibling(),null===(d=d.getParent()))break;null!==f||r.has(d.__key)||n.push(d)}while(null===f)l=f}return t||n.reverse(),n}isDirty(){let e=rW()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(ny(this))return this;let e=iH(this.__key);return null===e&&i(113),e}getWritable(){if(ny(this))return this;rR();let e=rB(),t=rW(),n=e._nodeMap,r=this.__key,i=this.getLatest(),l=t._cloneNotNeeded,o=rd();if(null!==o&&o.setCachedNodes(null),l.has(r))return iJ(i),i;let s=lQ(i);return l.add(r),iJ(s),n.set(r,s),s}getTextContent(){return oy(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){i(70)}updateDOM(e,t,n){i(71)}getDOMSlot(e){return new O(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){i(18,this.name)}updateFromJSON(e){return function(e,t){let n,r,i=e.getWritable(),l=t.$,o=l;for(let e of Z(i).flatKeys)e in t&&(void 0!==o&&o!==l||(o={...l}),o[e]=t[e]);return(i.__state||o)&&(r=(n=e.getWritable()).__state?n.__state.getWritable(n):new V(n,Z(n)),n.__state=r,r).updateFromJSON(o),i}(this,e)}static transform(){return null}remove(e){np(this,!0,e)}replace(e,t){rR();let n=rd();null!==n&&(n=n.clone()),lC(this,e);let r=this.getLatest(),l=this.__key,o=e.__key,s=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size,f=s.getParent(),d=null!==f?s.getIndexWithinParent():-1;iU(s),null!==f&&n1(n)&&rh(n,f,d,-1);let c=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,p=r.__next,_=r.__parent;(np(r,!1,!0),null===c)?a.__first=o:c.getWritable().__next=o,(s.__prev=g,null===h)?a.__last=o:h.getWritable().__prev=o,s.__next=p,s.__parent=_,a.__size=u;let m=0;t&&(r4(this)&&r4(s)||i(139),m=s.getChildrenSize(),s.splice(m,0,this.getChildren()));let y=od(this);if(y.length>0)for(let e of(ol(this)&&ol(s)||i(368,this.__key,s.__key),y)){let t=oc(this,e);null!==t&&(function(e,t){let n=e.getWritable();if(null===n.__slots)return;let r=n.__slots.get(t);void 0!==r&&(oS(r),op(n).delete(t))}(this,e),ov(s,e,t))}if(n1(n)){i1(n);let e=n.anchor,r=n.focus;e.key===l&&(t&&"element"===e.type?e.set(s.__key,m+e.offset,"element"):nX(e,s)),r.key===l&&(t&&"element"===r.type?r.set(s.__key,m+r.offset,"element"):nX(r,s))}return ij()===l&&iq(o),s}insertAfter(e,t=!0){rR(),lC(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.getParent(),l=rd(),o=!1,s=!1;if(null!==i){let n=e.getIndexWithinParent();if(n1(l)){let e=i.__key,t=l.anchor,r=l.focus;o="element"===t.type&&t.key===e&&t.offset===n+1,s="element"===r.type&&r.key===e&&r.offset===n+1}iU(r),t&&n1(l)&&rh(l,i,n,-1)}else iU(r);let a=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),f=r.__key,d=n.__next;if(null===a?u.__last=f:a.getWritable().__prev=f,u.__size++,n.__next=f,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&n1(l)){let e=this.getIndexWithinParent();rh(l,u,e+1);let t=u.__key;o&&l.anchor.set(t,e+2,"element"),s&&l.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){rR(),lC(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.__key,l=rd(),o=r.getParent(),s=null!==o?r.getIndexWithinParent():-1;iU(r),null!==o&&t&&n1(l)&&rh(l,o,s,-1);let a=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),f=n.__prev,d=this.getIndexWithinParent();return null===a?u.__first=i:a.getWritable().__next=i,u.__size++,n.__prev=i,r.__prev=f,r.__next=n.__key,r.__parent=n.__parent,t&&n1(l)&&rh(l,this.getParentOrThrow(),d),e}isParentRequired(){return!1}createParentElementNode(){return i_()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){rR();let n=oa(this);if(null!==n)return n.selectPrevious(e,t);let r=this.getPreviousSibling(),i=this.getParentOrThrow();if(null===r)return i.select(0,0);if(r4(r))return r.select();if(!nq(r)){let e=r.getIndexWithinParent()+1;return i.select(e,e)}return r.select(e,t)}selectNext(e,t){rR();let n=oa(this);if(null!==n)return n.selectNext(e,t);let r=this.getNextSibling(),i=this.getParentOrThrow();if(null===r)return i.select();if(r4(r))return r.select(0,0);if(!nq(r)){let e=r.getIndexWithinParent();return i.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}function nS(e){return e instanceof nv}let nC="history-merge",nb="skip-scroll-into-view",nT="skip-dom-selection",nk="skip-selection-focus",nN="composition-start",nE="composition-end";function nw(e){let t={};if(!e)return t;let n="",r="",i=null,l=!1,o=!1,s=!1,a=0,u=e.length,f=-1;for(let d=0;d<u;d++){let u=e[d];if(l)"*"===u&&"/"===e[d+1]&&(l=!1,d++);else if(o)-1===f&&(f=d),o=!1;else if(null===i)if("/"!==u||"*"!==e[d+1])if('"'!==u&&"'"!==u)if("("!==u)if(")"!==u)if(s||":"
1!==u||0!==a){if(";"===u&&0===a){-1!==f&&(s?r+=e.slice(f,d):n+=e.slice(f,d),f=-1);let i=n.trim(),l=r.trim();""!==i&&""!==l&&(t[i]=l),n="",r="",s=!1;continue}-1===f&&(f=d)}else -1!==f&&(n+=e.slice(f,d),f=-1),s=!0;else -1===f&&(f=d),a=Math.max(0,a-1);else -1===f&&(f=d),a++;else -1===f&&(f=d),i=u;else -1!==f&&(s?r+=e.slice(f,d):n+=e.slice(f,d),f=-1),l=!0,d++;else -1===f&&(f=d),"\\"===u?o=!0:u===i&&(i=null)}-1!==f&&(s?r+=e.slice(f,u):n+=e.slice(f,u));let d=n.trim(),c=r.trim();return""!==d&&""!==c&&(t[d]=c),t}function nO(e,t,n=""){if(t===n)return;let r=nw(n),i=nw(t);for(let t in i)delete r[t],function(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&"!important"===r.slice(i).toLowerCase()?e.setProperty(t,r.slice(0,i).trim(),"important"):e.setProperty(t,n,"")}(e,t,i[t]);for(let t in r)e.removeProperty(t)}function nP(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function nM(e,t){return 1&t?"strong":2&t?"em":"span"}function nA(e,t,n,r,i){let l=r.classList,o=lo(i,"base");void 0!==o&&l.add(...o);let s=!1,a=8&t&&4&t;for(let e in void 0!==(o=lo(i,"underlineStrikethrough"))&&(8&n&&4&n?(s=!0,a||l.add(...o)):a&&l.remove(...o)),S){let r=S[e];if(void 0!==(o=lo(i,e)))if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&l.remove(...o);continue}(0==(t&r)||a&&"underline"===e||"strikethrough"===e)&&l.add(...o)}else t&r&&l.remove(...o)}}function nD(e,t,n){let r=n.isComposing(),i=e+(r?m:""),l=lq(),o=lj(l).$getDOMSlot(n,t,l),s=o.getFirstChild();if(null===s||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(document.createTextNode(i));let a=s.nodeValue;if(a!==i)if(r||u){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,l=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;l+i<n&&l+i<r&&e[n-l-1]===t[r-l-1];)l++;return[i,n-i-l,t.slice(i,r-l)]}(a,i);0!==t&&s.deleteData(e,t),s.insertData(e,n)}else s.nodeValue=i}function nI(e,t,n,r,i,l){nD(i,e,t);let o=l.theme.text;void 0!==o&&nA(0,0,r,e,o)}function nF(e,t){let n=document.createElement(t);return n.appendChild(e),n}class nL extends nv{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new nL(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}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return N[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===ij()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=S[e];return 0!=(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return iz(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=nP(0,n),i=nM(0,n),l=null===r?i:r,o=document.createElement(l),s=o;this.hasFormat("code")&&o.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(i),o.appendChild(s)),nI(s,this,0,n,this.__text,e);let a=this.__style;return""!==a&&nO(o.style,a),o}updateDOM(e,t,n){let r=this.__text,l=e.__format,o=this.__format,s=nP(0,l),a=nP(0,o),u=nM(0,l),f=nM(0,o);if((null===s?u:s)!==(null===a?f:a))return!0;if(s===a&&u!==f){let e=t.firstChild;null==e&&i(48);let l=document.createElement(f);return nI(l,this,0,o,r,n),t.replaceChild(l,e),!1}let d=t;null!==a&&null!==s&&null==(d=t.firstChild)&&i(49),nD(r,d,this);let c=n.theme.text;void 0!==c&&l!==o&&nA(0,l,o,d,c);let h=e.__style,g=this.__style;return h!==g&&nO(t.style,g,h),!1}static importDOM(){return{"#text":()=>({conversion:nz,priority:0}),b:()=>({conversion:nK,priority:0}),code:()=>({conversion:nU,priority:0}),em:()=>({conversion:nU,priority:0}),i:()=>({conversion:nU,priority:0}),mark:()=>({conversion:nU,priority:0}),s:()=>({conversion:nU,priority:0}),span:()=>({conversion:nR,priority:0}),strong:()=>({conversion:nU,priority:0}),sub:()=>({conversion:nU,priority:0}),sup:()=>({conversion:nU,priority:0}),u:()=>({conversion:nU,priority:0})}}static importJSON(e){return nJ().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
1exportDOM(e){let{element:t}=super.exportDOM(e);return lR(t)||i(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=nF(t,"b")),this.hasFormat("italic")&&(t=nF(t,"i")),this.hasFormat("strikethrough")&&(t=nF(t,"s")),this.hasFormat("underline")&&(t=nF(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?S[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?C[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=iz(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=k[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){rR();let n=e,r=t,i=rd(),l=this.getTextContent(),o=this.__key;if("string"==typeof l){let e=l.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!n1(i))return rs(o,n,o,r,"text","text");{let e=ij();e!==i.anchor.key&&e!==i.focus.key||iq(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),l=i.__text,o=n.length,s=e;s<0&&(s=o+s)<0&&(s=0);let a=rd();if(r&&n1(a)){let t=e+o;a.setTextNodeRange(i,t,i,t)}return i.__text=l.slice(0,s)+n+l.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){let t;rR();let n=this.getLatest(),r=n.getTextContent();if(""===r)return[];let i=n.__key,l=ij(),o=r.length;e.sort((e,t)=>e-t),e.push(o);let s=[],a=e.length;for(let t=0,n=0;t<o&&n<=a;n++){let i=e[n];i>t&&(s.push(r.slice(t,i)),t=i)}let u=s.length;if(1===u)return[n];let f=s[0],d=n.getParent(),c=n.getFormat(),h=n.getStyle(),g=n.__detail,p=!1,_=null,m=null,y=rd();if(n1(y)){let[e,t]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===e.type&&e.key===i&&(_=e),"text"===t.type&&t.key===i&&(m=t)}n.isSegmented()?((t=nJ(f)).__format=c,t.__style=h,t.__detail=g,t.__state=ee(n,t),p=!0):t=n.setTextContent(f);let x=[t];for(let e=1;e<u;e++){let t=nJ(s[e]);t.__format=c,t.__style=h,t.__detail=g,t.__state=ee(n,t);let r=t.__key;l===i&&iq(r),x.push(t)}let v=_?_.offset:null,S=m?m.offset:null,C=0;for(let e of x){if(!_&&!m)break;let t=C+e.getTextContentSize();if(null!==_&&null!==v&&v<=t&&v>=C&&(_.set(e.getKey(),v-C,"text"),v<t&&(_=null)),null!==m&&null!==S&&S<=t&&S>=C){m.set(e.getKey(),S-C,"text");break}C=t}if(null!==d){let e,t;e=this.getPreviousSibling(),t=this.getNextSibling(),null!==e&&iJ(e),null!==t&&iJ(t);let n=d.getWritable(),r=this.getIndexWithinParent();p?(n.splice(r,0,x),this.remove()):n.splice(r,1,x),n1(y)&&rh(y,d,r,u-1)}return x}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||i(50);let n=this.__key,r=e.__key,l=this.__text,o=l.length;ij()===r&&iq(n);let s=rd();if(n1(s)){let i=s.anchor,l=s.focus;null!==i&&i.key===r&&r_(i,t,n,e,o),null!==l&&l.key===r&&r_(l,t,n,e,o)}let a=e.__text,u=t?a+l:l+a;this.setTextContent(u);let f=this.getWritable();return e.remove(),f}isTextEntity(){return!1}}function nR(e){return{forChild:nj(e.style),node:null}}function nK(e){let t="normal"===e.style.fontWeight;return{forChild:nj(e.style,t?void 0:"bold"),node:null}}let nB=new WeakMap;function nz(e){null===e.parentElement&&i(129);let t=e.textContent||"";if(null!==function(e){let t,n=e.parentNode,r=[e];for(;null!==n&&void 0===(t=nB.get(n))&&!function(e){if(!lR(e))return!1;if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}(n);)r.push(n),n=n.parentNode;let i=void 0===t?n:t;for(let e=0;e<r.length;e++)nB.set(r[e],i);return i}(e))return{node:rC(t)};if(""===(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===t[0]){let n=e,r=!0;for(;null!==n&&null!==(n=nW(n,!1));){let e=n.textContent||"";if(e.length>
10){/[ \t\n]$/.test(e)&&(t=t.slice(1)),r=!1;break}}r&&(t=t.slice(1))}if(" "===t[t.length-1]){let n=e,r=!0;for(;null!==n&&null!==(n=nW(n,!0));)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(t=t.slice(0,t.length-1))}return""===t?{node:null}:{node:nJ(t)}}function nW(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){let e=n.parentElement;if(null===e)return null;n=e}if(lR(n=e)){let e=n.style.display;if(""===e&&!lW(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(iR(n))return n;if("BR"===n.nodeName)return null}}let n$={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function nU(e){let t=n$[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:nj(e.style,t),node:null}}function nJ(e=""){return lS(new nL(e))}function nq(e){return e instanceof nL}function nj(e,t){let n=e.fontWeight,r=e.textDecoration.split(" "),i="700"===n||"bold"===n,l=r.includes("line-through"),o="italic"===e.fontStyle,s=r.includes("underline"),a=e.verticalAlign;return e=>(nq(e)&&(i&&!e.hasFormat("bold")&&e.toggleFormat("bold"),l&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),o&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==a||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==a||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class nH extends nL{static getType(){return"tab"}static clone(e){return new nH(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=lo(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return nV().updateFromJSON(e)}setTextContent(e){return super.setTextContent(" ")}spliceText(e,t,n,r){return""===n&&0===t||" "===n&&1===t||i(286),this}setDetail(e){return 2!==e&&i(127),this}setMode(e){return"normal"!==e&&i(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function nV(){return lS(new nH)}function nZ(e){return e instanceof nH}class nG{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:0>oj(o4(oG(this,"next")),o4(oG(e,"next")))}getNode(){let e=iH(this.key);return null===e&&i(20),e}set(e,t,n,r){let i=this._selection,l=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,rL()||(ij()===l&&iq(e),null!==i&&(i.setCachedNodes(null),n1(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}}function nY(e,t,n){return new nG(e,t,n)}function nQ(e,t){let n=t.__key,r=e.offset,i="element";if(nq(t)){i="text";let e=t.getTextContentSize();r>e&&(r=e)}else if(!r4(t)){let e=t.getNextSibling();if(nq(e))n=e.__key,r=0,i="text";else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function nX(e,t){if(r4(t)){let n=t.getLastDescendant();r4(n)||nq(n)?nQ(e,n):nQ(e,t)}else nQ(e,t)}class n0{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!n3(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new n0(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,n=this.getNodes().filter(e=>null===os(e)),r=n.length;if(0===r)return;let i=n[r-1];if(nq(i))t=i.select();else{let e=i.getIndexWithinParent()+1;t=i.getParentOrThrow().select(e,e)}
1t.insertNodes(e);for(let e=0;e<r;e++)n[e].remove()}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=this._nodes,n=[];for(let e of t){let t=iH(e);null!==t&&n.push(t)}return rL()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>null===os(e));if((rd()||rc())===this&&e[0]){let t=oF(e[0],"next");oQ(oJ(t,t))}for(let t of e)t.remove()}}function n1(e){return e instanceof n2}class n2{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!n1(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,l=new Set;for(let n of e)if(oM(n)){let{origin:e}=n;0===t.length?i.add(e):(l.add(e),t.push(e))}else{let{origin:e}=n;r4(e)&&l.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),oP(e.focus)&&r4(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=oK(e.focus.origin,"previous");oM(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=oB(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!r4(e)||l.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let n=o4(e.anchor),r=o4(e.anchor.getFlipped()),i=e=>oO(e)?e.origin:e.getNodeAtCaret(),l=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(l)}return t}(o5(o0(this),"next"));return rL()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text"),this}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,l=r.isBefore(i),[o,s]=n6(this),a="",u=!0;for(let f=0;f<e.length;f++){let d=e[f];if(r4(d)&&!d.isInline()){u||(a+="\n");let e="";for(let t of od(d)){let n=oc(d,t);null!==n&&(e+=n.getTextContent())}""!==e?(a+=e,u=!1):u=!d.isEmpty()}else if(u=!1,nq(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===i.type&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=l?e.slice(o):e.slice(s):d===n&&(e=l?e.slice(0,s):e.slice(0,o)),a+=e}else!r5(d)&&!iu(d)||d===n&&this.isCollapsed()||(a+=d.getTextContent())}return a}applyDOMRange(e){let t=rW(),n=t.getEditorState()._selection,r=rl(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;let[i,l,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(l.key,l.offset,l.type,!0),o&&(this.dirty=!0),ei(this)}clone(){let e=this.anchor,t=this.focus;return new n2(nY(e.key,e.offset,e.type),nY(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=iz(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=S[e];return 0!=(this.format&t)}insertRawText(e){this.insertNodes(rC(e))}insertText(e){let t=this.anchor,n=this.focus,r=this.format,l=this.style,o=t,s=n;!this.isCollapsed()&&n.isBefore(t)&&(o=n,s=t),"element"===o.type&&function(e,t,n,r){let i=e.getNode(),l=i.getChildAtIndex(e.offset),o=nJ();if(o.setFormat(n),o.setStyle(r),im(l))l.splice(0,0,[o]);else if(null!==l){let e=lx(i)?i_().append(o):o;l.insertBefore(e)}else if(lx(i)){let e=i.getLastChild();r4(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(i_().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,"text"),e.set(o.__key,0,"text")}(o,s,r,l),"element"===s.type&&oY(s,o4(oG(s,"next")));let a=o.offset,u=s.offset,f=this.getNodes(),d=f.length,c=f[0];nq(c)||i(26);let h=c.getTextContent().length,g=c.getParentOrThrow(),p=f[d-1];if(1===d&&"element"===s.type&&(u=h,s.set(o.key,u,"text")),this.isCollapsed()&&a===h&&(iL(c)||!c.canInsertTextAfter()||!g.canInsertTextAfter()&&null===c.getNextSibling())){let t,n=c.getNextSibling();if(nq(n)&&n.canInsertTextBefore()&&!iL(n)?t=n:((t=nJ()).setFormat(r),t.setStyle(l),g.canInsertTextAfter()?c.insertAfter(t):g.
1insertAfter(t)),t.select(0,0),c=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===a&&(iL(c)||!c.canInsertTextBefore()||!g.canInsertTextBefore()&&null===c.getPreviousSibling())){let t,n=c.getPreviousSibling();if(!nq(n)||iL(n)?((t=nJ()).setFormat(r),g.canInsertTextBefore()?c.insertBefore(t):g.insertBefore(t)):t=n,t.select(),c=t,""!==e)return void this.insertText(e)}else if(c.isSegmented()&&a!==h){let e=nJ(c.getTextContent());e.setFormat(r),c.replace(e),c=e}else if(!this.isCollapsed()&&""!==e){let t=p.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||r4(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),rt(this.anchor,this.focus),void this.insertText(e)}if(1===d){if(iF(c)){let t=nJ(e);return t.select(),void c.replace(t)}let t=c.getFormat(),n=c.getStyle();if(a!==u||t===r&&n===l){if(nZ(c)){let t=nJ(e);return t.setFormat(r),t.setStyle(l),t.select(),void c.replace(t)}}else{if(""!==c.getTextContent()){let t=nJ(e);if(t.setFormat(r),t.setStyle(l),t.select(),0===a)c.insertBefore(t,!1);else{let[e]=c.splitText(a);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}c.setFormat(r),c.setStyle(l)}let i=u-a;""===(c=c.spliceText(a,i,e,!0)).getTextContent()?c.remove():"text"===this.anchor.type&&(this.format=t,this.style=n,c.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{let t=new Set([...c.getParentKeys(),...p.getParentKeys()]),n=r4(c)?c:c.getParentOrThrow(),r=r4(p)?p:p.getParentOrThrow(),i=p;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline())if("text"===s.type&&(0!==u||""===p.getTextContent())||"element"===s.type&&p.getIndexWithinParent()<u)if(nq(p)&&!iF(p)&&u!==p.getTextContentSize()){if(p.isSegmented()){let e=nJ(p.getTextContent());p.replace(e),p=e}r7(s.getNode())||"text"!==s.type||(p=p.spliceText(0,u,"")),t.add(p.__key)}else{let e=p.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?p.remove():e.remove()}else t.add(p.__key);let l=r.getChildren(),o=new Set(f),g=n.is(r),_=n.isInline()&&null===c.getNextSibling()?n:c;for(let e=l.length-1;e>=0;e--){let t=l[e];if(t.is(c)||r4(t)&&t.isParentOf(c))break;t.isAttached()&&(!o.has(t)||t.is(i)?g||_.insertAfter(t,!1):t.remove())}if(!g){let e=r,n=null;for(;null!==e;){let r=e.getChildren(),i=r.length;(0===i||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(iF(c))if(a===h)c.select();else{let t=nJ(e);t.select(),c.replace(t)}else""===(c=c.spliceText(a,h-a,e,!0)).getTextContent()?c.remove():"text"===this.anchor.type&&(this.format=c.getFormat(),this.style=c.getStyle(),c.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let e=1;e<d;e++){let n=f[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=rd()===this;oX(this,function(e,t="removeEmptySlices"){let n,r;if(e.isCollapsed())return e;let l="root",o="next",s=t,a=o5(e,o),u=o2(a.anchor,l),f=o2(a.focus.getFlipped(),l),d=new Set,c=[];for(let e of a.iterNodeCarets(l))if(oM(e))d.add(e.origin.getKey());else if(oP(e)){let{origin:t}=e;r4(t)&&!d.has(t.getKey())||c.push(t)}for(let e of c)e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),r=o1(oF(t,o)),i=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===s||"token"===i&&0!==e.distance)r.remove();else if(0!==e.distance){s="removeEmptySlices";let t=e.removeTextSlice(),n=e.caret.origin;if("segmented"===i){let e=t.origin,n=nJ(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());r.replaceOrInsert(n),t=oL(n,o,t.offset)}n.is(u[0].origin)&&(u[0]=t),n.is(f[0].origin)&&(f[0]=t.getFlipped())}}for(let e of u)if(o3(e)){n=o4(e);break}for(let e of f)if(o3(e)){r=o4(e);break}let h=function(e,t,n){let r;if(!e||!t)return null;let i=e.getParentAtCaret(),l=t.getParentAtCaret();if(!i||!l)return null;let o=i.getParents().reverse();o.push(i);let s=l.getParents().reverse();s.push(l);let a=Math.min(o.length,s.length);for(r=0;r<a&&o[r]===s[r];r++);let u=(e,t)=>
1{let n;for(let i=r;i<e.length;i++){let r=e[i];if(lx(r))return;!n&&t(r)&&(n=r)}return n},f=u(o,lJ),d=f&&u(s,e=>n.has(e.getKey())&&lJ(e));return d&&od(d).length>0?null:f&&d?[f,d]:null}(n,r,d);if(h){let[e,t]=h;oK(e,"previous").splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}let g=[n,r,...u,...f].find(o3);if(g)return oU(o8(o4(g),e.direction));i(269,JSON.stringify(u.map(e=>e.origin.__key)))}(o0(this))),e&&rd()!==this&&i1(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void iq(null);let n=this.getNodes(),r=[];for(let e of n)nq(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(r4(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},l=r.length;if(0===l)return this.toggleFormat(e),iq(null),void i(t);let o=this.anchor,s=this.focus,a=this.isBackward(),u=a?s:o,f=a?o:s,d=0,c=r[0],h="element"===u.type?0:u.offset;if("text"===u.type&&h===c.getTextContentSize()&&(d=1,c=r[1],h=0),null==c)return;let g=c.getFormatFlags(e,t);i(g);let p=l-1,_=r[p],m="text"===f.type?f.offset:_.getTextContentSize();if(c.is(_)){if(h===m)return;if(iL(c)||0===h&&m===c.getTextContentSize())c.setFormat(g);else{let e=c.splitText(h,m),t=0===h?e[0]:e[1];t.setFormat(g),"text"===u.type&&u.set(t.__key,0,"text"),"text"===f.type&&f.set(t.__key,m-h,"text")}return void(this.format=g)}0===h||iL(c)||([,c]=c.splitText(h),h=0),c.setFormat(g);let y=_.getFormatFlags(e,g);m>0&&(m===_.getTextContentSize()||iL(_)||([_]=_.splitText(m)),_.setFormat(y));for(let t=d+1;t<p;t++){let n=r[t],i=n.getFormatFlags(e,y);n.setFormat(i)}"text"===u.type&&u.set(c.__key,h,"text"),"text"===f.type&&f.set(_.__key,m,"text"),this.format=g|y}insertNodes(e){var t;if(0===e.length)return;this.isCollapsed()||this.removeText();let n=this.anchor.getNode();if("element"===this.anchor.type&&r4(n)&&null!==os(n)){let t=n.isShadowRoot()?n.getFirstChild()??n.append(i_()).getFirstChild():n.getFirstChild();if(n.isShadowRoot()&&null!==t&&!r4(t)){let e=i_();t.insertBefore(e),t=e}if(null!==t){t.selectStart();let n=rd();return n1(n)||i(369),n.insertNodes(e)}}if("element"===this.anchor.type&&lx(n)){let t=rN(e),r=t.getLastDescendant();return n.splice(this.anchor.offset,0,t.getChildren()),void(null!==r&&r.selectEnd())}let r=(this.isBackward()?this.focus:this.anchor).getNode(),l=ot(r,lJ),o=e[e.length-1];if(r4(l)&&"__language"in l){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=rT(this);l.splice(t,0,e),o.selectEnd()}return}if(!e.some(e=>(r4(e)||r5(e))&&!e.isInline())){r4(l)||i(211,r.constructor.name,r.getType());let t=rT(this);return l.splice(t,0,e),void o.selectEnd()}if(r4(l)&&null!==os(l)){let t=rT(this),n=rb(e);l.splice(t,0,n);let r=n[n.length-1];return void(void 0!==r?r.selectEnd():l.select(t,t))}if(null===l){let t=rN(e),n=t.getLastDescendant(),r=oG(this.anchor,"next");for(let e of t.getChildren())r=sn(e,r);return void(null!==n&&n.selectEnd())}if(r4(l)&&!l.isParentRequired()&&!lx(l.getParentOrThrow())){let t=rT(this),n=rb(e);l.splice(t,0,n);let r=n[n.length-1];return void(void 0!==r?r.selectEnd():l.select(t,t))}let s=rN(e),a=s.getLastDescendant(),u=s.getChildren(),f=r4(l)&&l.isEmpty()?null:this.insertParagraph(),d=u[u.length-1],c=u[0];r4(t=c)&&lJ(t)&&!t.isEmpty()&&r4(l)&&(!l.isEmpty()||l.canMergeWhenEmpty())&&(r4(l)||i(211,r.constructor.name,r.getType()),l.append(...c.getChildren()),c=u[1]),c&&(null===l&&i(212,r.constructor.name,r.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,l=[t];for(;r!==n;)r.getNextSibling()||i(140),l.push(r=r.getNextSibling());let o=e;for(let e of l)o=o.insertAfter(e)}(l,c));let h=ot(a,lJ);f&&r4(h)&&(f.canMergeWhenEmpty()||lJ(d))&&(h.append(...f.getChildren()),f.remove()),r4(l)&&l.isEmpty()&&l.remove(),a.selectEnd();let g=r4(l)?l.getLastChild():null;iu(g)&&h!==l&&g.remove()}insertParagraph(){let e=this.anchor.getNode();if("element"===this.anchor.type&&lx(e)){let t=i_();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let t=rT(this),n=ot(this.anchor.getNode(),lJ);if(null!==n&&null!==os(n))return null;r4(n)||i(213);let r=n.getChildAtIndex(t),l=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...l),o.selectStart(),o):null}insertLineBreak(e){let t=ia();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,l]=n6(this),o=this.isBackward(),[s,a]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=o?[l,i]:[i,l];if(0===t)return[];if(1===t){if(nq(n)&&!this.isCollapsed()){let e=n.splitText(u,f),t=0===u?e[0]:e[1];return t?(s.set(t.getKey(),0,"text"),a.set(t.getKey(),t.getTextContentSize(),"text"),[t]):[]}return[n]}if(nq(n)&&(u===n.getTextContentSize()?e.shift():0!==u&&([,n]=n.splitText(u),e[0]=n,s.set(n.getKey(),0,"text"))),nq(r)){let t=r.getTextContent().length;0===f?e.pop():f!==t&&([r]=r.splitText(f),e[e.length-1]=r,a.set(r.getKey(),r.getTextContentSize(),"text"))}return e}
1modify(e,t,n){var r;if(rE(this,e,t,n))return;let i="move"===e,l=rW(),o=lk(ly(l));if(!o)return;let s=l._blockCursorElement,a=l._rootElement,u=this.focus.getNode();if(null===a||null===s||!r4(u)||u.isInline()||u.canBeEmpty()||lT(s,l,a),this.dirty){let e=lc(l,this.anchor.key),t=lc(l,this.focus.key),n=e,r=t;if("text"===this.anchor.type){let t=this.anchor.getNode();n=nq(t)?lV(t,e,l):null}if("text"===this.focus.type){let e=this.focus.getNode();r=nq(e)?lV(e,t,l):null}n&&r&&rm(o,n,this.anchor.offset,r,this.focus.offset)}if(r=t?"backward":"forward",o.modify(e,r,n),o.rangeCount>0){let e=lM(o,l._rootElement),n=e||o.getRangeAt(0),r=this.anchor.getNode(),s=r7(r)?r:function(e){let t=e.getLatest();for(;null!==t&&!(null!==os(t)&&r4(t));){let e=t.getParentOrThrow();if(lx(e))return e;t=e}return t}(r);if(this.applyDOMRange(n),this.dirty=!0,!i){let r,i,l,a,u,f=this.getNodes(),d=[],c=!1;for(let e=0;e<f.length;e++){let t=f[e];l_(t,s)?d.push(t):c=!0}if(c&&d.length>0)if(t){let e=d[0];r4(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=d[d.length-1];r4(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}(e?"backward"!==o.direction:o.anchorNode===n.startContainer&&o.anchorOffset===n.startOffset)||(r=this.focus,l=(i=this.anchor).key,a=i.offset,u=i.type,i.set(r.key,r.offset,r.type,!0),r.set(l,a,u,!0))}}"lineboundary"===n&&rE(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&r4(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(r4(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=o$(oG(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of r.iterNodeCarets("shadowRoot"))if(oM(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(r4(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=o4(t);oX(this,oJ(e,e)),r.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(oP(t)){if(r4(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(r5(t.origin)){if(t.origin.isIsolated());else if(od(t.origin).length>0){if(r4(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=ru();e.add(t.origin.getKey()),i1(e)}}else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&r4(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=ru();e.add(t.origin.getKey()),i1(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:n}=e;if(od(n).length>0)return;return t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(oX(this,oJ(!t.origin.isEmpty()&&n.isEmpty()?o1(oF(n,t.direction)):r.anchor,t)),this.removeText())}for(let e=t.getNode();null!==e;){if(null!==os(e))return;if(r4(e)&&e.isShadowRoot())break;e=e.getParent()}}let i=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&n8(this,t.getNode()))return}else{let r="text"===i.type?i.getNode():null;if(n="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){let t=i.offset,l=r.getTextContentSize();if(r.is(n)||e&&t!==l||!e&&0!==t)return void n9(r,e,t)}else if(null!==n&&n.isSegmented()){let i=t.offset,l=n.getTextContentSize();if(n.is(r)||e&&0!==i||!e&&i!==l)return void n9(n,e,i)}!function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&"text"===n.type&&"text"===r.type){var l;let e=n.offset,o=r.offset,s=e<o,a=s?e:o,u=s?o:e,f=u-1;a===f||i3(l=i.getTextContent().slice(a,u))||n5(l)||(t?r.set(r.key,f,r.type):n.set(n.key,f,n.type))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){let e=this.anchor.getNode();e.isEmpty()&&r7(e.getParent())&&null===e.getPreviousSibling()&&n8(this,e)}}deleteLine(e){let t=rn(this.anchor);null!==t&&r5(oa(t))?(this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e)):(this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText())}
1deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){let e=this._cachedIsBackward;if(null!==e)return e;let t=this.focus.isBefore(this.anchor);return rL()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}}function n3(e){return e instanceof n0}function n4(e){let t=e.offset;if("text"===e.type)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function n6(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[n4(n),n4(r)]}function n8(e,t){for(let n=t;n;n=n.getParent()){if(r4(n)){if(n.collapseAtStart(e))return!0;if(lx(n))break}if(n.getPreviousSibling())break}return!1}let n5=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("â¤ï¸")&&t("#ï¸â£")&&t("ð"))return t}catch(e){}return()=>!1})();function n9(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,l=0,o=0;for(let e=0;e<i;e++){let s=e===i-1;if(o=l,l+=r[e].length,t&&l===n||l>n||s){r.splice(e,1),s&&(o=void 0);break}}let s=r.join("").trim();""===s?e.remove():(e.setTextContent(s),e.select(o,o))}function n7(e,t,n,r){let l,o=t,s=!1;if(lR(e)){let a=!1,u=e.childNodes,f=u.length,d=r._blockCursorElement;o===f&&f>0&&(a=!0,o=f-1),void 0!==iG(e,r)||l4(e,r)||(s=!0);let c=u[o],h=!1;if(c===d)c=u[o+1],h=!0;else if(null!==d){let n=d.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,d)&&o--}if(nq(l=i2(c)))o=oR(l,a?"next":"previous");else{let u=i2(e);if(null===u)return null;if(r4(u)){let s,f=r.getElementByKey(u.getKey());null===f&&i(214);let d=lH(u,f,r);[u,o]=d.resolveChildIndex(u,f,e,t),r4(u)||i(215),a&&o>=u.getChildrenSize()&&(o=Math.max(0,u.getChildrenSize()-1));let c=u.getChildAtIndex(o);if(r4(c)&&(s=c.getParent(),null===n||null===s||!s.canBeEmpty()||s!==n.getNode())){let e=a?c.getLastDescendant():c.getFirstDescendant();u=null===e||r4(c=e)?c:c.getParentOrThrow(),o=0}nq(c)?(l=c,u=null,o=oR(c,a?"next":"previous")):c!==u&&a&&!h&&(r4(u)||i(216),o=Math.min(u.getChildrenSize(),o+1))}else{let n=oa(u),i=null!==n?n:u,l=i.getIndexWithinParent(),s=r.getElementByKey(u.getKey()),a="after";if(null!==s&&i2(e)===u){let n=lH(u,s,r);n.element!==s?a=n.resolveLeafPosition(s,e,t):0===t&&r5(u)&&(a="before")}o="before"===a?l:l+1,u=i.getParentOrThrow()}if(r4(u))return[nY(u.__key,o,"element"),s]}}else l=i2(e);return nq(l)?[nY(l.__key,oR(l,o,"clamp"),"text"),s]:null}function re(e,t,n){let r=e.offset,i=e.getNode();if(0===r){let r=i.getPreviousSibling(),l=i.getParent();if(t){if((n||!t)&&null===r&&r4(l)&&l.isInline()){let t=l.getPreviousSibling();nq(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else r4(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):nq(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===i.getTextContent().length){let r=i.getNextSibling(),l=i.getParent();if(t&&r4(r)&&r.isInline())e.set(r.__key,0,"element");else if((n||t)&&null===r&&r4(l)&&l.isInline()&&!l.canInsertTextAfter()){let t=l.getNextSibling();nq(t)&&e.set(t.__key,0,"text")}}}function rt(e,t,n){if("text"===e.type&&"text"===t.type){let n=e.isBefore(t),r=e.is(t);re(e,n,r),re(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}function rn(e){let t=iH(e.key);return null===t?null:ou(t)}function rr(e,t,n){let r=rn(e),i=rn(t);if(r===i||null!==r&&null!==i&&r.is(i))return!1;let l=n(r,i);if(null!==r)return r4(r)?t.set(r.getKey(),l?r.getChildrenSize():0,"element"):t.set(r.getKey(),l?r.getTextContentSize():0,"text"),!0;let o=oa(i);if(null===o)return!1;let s=o.getParent();if(null===s)return!1;let a=o.getIndexWithinParent();return t.set(s.getKey(),l?a+1:a,"element"),!0}function ri(e){let t=rr(e.anchor,e.focus,(t,n)=>(function(e,t,n,r){if(null!==n&&null!==r){let e=oa(n),t=oa(r);if(null!==e&&e.is(t)){for(let t of of(e).values()){if(t===n.getKey())break;if(t===r.getKey())return!1}return!0}return null===e||null===t||e.isBefore(t)}if(null!==n){let e=oa(n),r=iH(t.key);return null===e||null===r||!(!e.is(r)&&!e.isParentOf(r))||e.isBefore(r)}let i=oa(r),l=iH(e.key);return null!==i&&null!==l&&!i.is(l)&&!i.isParentOf(l)&&l.isBefore(i)})(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function rl(e,t,n,r,i,l){if(null===e||null===n||!iM(i,e,n))return null;let o=n7(e,t,n1(l)?l.anchor:null,i);if(null===o)return null;let s=n7(n,r,n1(l)?l.focus:null,i);if(null===s)return null;let[a,u]=o,[f,d]=s;if("element"===a.type&&"element"===f.type){let t=i2(e),r=i2(n);if(r5(t)&&r5(r))return null}let c=i._slotsUsed&&rr(a,f,()=>0!=(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return rt(a,f),[a,f,u||d||c]}function ro(e){return r4(e)&&!e.isInline()}function rs(e,t,n,r,i,l){let o=rB(),s=new n2(nY(e,t,i),nY(n,r,l),0,"");return s.dirty=!0,o._selection=s,s}function ra(){return new n2(nY("root",0,"element"),nY("root",0,"element"),0,"")}function ru(){return new n0(new Set)}function rf(e,t,n,r){let i,l,o,s,a=n._window;if(null===a)return null;let u=r||a.event,f=u?u.type:void 0,d="selectionchange"===f,c=!K&&(d||"beforeinput"===f||"compositionstart"===f||"compositionend"===f||"click"===f&&u&&3===u.detail||"drop"===f||void 0===f);if(n1(e)&&!c)return e.clone();{if(null===t)return null;let r=lA(t,n._rootElement);if(i=r.anchorNode,l=r.focusNode,o=r.anchorOffset,s=r.focusOffset,(d||void 0===f)&&n1(e)&&!iM(n,i,l))return e.clone()}let h=rl(i,o,l,s,n,e);if(null===h)return null;let[g,p,_]=h,m=0,y="";if(n1(e)){let t=e.anchor;if(g.key===t.key)m=e.format,y=e.style;else{let e=g.getNode();nq(e)?(m=e.getFormat(),y=e.getStyle()):r4(e)&&(m=e.getTextFormat(),y=e.getTextStyle())}}let x=new n2(g,p,m,y);return _&&(x.dirty=!0),x}function rd(){return rB()._selection}function rc(){return rW()._editorState._selection}
1function rh(e,t,n,r=1){let i=e.anchor,l=e.focus,o=i.getNode(),s=l.getNode();if(!t.is(o)&&!t.is(s))return;let a=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(a,n,"element"),l.set(a,n,"element"),rg(e)}}else{let o=e.isBackward(),s=o?l:i,u=s.getNode(),f=o?i:l,d=f.getNode();if(t.is(u)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(a,Math.max(0,e+r),"element")}if(t.is(d)){let e=f.offset;(n<=e&&r>0||n<e&&r<0)&&f.set(a,Math.max(0,e+r),"element")}}rg(e)}function rg(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,l=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!r4(l))return;let e=l.getChildrenSize(),i=n>=e,o=i?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nq(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,"text"),r.set(o.__key,e,"text")}return}if(r4(l)){let e=l.getChildrenSize(),r=n>=e,i=r?l.getChildAtIndex(e-1):l.getChildAtIndex(n);if(nq(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,"text")}}if(r4(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(nq(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}function rp(e,t,n,r,i){let l=null,o=0,s=null;null!==r?(l=r.__key,nq(r)?(o=r.getTextContentSize(),s="text"):r4(r)&&(o=r.getChildrenSize(),s="element")):null!==i&&(l=i.__key,nq(i)?s="text":r4(i)&&(s="element")),null!==l&&null!==s?e.set(l,o,s):(-1===(o=t.getIndexWithinParent())&&(o=n.getChildrenSize()),e.set(n.__key,o,"element"))}function r_(e,t,n,r,i){"text"===e.type?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function rm(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch(e){}}function ry(e,t,n){let r=lc(e,t.getKey());if(r4(t)){let i=lH(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function rx(e,t,n,r,i,l){let o,s=l.getRootNode(),a=iK(s)||lN(s)?lI(s):null;if(i.has("collaboration")&&a!==l||null!==a&&iP(a,a))return;let f=lA(r,l);if(!n1(t))return void(null!==e&&iM(n,f.anchorNode,f.focusNode)&&r.removeAllRanges());let d=t.anchor,c=t.focus,h=d.getNode(),g=c.getNode(),[p,_]=ry(n,h,d.offset),[m,y]=ry(n,g,c.offset),x=t.format,v=t.style,S=t.isCollapsed(),C=p,b=m,T=!1;if("text"===d.type?(C=nq(h)?lV(h,p,n):null,T=h.getFormat()!==x||h.getStyle()!==v):n1(e)&&"text"===e.anchor.type&&(T=!0),"text"===c.type&&(b=nq(g)?lV(g,m,n):null),null!==C&&null!==b){if(S&&(null===e||T||n1(e)&&(e.format!==x||e.style!==v))&&(t2=[x,v,_,d.key,performance.now()]),("Range"!==r.type||!S)&&f.anchorOffset===_&&f.focusOffset===y&&f.anchorNode===C&&f.focusNode===b){if(null===a||!l.contains(a)){let e=null!==a?iD(a):null;null!==e&&e!==n||i.has(nk)||l.focus({preventScroll:!0})}if("element"!==d.type)return}if(rm(r,C,_,b,y),u&&t.isCollapsed()&&null!==l&&!i.has(nk)){let e=lD(l);if(null===e||!l.contains(e)){let e=lI(l.ownerDocument),t=null!==e?iD(e):null;null!==t&&t!==n||l.focus({preventScroll:!0})}}if(!i.has(nb)&&t.isCollapsed()&&null!==l&&l===lD(l)){let e=n1(t)&&"element"===t.anchor.type?C.childNodes[_]||null:(void 0===o&&(o=function(e,t){let n=lM(e,t);if(null!==n){let e=function(e){let t=e.startContainer.ownerDocument;if(null===t)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch(e){return null}}(n);if(null!==e)return e}return e.rangeCount>0?e.getRangeAt(0):null}(r,l)),o);if(null!==e){let t;if(iR(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){let r=lg(n),i=lm(r);if(null===r||null===i)return;let{top:l,bottom:o}=t,s=0,a=0,u=n;for(;null!==u;){let t=u===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;s=e,a=e+t.height}else s=0,a=ly(e).innerHeight;let n=i.getComputedStyle(r.documentElement),l=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(l)&&(s+=l),isFinite(o)&&(a-=o)}else{let e=u.getBoundingClientRect();s=e.top,a=e.bottom}let n=0;if(l<s?n=-(s-l):o>a&&(n=o-a),0!==n)if(t)i.scrollBy(0,n);else{let e=u.scrollTop;u.scrollTop+=n;let t=u.scrollTop-e;l-=t,o-=t}if(t)break;u=lh(u)}}(n,t,l)}}tZ=!0}}function rv(e){let t=rd()||rc();
1null===t&&(t=i0().selectEnd()),t.insertNodes(e)}function rS(e,t){for(let n of e.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?t.linebreak():" "===n?t.tab():""!==n&&t.text(n)}function rC(e){let t=[];return rS(e,{linebreak:()=>t.push(ia()),tab:()=>t.push(nV()),text:e=>t.push(nJ(e))}),t}function rb(e){let t=[];for(let n of e)iu(n)||(!r4(n)&&!r5(n)||n.isInline()?t.push(n):r4(n)&&t.push(...rb(n.getChildren())));return t}function rT(e){let t=e;e.isCollapsed()||t.removeText();let n=rd();n1(n)&&(t=n),n1(t)||i(161);let r=t.anchor,l=r.getNode(),o=r.offset;for(;!lJ(l)&&null===os(l);){let e=l;if([l,o]=function(e,t){let n=e.getParent();if(!n){let e=i_();return i0().append(e),e.select(),[i0(),0]}if(nq(e)){let r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];let i=+(0!==t);return[n,r[0].getIndexWithinParent()+i]}if(!r4(e)||0===t)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new n2(nY(e.__key,t,"element"),nY(e.__key,t,"element"),0,""),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}(l,o),e.is(l))break}return o}function rk(e){var t;return iu(e)||r4(t=e)&&t.isInline()||r5(t)&&t.isInline()||nq(e)||e.isParentRequired()}function rN(e){let t=i_(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(rk(i)){if(null===n){n=i.createParentElementNode(),t.append(n);let l=e[r+1];if(iu(i)&&(void 0===l||!rk(l)))continue}n.append(i)}else t.append(i),n=null}return t}function rE(e,t,n,r,i="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let l=oG(e.focus,n?"previous":"next"),o="lineboundary"===r,s="move"===t,a=l,u="decorators-and-blocks"===i;if(!o6(a)){for(let e of a){u=!1;let{origin:t}=e;if(!r5(t)||t.isIsolated()||(a=e,!o||!t.isInline()))break}if(u)for(let e of o$(l).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(oM(e))e.origin.isInline()||(a=e);else{if(r4(e.origin))continue;r5(e.origin)&&!e.origin.isInline()&&(a=e)}break}}if(a===l)return!1;if(s&&!o&&r5(a.origin)&&a.origin.isKeyboardSelectable()){let e=ru();return e.add(a.origin.getKey()),i1(e),!0}return a=o4(a),s&&oY(e.anchor,a),oY(e.focus,a),u||!o}let rw=null,rO=null,rP=!1,rM=!1,rA=!1,rD=new Set,rI=0,rF={characterData:!0,childList:!0,subtree:!0};function rL(){return rP||null!==rw&&rw._readOnly}function rR(){rP&&i(13)}function rK(){rI>99&&i(14)}function rB(){return null===rw&&i(195,rU()),rw}function rz(e){null!==rB()&&null===rO&&(rO=e),rO!==e&&l(378)}function rW(){return null===rO&&i(337,rU()),rO}function r$(){rW()._dirtyType=2}function rU(){let e=0,t=new Set,n=iT.version;if("u">typeof window)for(let r of lO(document)){let i=iI(r);if(iA(i))e++;else if(i){let e=String(i.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function rJ(e,t,n){let r=t.__type,i=iE(e,r),l=n.get(r);void 0===l&&(l=Array.from(i.transforms),n.set(r,l));let o=l.length;for(let e=0;e<o&&(l[e](t),t.isAttached());e++);}function rq(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function rj(e,t){if(!t)return;let n=e._updateTags,r=t;for(let e of(Array.isArray(t)||(r=[t]),r))n.add(e)}function rH(e){return rV(e,rW()._nodes)}function rV(e,t){let n=e.type,r=t.get(n);void 0===r&&i(17,n);let l=r.klass;e.type!==l.getType()&&i(18,l.name);let o=l.importJSON(e),s=e.children;if(r4(o)&&Array.isArray(s))for(let e=0;e<s.length;e++){let n=rV(s[e],t);o.append(n)}let a=e.$slots;if(a)for(let e in ol(o)||i(379,l.name),a)ov(o,e,rV(a[e],t));return o}function rZ(e,t,n){let r=rw,i=rP,l=rO;rw=t,rP=!0,rO=e;try{return n()}finally{rw=r,rP=i,rO=l}}function rG(e,t){let n=rA;rA=!0;try{!function(e,t){var n;let r,i,l=e._pendingEditorState,o=e._rootElement,s=e._headless||null===o;if(null===l)return e._deferred.length>0&&rQ(e,e._deferred);let a=e._editorState,u=a._selection,f=l._selection,d=0!==e._dirtyType,c=rw,h=rP,g=rO,p=e._updating,_=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=l,!s&&d&&null!==_){rO=e,rw=l,rP=!1,e._updating=!0;try{let t,n,r,i=e._dirtyType,o=e._dirtyElements,s=e._dirtyLeaves;_.disconnect(),ec="",eh=null,eg=null,ep=null,eO=2===i,ef=e,eu=e._config,ew=e._config.dom||iv,ed=e._nodes,ex=ef._listeners.mutation,ev=o,eS=s,eC=a._nodeMap,eb=a,eT=l._nodeMap,eP=l._readOnly,ek=F(e._keyToDOMMap),t=new Map,(n=e=>{for(let n of e){let e=eT.get(n);if(void 0===e)continue;let r=e.__parent;if(null===r)continue;let i=t.get(r);void 0===i&&(i=new Set,t.set(r,i)),i.add(n)}})(ev.keys()),n(eS),eN=t,eE=r=new Map,eV("root",null),ef=void 0,ed=void 0,ev=void 0,eS=void 0,eC=void 0,eb=void 0,eT=void 0,eu=void 0,ek=void 0,eN=void 0,eE=void 0,ew=iv,m=r}catch(t){if(t instanceof Error&&e._onError(t),rM)throw t;return ix(e,null,o,l),J(e),e._dirtyType=2,rM=!0,rG(e,a),void(rM=!1)}finally{_.observe(o,rF),e._updating=p,rw=c,rP=h,rO=g}}l._readOnly||(l._readOnly=!0);let y=e._dirtyLeaves,x=e._dirtyElements,v=e._normalizedNodes,S=e._updateTags,C=e._deferred;d&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set,function(e,t){let n,r=e._decorators,i=e._pendingDecorators||r,l=t._nodeMap;for(n in i)l.has(n)||(i===r&&(i=iQ(e)),delete i[n])}(e,l);let b=s?null:lk(ly(e));if(e._editable&&null!==b&&(d||null===f||f.dirty||!f.is(u))&&null!==o&&!S.has(nT)){rO=e,rw=l;try{if(null!==_&&_.disconnect(),d||null===f||f.dirty){let t=e._blockCursorElement;null!==t&&lT(t,e,o),rx(u,f,e,b,S,o)}!function(e,t,n){let r=e._blockCursorElement;if(n1(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(lD(t))){let i=n.anchor,l=i.getNode(),o=i.offset,s=!1,a=null;if(o===l.getChildrenSize())lb(l.getChildAtIndex(o-1))&&(s=!0);else{let t=l.getChildAtIndex(o);if(null!==t&&lb(t)){let n=t.getPreviousSibling();(null===n||lb(n))&&(s=!0,a=e.getElementByKey(t.__key))}}if(s){let n,i,o,s=lH(l,e.getElementByKey(l.__key),e).element;return null===r&&(n=e._config.theme,(i=document.createElement("div")).contentEditable="false",i.setAttribute("data-lexical-cursor","true"),o=n.blockCursor,void 0!==o&&("string"==typeof o&&(o=n.blockCursor=sa(o)),void 0!==o&&i.classList.add(...o)),e._blockCursorElement=r=i),t.style.caretColor="transparent",null===a?s.appendChild(r):s.insertBefore(r,a)}}null!==r&&lT(r,e,t)}(e,o,f)}finally{null!==_&&_.observe(o,rF),rO=g,rw=c}}null!==m&&function(e,t,n,r,i){let l=Array.from(e._listeners.mutation),o=l.length;for(let e=0;e<o;e++){let[o,s]=l[e];for(let e of s){let l=t.get(e);void 0!==l&&o(l,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,S,y,a),n1(f)||null===f||null!==u&&u.is(f)||e.dispatchCommand(e0,void 0);let T=e._pendingDecorators;null!==T&&(e._decorators=T,e._pendingDecorators=null,rY("decorator",e,!0,T)),n=t||a,r=iX(n),i=iX(l),r!==i&&rY("textcontent",e,!0,i),rY("update",e,!0,{dirtyElements:x,dirtyLeaves:y,editorState:l,mutatedNodes:m,normalizedNodes:v,prevEditorState:t||a,tags:S}),rQ(e,C),function(e){let t=e._updates;if(0===t.length)return e._cascadeCount=0;
1if(rD.has(e)||(rD.add(e),setTimeout(()=>{rD.delete(e),e._cascadeCount=0},0)),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,r]=n;r0(e,t,r)}}(e)}(e,t)}finally{rA=n}}function rY(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e];for(let[e,t]of Array.from(n)){t&&t();let i=e(...r);n.has(e)?n.set(e,i):i&&i()}}finally{t._updating=i}}function rQ(e,t){if(e._deferred=[],0!==t.length){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function rX(e,t){let n=e._updates,r=t||!1;for(;0!==n.length;){let t=n.shift();if(t){let n,[l,o]=t,s=e._pendingEditorState;void 0!==o&&(n=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(null===s&&i(191),s._flushSync=!0),n&&e._deferred.push(n),rj(e,o.tag)),null==s?r0(e,l,o):l()}}return r}function r0(e,t,n){let r=e._updateTags,l,o=!1,s=!1;void 0!==n&&(l=n.onUpdate,rj(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),l&&e._deferred.push(l);let a=e._editorState,u=e._pendingEditorState,f=!1;(null===u||u._readOnly)&&(u=e._pendingEditorState=ie(u||a),f=!0),u._flushSync=s;let d=rw,c=rP,h=rO,g=e._updating;rw=u,rP=!1,e._updating=!0,rO=e;let p=e._headless||null===e.getRootElement();ik=null;try{var _;let r,l;f&&(p?null!==a._selection&&(u._selection=a._selection.clone()):u._selection=(_=n&&n.event||null,r=e.getEditorState()._selection,l=lk(ly(e)),n1(r)||null==r?rf(r,l,e,_):r.clone()));let s=e._compositionKey;t(),o=rX(e,o),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(n1(r)){let e,t=r.anchor,i=r.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(n,r),"text"===i.type){let t=i.getNode();e!==t&&t.selectionTransform(n,r)}}}(u,e),0!==e._dirtyType&&(o?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);nq(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&er(t)}}(u,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,l=ij(),o=new Map,s=n,a=s.size,u=r,f=u.size;for(;a>0||f>0;){if(a>0){for(let e of(t._dirtyLeaves=new Set,s)){let r=i.get(e);nq(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&er(r),void 0!==r&&rq(r,l)&&rJ(t,r,o),n.add(e)}if((a=(s=t._dirtyLeaves).size)>0){rI++;continue}}for(let e of(t._dirtyLeaves=new Set,t._dirtyElements=new Map,u.delete("root")&&u.set("root",!0),u)){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let a=i.get(n);void 0!==a&&rq(a,l)&&rJ(t,a,o)}a=(s=t._dirtyLeaves).size,f=(u=t._dirtyElements).size,rI++}t._dirtyLeaves=n,t._dirtyElements=r}(u,e),rX(e),function(e,t,n,r){let i=e._nodeMap,l=t._nodeMap,o=[];for(let[e]of r){let t=l.get(e);void 0!==t&&(t.isAttached()||(r4(t)&&R(t,e,i,l,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=l.get(e);void 0===t||t.isAttached()||(ol(t)&&null!==t.__slots&&R(t,e,i,l,o,n),i.has(e)||n.delete(e),o.push(e))}for(let e of o)l.delete(e);let s=rW(),a=s._compositionKey;null===a||l.has(a)||(s._compositionKey=null)}(a,u,e._dirtyLeaves,e._dirtyElements)),s!==e._compositionKey&&(u._flushSync=!0);let d=u._selection;if(n1(d)){e._slotsUsed&&ri(d);let t=u._nodeMap,n=d.anchor.key,r=d.focus.key;void 0!==t.get(n)&&void 0!==t.get(r)||i(19)}else n3(d)&&0===d._nodes.size&&(u._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void rG(e)}finally{rw=d,rP=c,rO=h,e._updating=g,rI=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,rG(e)):f&&iO(()=>{rG(e)}):(u._flushSync=!1,f&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function r1(e,t,n){rO===e&&void 0===n?t():r0(e,t,n)}function r2(e){if(lx(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}class r3 extends nv{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:r2,extends:nv})}constructor(e){super(e),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="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&i(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),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(){return T[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===od(this).length}isDirty(){let e=rW()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[];for(let t of od(this)){let n=oc(this,t);r4(n)&&e.push(...n.getAllTextNodes())}let t=this.getFirstChild();for(;null!==t;){if(nq(t)&&e.push(t),r4(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;r4(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;r4(e);){let t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return r4(e)&&e.getLastDescendant()||e||null}let r=t[e];return r4(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:iH(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&i(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:iH(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&i(96,this.__key),e}getChildAtIndex(e){let t,n,r=this.getChildrenSize();if(e<r/2){for(t=this.getFirstChild(),n=0;null!==t&&n<=e;){if(n===e)return t;t=t.getNextSibling(),n++}return null}for(t=this.getLastChild(),n=r-1;null!==t&&n>=e;){if(n===e)return t;t=t.getPreviousSibling(),n--}return null}getTextContent(){let e=oy(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),r4(i)&&r!==n-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of od(e)){let r=oc(e,n);null!==r&&(t+=r.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),r4(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=b[e];return 0!=(this.getFormat()&t)}return!1}hasTextFormat(e){let t=S[e];return 0!=(this.getTextFormat()&t)}getFormatFlags(e,t){return iz(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){rR();let n=rd(),r=e,i=t,l=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(nq(e)||r4(e))return e.select(0,0)}else if((void 0===e||e===l)&&(void 0===t||t===l)){let e=this.getLastChild();if(nq(e)||r4(e))return e.select()}}void 0===r&&(r=l),void 0===i&&(i=l);let o=this.__key;
1return n1(n)?(n.anchor.set(o,r,"element"),n.focus.set(o,i,"element"),n.dirty=!0,n):rs(o,r,o,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e&&b[e]||0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){ny(this)&&i(324,this.__key,this.__type);let r=this.getChildrenSize(),l=this.getWritable();for(let l of(e+t<=r||i(226,String(e),String(t),String(r)),n));let o=l.__key,s=[],a=[],u=this.getChildAtIndex(e+t),f=null,d=r-t+n.length;if(0!==e)if(e===r)f=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(f=t.getPreviousSibling())}if(t>0){let e=null===f?this.getFirstChild():f.getNextSibling();for(let n=0;n<t;n++){null===e&&i(100);let t=e.getNextSibling(),n=e.__key;iU(e.getWritable()),a.push(n),e=t}}let c=f;for(let e of n){null!==c&&e.is(c)&&(f=c=c.getPreviousSibling());let t=e.getWritable();t.__parent===o&&d--,iU(t);let n=e.__key;if(null===c)l.__first=n,t.__prev=null;else{let e=c.getWritable();e.__next=n,t.__prev=e.__key}e.__key===o&&i(76),t.__parent=o,s.push(n),c=e}if(e+t===r)null!==c&&(c.getWritable().__next=null,l.__last=c.__key);else if(null!==u){let e=u.getWritable();if(null!==c){let t=c.getWritable();e.__prev=c.__key,t.__next=u.__key}else e.__prev=null}if(l.__size=d,a.length){let e=rd();if(n1(e)){let t=new Set(a),n=new Set(s),{anchor:r,focus:i}=e;r6(r,t,n)&&rp(r,r.getNode(),this,f,u),r6(i,t,n)&&rp(i,i.getNode(),this,f,u),0!==d||this.canBeEmpty()||lx(this)||this.remove()}}return l}getDOMSlot(e){return new M(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(lR(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px",t.setAttribute("data-lexical-indent",String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0===t&&""===n||lx(this)||this.getChildren().some(nq)||(0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n)),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,t){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,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=lH(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());null!==i&&(null==r?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}}function r4(e){return e instanceof r3}function r6(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class r8 extends nv{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&i(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function r5(e){return e instanceof r8}class r9 extends r3{__cachedText;static getType(){return"root"}static clone(){return new r9}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){i(51)}getTextContent(){let e=this.__cachedText;return null!==e&&(rL()||0===rW()._dirtyType)?e:super.getTextContent()}remove(){i(52)}replace(e){i(53)}insertBefore(e){i(54)}insertAfter(e){i(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)r4(e)||r5(e)||i(282);return super.splice(e,t,n)}static importJSON(e){return i0().updateFromJSON(e)}collapseAtStart(){return!0}}function r7(e){return e instanceof r9}function ie(e){return new ii(F(e._nodeMap),null,e._slotsUsed)}function it(){return new ii(new Map([["root",new r9]]),null,!1)}function ir(e){return e instanceof ii}class ii{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return rZ(t&&t.editor||null,this,e)}clone(e){let t=new ii(this._nodeMap,void 0===e?this._selection:e,this._slotsUsed);return t._readOnly=!0,t}toJSON(){return rZ(null,this,()=>({root:function e(t){let n=t.exportJSON(),r=t.constructor;if(n.type!==r.getType()&&i(130,r.name),r4(t)){let l=n.children;Array.isArray(l)||i(59,r.name);let o=t.getChildren();for(let t=0;t<o.length;t++){let n=e(o[t]);l.push(n)}}let l=od(t);if(l.length>0){let o={};for(let n of l){let l=oc(t,n);null===l&&i(366,r.name,n),o[n]=e(l)}n.$slots=o}return n}(i0())}))}}class il extends r3{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class io extends nv{static getType(){return"linebreak"}static clone(e){return new io(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>id(e)||ic(e)?null:{conversion:is,priority:0}}}static importJSON(e){return ia().updateFromJSON(e)}}function is(e){return{node:ia()}}function ia(){return lS(new io)}function iu(e){return e instanceof io}function id(e){let t=e.parentElement;if(null!==t&&lU(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&ih(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&ih(n))return!0}}return!1}function ic(e){let t=e.parentElement;if(null!==t&&lU(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&ih(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&ih(r))return!0}return!1}function ih(e){return iR(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class ig extends r3{static getType(){return"paragraph"}static clone(e){return new ig(e.__key)}createDOM(e){let t=document.createElement("p"),n=lo(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:ip,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(lR(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return i_().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){let t=this.getChildren().find(nq);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=i_();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(0===e.length||nq(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function ip(e){let t=i_();if(l2(t,e),l0(e,t),""===t.getFormatType()){let n=e.getAttribute("align");n&&n&&n in b&&t.setFormat(n)}return l1(t,e),{node:t}}function i_(){return lS(new ig)}function im(e){return e instanceof ig}function iy(e){console.warn(e)}function ix(e,t,n,r,i){let l,o=e._keyToDOMMap;o.clear(),e._editorState=it(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null;let s=e._observer;null!==s&&(s.disconnect(),e._observer=null),null!==t&&(t.textContent="",l=`__lexicalKey_${e._key}`,delete t[l]),null!==n&&(n.textContent="",o.set("root",n),iZ(n,e,"root"))}let iv={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=iw(t,e.getType());return n&&void 0!==n.exportDOM?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>
1r4(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>r4(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function iS(e){var t,n;let r,l,o,s,a=e||{},u=rO,f=a.theme||{},d=void 0===e?u:a.parentEditor||null,c=a.disableEvents||!1,h=it(),g=a.namespace||(null!==d?d._config.namespace:i6()),p=a.editorState,_=[r9,nL,io,nH,ig,il,...a.nodes||[]],{onError:m,onWarn:y,html:x}=a,v=void 0===a.editable||a.editable;if(void 0===e&&null!==u)r=u._nodes;else{r=new Map;for(let e=0;e<_.length;e++){let t=_[e],n=null,l=null;if(t&&"object"==typeof t){let e=t;t=e.replace,n=e.with,l=e.withKlass||null}if("function"!=typeof t||!t.prototype||!(t===nv||t.prototype instanceof nv)){let n="<unknown>";try{n=JSON.parse(D)}catch(e){}i(365,String(e-_.length+(a.nodes?a.nodes.length:0)),"function"==typeof t?`${t.name}${"function"==typeof t.getType?` (type ${String(t.getType())})`:""}`:String(t),String(n))}l5(t);let o=t.getType(),s=function(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of l9(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}(t);r.set(o,{exportDOM:x&&x.export?x.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:l,sharedNodeState:function(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of l9("function"==typeof e?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;"stateConfig"in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}(_[e]),transforms:s})}}let S=new iT(h,d,r,{disableEvents:c,dom:{...iv,...e&&e.dom},namespace:g,theme:f},m||console.error,y||iy,(t=r,n=x?x.import:void 0,l=new Map,o=new Set,s=e=>{Object.keys(e).forEach(t=>{let n=l.get(t);void 0===n&&(n=[],l.set(t,n)),n.push(e[t])})},t.forEach(e=>{let t=e.klass.importDOM;if(null==t||o.has(t))return;o.add(t);let n=t.call(e.klass);null!==n&&s(n)}),n&&s(n),l),v,e);return void 0!==p&&(S._pendingEditorState=p,S._dirtyType=2),S.registerCommand(e3,nr,0),S.registerCommand(e4,ni,0),S.registerCommand(e6,nl,0),S.registerCommand(e8,no,0),S.registerCommand(ta,na,0),S}function iC(e,t){let n=e.get(t);e.delete(t),n&&n()}function ib(e,t,n){return e.set(t,n),iC.bind(null,e,t)}class iT{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_createEditorArgs;constructor(e,t,n,r,i,l,o,s,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new L,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=i6(),this._onError=i,this._onWarn=l,this._htmlConversions=o,this._editable=s,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){return ib(this._listeners.update,e)}registerEditableListener(e){return ib(this._listeners.editable,e)}registerDecoratorListener(e){return ib(this._listeners.decorator,e)}registerTextContentListener(e){return ib(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return sd(ib(t,e,e(this._rootElement,null)||void 0),()=>{var n;let r;return n=[null,this._rootElement],void((r=t.get(e))&&r(),t.set(e,e(...n)||void 0))})}
1registerCommand(e,t,n){void 0===n&&i(35);let r=this._commands;r.has(e)||r.set(e,[new I,new I,new I,new I,new I]);let l=r.get(e);void 0===l&&i(36,String(e));let o=7&n,s=l[o];return o!==n?s.addFront(t):s.addBack(t),()=>{s.delete(t),l.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,l=i.get(t);void 0===l&&(l=new Set,i.set(t,l)),l.add(r);let o=n&&n.skipInitialization;return void 0!==o&&o||this.initializeMutationListener(t,r),()=>{l.delete(r),0===l.size&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return void 0===t&&i(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=lY(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(null!=i){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=lY(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}0!==r.length&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=iH(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:nC}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return ld(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=lo(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,ix(this,t,e,r,{preserveUpdateQueue:!0}),null!==t&&(this._config.disableEvents||function(e){let t=tH.get(e);if(void 0===t)return ng();let n=tV.get(t);if(void 0===n)return ng();let r=n.rootElementCount-1;r>=0||i(164),tH.delete(e),n.rootElementCount=r,0===r&&t.removeEventListener("selectionchange",nd);let l=iI(e);iA(l)?(!function(e){if(null!==e._parentEditor){let t=i4(e),n=t[t.length-1]._key;nf.get(n)===e&&nf.delete(n)}else nf.delete(e._key)}(l),n.editors.delete(l),n.hasShadowEditor=void 0,e.__lexicalEditor=null):l&&i(198);let o=nu(e);for(let e=0;e<o.length;e++)o[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){let t=lm(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,J(this),this._updateTags.add(nC),rG(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;tH.set(e,n);let r=tV.get(n);void 0===r&&(r={editors:new Set,hasShadowEditor:void 0,rootElementCount:0},tV.set(n,r)),r.rootElementCount<1&&n.addEventListener("selectionchange",nd),r.rootElementCount+=1,r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=nu(e);for(let n=0;n<tz.length;n++){let[r,l]=tz[n],o="function"==typeof l?e=>{nh(e)||(nc(e),(t.isEditable()||"click"===r)&&l(e,t))}:e=>{if(nh(e))return;nc(e);let n=t.isEditable();switch(r){case"cut":return n&&ld(t,tP,e);case"copy":return ld(t,tO,e);case"paste":return n&&ld(t,tt,e);case"dragstart":return n&&ld(t,tN,e);case"dragover":return n&&ld(t,tE,e);case"dragend":return n&&ld(t,tw,e);case"focus":return n&&ld(t,tL,e);case"blur":return n&&ld(t,tR,e);case"drop":return n&&ld(t,tT,e)}};e.addEventListener(r,o),i.push(()=>{e.removeEventListener(r,o)})}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add(nC),rG(this);rY("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&i(38);let n=e;n._readOnly&&((n=ie(e))._selection=e._selection?e._selection.clone():null),U(this);
1let r=this._pendingEditorState,l=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=l&&this._updateTags.add(l),rG(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,r1(this,()=>{if(l&&this._updateTags.add(l),e._parsed)for(let[e,t]of n._nodeMap.entries())r4(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=it(),i=rw,l=rP,o=rO,s=t._dirtyElements,a=t._dirtyLeaves,u=t._cloneNotNeeded,f=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,rw=r,rP=!1,rO=t,ik=null;try{let i=t._nodes;rV(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=a,t._cloneNotNeeded=u,t._dirtyType=f,rw=i,rP=l,rO=o}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(...e){let[t,n]=1===e.length?["force-commit",e[0]]:e;return"force-commit"===t&&rG(this),("pending"===t?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):r0(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),r1(this,()=>{var r;let i=rd(),l=i0();null!==i?i.dirty||i1(i.clone()):0!==l.getChildrenSize()&&("rootStart"===t.defaultSelection?l.selectStart():l.selectEnd()),lp("focus"),r=()=>{n.removeAttribute("autocapitalize"),e&&e()},rR(),rW()._deferred.push(r)}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=lk(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rY("editable",this,!0,e),this._slotsUsed&&this.update(()=>r$()))}toJSON(){return{editorState:this._editorState.toJSON()}}}iT.version=D;let ik=null,iN=1;function iE(e,t){let n=iw(e,t);return void 0===n&&i(30,t),n}function iw(e,t){return e._nodes.get(t)}let iO="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function iP(e,t){let n,r=void 0!==t?t:iK(n=e.getRootNode())||lN(n)?lI(n):null;if(!lR(r)||r.hasAttribute("data-lexical-slot"))return!1;let i=iY(r),l=r.nodeName;return nS(i)&&("INPUT"===l||"TEXTAREA"===l||"true"===r.contentEditable&&null==iI(r))}function iM(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch(e){return!1}return iD(t)===e&&e.read("latest",()=>!iP(t))}function iA(e){return e instanceof iT}function iD(e){let t=e;for(;null!=t;){let e=iI(t);if(iA(e))return e;t=lh(t)}return null}function iI(e){return e?e.__lexicalEditor:null}function iF(e){return nZ(e)||e.isToken()}function iL(e){return iF(e)||e.isSegmented()}function iR(e){return lK(e)&&3===e.nodeType}function iK(e){return lK(e)&&9===e.nodeType}function iB(e){let t=e;for(;null!=t;){if(iR(t))return t;t=t.firstChild}return null}function iz(e,t,n){let r=S[t];if(null!==n&&(e&r)==(n&r))return e;let i=e^r;return"subscript"===t?i&=~S.superscript:"superscript"===t?i&=~S.subscript:"lowercase"===t?(i&=~S.uppercase,i&=~S.capitalize):"uppercase"===t?(i&=~S.lowercase,i&=~S.capitalize):"capitalize"===t&&(i&=~S.lowercase,i&=~S.uppercase),i}function iW(e){return nq(e)||iu(e)||r5(e)}function i$(e,t){let n,r=(n=ik,ik=null,n);if(null!=(t=t||r&&r.__key))return void(e.__key=t);rR(),rK();let i=rW(),l=rB(),o=""+iN++;l._nodeMap.set(o,e),r4(e)?i._dirtyElements.set(o,!0):i._dirtyLeaves.add(o),i._cloneNotNeeded.add(o),0===i._dirtyType&&(i._dirtyType=1),e.__key=o}function iU(e){null!==os(e)&&i(380,e.__key,String(os(e)));let t=e.getParent();if(null!==t){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),l=e.getNextSibling(),o=null!==l?l.__key:null,s=null!==i?i.__key:null,a=null!==i?i.getWritable():null,u=null!==l?l.getWritable():null;null===i&&(r.__first=o),null===l&&(r.__last=s),null!==a&&(a.__next=o),null!==u&&(u.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function iJ(e){rK(),ny(e)&&i(323,e.__key,e.__type);let t=e.getLatest(),n=null!==t.__parent?t.__parent:oo(t)?t.__slotHost:null,r=rB(),l=rW(),o=r._nodeMap,s=l._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;let e=t.get(r);if(void 0===e)break;n.set(r,!1),r=null!==e.__parent?e.__parent:oo(e)?e.__slotHost:null}}(n,o,s);let a=t.__key;0===l._dirtyType&&(l._dirtyType=1),r4(e)?s.set(a,!0):l._dirtyLeaves.add(a)}function iq(e){rR();let t=rW(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){let e=iH(n);null!==e&&e.getWritable()}if(null!==e){let t=iH(e);null!==t&&t.getWritable()}}}function ij(){return rL()?null:rW()._compositionKey}function iH(e,t){let n=(t||rB())._nodeMap.get(e);return void 0===n?null:n}function iV(e,t){let n=iG(e,rW());return void 0!==n?iH(n,t):null}
1function iZ(e,t,n){e[`__lexicalKey_${t._key}`]=n}function iG(e,t){return e[`__lexicalKey_${t._key}`]}function iY(e,t){let n=e;for(;null!=n;){let e=iV(n,t);if(null!==e)return e;n=lh(n)}return null}function iQ(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function iX(e){return e.read(()=>i0().getTextContent())}function i0(){return rB()._nodeMap.get("root")}function i1(e){rR();let t=rB();null!==e&&(e.dirty=!0,e.setCachedNodes(null),n1(e)&&rW()._slotsUsed&&ri(e)),t._selection=e}function i2(e){let t=function(e,t){let n=e;for(;null!=n;){let e=iG(n,t);if(void 0!==e)return e;n=lh(n)}return null}(e,rW());return null===t?null:iH(t)}function i3(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function i4(e){let t=[];for(let n=e;null!==n;n=n._parentEditor)t.push(n);return t}function i6(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function i8(e){return iR(e)?e.nodeValue:null}function i5(e,t,n){let r=lk(ly(t));if(null===r)return;let i=lA(r,t._rootElement),l=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(null!==l){let t=i8(l),r=iY(l);if(null!==t&&nq(r)){if((t===m||t===y)&&n){let e=n.length;t=n,o=e,s=e}null!==t&&i9(r,t,o,s,e)}}}function i9(e,t,n,r,i){let l=e;if(l.isAttached()&&(i||!l.isDirty())){let o=l.isComposing(),s=t;if((o||i)&&(t.endsWith(m)&&(s=t.slice(0,-m.length)),i)){let e;for(;-1!==(e=s.indexOf(y));)s=s.slice(0,e)+s.slice(e+y.length),null!==n&&n>e&&(n=Math.max(e,n-y.length)),null!==r&&r>e&&(r=Math.max(e,r-y.length))}let a=l.getTextContent();if(i||s!==a){let t=rd();if(""===s){if(iq(null),h||d||_)l.remove();else{let e=rW();i7(l,"",t),setTimeout(()=>{e.update(()=>{l.isAttached()&&""===l.getTextContent()&&l.remove()})},20)}return}let i=l.getParent(),a=rc(),u=l.getTextContentSize(),f=ij(),c=l.getKey();if(l.isToken()||null!==f&&c===f&&!o||n1(a)&&(null!==i&&!i.canInsertTextBefore()&&0===a.anchor.offset||a.anchor.key===e.__key&&0===a.anchor.offset&&!l.canInsertTextBefore()&&!o||a.focus.key===e.__key&&a.focus.offset===u&&!l.canInsertTextAfter()&&!o))return void l.markDirty();if(!n1(t)||null===n||null===r)return void i7(l,s,t);if(t.setTextNodeRange(l,n,l,r),l.isSegmented()){let e=nJ(l.getTextContent());l.replace(e),l=e}i7(l,s,t)}}}function i7(e,t,n){if(e.setTextContent(t),n1(n)){let t=e.getKey(),r=!1;for(let i of["anchor","focus"]){let l=n[i];"text"===l.type&&l.key===t&&(l.offset=oR(e,l.offset,"clamp"),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function le(e,t,n){let r=t[n]||!1;return"any"===r||r===e[n]}function lt(e,t,n){if(!(le(e,n,"altKey")&&le(e,n,"ctrlKey")&&le(e,n,"shiftKey")&&le(e,n,"metaKey")))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||1===e.key.length&&127>=e.key.charCodeAt(0))return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;let r="Key"+t.toUpperCase();return e.code===r}let ln={ctrlKey:!a,metaKey:a},lr={altKey:a,ctrlKey:!a};function li(e){return"Backspace"===e.key}function ll(e){let t=i0();if(n1(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(r7(r))return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),ei(e),e;let i=r.getTopLevelElementOrThrow(),l=i.getParent();return null===l?r4(i)&&(t.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),ei(e)):(t.set(l.getKey(),0,"element"),n.set(l.getKey(),l.getChildrenSize(),"element"),ei(e)),e}{let e=t.select(0,t.getChildrenSize());return i1(ei(e)),e}}function lo(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;let i=e[t];if("string"==typeof i){let e=sa(i);return n[t]=e,e}return i}function ls(e,t,n,r,l){if(0===n.size)return;let o=r.__type,s=r.__key,a=t.get(o);void 0===a&&i(33,o);let u=a.klass,f=e.get(u);void 0===f&&(f=new Map,e.set(u,f));let d=f.get(s),c="destroyed"===d&&"created"===l;(void 0===d||c)&&f.set(s,c?"updated":l)}function la(e,t,n){let r=e.getParent(),i=n,l=e;return null!==r&&(t&&0===n?(i=l.getIndexWithinParent(),l=r):t||n!==l.getChildrenSize()||(i=l.getIndexWithinParent()+1,l=r)),l.getChildAtIndex(t?i-1:i)}function lu(e,t){let n=e.offset;if("element"===e.type)return la(e.getNode(),t,n);{let r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return null===e?la(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function lf(e){let t=ly(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function ld(e,t,n){return function e(t,n,r,i){let l,o=i4(t);if(!rA)for(let e=0;e<o.length;e++)o[e]._updating||(o[e]._cascadeCount=0);for(let e=4;e>=0;e--)for(let t=0;t<o.length;t++){let s=o[t];if(t>0&&s._updating){l=s;break}let a=s._commands.get(n);if(void 0!==a){let t=a[e];if(t.size>0){let e=!1;if(r1(s,()=>{for(let n of t)if(n(r,i))return void(e=!0)}),e)return e}}}return l&&l.update(()=>{e(l,n,r,i)}),!1}(e,t,n,e)}function lc(e,t){let n=e._keyToDOMMap.get(t);return void 0===n&&i(75,t),n}function lh(e){let t=e.assignedSlot||e.parentElement;if(null!==t)return t;let n=e.parentNode;return lN(n)?n.host:null}function lg(e){return iK(e)?e:lR(e)?e.ownerDocument:null}function lp(e){rR(),rW()._updateTags.add(e)}function l_(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function lm(e){let t=lg(e);return t?t.defaultView:null}function ly(e){let t=e._window;return null===t&&i(78),t}function lx(e){return r7(e)||r4(e)&&e.isShadowRoot()}function lv(e,t=!1){let n=e.constructor.clone(e);return i$(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function lS(e){let t=rW(),n=e.getType(),r=iw(t,n);void 0===r&&i(200,e.constructor.name,n);let{replace:l,replaceWithKlass:o}=r;if(null!==l){let t=l(e),r=t.constructor;return null!==o?t instanceof o||i(201,o.name,o.getType(),r.name,r.getType(),e.constructor.name,n):t instanceof e.constructor&&r!==e.constructor||i(202,r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&i(203,e.constructor.name,n,r.name,r.getType()),t}return e}function lC(e,t){!r7(e.getParent())||r4(t)||r5(t)||i(99)}function lb(e){return(r5(e)||r4(e)&&!e.canBeEmpty())&&!e.isInline()}function lT(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;let r=e.parentElement;null!==r&&r.removeChild(e)}function lk(e){return o?(e||window).getSelection():null}function lN(e){return lB(e)&&"host"in e}let lE=[];function lw(e){let t=e.getRootNode();if(t===e||!lN(t))return lE;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!lN(e))break;n.push(e),r=e.host}return n}function*lO(e){let t,n=[e];for(;t=n.pop();){let e;yield*t.querySelectorAll('[data-lexical-editor="true"]');let r=(iK(t)?t:t.ownerDocument).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e=r.nextNode();)e.shadowRoot&&n.push(e.shadowRoot)}}function lP(e){return null!==e?e.ownerDocument:document}function lM(e,t){if(null===t||"function"!=typeof e.getComposedRanges)return null;let n=lw(t);if(0===n.length)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n}
1)[0];if(void 0!==t)return t}catch(e){}try{let t=r.apply(e,n)[0];if(void 0!==t)return t}catch(e){}return null}function lA(e,t){let n=lM(e,t);return null===n?e:function(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:l}=e;return"backward"===t?{anchorNode:i,anchorOffset:l,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:l}}(n,e.direction)}function lD(e){let t=e.getRootNode();return iK(t)||lN(t)?t.activeElement:null}function lI(e){let t=e.activeElement;for(;null!==t&&null!==t.shadowRoot;){let e=t.shadowRoot.activeElement;if(null===e)break;t=e}return t}function lF(e){let t=e.target;if(null!==t&&lR(t)&&null!==t.shadowRoot&&"function"==typeof e.composedPath){let t=e.composedPath();if(t.length>0)return t[0]}return t}function lL(e){return lR(e)&&"A"===e.tagName}function lR(e){return lK(e)&&1===e.nodeType}function lK(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function lB(e){return lK(e)&&11===e.nodeType}let lz=/^(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;function lW(e){return!(!lR(e)||!e.style.display.startsWith("inline"))||lz.test(e.nodeName)}let l$=/^(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;function lU(e){return(!lR(e)||!e.style.display.startsWith("inline"))&&l$.test(e.nodeName)}function lJ(e){if(r5(e)&&!e.isInline())return!0;if(!r4(e)||lx(e))return!1;let t=e.getFirstChild(),n=null===t||iu(t)||nq(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function lq(){return rW()}function lj(e=lq()){return e._config.dom||iv}function lH(e,t,n=lq()){let r=lj(n).$getDOMSlot(e,t,n);return r4(e)&&(r instanceof M||i(344,e.getKey(),e.getType())),r}function lV(e,t,n=lq()){return iB(lH(e,t,n).element)}let lZ=new WeakMap,lG=new Map;function lY(e){if(!e._readOnly&&e.isEmpty())return lG;e._readOnly||i(192);let t=lZ.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),lZ.set(e,t)),t}function lQ(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function lX(e){var t;return(t=lQ(e))[nm]=!0,t}function l0(e,t){let n=e.getAttribute("data-lexical-indent");if(null!==n){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(r)}function l1(e,t){let n=t.getAttribute("dir");return"ltr"===n||"rtl"===n?e.setDirection(n):e}function l2(e,t){let n=t.style.textAlign;return n&&n in b?e.setFormat(n):e}function l3(e){return!0===e.__lexicalUnmanaged}function l4(e,t){let n=e;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(lR(n)&&n.hasAttribute("data-lexical-slot")||void 0!==iG(n,t))break;n=lh(n)}return!1}function l6(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==nv[t]}let l8=new WeakMap;function l5(e){let t=l8.get(e);if(t)return t;let n=null!=e.prototype&&E in e.prototype?e.prototype[E]():void 0,r=function(e){if(!(e===nv||e.prototype instanceof nv)){let t="<unknown>",n="<unknown>";try{t=e.getType()}catch(e){}try{iT.version&&(n=JSON.parse(iT.version))}catch(e){}i(290,e.name,t,n)}return e===r8||e===r3||e===nv}(e),l=!r&&l6(e,"getType")?e.getType():void 0,o,s=l;if(n)if(l)o=n[l];else{for(let[e,t]of Object.entries(n))s=e,o=t;if(!o)for(let e of Object.getOwnPropertySymbols(n)){let t=n[e];if(t){o=t;break}}}if(!r&&s&&(l6(e,"getType")||(e.getType=()=>s),l6(e,"clone")||(e.clone=t=>(ik=t,new e)),l6(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(t=>(new e).updateFromJSON(t))),!l6(e,"importDOM")&&o)){let{importDOM:t}=o;t&&(e.importDOM=()=>t)}let a={klass:e,ownNodeConfig:o,ownNodeType:s};return l8.set(e,a),a}function*l9(e){for(let t=e;t&&(t===nv||nS(t.prototype));){let e=l5(t);yield e,t=e.ownNodeConfig&&e.ownNodeConfig.extends||or(t)}}function l7(e){let t=new Map,n=new Map;for(let r of e){let{ownNodeType:e}=l5(r);e&&(n.set(e,r),t.set(e,new Set))}for(let[e,r]of n)for(let{ownNodeType:n}of l9(r)){let r=n&&t.get(n);r&&r.add(e)}return t}function oe(e){let t=lq();return rR(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}let ot=(e,t)=>
1{let n=e;for(;null!=n&&!r7(n);){if(t(n))return n;n=n.getParent()}return null};function on(e,t){let n=[],r=e.__first;for(;null!==r;){let e=null===t?iH(r):t.get(r);null==e&&i(174),n.push(r),r=e.__next}return n}function or(e){let t=Object.getPrototypeOf(e);if("function"==typeof t&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}let oi=new Map;function ol(e){return r4(e)||r5(e)}function oo(e){return r4(e)||r5(e)}function os(e){let t=e.getLatest();return oo(t)?t.__slotHost:null}function oa(e){let t=os(e);if(null===t)return null;let n=iH(t);return r4(n)||r5(n)||i(370),n}function ou(e){let t=e.getLatest();for(;null!==t;){if(null!==os(t))return t;t=t.getParent()}return null}function of(e){let t=e.getLatest();return ol(t)&&null!==t.__slots?t.__slots:oi}function od(e){return Array.from(of(e).keys())}function oc(e,t){let n=of(e).get(t);return void 0===n?null:iH(n)}let oh=["__proto__","constructor","prototype"],og=Symbol("slotMapOwner");function op(e){let t=e.__slots;return null!==t&&t[og]===e||((t=new Map(t))[og]=e,e.__slots=t),t}let o_=new WeakMap,om=[];function oy(e){let t="";for(let n of od(e)){let r=oc(e,n);null!==r&&(t+=r.getTextContent())}return t}function ox(e,t,n){let r=n.get(e),i=n.get(t);return void 0!==r?void 0!==i?r-i:-1:void 0!==i?1:e<t?-1:+(e>t)}function ov(e,t,n){let r;"__proto__"!==t&&"constructor"!==t&&"prototype"!==t||i(373,t);let l=e.getLatest();if(null!==l.__slots&&l.__slots.get(t)===n.getLatest().__key)return l;(!r4(n)&&!r5(n)||n.isInline())&&i(374,n.__key);let o=e.getWritable(),s=op(o),a=s.get(t);void 0!==a&&oS(a);let u=n.getWritable(),f=oa(u);if(null!==f){let e=function(e){let t=oa(e);if(null===t)return null;let n=e.getLatest().__key;for(let[e,r]of of(t))if(r===n)return e;return null}(u);null!==e&&op(f.getWritable()).delete(e),u.__slotHost=null}return iU(u),u.__slotHost=o.__key,s.set(t,u.__key),function(e){let t=e.__slots;if(null===t||t.size<2)return;let n=function(e){let t=o_.get(e);if(void 0===t){let n=function(e){for(let{ownNodeConfig:t}of l9(e)){let e=t&&t.slots;if(e)return e}return om}(e),r=new Map;for(let t of n)oh.includes(t)&&i(371,e.name,t),r.has(t)&&i(372,e.name,t),r.set(t,r.size);t=r,o_.set(e,t)}return t}(e.constructor),r=null,l=!0;for(let e of t.keys()){if(null!==r&&ox(r,e,n)>0){l=!1;break}r=e}if(l)return;let o=Array.from(t).sort(([e],[t])=>ox(e,t,n));for(let[e,n]of(t.clear(),o))t.set(e,n)}(o),(r=lq())._slotsUsed=!0,r._pendingEditorState&&(r._pendingEditorState._slotsUsed=!0),o}function oS(e){let t=iH(e);if(null===t)return;let n=t.getWritable();oo(n)||i(377,e),n.__slotHost=null,n.remove()}let oC={next:"previous",previous:"next"};class ob{origin;constructor(e){this.origin=e}[Symbol.iterator](){return oq({hasNext:oP,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return oF(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return oF(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(null===n?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){let r=n===this.direction?t:Array.from(t).reverse(),l=this,o=this.getParentAtCaret(),s=new Map;for(let t=l.getAdjacentCaret();null!==t&&s.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();s.set(e.getKey(),e)}for(let e of r){if(s.size>0){let t=l.getNodeAtCaret();if(t)if(s.delete(t.getKey()),s.delete(e.getKey()),t.is(e)||l.origin.is(e));else{let n=e.getParent();n&&n.is(o)&&e.remove(),t.replace(e)}else null===t&&i(263,Array.from(s).join(" "))}else l.insert(e);l=oF(e,this.direction)}for(let e of s.values())e.remove();return this}}class oT extends ob{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:oK(e,this.direction)}getParentCaret(e="root"){return oF(oN(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=oC[this.direction];return oF(this.getNodeAtCaret(),e)||oK(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof oT&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let ok={root:r7,shadowRoot:lx};function oN(e,t="root"){return null===e||ok[t](e)?null:null===os(e)?e:null}class oE extends ob{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:oF(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return r4(this.origin)?oK(this.origin,this.direction):null}getParentCaret(e="root"){return oF(oN(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=oC[this.direction];return oF(this.getNodeAtCaret(),e)||oK(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof oE&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof oE||e instanceof ow)&&this.direction===e.direction&&this.origin.is(e.origin)}}class ow extends ob{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:oL(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return oF(oN(this.getParentAtCaret(),e),this.direction)}getFlipped(){return oL(this.origin,oC[this.direction],this.offset)}isSamePointCaret(e){return e instanceof ow&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof oE||e instanceof ow)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return oF(this.origin,this.direction)}}function oO(e){return e instanceof ow}function oP(e){return e instanceof oE}function oM(e){return e instanceof oT}let oA={next:class extends ow{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends ow{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},oD={next:class extends oE{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends oE{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},oI={next:class extends oT{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends oT{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function oF(e,t){return e?new oD[t](e):null}
1function oL(e,t,n){return e?new oA[t](e,oR(e,n)):null}function oR(e,t,n="error"){let r=e.getTextContentSize(),i="next"===t?r:"previous"===t?0:t;return(i<0||i>r)&&("clamp"!==n&&l(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function oK(e,t){return r4(e)?new oI[t](e):null}function oB(e){var t;return e&&((t=e.getAdjacentCaret())&&t.getChildCaret()||t)}class oz{type="node-caret-range";direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new oz(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return oO(t)?function(e,t){let{direction:n,origin:r}=e;return new oW(e,oR(r,"focus"===t?oC[n]:n)-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[new oW(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){let t=oO(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=oO(n),i=t=>t.isSameNodeCaret(n)?null:oB(t)||t.getParentCaret(e);return oq({hasNext:e=>null!==e&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class oW{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return oL(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}}function o$(e){return oJ(e,oF(i0(),e.direction))}function oU(e){return oJ(e,e)}function oJ(e,t){return e.direction!==t.direction&&i(265),new oz(e,t,e.direction)}function oq(e){let{initial:t,hasNext:n,step:r,map:i}=e,l=t;return{[Symbol.iterator](){return this},next(){if(!n(l))return{done:!0,value:void 0};let e={done:!1,value:i(l)};return l=r(l),e}}}function oj(e,t){let n=oZ(e.origin,t.origin);switch(null===n&&i(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{let n="text"===e.type,r="text"===t.type;return n&&r?Math.sign(e.offset-t.offset):e.type===t.type?0:n?-1:r?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return oH(n)}}function oH(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,l=t,o=n;for(;l&&o;l=l.getNextSibling(),o=o.getNextSibling()){if(l.__key===i)return -1;if(o.__key===r)return 1}return null===l?1:-1}function oV(e){return r4(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function oZ(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let n=new Map;for(let[t,r]=oV(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,l]=oV(t);r;l=r,r=r.getParent()){let o=n.get(r);if(void 0!==o)return null===o?(r.is(e)||i(276),{commonAncestor:r,type:"ancestor"}):null===l?(r.is(t)||i(277),{commonAncestor:r,type:"descendant"}):((r4(o)||o.is(e))&&(r4(l)||l.is(t))&&r.is(o.getParent())&&r.is(l.getParent())||i(278),{a:o,b:l,commonAncestor:r,type:"branch"})}return null}function oG(e,t){var n;let r,{type:l,key:o,offset:s}=e,a=(null===(r=iH(n=e.key))&&i(63,n),r);return"text"===l?(nq(a)||i(266,a.getType(),o),oL(a,t,s)):(r4(a)||i(267,a.getType(),o),o9(a,e.offset,t))}function oY(e,t){let{origin:n,direction:r}=t,l="next"===r;oO(t)?e.set(n.getKey(),t.offset,"text"):oP(t)?nq(n)?e.set(n.getKey(),oR(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!l,"element"):(oM(t)&&r4(n)||i(268),e.set(n.getKey(),l?0:n.getChildrenSize(),"element"))}function oQ(e){let t=rd(),n=n1(t)?t:ra();return oX(n,e),i1(n),n}function oX(e,t){oY(e.anchor,t.anchor),oY(e.focus,t.focus)}function o0(e){let{anchor:t,focus:n}=e,r=oG(t,"next"),i=oG(n,"next"),l=0>=oj(r,i)?"next":"previous";return oJ(o8(r,l),o8(i,l))}function o1(e){let{direction:t,origin:n}=e,r=oF(n,oC[t]).getNodeAtCaret();return r?oF(r,t):oK(n.getParentOrThrow(),t)}function o2(e,t="root"){let n=[e];for(let r=oM(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;
1r=r.getParentCaret(t))n.push(o1(r));return n}function o3(e){return!!e&&e.origin.isAttached()}function o4(e){let t=function(e){let t=e;for(;oM(t);){let e=oB(t);if(!oM(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(nq(t.origin))return oO(t)?t:oL(t.origin,n,n);let r=t.getAdjacentCaret();return oP(r)&&nq(r.origin)?oL(r.origin,n,oC[n]):t}function o6(e){return oO(e)&&e.offset!==oR(e.origin,e.direction)}function o8(e,t){return e.direction===t?e:e.getFlipped()}function o5(e,t){return e.direction===t?e:oJ(o8(e.focus,t),o8(e.anchor,t))}function o9(e,t,n){let r=oK(e,"next");for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(null===e)break;r=e}return o8(r,n)}function o7(e){let{origin:t,offset:n,direction:r}=e;if(n===oR(t,r))return e.getSiblingCaret();if(n===oR(t,oC[r]))return o1(e.getSiblingCaret());let[l]=t.splitText(n);return nq(l)||i(281),o8(oF(l,"next"),r)}function se(e,t){return!0}function st(e,{$copyElementNode:t=lv,$splitTextPointCaretNext:n=o7,rootMode:r="shadowRoot",$shouldSplit:i=se,removeEmptyDestination:l=!1}={}){if(oO(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(oM(e)){let e=o1(o);if(l&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,"first"))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!l&&n.canBeEmpty()&&i(n,"last"))&&o.insert(t(n).splice(0,0,r))}return o}function sn(e,t,n){let r=o8(t,"next");oO(r)&&(0===r.offset?r=oF(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=oF(r.origin,"next"))),r.origin.is(e)&&(oP(r)||i(342,e.getKey(),e.getType()),r=o1(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=st(e,n))r=e;return oO(r)&&i(283),r.insert(e.isInline()?i_().append(e):e),o8(oF(e.getLatest(),"next"),t.direction)}function sr(e){return e}function si(...e){return e}function sl(e,t){return[e,t]}function so(e){return e}function ss(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function sa(...e){let t=[];for(let n of e)if(n&&"string"==typeof n)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function su(e,...t){let n=sa(...t);n.length>0&&e.classList.add(...n)}function sf(e,...t){let n=sa(...t);n.length>0&&e.classList.remove(...n)}function sd(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}n.d(t,{$iu:function(){return o0},A7V:function(){return il},AcB:function(){return oj},Ave:function(){return oG},B$P:function(){return lu},B1s:function(){return oa},CHU:function(){return lv},CMH:function(){return lO},CaD:function(){return ei},Cku:function(){return n6},Csq:function(){return o8},Cyw:function(){return r5},DTJ:function(){return oc},Ey8:function(){return nL},Fb2:function(){return l7},FfB:function(){return lH},GMe:function(){return rH},GRK:function(){return io},GYG:function(){return sa},H2A:function(){return rv},HEf:function(){return sf},Hkj:function(){return lt},I2P:function(){return n1},IWk:function(){return lw},IlV:function(){return oF},IqF:function(){return lx},JAT:function(){return lp},J_T:function(){return id},JqA:function(){return nS},K8K:function(){return lB},KiH:function(){return l9},Kp7:function(){return r8},LYZ:function(){return iM},L_P:function(){return nc},MSq:function(){return lj},MZu:function(){return nH},Mgk:function(){return lA},NEy:function(){return rS},NG9:function(){return o1},NZv:function(){return o5},NiT:function(){return i0},O0w:function(){return si},OCP:function(){return lV},OpE:function(){return oP},Pl0:function(){return iP},Q2o:function(){return rz},R3g:function(){return lN},RB3:function(){return ic},RTZ:function(){return n3},Rb_:function(){return iL},S1w:function(){return rc},Sdt:function(){return sd},Sz2:function(){return l2},T8n:function(){return oL},TJt:function(){return oJ},TSH:function(){return l5},Tc1:function(){return ss},U5P:function(){return lX},Uax:function(){return r$},Uqh:function(){return iA},WKo:function(){return ia},WhU:function(){return nw},YPs:function(){return iR},ZB7:function(){return su},_On:function(){return lW},_jw:function(){return rC},a9V:function(){return lU},aif:function(){return sl},bSg:function(){return im},bqM:function(){return lD},brn:function(){return nO},c_R:function(){return iB},cmH:function(){return oM},dCx:function(){return lh},dxY:function(){return l0},e1k:function(){return ll},erb:function(){return oB},ev7:function(){return nV},ex6:function(){return ou},fD3:function(){return ig},fGB:function(){return r3},ff4:function(){return r4},guI:function(){return eX},hVZ:function(){return r7},haT:function(){return r9},hdR:function(){return o9},i0_:function(){return lq},ieJ:function(){return iS},jG6:function(){return iW},k1Q:function(){return st},kBm:function(){return n_},kFe:function(){return nq},lJ7:function(){return i_},lSZ:function(){return o4},lVE:function(){return so},lue:function(){return iI},mB$:function(){return iK},mWO:function(){return o$},mYE:function(){return rx},n1P:function(){return i1},nAs:function(){return lP},nYP:function(){return lL},nsf:function(){return iH},pGK:function(){return o6},pJU:function(){return iV},pTq:function(){return lS}
1,peL:function(){return lk},phO:function(){return oe},q3P:function(){return l1},rN:function(){return oO},rUs:function(){return ru},rdQ:function(){return sn},sTu:function(){return nJ},sWS:function(){return oU},sby:function(){return lR},scG:function(){return iD},uTE:function(){return ra},urt:function(){return j},uwZ:function(){return oK},v0B:function(){return ir},v39:function(){return lI},vAA:function(){return lK},vE9:function(){return sr},vJq:function(){return rd},vU2:function(){return od},w3H:function(){return lJ},wH$:function(){return iu},wp6:function(){return oY},xL4:function(){return iY},xQ8:function(){return oQ},y68:function(){return ro}},{$Mp:u,$c$:nT,$ey:tn,A6j:tf,AX0:td,BtT:ot,DzG:_,FEN:e9,HYn:tM,Huu:t_,JM3:tu,KfJ:tF,MvL:e0,OQi:nb,OXk:tv,PiT:tC,Q$N:ty,RTo:tp,RpX:tc,SKc:tA,Sr4:tT,T40:nC,TgX:tN,UDz:th,V30:ts,VSO:tP,WWb:tI,WuB:e5,XI_:nk,XKQ:e7,YW5:tS,YwR:h,ZKf:to,aT4:f,bM3:te,bMH:"history-push",bbF:tg,d8p:e2,fUS:tk,gCZ:tm,hi0:tr,mB:tl,n0X:"historic",oqR:e1,pz6:d,qxK:o,riq:tE,sY8:a,sik:tb,sne:nE,t5V:tD,u5G:tO,viC:ti,w$Z:tx,waI:tt,wb_:iv,xKE:nN})},69146:function(e,t,n){let r;n.d(t,{A:function(){return s}});var i="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);let l=new Uint8Array(16),o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));var s=function(e,t,n){if(i&&!t&&!e)return i();let s=(e=e||{}).random??e.rng?.()??function(){if(!r){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(l)}();if(s.length<16)throw Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(s)}}}]);
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.