1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6582],{36582:(e,t,r)=>{"use strict";r.r(t),r.d(t,{RichText:()=>e1});var n=r(52328),o=r(91043),i=r(15958),l=r(35369),a=r(64824),s=r(3810),d=r(23457),u=r(1654);let c=(0,u.createContext)(null),f={didCatch:!1,error:null};class m extends u.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=f}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];null==(t=(r=this.props).onReset)||t.call(r,{args:o,reason:"imperative-api"}),this.setState(f)}}componentDidCatch(e,t){var r,n;null==(r=(n=this.props).onError)||r.call(n,e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;if(r&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var o,i;null==(o=(i=this.props).onReset)||o.call(i,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(f)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:i}=this.state,l=e;if(o){let e={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)l=t(e);else if(r)l=(0,u.createElement)(r,e);else if(void 0!==n)l=n;else throw i}return(0,u.createElement)(c.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},l)}}r(51503);var p=r(49135),h=r(10685);let g="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,y=g?u.useLayoutEffect:u.useEffect,E={tag:h.T40};function x({initialConfig:e,children:t}){let r=(0,u.useMemo)(()=>{let{theme:t,namespace:r,nodes:n,onError:o,editorState:i,html:l}=e,a=(0,p.Mx)(null,t),s=(0,h.ieJ)({editable:e.editable,html:l,namespace:r,nodes:n,onError:e=>o(e,s),theme:t});return function(e,t){if(null!==t){if(void 0===t)e.update(()=>{let t=(0,h.NiT)();if(t.isEmpty()){let r=(0,h.lJ7)();t.append(r);let n=g?document.activeElement:null;(null!==(0,h.vJq)()||null!==n&&n===e.getRootElement())&&r.select()}},E);else if(null!==t)switch(typeof t){case"string":{let r=e.parseEditorState(t);e.setEditorState(r,E);break}case"object":e.setEditorState(t,E);break;case"function":e.update(()=>{(0,h.NiT)().isEmpty()&&t(e)},E)}}}(s,i),[s,a]},[]);return y(()=>{let t=e.editable,[n]=r;n.setEditable(void 0===t||t)},[]),(0,i.jsx)(p.Gu.Provider,{value:r,children:t})}var b=r(49894);let v=(0,u.createContext)(null),C={didCatch:!1,error:null};class w extends u.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=C}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(C))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;r&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)&&(this.props.onReset?.({next:n,prev:e.resetKeys,reason:"keys"}),this.setState(C))}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:i}=this.state,l=e;if(o){let e={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)l=t(e);else if(r)l=(0,u.createElement)(r,e);else if(void 0!==n)l=n;else throw i}return(0,u.createElement)(v.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},l)}}function S({children:e,onError:t}){return(0,i.jsx)(w,{fallback:(0,i.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var k=r(21772);function j(e){e.undoStack=[],e.redoStack=[],e.current=null}function N(e,t,r){let n,o,i,l,a,s=(n=Date.now(),o=0,i=Date.now(),l=0,a=null,(t,s,d,u,c,f)=>{let m=Date.now();if(f.has(h.xKE)&&(i=n,l=o,a=t),f.has(h.n0X))return o=0,n=m,2;f.has(h.sne)&&a&&(n=i,o=l,t=a);let p=function(e,t,r,n,o){if(null===e||0===r.size&&0===n.size&&!o)return 0;let i=t._selection,l=e._selection;if(o)return 1;if(!((0,h.I2P)(i)&&(0,h.I2P)(l)&&l.isCollapsed()&&i.isCollapsed()))return 0;let a=function(e,t,r){let n=e._nodeMap,o=[];for(let e of t){let t=n.get(e);void 0!==t&&o.push(t)}for(let[e,t]of r){if(!t)continue;let r=n.get(e);void 0===r||(0,h.hVZ)(r)||o.push(r)}return o}(t,r,n);if(0===a.length)return 0;if(a.length>
11){let r=t._nodeMap,n=r.get(i.anchor.key),o=r.get(l.anchor.key);return n&&o&&!e._nodeMap.has(n.__key)&&(0,h.kFe)(n)&&1===n.__text.length&&1===i.anchor.offset?2:0}let s=a[0],d=e._nodeMap.get(s.__key);if(!(0,h.kFe)(d)||!(0,h.kFe)(s)||d.__mode!==s.__mode)return 0;let u=d.__text,c=s.__text;if(u===c)return 0;let f=i.anchor,m=l.anchor;if(f.key!==m.key||"text"!==f.type)return 0;let p=f.offset,g=m.offset,y=c.length-u.length;return 1===y&&g===p-1?2:-1===y&&g===p+1?3:4*(-1===y&&g===p)}(t,s,u,c,e.isComposing()),g=(()=>{var i,l;let a,g,y,E,x=null===d||d.editor===e,b=f.has(h.bMH);if(!b&&x&&f.has(h.T40))return 0;if(1===p)return 2;if(null===t)return 1;let v=s._selection;if(!(u.size>0||c.size>0))return 2*(null===v);let C="number"==typeof r?r:r.peek();return!1===b&&0!==p&&p===o&&m<n+C&&x?0:1!==u.size||(i=Array.from(u)[0],a=(l=t)._nodeMap.get(i),g=s._nodeMap.get(i),y=l._selection,E=s._selection,(0,h.I2P)(y)&&(0,h.I2P)(E)&&"element"===y.anchor.type&&"element"===y.focus.type&&"text"===E.anchor.type&&"text"===E.focus.type||!(0,h.kFe)(a)||!(0,h.kFe)(g)||a.__parent!==g.__parent||JSON.stringify(l.read(()=>a.exportJSON()))!==JSON.stringify(s.read(()=>g.exportJSON())))?1:0})();return n=m,o=p,g});return(0,h.Sdt)(e.registerCommand(h.ZKf,()=>((function(e,t){let r=t.redoStack,n=t.undoStack;if(0!==n.length){let o=t.current,i=n.pop();null!==o&&(r.push(o),e.dispatchCommand(h.WWb,!0)),0===n.length&&e.dispatchCommand(h.KfJ,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:h.n0X})}})(e,t),!0),h.jZM),e.registerCommand(h.V30,()=>((function(e,t){let r=t.redoStack,n=t.undoStack;if(0!==r.length){let o=t.current;null!==o&&(n.push(o),e.dispatchCommand(h.KfJ,!0));let i=r.pop();0===r.length&&e.dispatchCommand(h.WWb,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:h.n0X})}})(e,t),!0),h.jZM),e.registerCommand(h.SKc,()=>(j(t),!1),h.jZM),e.registerCommand(h.t5V,()=>(j(t),e.dispatchCommand(h.WWb,!1),e.dispatchCommand(h.KfJ,!1),!0),h.jZM),e.registerUpdateListener(({editorState:r,prevEditorState:n,dirtyLeaves:o,dirtyElements:i,tags:l})=>{let a=t.current,d=t.redoStack,u=t.undoStack,c=null===a?null:a.editorState;if(null!==a&&r===c)return;let f=s(n,r,a,o,i,l);if(1===f)0!==d.length&&(t.redoStack=[],e.dispatchCommand(h.WWb,!1)),null!==a&&(u.push({...a}),e.dispatchCommand(h.KfJ,!0));else if(2===f)return;t.current={editor:e,editorState:r}}))}function B(){return{current:null,redoStack:[],undoStack:[]}}let D=(0,h.vE9)({build:(e,{delay:t,createInitialHistoryState:r,disabled:n})=>(0,k.v)({delay:t,disabled:n,historyState:r(e)}),config:(0,h.lVE)({createInitialHistoryState:B,delay:300,disabled:"u"<typeof window}),name:"@lexical/history/History",register:(e,t,r)=>{let n=r.getOutput();return(0,k.QZ)(()=>n.disabled.value?void 0:N(e,n.historyState.value,n.delay))}});function _({delay:e,externalHistoryState:t}){let[r]=(0,p.DF)();return function(e,t,r=1e3){let n=(0,u.useMemo)(()=>t||B(),[t]);(0,u.useEffect)(()=>N(e,n,r),[r,e,n])}(r,t,e),null}(0,h.vE9)({dependencies:[(0,h.O0w)(D,{createInitialHistoryState:()=>{throw Error("SharedHistory did not inherit parent history")},disabled:!0})],name:"@lexical/history/SharedHistory",register(e,t,r){var n;let{output:o}=r.getDependency(D),i=(n=e._parentEditor)?(0,k.xT)(n,D.name):null;if(!i)return()=>{};let l=i.output;return(0,k.QZ)(()=>(0,k.vA)(()=>{o.delay.value=l.delay.value,o.historyState.value=l.historyState.value,o.disabled.value=l.disabled.value}))}});let P="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function T({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:r}){let[n]=(0,p.DF)();return P(()=>{if(r)return n.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:l,prevEditorState:a,tags:s})=>{t&&0===i.size&&0===l.size||e&&s.has(h.T40)||a.isEmpty()||r(o,n,s)})},[n,e,t,r]),null}var F=r(96711);let L=(0,h.vE9)({name:"@lexical/react/ReactProvider"});var R=r(55427);function I(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let r=(0,h.NiT)().getTextContent();return t&&(r=r.trim()),""===r}(e,!1))return!1;let t=(0,h.NiT)().getChildren(),r=t.length;if(r>1)return!1;for(let e=0;e<r;e++){let r=t[e];if((0,h.Cyw)(r))return!1;if((0,h.ff4)(r)){if(!(0,h.bSg)(r)||0!==r.__indent)return!1;let t=r.getChildren(),n=t.length;for(let r=0;r<n;r++){let r=t[e];if(!(0,h.kFe)(r))return!1}}}return!0})(e)}var A=r(70750),M=r(39180);let J="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;function O({editor:e,ErrorBoundary:t}){return function(e,t){let[r,n]=(0,u.useState)(()=>e.getDecorators());return J(()=>e.registerDecoratorListener(e=>{(0,R.flushSync)(()=>{n(e)})}),[e]),(0,u.useEffect)(()=>{n(e.getDecorators())},[e]),(0,u.useMemo)(()=>{let n=[],o=Object.keys(r);for(let l=0;l<o.length;l++){let a=o[l],s=(0,i.jsx)(t,{onError:t=>e._onError(t),children:(0,i.jsx)(u.Suspense,{fallback:null,children:r[a]})}),d=e.getElementByKey(a);null!==d&&n.push((0,R.createPortal)(s,d,a))}return n},[t,r,e])}(e,t)}function K({editor:e,ErrorBoundary:t}){return!function(e){let t=k.iZ.maybeFromEditor(e);
1if(t&&t.hasExtensionByName(L.name)){for(let e of["@lexical/plain-text","@lexical/rich-text"])t.hasExtensionByName(e)&&function(...e){let t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let t of(r.append("code",320),e))r.append("v",t);throw t.search=r.toString(),Error(`Minified Lexical error #320; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e);return!0}return!1}(e)?(0,i.jsx)(O,{editor:e,ErrorBoundary:t}):null}function z(e){return e.getEditorState().read(I(e.isComposing()))}function $({contentEditable:e,placeholder:t=null,ErrorBoundary:r}){var n;let[o]=(0,p.DF)();return J(()=>(0,h.Sdt)((0,M.ZI)(n),(0,A.U)(n)),[n=o]),(0,i.jsxs)(i.Fragment,{children:[e,(0,i.jsx)(H,{content:t}),(0,i.jsx)(K,{editor:o,ErrorBoundary:r})]})}function H({content:e}){let[t]=(0,p.DF)(),r=function(e){let[t,r]=(0,u.useState)(()=>z(e));return J(()=>{function t(){r(z(e))}return t(),(0,h.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),n=(0,F.a)();return r?"function"==typeof e?e(n):e:null}var q=r(38881),Z=r(61735),W=r(60402),U=r(11834);let V="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect,Y=(0,u.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:r,ariaControls:n,ariaDescribedBy:o,ariaErrorMessage:l,ariaExpanded:a,ariaInvalid:s,ariaLabel:d,ariaLabelledBy:c,ariaMultiline:f,ariaOwns:m,ariaRequired:p,autoCapitalize:h,className:g,id:y,role:E="textbox",spellCheck:x=!0,style:b,tabIndex:v,"data-testid":C,...w},S){let[k,j]=(0,u.useState)(e.isEditable()),N=(0,u.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),B=(0,u.useMemo)(()=>(function(...e){return t=>{for(let r of e)"function"==typeof r?r(t):null!=r&&(r.current=t)}})(S,N),[N,S]);return V(()=>(j(e.isEditable()),e.registerEditableListener(e=>{j(e)})),[e]),(0,i.jsx)("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?r:"none","aria-controls":k?n:void 0,"aria-describedby":o,...null!=l?{"aria-errormessage":l}:{},"aria-expanded":k&&"combobox"===E?!!a:void 0,...null!=s?{"aria-invalid":s}:{},"aria-label":d,"aria-labelledby":c,"aria-multiline":f,"aria-owns":k?m:void 0,"aria-readonly":!k||void 0,"aria-required":p,autoCapitalize:h,className:g,contentEditable:k,"data-testid":C,id:y,ref:B,role:E,spellCheck:x,style:b,tabIndex:v,...w})});function G(e){return e.getEditorState().read(I(e.isComposing()))}let X=(0,u.forwardRef)(function(e,t){let{placeholder:r,...n}=e,[o]=(0,p.DF)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Y,{editor:o,...n,ref:t}),null!=r&&(0,i.jsx)(Q,{editor:o,content:r})]})});function Q({content:e,editor:t}){let r=function(e){let[t,r]=(0,u.useState)(()=>G(e));return V(()=>{function t(){r(G(e))}return t(),(0,h.Sdt)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[n,o]=(0,u.useState)(t.isEditable());if((0,u.useLayoutEffect)(()=>(o(t.isEditable()),t.registerEditableListener(e=>{o(e)})),[t]),!r)return null;let l=null;return"function"==typeof e?l=e(n):null!==e&&(l=e),null===l?null:(0,i.jsx)("div",{"aria-hidden":!0,children:l})}var ee=({anchorElem:e,clientProps:t,plugin:r})=>"floatingAnchorElem"===r.position&&e?r.Component&&(0,i.jsx)(r.Component,{anchorElem:e,clientProps:t}):r.Component&&(0,i.jsx)(r.Component,{clientProps:t}),et=e=>{if("fields"in e&&"object"==typeof e.fields&&null!==e.fields&&"id"in e.fields?e.fields.id=new W.default().toHexString():"id"in e&&(e.id=new W.default().toHexString()),e.children)for(let t of e.children)et(t)};function er(){let e=(0,b.c)(3),[t]=(0,p.DF)(),r,n;return e[0]!==t?(r=()=>t.registerCommand(h.u5G,e=>{let r=(0,h.vJq)();if((0,h.RTZ)(r)){let e=JSON.parse(JSON.stringify(r.getNodes()[0]?.exportJSON()));et(e);let n=JSON.stringify({namespace:t._config.namespace,nodes:[e]});return(0,q.lW)(t,null,{"application/x-lexical-editor":n,"text/plain":""}).catch(en),!0}return(0,q.lW)(t,(0,Z.xj)(e,ClipboardEvent)?e:null).then(()=>{if(!(e instanceof ClipboardEvent)||!e.clipboardData)throw Error("No clipboard event");let t=e.clipboardData.getData("application/x-lexical-editor");if(!t)return!0;let r=JSON.parse(t);for(let e of r.nodes)et(e);let n=JSON.stringify(r);e.clipboardData.setData("application/x-lexical-editor",n)}).catch(t=>{throw e instanceof ClipboardEvent&&e.clipboardData?.setData("application/x-lexical-editor",""),t}),!0},h.AcJ),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),(0,u.useEffect)(r,n),null}function en(e){throw e}function eo(){let e=(0,b.c)(3),[t]=(0,p.DF)(),r,n;return e[0]!==t?(r=()=>(0,h.Sdt)(t.registerCommand(h.d8p,eu,h.AcJ),t.registerCommand(h.w$Z,ec,h.AcJ),t.registerCommand(h.gCZ,ec,h.AcJ),t.registerCommand(h.MvL,ed,h.AcJ),t.registerCommand(h.UDz,ea,h.AcJ),t.registerCommand(h.bbF,ei,h.AcJ)),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),(0,u.useEffect)(r,n),null}function ei(e){let t=(0,h.vJq)();if((0,h.RTZ)(t)){e.preventDefault();let r=t.getNodes()[0]?.getNextSibling();if((0,h.Cyw)(r)){let e=(0,h.i0_)().getElementByKey(r.getKey());return e&&em({element:e,node:r}),!0}if(!(0,h.ff4)(r))return!0;let n=r.getFirstDescendant()??r;return n&&((0,h.BtT)(n,ep)?.selectEnd(),e.preventDefault()),!0}if(!(0,h.I2P)(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=(0,h.BtT)(r,el),o=n?.getNextSibling();if(!n||o!==eh(n))return!1;if((0,h.Cyw)(o)){let t=(0,h.i0_)().getElementByKey(o.getKey());if(t)return em({element:t,node:o}),e.preventDefault(),!0}return!1}function el(e){return null!==eh(e)}function ea(e){let t=(0,h.vJq)();if((0,h.RTZ)(t)){let r=t.getNodes()[0]?.getPreviousSibling();if((0,h.Cyw)(r)){let t=(0,h.i0_)().getElementByKey(r.getKey());return!!t&&(em({element:t,node:r}),e.preventDefault(),!0)}if(!(0,h.ff4)(r))return!1;let n=r.getLastDescendant()??r;return!!n&&((0,h.BtT)(n,ep)?.selectStart(),e.preventDefault(),!0)}if(!(0,h.I2P)(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=(0,h.BtT)(r,es),o=n?.getPreviousSibling();if(!n||o!==eg(n))return!1;if((0,h.Cyw)(o)){let t=(0,h.i0_)().getElementByKey(o.getKey());if(t)return em({element:t,node:o}),e.preventDefault(),!0}return!1}function es(e){return null!==eg(e)}function ed(){let e=function(){let e=(0,h.vJq)();if(!(0,h.RTZ)(e))return;let t=e.getNodes();if(1!==t.length)return;let r=t[0];return(0,h.Cyw)(r)?{decorator:r,element:(0,h.i0_)().getElementByKey(r.getKey())}:void 0}();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),!!e&&(e.element?.classList.add("decorator-selected"),!0)}function eu(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let r=(0,h.xL4)(t);return(0,h.Cyw)(r)?{element:t,node:r}:void 0}(e);if(!t)return!0;let{target:r}=e;return!(r instanceof HTMLElement)||r.isContentEditable||r.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?(0,h.n1P)(null):em(t),!0}function ec(e){let t=(0,h.vJq)();
1return!!(0,h.RTZ)(t)&&(e.preventDefault(),t.getNodes().forEach(ef),!0)}function ef(e){e.remove()}function em({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let r=(0,h.rUs)();r.add(t.getKey()),(0,h.n1P)(r),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function ep(e){if((0,h.Cyw)(e)&&!e.isInline())return!0;if(!(0,h.ff4)(e)||(0,h.IqF)(e))return!1;let t=e.getFirstChild(),r=null===t||(0,h.wH$)(t)||(0,h.kFe)(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&r}function eh(e){let t=e.getNextSibling();for(;null!==t;){if(ep(t))return t;t=t.getNextSibling()}return null}function eg(e){let t=e.getPreviousSibling();for(;null!==t;){if(ep(t))return t;t=t.getPreviousSibling()}return null}var ey=(e,t,r,n,o=50,i=25)=>{let l=0;if(e&&!e.contains(n)){let{bottom:n,left:a,right:s,top:d}=e.getBoundingClientRect(),u=d+window.scrollY,c=n+window.scrollY;if(r<u-i||r>c+i||t<a-o||t>s+o)return -1;(t<a||t>s)&&(l=t<a?t-a:t-s)}return l};function eE(e){let t=e.getBoundingClientRect(),r=getComputedStyle(e).getPropertyValue("transform");if(!r||"none"===r)return t;let n=r.split(",").pop();return t.y=t.y-Number(n?.replace(")","")),t}function ex(e){let t=(e,t)=>e?parseFloat(window.getComputedStyle(e)[t]):0,{marginBottom:r,marginTop:n}=window.getComputedStyle(e),o=t(e.previousElementSibling,"marginBottom"),i=t(e.nextElementSibling,"marginTop"),l=Math.max(parseFloat(n),o);return{marginBottom:Math.max(parseFloat(r),i),marginTop:l}}function eb(e){return e.getEditorState().read(()=>(0,h.NiT)().getChildrenKeys())}var ev={props:null,result:null};function eC(e){let{anchorElem:t,cache_threshold:r=20,editor:o,fuzzy:i=!1,horizontalOffset:l=0,point:{x:a,y:s},startIndex:d=0,useEdgeAsDefault:u=!1}=e;if(r>0&&ev.props&&ev.result&&ev.props.fuzzy===e.fuzzy&&ev.props.horizontalOffset===e.horizontalOffset&&ev.props.useEdgeAsDefault===e.useEdgeAsDefault&&function(e,t,r=20){let n=e.x-t.x,o=e.y-t.y;return n*n+o*o<=r*r}(ev.props.point,e.point,r))return ev.result;let c=t.getBoundingClientRect(),f=eb(o),m={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(u){let e=o.getElementByKey(f[0]),t=o.getElementByKey(f[f.length-1]);if(e&&t){let[r,n]=[eE(e),eE(t)];if(s<r.top?(m.blockElem=e,m.distance=r.top-s,m.blockNode=(0,h.nsf)(f[0]),m.foundAtIndex=0):s>n.bottom&&(m.distance=s-n.bottom,m.blockNode=(0,h.nsf)(f[f.length-1]),m.blockElem=t,m.foundAtIndex=f.length-1),m?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let t=d,r=0;for(;t>=0&&t<f.length;){let d=f[t],u=o.getElementByKey(d);if(null===u)break;let p=new n.f(a+l,s),g=n.k.fromDOMRect(eE(u)),{marginBottom:y,marginTop:E}=ex(u),{distance:x,isOnBottomSide:b,isOnTopSide:v}=g.generateNewRect({bottom:g.bottom+y,left:c.left,right:c.right,top:g.top-E}).distanceFromPoint(p);if(0===x){m.blockElem=u,m.blockNode=(0,h.nsf)(d),m.foundAtIndex=t,m.distance=x,m.blockNode&&"paragraph"===m.blockNode.getType()&&""===m.blockNode.getTextContent()&&(i||e.returnEmptyParagraphs||(m.blockElem=null,m.blockNode=null),m.isFoundNodeEmptyParagraph=!0);break}i&&x<m.distance&&(m.blockElem=u,m.blockNode=(0,h.nsf)(d),m.distance=x,m.foundAtIndex=t),0===r&&(r=v?-1:b?1:1/0),t+=r}}),ev.props=e,ev.result={blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph},{blockElem:m.blockElem,blockNode:m.blockNode,foundAtIndex:m.foundAtIndex,isFoundNodeEmptyParagraph:m.isFoundNodeEmptyParagraph}}function ew(e,t){return!!e.closest(`.${t}`)}var eS=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function ek(e,t,r,n=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let o=e.getBoundingClientRect(),i=window.getComputedStyle(e),l=t.getBoundingClientRect(),a=r.getBoundingClientRect(),s;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(t=>e.classList.contains(t)||e.firstElementChild?.classList.contains(t)))s=o.top+8-a.top;else{let t=!function(e){if(!e||eS.includes(e.tagName)||0===e.offsetHeight||0===e.offsetWidth)return!1;let t=window.getComputedStyle(e);return"table-cell"!==t.display&&"absolute"!==t.position&&"hidden"
1!==t.visibility&&"0"!==t.opacity}(e)?0:parseInt(i.lineHeight,10);s=o.top+(t-l.height)/2-a.top}t.style.opacity="1",t.style.transform=`translate(${n}px, ${s}px)`}var ej=1/0;function eN(e){let{anchorElem:t}=e,r=void 0===t?document.body:t,[l]=(0,p.DF)();return function(e,t,r){let l=t.parentElement,{editorConfig:a}=(0,o.b)(),s=a?.admin?.hideGutter?-24:12,d=(0,u.useRef)(null),[c,f]=(0,u.useState)(null);(0,u.useEffect)(()=>{function r(r){var o;let i=r.target;if(!(0,h.sby)(i))return;let a=ey(l,r.pageX,r.pageY,i);if(-1===a)return void f(null);if(ew(i,"add-block-menu"))return;let s=eb(e),{blockElem:d,blockNode:u,foundAtIndex:m}=eC({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-a,point:new n.f(r.x,r.y),returnEmptyParagraphs:!0,startIndex:0===(o=s.length)?1/0:ej>=0&&ej<o?ej:Math.floor(o/2),useEdgeAsDefault:!1});ej=m,d&&u&&(c?.node!==u||c?.elem!==d)&&f({elem:d,node:u})}return document?.addEventListener("mousemove",r),()=>{document?.removeEventListener("mousemove",r)}},[l,t,e,c]),(0,u.useEffect)(()=>{d.current&&c?.node&&ek(c?.elem,d.current,t,s)},[t,c,s]);let m=(0,u.useCallback)(t=>{let r=c;r?.node&&(e.update(()=>{let t=!0;if((r?.node.getType()!=="paragraph"||""!==r.node.getTextContent())&&(t=!1),!t){let t=(0,h.lJ7)();r?.node.insertAfter(t),setTimeout(()=>{f(r={elem:e.getElementByKey(t.getKey()),node:t})},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),r?.node&&"select"in r.node&&"function"==typeof r.node.select&&r.node.select()})},1),setTimeout(()=>{e.dispatchCommand(n.i,{node:r?.node})},2),t.stopPropagation(),t.preventDefault())},[e,c]);return(0,R.createPortal)((0,i.jsx)(u.Fragment,{children:(0,i.jsx)("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:e=>{m(e)},ref:d,type:"button",children:(0,i.jsx)("div",{className:r?"icon":""})})}),t)}(l,r,l._editable)}var eB=0,eD="application/x-lexical-drag-block",e_=1/0;function eP(e){return 0===e?1/0:e_>=0&&e_<e?e_:Math.floor(e/2)}function eT(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function eF(e){let{anchorElem:t}=e,r=void 0===t?document.body:t,[l]=(0,p.DF)();return function(e,t,r){let l=t.parentElement,a=(0,u.useRef)(null),s=(0,u.useRef)(null),d=(0,u.useRef)(null),c=(0,u.useRef)(!1),[f,m]=(0,u.useState)(null),[p,g]=(0,u.useState)(null),{editorConfig:y}=(0,o.b)(),E=y?.admin?.hideGutter?-44:-8;return(0,u.useEffect)(()=>{function r(r){let o=r.target;if(!(0,h.sby)(o))return;let i=ey(l,r.pageX,r.pageY,o);if(-1===i)return void m(null);if(ew(o,"draggable-block-menu"))return;let a=eb(e),{blockElem:s,foundAtIndex:d,isFoundNodeEmptyParagraph:u}=eC({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-i,point:new n.f(r.x,r.y),startIndex:eP(a.length),useEdgeAsDefault:!1,verbose:!1});e_=d,(s||u)&&f!==s&&m(s)}return document?.addEventListener("mousemove",r),()=>{document?.removeEventListener("mousemove",r)}},[l,t,e,f]),(0,u.useEffect)(()=>{a.current&&ek(f,a.current,t,E)},[t,f,E]),(0,u.useEffect)(()=>{function r(r){if(!c.current)return!1;let[o]=(0,M.gA)(r);if(o)return!1;let{pageY:i,target:d}=r;if(!(0,h.sby)(d))return!1;let u=ey(l,r.pageX,r.pageY,d,100,50),m=eb(e),{blockElem:x,foundAtIndex:b,isFoundNodeEmptyParagraph:v}=eC({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-u,point:new n.f(r.x,r.y),startIndex:eP(m.length),useEdgeAsDefault:!0,verbose:!0});e_=b;let C=s.current;if(null===x||null===C)return!1;if(f!==x){let{isBelow:e,willStayInSamePosition:n}=function(e,t,r,n,o,i,l,a=!1){let{height:s,top:d}=n.getBoundingClientRect(),{top:u,width:c}=l.getBoundingClientRect(),{marginBottom:f,marginTop:m}=ex(n),p=d,h=i>=d+s/2+window.scrollY,g=!1;if(o?.elem)if(n!==o?.elem)(h&&o?.elem&&o?.elem===n.nextElementSibling||!h&&o?.elem&&o?.elem===n.previousElementSibling)&&++eB<200&&(g=!0);else{eB++;let e=o?.boundingBox?.y,t=n.getBoundingClientRect().y;(h===o?.isBelow&&e===t||eB<200)&&(g=!1)}if(g)return{isBelow:h,willStayInSamePosition:g};a?p+=s/2:h?p+=s+f/2:p-=m/2;let y=0;a||(y=h?-0:0);let E=p-u+y;return r.style.width=`calc(${c}px - ${e})`,r.style.opacity=".8",r.style.transform=`translate(${-24-t}px, calc(${E}px - 2px))`,o?.elem&&(o.elem.style.opacity="",o?.elem===n?h?o.elem.style.marginTop="":o.elem.style.marginBottom="":(o.elem.style.marginBottom="",o.elem.style.marginTop="")),eB=0,{isBelow:h,willStayInSamePosition:g}}(y?.admin?.hideGutter?"0px":"3rem",E+(y?.admin?.hideGutter?a?.current?.getBoundingClientRect()?.width??0:-(a?.current?.getBoundingClientRect()?.width??0)),C,x,p,i,t,v);r.preventDefault(),n||g({boundingBox:x.getBoundingClientRect(),elem:x,isBelow:e})}else p?.elem&&(eT(C,p.elem),g({boundingBox:x.getBoundingClientRect(),elem:x,isBelow:!1}));return!0}function o(r){if(!c.current)return!1;let[o]=(0,M.gA)(r);if(o)return!1;let{dataTransfer:i,pageY:a,target:s}=r,d=i?.getData(eD)||"";return e.update(()=>{let o=(0,h.nsf)(d);if(!o||!(0,h.sby)(s))return!1;let{blockElem:i,isFoundNodeEmptyParagraph:u}=eC({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-ey(l,r.pageX,r.pageY,s,100,50),point:new n.f(r.x,r.y),useEdgeAsDefault:!0});if(!i)return!1;let c=(0,h.xL4)(i);if(!c)return!1;if(c===o)return!0;let{height:p,top:g}=eE(i),y=a>=g+p/2+window.scrollY;u?(c.insertBefore(o),c.remove()):y?c.insertAfter(o):c.insertBefore(o),null!==f&&m(null),document.querySelectorAll(".lexical-block-highlighter").forEach(e
1=>{e.remove()});let E=e.getElementByKey(o.getKey());setTimeout(()=>{let e=E?.getBoundingClientRect();if(!e)return;let t=document.createElement("div");t.className="lexical-block-highlighter",t.style.backgroundColor="var(--theme-elevation-1000",t.style.transition="opacity 0.5s ease-in-out",t.style.zIndex="1",t.style.pointerEvents="none",t.style.boxSizing="border-box",t.style.borderRadius="4px",t.style.position="absolute",document.body.appendChild(t),t.style.opacity="0.1",t.style.height=`${e.height+8}px`,t.style.width=`${e.width+8}px`,t.style.top=`${e.top+window.scrollY-4}px`,t.style.left=`${e.left-4}px`,setTimeout(()=>{t.style.opacity="0",setTimeout(()=>{t.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",r),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",r),document.removeEventListener("drop",o)}},[l,E,t,e,p,f,y?.admin?.hideGutter]),(0,R.createPortal)((0,i.jsxs)(u.Fragment,{children:[(0,i.jsx)("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:function(){c.current=!1,p?.elem&&eT(s.current,p?.elem)},onDragStart:function(t){let r=t.dataTransfer;if(!r||!f)return;!function(e,t){let{transform:r}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=r})}(r,f);let n="";e.update(()=>{let e=(0,h.xL4)(f);e&&(n=e.getKey())}),c.current=!0,r.setData(eD,n)},ref:a,type:"button",children:(0,i.jsx)("div",{className:r?"icon":""})}),(0,i.jsx)("div",{className:"draggable-block-target-line",ref:s}),(0,i.jsx)("div",{className:"debug-highlight",ref:d})]}),t)}(l,r,l._editable)}var eL="insert-paragraph-at-end",eR=()=>{let e,t=(0,b.c)(2),[r]=(0,p.DF)(),{editorConfig:n}=(0,o.b)();return n?.admin?.hideInsertParagraphAtEnd?null:(t[0]!==r?(e=(0,i.jsx)("div",{"aria-label":"Insert Paragraph",className:eL,onClick:()=>{r.update(eI)},role:"button",tabIndex:0,children:(0,i.jsx)("div",{className:`${eL}-inside`,children:(0,i.jsx)("span",{children:"+"})})}),t[0]=r,t[1]=e):e=t[1],e)};function eI(){let e=(0,h.lJ7)();(0,h.NiT)().append(e),e.select()}var eA=()=>{let e=(0,b.c)(4),{editorConfig:t}=(0,o.b)(),[r]=(0,p.DF)(),i,l;return e[0]!==r||e[1]!==t.features.markdownTransformers?(i=()=>(0,n.a)(r,t.features.markdownTransformers??[]),l=[r,t.features.markdownTransformers],e[0]=r,e[1]=t.features.markdownTransformers,e[2]=i,e[3]=l):(i=e[2],l=e[3]),u.useEffect(i,l),null};function eM(){let[e]=(0,p.DF)();return(0,u.useEffect)(()=>e.registerNodeTransform(h.haT,e=>{let t=(0,h.vJq)();if((0,h.I2P)(t)){let r=t.anchor.getNode(),n=t.focus.getNode();r.isAttached()&&n.isAttached()||(e.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}function eJ(){let[e]=(0,p.DF)();return(0,u.useEffect)(()=>e.registerCommand(h.HYn,()=>{if((0,h.vJq)())return!1;let e=document.activeElement;return e instanceof HTMLInputElement&&e.select(),!0},h.AcJ),[e]),null}var eO="slash-menu-popup";function eK({isSelected:e,item:t,onClick:r,onMouseEnter:n,ref:l}){let{fieldProps:{featureClientSchemaMap:a,schemaPath:s}}=(0,o.b)(),{i18n:d}=(0,U.d)(),u=`${eO}__item ${eO}__item-${t.key}`;e&&(u+=` ${eO}__item--selected`);let c=t.key;return t.label&&(c="function"==typeof t.label?t.label({featureClientSchemaMap:a,i18n:d,schemaPath:s}):t.label),c.length>25&&(c=c.substring(0,25)+"..."),(0,i.jsxs)("button",{"aria-selected":e,className:u,id:eO+"__item-"+t.key,onClick:r,onMouseEnter:n,ref:l,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&(0,i.jsx)(t.Icon,{}),(0,i.jsx)("span",{className:`${eO}__item-text`,children:c})]},t.key)}function ez({anchorElem:e=document.body}){let[t]=(0,p.DF)(),[r,l]=(0,u.useState)(null),{editorConfig:a}=(0,o.b)(),{i18n:s}=(0,U.d)(),{fieldProps:{featureClientSchemaMap:d,schemaPath:c}}=(0,o.b)(),f=function(e){let t=(0,b.c)(4),{maxLength:r,minLength:o}=e,i=void 0===r?75:r,l=void 0===o?1:o,a;return t[0]!==i||t[1]!==l||"/"!==t[2]?(a=e=>{let{query:t}
1=e,r=RegExp("(^|\\s|\\()([/]((?:"+("[^/"+n.h+"\\s]")+"){0,"+i+"}))$").exec(t);if(null!==r){let e=r[1],t=r[3];if(t.length>=l)return{leadOffset:r.index+e.length,matchingString:t,replaceableString:r[2]}}return null},t[0]=i,t[1]=l,t[2]="/",t[3]=a):a=t[3],a}({minLength:0}),m=(0,u.useCallback)(()=>{let e=[];for(let n of a.features.slashMenu.dynamicGroups)if(r){let o=n({editor:t,queryString:r});e=e.concat(o)}return e},[t,r,a?.features]),h=(0,u.useMemo)(()=>{let e=[];for(let t of a?.features.slashMenu.groups??[])e.push(t);if(r)for(let t of(e=(e=e.map(e=>{let t=e.items.filter(e=>{let t=e.key;return e.label&&(t="function"==typeof e.label?e.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):e.label),!!RegExp(r,"gi").exec(t)||null!=e.keywords&&e.keywords.some(e=>RegExp(r,"gi").exec(e))});return t.length?{...e,items:t}:null})).filter(e=>null!=e),m())){let r=e.find(e=>e.key===t.key);r?e=e.filter(e=>e.key!==t.key):r={...t,items:[]},r?.items?.length&&(r.items=r.items.concat(r.items)),e.push(r)}return e},[r,a?.features.slashMenu.groups,m,d,s,c]);return(0,i.jsx)(n.j,{anchorElem:e,groups:h,menuRenderFn:(e,{selectedItemKey:t,selectItemAndCleanUp:r,setSelectedItemKey:n})=>e.current&&h.length?R.createPortal((0,i.jsx)("div",{className:eO,children:h.map(e=>{let o=e.key;return e.label&&d&&(o="function"==typeof e.label?e.label({featureClientSchemaMap:d,i18n:s,schemaPath:c}):e.label),(0,i.jsxs)("div",{className:`${eO}__group ${eO}__group-${e.key}`,children:[(0,i.jsx)("div",{className:`${eO}__group-title`,children:o}),e.items.map((e,o)=>(0,i.jsx)(eK,{index:o,isSelected:t===e.key,item:e,onClick:()=>{n(e.key),r(e)},onMouseEnter:()=>{n(e.key)},ref:t=>{e.ref={current:t}}},e.key))]},e.key)})}),e.current):null,onQueryChange:l,triggerFn:f})}function e$(e){let t,r=(0,b.c)(6),{features:n}=e,[o]=(0,p.DF)(),i;return r[0]!==o||r[1]!==n.enabledFormats?(i=()=>{var e;let t,r,i=(e=n.enabledFormats,t=Object.keys(h.LZn),r=new Set(e),t.filter(e=>!r.has(e)));if(0!==i.length)return o.registerNodeTransform(h.Ey8,e=>{i.forEach(t=>{e.hasFormat(t)&&e.toggleFormat(t)})})},r[0]=o,r[1]=n.enabledFormats,r[2]=i):i=r[2],r[3]!==o||r[4]!==n?(t=[o,n],r[3]=o,r[4]=n,r[5]=t):t=r[5],(0,u.useEffect)(i,t),null}function eH(e){let t=(0,b.c)(5),{className:r,editorConfig:n}=e,{t:o}=(0,U.d)(),[,l]=(0,p.DF)(),{getTheme:a}=l,s;if(t[0]!==r||t[1]!==n?.admin?.placeholder||t[2]!==a||t[3]!==o){let e=a();s=(0,i.jsx)(X,{"aria-placeholder":o("lexical:general:placeholder"),className:r??"ContentEditable__root",placeholder:(0,i.jsx)("p",{className:e?.placeholder,children:n?.admin?.placeholder??o("lexical:general:placeholder")})}),t[0]=r,t[1]=n?.admin?.placeholder,t[2]=a,t[3]=o,t[4]=s}else s=t[4];return s}var eq=e=>{let t,r=(0,b.c)(13),{editorConfig:n,editorContainerRef:l,isSmallWidthViewport:a,onChange:s,rtl:d}=e,c=(0,o.b)(),[f]=(0,p.DF)(),m=(0,F.a)(),[g,y]=(0,u.useState)(null),E;r[0]===Symbol.for("react.memo_cache_sentinel")?(E=e=>{null!==e&&y(e)},r[0]=E):E=r[0];let x=E,v,C;return r[1]!==f||r[2]!==c?(v=()=>{if(!c?.uuid)return void console.error("Lexical Editor must be used within an EditorConfigProvider");c?.parentEditor?.uuid&&c.parentEditor?.registerChild(c.uuid,c);let e=f.registerCommand(h.$7r,()=>(c.focusEditor(c),!0),h.AcJ),t=f.registerCommand(h.I2H,()=>(c.blurEditor(c),!0),h.AcJ);return()=>{e(),t(),c.parentEditor?.unregisterChild?.(c.uuid)}},C=[f,c],r[1]=f,r[2]=c,r[3]=v,r[4]=C):(v=r[3],C=r[4]),(0,u.useEffect)(v,C),r[5]!==n||r[6]!==l||r[7]!==g||r[8]!==m||r[9]!==a||r[10]!==s||r[11]!==d?(t=(0,i.jsxs)(u.Fragment,{children:[n.features.plugins?.map(eZ),(0,i.jsxs)("div",{className:"editor-container",dir:d?"rtl":void 0,ref:l,children:[n.features.plugins?.map(eW),(0,i.jsx)($,{contentEditable:(0,i.jsx)("div",{className:"editor-scroller",children:(0,i.jsx)("div",{className:"editor",ref:x,children:(0,i.jsx)(eH,{editorConfig:n})})}),ErrorBoundary:S}),(0,i.jsx)(eM,{}),m&&(0,i.jsx)(eR,{}),(0,i.jsx)(eo,{}),(0,i.jsx)(er,{}),(0,i.jsx)(e$,{features:n.features}),(0,i.jsx)(eJ,{}),m&&(0,i.jsx)(T,{ignoreSelectionChange:!0,onChange:(e,t,r)=>{(!r.has("focus")||r.size>1)&&s?.(e,t,r)}}),g&&(0,i.jsxs)(u.Fragment,{children:[!a&&m&&(0,i.jsxs)(u.Fragment,{children:[n.admin?.hideDraggableBlockElement?null:(0,i.jsx)(eF,{anch
1orElem:g}),n.admin?.hideAddBlockButton?null:(0,i.jsx)(eN,{anchorElem:g})]}),n.features.plugins?.map(e=>{if("floatingAnchorElem"===e.position&&!(!0===e.desktopOnly&&a))return(0,i.jsx)(ee,{anchorElem:g,clientProps:e.clientProps,plugin:e},e.key)}),m&&(0,i.jsx)(u.Fragment,{children:(0,i.jsx)(ez,{anchorElem:g})})]}),m&&(0,i.jsxs)(u.Fragment,{children:[(0,i.jsx)(_,{}),n?.features?.markdownTransformers?.length>0&&(0,i.jsx)(eA,{})]}),n.features.plugins?.map(eU),n.features.plugins?.map(eV)]}),n.features.plugins?.map(eY)]}),r[5]=n,r[6]=l,r[7]=g,r[8]=m,r[9]=a,r[10]=s,r[11]=d,r[12]=t):t=r[12],t};function eZ(e){if("aboveContainer"===e.position)return(0,i.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eW(e){if("top"===e.position)return(0,i.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eU(e){if("normal"===e.position)return(0,i.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eV(e){if("bottom"===e.position)return(0,i.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}function eY(e){if("belowContainer"===e.position)return(0,i.jsx)(ee,{clientProps:e.clientProps,plugin:e},e.key)}var eG=({children:e,providers:t})=>{if(!t?.length)return e;let r=t[0];return t.length>1?(0,i.jsx)(r,{children:(0,i.jsx)(eG,{providers:t.slice(1),children:e})}):(0,i.jsx)(r,{children:e})},eX=e=>{let{composerKey:t,editorConfig:r,fieldProps:a,isSmallWidthViewport:s,onChange:d,readOnly:c,rtl:f,value:m}=e,p=(0,o.b)(),h=(0,l.useEditDepth)(),g=u.useRef(null),y=(0,u.useMemo)(()=>{if(m&&"object"!=typeof m)throw Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(m));if(m&&Array.isArray(m)&&!("root"in m))throw Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(m&&"jsonContent"in m)throw Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");return{editable:!0!==c,editorState:null!=m?JSON.stringify(m):void 0,namespace:r.lexical.namespace,nodes:(0,n.l)({editorConfig:r}),onError:e=>{throw e},theme:r.lexical.theme}},[r]);return y?(0,i.jsx)(x,{initialConfig:y,children:(0,i.jsx)(o.a,{editorConfig:r,editorContainerRef:g,fieldProps:a,parentContext:p?.editDepth===h?p:void 0,children:(0,i.jsx)(eG,{providers:r.features.providers,children:(0,i.jsx)(eq,{editorConfig:r,editorContainerRef:g,isSmallWidthViewport:s,onChange:d,rtl:f})})})},t+y.editable):(0,i.jsx)("p",{children:"Loading..."})},eQ="rich-text-lexical";function e0({error:e}){return(0,i.jsxs)("div",{className:"errorBoundary",role:"alert",children:[(0,i.jsx)("p",{children:"Something went wrong:"}),(0,i.jsx)("pre",{style:{color:"red"},children:e.message})]})}var e1=e=>{let{editorConfig:t,field:r,field:{admin:{className:o,description:c,readOnly:f}={},label:p,localized:h,required:g},path:y,readOnly:E,validate:x}=e,b=(0,l.useLocale)(),{config:{localization:v}}=(0,a.c)(),C=(0,l.isFieldRTL)({fieldLocalized:h,locale:b,localizationConfig:v||void 0}),w=(0,l.useEditDepth)(),S=(0,u.useCallback)((e,t)=>"function"!=typeof x||x(e,{...t,required:g}),[x,g]),{customComponents:{AfterInput:k,BeforeInput:j,Description:N,Error:B,Label:D}={},disabled:_,initialValue:P,path:T,setValue:F,showError:L,value:R}=(0,l.useField)({potentiallyStalePath:y,validate:S}),I=E||f||_,[A,M]=(0,u.useState)(!1),[J,O]=(0,u.useState)(),K=u.useRef(P),z=u.useRef(R);(0,u.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 768px)").matches;e!==A&&M(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[A]);let $=[eQ,"field-type",o,L&&"error",I&&`${eQ}--read-only`,t?.admin?.hideGutter!==!0&&!A?`${eQ}
1--show-gutter`:null].filter(Boolean).join(" "),H=`${T}.${w}`,q=(0,n.e)(),Z=(0,u.useCallback)(e=>{q(()=>{let t=e.toJSON();z.current=t,F(t)})},[F,q]),W=(0,u.useMemo)(()=>(0,s.FR)(r),[r]),U=(0,l.useEffectEvent)(e=>{z.current===R||(0,d.j)(null!=z.current?JSON.parse(JSON.stringify(z.current)):z.current,R)||(K.current=e,z.current=R,O(new Date))});return(0,u.useEffect)(()=>{Object.is(P,K.current)||U(P)},[P]),(0,i.jsxs)("div",{className:$,style:W,children:[(0,i.jsx)(l.RenderCustomComponent,{CustomComponent:B,Fallback:(0,i.jsx)(l.FieldError,{path:T,showError:L})}),D||(0,i.jsx)(l.FieldLabel,{label:p,localized:h,path:T,required:g}),(0,i.jsxs)("div",{className:`${eQ}__wrap`,children:[(0,i.jsxs)(m,{fallbackRender:e0,onReset:()=>{},children:[j,(0,i.jsx)(l.BulkUploadProvider,{drawerSlugPrefix:T,children:(0,i.jsx)(eX,{composerKey:H,editorConfig:t,fieldProps:e,isSmallWidthViewport:A,onChange:Z,readOnly:I,rtl:C,value:R},JSON.stringify({path:T,rerenderProviderKey:J}))}),k]}),(0,i.jsx)(l.RenderCustomComponent,{CustomComponent:N,Fallback:(0,i.jsx)(l.FieldDescription,{description:c,path:T})})]})]},H)}},51503:()=>{}}]);
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.