sykpcomposer 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/index.es.js +8477 -3945
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.umd.js +41 -22
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/src/components/Editor.d.ts +1 -1
  6. package/dist/src/components/plugins/AutoLinkPlugin.d.ts +1 -0
  7. package/dist/src/components/plugins/CodeHighlightPlugin.d.ts +1 -0
  8. package/dist/src/components/plugins/ListMaxIndentLevelPlugin.d.ts +3 -0
  9. package/dist/src/components/plugins/TreeViewPlugin.d.ts +1 -0
  10. package/dist/src/components/themes/ExampleTheme.d.ts +70 -0
  11. package/package.json +2 -2
  12. package/dist/src/components/ExampleTheme.d.ts +0 -43
  13. package/dist/src/components/hooks/useModal.d.ts +0 -12
  14. package/dist/src/components/plugins/PageMargin.d.ts +0 -14
  15. package/dist/src/components/plugins/PageMarginPlugin/CustomMarginDialog.d.ts +0 -13
  16. package/dist/src/components/plugins/PageMarginPlugin/index.d.ts +0 -46
  17. package/dist/src/components/plugins/ToolbarPlugin/TextAlignment.d.ts +0 -8
  18. package/dist/src/components/plugins/ToolbarPlugin/fontSize.d.ts +0 -12
  19. package/dist/src/components/ui/Button.d.ts +0 -17
  20. package/dist/src/components/ui/ContentEditable.d.ts +0 -12
  21. package/dist/src/components/ui/Dialog.d.ts +0 -15
  22. package/dist/src/components/ui/Divider.d.ts +0 -2
  23. package/dist/src/components/ui/DropDown.d.ts +0 -24
  24. package/dist/src/components/ui/Modal.d.ts +0 -14
  25. package/dist/src/components/ui/TextInput.d.ts +0 -19
  26. package/dist/src/utils/getSelectedNode.d.ts +0 -2
  27. package/dist/src/utils/joinClasses.d.ts +0 -8
  28. package/dist/style.css +0 -1
  29. /package/dist/src/components/plugins/{ToolbarPlugin/ToolbarPlugin.d.ts → ToolbarPlugin.d.ts} +0 -0
package/dist/index.umd.js CHANGED
@@ -1,42 +1,61 @@
1
- (function($e,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],L):($e=typeof globalThis<"u"?globalThis:$e||self,L($e.ViteButton={},$e.React,$e.ReactDOM))})(this,function($e,L,lr){"use strict";function il(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Re=il(L);var ar={exports:{}},ut={};/*
1
+ (function(_t,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],L):(_t=typeof globalThis<"u"?globalThis:_t||self,L(_t.ViteButton={},_t.React,_t.ReactDOM))})(this,function(_t,L,Jn){"use strict";function uu(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Yr=uu(L);var Ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zr={exports:{}},Bt={};/*
2
2
  object-assign
3
3
  (c) Sindre Sorhus
4
4
  @license MIT
5
- */var cr,Ei;function ki(){if(Ei)return cr;Ei=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var a=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(a.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return cr=i()?Object.assign:function(o,s){for(var l,a=r(o),c,u=1;u<arguments.length;u++){l=Object(arguments[u]);for(var d in l)e.call(l,d)&&(a[d]=l[d]);if(n){c=n(l);for(var f=0;f<c.length;f++)t.call(l,c[f])&&(a[c[f]]=l[c[f]])}}return a},cr}/** @license React v17.0.2
5
+ */var Xr,$s;function Ms(){if($s)return Xr;$s=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xr=i()?Object.assign:function(s,o){for(var a,l=r(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(n){u=n(a);for(var d=0;d<u.length;d++)t.call(a,u[d])&&(l[u[d]]=a[u[d]])}}return l},Xr}/** @license React v17.0.2
6
6
  * react-jsx-runtime.production.min.js
7
7
  *
8
8
  * Copyright (c) Facebook, Inc. and its affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
- */var Ni;function ol(){if(Ni)return ut;Ni=1,ki();var n=L,e=60103;if(ut.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;e=t("react.element"),ut.Fragment=t("react.fragment")}var r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,o={key:!0,ref:!0,__self:!0,__source:!0};function s(l,a,c){var u,d={},f=null,h=null;c!==void 0&&(f=""+c),a.key!==void 0&&(f=""+a.key),a.ref!==void 0&&(h=a.ref);for(u in a)i.call(a,u)&&!o.hasOwnProperty(u)&&(d[u]=a[u]);if(l&&l.defaultProps)for(u in a=l.defaultProps,a)d[u]===void 0&&(d[u]=a[u]);return{$$typeof:e,type:l,key:f,ref:h,props:d,_owner:r.current}}return ut.jsx=s,ut.jsxs=s,ut}var ur={};/** @license React v17.0.2
12
+ */var js;function cu(){if(js)return Bt;js=1,Ms();var n=L,e=60103;if(Bt.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;e=t("react.element"),Bt.Fragment=t("react.fragment")}var r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var c,f={},d=null,g=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(g=l.ref);for(c in l)i.call(l,c)&&!s.hasOwnProperty(c)&&(f[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:e,type:a,key:d,ref:g,props:f,_owner:r.current}}return Bt.jsx=o,Bt.jsxs=o,Bt}var Qr={};/** @license React v17.0.2
13
13
  * react-jsx-runtime.development.js
14
14
  *
15
15
  * Copyright (c) Facebook, Inc. and its affiliates.
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Pi;function sl(){return Pi||(Pi=1,function(n){process.env.NODE_ENV!=="production"&&function(){var e=L,t=ki(),r=60103,i=60106;n.Fragment=60107;var o=60108,s=60114,l=60109,a=60110,c=60112,u=60113,d=60120,f=60115,h=60116,g=60121,m=60122,_=60117,x=60129,v=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;r=y("react.element"),i=y("react.portal"),n.Fragment=y("react.fragment"),o=y("react.strict_mode"),s=y("react.profiler"),l=y("react.provider"),a=y("react.context"),c=y("react.forward_ref"),u=y("react.suspense"),d=y("react.suspense_list"),f=y("react.memo"),h=y("react.lazy"),g=y("react.block"),m=y("react.server.block"),_=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),x=y("react.debug_trace_mode"),y("react.offscreen"),v=y("react.legacy_hidden")}var C=typeof Symbol=="function"&&Symbol.iterator,T="@@iterator";function S(p){if(p===null||typeof p!="object")return null;var N=C&&p[C]||p[T];return typeof N=="function"?N:null}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(p){{for(var N=arguments.length,A=new Array(N>1?N-1:0),$=1;$<N;$++)A[$-1]=arguments[$];E("error",p,A)}}function E(p,N,A){{var $=P.ReactDebugCurrentFrame,V=$.getStackAddendum();V!==""&&(N+="%s",A=A.concat([V]));var J=A.map(function(z){return""+z});J.unshift("Warning: "+N),Function.prototype.apply.call(console[p],console,J)}}var M=!1;function R(p){return!!(typeof p=="string"||typeof p=="function"||p===n.Fragment||p===s||p===x||p===o||p===u||p===d||p===v||M||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===f||p.$$typeof===l||p.$$typeof===a||p.$$typeof===c||p.$$typeof===_||p.$$typeof===g||p[0]===m))}function q(p,N,A){var $=N.displayName||N.name||"";return p.displayName||($!==""?A+"("+$+")":A)}function H(p){return p.displayName||"Context"}function W(p){if(p==null)return null;if(typeof p.tag=="number"&&k("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case n.Fragment:return"Fragment";case i:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case a:var N=p;return H(N)+".Consumer";case l:var A=p;return H(A._context)+".Provider";case c:return q(p,p.render,"ForwardRef");case f:return W(p.type);case g:return W(p._render);case h:{var $=p,V=$._payload,J=$._init;try{return W(J(V))}catch{return null}}}return null}var Y=0,ce,Ie,qe,an,cn,un,Et;function kt(){}kt.__reactDisabledLog=!0;function Nt(){{if(Y===0){ce=console.log,Ie=console.info,qe=console.warn,an=console.error,cn=console.group,un=console.groupCollapsed,Et=console.groupEnd;var p={configurable:!0,enumerable:!0,value:kt,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}Y++}}function Pt(){{if(Y--,Y===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},p,{value:ce}),info:t({},p,{value:Ie}),warn:t({},p,{value:qe}),error:t({},p,{value:an}),group:t({},p,{value:cn}),groupCollapsed:t({},p,{value:un}),groupEnd:t({},p,{value:Et})})}Y<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=P.ReactCurrentDispatcher,at;function Ne(p,N,A){{if(at===void 0)try{throw Error()}catch(V){var $=V.stack.trim().match(/\n( *(at )?)/);at=$&&$[1]||""}return`
20
- `+at+p}}var Ge=!1,ct;{var ou=typeof WeakMap=="function"?WeakMap:Map;ct=new ou}function Vs(p,N){if(!p||Ge)return"";{var A=ct.get(p);if(A!==void 0)return A}var $;Ge=!0;var V=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=pe.current,pe.current=null,Nt();try{if(N){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(Me){$=Me}Reflect.construct(p,[],z)}else{try{z.call()}catch(Me){$=Me}p.call(z.prototype)}}else{try{throw Error()}catch(Me){$=Me}p()}}catch(Me){if(Me&&$&&typeof Me.stack=="string"){for(var B=Me.stack.split(`
21
- `),ue=$.stack.split(`
22
- `),X=B.length-1,Q=ue.length-1;X>=1&&Q>=0&&B[X]!==ue[Q];)Q--;for(;X>=1&&Q>=0;X--,Q--)if(B[X]!==ue[Q]){if(X!==1||Q!==1)do if(X--,Q--,Q<0||B[X]!==ue[Q]){var Fe=`
23
- `+B[X].replace(" at new "," at ");return typeof p=="function"&&ct.set(p,Fe),Fe}while(X>=1&&Q>=0);break}}}finally{Ge=!1,pe.current=J,Pt(),Error.prepareStackTrace=V}var Dt=p?p.displayName||p.name:"",rl=Dt?Ne(Dt):"";return typeof p=="function"&&ct.set(p,rl),rl}function Js(p,N,A){return Vs(p,!1)}function su(p){var N=p.prototype;return!!(N&&N.isReactComponent)}function or(p,N,A){if(p==null)return"";if(typeof p=="function")return Vs(p,su(p));if(typeof p=="string")return Ne(p);switch(p){case u:return Ne("Suspense");case d:return Ne("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case c:return Js(p.render);case f:return or(p.type,N,A);case g:return Js(p._render);case h:{var $=p,V=$._payload,J=$._init;try{return or(J(V),N,A)}catch{}}}return""}var Hs={},Ys=P.ReactDebugCurrentFrame;function sr(p){if(p){var N=p._owner,A=or(p.type,p._source,N?N.type:null);Ys.setExtraStackFrame(A)}else Ys.setExtraStackFrame(null)}function lu(p,N,A,$,V){{var J=Function.call.bind(Object.prototype.hasOwnProperty);for(var z in p)if(J(p,z)){var B=void 0;try{if(typeof p[z]!="function"){var ue=Error(($||"React class")+": "+A+" type `"+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ue.name="Invariant Violation",ue}B=p[z](N,z,$,A,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){B=X}B&&!(B instanceof Error)&&(sr(V),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$||"React class",A,z,typeof B),sr(null)),B instanceof Error&&!(B.message in Hs)&&(Hs[B.message]=!0,sr(V),k("Failed %s type: %s",A,B.message),sr(null))}}}var fn=P.ReactCurrentOwner,bi=Object.prototype.hasOwnProperty,au={key:!0,ref:!0,__self:!0,__source:!0},qs,Gs,Ci;Ci={};function cu(p){if(bi.call(p,"ref")){var N=Object.getOwnPropertyDescriptor(p,"ref").get;if(N&&N.isReactWarning)return!1}return p.ref!==void 0}function uu(p){if(bi.call(p,"key")){var N=Object.getOwnPropertyDescriptor(p,"key").get;if(N&&N.isReactWarning)return!1}return p.key!==void 0}function fu(p,N){if(typeof p.ref=="string"&&fn.current&&N&&fn.current.stateNode!==N){var A=W(fn.current.type);Ci[A]||(k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(fn.current.type),p.ref),Ci[A]=!0)}}function du(p,N){{var A=function(){qs||(qs=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};A.isReactWarning=!0,Object.defineProperty(p,"key",{get:A,configurable:!0})}}function hu(p,N){{var A=function(){Gs||(Gs=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};A.isReactWarning=!0,Object.defineProperty(p,"ref",{get:A,configurable:!0})}}var gu=function(p,N,A,$,V,J,z){var B={$$typeof:r,type:p,key:N,ref:A,props:z,_owner:J};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function pu(p,N,A,$,V){{var J,z={},B=null,ue=null;A!==void 0&&(B=""+A),uu(N)&&(B=""+N.key),cu(N)&&(ue=N.ref,fu(N,V));for(J in N)bi.call(N,J)&&!au.hasOwnProperty(J)&&(z[J]=N[J]);if(p&&p.defaultProps){var X=p.defaultProps;for(J in X)z[J]===void 0&&(z[J]=X[J])}if(B||ue){var Q=typeof p=="function"?p.displayName||p.name||"Unknown":p;B&&du(z,Q),ue&&hu(z,Q)}return gu(p,B,ue,V,$,fn.current,z)}}var wi=P.ReactCurrentOwner,Xs=P.ReactDebugCurrentFrame;function Ot(p){if(p){var N=p._owner,A=or(p.type,p._source,N?N.type:null);Xs.setExtraStackFrame(A)}else Xs.setExtraStackFrame(null)}var Si;Si=!1;function Ti(p){return typeof p=="object"&&p!==null&&p.$$typeof===r}function Zs(){{if(wi.current){var p=W(wi.current.type);if(p)return`
19
+ */var zs;function du(){return zs||(zs=1,function(n){process.env.NODE_ENV!=="production"&&function(){var e=L,t=Ms(),r=60103,i=60106;n.Fragment=60107;var s=60108,o=60114,a=60109,l=60110,u=60112,c=60113,f=60120,d=60115,g=60116,h=60121,m=60122,_=60117,b=60129,p=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;r=y("react.element"),i=y("react.portal"),n.Fragment=y("react.fragment"),s=y("react.strict_mode"),o=y("react.profiler"),a=y("react.provider"),l=y("react.context"),u=y("react.forward_ref"),c=y("react.suspense"),f=y("react.suspense_list"),d=y("react.memo"),g=y("react.lazy"),h=y("react.block"),m=y("react.server.block"),_=y("react.fundamental"),y("react.scope"),y("react.opaque.id"),b=y("react.debug_trace_mode"),y("react.offscreen"),p=y("react.legacy_hidden")}var x=typeof Symbol=="function"&&Symbol.iterator,w="@@iterator";function S(v){if(v===null||typeof v!="object")return null;var F=x&&v[x]||v[w];return typeof F=="function"?F:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(v){{for(var F=arguments.length,D=new Array(F>1?F-1:0),j=1;j<F;j++)D[j-1]=arguments[j];E("error",v,D)}}function E(v,F,D){{var j=C.ReactDebugCurrentFrame,Q=j.getStackAddendum();Q!==""&&(F+="%s",D=D.concat([Q]));var ee=D.map(function(V){return""+V});ee.unshift("Warning: "+F),Function.prototype.apply.call(console[v],console,ee)}}var I=!1;function M(v){return!!(typeof v=="string"||typeof v=="function"||v===n.Fragment||v===o||v===b||v===s||v===c||v===f||v===p||I||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===d||v.$$typeof===a||v.$$typeof===l||v.$$typeof===u||v.$$typeof===_||v.$$typeof===h||v[0]===m))}function K(v,F,D){var j=F.displayName||F.name||"";return v.displayName||(j!==""?D+"("+j+")":D)}function G(v){return v.displayName||"Context"}function z(v){if(v==null)return null;if(typeof v.tag=="number"&&k("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case n.Fragment:return"Fragment";case i:return"Portal";case o:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case l:var F=v;return G(F)+".Consumer";case a:var D=v;return G(D._context)+".Provider";case u:return K(v,v.render,"ForwardRef");case d:return z(v.type);case h:return z(v._render);case g:{var j=v,Q=j._payload,ee=j._init;try{return z(ee(Q))}catch{return null}}}return null}var U=0,W,Y,J,fe,je,ze,ue;function Be(){}Be.__reactDisabledLog=!0;function ye(){{if(U===0){W=console.log,Y=console.info,J=console.warn,fe=console.error,je=console.group,ze=console.groupCollapsed,ue=console.groupEnd;var v={configurable:!0,enumerable:!0,value:Be,writable:!0};Object.defineProperties(console,{info:v,log:v,warn:v,error:v,group:v,groupCollapsed:v,groupEnd:v})}U++}}function Ke(){{if(U--,U===0){var v={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},v,{value:W}),info:t({},v,{value:Y}),warn:t({},v,{value:J}),error:t({},v,{value:fe}),group:t({},v,{value:je}),groupCollapsed:t({},v,{value:ze}),groupEnd:t({},v,{value:ue})})}U<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var be=C.ReactCurrentDispatcher,He;function Re(v,F,D){{if(He===void 0)try{throw Error()}catch(Q){var j=Q.stack.trim().match(/\n( *(at )?)/);He=j&&j[1]||""}return`
20
+ `+He+v}}var Qe=!1,et;{var an=typeof WeakMap=="function"?WeakMap:Map;et=new an}function Vr(v,F){if(!v||Qe)return"";{var D=et.get(v);if(D!==void 0)return D}var j;Qe=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=be.current,be.current=null,ye();try{if(F){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(mt){j=mt}Reflect.construct(v,[],V)}else{try{V.call()}catch(mt){j=mt}v.call(V.prototype)}}else{try{throw Error()}catch(mt){j=mt}v()}}catch(mt){if(mt&&j&&typeof mt.stack=="string"){for(var H=mt.stack.split(`
21
+ `),Ne=j.stack.split(`
22
+ `),oe=H.length-1,ce=Ne.length-1;oe>=1&&ce>=0&&H[oe]!==Ne[ce];)ce--;for(;oe>=1&&ce>=0;oe--,ce--)if(H[oe]!==Ne[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,ce<0||H[oe]!==Ne[ce]){var pt=`
23
+ `+H[oe].replace(" at new "," at ");return typeof v=="function"&&et.set(v,pt),pt}while(oe>=1&&ce>=0);break}}}finally{Qe=!1,be.current=ee,Ke(),Error.prepareStackTrace=Q}var cn=v?v.displayName||v.name:"",tu=cn?Re(cn):"";return typeof v=="function"&&et.set(v,tu),tu}function ln(v,F,D){return Vr(v,!1)}function Xf(v){var F=v.prototype;return!!(F&&F.isReactComponent)}function qr(v,F,D){if(v==null)return"";if(typeof v=="function")return Vr(v,Xf(v));if(typeof v=="string")return Re(v);switch(v){case c:return Re("Suspense");case f:return Re("SuspenseList")}if(typeof v=="object")switch(v.$$typeof){case u:return ln(v.render);case d:return qr(v.type,F,D);case h:return ln(v._render);case g:{var j=v,Q=j._payload,ee=j._init;try{return qr(ee(Q),F,D)}catch{}}}return""}var Hl={},Jl=C.ReactDebugCurrentFrame;function Gr(v){if(v){var F=v._owner,D=qr(v.type,v._source,F?F.type:null);Jl.setExtraStackFrame(D)}else Jl.setExtraStackFrame(null)}function Qf(v,F,D,j,Q){{var ee=Function.call.bind(Object.prototype.hasOwnProperty);for(var V in v)if(ee(v,V)){var H=void 0;try{if(typeof v[V]!="function"){var Ne=Error((j||"React class")+": "+D+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ne.name="Invariant Violation",Ne}H=v[V](F,V,j,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){H=oe}H&&!(H instanceof Error)&&(Gr(Q),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",D,V,typeof H),Gr(null)),H instanceof Error&&!(H.message in Hl)&&(Hl[H.message]=!0,Gr(Q),k("Failed %s type: %s",D,H.message),Gr(null))}}}var Hn=C.ReactCurrentOwner,Os=Object.prototype.hasOwnProperty,eg={key:!0,ref:!0,__self:!0,__source:!0},Vl,ql,Ps;Ps={};function tg(v){if(Os.call(v,"ref")){var F=Object.getOwnPropertyDescriptor(v,"ref").get;if(F&&F.isReactWarning)return!1}return v.ref!==void 0}function ng(v){if(Os.call(v,"key")){var F=Object.getOwnPropertyDescriptor(v,"key").get;if(F&&F.isReactWarning)return!1}return v.key!==void 0}function rg(v,F){if(typeof v.ref=="string"&&Hn.current&&F&&Hn.current.stateNode!==F){var D=z(Hn.current.type);Ps[D]||(k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',z(Hn.current.type),v.ref),Ps[D]=!0)}}function ig(v,F){{var D=function(){Vl||(Vl=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};D.isReactWarning=!0,Object.defineProperty(v,"key",{get:D,configurable:!0})}}function sg(v,F){{var D=function(){ql||(ql=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};D.isReactWarning=!0,Object.defineProperty(v,"ref",{get:D,configurable:!0})}}var og=function(v,F,D,j,Q,ee,V){var H={$$typeof:r,type:v,key:F,ref:D,props:V,_owner:ee};return H._store={},Object.defineProperty(H._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(H,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(H,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.freeze&&(Object.freeze(H.props),Object.freeze(H)),H};function ag(v,F,D,j,Q){{var ee,V={},H=null,Ne=null;D!==void 0&&(H=""+D),ng(F)&&(H=""+F.key),tg(F)&&(Ne=F.ref,rg(F,Q));for(ee in F)Os.call(F,ee)&&!eg.hasOwnProperty(ee)&&(V[ee]=F[ee]);if(v&&v.defaultProps){var oe=v.defaultProps;for(ee in oe)V[ee]===void 0&&(V[ee]=oe[ee])}if(H||Ne){var ce=typeof v=="function"?v.displayName||v.name||"Unknown":v;H&&ig(V,ce),Ne&&sg(V,ce)}return og(v,H,Ne,Q,j,Hn.current,V)}}var Ls=C.ReactCurrentOwner,Gl=C.ReactDebugCurrentFrame;function un(v){if(v){var F=v._owner,D=qr(v.type,v._source,F?F.type:null);Gl.setExtraStackFrame(D)}else Gl.setExtraStackFrame(null)}var Rs;Rs=!1;function Is(v){return typeof v=="object"&&v!==null&&v.$$typeof===r}function Yl(){{if(Ls.current){var v=z(Ls.current.type);if(v)return`
24
24
 
25
- Check the render method of \``+p+"`."}return""}}function mu(p){{if(p!==void 0){var N=p.fileName.replace(/^.*[\\\/]/,""),A=p.lineNumber;return`
25
+ Check the render method of \``+v+"`."}return""}}function lg(v){{if(v!==void 0){var F=v.fileName.replace(/^.*[\\\/]/,""),D=v.lineNumber;return`
26
26
 
27
- Check your code at `+N+":"+A+"."}return""}}var Qs={};function _u(p){{var N=Zs();if(!N){var A=typeof p=="string"?p:p.displayName||p.name;A&&(N=`
27
+ Check your code at `+F+":"+D+"."}return""}}var Zl={};function ug(v){{var F=Yl();if(!F){var D=typeof v=="string"?v:v.displayName||v.name;D&&(F=`
28
28
 
29
- Check the top-level render call using <`+A+">.")}return N}}function el(p,N){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var A=_u(N);if(Qs[A])return;Qs[A]=!0;var $="";p&&p._owner&&p._owner!==wi.current&&($=" It was passed a child from "+W(p._owner.type)+"."),Ot(p),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',A,$),Ot(null)}}function tl(p,N){{if(typeof p!="object")return;if(Array.isArray(p))for(var A=0;A<p.length;A++){var $=p[A];Ti($)&&el($,N)}else if(Ti(p))p._store&&(p._store.validated=!0);else if(p){var V=S(p);if(typeof V=="function"&&V!==p.entries)for(var J=V.call(p),z;!(z=J.next()).done;)Ti(z.value)&&el(z.value,N)}}}function yu(p){{var N=p.type;if(N==null||typeof N=="string")return;var A;if(typeof N=="function")A=N.propTypes;else if(typeof N=="object"&&(N.$$typeof===c||N.$$typeof===f))A=N.propTypes;else return;if(A){var $=W(N);lu(A,p.props,"prop",$,p)}else if(N.PropTypes!==void 0&&!Si){Si=!0;var V=W(N);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",V||"Unknown")}typeof N.getDefaultProps=="function"&&!N.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vu(p){{for(var N=Object.keys(p.props),A=0;A<N.length;A++){var $=N[A];if($!=="children"&&$!=="key"){Ot(p),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Ot(null);break}}p.ref!==null&&(Ot(p),k("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function nl(p,N,A,$,V,J){{var z=R(p);if(!z){var B="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(B+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ue=mu(V);ue?B+=ue:B+=Zs();var X;p===null?X="null":Array.isArray(p)?X="array":p!==void 0&&p.$$typeof===r?(X="<"+(W(p.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):X=typeof p,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",X,B)}var Q=pu(p,N,A,V,J);if(Q==null)return Q;if(z){var Fe=N.children;if(Fe!==void 0)if($)if(Array.isArray(Fe)){for(var Dt=0;Dt<Fe.length;Dt++)tl(Fe[Dt],p);Object.freeze&&Object.freeze(Fe)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tl(Fe,p)}return p===n.Fragment?vu(Q):yu(Q),Q}}function xu(p,N,A){return nl(p,N,A,!0)}function bu(p,N,A){return nl(p,N,A,!1)}var Cu=bu,wu=xu;n.jsx=Cu,n.jsxs=wu}()}(ur)),ur}process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=sl();var w=ar.exports;function ll(n){return{}}const dn={},al={},Oi={},Xe={},ft={},hn={},dt={},fr={},dr={},Lt={},jt={},fe={},gn={},pn={},cl={},Di={},ul={},Li={},fl={},ji={},Ai={},mn={},dl={},Ii={},Fi={},Mi={},hl={},gl={},$i={},hr={},Ri={},me={},Wi={},Bi={},pl={},_n={},gr={},pr={},ml={},_l={},At={},It={},yl={},vl={},xl={},_e=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,bl=_e&&"documentMode"in document?document.documentMode:null,ye=_e&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),We=_e&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),yn=!(!_e||!("InputEvent"in window)||bl)&&"getTargetRanges"in new window.InputEvent("input"),mr=_e&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),vn=_e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Cl=_e&&/Android/.test(navigator.userAgent),zi=_e&&/^(?=.*Chrome).*/i.test(navigator.userAgent),wl=_e&&Cl&&zi,_r=_e&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!zi,Ft=1,Be=3,Ze=0,Ki=1,ht=2,Sl=0,Tl=1,El=2,xn=4,bn=8,yr=128,kl=112|(3|xn|bn)|yr,vr=1,xr=2,br=3,Cr=4,wr=5,Sr=6,Cn=mr||vn||_r?" ":"​",Pe=`
29
+ Check the top-level render call using <`+D+">.")}return F}}function Xl(v,F){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var D=ug(F);if(Zl[D])return;Zl[D]=!0;var j="";v&&v._owner&&v._owner!==Ls.current&&(j=" It was passed a child from "+z(v._owner.type)+"."),un(v),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,j),un(null)}}function Ql(v,F){{if(typeof v!="object")return;if(Array.isArray(v))for(var D=0;D<v.length;D++){var j=v[D];Is(j)&&Xl(j,F)}else if(Is(v))v._store&&(v._store.validated=!0);else if(v){var Q=S(v);if(typeof Q=="function"&&Q!==v.entries)for(var ee=Q.call(v),V;!(V=ee.next()).done;)Is(V.value)&&Xl(V.value,F)}}}function cg(v){{var F=v.type;if(F==null||typeof F=="string")return;var D;if(typeof F=="function")D=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===u||F.$$typeof===d))D=F.propTypes;else return;if(D){var j=z(F);Qf(D,v.props,"prop",j,v)}else if(F.PropTypes!==void 0&&!Rs){Rs=!0;var Q=z(F);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Q||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dg(v){{for(var F=Object.keys(v.props),D=0;D<F.length;D++){var j=F[D];if(j!=="children"&&j!=="key"){un(v),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),un(null);break}}v.ref!==null&&(un(v),k("Invalid attribute `ref` supplied to `React.Fragment`."),un(null))}}function eu(v,F,D,j,Q,ee){{var V=M(v);if(!V){var H="";(v===void 0||typeof v=="object"&&v!==null&&Object.keys(v).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ne=lg(Q);Ne?H+=Ne:H+=Yl();var oe;v===null?oe="null":Array.isArray(v)?oe="array":v!==void 0&&v.$$typeof===r?(oe="<"+(z(v.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof v,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,H)}var ce=ag(v,F,D,Q,ee);if(ce==null)return ce;if(V){var pt=F.children;if(pt!==void 0)if(j)if(Array.isArray(pt)){for(var cn=0;cn<pt.length;cn++)Ql(pt[cn],v);Object.freeze&&Object.freeze(pt)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ql(pt,v)}return v===n.Fragment?dg(ce):cg(ce),ce}}function fg(v,F,D){return eu(v,F,D,!0)}function gg(v,F,D){return eu(v,F,D,!1)}var hg=gg,pg=fg;n.jsx=hg,n.jsxs=pg}()}(Qr)),Qr}process.env.NODE_ENV==="production"?Zr.exports=cu():Zr.exports=du();var N=Zr.exports;const fu={ltr:"ltr",rtl:"rtl",placeholder:"editor-placeholder",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listitem"},image:"editor-image",link:"editor-link",text:{bold:"editor-text-bold",italic:"editor-text-italic",overflowed:"editor-text-overflowed",hashtag:"editor-text-hashtag",underline:"editor-text-underline",strikethrough:"editor-text-strikethrough",underlineStrikethrough:"editor-text-underlineStrikethrough",code:"editor-text-code"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}};function gu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var hu=gu(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Bs=L.createContext(null);function pu(n,e){let t=null;return n!=null&&(t=n[1]),{getTheme:function(){return e??(t!=null?t.getTheme():null)}}}function we(){const n=L.useContext(Bs);return n==null&&hu(8),n}function dn(n){return{}}const fn={},mu={},ei={},Ft={},Ut={},gn={},Wt={},Vn={},ti={},hn={},pn={},Ie={},qn={},Gn={},_u={},Us={},ni={},Ws={},Yn={},Kt={},Zn={},Xn={},yu={},ri={},Ks={},ii={},Hs={},si={},yt={},Ht={},Js={},mn={},Vs={},qs={},bu={},Qn={},oi={},ai={},vu={},xu={},_n={},yn={},Su={},wu={},Cu={},Je=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Eu=Je&&"documentMode"in document?document.documentMode:null,Ve=Je&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),bt=Je&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),er=!(!Je||!("InputEvent"in window)||Eu)&&"getTargetRanges"in new window.InputEvent("input"),li=Je&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),tr=Je&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ku=Je&&/Android/.test(navigator.userAgent),Gs=Je&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Tu=Je&&ku&&Gs,ui=Je&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Gs,bn=1,vt=3,Ot=0,Ys=1,Jt=2,Nu=0,Au=1,Fu=2,nr=4,rr=8,ci=128,Ou=112|(3|nr|rr)|ci,di=1,fi=2,gi=3,hi=4,pi=5,mi=6,ir=li||tr||ui?" ":"​",at=`
30
30
 
31
- `,Nl=We?" ":Cn,Ui="֑-߿יִ-﷽ﹰ-ﻼ",Vi="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Pl=new RegExp("^[^"+Vi+"]*["+Ui+"]"),Ol=new RegExp("^[^"+Ui+"]*["+Vi+"]"),Oe={bold:1,code:16,highlight:yr,italic:2,strikethrough:xn,subscript:32,superscript:64,underline:bn},Dl={directionless:1,unmergeable:2},Ji={center:xr,end:Sr,justify:Cr,left:vr,right:br,start:wr},Ll={[xr]:"center",[Sr]:"end",[Cr]:"justify",[vr]:"left",[br]:"right",[wr]:"start"},jl={normal:0,segmented:2,token:1},Al={[Sl]:"normal",[El]:"segmented",[Tl]:"token"};function Il(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var j=Il(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function wn(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const Fl=100;let Tr=!1,Er=0;function Ml(n){Er=n.timeStamp}function kr(n,e,t){return e.__lexicalLineBreak===n||n[`__lexicalKey_${t._key}`]!==void 0}function $l(n,e,t){const r=Se(t._window);let i=null,o=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,o=r.focusOffset);const s=n.nodeValue;s!==null&&jr(e,s,i,o,!1)}function Rl(n,e,t){if(O(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return e.nodeType===Be&&t.isAttached()}function Hi(n,e,t){Tr=!0;const r=performance.now()-Er>Fl;try{ge(n,()=>{const i=F()||function(f){return f.getEditorState().read(()=>{const h=F();return h!==null?h.clone():null})}(n),o=new Map,s=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let c=!1,u="";for(let f=0;f<e.length;f++){const h=e[f],g=h.type,m=h.target;let _=et(m,l);if(!(_===null&&m!==s||U(_))){if(g==="characterData")r&&D(_)&&Rl(i,m,_)&&$l(m,_,n);else if(g==="childList"){c=!0;const x=h.addedNodes;for(let C=0;C<x.length;C++){const T=x[C],S=no(T),P=T.parentNode;if(P!=null&&T!==a&&S===null&&(T.nodeName!=="BR"||!kr(T,P,n))){if(We){const k=T.innerText||T.nodeValue;k&&(u+=k)}P.removeChild(T)}}const v=h.removedNodes,y=v.length;if(y>0){let C=0;for(let T=0;T<y;T++){const S=v[T];(S.nodeName==="BR"&&kr(S,m,n)||a===S)&&(m.appendChild(S),C++)}y!==C&&(m===s&&(_=oo(l)),o.set(m,_))}}}}if(o.size>0)for(const[f,h]of o)if(b(h)){const g=h.getChildrenKeys();let m=f.firstChild;for(let _=0;_<g.length;_++){const x=g[_],v=n.getElementByKey(x);v!==null&&(m==null?(f.appendChild(v),m=v):m!==v&&f.replaceChild(v,m),m=m.nextSibling)}}else D(h)&&h.markDirty();const d=t.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],g=h.addedNodes,m=h.target;for(let _=0;_<g.length;_++){const x=g[_],v=x.parentNode;v==null||x.nodeName!=="BR"||kr(x,m,n)||v.removeChild(x)}}t.takeRecords()}i!==null&&(c&&(i.dirty=!0,we(i)),We&&mo(n)&&i.insertRawText(u))})}finally{Tr=!1}}function Yi(n){const e=n._observer;e!==null&&Hi(n,e.takeRecords(),e)}function qi(n){(function(e){Er===0&&On(e).addEventListener("textInput",Ml,!0)})(n),n._observer=new MutationObserver((e,t)=>{Hi(n,e,t)})}function Gi(n,e){const t=n.__mode,r=n.__format,i=n.__style,o=e.__mode,s=e.__format,l=e.__style;return!(t!==null&&t!==o||r!==null&&r!==s||i!==null&&i!==l)}function Xi(n,e){const t=n.mergeWithSibling(e),r=G()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Zi(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Gi(e,r)){r=Xi(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Gi(r,t)){r=Xi(r,t);break}break}t.remove()}}else r.remove()}function Qi(n){return eo(n.anchor),eo(n.focus),n}function eo(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),D(r)){n.set(r.__key,i?r.getTextContentSize():0,"text");break}if(!b(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element")}}let Wl=1;const Bl=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function Nr(n){const e=document.activeElement;if(e===null)return!1;const t=e.nodeName;return U(et(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&Sn(e)==null)}function Mt(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!Nr(e)&&to(e)===n}catch{return!1}}function Pr(n){return n instanceof Hn}function to(n){let e=n;for(;e!=null;){const t=Sn(e);if(Pr(t))return t;e=Pn(e)}return null}function Sn(n){return n?n.__lexicalEditor:null}function De(n){return n.isToken()||n.isSegmented()}function zl(n){return n.nodeType===Be}function Tn(n){let e=n;for(;e!=null;){if(zl(e))return e;e=e.firstChild}return null}function Or(n,e,t){const r=Oe[e];if(t!==null&&(n&r)==(t&r))return n;let i=n^r;return e==="subscript"?i&=~Oe.superscript:e==="superscript"&&(i&=~Oe.subscript),i}function Kl(n,e){if(e!=null)return void(n.__key=e);he(),es();const t=G(),r=Ae(),i=""+Wl++;r._nodeMap.set(i,n),b(n)?t._dirtyElements.set(i,!0):t._dirtyLeaves.add(i),t._cloneNotNeeded.add(i),t._dirtyType=Ki,n.__key=i}function Qe(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),o=n.getNextSibling();if(i===null)if(o!==null){const s=o.getWritable();r.__first=o.__key,s.__prev=null}else r.__first=null;else{const s=i.getWritable();if(o!==null){const l=o.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;t.__prev=null}if(o===null)if(i!==null){const s=i.getWritable();r.__last=i.__key,s.__next=null}else r.__last=null;else{const s=o.getWritable();if(i!==null){const l=i.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;t.__next=null}r.__size--,t.__parent=null}}function En(n){es();const e=n.getLatest(),t=e.__parent,r=Ae(),i=G(),o=r._nodeMap,s=i._dirtyElements;t!==null&&function(a,c,u){let d=a;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}}(t,o,s);const l=e.__key;i._dirtyType=Ki,b(n)?s.set(l,!0):i._dirtyLeaves.add(l)}function re(n){he();const e=G(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=se(t);r!==null&&r.getWritable()}if(n!==null){const r=se(n);r!==null&&r.getWritable()}}}function ze(){return nn()?null:G()._compositionKey}function se(n,e){const t=(e||Ae())._nodeMap.get(n);return t===void 0?null:t}function no(n,e){const t=n[`__lexicalKey_${G()._key}`];return t!==void 0?se(t,e):null}function et(n,e){let t=n;for(;t!=null;){const r=no(t,e);if(r!==null)return r;t=Pn(t)}return null}function ro(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function io(n){return n.read(()=>Z().getTextContent())}function Z(){return oo(Ae())}function oo(n){return n._nodeMap.get("root")}function we(n){he();const e=Ae();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function gt(n){const e=G(),t=function(r,i){let o=r;for(;o!=null;){const s=o[`__lexicalKey_${i._key}`];if(s!==void 0)return s;o=Pn(o)}return null}(n,e);return t===null?n===e.getRootElement()?se("root"):null:se(t)}function so(n,e){return e?n.getTextContentSize():0}function lo(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Dr(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function ao(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function co(n){return n.nodeType===Be?n.nodeValue:null}function Lr(n,e,t){const r=Se(e._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=co(i);const a=et(i);if(l!==null&&D(a)){if(l===Cn&&t){const c=t.length;l=t,o=c,s=c}l!==null&&jr(a,l,o,s,n)}}}function jr(n,e,t,r,i){let o=n;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let l=e;(s||i)&&e[e.length-1]===Cn&&(l=e.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(re(null),mr||vn||_r)o.remove();else{const m=G();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const c=o.getParent(),u=tn(),d=o.getTextContentSize(),f=ze(),h=o.getKey();if(o.isToken()||f!==null&&h===f&&!s||O(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!o.canInsertTextBefore()&&!s||u.focus.key===n.__key&&u.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=F();if(!O(g)||t===null||r===null)return void o.setTextContent(l);if(g.setTextNodeRange(o,t,o,r),o.isSegmented()){const m=ie(o.getTextContent());o.replace(m),o=m}o.setTextContent(l)}}}function Ul(n,e){if(e.isSegmented())return!0;if(!n.isCollapsed())return!1;const t=n.anchor.offset,r=e.getParentOrThrow(),i=e.isToken();return t===0?!e.canInsertTextBefore()||!r.canInsertTextBefore()&&!e.isComposing()||i||function(o){const s=o.getPreviousSibling();return(D(s)||b(s)&&s.isInline())&&!s.canInsertTextAfter()}(e):t===e.getTextContentSize()&&(!e.canInsertTextAfter()||!r.canInsertTextAfter()&&!e.isComposing()||i)}function uo(n){return n==="ArrowLeft"}function fo(n){return n==="ArrowRight"}function $t(n,e){return ye?n:e}function ho(n){return n==="Enter"}function Rt(n){return n==="Backspace"}function Wt(n){return n==="Delete"}function go(n,e,t){return n.toLowerCase()==="a"&&$t(e,t)}function Vl(){const n=Z();we(Qi(n.select(0,n.getChildrenSize())))}function Bt(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const o=wn(i);return t[e]=o,o}return i}function Ar(n,e,t,r,i){if(t.size===0)return;const o=r.__type,s=r.__key,l=e.get(o);l===void 0&&j(33,o);const a=l.klass;let c=n.get(a);c===void 0&&(c=new Map,n.set(a,c));const u=c.get(s),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(s,d?"updated":i)}function po(n,e,t){const r=n.getParent();let i=t,o=n;return r!==null&&(e&&t===0?(i=o.getIndexWithinParent(),o=r):e||t!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function zt(n,e){const t=n.offset;if(n.type==="element")return po(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?po(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function mo(n){const e=On(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function I(n,e,t){return os(n,e,t)}function kn(n){return!oe(n)&&!n.isLastChild()&&!n.isInline()}function Nn(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&j(75,e),t}function Pn(n){const e=n.assignedSlot||n.parentElement;return e!==null&&e.nodeType===11?e.host:e}function Ir(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function On(n){const e=n._window;return e===null&&j(78),e}function Jl(n){let e=n.getParentOrThrow();for(;e!==null;){if(pt(e))return e;e=e.getParentOrThrow()}return e}function pt(n){return oe(n)||b(n)&&n.isShadowRoot()}function Kt(n){const e=G(),t=n.constructor.getType(),r=e._nodes.get(t);r===void 0&&j(97);const i=r.replace;if(i!==null){const o=i(n);return o instanceof n.constructor||j(98),o}return n}function Fr(n,e){!oe(n.getParent())||b(e)||U(e)||j(99)}function Mr(n){return(U(n)||b(n)&&!n.canBeEmpty())&&!n.isInline()}function $r(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Hl(n,e,t){let r=n._blockCursorElement;if(O(t)&&t.isCollapsed()&&t.anchor.type==="element"&&e.contains(document.activeElement)){const i=t.anchor,o=i.getNode(),s=i.offset;let l=!1,a=null;if(s===o.getChildrenSize())Mr(o.getChildAtIndex(s-1))&&(l=!0);else{const c=o.getChildAtIndex(s);if(Mr(c)){const u=c.getPreviousSibling();(u===null||Mr(u))&&(l=!0,a=n.getElementByKey(c.__key))}}if(l){const c=n.getElementByKey(o.__key);return r===null&&(n._blockCursorElement=r=function(u){const d=u.theme,f=document.createElement("div");f.contentEditable="false",f.setAttribute("data-lexical-cursor","true");let h=d.blockCursor;if(h!==void 0){if(typeof h=="string"){const g=wn(h);h=d.blockCursor=g}h!==void 0&&f.classList.add(...h)}return f}(n._config)),e.style.caretColor="transparent",void(a===null?c.appendChild(r):c.insertBefore(r,a))}}r!==null&&$r(r,n,e)}function Se(n){return _e?(n||window).getSelection():null}function Yl(n){return Dn(n)&&n.tagName==="A"}function Dn(n){return n.nodeType===1}function Rr(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function Ln(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function mt(n){if(oe(n)||U(n)&&!n.isInline())return!0;if(!b(n)||pt(n))return!1;const e=n.getFirstChild(),t=e===null||Zt(e)||D(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Wr(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function ql(){return G()}const _o=new WeakMap,Gl=new Map;function Xl(n){if(!n._readOnly&&n.isEmpty())return Gl;n._readOnly||j(192);let e=_o.get(n);if(!e){e=new Map,_o.set(n,e);for(const[t,r]of n._nodeMap){const i=r.__type;let o=e.get(i);o||(o=new Map,e.set(i,o)),o.set(t,r)}}return e}function Br(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function yo(n,e,t,r,i,o){let s=n.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===e&&(b(s)&&yo(s,l,t,r,i,o),t.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}let Ke,le,Ut,jn,zr,Kr,tt,ve,Ur,Vt,ee="",ae="",Te=null,xe="",Le="",vo=!1,Jt=!1,An=null;function In(n,e){const t=tt.get(n);if(e!==null){const r=Yr(n);r.parentNode===e&&e.removeChild(r)}if(ve.has(n)||le._keyToDOMMap.delete(n),b(t)){const r=Mn(t,tt);Vr(r,0,r.length-1,null)}t!==void 0&&Ar(Vt,Ut,jn,t,"destroyed")}function Vr(n,e,t,r){let i=e;for(;i<=t;++i){const o=n[i];o!==void 0&&In(o,r)}}function nt(n,e){n.setProperty("text-align",e)}const Zl="40px";function xo(n,e){const t=Ke.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||Zl;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function bo(n,e){const t=n.style;e===0?nt(t,""):e===vr?nt(t,"left"):e===xr?nt(t,"center"):e===br?nt(t,"right"):e===Cr?nt(t,"justify"):e===wr?nt(t,"start"):e===Sr&&nt(t,"end")}function Fn(n,e,t){const r=ve.get(n);r===void 0&&j(60);const i=r.createDOM(Ke,le);if(function(o,s,l){const a=l._keyToDOMMap;s["__lexicalKey_"+l._key]=o,a.set(o,s)}(n,i,le),D(r)?i.setAttribute("data-lexical-text","true"):U(r)&&i.setAttribute("data-lexical-decorator","true"),b(r)){const o=r.__indent,s=r.__size;if(o!==0&&xo(i,o),s!==0){const a=s-1;(function(c,u,d,f){const h=ae;ae="",Jr(c,d,0,u,f,null),So(d,f),ae=h})(Mn(r,ve),a,r,i)}const l=r.__format;l!==0&&bo(i,l),r.isInline()||wo(null,r,i),kn(r)&&(ee+=Pe,Le+=Pe)}else{const o=r.getTextContent();if(U(r)){const s=r.decorate(le,Ke);s!==null&&To(n,s),i.contentEditable="false"}else D(r)&&(r.isDirectionless()||(ae+=o));ee+=o,Le+=o}if(e!==null)if(t!=null)e.insertBefore(i,t);else{const o=e.__lexicalLineBreak;o!=null?e.insertBefore(i,o):e.appendChild(i)}return Ar(Vt,Ut,jn,r,"created"),i}function Jr(n,e,t,r,i,o){const s=ee;ee="";let l=t;for(;l<=r;++l){Fn(n[l],i,o);const a=ve.get(n[l]);a!==null&&D(a)&&(Te===null&&(Te=a.getFormat()),xe===""&&(xe=a.getStyle()))}kn(e)&&(ee+=Pe),i.__lexicalTextContent=ee,ee=s+ee}function Co(n,e){const t=e.get(n);return Zt(t)||U(t)&&t.isInline()}function wo(n,e,t){const r=n!==null&&(n.__size===0||Co(n.__last,tt)),i=e.__size===0||Co(e.__last,ve);if(r){if(!i){const o=t.__lexicalLineBreak;if(o!=null)try{t.removeChild(o)}catch(s){if(typeof s=="object"&&s!=null){const l=`${s.toString()} Parent: ${t.tagName}, child: ${o.tagName}.`;throw new Error(l)}throw s}t.__lexicalLineBreak=null}}else if(i){const o=document.createElement("br");t.__lexicalLineBreak=o,t.appendChild(o)}}function So(n,e){const t=e.__lexicalDirTextContent,r=e.__lexicalDir;if(t!==ae||r!==An){const o=ae==="",s=o?An:(i=ae,Pl.test(i)?"rtl":Ol.test(i)?"ltr":null);if(s!==r){const l=e.classList,a=Ke.theme;let c=r!==null?a[r]:void 0,u=s!==null?a[s]:void 0;if(c!==void 0){if(typeof c=="string"){const d=wn(c);c=a[r]=d}l.remove(...c)}if(s===null||o&&s==="ltr")e.removeAttribute("dir");else{if(u!==void 0){if(typeof u=="string"){const d=wn(u);u=a[s]=d}u!==void 0&&l.add(...u)}e.dir=s}Jt||(n.getWritable().__dir=s)}An=s,e.__lexicalDirTextContent=ae,e.__lexicalDir=s}var i}function Ql(n,e,t){const r=ae;var i;ae="",Te=null,xe="",function(o,s,l){const a=ee,c=o.__size,u=s.__size;if(ee="",c===1&&u===1){const d=o.__first,f=s.__first;if(d===f)Ht(d,l);else{const g=Yr(d),m=Fn(f,null,null);try{l.replaceChild(m,g)}catch(_){if(typeof _=="object"&&_!=null){const x=`${_.toString()} Parent: ${l.tagName}, new child: {tag: ${m.tagName} key: ${f}}, old child: {tag: ${g.tagName}, key: ${d}}.`;throw new Error(x)}throw _}In(d,null)}const h=ve.get(f);D(h)&&(Te===null&&(Te=h.getFormat()),xe===""&&(xe=h.getStyle()))}else{const d=Mn(o,tt),f=Mn(s,ve);if(c===0)u!==0&&Jr(f,s,0,u-1,l,null);else if(u===0){if(c!==0){const h=l.__lexicalLineBreak==null;Vr(d,0,c-1,h?null:l),h&&(l.textContent="")}}else(function(h,g,m,_,x,v){const y=_-1,C=x-1;let T,S,P=(M=v,M.firstChild),k=0,E=0;for(var M;k<=y&&E<=C;){const H=g[k],W=m[E];if(H===W)P=Hr(Ht(W,v)),k++,E++;else{T===void 0&&(T=new Set(g)),S===void 0&&(S=new Set(m));const ce=S.has(H),Ie=T.has(W);if(ce)if(Ie){const qe=Nn(le,W);qe===P?P=Hr(Ht(W,v)):(P!=null?v.insertBefore(qe,P):v.appendChild(qe),Ht(W,v)),k++,E++}else Fn(W,v,P),E++;else P=Hr(Yr(H)),In(H,v),k++}const Y=ve.get(W);Y!==null&&D(Y)&&(Te===null&&(Te=Y.getFormat()),xe===""&&(xe=Y.getStyle()))}const R=k>y,q=E>C;if(R&&!q){const H=m[C+1];Jr(m,h,E,C,v,H===void 0?null:le.getElementByKey(H))}else q&&!R&&Vr(g,k,y,v)})(s,d,f,c,u,l)}kn(s)&&(ee+=Pe),l.__lexicalTextContent=ee,ee=a+ee}(n,e,t),So(e,t),hi(i=e)&&Te!=null&&Te!==i.__textFormat&&!Jt&&(i.setTextFormat(Te),i.setTextStyle(xe)),function(o){hi(o)&&xe!==""&&xe!==o.__textStyle&&!Jt&&o.setTextStyle(xe)}(e),ae=r}function Mn(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&j(101),t.push(r),r=i.__next}return t}function Ht(n,e){const t=tt.get(n);let r=ve.get(n);t!==void 0&&r!==void 0||j(61);const i=vo||Kr.has(n)||zr.has(n),o=Nn(le,n);if(t===r&&!i){if(b(t)){const s=o.__lexicalTextContent;s!==void 0&&(ee+=s,Le+=s);const l=o.__lexicalDirTextContent;l!==void 0&&(ae+=l)}else{const s=t.getTextContent();D(t)&&!t.isDirectionless()&&(ae+=s),Le+=s,ee+=s}return o}if(t!==r&&i&&Ar(Vt,Ut,jn,r,"updated"),r.updateDOM(t,o,Ke)){const s=Fn(n,null,null);return e===null&&j(62),e.replaceChild(s,o),In(n,null),s}if(b(t)&&b(r)){const s=r.__indent;s!==t.__indent&&xo(o,s);const l=r.__format;l!==t.__format&&bo(o,l),i&&(Ql(t,r,o),oe(r)||r.isInline()||wo(t,r,o)),kn(r)&&(ee+=Pe,Le+=Pe)}else{const s=r.getTextContent();if(U(r)){const l=r.decorate(le,Ke);l!==null&&To(n,l)}else D(r)&&!r.isDirectionless()&&(ae+=s);ee+=s,Le+=s}if(!Jt&&oe(r)&&r.__cachedText!==Le){const s=r.getWritable();s.__cachedText=Le,r=s}return o}function To(n,e){let t=le._pendingDecorators;const r=le._decorators;if(t===null){if(r[n]===e)return;t=ro(le)}t[n]=e}function Hr(n){let e=n.nextSibling;return e!==null&&e===le._blockCursorElement&&(e=e.nextSibling),e}function ea(n,e,t,r,i,o){ee="",Le="",ae="",vo=r===ht,An=null,le=t,Ke=t._config,Ut=t._nodes,jn=le._listeners.mutation,zr=i,Kr=o,tt=n._nodeMap,ve=e._nodeMap,Jt=e._readOnly,Ur=new Map(t._keyToDOMMap);const s=new Map;return Vt=s,Ht("root",null),le=void 0,Ut=void 0,zr=void 0,Kr=void 0,tt=void 0,ve=void 0,Ke=void 0,Ur=void 0,Vt=void 0,s}function Yr(n){const e=Ur.get(n);return e===void 0&&j(75,n),e}const je=Object.freeze({}),qr=30,Gr=[["keydown",function(n,e){if(Yt=n.timeStamp,Eo=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=n;I(e,cl,n)||t!=null&&(function(l,a,c,u){return fo(l)&&!a&&!u&&!c}(t,i,s,o)?I(e,Di,n):function(l,a,c,u,d){return fo(l)&&!u&&!c&&(a||d)}(t,i,r,s,o)?I(e,ul,n):function(l,a,c,u){return uo(l)&&!a&&!u&&!c}(t,i,s,o)?I(e,Li,n):function(l,a,c,u,d){return uo(l)&&!u&&!c&&(a||d)}(t,i,r,s,o)?I(e,fl,n):function(l,a,c){return function(u){return u==="ArrowUp"}(l)&&!a&&!c}(t,i,o)?I(e,ji,n):function(l,a,c){return function(u){return u==="ArrowDown"}(l)&&!a&&!c}(t,i,o)?I(e,Ai,n):function(l,a){return ho(l)&&a}(t,r)?(qt=!0,I(e,mn,n)):function(l){return l===" "}(t)?I(e,dl,n):function(l,a){return ye&&a&&l.toLowerCase()==="o"}(t,i)?(n.preventDefault(),qt=!0,I(e,ft,!0)):function(l,a){return ho(l)&&!a}(t,r)?(qt=!1,I(e,mn,n)):function(l,a,c,u){return ye?!a&&!c&&(Rt(l)||l.toLowerCase()==="h"&&u):!(u||a||c)&&Rt(l)}(t,s,o,i)?Rt(t)?I(e,Ii,n):(n.preventDefault(),I(e,Xe,!0)):function(l){return l==="Escape"}(t)?I(e,Fi,n):function(l,a,c,u,d){return ye?!(c||u||d)&&(Wt(l)||l.toLowerCase()==="d"&&a):!(a||u||d)&&Wt(l)}(t,i,r,s,o)?Wt(t)?I(e,Mi,n):(n.preventDefault(),I(e,Xe,!1)):function(l,a,c){return Rt(l)&&(ye?a:c)}(t,s,i)?(n.preventDefault(),I(e,Lt,!0)):function(l,a,c){return Wt(l)&&(ye?a:c)}(t,s,i)?(n.preventDefault(),I(e,Lt,!1)):function(l,a){return ye&&a&&Rt(l)}(t,o)?(n.preventDefault(),I(e,jt,!0)):function(l,a){return ye&&a&&Wt(l)}(t,o)?(n.preventDefault(),I(e,jt,!1)):function(l,a,c,u){return l.toLowerCase()==="b"&&!a&&$t(c,u)}(t,s,o,i)?(n.preventDefault(),I(e,fe,"bold")):function(l,a,c,u){return l.toLowerCase()==="u"&&!a&&$t(c,u)}(t,s,o,i)?(n.preventDefault(),I(e,fe,"underline")):function(l,a,c,u){return l.toLowerCase()==="i"&&!a&&$t(c,u)}(t,s,o,i)?(n.preventDefault(),I(e,fe,"italic")):function(l,a,c,u){return l==="Tab"&&!a&&!c&&!u}(t,s,i,o)?I(e,hl,n):function(l,a,c,u){return l.toLowerCase()==="z"&&!a&&$t(c,u)}(t,r,o,i)?(n.preventDefault(),I(e,gn,void 0)):function(l,a,c,u){return ye?l.toLowerCase()==="z"&&c&&a:l.toLowerCase()==="y"&&u||l.toLowerCase()==="z"&&u&&a}(t,r,o,i)?(n.preventDefault(),I(e,pn,void 0)):be(e._editorState._selection)?function(l,a,c,u){return!a&&l.toLowerCase()==="c"&&(ye?c:u)}(t,r,o,i)?(n.preventDefault(),I(e,_n,n)):function(l,a,c,u){return!a&&l.toLowerCase()==="x"&&(ye?c:u)}(t,r,o,i)?(n.preventDefault(),I(e,gr,n)):go(t,o,i)&&(n.preventDefault(),I(e,pr,n)):!We&&go(t,o,i)&&(n.preventDefault(),I(e,pr,n)),function(l,a,c,u){return l||a||c||u}(i,r,s,o)&&I(e,xl,n))}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;t instanceof Node&&r!=="touch"&&ge(e,()=>{U(et(t))||(Zr=!0)})}],["compositionstart",function(n,e){ge(e,()=>{const t=F();if(O(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();re(r.key),(n.timeStamp<Yt+qr||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||D(i)&&i.getStyle()!==t.style)&&I(e,dt,Nl)}})}],["compositionend",function(n,e){We?Gt=!0:ge(e,()=>{Qr(e,n.data)})}],["input",function(n,e){n.stopPropagation(),ge(e,()=>{const t=F(),r=n.data,i=Lo(n);if(r!=null&&O(t)&&Po(t,i,r,n.timeStamp,!1)){Gt&&(Qr(e,r),Gt=!1);const o=t.anchor.getNode(),s=Se(e._window);if(s===null)return;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,c=l?t.focus.offset:t.anchor.offset;yn&&!t.isCollapsed()&&D(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+c)===co(s.anchorNode)||I(e,dt,r);const u=r.length;We&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),mr||vn||_r||!e.isComposing()||(Yt=0,re(null))}else Lr(!1,e,r!==null?r:void 0),Gt&&(Qr(e,r||void 0),Gt=!1);he(),Yi(G())}),_t=null}],["click",function(n,e){ge(e,()=>{const t=F(),r=Se(e._window),i=tn();if(r){if(O(t)){const o=t.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&t.isCollapsed()&&!oe(s)&&Z().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i)?(r.removeAllRanges(),t.dirty=!0):n.detail===3&&!t.isCollapsed()&&s!==t.focus.getNode()&&(b(s)?s.select(0):s.getParentOrThrow().select(0))}else if(n.pointerType==="touch"){const o=r.anchorNode;if(o!==null){const s=o.nodeType;(s===Ft||s===Be)&&we(li(i,r,e,n))}}}I(e,Oi,n)})}],["cut",je],["copy",je],["dragstart",je],["dragover",je],["dragend",je],["paste",je],["focus",je],["blur",je],["drop",je]];yn&&Gr.push(["beforeinput",(n,e)=>function(t,r){const i=t.inputType,o=Lo(t);i==="deleteCompositionText"||We&&mo(r)||i!=="insertCompositionText"&&ge(r,()=>{const s=F();if(i==="deleteContentBackward"){if(s===null){const h=tn();if(!O(h))return;we(h.clone())}if(O(s)){const h=s.anchor.key===s.focus.key;if(l=t.timeStamp,Eo==="MediaLast"&&l<Yt+qr&&r.isComposing()&&h){if(re(null),Yt=0,setTimeout(()=>{ge(r,()=>{re(null)})},qr),O(s)){const g=s.anchor.getNode();g.markDirty(),s.format=g.getFormat(),D(g)||j(142),s.style=g.getStyle()}}else{re(null),t.preventDefault();const g=s.anchor.getNode().getTextContent(),m=s.anchor.offset===0&&s.focus.offset===g.length;wl&&h&&!m||I(r,Xe,!0)}return}}var l;if(!O(s))return;const a=t.data;_t!==null&&Lr(!1,r,_t),s.dirty&&_t===null||!s.isCollapsed()||oe(s.anchor.getNode())||o===null||s.applyDOMRange(o),_t=null;const c=s.anchor,u=s.focus,d=c.getNode(),f=u.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(t.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":I(r,dt,t);break;case"insertFromComposition":re(null),I(r,dt,t);break;case"insertLineBreak":re(null),I(r,ft,!1);break;case"insertParagraph":re(null),qt&&!vn?(qt=!1,I(r,ft,!1)):I(r,hn,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":I(r,fr,t);break;case"deleteByComposition":(function(h,g){return h!==g||b(h)||b(g)||!h.isToken()||!g.isToken()})(d,f)&&I(r,dr,t);break;case"deleteByDrag":case"deleteByCut":I(r,dr,t);break;case"deleteContent":I(r,Xe,!1);break;case"deleteWordBackward":I(r,Lt,!0);break;case"deleteWordForward":I(r,Lt,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":I(r,jt,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":I(r,jt,!1);break;case"formatStrikeThrough":I(r,fe,"strikethrough");break;case"formatBold":I(r,fe,"bold");break;case"formatItalic":I(r,fe,"italic");break;case"formatUnderline":I(r,fe,"underline");break;case"historyUndo":I(r,gn,void 0);break;case"historyRedo":I(r,pn,void 0)}else{if(a===`
32
- `)t.preventDefault(),I(r,ft,!1);else if(a===Pe)t.preventDefault(),I(r,hn,void 0);else if(a==null&&t.dataTransfer){const h=t.dataTransfer.getData("text/plain");t.preventDefault(),s.insertRawText(h)}else a!=null&&Po(s,o,a,t.timeStamp,!0)?(t.preventDefault(),I(r,dt,a)):_t=a;ko=t.timeStamp}})}(n,e)]);let Yt=0,Eo=null,ko=0,_t=null;const $n=new WeakMap;let Xr=!1,Zr=!1,qt=!1,Gt=!1,No=[0,"",0,"root",0];function Po(n,e,t,r,i){const o=n.anchor,s=n.focus,l=o.getNode(),a=G(),c=Se(a._window),u=c!==null?c.anchorNode:null,d=o.key,f=a.getElementByKey(d),h=t.length;return d!==s.key||!D(l)||(!i&&(!yn||ko<r+50)||l.isDirty()&&h<2||lo(t))&&o.offset!==s.offset&&!l.isComposing()||De(l)||l.isDirty()&&h>1||(i||!yn)&&f!==null&&!l.isComposing()&&u!==Tn(f)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||l.getFormat()!==n.format||l.getStyle()!==n.style||Ul(n,l)}function Oo(n,e){return n!==null&&n.nodeValue!==null&&n.nodeType===Be&&e!==0&&e!==n.nodeValue.length}function Do(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=n;Xr&&(Xr=!1,Oo(r,i)&&Oo(o,s))||ge(e,()=>{if(!t)return void we(null);if(!Mt(e,r,o))return;const l=F();if(O(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const u=On(e).event,d=u?u.timeStamp:performance.now(),[f,h,g,m,_]=No,x=Z(),v=e.isComposing()===!1&&x.getTextContent()==="";if(d<_+200&&a.offset===g&&a.key===m)l.format=f,l.style=h;else if(a.type==="text")D(c)||j(141),l.format=c.getFormat(),l.style=c.getStyle();else if(a.type==="element"&&!v){const y=a.getNode();l.style="",y instanceof xt&&y.getChildrenSize()===0?(l.format=y.getTextFormat(),l.style=y.getTextStyle()):l.format=0}}else{const u=a.key,d=l.focus.key,f=l.getNodes(),h=f.length,g=l.isBackward(),m=g?s:i,_=g?i:s,x=g?d:u,v=g?u:d;let y=kl,C=!1;for(let T=0;T<h;T++){const S=f[T],P=S.getTextContentSize();if(D(S)&&P!==0&&!(T===0&&S.__key===x&&m===P||T===h-1&&S.__key===v&&_===0)&&(C=!0,y&=S.getFormat(),y===0))break}l.format=C?y:0}}I(e,dn,void 0)})}function Lo(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Qr(n,e){const t=n._compositionKey;if(re(null),t!==null&&e!=null){if(e===""){const r=se(t),i=Tn(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&D(r)&&jr(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
33
- `){const r=F();if(O(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void I(n,mn,null)}}}Lr(!0,n,e)}function jo(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const yt=new Map;function Ao(n){const e=n.target,t=Se(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t===null)return;const r=to(t.anchorNode);if(r===null)return;Zr&&(Zr=!1,ge(r,()=>{const c=tn(),u=t.anchorNode;if(u===null)return;const d=u.nodeType;d!==Ft&&d!==Be||we(li(c,t,r,n))}));const i=Dr(r),o=i[i.length-1],s=o._key,l=yt.get(s),a=l||o;a!==r&&Do(t,a,!1),Do(t,r,!0),r!==o?yt.set(s,r):l&&yt.delete(s)}function Io(n){n._lexicalHandled=!0}function Fo(n){return n._lexicalHandled===!0}function ta(n){const e=n.ownerDocument,t=$n.get(e);t===void 0&&j(162);const r=t-1;r>=0||j(164),$n.set(e,r),r===0&&e.removeEventListener("selectionchange",Ao);const i=Sn(n);Pr(i)?(function(s){if(s._parentEditor!==null){const l=Dr(s),a=l[l.length-1]._key;yt.get(a)===s&&yt.delete(a)}else yt.delete(s._key)}(i),n.__lexicalEditor=null):i&&j(198);const o=jo(n);for(let s=0;s<o.length;s++)o[s]();n.__lexicalEventHandles=[]}function ei(n,e,t){he();const r=n.__key,i=n.getParent();if(i===null)return;const o=function(l){const a=F();if(!O(a)||!b(l))return a;const{anchor:c,focus:u}=a,d=c.getNode(),f=u.getNode();return Ir(d,l)&&c.set(l.__key,0,"element"),Ir(f,l)&&u.set(l.__key,0,"element"),a}(n);let s=!1;if(O(o)&&e){const l=o.anchor,a=o.focus;l.key===r&&(Un(l,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0),a.key===r&&(Un(a,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0)}else be(o)&&e&&n.isSelected()&&n.selectPrevious();if(O(o)&&e&&!s){const l=n.getIndexWithinParent();Qe(n),Kn(o,i,l,-1)}else Qe(n);t||pt(i)||i.canBeEmpty()||!i.isEmpty()||ei(i,e),e&&oe(i)&&i.isEmpty()&&i.selectEnd()}class Rn{static getType(){j(64,this.name)}static clone(e){j(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Kl(this,e)}getType(){return this.__type}isInline(){j(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=se(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||F();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if(D(this))return r;if(O(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(U(this)&&this.isInline()&&i){const o=t.isBackward()?t.focus:t.anchor,s=o.getNode();if(o.offset===s.getChildrenSize()&&s.is(i)&&s.getLastChildOrThrow().is(this))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:se(e)}getParentOrThrow(){const e=this.getParent();return e===null&&j(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(pt(t))return b(e)||e===this&&U(e)||j(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&j(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:se(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:se(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),r=e.getParents();b(this)&&t.unshift(this),b(e)&&r.unshift(e);const i=t.length,o=r.length;if(i===0||o===0||t[i-1]!==r[o-1])return null;const s=new Set(r);for(let l=0;l<i;l++){const a=t[l];if(s.has(a))return a}return null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let r=0,i=0,o=this;for(;;){const s=o.getParentOrThrow();if(s===t){r=o.getIndexWithinParent();break}o=s}for(o=e;;){const s=o.getParentOrThrow();if(s===t){i=o.getIndexWithinParent();break}o=s}return r<i}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let r=e;for(;r!==null;){if(r.__key===t)return!0;r=r.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===e)break;const l=b(o)?t?o.getFirstChild():o.getLastChild():null;if(l!==null){o=l;continue}const a=t?o.getNextSibling():o.getPreviousSibling();if(a!==null){o=a;continue}const c=o.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let u=null,d=c;do{if(d===null&&j(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);o=u}return t||r.reverse(),r}isDirty(){const e=G()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=se(this.__key);return e===null&&j(113),e}getWritable(){he();const e=Ae(),t=G(),r=e._nodeMap,i=this.__key,o=this.getLatest(),s=t._cloneNotNeeded,l=F();if(l!==null&&l.setCachedNodes(null),s.has(i))return En(o),o;const a=Br(o);return s.add(i),En(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){j(70)}updateDOM(e,t,r){j(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){j(72)}static importJSON(e){j(18,this.name)}static transform(){return null}remove(e){ei(this,!0,e)}replace(e,t){he();let r=F();r!==null&&(r=r.clone()),Fr(this,e);const i=this.getLatest(),o=this.__key,s=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size;Qe(l);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,h=i.__next,g=i.__parent;if(ei(i,!1,!0),u===null?a.__first=s:u.getWritable().__next=s,l.__prev=f,d===null?a.__last=s:d.getWritable().__prev=s,l.__next=h,l.__parent=g,a.__size=c,t&&(b(this)&&b(l)||j(139),this.getChildren().forEach(m=>{l.append(m)})),O(r)){we(r);const m=r.anchor,_=r.focus;m.key===o&&zo(m,l),_.key===o&&zo(_,l)}return ze()===o&&re(s),l}insertAfter(e,t=!0){he(),Fr(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.getParent(),s=F();let l=!1,a=!1;if(o!==null){const h=e.getIndexWithinParent();if(Qe(i),O(s)){const g=o.__key,m=s.anchor,_=s.focus;l=m.type==="element"&&m.key===g&&m.offset===h+1,a=_.type==="element"&&_.key===g&&_.offset===h+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,t&&O(s)){const h=this.getIndexWithinParent();Kn(s,u,h+1);const g=u.__key;l&&s.anchor.set(g,h+2,"element"),a&&s.focus.set(g,h+2,"element")}return e}insertBefore(e,t=!0){he(),Fr(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.__key;Qe(i);const s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,c=this.getIndexWithinParent();s===null?l.__first=o:s.getWritable().__next=o,l.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const u=F();return t&&O(u)&&Kn(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return ke()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){he();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(b(r))return r.select();if(!D(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,t)}selectNext(e,t){he();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(b(r))return r.select(0,0);if(!D(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,t)}markDirty(){this.getWritable()}}class Xt extends Rn{static getType(){return"linebreak"}static clone(e){return new Xt(e.__key)}constructor(e){super(e)}getTextContent(){return`
34
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(t){const r=t.parentElement;if(r!==null&&Ln(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Wn(i)){const o=r.lastChild;if(o===t||o.previousSibling===t&&Wn(o))return!0}}return!1}(e)||function(t){const r=t.parentElement;if(r!==null&&Ln(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Wn(i))return!1;const o=r.lastChild;if(o===t||o.previousSibling===t&&Wn(o))return!0}return!1}(e)?null:{conversion:na,priority:0}}}static importJSON(e){return rt()}exportJSON(){return{type:"linebreak",version:1}}}function na(n){return{node:rt()}}function rt(){return Kt(new Xt)}function Zt(n){return n instanceof Xt}function Wn(n){return n.nodeType===Be&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function ti(n,e){return 16&e?"code":e&yr?"mark":32&e?"sub":64&e?"sup":null}function ni(n,e){return 1&e?"strong":2&e?"em":"span"}function Mo(n,e,t,r,i){const o=r.classList;let s=Bt(i,"base");s!==void 0&&o.add(...s),s=Bt(i,"underlineStrikethrough");let l=!1;const a=e&bn&&e&xn;s!==void 0&&(t&bn&&t&xn?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const c in Oe){const u=Oe[c];if(s=Bt(i,c),s!==void 0)if(t&u){if(l&&(c==="underline"||c==="strikethrough")){e&u&&o.remove(...s);continue}e&u&&(!a||c!=="underline")&&c!=="strikethrough"||o.add(...s)}else e&u&&o.remove(...s)}}function $o(n,e,t){const r=e.firstChild,i=t.isComposing(),o=n+(i?Cn:"");if(r==null)e.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||We){const[l,a,c]=function(u,d){const f=u.length,h=d.length;let g=0,m=0;for(;g<f&&g<h&&u[g]===d[g];)g++;for(;m+g<f&&m+g<h&&u[f-m-1]===d[h-m-1];)m++;return[g,f-g-m,d.slice(g,h-m)]}(s,o);a!==0&&r.deleteData(l,a),r.insertData(l,c)}else r.nodeValue=o}}function Ro(n,e,t,r,i,o){$o(i,n,e);const s=o.theme.text;s!==void 0&&Mo(0,0,r,n,s)}function Bn(n,e){const t=document.createElement(e);return t.appendChild(n),t}class vt extends Rn{static getType(){return"text"}static clone(e){return new vt(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),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(){const e=this.getLatest();return Al[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ze()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Oe[e];return!!(this.getFormat()&t)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Or(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const r=this.__format,i=ti(0,r),o=ni(0,r),s=i===null?o:i,l=document.createElement(s);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(o),l.appendChild(a)),Ro(a,this,0,r,this.__text,e);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(e,t,r){const i=this.__text,o=e.__format,s=this.__format,l=ti(0,o),a=ti(0,s),c=ni(0,o),u=ni(0,s);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const m=t.firstChild;m==null&&j(48);const _=document.createElement(u);return Ro(_,this,0,s,i,r),t.replaceChild(_,m),!1}let d=t;a!==null&&l!==null&&(d=t.firstChild,d==null&&j(49)),$o(i,d,this);const f=r.theme.text;f!==void 0&&o!==s&&Mo(0,o,s,d,f);const h=e.__style,g=this.__style;return h!==g&&(t.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:sa,priority:0}),b:()=>({conversion:ia,priority:0}),code:()=>({conversion:Ue,priority:0}),em:()=>({conversion:Ue,priority:0}),i:()=>({conversion:Ue,priority:0}),s:()=>({conversion:Ue,priority:0}),span:()=>({conversion:ra,priority:0}),strong:()=>({conversion:Ue,priority:0}),sub:()=>({conversion:Ue,priority:0}),sup:()=>({conversion:Ue,priority:0}),u:()=>({conversion:Ue,priority:0})}}static importJSON(e){const t=ie(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return t!==null&&Dn(t)||j(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=Bn(t,"b")),this.hasFormat("italic")&&(t=Bn(t,"i")),this.hasFormat("strikethrough")&&(t=Bn(t,"s")),this.hasFormat("underline")&&(t=Bn(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format=typeof e=="string"?Oe[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?Dl[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Or(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=jl[e];if(this.__mode===t)return this;const r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){he();let r=e,i=t;const o=F(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const a=s.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!O(o))return qo(l,r,l,i,"text","text");{const a=ze();a!==o.anchor.key&&a!==o.focus.key||re(l),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const o=this.getWritable(),s=o.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const c=F();if(i&&O(c)){const d=e+l;c.setTextNodeRange(o,d,o,d)}const u=s.slice(0,a)+r+s.slice(a+t);return o.__text=u,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){he();const t=this.getLatest(),r=t.getTextContent(),i=t.__key,o=ze(),s=new Set(e),l=[],a=r.length;let c="";for(let T=0;T<a;T++)c!==""&&s.has(T)&&(l.push(c),c=""),c+=r[T];c!==""&&l.push(c);const u=l.length;if(u===0)return[];if(l[0]===r)return[t];const d=l[0],f=t.getParent();let h;const g=t.getFormat(),m=t.getStyle(),_=t.__detail;let x=!1;t.isSegmented()?(h=ie(d),h.__format=g,h.__style=m,h.__detail=_,x=!0):(h=t.getWritable(),h.__text=d);const v=F(),y=[h];let C=d.length;for(let T=1;T<u;T++){const S=l[T],P=S.length,k=ie(S).getWritable();k.__format=g,k.__style=m,k.__detail=_;const E=k.__key,M=C+P;if(O(v)){const R=v.anchor,q=v.focus;R.key===i&&R.type==="text"&&R.offset>C&&R.offset<=M&&(R.key=E,R.offset-=C,v.dirty=!0),q.key===i&&q.type==="text"&&q.offset>C&&q.offset<=M&&(q.key=E,q.offset-=C,v.dirty=!0)}o===i&&re(E),C=M,y.push(k)}if(f!==null){(function(P){const k=P.getPreviousSibling(),E=P.getNextSibling();k!==null&&En(k),E!==null&&En(E)})(this);const T=f.getWritable(),S=this.getIndexWithinParent();x?(T.splice(S,0,y),this.remove()):T.splice(S,1,y),O(v)&&Kn(v,f,S,u-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||j(50);const r=this.__key,i=e.__key,o=this.__text,s=o.length;ze()===i&&re(r);const l=F();if(O(l)){const d=l.anchor,f=l.focus;d!==null&&d.key===i&&(Zo(d,t,r,e,s),l.dirty=!0),f!==null&&f.key===i&&(Zo(f,t,r,e,s),l.dirty=!0)}const a=e.__text,c=t?a+o:o+a;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function ra(n){return{forChild:ri(n.style),node:null}}function ia(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:ri(e.style,t?void 0:"bold"),node:null}}const Wo=new WeakMap;function oa(n){return n.nodeName==="PRE"||n.nodeType===Ft&&n.style!==void 0&&n.style.whiteSpace!==void 0&&n.style.whiteSpace.startsWith("pre")}function sa(n){const e=n;n.parentElement===null&&j(129);let t=e.textContent||"";if(function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=Wo.get(o))===void 0&&!oa(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)Wo.set(s[a],l);return l}(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const l=r[s];l===`
35
- `||l===`\r
36
- `?i.push(rt()):l===" "?i.push(en()):l!==""&&i.push(ie(l))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=Bo(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=Bo(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:ie(t)}}function Bo(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const o=t.parentElement;if(o===null)return null;t=o}if(t=r,t.nodeType===Ft){const o=t.style.display;if(o===""&&!Rr(t)||o!==""&&!o.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(t.nodeType===Be)return t;if(t.nodeName==="BR")return null}}const la={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ue(n){const e=la[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:ri(n.style,e),node:null}}function ie(n=""){return Kt(new vt(n))}function D(n){return n instanceof vt}function ri(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",o=r.includes("line-through"),s=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return c=>(D(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),s&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),a!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class Qt extends vt{static getType(){return"tab"}static clone(e){return new Qt(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=en();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){j(126)}setDetail(e){j(127)}setMode(e){j(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function en(){return Kt(new Qt)}function aa(n){return n instanceof Qt}class ca{constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),r=e.getNode();const i=this.offset,o=e.offset;if(b(t)){const s=t.getDescendantByIndex(i);t=s??t}if(b(r)){const s=r.getDescendantByIndex(o);r=s??r}return t===r?i<o:t.isBefore(r)}getNode(){const e=se(this.key);return e===null&&j(20),e}set(e,t,r){const i=this._selection,o=this.key;this.key=e,this.offset=t,this.type=r,nn()||(ze()===o&&re(e),i!==null&&(i.setCachedNodes(null),i.dirty=!0))}}function Ee(n,e,t){return new ca(n,e,t)}function ii(n,e){let t=e.__key,r=n.offset,i="element";if(D(e)){i="text";const o=e.getTextContentSize();r>o&&(r=o)}else if(!b(e)){const o=e.getNextSibling();if(D(o))t=o.__key,r=0,i="text";else{const s=e.getParent();s&&(t=s.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function zo(n,e){if(b(e)){const t=e.getLastDescendant();b(t)||D(t)?ii(n,t):ii(n,e)}else ii(n,e)}function Ve(n,e,t,r){n.key=e,n.offset=t,n.type=r}class zn{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!be(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}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 zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let o;if(D(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<r;s++)t[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const o=se(i);o!==null&&r.push(o)}return nn()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}}function O(n){return n instanceof Je}class Je{constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!O(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(){const e=this._cachedNodes;if(e!==null)return e;const t=this.anchor,r=this.focus,i=t.isBefore(r),o=i?t:r,s=i?r:t;let l=o.getNode(),a=s.getNode();const c=o.offset,u=s.offset;if(b(l)){const f=l.getDescendantByIndex(c);l=f??l}if(b(a)){let f=a.getDescendantByIndex(u);f!==null&&f!==l&&a.getChildAtIndex(u)===f&&(f=f.getPreviousSibling()),a=f??a}let d;return d=l.is(a)?b(l)&&l.getChildrenSize()>0?[]:[l]:l.getNodesBetween(a),nn()||(this._cachedNodes=d),d}setTextNodeRange(e,t,r,i){Ve(this.anchor,e.__key,t,"text"),Ve(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[l,a]=oi(this);let c="",u=!0;for(let d=0;d<e.length;d++){const f=e[d];if(b(f)&&!f.isInline())u||(c+=`
37
- `),u=!f.isEmpty();else if(u=!1,D(f)){let h=f.getTextContent();f===t?f===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(h=l<a?h.slice(l,a):h.slice(a,l)):h=s?h.slice(l):h.slice(a):f===r&&(h=s?h.slice(0,a):h.slice(0,l)),c+=h}else!U(f)&&!Zt(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(e){const t=G(),r=t.getEditorState()._selection,i=Yo(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[o,s]=i;Ve(this.anchor,o.key,o.offset,o.type),Ve(this.focus,s.key,s.offset,s.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Je(Ee(e.key,e.offset,e.type),Ee(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Or(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Oe[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let o=0;o<i;o++){const s=t[o];s===`
38
- `||s===`\r
39
- `?r.push(rt()):s===" "?r.push(en()):r.push(ie(s))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,o=this.style;let s=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(s=r,l=t),s.type==="element"&&function(_,x,v,y){const C=_.getNode(),T=C.getChildAtIndex(_.offset),S=ie(),P=oe(C)?ke().append(S):S;S.setFormat(v),S.setStyle(y),T===null?C.append(P):T.insertBefore(P),_.is(x)&&x.set(S.__key,0,"text"),_.set(S.__key,0,"text")}(s,l,i,o);const a=s.offset;let c=l.offset;const u=this.getNodes(),d=u.length;let f=u[0];D(f)||j(26);const h=f.getTextContent().length,g=f.getParentOrThrow();let m=u[d-1];if(d===1&&l.type==="element"&&(c=h,l.set(s.key,c,"text")),this.isCollapsed()&&a===h&&(f.isSegmented()||f.isToken()||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&f.getNextSibling()===null)){let _=f.getNextSibling();if(D(_)&&_.canInsertTextBefore()&&!De(_)||(_=ie(),_.setFormat(i),_.setStyle(o),g.canInsertTextAfter()?f.insertAfter(_):g.insertAfter(_)),_.select(0,0),f=_,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&a===0&&(f.isSegmented()||f.isToken()||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&f.getPreviousSibling()===null)){let _=f.getPreviousSibling();if(D(_)&&!De(_)||(_=ie(),_.setFormat(i),g.canInsertTextBefore()?f.insertBefore(_):g.insertBefore(_)),_.select(),f=_,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&a!==h){const _=ie(f.getTextContent());_.setFormat(i),f.replace(_),f=_}else if(!this.isCollapsed()&&e!==""){const _=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||b(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),Ho(this.anchor,this.focus,null),void this.insertText(e)}if(d===1){if(f.isToken()){const y=ie(e);return y.select(),void f.replace(y)}const _=f.getFormat(),x=f.getStyle();if(a!==c||_===i&&x===o){if(aa(f)){const y=ie(e);return y.setFormat(i),y.setStyle(o),y.select(),void f.replace(y)}}else{if(f.getTextContent()!==""){const y=ie(e);if(y.setFormat(i),y.setStyle(o),y.select(),a===0)f.insertBefore(y,!1);else{const[C]=f.splitText(a);C.insertAfter(y,!1)}return void(y.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}f.setFormat(i),f.setStyle(o)}const v=c-a;f=f.spliceText(a,v,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=_,this.style=x))}else{const _=new Set([...f.getParentKeys(),...m.getParentKeys()]),x=b(f)?f:f.getParentOrThrow();let v=b(m)?m:m.getParentOrThrow(),y=m;if(!x.is(v)&&v.isInline())do y=v,v=v.getParentOrThrow();while(v.isInline());if(l.type==="text"&&(c!==0||m.getTextContent()==="")||l.type==="element"&&m.getIndexWithinParent()<c)if(D(m)&&!m.isToken()&&c!==m.getTextContentSize()){if(m.isSegmented()){const k=ie(m.getTextContent());m.replace(k),m=k}oe(l.getNode())||l.type!=="text"||(m=m.spliceText(0,c,"")),_.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else _.add(m.__key);const C=v.getChildren(),T=new Set(u),S=x.is(v),P=x.isInline()&&f.getNextSibling()===null?x:f;for(let k=C.length-1;k>=0;k--){const E=C[k];if(E.is(f)||b(E)&&E.isParentOf(f))break;E.isAttached()&&(!T.has(E)||E.is(y)?S||P.insertAfter(E,!1):E.remove())}if(!S){let k=v,E=null;for(;k!==null;){const M=k.getChildren(),R=M.length;(R===0||M[R-1].is(E))&&(_.delete(k.__key),E=k),k=k.getParent()}}if(f.isToken())if(a===h)f.select();else{const k=ie(e);k.select(),f.replace(k)}else f=f.spliceText(a,h-a,e,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<d;k++){const E=u[k],M=E.__key;_.has(M)||E.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void re(null);const t=this.getNodes(),r=[];for(const v of t)D(v)&&r.push(v);const i=r.length;if(i===0)return this.toggleFormat(e),void re(null);const o=this.anchor,s=this.focus,l=this.isBackward(),a=l?s:o,c=l?o:s;let u=0,d=r[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=d.getFormatFlags(e,null),g=i-1;let m=r[g];const _=c.type==="text"?c.offset:m.getTextContentSize();if(d.is(m)){if(f===_)return;if(De(d)||f===0&&_===d.getTextContentSize())d.setFormat(h);else{const v=d.splitText(f,_),y=f===0?v[0]:v[1];y.setFormat(h),a.type==="text"&&a.set(y.__key,0,"text"),c.type==="text"&&c.set(y.__key,_-f,"text")}return void(this.format=h)}f===0||De(d)||([,d]=d.splitText(f),f=0),d.setFormat(h);const x=m.getFormatFlags(e,h);_>0&&(_===m.getTextContentSize()||De(m)||([m]=m.splitText(_)),m.setFormat(x));for(let v=u+1;v<g;v++){const y=r[v],C=y.getFormatFlags(e,x);y.setFormat(C)}a.type==="text"&&a.set(d.__key,f,"text"),c.type==="text"&&c.set(m.__key,_,"text"),this.format=h|x}insertNodes(e){if(e.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const h=F();return O(h)||j(134),h.insertNodes(e)}const t=Wr((this.isBackward()?this.focus:this.anchor).getNode(),mt),r=e[e.length-1];if("__language"in t&&b(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const h=ai(this);t.splice(h,0,e),r.selectEnd()}return}if(!e.some(h=>(b(h)||U(h))&&!h.isInline())){b(t)||j(135);const h=ai(this);return t.splice(h,0,e),void r.selectEnd()}const i=function(h){const g=ke();let m=null;for(let _=0;_<h.length;_++){const x=h[_],v=Zt(x);if(v||U(x)&&x.isInline()||b(x)&&x.isInline()||D(x)||x.isParentRequired()){if(m===null&&(m=x.createParentElementNode(),g.append(m),v))continue;m!==null&&m.append(x)}else g.append(x),m=null}return g}(e),o=i.getLastDescendant(),s=i.getChildren(),l=!b(t)||!t.isEmpty()?this.insertParagraph():null,a=s[s.length-1];let c=s[0];var u;b(u=c)&&mt(u)&&!u.isEmpty()&&b(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(b(t)||j(135),t.append(...c.getChildren()),c=s[1]),c&&function(h,g,m){const _=g.getParentOrThrow().getLastChild();let x=g;const v=[g];for(;x!==_;)x.getNextSibling()||j(140),x=x.getNextSibling(),v.push(x);let y=h;for(const C of v)y=y.insertAfter(C)}(t,c);const d=Wr(o,mt);l&&b(d)&&(l.canMergeWhenEmpty()||mt(a))&&(d.append(...l.getChildren()),l.remove()),b(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const f=b(t)?t.getLastChild():null;Zt(f)&&d!==t&&f.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=ke();return Z().splice(this.anchor.offset,0,[s]),s.select(),s}const e=ai(this),t=Wr(this.anchor.getNode(),mt);b(t)||j(136);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const t=rt();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=this.getNodes(),t=e.length,r=t-1,i=this.anchor,o=this.focus;let s=e[0],l=e[r];const[a,c]=oi(this);if(t===0)return[];if(t===1){if(D(s)&&!this.isCollapsed()){const d=a>c?c:a,f=a>c?a:c,h=s.splitText(d,f),g=d===0?h[0]:h[1];return g!=null?[g]:[]}return[s]}const u=i.isBefore(o);if(D(s)){const d=u?a:c;d===s.getTextContentSize()?e.shift():d!==0&&([,s]=s.splitText(d),e[0]=s)}if(D(l)){const d=l.getTextContent().length,f=u?c:a;f===0?e.pop():f!==d&&([l]=l.splitText(f),e[r]=l)}return e}modify(e,t,r){const i=this.focus,o=this.anchor,s=e==="move",l=zt(i,t);if(U(l)&&!l.isIsolated()){if(s&&l.isKeyboardSelectable()){const h=Go();return h.add(l.__key),void we(h)}const f=t?l.getPreviousSibling():l.getNextSibling();if(D(f)){const h=f.__key,g=t?f.getTextContent().length:0;return i.set(h,g,"text"),void(s&&o.set(h,g,"text"))}{const h=l.getParentOrThrow();let g,m;return b(f)?(m=f.__key,g=t?f.getChildrenSize():0):(g=l.getIndexWithinParent(),m=h.__key,t||g++),i.set(m,g,"element"),void(s&&o.set(m,g,"element"))}}const a=G(),c=Se(a._window);if(!c)return;const u=a._blockCursorElement,d=a._rootElement;if(d===null||u===null||!b(l)||l.isInline()||l.canBeEmpty()||$r(u,a,d),function(f,h,g,m){f.modify(h,g,m)}(c,e,t?"backward":"forward",r),c.rangeCount>0){const f=c.getRangeAt(0),h=this.anchor.getNode(),g=oe(h)?h:Jl(h);if(this.applyDOMRange(f),this.dirty=!0,!s){const m=this.getNodes(),_=[];let x=!1;for(let v=0;v<m.length;v++){const y=m[v];Ir(y,g)?_.push(y):x=!0}if(x&&_.length>0)if(t){const v=_[0];b(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=_[_.length-1];b(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}c.anchorNode===f.startContainer&&c.anchorOffset===f.startOffset||function(v){const y=v.focus,C=v.anchor,T=C.key,S=C.offset,P=C.type;Ve(C,y.key,y.offset,y.type),Ve(y,T,S,P),v._cachedNodes=null}(this)}}}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&b(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),o=t.getNextSibling()||(i===null?null:i.getNextSibling());if(b(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=this.focus,s=zt(o,e);if(U(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&b(i)&&i.getChildrenSize()===0){i.remove();const l=Go();l.add(s.__key),we(l)}else s.remove(),G().dispatchCommand(dn,void 0);return}if(!e&&b(s)&&b(i)&&i.isEmpty())return i.remove(),void s.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const l=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=o.offset,c=l.getTextContentSize();if(l.is(i)||e&&a!==c||!e&&a!==0)return void Uo(l,e,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,c=i.getTextContentSize();if(i.is(l)||e&&a!==0||!e&&a!==c)return void Uo(i,e,a)}(function(a,c){const u=a.anchor,d=a.focus,f=u.getNode(),h=d.getNode();if(f===h&&u.type==="text"&&d.type==="text"){const g=u.offset,m=d.offset,_=g<m,x=_?g:m,v=_?m:g,y=v-1;x!==y&&(lo(f.getTextContent().slice(x,v))||(c?d.offset=y:u.offset=y))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&oe(r.getParent())&&r.getIndexWithinParent()===0&&r.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t=this.anchor.type==="element";if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),(e?this.focus:this.anchor).offset===0&&this.modify("extend",e,"character"),t){const r=e?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function be(n){return n instanceof zn}function Ko(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function oi(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[Ko(t),Ko(r)]}function Uo(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,l=0;for(let c=0;c<o;c++){const u=c===o-1;if(l=s,s+=i[c].length,e&&s===t||s>t||u){i.splice(c,1),u&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function Vo(n,e,t,r){let i,o=e;if(n.nodeType===Ft){let s=!1;const l=n.childNodes,a=l.length,c=r._blockCursorElement;o===a&&(s=!0,o=a-1);let u=l[o],d=!1;if(u===c)u=l[o+1],d=!0;else if(c!==null){const f=c.parentNode;n===f&&e>Array.prototype.indexOf.call(f.children,c)&&o--}if(i=gt(u),D(i))o=so(i,s);else{let f=gt(n);if(f===null)return null;if(b(f)){o=Math.min(f.getChildrenSize(),o);let h=f.getChildAtIndex(o);if(b(h)&&function(g,m,_){const x=g.getParent();return _===null||x===null||!x.canBeEmpty()||x!==_.getNode()}(h,0,t)){const g=s?h.getLastDescendant():h.getFirstDescendant();g===null?f=h:(h=g,f=b(h)?h:h.getParentOrThrow()),o=0}D(h)?(i=h,f=null,o=so(h,s)):h!==f&&s&&!d&&o++}else{const h=f.getIndexWithinParent();o=e===0&&U(f)&&gt(n)===f?h:h+1,f=f.getParentOrThrow()}if(b(f))return Ee(f.__key,o,"element")}}else i=gt(n);return D(i)?Ee(i.__key,o,"text"):null}function Jo(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(e){if((t||!e)&&o===null&&b(s)&&s.isInline()){const l=s.getPreviousSibling();D(l)&&(n.key=l.__key,n.offset=l.getTextContent().length)}}else b(o)&&!t&&o.isInline()?(n.key=o.__key,n.offset=o.getChildrenSize(),n.type="element"):D(o)&&(n.key=o.__key,n.offset=o.getTextContent().length)}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(e&&b(o)&&o.isInline())n.key=o.__key,n.offset=0,n.type="element";else if((t||e)&&o===null&&b(s)&&s.isInline()&&!s.canInsertTextAfter()){const l=s.getNextSibling();D(l)&&(n.key=l.__key,n.offset=0)}}}function Ho(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);Jo(n,r,i),Jo(e,!r,i),i&&(e.key=n.key,e.offset=n.offset,e.type=n.type);const o=G();if(o.isComposing()&&o._compositionKey!==n.key&&O(t)){const s=t.anchor,l=t.focus;Ve(n,s.key,s.offset,s.type),Ve(e,l.key,l.offset,l.type)}}}function Yo(n,e,t,r,i,o){if(n===null||t===null||!Mt(i,n,t))return null;const s=Vo(n,e,O(o)?o.anchor:null,i);if(s===null)return null;const l=Vo(t,r,O(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=gt(n),c=gt(t);if(U(a)&&U(c))return null}return Ho(s,l,o),[s,l]}function si(n){return b(n)&&!n.isInline()}function qo(n,e,t,r,i,o){const s=Ae(),l=new Je(Ee(n,e,i),Ee(t,r,o),0,"");return l.dirty=!0,s._selection=l,l}function ua(){const n=Ee("root",0,"element"),e=Ee("root",0,"element");return new Je(n,e,0,"")}function Go(){return new zn(new Set)}function li(n,e,t,r){const i=t._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,l=s==="selectionchange",a=!Tr&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let c,u,d,f;if(O(n)&&!a)return n.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,f=e.focusOffset,l&&O(n)&&!Mt(t,c,u))return n.clone();const h=Yo(c,d,u,f,t,n);if(h===null)return null;const[g,m]=h;return new Je(g,m,O(n)?n.format:0,O(n)?n.style:"")}function F(){return Ae()._selection}function tn(){return G()._editorState._selection}function Kn(n,e,t,r=1){const i=n.anchor,o=n.focus,s=i.getNode(),l=o.getNode();if(!e.is(s)&&!e.is(l))return;const a=e.__key;if(n.isCollapsed()){const c=i.offset;if(t<=c&&r>0||t<c&&r<0){const u=Math.max(0,c+r);i.set(a,u,"element"),o.set(a,u,"element"),Xo(n)}}else{const c=n.isBackward(),u=c?o:i,d=u.getNode(),f=c?i:o,h=f.getNode();if(e.is(d)){const g=u.offset;(t<=g&&r>0||t<g&&r<0)&&u.set(a,Math.max(0,g+r),"element")}if(e.is(h)){const g=f.offset;(t<=g&&r>0||t<g&&r<0)&&f.set(a,Math.max(0,g+r),"element")}}Xo(n)}function Xo(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,o=e.getNode(),s=r.getNode();if(n.isCollapsed()){if(!b(o))return;const l=o.getChildrenSize(),a=t>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(t);if(D(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}}else{if(b(o)){const l=o.getChildrenSize(),a=t>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(t);if(D(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(b(s)){const l=s.getChildrenSize(),a=i>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(i);if(D(c)){let u=0;a&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}}function Un(n,e,t,r,i){let o=null,s=0,l=null;r!==null?(o=r.__key,D(r)?(s=r.getTextContentSize(),l="text"):b(r)&&(s=r.getChildrenSize(),l="element")):i!==null&&(o=i.__key,D(i)?l="text":b(i)&&(l="element")),o!==null&&l!==null?n.set(o,s,l):(s=e.getIndexWithinParent(),s===-1&&(s=t.getChildrenSize()),n.set(t.__key,s,"element"))}function Zo(n,e,t,r,i){n.type==="text"?(n.key=t,e||(n.offset+=i)):n.offset>r.getIndexWithinParent()&&(n.offset-=1)}function fa(n,e,t,r,i,o,s){const l=r.anchorNode,a=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&Nr(d))return;if(!O(e))return void(n!==null&&Mt(t,l,a)&&r.removeAllRanges());const f=e.anchor,h=e.focus,g=f.key,m=h.key,_=Nn(t,g),x=Nn(t,m),v=f.offset,y=h.offset,C=e.format,T=e.style,S=e.isCollapsed();let P=_,k=x,E=!1;if(f.type==="text"){P=Tn(_);const Y=f.getNode();E=Y.getFormat()!==C||Y.getStyle()!==T}else O(n)&&n.anchor.type==="text"&&(E=!0);var M,R,q,H,W;if(h.type==="text"&&(k=Tn(x)),P!==null&&k!==null&&(S&&(n===null||E||O(n)&&(n.format!==C||n.style!==T))&&(M=C,R=T,q=v,H=g,W=performance.now(),No=[M,R,q,H,W]),c!==v||u!==y||l!==P||a!==k||r.type==="Range"&&S||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),f.type==="element"))){try{r.setBaseAndExtent(P,v,k,y)}catch{}if(!i.has("skip-scroll-into-view")&&e.isCollapsed()&&o!==null&&o===document.activeElement){const Y=e instanceof Je&&e.anchor.type==="element"?P.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(Y!==null){let ce;if(Y instanceof Text){const Ie=document.createRange();Ie.selectNode(Y),ce=Ie.getBoundingClientRect()}else ce=Y.getBoundingClientRect();(function(Ie,qe,an){const cn=an.ownerDocument,un=cn.defaultView;if(un===null)return;let{top:Et,bottom:kt}=qe,Nt=0,Pt=0,pe=an;for(;pe!==null;){const at=pe===cn.body;if(at)Nt=0,Pt=On(Ie).innerHeight;else{const Ge=pe.getBoundingClientRect();Nt=Ge.top,Pt=Ge.bottom}let Ne=0;if(Et<Nt?Ne=-(Nt-Et):kt>Pt&&(Ne=kt-Pt),Ne!==0)if(at)un.scrollBy(0,Ne);else{const Ge=pe.scrollTop;pe.scrollTop+=Ne;const ct=pe.scrollTop-Ge;Et-=ct,kt-=ct}if(at)break;pe=Pn(pe)}})(t,ce,o)}}Xr=!0}}function da(n){let e=F()||tn();e===null&&(e=Z().selectEnd()),e.insertNodes(n)}function ai(n){let e=n;n.isCollapsed()||e.removeText();const t=F();O(t)&&(e=t),O(e)||j(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!mt(i);)[i,o]=ha(i,o);return o}function ha(n,e){const t=n.getParent();if(!t){const i=ke();return Z().append(i),i.select(),[Z(),0]}if(D(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const o=e===0?0:1;return[t,i[0].getIndexWithinParent()+o]}if(!b(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new Je(Ee(n.__key,e,"element"),Ee(n.__key,e,"element"),0,""),o=n.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}let te=null,ne=null,de=!1,ci=!1,Vn=0;const Qo={characterData:!0,childList:!0,subtree:!0};function nn(){return de||te!==null&&te._readOnly}function he(){de&&j(13)}function es(){Vn>99&&j(14)}function Ae(){return te===null&&j(195,ts()),te}function G(){return ne===null&&j(196,ts()),ne}function ts(){let n=0;const e=new Set,t=Hn.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=Sn(i);if(Pr(o))n++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===t&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function ga(){return ne}function ns(n,e,t){const r=e.__type,i=function(l,a){const c=l._nodes.get(a);return c===void 0&&j(30,a),c}(n,r);let o=t.get(r);o===void 0&&(o=Array.from(i.transforms),t.set(r,o));const s=o.length;for(let l=0;l<s&&(o[l](e),e.isAttached());l++);}function rs(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function pa(n){return ui(n,G()._nodes)}function ui(n,e){const t=n.type,r=e.get(t);r===void 0&&j(17,t);const i=r.klass;n.type!==i.getType()&&j(18,i.name);const o=i.importJSON(n),s=n.children;if(b(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const a=ui(s[l],e);o.append(a)}return o}function is(n,e,t){const r=te,i=de,o=ne;te=e,de=!0,ne=n;try{return t()}finally{te=r,de=i,ne=o}}function He(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const o=n._editorState,s=o._selection,l=t._selection,a=n._dirtyType!==Ze,c=te,u=de,d=ne,f=n._updating,h=n._observer;let g=null;if(n._pendingEditorState=null,n._editorState=t,!i&&a&&h!==null){ne=n,te=t,de=!1,n._updating=!0;try{const S=n._dirtyType,P=n._dirtyElements,k=n._dirtyLeaves;h.disconnect(),g=ea(o,t,n,S,P,k)}catch(S){if(S instanceof Error&&n._onError(S),ci)throw S;return us(n,null,r,t),qi(n),n._dirtyType=ht,ci=!0,He(n,o),void(ci=!1)}finally{h.observe(r,Qo),n._updating=f,te=c,de=u,ne=d}}t._readOnly||(t._readOnly=!0);const m=n._dirtyLeaves,_=n._dirtyElements,x=n._normalizedNodes,v=n._updateTags,y=n._deferred;a&&(n._dirtyType=Ze,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),function(S,P){const k=S._decorators;let E=S._pendingDecorators||k;const M=P._nodeMap;let R;for(R in E)M.has(R)||(E===k&&(E=ro(S)),delete E[R])}(n,t);const C=i?null:Se(n._window);if(n._editable&&C!==null&&(a||l===null||l.dirty)){ne=n,te=t;try{if(h!==null&&h.disconnect(),a||l===null||l.dirty){const S=n._blockCursorElement;S!==null&&$r(S,n,r),fa(s,l,n,C,v,r)}Hl(n,r,l),h!==null&&h.observe(r,Qo)}finally{ne=d,te=c}}g!==null&&function(S,P,k,E,M){const R=Array.from(S._listeners.mutation),q=R.length;for(let H=0;H<q;H++){const[W,Y]=R[H],ce=P.get(Y);ce!==void 0&&W(ce,{dirtyLeaves:E,prevEditorState:M,updateTags:k})}}(n,g,v,m,o),O(l)||l===null||s!==null&&s.is(l)||n.dispatchCommand(dn,void 0);const T=n._pendingDecorators;T!==null&&(n._decorators=T,n._pendingDecorators=null,rn("decorator",n,!0,T)),function(S,P,k){const E=io(P),M=io(k);E!==M&&rn("textcontent",S,!0,M)}(n,e||o,t),rn("update",n,!0,{dirtyElements:_,dirtyLeaves:m,editorState:t,normalizedNodes:x,prevEditorState:e||o,tags:v}),function(S,P){if(S._deferred=[],P.length!==0){const k=S._updating;S._updating=!0;try{for(let E=0;E<P.length;E++)P[E]()}finally{S._updating=k}}}(n,y),function(S){const P=S._updates;if(P.length!==0){const k=P.shift();if(k){const[E,M]=k;ls(S,E,M)}}}(n)}function rn(n,e,t,...r){const i=e._updating;e._updating=t;try{const o=Array.from(e._listeners[n]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{e._updating=i}}function os(n,e,t){if(n._updating===!1||ne!==n){let i=!1;return n.update(()=>{i=os(n,e,t)}),i}const r=Dr(n);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){const s=r[o]._commands.get(e);if(s!==void 0){const l=s[i];if(l!==void 0){const a=Array.from(l),c=a.length;for(let u=0;u<c;u++)if(a[u](t,n)===!0)return!0}}}return!1}function ss(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[o,s]=i;let l,a;if(s!==void 0){if(l=s.onUpdate,a=s.tag,s.skipTransforms&&(r=!0),s.discrete){const c=n._pendingEditorState;c===null&&j(191),c._flushSync=!0}l&&n._deferred.push(l),a&&n._updateTags.add(a)}o()}}return r}function ls(n,e,t){const r=n._updateTags;let i,o,s=!1,l=!1;t!==void 0&&(i=t.onUpdate,o=t.tag,o!=null&&r.add(o),s=t.skipTransforms||!1,l=t.discrete||!1),i&&n._deferred.push(i);const a=n._editorState;let c=n._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=n._pendingEditorState=new Jn(new Map((c||a)._nodeMap)),u=!0),c._flushSync=l;const d=te,f=de,h=ne,g=n._updating;te=c,de=!1,n._updating=!0,ne=n;try{u&&(n._headless?a._selection!==null&&(c._selection=a._selection.clone()):c._selection=function(v){const y=v.getEditorState()._selection,C=Se(v._window);return O(y)||y==null?li(y,C,v,null):y.clone()}(n));const _=n._compositionKey;e(),s=ss(n,s),function(v,y){const C=y.getEditorState()._selection,T=v._selection;if(O(T)){const S=T.anchor,P=T.focus;let k;if(S.type==="text"&&(k=S.getNode(),k.selectionTransform(C,T)),P.type==="text"){const E=P.getNode();k!==E&&E.selectionTransform(C,T)}}}(c,n),n._dirtyType!==Ze&&(s?function(v,y){const C=y._dirtyLeaves,T=v._nodeMap;for(const S of C){const P=T.get(S);D(P)&&P.isAttached()&&P.isSimpleText()&&!P.isUnmergeable()&&Zi(P)}}(c,n):function(v,y){const C=y._dirtyLeaves,T=y._dirtyElements,S=v._nodeMap,P=ze(),k=new Map;let E=C,M=E.size,R=T,q=R.size;for(;M>0||q>0;){if(M>0){y._dirtyLeaves=new Set;for(const H of E){const W=S.get(H);D(W)&&W.isAttached()&&W.isSimpleText()&&!W.isUnmergeable()&&Zi(W),W!==void 0&&rs(W,P)&&ns(y,W,k),C.add(H)}if(E=y._dirtyLeaves,M=E.size,M>0){Vn++;continue}}y._dirtyLeaves=new Set,y._dirtyElements=new Map;for(const H of R){const W=H[0],Y=H[1];if(W!=="root"&&!Y)continue;const ce=S.get(W);ce!==void 0&&rs(ce,P)&&ns(y,ce,k),T.set(W,Y)}E=y._dirtyLeaves,M=E.size,R=y._dirtyElements,q=R.size,Vn++}y._dirtyLeaves=C,y._dirtyElements=T}(c,n),ss(n),function(v,y,C,T){const S=v._nodeMap,P=y._nodeMap,k=[];for(const[E]of T){const M=P.get(E);M!==void 0&&(M.isAttached()||(b(M)&&yo(M,E,S,P,k,T),S.has(E)||T.delete(E),k.push(E)))}for(const E of k)P.delete(E);for(const E of C){const M=P.get(E);M===void 0||M.isAttached()||(S.has(E)||C.delete(E),P.delete(E))}}(a,c,n._dirtyLeaves,n._dirtyElements)),_!==n._compositionKey&&(c._flushSync=!0);const x=c._selection;if(O(x)){const v=c._nodeMap,y=x.anchor.key,C=x.focus.key;v.get(y)!==void 0&&v.get(C)!==void 0||j(19)}else be(x)&&x._nodes.size===0&&(c._selection=null)}catch(_){return _ instanceof Error&&n._onError(_),n._pendingEditorState=a,n._dirtyType=ht,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void He(n)}finally{te=d,de=f,ne=h,n._updating=g,Vn=0}n._dirtyType!==Ze||function(_,x){const v=x.getEditorState()._selection,y=_._selection;if(y!==null){if(y.dirty||!y.is(v))return!0}else if(v!==null)return!0;return!1}(c,n)?c._flushSync?(c._flushSync=!1,He(n)):u&&Bl(()=>{He(n)}):(c._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function ge(n,e,t){n._updating?n._updates.push([e,t]):ls(n,e,t)}class on extends Rn{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Ll[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=G()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;t!==null;){if(D(t)&&e.push(t),b(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;b(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;b(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const o=t[r-1];return b(o)&&o.getLastDescendant()||o||null}const i=t[e];return b(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:se(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&j(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:se(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&j(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContent(),b(o)&&i!==r-1&&!o.isInline()&&(e+=Pe)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContentSize(),b(o)&&i!==r-1&&!o.isInline()&&(e+=Pe.length)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(e!==""){const t=Ji[e];return!!(this.getFormat()&t)}return!1}select(e,t){he();const r=F();let i=e,o=t;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(D(a)||b(a))return a.select(0,0)}else if(!(e!==void 0&&e!==s||t!==void 0&&t!==s)){const a=this.getLastChild();if(D(a)||b(a))return a.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const l=this.__key;return O(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):qo(l,i,l,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?Ji[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){const i=r.length,o=this.getChildrenSize(),s=this.getWritable(),l=s.__key,a=[],c=[],u=this.getChildAtIndex(e+t);let d=null,f=o-t+i;if(e!==0)if(e===o)d=this.getLastChild();else{const g=this.getChildAtIndex(e);g!==null&&(d=g.getPreviousSibling())}if(t>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<t;m++){g===null&&j(100);const _=g.getNextSibling(),x=g.__key;Qe(g.getWritable()),c.push(x),g=_}}let h=d;for(let g=0;g<i;g++){const m=r[g];h!==null&&m.is(h)&&(d=h=h.getPreviousSibling());const _=m.getWritable();_.__parent===l&&f--,Qe(_);const x=m.__key;if(h===null)s.__first=x,_.__prev=null;else{const v=h.getWritable();v.__next=x,_.__prev=v.__key}m.__key===l&&j(76),_.__parent=l,a.push(x),h=m}if(e+t===o)h!==null&&(h.getWritable().__next=null,s.__last=h.__key);else if(u!==null){const g=u.getWritable();if(h!==null){const m=h.getWritable();g.__prev=h.__key,m.__next=u.__key}else g.__prev=null}if(s.__size=f,c.length){const g=F();if(O(g)){const m=new Set(c),_=new Set(a),{anchor:x,focus:v}=g;as(x,m,_)&&Un(x,x.getNode(),this,d,u),as(v,m,_)&&Un(v,v.getNode(),this,d,u),f!==0||this.canBeEmpty()||pt(this)||this.remove()}}return s}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}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,r){return!1}canMergeWhenEmpty(){return!1}}function b(n){return n instanceof on}function as(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class ma extends Rn{constructor(e){super(e)}decorate(e,t){j(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function U(n){return n instanceof ma}class sn extends on{static getType(){return"root"}static clone(){return new sn}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){j(51)}getTextContent(){const e=this.__cachedText;return!nn()&&G()._dirtyType!==Ze||e===null?super.getTextContent():e}remove(){j(52)}replace(e){j(53)}insertBefore(e){j(54)}insertAfter(e){j(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const r=e[t];b(r)||U(r)||j(56)}return super.append(...e)}static importJSON(e){const t=Z();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function oe(n){return n instanceof sn}function fi(){return new Jn(new Map([["root",new sn]]))}function cs(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&j(130,t.name),b(n)){const r=e.children;Array.isArray(r)||j(59,t.name);const i=n.getChildren();for(let o=0;o<i.length;o++){const s=cs(i[o]);r.push(s)}}return e}class Jn{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return is(t&&t.editor||null,this,e)}clone(e){const t=new Jn(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return is(null,this,()=>({root:cs(Z())}))}}class di extends on{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class xt extends on{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=Oe[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new xt(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),r=Bt(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:_a,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&Dn(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const i=this.getDirection();i&&(t.dir=i);const o=this.getIndent();o>0&&(t.style.textIndent=20*o+"px")}return{element:t}}static importJSON(e){const t=ke();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const r=ke();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||D(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function _a(n){const e=ke();if(n.style){e.setFormat(n.style.textAlign);const t=parseInt(n.style.textIndent,10)/20;t>0&&e.setIndent(t)}return{node:e}}function ke(){return Kt(new xt)}function hi(n){return n instanceof xt}const K=0,ya=4;function us(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=fi(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=Ze,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const o=n._observer;o!==null&&(o.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function va(n){const e=n||{},t=ga(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,o=e.disableEvents||!1,s=fi(),l=e.namespace||(i!==null?i._config.namespace:ao()),a=e.editorState,c=[sn,vt,Xt,Qt,xt,di,...e.nodes||[]],{onError:u,html:d}=e,f=e.editable===void 0||e.editable;let h;if(n===void 0&&t!==null)h=t._nodes;else{h=new Map;for(let m=0;m<c.length;m++){let _=c[m],x=null,v=null;if(typeof _!="function"){const S=_;_=S.replace,x=S.with,v=S.withKlass||null}const y=_.getType(),C=_.transform(),T=new Set;C!==null&&T.add(C),h.set(y,{exportDOM:d&&d.export?d.export.get(_):void 0,klass:_,replace:x,replaceWithKlass:v,transforms:T})}}const g=new Hn(s,i,h,{disableEvents:o,namespace:l,theme:r},u||console.error,function(m,_){const x=new Map,v=new Set,y=C=>{Object.keys(C).forEach(T=>{let S=x.get(T);S===void 0&&(S=[],x.set(T,S)),S.push(C[T])})};return m.forEach(C=>{const T=C.klass.importDOM;if(T==null||v.has(T))return;v.add(T);const S=T.call(C.klass);S!==null&&y(S)}),_&&y(_),x}(h,d?d.import:void 0),f);return a!==void 0&&(g._pendingEditorState=a,g._dirtyType=ht),g}class Hn{constructor(e,t,r,i,o,s,l){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=Ze,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=ao(),this._onError=o,this._htmlConversions=s,this._editable=l,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&j(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&j(36,String(e));const s=o[r];return s.add(t),()=>{s.delete(t),o.every(l=>l.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,i);const s=r&&r.skipInitialization;return s===void 0||s||this.initializeMutationListener(t,i),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&j(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=Xl(r).get(t.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],o=r.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,t);i.push(a)}var s,l;return s=this,l=e.getType(),ge(s,()=>{const a=Ae();if(a.isEmpty())return;if(l==="root")return void Z().markDirty();const c=a._nodeMap;for(const[,u]of c)u.markDirty()},s._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{i.forEach(a=>a.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return I(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=Bt(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,us(this,t,e,i),t!==null&&(this._config.disableEvents||ta(t),r!=null&&t.classList.remove(...r)),e!==null){const o=function(l){const a=l.ownerDocument;return a&&a.defaultView||null}(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=ht,qi(this),this._updateTags.add("history-merge"),He(this),this._config.disableEvents||function(l,a){const c=l.ownerDocument,u=$n.get(c);(u===void 0||u<1)&&c.addEventListener("selectionchange",Ao),$n.set(c,(u||0)+1),l.__lexicalEditor=a;const d=jo(l);for(let f=0;f<Gr.length;f++){const[h,g]=Gr[f],m=typeof g=="function"?_=>{Fo(_)||(Io(_),(a.isEditable()||h==="click")&&g(_,a))}:_=>{if(Fo(_))return;Io(_);const x=a.isEditable();switch(h){case"cut":return x&&I(a,gr,_);case"copy":return I(a,_n,_);case"paste":return x&&I(a,fr,_);case"dragstart":return x&&I(a,Wi,_);case"dragover":return x&&I(a,Bi,_);case"dragend":return x&&I(a,pl,_);case"focus":return x&&I(a,yl,_);case"blur":return x&&I(a,vl,_);case"drop":return x&&I(a,Ri,_)}};l.addEventListener(h,m),d.push(()=>{l.removeEventListener(h,m)})}}(e,this),r!=null&&e.classList.add(...r)}else this._editorState=i,this._pendingEditorState=null,this._window=null;rn("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&j(38),Yi(this);const r=this._pendingEditorState,i=this._updateTags,o=t!==void 0?t.tag:null;r===null||r.isEmpty()||(o!=null&&i.add(o),He(this)),this._pendingEditorState=e,this._dirtyType=ht,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&i.add(o),He(this)}parseEditorState(e,t){return function(r,i,o){const s=fi(),l=te,a=de,c=ne,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,h=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,te=s,de=!1,ne=i;try{const g=i._nodes;ui(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=h,te=l,de=a,ne=c}return s}(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return He(this),this.getEditorState().read(e,{editor:this})}update(e,t){ge(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),ge(this,()=>{const i=F(),o=Z();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Se(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rn("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Hn.version="0.17.1+prod.esm";function xa(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ba=xa(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const fs=L.createContext(null);function Ca(n,e){let t=null;return n!=null&&(t=n[1]),{getTheme:function(){return e??(t!=null?t.getTheme():null)}}}function it(){const n=L.useContext(fs);return n==null&&ba(8),n}const ds=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,wa=ds?L.useLayoutEffect:L.useEffect,Yn={tag:"history-merge"};function Sa({initialConfig:n,children:e}){const t=L.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:s,editorState:l,html:a}=n,c=Ca(null,r),u=va({editable:n.editable,html:a,namespace:i,nodes:o,onError:d=>s(d,u),theme:r});return function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const h=Z();if(h.isEmpty()){const g=ke();h.append(g);const m=ds?document.activeElement:null;(F()!==null||m!==null&&m===d.getRootElement())&&g.select()}},Yn);else if(f!==null)switch(typeof f){case"string":{const h=d.parseEditorState(f);d.setEditorState(h,Yn);break}case"object":d.setEditorState(f,Yn);break;case"function":d.update(()=>{Z().isEmpty()&&f(d)},Yn)}}}(u,l),[u,c]},[]);return wa(()=>{const r=n.editable,[i]=t;i.setEditable(r===void 0||r)},[]),w.jsx(fs.Provider,{value:t,children:e})}function Ta({defaultSelection:n}){const[e]=it();return L.useEffect(()=>{e.focus(()=>{const t=document.activeElement,r=e.getRootElement();r===null||t!==null&&r.contains(t)||r.focus({preventScroll:!0})},{defaultSelection:n})},[n,e]),null}function Ea(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ka=Ea(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const qn=new Map;function hs(n){const e={},t=n.split(";");for(const r of t)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function gi(n){let e=qn.get(n);return e===void 0&&(e=hs(n),qn.set(n,e)),e}function gs(n,e){const t=n.getStartEndPoints();if(e.isSelected(n)&&!e.isSegmented()&&!e.isToken()&&t!==null){const[r,i]=t,o=n.isBackward(),s=r.getNode(),l=i.getNode(),a=e.is(s),c=e.is(l);if(a||c){const[u,d]=oi(n),f=s.is(l),h=e.is(o?l:s),g=e.is(o?s:l);let m,_=0;return f?(_=u>d?d:u,m=u>d?u:d):h?(_=o?d:u,m=void 0):g&&(_=0,m=o?u:d),e.__text=e.__text.slice(_,m),e}}return e}function ps(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();const e=n.getNode();return b(e)||ka(177),n.offset===e.getChildrenSize()}function Na(n){const e=n.getStyle(),t=hs(e);qn.set(e,t)}function bt(n,e){const t=gi("getStyle"in n?n.getStyle():n.style),r=Object.entries(e).reduce((o,[s,l])=>(typeof l=="function"?o[s]=l(t[s],n):l===null?delete o[s]:o[s]=l,o),{...t}),i=function(o){let s="";for(const l in o)l&&(s+=`${l}: ${o[l]};`);return s}(r);n.setStyle(i),qn.set(i,r)}function Pa(n,e){const t=n.getNodes(),r=t.length,i=n.getStartEndPoints();if(i===null)return;const[o,s]=i,l=r-1;let a=t[0],c=t[l];if(n.isCollapsed()&&O(n))return void bt(n,e);const u=a.getTextContent().length,d=s.offset;let f=o.offset;const h=o.isBefore(s);let g=h?f:d,m=h?d:f;const _=h?o.type:s.type,x=h?s.type:o.type,v=h?s.key:o.key;if(D(a)&&g===u){const y=a.getNextSibling();D(y)&&(f=0,g=0,a=y)}if(t.length===1){if(D(a)&&a.canHaveFormat()){if(g=_==="element"?0:f>d?d:f,m=x==="element"?u:f>d?f:d,g===m)return;if(De(a)||g===0&&m===u)bt(a,e),a.select(g,m);else{const y=a.splitText(g,m),C=g===0?y[0]:y[1];bt(C,e),C.select(0,m-g)}}}else{if(D(a)&&g<a.getTextContentSize()&&a.canHaveFormat()&&(g===0||De(a)||(a=a.splitText(g)[1],g=0,h?o.set(a.getKey(),g,"text"):s.set(a.getKey(),g,"text")),bt(a,e)),D(c)&&c.canHaveFormat()){const y=c.getTextContent().length;c.__key!==v&&m!==0&&(m=y),m===y||De(c)||([c]=c.splitText(m)),m===0&&x!=="element"||bt(c,e)}for(let y=1;y<l;y++){const C=t[y],T=C.getKey();D(C)&&C.canHaveFormat()&&T!==a.getKey()&&T!==c.getKey()&&!C.isToken()&&bt(C,e)}}}function ms(n,e){const t=zt(n.focus,e);return U(t)&&!t.isIsolated()||b(t)&&!t.isInline()&&!t.canBeEmpty()}function Oa(n,e,t,r){n.modify(e?"extend":"move",t,r)}function _s(n){const e=n.anchor.getNode();return(oe(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}function ys(n,e,t){const r=_s(n);Oa(n,e,t?!r:r,"character")}function Da(n,e,t){const r=gi(n.getStyle());return r!==null&&r[e]||t}function La(n,e,t=""){let r=null;const i=n.getNodes(),o=n.anchor,s=n.focus,l=n.isBackward(),a=l?s.offset:o.offset,c=l?s.getNode():o.getNode();if(O(n)&&n.isCollapsed()&&n.style!==""){const u=gi(n.style);if(u!==null&&e in u)return u[e]}for(let u=0;u<i.length;u++){const d=i[u];if((u===0||a!==0||!d.is(c))&&D(d)){const f=Da(d,e,t);if(r===null)r=f;else if(r!==f){r="";break}}}return r===null?t:r}function ja(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Aa=ja(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const vs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Ia=vs&&"documentMode"in document?document.documentMode:null;!(!vs||!("InputEvent"in window)||Ia)&&"getTargetRanges"in new window.InputEvent("input");function Fa(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}function Ct(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function Ma(n,...e){const t=Fa(...e);t.length>0&&n.classList.add(...t)}function $a(n){const e=Gn(n,t=>b(t)&&!t.isInline());return b(e)||Aa(4,n.__key),e}const Gn=(n,e)=>{let t=n;for(;t!==Z()&&t!=null;){if(e(t))return t;t=t.getParent()}return null};function ot(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}const Xn=0,pi=1,mi=2,Ce=0,Ra=1,xs=2,Wa=3,Ba=4;function za(n,e,t,r,i){if(n===null||t.size===0&&r.size===0&&!i)return Ce;const o=e._selection,s=n._selection;if(i)return Ra;if(!(O(o)&&O(s)&&s.isCollapsed()&&o.isCollapsed()))return Ce;const l=function(x,v,y){const C=x._nodeMap,T=[];for(const S of v){const P=C.get(S);P!==void 0&&T.push(P)}for(const[S,P]of y){if(!P)continue;const k=C.get(S);k===void 0||oe(k)||T.push(k)}return T}(e,t,r);if(l.length===0)return Ce;if(l.length>1){const x=e._nodeMap,v=x.get(o.anchor.key),y=x.get(s.anchor.key);return v&&y&&!n._nodeMap.has(v.__key)&&D(v)&&v.__text.length===1&&o.anchor.offset===1?xs:Ce}const a=l[0],c=n._nodeMap.get(a.__key);if(!D(c)||!D(a)||c.__mode!==a.__mode)return Ce;const u=c.__text,d=a.__text;if(u===d)return Ce;const f=o.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return Ce;const g=f.offset,m=h.offset,_=d.length-u.length;return _===1&&m===g-1?xs:_===-1&&m===g+1?Wa:_===-1&&m===g?Ba:Ce}function Ka(n,e){let t=Date.now(),r=Ce;return(i,o,s,l,a,c)=>{const u=Date.now();if(c.has("historic"))return r=Ce,t=u,mi;const d=za(i,o,l,a,n.isComposing()),f=(()=>{const h=s===null||s.editor===n,g=c.has("history-push");if(!g&&h&&c.has("history-merge"))return Xn;if(i===null)return pi;const m=o._selection;return l.size>0||a.size>0?g===!1&&d!==Ce&&d===r&&u<t+e&&h||l.size===1&&function(_,x,v){const y=x._nodeMap.get(_),C=v._nodeMap.get(_),T=x._selection,S=v._selection;return!(O(T)&&O(S)&&T.anchor.type==="element"&&T.focus.type==="element"&&S.anchor.type==="text"&&S.focus.type==="text"||!D(y)||!D(C)||y.__parent!==C.__parent)&&JSON.stringify(x.read(()=>y.exportJSON()))===JSON.stringify(v.read(()=>C.exportJSON()))}(Array.from(l)[0],i,o)?Xn:pi:m!==null?Xn:mi})();return t=u,r=d,f}}function bs(n){n.undoStack=[],n.redoStack=[],n.current=null}function Ua(n,e,t){const r=Ka(n,t);return Ct(n.registerCommand(gn,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(a.length!==0){const c=s.current,u=a.pop();c!==null&&(l.push(c),o.dispatchCommand(At,!0)),a.length===0&&o.dispatchCommand(It,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}}(n,e),!0),K),n.registerCommand(pn,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(l.length!==0){const c=s.current;c!==null&&(a.push(c),o.dispatchCommand(It,!0));const u=l.pop();l.length===0&&o.dispatchCommand(At,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}}(n,e),!0),K),n.registerCommand(ml,()=>(bs(e),!1),K),n.registerCommand(_l,()=>(bs(e),n.dispatchCommand(At,!1),n.dispatchCommand(It,!1),!0),K),n.registerUpdateListener(({editorState:o,prevEditorState:s,dirtyLeaves:l,dirtyElements:a,tags:c})=>{const u=e.current,d=e.redoStack,f=e.undoStack,h=u===null?null:u.editorState;if(u!==null&&o===h)return;const g=r(s,o,u,l,a,c);if(g===pi)d.length!==0&&(e.redoStack=[],n.dispatchCommand(At,!1)),u!==null&&(f.push({...u}),n.dispatchCommand(It,!0));else if(g===mi)return;e.current={editor:n,editorState:o}}))}function Va(){return{current:null,redoStack:[],undoStack:[]}}function Ja({delay:n,externalHistoryState:e}){const[t]=it();return function(r,i,o=1e3){const s=L.useMemo(()=>i||Va(),[i]);L.useEffect(()=>Ua(r,s,o),[o,r,s])}(t,e,n),null}const Ha=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Ya(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function qa(){return function(n){const[e]=it(),t=L.useMemo(()=>n(e),[e,n]),r=L.useRef(t.initialValueFn()),[i,o]=L.useState(r.current);return Ha(()=>{const{initialValueFn:s,subscribe:l}=t,a=s();return r.current!==a&&(r.current=a,o(a)),l(c=>{r.current=c,o(c)})},[t,n]),i}(Ya)}function Ga(){return Z().getTextContent()}function Xa(n,e=!0){if(n)return!1;let t=Ga();return e&&(t=t.trim()),t===""}function Za(n){if(!Xa(n,!1))return!1;const e=Z().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const i=e[r];if(U(i))return!1;if(b(i)){if(!hi(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let l=0;l<s;l++){const a=o[r];if(!D(a))return!1}}}return!0}function Cs(n){return()=>Za(n)}function Qa(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}Qa(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function ec(n){const e=window.location.origin,t=r=>{if(r.origin!==e)return;const i=n.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const l=s.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[c,u,d,f,h,g]=a;n.update(()=>{const m=F();if(O(m)){const _=m.anchor;let x=_.getNode(),v=0,y=0;if(D(x)&&c>=0&&u>=0&&(v=c,y=c+u,m.setTextNodeRange(x,v,x,y)),v===y&&d===""||(m.insertRawText(d),x=_.getNode()),D(x)){v=f,y=f+h;const C=x.getTextContentSize();v=v>C?C:v,y=y>C?C:y,m.setTextNodeRange(x,v,x,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}function tc(n,e){const t=e.body?e.body.childNodes:[];let r=[];const i=[];for(let o=0;o<t.length;o++){const s=t[o];if(!Ss.has(s.nodeName)){const l=Ts(s,n,i,!1);l!==null&&(r=r.concat(l))}}return function(o){for(const s of o)s.getNextSibling()instanceof di&&s.insertAfter(rt());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}}(i),r}function nc(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=Z().getChildren();for(let i=0;i<r.length;i++)ws(n,r[i],t,e);return t.innerHTML}function ws(n,e,t,r=null){let i=r===null||e.isSelected(r);const o=b(e)&&e.excludeFromCopy("html");let s=e;if(r!==null){let h=Br(e);h=D(h)&&r!==null?gs(r,h):h,s=h}const l=b(s)?s.getChildren():[],a=n._nodes.get(s.getType());let c;c=a&&a.exportDOM!==void 0?a.exportDOM(n,s):s.exportDOM(n);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let h=0;h<l.length;h++){const g=l[h],m=ws(n,g,f,r);!i&&b(e)&&m&&e.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if(Dn(u)&&u.append(f),t.append(u),d){const h=d.call(s,u);h&&u.replaceWith(h)}}else t.append(f);return i}const Ss=new Set(["STYLE","SCRIPT"]);function Ts(n,e,t,r,i=new Map,o){let s=[];if(Ss.has(n.nodeName))return s;let l=null;const a=function(g,m){const{nodeName:_}=g,x=m._htmlConversions.get(_.toLowerCase());let v=null;if(x!==void 0)for(const y of x){const C=y(g);C!==null&&(v===null||(v.priority||0)<(C.priority||0))&&(v=C)}return v!==null?v.conversion:null}(n,e),c=a?a(n):null;let u=null;if(c!==null){u=c.after;const g=c.node;if(l=Array.isArray(g)?g[g.length-1]:g,l!==null){for(const[,m]of i)if(l=m(l,o),!l)break;l&&s.push(...Array.isArray(g)?g:[l])}c.forChild!=null&&i.set(n.nodeName,c.forChild)}const d=n.childNodes;let f=[];const h=(l==null||!pt(l))&&(l!=null&&si(l)||r);for(let g=0;g<d.length;g++)f.push(...Ts(d[g],e,t,h,new Map(i),l));return u!=null&&(f=u(f)),Ln(n)&&(f=rc(n,f,h?()=>{const g=new di;return t.push(g),g}:ke)),l==null?f.length>0?s=s.concat(f):Ln(n)&&function(g){return g.nextSibling==null||g.previousSibling==null?!1:Rr(g.nextSibling)&&Rr(g.previousSibling)}(n)&&(s=s.concat(rt())):b(l)&&l.append(...f),s}function rc(n,e,t){const r=n.style.textAlign,i=[];let o=[];for(let s=0;s<e.length;s++){const l=e[s];if(si(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===e.length-1||s<e.length-1&&si(e[s+1])){const a=t();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function ic(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Zn=ic(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const oc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Es=n=>oc?(n||window).getSelection():null;function sc(n,e=F()){return e==null&&Zn(166),O(e)&&e.isCollapsed()||e.getNodes().length===0?"":nc(n,e)}function lc(n,e=F()){return e==null&&Zn(166),O(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(ac(n,e))}function ks(n,e,t){const r=n.getData("application/x-lexical-editor");if(r)try{const s=JSON.parse(r);if(s.namespace===t._config.namespace&&Array.isArray(s.nodes))return Ns(t,cc(s.nodes),e)}catch{}const i=n.getData("text/html");if(i)try{const s=new DOMParser().parseFromString(i,"text/html");return Ns(t,tc(t,s),e)}catch{}const o=n.getData("text/plain")||n.getData("text/uri-list");if(o!=null)if(O(e)){const s=o.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l<s.length;l++){const a=F();if(O(a)){const c=s[l];c===`
40
- `||c===`\r
41
- `?a.insertParagraph():c===" "?a.insertNodes([en()]):a.insertText(c)}}}else e.insertRawText(o)}function Ns(n,e,t){n.dispatchCommand(al,{nodes:e,selection:t})||t.insertNodes(e)}function Ps(n,e,t,r=[]){let i=e===null||t.isSelected(e);const o=b(t)&&t.excludeFromCopy("html");let s=t;if(e!==null){let c=Br(t);c=D(c)&&e!==null?gs(e,c):c,s=c}const l=b(s)?s.getChildren():[],a=function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Zn(58,d.name),b(c)){const f=u.children;Array.isArray(f)||Zn(59,d.name)}return u}(s);if(D(s)){const c=s.__text;c.length>0?a.text=c:i=!1}for(let c=0;c<l.length;c++){const u=l[c],d=Ps(n,e,u,a.children);!i&&b(t)&&d&&t.extractWithChild(u,e,"clone")&&(i=!0)}if(i&&!o)r.push(a);else if(Array.isArray(a.children))for(let c=0;c<a.children.length;c++){const u=a.children[c];r.push(u)}return i}function ac(n,e){const t=[],r=Z().getChildren();for(let i=0;i<r.length;i++)Ps(n,e,r[i],t);return{namespace:n._config.namespace,nodes:t}}function cc(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=pa(r);D(i)&&Na(i),e.push(i)}return e}let wt=null;async function Os(n,e,t){if(wt!==null)return!1;if(e!==null)return new Promise((a,c)=>{n.update(()=>{a(Ds(n,e,t))})});const r=n.getRootElement(),i=n._window==null?window.document:n._window.document,o=Es(n._window);if(r===null||o===null)return!1;const s=i.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(i.createTextNode("#")),r.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),o.removeAllRanges(),o.addRange(l),new Promise((a,c)=>{const u=n.registerCommand(_n,d=>(ot(d,ClipboardEvent)&&(u(),wt!==null&&(window.clearTimeout(wt),wt=null),a(Ds(n,d,t))),!0),ya);wt=window.setTimeout(()=>{u(),wt=null,a(!1)},50),i.execCommand("copy"),s.remove()})}function Ds(n,e,t){if(t===void 0){const i=Es(n._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!Mt(n,o,s))return!1;const l=F();if(l===null)return!1;t=fc(l)}e.preventDefault();const r=e.clipboardData;return r!==null&&(dc(r,t),!0)}const uc=[["text/html",sc],["application/x-lexical-editor",lc]];function fc(n=F()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=ql();for(const[r,i]of uc){const o=i(t,n);o!==null&&(e[r]=o)}}return e}function dc(n,e){for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function Ls(n,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const St=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,hc=St&&"documentMode"in document?document.documentMode:null,gc=!(!St||!("InputEvent"in window)||hc)&&"getTargetRanges"in new window.InputEvent("input"),pc=St&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),mc=St&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_c=St&&/^(?=.*Chrome).*/i.test(navigator.userAgent),yc=St&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!_c,js=ll();function Qn(n){let e=null;if(ot(n,DragEvent)?e=n.dataTransfer:ot(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),i=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),i]}function As(n){const e=F();if(!O(e))return!1;const t=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(t.has(s))continue;const l=Gn(o,c=>b(c)&&!c.isInline());if(l===null)continue;const a=l.getKey();l.canIndent()&&!t.has(a)&&(t.add(a),n(l))}return t.size>0}function er(n){const e=et(n);return U(e)}function vc(n){return Ct(n.registerCommand(Oi,e=>{const t=F();return!!be(t)&&(t.clear(),!0)},0),n.registerCommand(Xe,e=>{const t=F();return!!O(t)&&(t.deleteCharacter(e),!0)},K),n.registerCommand(Lt,e=>{const t=F();return!!O(t)&&(t.deleteWord(e),!0)},K),n.registerCommand(jt,e=>{const t=F();return!!O(t)&&(t.deleteLine(e),!0)},K),n.registerCommand(dt,e=>{const t=F();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const r=e.dataTransfer;if(r!=null)ks(r,t,n);else if(O(t)){const i=e.data;return i&&t.insertText(i),!0}}return!0},K),n.registerCommand(dr,()=>{const e=F();return!!O(e)&&(e.removeText(),!0)},K),n.registerCommand(fe,e=>{const t=F();return!!O(t)&&(t.formatText(e),!0)},K),n.registerCommand(me,e=>{const t=F();if(!O(t)&&!be(t))return!1;const r=t.getNodes();for(const i of r){const o=Gn(i,s=>b(s)&&!s.isInline());o!==null&&o.setFormat(e)}return!0},K),n.registerCommand(ft,e=>{const t=F();return!!O(t)&&(t.insertLineBreak(e),!0)},K),n.registerCommand(hn,()=>{const e=F();return!!O(e)&&(e.insertParagraph(),!0)},K),n.registerCommand(gl,()=>(da([en()]),!0),K),n.registerCommand($i,()=>As(e=>{const t=e.getIndent();e.setIndent(t+1)}),K),n.registerCommand(hr,()=>As(e=>{const t=e.getIndent();t>0&&e.setIndent(t-1)}),K),n.registerCommand(ji,e=>{const t=F();if(be(t)&&!er(e.target)){const r=t.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(O(t)){const r=zt(t.focus,!0);if(!e.shiftKey&&U(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},K),n.registerCommand(Ai,e=>{const t=F();if(be(t)){const r=t.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(O(t)){if(function(i){const o=i.focus;return o.key==="root"&&o.offset===Z().getChildrenSize()}(t))return e.preventDefault(),!0;const r=zt(t.focus,!1);if(!e.shiftKey&&U(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},K),n.registerCommand(Li,e=>{const t=F();if(be(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}if(!O(t))return!1;if(ms(t,!0)){const r=e.shiftKey;return e.preventDefault(),ys(t,r,!0),!0}return!1},K),n.registerCommand(Di,e=>{const t=F();if(be(t)&&!er(e.target)){const i=t.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectNext(0,0),!0}if(!O(t))return!1;const r=e.shiftKey;return!!ms(t,!1)&&(e.preventDefault(),ys(t,r,!1),!0)},K),n.registerCommand(Ii,e=>{if(er(e.target))return!1;const t=F();if(!O(t))return!1;e.preventDefault();const{anchor:r}=t,i=r.getNode();return t.isCollapsed()&&r.offset===0&&!oe(i)&&$a(i).getIndent()>0?n.dispatchCommand(hr,void 0):n.dispatchCommand(Xe,!0)},K),n.registerCommand(Mi,e=>{if(er(e.target))return!1;const t=F();return!!O(t)&&(e.preventDefault(),n.dispatchCommand(Xe,!1))},K),n.registerCommand(mn,e=>{const t=F();if(!O(t))return!1;if(e!==null){if((mc||pc||yc)&&gc)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(ft,!1)}return n.dispatchCommand(hn,void 0)},K),n.registerCommand(Fi,()=>{const e=F();return!!O(e)&&(n.blur(),!0)},K),n.registerCommand(Ri,e=>{const[,t]=Qn(e);if(t.length>0){const i=Ls(e.clientX,e.clientY);if(i!==null){const{offset:o,node:s}=i,l=et(s);if(l!==null){const a=ua();if(D(l))a.anchor.set(l.getKey(),o,"text"),a.focus.set(l.getKey(),o,"text");else{const u=l.getParentOrThrow().getKey(),d=l.getIndexWithinParent()+1;a.anchor.set(u,d,"element"),a.focus.set(u,d,"element")}const c=Qi(a);we(c)}n.dispatchCommand(js,t)}return e.preventDefault(),!0}const r=F();return!!O(r)},K),n.registerCommand(Wi,e=>{const[t]=Qn(e),r=F();return!(t&&!O(r))},K),n.registerCommand(Bi,e=>{const[t]=Qn(e),r=F();if(t&&!O(r))return!1;const i=Ls(e.clientX,e.clientY);if(i!==null){const o=et(i.node);U(o)&&e.preventDefault()}return!0},K),n.registerCommand(pr,()=>(Vl(),!0),K),n.registerCommand(_n,e=>(Os(n,ot(e,ClipboardEvent)?e:null),!0),K),n.registerCommand(gr,e=>(async function(t,r){await Os(r,ot(t,ClipboardEvent)?t:null),r.update(()=>{const i=F();O(i)?i.removeText():be(i)&&i.getNodes().forEach(o=>o.remove())})}(e,n),!0),K),n.registerCommand(fr,e=>{const[,t,r]=Qn(e);return t.length>0&&!r?(n.dispatchCommand(js,t),!0):Nr(e.target)?!1:F()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=F(),l=ot(i,InputEvent)||ot(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&ks(l,s,o)},{tag:"paste"})}(e,n),!0)},K))}const _i=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Is(n){return n.getEditorState().read(Cs(n.isComposing()))}function xc({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=it(),i=function(o,s){const[l,a]=L.useState(()=>o.getDecorators());return _i(()=>o.registerDecoratorListener(c=>{lr.flushSync(()=>{a(c)})}),[o]),L.useEffect(()=>{a(o.getDecorators())},[o]),L.useMemo(()=>{const c=[],u=Object.keys(l);for(let d=0;d<u.length;d++){const f=u[d],h=w.jsx(s,{onError:m=>o._onError(m),children:w.jsx(L.Suspense,{fallback:null,children:l[f]})}),g=o.getElementByKey(f);g!==null&&c.push(lr.createPortal(h,g,f))}return c},[s,l,o])}(r,t);return function(o){_i(()=>Ct(vc(o),ec(o)),[o])}(r),w.jsxs(w.Fragment,{children:[n,w.jsx(bc,{content:e}),i]})}function bc({content:n}){const[e]=it(),t=function(i){const[o,s]=L.useState(()=>Is(i));return _i(()=>{function l(){const a=Is(i);s(a)}return l(),Ct(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o}(e),r=qa();return t?typeof n=="function"?n(r):n:null}function yi(n,e){return yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},yi(n,e)}var Fs={error:null},Cc=function(n){var e,t;function r(){for(var o,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];return(o=n.call.apply(n,[this].concat(l))||this).state=Fs,o.resetErrorBoundary=function(){for(var c,u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];o.props.onReset==null||(c=o.props).onReset.apply(c,d),o.reset()},o}t=n,(e=r).prototype=Object.create(t.prototype),e.prototype.constructor=e,yi(e,t),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState(Fs)},i.componentDidCatch=function(o,s){var l,a;(l=(a=this.props).onError)==null||l.call(a,o,s)},i.componentDidUpdate=function(o,s){var l,a,c,u,d=this.state.error,f=this.props.resetKeys;d!==null&&s.error!==null&&((c=o.resetKeys)===void 0&&(c=[]),(u=f)===void 0&&(u=[]),c.length!==u.length||c.some(function(h,g){return!Object.is(h,u[g])}))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,o.resetKeys,f),this.reset())},i.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,a=s.FallbackComponent,c=s.fallback;if(o!==null){var u={error:o,resetErrorBoundary:this.resetErrorBoundary};if(Re.isValidElement(c))return c;if(typeof l=="function")return l(u);if(a)return Re.createElement(a,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(Re.Component);function wc({children:n,onError:e}){return w.jsx(Cc,{fallback:w.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}const Sc=L.createContext({margin:{bottom:"",left:"",right:"",top:""},pageMarginValue:"",updateCustomMargin:(n,e)=>{},updatePageMarginValue:n=>{}}),Tc=()=>L.useContext(Sc),Su="",st=8,lt=72,Ec=16;function kc({selectionFontSize:n,editor:e}){const[t,r]=Re.useState(n),i=(a,c)=>{if(!c)return a;let u=a;switch(c){case 2:switch(!0){case a>lt:u=lt;break;case a>=48:u-=12;break;case a>=24:u-=4;break;case a>=14:u-=2;break;case a>=9:u-=1;break;default:u=st;break}break;case 1:switch(!0){case a<st:u=st;break;case a<12:u+=1;break;case a<20:u+=2;break;case a<36:u+=4;break;case a<=60:u+=12;break;default:u=lt;break}break}return u},o=Re.useCallback((a,c)=>{const u=d=>(d||(d=`${Ec}px`),d=d.slice(0,-2),`${i(Number(d),c)}px`);e.update(()=>{if(e.isEditable()){const d=F();d!==null&&Pa(d,{"font-size":a||u})}})},[e]),s=a=>{const c=Number(t);if(["e","E","+","-"].includes(a.key)||isNaN(c)){a.preventDefault(),r("");return}if(a.key==="Enter"){a.preventDefault();let u=c;c>lt?u=lt:c<st&&(u=st),r(String(u)),o(String(u)+"px",null)}},l=a=>{if(t!==""){const c=i(Number(t),a);o(String(c)+"px",null)}else o(null,a)};return Re.useEffect(()=>{r(n)},[n]),w.jsxs(w.Fragment,{children:[w.jsx("button",{type:"button",disabled:n!==""&&Number(t)<=st,onClick:()=>l(2),className:"toolbar-item font-decrement",children:w.jsx("i",{className:"format minus-icon"})}),w.jsx("input",{type:"number",value:t,className:"toolbar-item font-size-input",min:st,max:lt,onChange:a=>r(a.target.value),onKeyDown:s}),w.jsx("button",{type:"button",disabled:n!==""&&Number(t)>=lt,onClick:()=>l(1),className:"toolbar-item font-increment",children:w.jsx("i",{className:"format add-icon"})})]})}const Nc=new Set(["http:","https:","mailto:","sms:","tel:"]);class tr extends on{static getType(){return"link"}static clone(e){return new tr(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=t;this.__url=e,this.__target=i,this.__rel=o,this.__title=s}createDOM(e){const t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),this.__target!==null&&(t.target=this.__target),this.__rel!==null&&(t.rel=this.__rel),this.__title!==null&&(t.title=this.__title),Ma(t,e.theme.link),t}updateDOM(e,t,r){if(t instanceof HTMLAnchorElement){const i=this.__url,o=this.__target,s=this.__rel,l=this.__title;i!==e.__url&&(t.href=i),o!==e.__target&&(o?t.target=o:t.removeAttribute("target")),s!==e.__rel&&(s?t.rel=s:t.removeAttribute("rel")),l!==e.__title&&(l?t.title=l:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:Pc,priority:1})}}static importJSON(e){const t=vi(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{const t=new URL(e);if(!Nc.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,t=!0){const r=vi(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!O(t))return!1;const i=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function Pc(n){let e=null;if(Yl(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=vi(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function vi(n,e){return Kt(new tr(n,e))}function Oc(n){return n instanceof tr}function Dc(n){const e=n.anchor,t=n.focus,r=n.anchor.getNode(),i=n.focus.getNode();return r===i?r:n.isBackward()?ps(t)?r:i:ps(e)?r:i}function Lc(){return w.jsx("div",{className:"divider"})}const Ms=Re.createContext(null),$s=4;function Ye({children:n,className:e,onClick:t,title:r}){const i=L.useRef(null),o=Re.useContext(Ms);if(o===null)throw new Error("DropDownItem must be used within a DropDown");const{registerItem:s}=o;return L.useEffect(()=>{i&&i.current&&s(i)},[i,s]),w.jsx("button",{className:e,onClick:t,ref:i,title:r,type:"button",children:n})}function jc({children:n,dropDownRef:e,onClose:t}){const[r,i]=L.useState(),[o,s]=L.useState(),l=L.useCallback(u=>{i(d=>d?[...d,u]:[u])},[i]),a=u=>{if(!r)return;const d=u.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(d)&&u.preventDefault(),d==="Escape"||d==="Tab"?t():d==="ArrowUp"?s(f=>{if(!f)return r[0];const h=r.indexOf(f)-1;return r[h===-1?r.length-1:h]}):d==="ArrowDown"&&s(f=>f?r[r.indexOf(f)+1]:r[0])},c=L.useMemo(()=>({registerItem:l}),[l]);return L.useEffect(()=>{r&&!o&&s(r[0]),o&&o.current&&o.current.focus()},[r,o]),w.jsx(Ms.Provider,{value:c,children:w.jsx("div",{className:"dropdown",ref:e,onKeyDown:a,children:n})})}function Ac({disabled:n=!1,buttonLabel:e,buttonAriaLabel:t,buttonClassName:r,buttonIconClassName:i,children:o,stopCloseOnClickSelf:s}){const l=L.useRef(null),a=L.useRef(null),[c,u]=L.useState(!1),d=()=>{u(!1),a&&a.current&&a.current.focus()};return L.useEffect(()=>{const f=a.current,h=l.current;if(c&&f!==null&&h!==null){const{top:g,left:m}=f.getBoundingClientRect();h.style.top=`${g+f.offsetHeight+$s}px`,h.style.left=`${Math.min(m,window.innerWidth-h.offsetWidth-20)}px`}},[l,a,c]),L.useEffect(()=>{const f=a.current;if(f!==null&&c){const h=g=>{const m=g.target;s&&l.current&&l.current.contains(m)||f.contains(m)||u(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}}},[l,a,c,s]),L.useEffect(()=>{const f=()=>{if(c){const h=a.current,g=l.current;if(h!==null&&g!==null){const{top:m}=h.getBoundingClientRect(),_=m+h.offsetHeight+$s;_!==g.getBoundingClientRect().top&&(g.style.top=`${_}px`)}}};return document.addEventListener("scroll",f),()=>{document.removeEventListener("scroll",f)}},[a,l,c]),w.jsxs(w.Fragment,{children:[w.jsxs("button",{type:"button",disabled:n,"aria-label":t||e,className:r,onClick:()=>u(!c),ref:a,children:[i&&w.jsx("span",{className:i}),e&&w.jsx("span",{className:"text dropdown-button-text",children:e}),w.jsx("i",{className:"chevron-down"})]}),c&&lr.createPortal(w.jsx(jc,{dropDownRef:l,onClose:d,children:o}),document.body)]})}const ln={center:{icon:"center-align",iconRTL:"center-align",name:"Center Align"},end:{icon:"right-align",iconRTL:"left-align",name:"End Align"},justify:{icon:"justify-align",iconRTL:"justify-align",name:"Justify Align"},left:{icon:"left-align",iconRTL:"left-align",name:"Left Align"},right:{icon:"right-align",iconRTL:"right-align",name:"Right Align"},start:{icon:"left-align",iconRTL:"right-align",name:"Start Align"}},Ic=({editor:n,value:e,isRTL:t,disabled:r=!1})=>{const i=ln[e||"left"];return w.jsxs(Ac,{disabled:r,buttonLabel:i.name,buttonIconClassName:`icon ${t?i.iconRTL:i.icon}`,buttonClassName:"toolbar-item spaced alignment",buttonAriaLabel:"Formatting options for text alignment",children:[w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"left")},className:"item",children:[w.jsx("i",{className:"icon left-align"}),w.jsx("span",{className:"text",children:"Left Align"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"center")},className:"item",children:[w.jsx("i",{className:"icon center-align"}),w.jsx("span",{className:"text",children:"Center Align"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"right")},className:"item",children:[w.jsx("i",{className:"icon right-align"}),w.jsx("span",{className:"text",children:"Right Align"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"justify")},className:"item",children:[w.jsx("i",{className:"icon justify-align"}),w.jsx("span",{className:"text",children:"Justify Align"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"start")},className:"item",children:[w.jsx("i",{className:`icon ${t?ln.start.iconRTL:ln.start.icon}`}),w.jsx("span",{className:"text",children:"Start Align"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(me,"end")},className:"item",children:[w.jsx("i",{className:`icon ${t?ln.end.iconRTL:ln.end.icon}`}),w.jsx("span",{className:"text",children:"End Align"})]}),w.jsx(Lc,{}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand(hr,void 0)},className:"item",children:[w.jsx("i",{className:"icon "+(t?"indent":"outdent")}),w.jsx("span",{className:"text",children:"Outdent"})]}),w.jsxs(Ye,{onClick:()=>{n.dispatchCommand($i,void 0)},className:"item",children:[w.jsx("i",{className:"icon "+(t?"outdent":"indent")}),w.jsx("span",{className:"text",children:"Indent"})]})]})};var Rs={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ws=L.createContext&&L.createContext(Rs),Fc=["attr","size","title"];function Mc(n,e){if(n==null)return{};var t=$c(n,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function $c(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function nr(){return nr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},nr.apply(this,arguments)}function Bs(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function rr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bs(Object(t),!0).forEach(function(r){Rc(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Bs(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Rc(n,e,t){return e=Wc(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Wc(n){var e=Bc(n,"string");return typeof e=="symbol"?e:e+""}function Bc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function zs(n){return n&&n.map((e,t)=>L.createElement(e.tag,rr({key:t},e.attr),zs(e.child)))}function Tt(n){return e=>L.createElement(zc,nr({attr:rr({},n.attr)},e),zs(n.child))}function zc(n){var e=t=>{var{attr:r,size:i,title:o}=n,s=Mc(n,Fc),l=i||t.size||"1em",a;return t.className&&(a=t.className),n.className&&(a=(a?a+" ":"")+n.className),L.createElement("svg",nr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,s,{className:a,style:rr(rr({color:n.color||t.color},t.style),n.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&L.createElement("title",null,o),n.children)};return Ws!==void 0?L.createElement(Ws.Consumer,null,t=>e(t)):e(Rs)}function Kc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"m3.266 12.496.96-2.853H7.76l.96 2.853H10L6.62 3H5.38L2 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm6.132 7.203v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V15h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41-1.23 0-1.795.8-1.795 1.576v.06z"},child:[]}]})(n)}function Uc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"m4.266 12.496.96-2.853H8.76l.96 2.853H11L7.62 3H6.38L3 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm5.132-1.797v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V6h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41C11.565 1 11 1.8 11 2.576v.06z"},child:[]}]})(n)}function Vc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z"},child:[]}]})(n)}function Jc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z"},child:[]}]})(n)}function Hc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6.333 5.686c0 .31.083.581.27.814H5.166a2.8 2.8 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967"},child:[]}]})(n)}function Yc(n){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57s-2.687-1.08-2.687-2.57zM12.5 15h-9v-1h9z"},child:[]}]})(n)}const xi=1;function ir(){return w.jsx("div",{className:"divider"})}function qc(){const[n]=it(),e=L.useRef(null),[t,r]=L.useState(!1),[i,o]=L.useState(!1),[s,l]=L.useState(!1),[a,c]=L.useState(!1),[u,d]=L.useState(!1),[f,h]=L.useState(!1),[g,m]=L.useState(!1),[_,x]=L.useState(!1),[v,y]=L.useState("14px"),[C,T]=L.useState("left"),[S,P]=L.useState(!1),k=L.useCallback(()=>{const E=F();if(O(E)){const M=Dc(E),R=M.getParent();l(E.hasFormat("bold")),c(E.hasFormat("italic")),d(E.hasFormat("underline")),h(E.hasFormat("strikethrough")),m(E.hasFormat("subscript")),x(E.hasFormat("superscript")),P(_s(E)),y(La(E,"font-size","14px"));let q;Oc(R)&&(q=Gn(M,H=>b(H)&&!H.isInline())),T(b(q)?q.getFormatType():b(M)?M.getFormatType():(R==null?void 0:R.getFormatType())||"left")}},[]);return L.useEffect(()=>Ct(n.registerUpdateListener(({editorState:E})=>{E.read(()=>{k()})}),n.registerCommand(dn,(E,M)=>(k(),!1),xi),n.registerCommand(It,E=>(r(E),!1),xi),n.registerCommand(At,E=>(o(E),!1),xi)),[n,k]),w.jsxs("div",{className:"toolbar",ref:e,children:[w.jsx("button",{disabled:!t,onClick:()=>{n.dispatchCommand(gn,void 0)},className:"toolbar-item spaced","aria-label":"Undo",children:w.jsx("i",{className:"format undo"})}),w.jsx("button",{disabled:!i,onClick:()=>{n.dispatchCommand(pn,void 0)},className:"toolbar-item","aria-label":"Redo",children:w.jsx("i",{className:"format redo"})}),w.jsx(ir,{}),w.jsx(kc,{selectionFontSize:v.slice(0,-2),editor:n}),w.jsx(ir,{}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"bold")},className:"toolbar-item spaced "+(s?"active":""),"aria-label":"Format Bold",children:w.jsx(Vc,{size:18})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"italic")},className:"toolbar-item spaced "+(a?"active":""),"aria-label":"Format Italics",children:w.jsx(Jc,{size:18})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"underline")},className:"toolbar-item spaced "+(u?"active":""),"aria-label":"Format Underline",children:w.jsx(Yc,{size:18})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"strikethrough")},className:"toolbar-item spaced "+(f?"active":""),"aria-label":"Format Strikethrough",children:w.jsx(Hc,{size:18})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"subscript")},className:"toolbar-item spaced "+(g?"active":""),title:"Subscript","aria-label":"Format text with a subscript",type:"button",children:w.jsx(Kc,{size:18})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(fe,"superscript")},className:"toolbar-item spaced "+(_?"active":""),title:"Superscript","aria-label":"Format text with a superscript",type:"button",children:w.jsx(Uc,{size:18})}),w.jsx(ir,{}),w.jsx("button",{onClick:()=>{n.dispatchCommand(me,"left")},className:"toolbar-item spaced","aria-label":"Left Align",children:w.jsx("i",{className:"format left-align"})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(me,"center")},className:"toolbar-item spaced","aria-label":"Center Align",children:w.jsx("i",{className:"format center-align"})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(me,"right")},className:"toolbar-item spaced","aria-label":"Right Align",children:w.jsx("i",{className:"format right-align"})}),w.jsx("button",{onClick:()=>{n.dispatchCommand(me,"justify")},className:"toolbar-item","aria-label":"Justify Align",children:w.jsx("i",{className:"format justify-align"})})," ",w.jsx(ir,{}),w.jsx(Ic,{value:C,editor:n,isRTL:S})]})}const Tu="",Ks=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Gc({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:i,ariaExpanded:o,ariaLabel:s,ariaLabelledBy:l,ariaMultiline:a,ariaOwns:c,ariaRequired:u,autoCapitalize:d,className:f,id:h,role:g="textbox",spellCheck:m=!0,style:_,tabIndex:x,"data-testid":v,...y},C){const[T,S]=L.useState(n.isEditable()),P=L.useCallback(E=>{E&&E.ownerDocument&&E.ownerDocument.defaultView?n.setRootElement(E):n.setRootElement(null)},[n]),k=L.useMemo(()=>function(...E){return M=>{E.forEach(R=>{typeof R=="function"?R(M):R!=null&&(R.current=M)})}}(C,P),[P,C]);return Ks(()=>(S(n.isEditable()),n.registerEditableListener(E=>{S(E)})),[n]),w.jsx("div",{...y,"aria-activedescendant":T?e:void 0,"aria-autocomplete":T?t:"none","aria-controls":T?r:void 0,"aria-describedby":i,"aria-expanded":T&&g==="combobox"?!!o:void 0,"aria-label":s,"aria-labelledby":l,"aria-multiline":a,"aria-owns":T?c:void 0,"aria-readonly":!T||void 0,"aria-required":u,autoCapitalize:d,className:f,contentEditable:T,"data-testid":v,id:h,ref:k,role:T?g:void 0,spellCheck:m,style:_,tabIndex:x})}const Xc=L.forwardRef(Gc);function Us(n){return n.getEditorState().read(Cs(n.isComposing()))}const Zc=L.forwardRef(Qc);function Qc(n,e){const{placeholder:t,...r}=n,[i]=it();return w.jsxs(w.Fragment,{children:[w.jsx(Xc,{editor:i,...r,ref:e}),t!=null&&w.jsx(eu,{editor:i,content:t})]})}function eu({content:n,editor:e}){const t=function(s){const[l,a]=L.useState(()=>Us(s));return Ks(()=>{function c(){const u=Us(s);a(u)}return c(),Ct(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),l}(e),[r,i]=L.useState(e.isEditable());if(L.useLayoutEffect(()=>(i(e.isEditable()),e.registerEditableListener(s=>{i(s)})),[e]),!t)return null;let o=null;return typeof n=="function"?o=n(r):n!==null&&(o=n),o===null?null:w.jsx("div",{"aria-hidden":!0,children:o})}function tu({className:n,style:e}){return w.jsx(Zc,{className:n||"ContentEditable__root",style:e})}const nu={};function ru(n){console.error(n)}function iu(){const{pageMarginValue:n}=Tc(),e={namespace:"MyEditor",theme:nu,onError:ru};return w.jsx(Sa,{initialConfig:e,children:w.jsxs("div",{className:"editor-shell",children:[w.jsx(qc,{}),w.jsx("div",{className:"editor-container",children:w.jsxs("div",{className:"editor-inner",children:[w.jsx(xc,{contentEditable:w.jsx("div",{className:"editor-scroller",children:w.jsx("div",{className:"editor",children:w.jsx(tu,{style:{margin:n}})})}),ErrorBoundary:wc}),w.jsx(Ja,{}),w.jsx(Ta,{})]})})]})})}$e.Editor=iu,Object.defineProperty($e,Symbol.toStringTag,{value:"Module"})});
31
+ `,Pu=bt?" ":ir,Zs="֑-߿יִ-﷽ﹰ-ﻼ",Xs="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Lu=new RegExp("^[^"+Xs+"]*["+Zs+"]"),Ru=new RegExp("^[^"+Zs+"]*["+Xs+"]"),lt={bold:1,code:16,highlight:ci,italic:2,strikethrough:nr,subscript:32,superscript:64,underline:rr},Iu={directionless:1,unmergeable:2},Qs={center:fi,end:mi,justify:hi,left:di,right:gi,start:pi},Du={[fi]:"center",[mi]:"end",[hi]:"justify",[di]:"left",[gi]:"right",[pi]:"start"},$u={normal:0,segmented:2,token:1},Mu={[Nu]:"normal",[Fu]:"segmented",[Au]:"token"};function ju(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var R=ju(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function sr(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const zu=100;let _i=!1,yi=0;function Bu(n){yi=n.timeStamp}function bi(n,e,t){return e.__lexicalLineBreak===n||n[`__lexicalKey_${t._key}`]!==void 0}function Uu(n,e,t){const r=tt(t._window);let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&ki(e,o,i,s,!1)}function Wu(n,e,t){if(A(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return e.nodeType===vt&&t.isAttached()}function eo(n,e,t){_i=!0;const r=performance.now()-yi>zu;try{$e(n,()=>{const i=P()||function(d){return d.getEditorState().read(()=>{const g=P();return g!==null?g.clone():null})}(n),s=new Map,o=n.getRootElement(),a=n._editorState,l=n._blockCursorElement;let u=!1,c="";for(let d=0;d<e.length;d++){const g=e[d],h=g.type,m=g.target;let _=ut(m,a);if(!(_===null&&m!==o||X(_))){if(h==="characterData")r&&O(_)&&Wu(i,m,_)&&Uu(m,_,n);else if(h==="childList"){u=!0;const b=g.addedNodes;for(let x=0;x<b.length;x++){const w=b[x],S=uo(w),C=w.parentNode;if(C!=null&&w!==l&&S===null&&(w.nodeName!=="BR"||!bi(w,C,n))){if(bt){const k=w.innerText||w.nodeValue;k&&(c+=k)}C.removeChild(w)}}const p=g.removedNodes,y=p.length;if(y>0){let x=0;for(let w=0;w<y;w++){const S=p[w];(S.nodeName==="BR"&&bi(S,m,n)||l===S)&&(m.appendChild(S),x++)}y!==x&&(m===o&&(_=go(a)),s.set(m,_))}}}}if(s.size>0)for(const[d,g]of s)if(T(g)){const h=g.getChildrenKeys();let m=d.firstChild;for(let _=0;_<h.length;_++){const b=h[_],p=n.getElementByKey(b);p!==null&&(m==null?(d.appendChild(p),m=p):m!==p&&d.replaceChild(p,m),m=m.nextSibling)}}else O(g)&&g.markDirty();const f=t.takeRecords();if(f.length>0){for(let d=0;d<f.length;d++){const g=f[d],h=g.addedNodes,m=g.target;for(let _=0;_<h.length;_++){const b=h[_],p=b.parentNode;p==null||b.nodeName!=="BR"||bi(b,m,n)||p.removeChild(b)}}t.takeRecords()}i!==null&&(u&&(i.dirty=!0,De(i)),bt&&wo(n)&&i.insertRawText(c))})}finally{_i=!1}}function to(n){const e=n._observer;e!==null&&eo(n,e.takeRecords(),e)}function no(n){(function(e){yi===0&&gr(e).addEventListener("textInput",Bu,!0)})(n),n._observer=new MutationObserver((e,t)=>{eo(n,e,t)})}function ro(n,e){const t=n.__mode,r=n.__format,i=n.__style,s=e.__mode,o=e.__format,a=e.__style;return!(t!==null&&t!==s||r!==null&&r!==o||i!==null&&i!==a)}function io(n,e){const t=n.mergeWithSibling(e),r=re()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function so(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&O(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(ro(e,r)){r=io(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&O(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(ro(r,t)){r=io(r,t);break}break}t.remove()}}else r.remove()}function oo(n){return ao(n.anchor),ao(n.focus),n}function ao(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),O(r)){n.set(r.__key,i?r.getTextContentSize():0,"text");break}if(!T(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element")}}let Ku=1;const Hu=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function vi(n){const e=document.activeElement;if(e===null)return!1;const t=e.nodeName;return X(ut(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&or(e)==null)}function vn(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!vi(e)&&lo(e)===n}catch{return!1}}function xi(n){return n instanceof Ar}function lo(n){let e=n;for(;e!=null;){const t=or(e);if(xi(t))return t;e=dr(e)}return null}function or(n){return n?n.__lexicalEditor:null}function Vt(n){return n.isToken()||n.isSegmented()}function Ju(n){return n.nodeType===vt}function ar(n){let e=n;for(;e!=null;){if(Ju(e))return e;e=e.firstChild}return null}function Si(n,e,t){const r=lt[e];if(t!==null&&(n&r)==(t&r))return n;let i=n^r;return e==="subscript"?i&=~lt.superscript:e==="superscript"&&(i&=~lt.subscript),i}function wi(n){return O(n)||Z(n)||X(n)}function Vu(n,e){if(e!=null)return void(n.__key=e);Oe(),la();const t=re(),r=gt(),i=""+Ku++;r._nodeMap.set(i,n),T(n)?t._dirtyElements.set(i,!0):t._dirtyLeaves.add(i),t._cloneNotNeeded.add(i),t._dirtyType=Ys,n.__key=i}function Pt(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),s=n.getNextSibling();if(i===null)if(s!==null){const o=s.getWritable();r.__first=s.__key,o.__prev=null}else r.__first=null;else{const o=i.getWritable();if(s!==null){const a=s.getWritable();a.__prev=o.__key,o.__next=a.__key}else o.__next=null;t.__prev=null}if(s===null)if(i!==null){const o=i.getWritable();r.__last=i.__key,o.__next=null}else r.__last=null;else{const o=s.getWritable();if(i!==null){const a=i.getWritable();a.__next=o.__key,o.__prev=a.__key}else o.__prev=null;t.__next=null}r.__size--,t.__parent=null}}function lr(n){la();const e=n.getLatest(),t=e.__parent,r=gt(),i=re(),s=r._nodeMap,o=i._dirtyElements;t!==null&&function(l,u,c){let f=l;for(;f!==null;){if(c.has(f))return;const d=u.get(f);if(d===void 0)break;c.set(f,!1),f=d.__parent}}(t,s,o);const a=e.__key;i._dirtyType=Ys,T(n)?o.set(a,!0):i._dirtyLeaves.add(a)}function _e(n){Oe();const e=re(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=ae(t);r!==null&&r.getWritable()}if(n!==null){const r=ae(n);r!==null&&r.getWritable()}}}function xt(){return In()?null:re()._compositionKey}function ae(n,e){const t=(e||gt())._nodeMap.get(n);return t===void 0?null:t}function uo(n,e){const t=n[`__lexicalKey_${re()._key}`];return t!==void 0?ae(t,e):null}function ut(n,e){let t=n;for(;t!=null;){const r=uo(t,e);if(r!==null)return r;t=dr(t)}return null}function co(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function fo(n){return n.read(()=>le().getTextContent())}function le(){return go(gt())}function go(n){return n._nodeMap.get("root")}function De(n){Oe();const e=gt();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function qt(n){const e=re(),t=function(r,i){let s=r;for(;s!=null;){const o=s[`__lexicalKey_${i._key}`];if(o!==void 0)return o;s=dr(s)}return null}(n,e);return t===null?n===e.getRootElement()?ae("root"):null:ae(t)}function ho(n,e){return e?n.getTextContentSize():0}function po(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Ci(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function mo(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function _o(n){return n.nodeType===vt?n.nodeValue:null}function Ei(n,e,t){const r=tt(e._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let a=_o(i);const l=ut(i);if(a!==null&&O(l)){if(a===ir&&t){const u=t.length;a=t,s=u,o=u}a!==null&&ki(l,a,s,o,n)}}}function ki(n,e,t,r,i){let s=n;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let a=e;(o||i)&&e[e.length-1]===ir&&(a=e.slice(0,-1));const l=s.getTextContent();if(i||a!==l){if(a===""){if(_e(null),li||tr||ui)s.remove();else{const m=re();setTimeout(()=>{m.update(()=>{s.isAttached()&&s.remove()})},20)}return}const u=s.getParent(),c=Xt(),f=s.getTextContentSize(),d=xt(),g=s.getKey();if(s.isToken()||d!==null&&g===d&&!o||A(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===n.__key&&c.anchor.offset===0&&!s.canInsertTextBefore()&&!o||c.focus.key===n.__key&&c.focus.offset===f&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const h=P();if(!A(h)||t===null||r===null)return void s.setTextContent(a);if(h.setTextNodeRange(s,t,s,r),s.isSegmented()){const m=se(s.getTextContent());s.replace(m),s=m}s.setTextContent(a)}}}function qu(n,e){if(e.isSegmented())return!0;if(!n.isCollapsed())return!1;const t=n.anchor.offset,r=e.getParentOrThrow(),i=e.isToken();return t===0?!e.canInsertTextBefore()||!r.canInsertTextBefore()&&!e.isComposing()||i||function(s){const o=s.getPreviousSibling();return(O(o)||T(o)&&o.isInline())&&!o.canInsertTextAfter()}(e):t===e.getTextContentSize()&&(!e.canInsertTextAfter()||!r.canInsertTextAfter()&&!e.isComposing()||i)}function yo(n){return n==="ArrowLeft"}function bo(n){return n==="ArrowRight"}function xn(n,e){return Ve?n:e}function vo(n){return n==="Enter"}function Sn(n){return n==="Backspace"}function wn(n){return n==="Delete"}function xo(n,e,t){return n.toLowerCase()==="a"&&xn(e,t)}function Gu(){const n=le();De(oo(n.select(0,n.getChildrenSize())))}function Cn(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const s=sr(i);return t[e]=s,s}return i}function Ti(n,e,t,r,i){if(t.size===0)return;const s=r.__type,o=r.__key,a=e.get(s);a===void 0&&R(33,s);const l=a.klass;let u=n.get(l);u===void 0&&(u=new Map,n.set(l,u));const c=u.get(o),f=c==="destroyed"&&i==="created";(c===void 0||f)&&u.set(o,f?"updated":i)}function So(n,e,t){const r=n.getParent();let i=t,s=n;return r!==null&&(e&&t===0?(i=s.getIndexWithinParent(),s=r):e||t!==s.getChildrenSize()||(i=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(e?i-1:i)}function En(n,e){const t=n.offset;if(n.type==="element")return So(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?So(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function wo(n){const e=gr(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function $(n,e,t){return ga(n,e,t)}function ur(n){return!Se(n)&&!n.isLastChild()&&!n.isInline()}function cr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&R(75,e),t}function dr(n){const e=n.assignedSlot||n.parentElement;return e!==null&&e.nodeType===11?e.host:e}function fr(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function gr(n){const e=n._window;return e===null&&R(78),e}function Yu(n){let e=n.getParentOrThrow();for(;e!==null;){if(Ae(e))return e;e=e.getParentOrThrow()}return e}function Ae(n){return Se(n)||T(n)&&n.isShadowRoot()}function ve(n){const e=re(),t=n.constructor.getType(),r=e._nodes.get(t);r===void 0&&R(97);const i=r.replace;if(i!==null){const s=i(n);return s instanceof n.constructor||R(98),s}return n}function Ni(n,e){!Se(n.getParent())||T(e)||X(e)||R(99)}function Ai(n){return(X(n)||T(n)&&!n.canBeEmpty())&&!n.isInline()}function Fi(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Zu(n,e,t){let r=n._blockCursorElement;if(A(t)&&t.isCollapsed()&&t.anchor.type==="element"&&e.contains(document.activeElement)){const i=t.anchor,s=i.getNode(),o=i.offset;let a=!1,l=null;if(o===s.getChildrenSize())Ai(s.getChildAtIndex(o-1))&&(a=!0);else{const u=s.getChildAtIndex(o);if(Ai(u)){const c=u.getPreviousSibling();(c===null||Ai(c))&&(a=!0,l=n.getElementByKey(u.__key))}}if(a){const u=n.getElementByKey(s.__key);return r===null&&(n._blockCursorElement=r=function(c){const f=c.theme,d=document.createElement("div");d.contentEditable="false",d.setAttribute("data-lexical-cursor","true");let g=f.blockCursor;if(g!==void 0){if(typeof g=="string"){const h=sr(g);g=f.blockCursor=h}g!==void 0&&d.classList.add(...g)}return d}(n._config)),e.style.caretColor="transparent",void(l===null?u.appendChild(r):u.insertBefore(r,l))}}r!==null&&Fi(r,n,e)}function tt(n){return Je?(n||window).getSelection():null}function Xu(n){return nt(n)&&n.tagName==="A"}function nt(n){return n.nodeType===1}function Oi(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function hr(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function Gt(n){if(Se(n)||X(n)&&!n.isInline())return!0;if(!T(n)||Ae(n))return!1;const e=n.getFirstChild(),t=e===null||Z(e)||O(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function Pi(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function Qu(){return re()}const Co=new WeakMap,ec=new Map;function tc(n){if(!n._readOnly&&n.isEmpty())return ec;n._readOnly||R(192);let e=Co.get(n);if(!e){e=new Map,Co.set(n,e);for(const[t,r]of n._nodeMap){const i=r.__type;let s=e.get(i);s||(s=new Map,e.set(i,s)),s.set(t,r)}}return e}function Li(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function Eo(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const a=o.__key;o.__parent===e&&(T(o)&&Eo(o,a,t,r,i,s),t.has(a)||s.delete(a),i.push(a)),o=o.getNextSibling()}}let St,Ce,kn,pr,Ri,Ii,Lt,qe,Di,Tn,de="",Ee="",rt=null,Ge="",ct="",ko=!1,Nn=!1,mr=null;function _r(n,e){const t=Lt.get(n);if(e!==null){const r=zi(n);r.parentNode===e&&e.removeChild(r)}if(qe.has(n)||Ce._keyToDOMMap.delete(n),T(t)){const r=br(t,Lt);$i(r,0,r.length-1,null)}t!==void 0&&Ti(Tn,kn,pr,t,"destroyed")}function $i(n,e,t,r){let i=e;for(;i<=t;++i){const s=n[i];s!==void 0&&_r(s,r)}}function Rt(n,e){n.setProperty("text-align",e)}const nc="40px";function To(n,e){const t=St.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||nc;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function No(n,e){const t=n.style;e===0?Rt(t,""):e===di?Rt(t,"left"):e===fi?Rt(t,"center"):e===gi?Rt(t,"right"):e===hi?Rt(t,"justify"):e===pi?Rt(t,"start"):e===mi&&Rt(t,"end")}function yr(n,e,t){const r=qe.get(n);r===void 0&&R(60);const i=r.createDOM(St,Ce);if(function(s,o,a){const l=a._keyToDOMMap;o["__lexicalKey_"+a._key]=s,l.set(s,o)}(n,i,Ce),O(r)?i.setAttribute("data-lexical-text","true"):X(r)&&i.setAttribute("data-lexical-decorator","true"),T(r)){const s=r.__indent,o=r.__size;if(s!==0&&To(i,s),o!==0){const l=o-1;(function(u,c,f,d){const g=Ee;Ee="",Mi(u,f,0,c,d,null),Oo(f,d),Ee=g})(br(r,qe),l,r,i)}const a=r.__format;a!==0&&No(i,a),r.isInline()||Fo(null,r,i),ur(r)&&(de+=at,ct+=at)}else{const s=r.getTextContent();if(X(r)){const o=r.decorate(Ce,St);o!==null&&Po(n,o),i.contentEditable="false"}else O(r)&&(r.isDirectionless()||(Ee+=s));de+=s,ct+=s}if(e!==null)if(t!=null)e.insertBefore(i,t);else{const s=e.__lexicalLineBreak;s!=null?e.insertBefore(i,s):e.appendChild(i)}return Ti(Tn,kn,pr,r,"created"),i}function Mi(n,e,t,r,i,s){const o=de;de="";let a=t;for(;a<=r;++a){yr(n[a],i,s);const l=qe.get(n[a]);l!==null&&O(l)&&(rt===null&&(rt=l.getFormat()),Ge===""&&(Ge=l.getStyle()))}ur(e)&&(de+=at),i.__lexicalTextContent=de,de=o+de}function Ao(n,e){const t=e.get(n);return Z(t)||X(t)&&t.isInline()}function Fo(n,e,t){const r=n!==null&&(n.__size===0||Ao(n.__last,Lt)),i=e.__size===0||Ao(e.__last,qe);if(r){if(!i){const s=t.__lexicalLineBreak;if(s!=null)try{t.removeChild(s)}catch(o){if(typeof o=="object"&&o!=null){const a=`${o.toString()} Parent: ${t.tagName}, child: ${s.tagName}.`;throw new Error(a)}throw o}t.__lexicalLineBreak=null}}else if(i){const s=document.createElement("br");t.__lexicalLineBreak=s,t.appendChild(s)}}function Oo(n,e){const t=e.__lexicalDirTextContent,r=e.__lexicalDir;if(t!==Ee||r!==mr){const s=Ee==="",o=s?mr:(i=Ee,Lu.test(i)?"rtl":Ru.test(i)?"ltr":null);if(o!==r){const a=e.classList,l=St.theme;let u=r!==null?l[r]:void 0,c=o!==null?l[o]:void 0;if(u!==void 0){if(typeof u=="string"){const f=sr(u);u=l[r]=f}a.remove(...u)}if(o===null||s&&o==="ltr")e.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const f=sr(c);c=l[o]=f}c!==void 0&&a.add(...c)}e.dir=o}Nn||(n.getWritable().__dir=o)}mr=o,e.__lexicalDirTextContent=Ee,e.__lexicalDir=o}var i}function rc(n,e,t){const r=Ee;var i;Ee="",rt=null,Ge="",function(s,o,a){const l=de,u=s.__size,c=o.__size;if(de="",u===1&&c===1){const f=s.__first,d=o.__first;if(f===d)An(f,a);else{const h=zi(f),m=yr(d,null,null);try{a.replaceChild(m,h)}catch(_){if(typeof _=="object"&&_!=null){const b=`${_.toString()} Parent: ${a.tagName}, new child: {tag: ${m.tagName} key: ${d}}, old child: {tag: ${h.tagName}, key: ${f}}.`;throw new Error(b)}throw _}_r(f,null)}const g=qe.get(d);O(g)&&(rt===null&&(rt=g.getFormat()),Ge===""&&(Ge=g.getStyle()))}else{const f=br(s,Lt),d=br(o,qe);if(u===0)c!==0&&Mi(d,o,0,c-1,a,null);else if(c===0){if(u!==0){const g=a.__lexicalLineBreak==null;$i(f,0,u-1,g?null:a),g&&(a.textContent="")}}else(function(g,h,m,_,b,p){const y=_-1,x=b-1;let w,S,C=(I=p,I.firstChild),k=0,E=0;for(var I;k<=y&&E<=x;){const G=h[k],z=m[E];if(G===z)C=ji(An(z,p)),k++,E++;else{w===void 0&&(w=new Set(h)),S===void 0&&(S=new Set(m));const W=S.has(G),Y=w.has(z);if(W)if(Y){const J=cr(Ce,z);J===C?C=ji(An(z,p)):(C!=null?p.insertBefore(J,C):p.appendChild(J),An(z,p)),k++,E++}else yr(z,p,C),E++;else C=ji(zi(G)),_r(G,p),k++}const U=qe.get(z);U!==null&&O(U)&&(rt===null&&(rt=U.getFormat()),Ge===""&&(Ge=U.getStyle()))}const M=k>y,K=E>x;if(M&&!K){const G=m[x+1];Mi(m,g,E,x,p,G===void 0?null:Ce.getElementByKey(G))}else K&&!M&&$i(h,k,y,p)})(o,f,d,u,c,a)}ur(o)&&(de+=at),a.__lexicalTextContent=de,de=l+de}(n,e,t),Oo(e,t),Mn(i=e)&&rt!=null&&rt!==i.__textFormat&&!Nn&&(i.setTextFormat(rt),i.setTextStyle(Ge)),function(s){Mn(s)&&Ge!==""&&Ge!==s.__textStyle&&!Nn&&s.setTextStyle(Ge)}(e),Ee=r}function br(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&R(101),t.push(r),r=i.__next}return t}function An(n,e){const t=Lt.get(n);let r=qe.get(n);t!==void 0&&r!==void 0||R(61);const i=ko||Ii.has(n)||Ri.has(n),s=cr(Ce,n);if(t===r&&!i){if(T(t)){const o=s.__lexicalTextContent;o!==void 0&&(de+=o,ct+=o);const a=s.__lexicalDirTextContent;a!==void 0&&(Ee+=a)}else{const o=t.getTextContent();O(t)&&!t.isDirectionless()&&(Ee+=o),ct+=o,de+=o}return s}if(t!==r&&i&&Ti(Tn,kn,pr,r,"updated"),r.updateDOM(t,s,St)){const o=yr(n,null,null);return e===null&&R(62),e.replaceChild(o,s),_r(n,null),o}if(T(t)&&T(r)){const o=r.__indent;o!==t.__indent&&To(s,o);const a=r.__format;a!==t.__format&&No(s,a),i&&(rc(t,r,s),Se(r)||r.isInline()||Fo(t,r,s)),ur(r)&&(de+=at,ct+=at)}else{const o=r.getTextContent();if(X(r)){const a=r.decorate(Ce,St);a!==null&&Po(n,a)}else O(r)&&!r.isDirectionless()&&(Ee+=o);de+=o,ct+=o}if(!Nn&&Se(r)&&r.__cachedText!==ct){const o=r.getWritable();o.__cachedText=ct,r=o}return s}function Po(n,e){let t=Ce._pendingDecorators;const r=Ce._decorators;if(t===null){if(r[n]===e)return;t=co(Ce)}t[n]=e}function ji(n){let e=n.nextSibling;return e!==null&&e===Ce._blockCursorElement&&(e=e.nextSibling),e}function ic(n,e,t,r,i,s){de="",ct="",Ee="",ko=r===Jt,mr=null,Ce=t,St=t._config,kn=t._nodes,pr=Ce._listeners.mutation,Ri=i,Ii=s,Lt=n._nodeMap,qe=e._nodeMap,Nn=e._readOnly,Di=new Map(t._keyToDOMMap);const o=new Map;return Tn=o,An("root",null),Ce=void 0,kn=void 0,Ri=void 0,Ii=void 0,Lt=void 0,qe=void 0,St=void 0,Di=void 0,Tn=void 0,o}function zi(n){const e=Di.get(n);return e===void 0&&R(75,n),e}const dt=Object.freeze({}),Bi=30,Ui=[["keydown",function(n,e){if(Fn=n.timeStamp,Lo=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:i,metaKey:s,altKey:o}=n;$(e,_u,n)||t!=null&&(function(a,l,u,c){return bo(a)&&!l&&!c&&!u}(t,i,o,s)?$(e,Us,n):function(a,l,u,c,f){return bo(a)&&!c&&!u&&(l||f)}(t,i,r,o,s)?$(e,ni,n):function(a,l,u,c){return yo(a)&&!l&&!c&&!u}(t,i,o,s)?$(e,Ws,n):function(a,l,u,c,f){return yo(a)&&!c&&!u&&(l||f)}(t,i,r,o,s)?$(e,Yn,n):function(a,l,u){return function(c){return c==="ArrowUp"}(a)&&!l&&!u}(t,i,s)?$(e,Kt,n):function(a,l,u){return function(c){return c==="ArrowDown"}(a)&&!l&&!u}(t,i,s)?$(e,Zn,n):function(a,l){return vo(a)&&l}(t,r)?(On=!0,$(e,Xn,n)):function(a){return a===" "}(t)?$(e,yu,n):function(a,l){return Ve&&l&&a.toLowerCase()==="o"}(t,i)?(n.preventDefault(),On=!0,$(e,Ut,!0)):function(a,l){return vo(a)&&!l}(t,r)?(On=!1,$(e,Xn,n)):function(a,l,u,c){return Ve?!l&&!u&&(Sn(a)||a.toLowerCase()==="h"&&c):!(c||l||u)&&Sn(a)}(t,o,s,i)?Sn(t)?$(e,ri,n):(n.preventDefault(),$(e,Ft,!0)):function(a){return a==="Escape"}(t)?$(e,Ks,n):function(a,l,u,c,f){return Ve?!(u||c||f)&&(wn(a)||a.toLowerCase()==="d"&&l):!(l||c||f)&&wn(a)}(t,i,r,o,s)?wn(t)?$(e,ii,n):(n.preventDefault(),$(e,Ft,!1)):function(a,l,u){return Sn(a)&&(Ve?l:u)}(t,o,i)?(n.preventDefault(),$(e,hn,!0)):function(a,l,u){return wn(a)&&(Ve?l:u)}(t,o,i)?(n.preventDefault(),$(e,hn,!1)):function(a,l){return Ve&&l&&Sn(a)}(t,s)?(n.preventDefault(),$(e,pn,!0)):function(a,l){return Ve&&l&&wn(a)}(t,s)?(n.preventDefault(),$(e,pn,!1)):function(a,l,u,c){return a.toLowerCase()==="b"&&!l&&xn(u,c)}(t,o,s,i)?(n.preventDefault(),$(e,Ie,"bold")):function(a,l,u,c){return a.toLowerCase()==="u"&&!l&&xn(u,c)}(t,o,s,i)?(n.preventDefault(),$(e,Ie,"underline")):function(a,l,u,c){return a.toLowerCase()==="i"&&!l&&xn(u,c)}(t,o,s,i)?(n.preventDefault(),$(e,Ie,"italic")):function(a,l,u,c){return a==="Tab"&&!l&&!u&&!c}(t,o,i,s)?$(e,Hs,n):function(a,l,u,c){return a.toLowerCase()==="z"&&!l&&xn(u,c)}(t,r,s,i)?(n.preventDefault(),$(e,qn,void 0)):function(a,l,u,c){return Ve?a.toLowerCase()==="z"&&u&&l:a.toLowerCase()==="y"&&c||a.toLowerCase()==="z"&&c&&l}(t,r,s,i)?(n.preventDefault(),$(e,Gn,void 0)):xe(e._editorState._selection)?function(a,l,u,c){return!l&&a.toLowerCase()==="c"&&(Ve?u:c)}(t,r,s,i)?(n.preventDefault(),$(e,Qn,n)):function(a,l,u,c){return!l&&a.toLowerCase()==="x"&&(Ve?u:c)}(t,r,s,i)?(n.preventDefault(),$(e,oi,n)):xo(t,s,i)&&(n.preventDefault(),$(e,ai,n)):!bt&&xo(t,s,i)&&(n.preventDefault(),$(e,ai,n)),function(a,l,u,c){return a||l||u||c}(i,r,o,s)&&$(e,Cu,n))}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;t instanceof Node&&r!=="touch"&&$e(e,()=>{X(ut(t))||(Ki=!0)})}],["compositionstart",function(n,e){$e(e,()=>{const t=P();if(A(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();_e(r.key),(n.timeStamp<Fn+Bi||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||O(i)&&i.getStyle()!==t.style)&&$(e,Wt,Pu)}})}],["compositionend",function(n,e){bt?Pn=!0:$e(e,()=>{Hi(e,n.data)})}],["input",function(n,e){n.stopPropagation(),$e(e,()=>{const t=P(),r=n.data,i=jo(n);if(r!=null&&A(t)&&Do(t,i,r,n.timeStamp,!1)){Pn&&(Hi(e,r),Pn=!1);const s=t.anchor.getNode(),o=tt(e._window);if(o===null)return;const a=t.isBackward(),l=a?t.anchor.offset:t.focus.offset,u=a?t.focus.offset:t.anchor.offset;er&&!t.isCollapsed()&&O(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,l)+r+s.getTextContent().slice(l+u)===_o(o.anchorNode)||$(e,Wt,r);const c=r.length;bt&&c>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=c),li||tr||ui||!e.isComposing()||(Fn=0,_e(null))}else Ei(!1,e,r!==null?r:void 0),Pn&&(Hi(e,r||void 0),Pn=!1);Oe(),to(re())}),Yt=null}],["click",function(n,e){$e(e,()=>{const t=P(),r=tt(e._window),i=Xt();if(r){if(A(t)){const s=t.anchor,o=s.getNode();s.type==="element"&&s.offset===0&&t.isCollapsed()&&!Se(o)&&le().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i)?(r.removeAllRanges(),t.dirty=!0):n.detail===3&&!t.isCollapsed()&&o!==t.focus.getNode()&&(T(o)?o.select(0):o.getParentOrThrow().select(0))}else if(n.pointerType==="touch"){const s=r.anchorNode;if(s!==null){const o=s.nodeType;(o===bn||o===vt)&&De(es(i,r,e,n))}}}$(e,ei,n)})}],["cut",dt],["copy",dt],["dragstart",dt],["dragover",dt],["dragend",dt],["paste",dt],["focus",dt],["blur",dt],["drop",dt]];er&&Ui.push(["beforeinput",(n,e)=>function(t,r){const i=t.inputType,s=jo(t);i==="deleteCompositionText"||bt&&wo(r)||i!=="insertCompositionText"&&$e(r,()=>{const o=P();if(i==="deleteContentBackward"){if(o===null){const g=Xt();if(!A(g))return;De(g.clone())}if(A(o)){const g=o.anchor.key===o.focus.key;if(a=t.timeStamp,Lo==="MediaLast"&&a<Fn+Bi&&r.isComposing()&&g){if(_e(null),Fn=0,setTimeout(()=>{$e(r,()=>{_e(null)})},Bi),A(o)){const h=o.anchor.getNode();h.markDirty(),o.format=h.getFormat(),O(h)||R(142),o.style=h.getStyle()}}else{_e(null),t.preventDefault();const h=o.anchor.getNode().getTextContent(),m=o.anchor.offset===0&&o.focus.offset===h.length;Tu&&g&&!m||$(r,Ft,!0)}return}}var a;if(!A(o))return;const l=t.data;Yt!==null&&Ei(!1,r,Yt),o.dirty&&Yt===null||!o.isCollapsed()||Se(o.anchor.getNode())||s===null||o.applyDOMRange(s),Yt=null;const u=o.anchor,c=o.focus,f=u.getNode(),d=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(t.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":$(r,Wt,t);break;case"insertFromComposition":_e(null),$(r,Wt,t);break;case"insertLineBreak":_e(null),$(r,Ut,!1);break;case"insertParagraph":_e(null),On&&!tr?(On=!1,$(r,Ut,!1)):$(r,gn,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":$(r,Vn,t);break;case"deleteByComposition":(function(g,h){return g!==h||T(g)||T(h)||!g.isToken()||!h.isToken()})(f,d)&&$(r,ti,t);break;case"deleteByDrag":case"deleteByCut":$(r,ti,t);break;case"deleteContent":$(r,Ft,!1);break;case"deleteWordBackward":$(r,hn,!0);break;case"deleteWordForward":$(r,hn,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":$(r,pn,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":$(r,pn,!1);break;case"formatStrikeThrough":$(r,Ie,"strikethrough");break;case"formatBold":$(r,Ie,"bold");break;case"formatItalic":$(r,Ie,"italic");break;case"formatUnderline":$(r,Ie,"underline");break;case"historyUndo":$(r,qn,void 0);break;case"historyRedo":$(r,Gn,void 0)}else{if(l===`
32
+ `)t.preventDefault(),$(r,Ut,!1);else if(l===at)t.preventDefault(),$(r,gn,void 0);else if(l==null&&t.dataTransfer){const g=t.dataTransfer.getData("text/plain");t.preventDefault(),o.insertRawText(g)}else l!=null&&Do(o,s,l,t.timeStamp,!0)?(t.preventDefault(),$(r,Wt,l)):Yt=l;Ro=t.timeStamp}})}(n,e)]);let Fn=0,Lo=null,Ro=0,Yt=null;const vr=new WeakMap;let Wi=!1,Ki=!1,On=!1,Pn=!1,Io=[0,"",0,"root",0];function Do(n,e,t,r,i){const s=n.anchor,o=n.focus,a=s.getNode(),l=re(),u=tt(l._window),c=u!==null?u.anchorNode:null,f=s.key,d=l.getElementByKey(f),g=t.length;return f!==o.key||!O(a)||(!i&&(!er||Ro<r+50)||a.isDirty()&&g<2||po(t))&&s.offset!==o.offset&&!a.isComposing()||Vt(a)||a.isDirty()&&g>1||(i||!er)&&d!==null&&!a.isComposing()&&c!==ar(d)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||a.getFormat()!==n.format||a.getStyle()!==n.style||qu(n,a)}function $o(n,e){return n!==null&&n.nodeValue!==null&&n.nodeType===vt&&e!==0&&e!==n.nodeValue.length}function Mo(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;Wi&&(Wi=!1,$o(r,i)&&$o(s,o))||$e(e,()=>{if(!t)return void De(null);if(!vn(e,r,s))return;const a=P();if(A(a)){const l=a.anchor,u=l.getNode();if(a.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(a.dirty=!0);const c=gr(e).event,f=c?c.timeStamp:performance.now(),[d,g,h,m,_]=Io,b=le(),p=e.isComposing()===!1&&b.getTextContent()==="";if(f<_+200&&l.offset===h&&l.key===m)a.format=d,a.style=g;else if(l.type==="text")O(u)||R(141),a.format=u.getFormat(),a.style=u.getStyle();else if(l.type==="element"&&!p){const y=l.getNode();a.style="",y instanceof Qt&&y.getChildrenSize()===0?(a.format=y.getTextFormat(),a.style=y.getTextStyle()):a.format=0}}else{const c=l.key,f=a.focus.key,d=a.getNodes(),g=d.length,h=a.isBackward(),m=h?o:i,_=h?i:o,b=h?f:c,p=h?c:f;let y=Ou,x=!1;for(let w=0;w<g;w++){const S=d[w],C=S.getTextContentSize();if(O(S)&&C!==0&&!(w===0&&S.__key===b&&m===C||w===g-1&&S.__key===p&&_===0)&&(x=!0,y&=S.getFormat(),y===0))break}a.format=x?y:0}}$(e,fn,void 0)})}function jo(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Hi(n,e){const t=n._compositionKey;if(_e(null),t!==null&&e!=null){if(e===""){const r=ae(t),i=ar(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&O(r)&&ki(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
33
+ `){const r=P();if(A(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void $(n,Xn,null)}}}Ei(!0,n,e)}function zo(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Zt=new Map;function Bo(n){const e=n.target,t=tt(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t===null)return;const r=lo(t.anchorNode);if(r===null)return;Ki&&(Ki=!1,$e(r,()=>{const u=Xt(),c=t.anchorNode;if(c===null)return;const f=c.nodeType;f!==bn&&f!==vt||De(es(u,t,r,n))}));const i=Ci(r),s=i[i.length-1],o=s._key,a=Zt.get(o),l=a||s;l!==r&&Mo(t,l,!1),Mo(t,r,!0),r!==s?Zt.set(o,r):a&&Zt.delete(o)}function Uo(n){n._lexicalHandled=!0}function Wo(n){return n._lexicalHandled===!0}function sc(n){const e=n.ownerDocument,t=vr.get(e);t===void 0&&R(162);const r=t-1;r>=0||R(164),vr.set(e,r),r===0&&e.removeEventListener("selectionchange",Bo);const i=or(n);xi(i)?(function(o){if(o._parentEditor!==null){const a=Ci(o),l=a[a.length-1]._key;Zt.get(l)===o&&Zt.delete(l)}else Zt.delete(o._key)}(i),n.__lexicalEditor=null):i&&R(198);const s=zo(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function Ji(n,e,t){Oe();const r=n.__key,i=n.getParent();if(i===null)return;const s=function(a){const l=P();if(!A(l)||!T(a))return l;const{anchor:u,focus:c}=l,f=u.getNode(),d=c.getNode();return fr(f,a)&&u.set(a.__key,0,"element"),fr(d,a)&&c.set(a.__key,0,"element"),l}(n);let o=!1;if(A(s)&&e){const a=s.anchor,l=s.focus;a.key===r&&(kr(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),l.key===r&&(kr(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else xe(s)&&e&&n.isSelected()&&n.selectPrevious();if(A(s)&&e&&!o){const a=n.getIndexWithinParent();Pt(n),Er(s,i,a,-1)}else Pt(n);t||Ae(i)||i.canBeEmpty()||!i.isEmpty()||Ji(i,e),e&&Se(i)&&i.isEmpty()&&i.selectEnd()}class xr{static getType(){R(64,this.name)}static clone(e){R(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Vu(this,e)}getType(){return this.__type}isInline(){R(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=ae(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||P();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if(O(this))return r;if(A(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(X(this)&&this.isInline()&&i){const s=t.isBackward()?t.focus:t.anchor,o=s.getNode();if(s.offset===o.getChildrenSize()&&o.is(i)&&o.getLastChildOrThrow().is(this))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:ae(e)}getParentOrThrow(){const e=this.getParent();return e===null&&R(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Ae(t))return T(e)||e===this&&X(e)||R(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&R(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:ae(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:ae(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),r=e.getParents();T(this)&&t.unshift(this),T(e)&&r.unshift(e);const i=t.length,s=r.length;if(i===0||s===0||t[i-1]!==r[s-1])return null;const o=new Set(r);for(let a=0;a<i;a++){const l=t[a];if(o.has(l))return l}return null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let r=0,i=0,s=this;for(;;){const o=s.getParentOrThrow();if(o===t){r=s.getIndexWithinParent();break}s=o}for(s=e;;){const o=s.getParentOrThrow();if(o===t){i=s.getIndexWithinParent();break}s=o}return r<i}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let r=e;for(;r!==null;){if(r.__key===t)return!0;r=r.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;if(i.has(o)||(i.add(o),r.push(s)),s===e)break;const a=T(s)?t?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}const l=t?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}const u=s.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let c=null,f=u;do{if(f===null&&R(68),c=t?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;c!==null||i.has(f.__key)||r.push(f)}while(c===null);s=c}return t||r.reverse(),r}isDirty(){const e=re()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=ae(this.__key);return e===null&&R(113),e}getWritable(){Oe();const e=gt(),t=re(),r=e._nodeMap,i=this.__key,s=this.getLatest(),o=t._cloneNotNeeded,a=P();if(a!==null&&a.setCachedNodes(null),o.has(i))return lr(s),s;const l=Li(s);return o.add(i),lr(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){R(70)}updateDOM(e,t,r){R(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){R(72)}static importJSON(e){R(18,this.name)}static transform(){return null}remove(e){Ji(this,!0,e)}replace(e,t){Oe();let r=P();r!==null&&(r=r.clone()),Ni(this,e);const i=this.getLatest(),s=this.__key,o=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;Pt(a);const c=i.getPreviousSibling(),f=i.getNextSibling(),d=i.__prev,g=i.__next,h=i.__parent;if(Ji(i,!1,!0),c===null?l.__first=o:c.getWritable().__next=o,a.__prev=d,f===null?l.__last=o:f.getWritable().__prev=o,a.__next=g,a.__parent=h,l.__size=u,t&&(T(this)&&T(a)||R(139),this.getChildren().forEach(m=>{a.append(m)})),A(r)){De(r);const m=r.anchor,_=r.focus;m.key===s&&Go(m,a),_.key===s&&Go(_,a)}return xt()===s&&_e(o),a}insertAfter(e,t=!0){Oe(),Ni(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.getParent(),o=P();let a=!1,l=!1;if(s!==null){const g=e.getIndexWithinParent();if(Pt(i),A(o)){const h=s.__key,m=o.anchor,_=o.focus;a=m.type==="element"&&m.key===h&&m.offset===g+1,l=_.type==="element"&&_.key===h&&_.offset===g+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),f=i.__key,d=r.__next;if(u===null?c.__last=f:u.getWritable().__prev=f,c.__size++,r.__next=f,i.__next=d,i.__prev=r.__key,i.__parent=r.__parent,t&&A(o)){const g=this.getIndexWithinParent();Er(o,c,g+1);const h=c.__key;a&&o.anchor.set(h,g+2,"element"),l&&o.focus.set(h,g+2,"element")}return e}insertBefore(e,t=!0){Oe(),Ni(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.__key;Pt(i);const o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();o===null?a.__first=s:o.getWritable().__next=s,a.__size++,r.__prev=s,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const c=P();return t&&A(c)&&Er(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return ne()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Oe();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(T(r))return r.select();if(!O(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(e,t)}selectNext(e,t){Oe();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(T(r))return r.select(0,0);if(!O(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(e,t)}markDirty(){this.getWritable()}}class Ln extends xr{static getType(){return"linebreak"}static clone(e){return new Ln(e.__key)}constructor(e){super(e)}getTextContent(){return`
34
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(t){const r=t.parentElement;if(r!==null&&hr(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Sr(i)){const s=r.lastChild;if(s===t||s.previousSibling===t&&Sr(s))return!0}}return!1}(e)||function(t){const r=t.parentElement;if(r!==null&&hr(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Sr(i))return!1;const s=r.lastChild;if(s===t||s.previousSibling===t&&Sr(s))return!0}return!1}(e)?null:{conversion:oc,priority:0}}}static importJSON(e){return Ye()}exportJSON(){return{type:"linebreak",version:1}}}function oc(n){return{node:Ye()}}function Ye(){return ve(new Ln)}function Z(n){return n instanceof Ln}function Sr(n){return n.nodeType===vt&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function Vi(n,e){return 16&e?"code":e&ci?"mark":32&e?"sub":64&e?"sup":null}function qi(n,e){return 1&e?"strong":2&e?"em":"span"}function Ko(n,e,t,r,i){const s=r.classList;let o=Cn(i,"base");o!==void 0&&s.add(...o),o=Cn(i,"underlineStrikethrough");let a=!1;const l=e&rr&&e&nr;o!==void 0&&(t&rr&&t&nr?(a=!0,l||s.add(...o)):l&&s.remove(...o));for(const u in lt){const c=lt[u];if(o=Cn(i,u),o!==void 0)if(t&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&s.remove(...o);continue}e&c&&(!l||u!=="underline")&&u!=="strikethrough"||s.add(...o)}else e&c&&s.remove(...o)}}function Ho(n,e,t){const r=e.firstChild,i=t.isComposing(),s=n+(i?ir:"");if(r==null)e.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||bt){const[a,l,u]=function(c,f){const d=c.length,g=f.length;let h=0,m=0;for(;h<d&&h<g&&c[h]===f[h];)h++;for(;m+h<d&&m+h<g&&c[d-m-1]===f[g-m-1];)m++;return[h,d-h-m,f.slice(h,g-m)]}(o,s);l!==0&&r.deleteData(a,l),r.insertData(a,u)}else r.nodeValue=s}}function Jo(n,e,t,r,i,s){Ho(i,n,e);const o=s.theme.text;o!==void 0&&Ko(0,0,r,n,o)}function wr(n,e){const t=document.createElement(e);return t.appendChild(n),t}class ft extends xr{static getType(){return"text"}static clone(e){return new ft(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),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(){const e=this.getLatest();return Mu[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===xt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=lt[e];return!!(this.getFormat()&t)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Si(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const r=this.__format,i=Vi(0,r),s=qi(0,r),o=i===null?s:i,a=document.createElement(o);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(l=document.createElement(s),a.appendChild(l)),Jo(l,this,0,r,this.__text,e);const u=this.__style;return u!==""&&(a.style.cssText=u),a}updateDOM(e,t,r){const i=this.__text,s=e.__format,o=this.__format,a=Vi(0,s),l=Vi(0,o),u=qi(0,s),c=qi(0,o);if((a===null?u:a)!==(l===null?c:l))return!0;if(a===l&&u!==c){const m=t.firstChild;m==null&&R(48);const _=document.createElement(c);return Jo(_,this,0,o,i,r),t.replaceChild(_,m),!1}let f=t;l!==null&&a!==null&&(f=t.firstChild,f==null&&R(49)),Ho(i,f,this);const d=r.theme.text;d!==void 0&&s!==o&&Ko(0,s,o,f,d);const g=e.__style,h=this.__style;return g!==h&&(t.style.cssText=h),!1}static importDOM(){return{"#text":()=>({conversion:cc,priority:0}),b:()=>({conversion:lc,priority:0}),code:()=>({conversion:wt,priority:0}),em:()=>({conversion:wt,priority:0}),i:()=>({conversion:wt,priority:0}),s:()=>({conversion:wt,priority:0}),span:()=>({conversion:ac,priority:0}),strong:()=>({conversion:wt,priority:0}),sub:()=>({conversion:wt,priority:0}),sup:()=>({conversion:wt,priority:0}),u:()=>({conversion:wt,priority:0})}}static importJSON(e){const t=se(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return t!==null&&nt(t)||R(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=wr(t,"b")),this.hasFormat("italic")&&(t=wr(t,"i")),this.hasFormat("strikethrough")&&(t=wr(t,"s")),this.hasFormat("underline")&&(t=wr(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format=typeof e=="string"?lt[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?Iu[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Si(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=$u[e];if(this.__mode===t)return this;const r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){Oe();let r=e,i=t;const s=P(),o=this.getTextContent(),a=this.__key;if(typeof o=="string"){const l=o.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!A(s))return na(a,r,a,i,"text","text");{const l=xt();l!==s.anchor.key&&l!==s.focus.key||_e(a),s.setTextNodeRange(this,r,this,i)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const s=this.getWritable(),o=s.__text,a=r.length;let l=e;l<0&&(l=a+l,l<0&&(l=0));const u=P();if(i&&A(u)){const f=e+a;u.setTextNodeRange(s,f,s,f)}const c=o.slice(0,l)+r+o.slice(l+t);return s.__text=c,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Oe();const t=this.getLatest(),r=t.getTextContent(),i=t.__key,s=xt(),o=new Set(e),a=[],l=r.length;let u="";for(let w=0;w<l;w++)u!==""&&o.has(w)&&(a.push(u),u=""),u+=r[w];u!==""&&a.push(u);const c=a.length;if(c===0)return[];if(a[0]===r)return[t];const f=a[0],d=t.getParent();let g;const h=t.getFormat(),m=t.getStyle(),_=t.__detail;let b=!1;t.isSegmented()?(g=se(f),g.__format=h,g.__style=m,g.__detail=_,b=!0):(g=t.getWritable(),g.__text=f);const p=P(),y=[g];let x=f.length;for(let w=1;w<c;w++){const S=a[w],C=S.length,k=se(S).getWritable();k.__format=h,k.__style=m,k.__detail=_;const E=k.__key,I=x+C;if(A(p)){const M=p.anchor,K=p.focus;M.key===i&&M.type==="text"&&M.offset>x&&M.offset<=I&&(M.key=E,M.offset-=x,p.dirty=!0),K.key===i&&K.type==="text"&&K.offset>x&&K.offset<=I&&(K.key=E,K.offset-=x,p.dirty=!0)}s===i&&_e(E),x=I,y.push(k)}if(d!==null){(function(C){const k=C.getPreviousSibling(),E=C.getNextSibling();k!==null&&lr(k),E!==null&&lr(E)})(this);const w=d.getWritable(),S=this.getIndexWithinParent();b?(w.splice(S,0,y),this.remove()):w.splice(S,1,y),A(p)&&Er(p,d,S,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||R(50);const r=this.__key,i=e.__key,s=this.__text,o=s.length;xt()===i&&_e(r);const a=P();if(A(a)){const f=a.anchor,d=a.focus;f!==null&&f.key===i&&(sa(f,t,r,e,o),a.dirty=!0),d!==null&&d.key===i&&(sa(d,t,r,e,o),a.dirty=!0)}const l=e.__text,u=t?l+s:s+l;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function ac(n){return{forChild:Gi(n.style),node:null}}function lc(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:Gi(e.style,t?void 0:"bold"),node:null}}const Vo=new WeakMap;function uc(n){return n.nodeName==="PRE"||n.nodeType===bn&&n.style!==void 0&&n.style.whiteSpace!==void 0&&n.style.whiteSpace.startsWith("pre")}function cc(n){const e=n;n.parentElement===null&&R(129);let t=e.textContent||"";if(function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=Vo.get(s))===void 0&&!uc(s);)o.push(s),s=s.parentNode;const a=i===void 0?s:i;for(let l=0;l<o.length;l++)Vo.set(o[l],a);return a}(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;o++){const a=r[o];a===`
35
+ `||a===`\r
36
+ `?i.push(Ye()):a===" "?i.push(Ue()):a!==""&&i.push(se(a))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=qo(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=qo(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:se(t)}}function qo(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const s=t.parentElement;if(s===null)return null;t=s}if(t=r,t.nodeType===bn){const s=t.style.display;if(s===""&&!Oi(t)||s!==""&&!s.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(t.nodeType===vt)return t;if(t.nodeName==="BR")return null}}const dc={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function wt(n){const e=dc[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Gi(n.style,e),node:null}}function se(n=""){return ve(new ft(n))}function O(n){return n instanceof ft}function Gi(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return u=>(O(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),s&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),o&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class Rn extends ft{static getType(){return"tab"}static clone(e){return new Rn(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=Ue();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){R(126)}setDetail(e){R(127)}setMode(e){R(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ue(){return ve(new Rn)}function ge(n){return n instanceof Rn}class fc{constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),r=e.getNode();const i=this.offset,s=e.offset;if(T(t)){const o=t.getDescendantByIndex(i);t=o??t}if(T(r)){const o=r.getDescendantByIndex(s);r=o??r}return t===r?i<s:t.isBefore(r)}getNode(){const e=ae(this.key);return e===null&&R(20),e}set(e,t,r){const i=this._selection,s=this.key;this.key=e,this.offset=t,this.type=r,In()||(xt()===s&&_e(e),i!==null&&(i.setCachedNodes(null),i.dirty=!0))}}function it(n,e,t){return new fc(n,e,t)}function Yi(n,e){let t=e.__key,r=n.offset,i="element";if(O(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!T(e)){const s=e.getNextSibling();if(O(s))t=s.__key,r=0,i="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function Go(n,e){if(T(e)){const t=e.getLastDescendant();T(t)||O(t)?Yi(n,t):Yi(n,e)}else Yi(n,e)}function Ct(n,e,t,r){n.key=e,n.offset=t,n.type=r}class Cr{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!xe(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}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 Cr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let s;if(O(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<r;o++)t[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const s=ae(i);s!==null&&r.push(s)}return In()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}}function A(n){return n instanceof Et}class Et{constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!A(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(){const e=this._cachedNodes;if(e!==null)return e;const t=this.anchor,r=this.focus,i=t.isBefore(r),s=i?t:r,o=i?r:t;let a=s.getNode(),l=o.getNode();const u=s.offset,c=o.offset;if(T(a)){const d=a.getDescendantByIndex(u);a=d??a}if(T(l)){let d=l.getDescendantByIndex(c);d!==null&&d!==a&&l.getChildAtIndex(c)===d&&(d=d.getPreviousSibling()),l=d??l}let f;return f=a.is(l)?T(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(l),In()||(this._cachedNodes=f),f}setTextNodeRange(e,t,r,i){Ct(this.anchor,e.__key,t,"text"),Ct(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[a,l]=Zi(this);let u="",c=!0;for(let f=0;f<e.length;f++){const d=e[f];if(T(d)&&!d.isInline())c||(u+=`
37
+ `),c=!d.isEmpty();else if(c=!1,O(d)){let g=d.getTextContent();d===t?d===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(g=a<l?g.slice(a,l):g.slice(l,a)):g=o?g.slice(a):g.slice(l):d===r&&(g=o?g.slice(0,l):g.slice(0,a)),u+=g}else!X(d)&&!Z(d)||d===r&&this.isCollapsed()||(u+=d.getTextContent())}return u}applyDOMRange(e){const t=re(),r=t.getEditorState()._selection,i=ta(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[s,o]=i;Ct(this.anchor,s.key,s.offset,s.type),Ct(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Et(it(e.key,e.offset,e.type),it(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Si(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=lt[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];o===`
38
+ `||o===`\r
39
+ `?r.push(Ye()):o===" "?r.push(Ue()):r.push(se(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,s=this.style;let o=t,a=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,a=t),o.type==="element"&&function(_,b,p,y){const x=_.getNode(),w=x.getChildAtIndex(_.offset),S=se(),C=Se(x)?ne().append(S):S;S.setFormat(p),S.setStyle(y),w===null?x.append(C):w.insertBefore(C),_.is(b)&&b.set(S.__key,0,"text"),_.set(S.__key,0,"text")}(o,a,i,s);const l=o.offset;let u=a.offset;const c=this.getNodes(),f=c.length;let d=c[0];O(d)||R(26);const g=d.getTextContent().length,h=d.getParentOrThrow();let m=c[f-1];if(f===1&&a.type==="element"&&(u=g,a.set(o.key,u,"text")),this.isCollapsed()&&l===g&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!h.canInsertTextAfter()&&d.getNextSibling()===null)){let _=d.getNextSibling();if(O(_)&&_.canInsertTextBefore()&&!Vt(_)||(_=se(),_.setFormat(i),_.setStyle(s),h.canInsertTextAfter()?d.insertAfter(_):h.insertAfter(_)),_.select(0,0),d=_,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!h.canInsertTextBefore()&&d.getPreviousSibling()===null)){let _=d.getPreviousSibling();if(O(_)&&!Vt(_)||(_=se(),_.setFormat(i),h.canInsertTextBefore()?d.insertBefore(_):h.insertBefore(_)),_.select(),d=_,e!=="")return void this.insertText(e)}else if(d.isSegmented()&&l!==g){const _=se(d.getTextContent());_.setFormat(i),d.replace(_),d=_}else if(!this.isCollapsed()&&e!==""){const _=m.getParent();if(!h.canInsertTextBefore()||!h.canInsertTextAfter()||T(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),ea(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(d.isToken()){const y=se(e);return y.select(),void d.replace(y)}const _=d.getFormat(),b=d.getStyle();if(l!==u||_===i&&b===s){if(ge(d)){const y=se(e);return y.setFormat(i),y.setStyle(s),y.select(),void d.replace(y)}}else{if(d.getTextContent()!==""){const y=se(e);if(y.setFormat(i),y.setStyle(s),y.select(),l===0)d.insertBefore(y,!1);else{const[x]=d.splitText(l);x.insertAfter(y,!1)}return void(y.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}d.setFormat(i),d.setStyle(s)}const p=u-l;d=d.spliceText(l,p,e,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=_,this.style=b))}else{const _=new Set([...d.getParentKeys(),...m.getParentKeys()]),b=T(d)?d:d.getParentOrThrow();let p=T(m)?m:m.getParentOrThrow(),y=m;if(!b.is(p)&&p.isInline())do y=p,p=p.getParentOrThrow();while(p.isInline());if(a.type==="text"&&(u!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<u)if(O(m)&&!m.isToken()&&u!==m.getTextContentSize()){if(m.isSegmented()){const k=se(m.getTextContent());m.replace(k),m=k}Se(a.getNode())||a.type!=="text"||(m=m.spliceText(0,u,"")),_.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else _.add(m.__key);const x=p.getChildren(),w=new Set(c),S=b.is(p),C=b.isInline()&&d.getNextSibling()===null?b:d;for(let k=x.length-1;k>=0;k--){const E=x[k];if(E.is(d)||T(E)&&E.isParentOf(d))break;E.isAttached()&&(!w.has(E)||E.is(y)?S||C.insertAfter(E,!1):E.remove())}if(!S){let k=p,E=null;for(;k!==null;){const I=k.getChildren(),M=I.length;(M===0||I[M-1].is(E))&&(_.delete(k.__key),E=k),k=k.getParent()}}if(d.isToken())if(l===g)d.select();else{const k=se(e);k.select(),d.replace(k)}else d=d.spliceText(l,g-l,e,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<f;k++){const E=c[k],I=E.__key;_.has(I)||E.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void _e(null);const t=this.getNodes(),r=[];for(const p of t)O(p)&&r.push(p);const i=r.length;if(i===0)return this.toggleFormat(e),void _e(null);const s=this.anchor,o=this.focus,a=this.isBackward(),l=a?o:s,u=a?s:o;let c=0,f=r[0],d=l.type==="element"?0:l.offset;if(l.type==="text"&&d===f.getTextContentSize()&&(c=1,f=r[1],d=0),f==null)return;const g=f.getFormatFlags(e,null),h=i-1;let m=r[h];const _=u.type==="text"?u.offset:m.getTextContentSize();if(f.is(m)){if(d===_)return;if(Vt(f)||d===0&&_===f.getTextContentSize())f.setFormat(g);else{const p=f.splitText(d,_),y=d===0?p[0]:p[1];y.setFormat(g),l.type==="text"&&l.set(y.__key,0,"text"),u.type==="text"&&u.set(y.__key,_-d,"text")}return void(this.format=g)}d===0||Vt(f)||([,f]=f.splitText(d),d=0),f.setFormat(g);const b=m.getFormatFlags(e,g);_>0&&(_===m.getTextContentSize()||Vt(m)||([m]=m.splitText(_)),m.setFormat(b));for(let p=c+1;p<h;p++){const y=r[p],x=y.getFormatFlags(e,b);y.setFormat(x)}l.type==="text"&&l.set(f.__key,d,"text"),u.type==="text"&&u.set(m.__key,_,"text"),this.format=g|b}insertNodes(e){if(e.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const g=P();return A(g)||R(134),g.insertNodes(e)}const t=Pi((this.isBackward()?this.focus:this.anchor).getNode(),Gt),r=e[e.length-1];if("__language"in t&&T(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=ts(this);t.splice(g,0,e),r.selectEnd()}return}if(!e.some(g=>(T(g)||X(g))&&!g.isInline())){T(t)||R(135);const g=ts(this);return t.splice(g,0,e),void r.selectEnd()}const i=function(g){const h=ne();let m=null;for(let _=0;_<g.length;_++){const b=g[_],p=Z(b);if(p||X(b)&&b.isInline()||T(b)&&b.isInline()||O(b)||b.isParentRequired()){if(m===null&&(m=b.createParentElementNode(),h.append(m),p))continue;m!==null&&m.append(b)}else h.append(b),m=null}return h}(e),s=i.getLastDescendant(),o=i.getChildren(),a=!T(t)||!t.isEmpty()?this.insertParagraph():null,l=o[o.length-1];let u=o[0];var c;T(c=u)&&Gt(c)&&!c.isEmpty()&&T(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(T(t)||R(135),t.append(...u.getChildren()),u=o[1]),u&&function(g,h,m){const _=h.getParentOrThrow().getLastChild();let b=h;const p=[h];for(;b!==_;)b.getNextSibling()||R(140),b=b.getNextSibling(),p.push(b);let y=g;for(const x of p)y=y.insertAfter(x)}(t,u);const f=Pi(s,Gt);a&&T(f)&&(a.canMergeWhenEmpty()||Gt(l))&&(f.append(...a.getChildren()),a.remove()),T(t)&&t.isEmpty()&&t.remove(),s.selectEnd();const d=T(t)?t.getLastChild():null;Z(d)&&f!==t&&d.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=ne();return le().splice(this.anchor.offset,0,[o]),o.select(),o}const e=ts(this),t=Pi(this.anchor.getNode(),Gt);T(t)||R(136);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],s=t.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=Ye();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=this.getNodes(),t=e.length,r=t-1,i=this.anchor,s=this.focus;let o=e[0],a=e[r];const[l,u]=Zi(this);if(t===0)return[];if(t===1){if(O(o)&&!this.isCollapsed()){const f=l>u?u:l,d=l>u?l:u,g=o.splitText(f,d),h=f===0?g[0]:g[1];return h!=null?[h]:[]}return[o]}const c=i.isBefore(s);if(O(o)){const f=c?l:u;f===o.getTextContentSize()?e.shift():f!==0&&([,o]=o.splitText(f),e[0]=o)}if(O(a)){const f=a.getTextContent().length,d=c?u:l;d===0?e.pop():d!==f&&([a]=a.splitText(d),e[r]=a)}return e}modify(e,t,r){const i=this.focus,s=this.anchor,o=e==="move",a=En(i,t);if(X(a)&&!a.isIsolated()){if(o&&a.isKeyboardSelectable()){const g=Qi();return g.add(a.__key),void De(g)}const d=t?a.getPreviousSibling():a.getNextSibling();if(O(d)){const g=d.__key,h=t?d.getTextContent().length:0;return i.set(g,h,"text"),void(o&&s.set(g,h,"text"))}{const g=a.getParentOrThrow();let h,m;return T(d)?(m=d.__key,h=t?d.getChildrenSize():0):(h=a.getIndexWithinParent(),m=g.__key,t||h++),i.set(m,h,"element"),void(o&&s.set(m,h,"element"))}}const l=re(),u=tt(l._window);if(!u)return;const c=l._blockCursorElement,f=l._rootElement;if(f===null||c===null||!T(a)||a.isInline()||a.canBeEmpty()||Fi(c,l,f),function(d,g,h,m){d.modify(g,h,m)}(u,e,t?"backward":"forward",r),u.rangeCount>0){const d=u.getRangeAt(0),g=this.anchor.getNode(),h=Se(g)?g:Yu(g);if(this.applyDOMRange(d),this.dirty=!0,!o){const m=this.getNodes(),_=[];let b=!1;for(let p=0;p<m.length;p++){const y=m[p];fr(y,h)?_.push(y):b=!0}if(b&&_.length>0)if(t){const p=_[0];T(p)?p.selectStart():p.getParentOrThrow().selectStart()}else{const p=_[_.length-1];T(p)?p.selectEnd():p.getParentOrThrow().selectEnd()}u.anchorNode===d.startContainer&&u.anchorOffset===d.startOffset||function(p){const y=p.focus,x=p.anchor,w=x.key,S=x.offset,C=x.type;Ct(x,y.key,y.offset,y.type),Ct(y,w,S,C),p._cachedNodes=null}(this)}}}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&T(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),s=t.getNextSibling()||(i===null?null:i.getNextSibling());if(T(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const s=this.focus,o=En(s,e);if(X(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&T(i)&&i.getChildrenSize()===0){i.remove();const a=Qi();a.add(o.__key),De(a)}else o.remove(),re().dispatchCommand(fn,void 0);return}if(!e&&T(o)&&T(i)&&i.isEmpty())return i.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const a=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(i)||e&&l!==u||!e&&l!==0)return void Zo(a,e,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(a)||e&&l!==0||!e&&l!==u)return void Zo(i,e,l)}(function(l,u){const c=l.anchor,f=l.focus,d=c.getNode(),g=f.getNode();if(d===g&&c.type==="text"&&f.type==="text"){const h=c.offset,m=f.offset,_=h<m,b=_?h:m,p=_?m:h,y=p-1;b!==y&&(po(d.getTextContent().slice(b,p))||(u?f.offset=y:c.offset=y))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Se(r.getParent())&&r.getIndexWithinParent()===0&&r.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t=this.anchor.type==="element";if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),(e?this.focus:this.anchor).offset===0&&this.modify("extend",e,"character"),t){const r=e?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function xe(n){return n instanceof Cr}function Yo(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Zi(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[Yo(t),Yo(r)]}function Zo(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,a=0;for(let u=0;u<s;u++){const c=u===s-1;if(a=o,o+=i[u].length,e&&o===t||o>t||c){i.splice(u,1),c&&(a=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function Xo(n,e,t,r){let i,s=e;if(n.nodeType===bn){let o=!1;const a=n.childNodes,l=a.length,u=r._blockCursorElement;s===l&&(o=!0,s=l-1);let c=a[s],f=!1;if(c===u)c=a[s+1],f=!0;else if(u!==null){const d=u.parentNode;n===d&&e>Array.prototype.indexOf.call(d.children,u)&&s--}if(i=qt(c),O(i))s=ho(i,o);else{let d=qt(n);if(d===null)return null;if(T(d)){s=Math.min(d.getChildrenSize(),s);let g=d.getChildAtIndex(s);if(T(g)&&function(h,m,_){const b=h.getParent();return _===null||b===null||!b.canBeEmpty()||b!==_.getNode()}(g,0,t)){const h=o?g.getLastDescendant():g.getFirstDescendant();h===null?d=g:(g=h,d=T(g)?g:g.getParentOrThrow()),s=0}O(g)?(i=g,d=null,s=ho(g,o)):g!==d&&o&&!f&&s++}else{const g=d.getIndexWithinParent();s=e===0&&X(d)&&qt(n)===d?g:g+1,d=d.getParentOrThrow()}if(T(d))return it(d.__key,s,"element")}}else i=qt(n);return O(i)?it(i.__key,s,"text"):null}function Qo(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(e){if((t||!e)&&s===null&&T(o)&&o.isInline()){const a=o.getPreviousSibling();O(a)&&(n.key=a.__key,n.offset=a.getTextContent().length)}}else T(s)&&!t&&s.isInline()?(n.key=s.__key,n.offset=s.getChildrenSize(),n.type="element"):O(s)&&(n.key=s.__key,n.offset=s.getTextContent().length)}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(e&&T(s)&&s.isInline())n.key=s.__key,n.offset=0,n.type="element";else if((t||e)&&s===null&&T(o)&&o.isInline()&&!o.canInsertTextAfter()){const a=o.getNextSibling();O(a)&&(n.key=a.__key,n.offset=0)}}}function ea(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);Qo(n,r,i),Qo(e,!r,i),i&&(e.key=n.key,e.offset=n.offset,e.type=n.type);const s=re();if(s.isComposing()&&s._compositionKey!==n.key&&A(t)){const o=t.anchor,a=t.focus;Ct(n,o.key,o.offset,o.type),Ct(e,a.key,a.offset,a.type)}}}function ta(n,e,t,r,i,s){if(n===null||t===null||!vn(i,n,t))return null;const o=Xo(n,e,A(s)?s.anchor:null,i);if(o===null)return null;const a=Xo(t,r,A(s)?s.focus:null,i);if(a===null)return null;if(o.type==="element"&&a.type==="element"){const l=qt(n),u=qt(t);if(X(l)&&X(u))return null}return ea(o,a,s),[o,a]}function Xi(n){return T(n)&&!n.isInline()}function na(n,e,t,r,i,s){const o=gt(),a=new Et(it(n,e,i),it(t,r,s),0,"");return a.dirty=!0,o._selection=a,a}function ra(){const n=it("root",0,"element"),e=it("root",0,"element");return new Et(n,e,0,"")}function Qi(){return new Cr(new Set)}function es(n,e,t,r){const i=t._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,a=o==="selectionchange",l=!_i&&(a||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let u,c,f,d;if(A(n)&&!l)return n.clone();if(e===null)return null;if(u=e.anchorNode,c=e.focusNode,f=e.anchorOffset,d=e.focusOffset,a&&A(n)&&!vn(t,u,c))return n.clone();const g=ta(u,f,c,d,t,n);if(g===null)return null;const[h,m]=g;return new Et(h,m,A(n)?n.format:0,A(n)?n.style:"")}function P(){return gt()._selection}function Xt(){return re()._editorState._selection}function Er(n,e,t,r=1){const i=n.anchor,s=n.focus,o=i.getNode(),a=s.getNode();if(!e.is(o)&&!e.is(a))return;const l=e.__key;if(n.isCollapsed()){const u=i.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);i.set(l,c,"element"),s.set(l,c,"element"),ia(n)}}else{const u=n.isBackward(),c=u?s:i,f=c.getNode(),d=u?i:s,g=d.getNode();if(e.is(f)){const h=c.offset;(t<=h&&r>0||t<h&&r<0)&&c.set(l,Math.max(0,h+r),"element")}if(e.is(g)){const h=d.offset;(t<=h&&r>0||t<h&&r<0)&&d.set(l,Math.max(0,h+r),"element")}}ia(n)}function ia(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,s=e.getNode(),o=r.getNode();if(n.isCollapsed()){if(!T(s))return;const a=s.getChildrenSize(),l=t>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(O(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(T(s)){const a=s.getChildrenSize(),l=t>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(O(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(T(o)){const a=o.getChildrenSize(),l=i>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(i);if(O(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function kr(n,e,t,r,i){let s=null,o=0,a=null;r!==null?(s=r.__key,O(r)?(o=r.getTextContentSize(),a="text"):T(r)&&(o=r.getChildrenSize(),a="element")):i!==null&&(s=i.__key,O(i)?a="text":T(i)&&(a="element")),s!==null&&a!==null?n.set(s,o,a):(o=e.getIndexWithinParent(),o===-1&&(o=t.getChildrenSize()),n.set(t.__key,o,"element"))}function sa(n,e,t,r,i){n.type==="text"?(n.key=t,e||(n.offset+=i)):n.offset>r.getIndexWithinParent()&&(n.offset-=1)}function gc(n,e,t,r,i,s,o){const a=r.anchorNode,l=r.focusNode,u=r.anchorOffset,c=r.focusOffset,f=document.activeElement;if(i.has("collaboration")&&f!==s||f!==null&&vi(f))return;if(!A(e))return void(n!==null&&vn(t,a,l)&&r.removeAllRanges());const d=e.anchor,g=e.focus,h=d.key,m=g.key,_=cr(t,h),b=cr(t,m),p=d.offset,y=g.offset,x=e.format,w=e.style,S=e.isCollapsed();let C=_,k=b,E=!1;if(d.type==="text"){C=ar(_);const U=d.getNode();E=U.getFormat()!==x||U.getStyle()!==w}else A(n)&&n.anchor.type==="text"&&(E=!0);var I,M,K,G,z;if(g.type==="text"&&(k=ar(b)),C!==null&&k!==null&&(S&&(n===null||E||A(n)&&(n.format!==x||n.style!==w))&&(I=x,M=w,K=p,G=h,z=performance.now(),Io=[I,M,K,G,z]),u!==p||c!==y||a!==C||l!==k||r.type==="Range"&&S||(f!==null&&s.contains(f)||s.focus({preventScroll:!0}),d.type==="element"))){try{r.setBaseAndExtent(C,p,k,y)}catch{}if(!i.has("skip-scroll-into-view")&&e.isCollapsed()&&s!==null&&s===document.activeElement){const U=e instanceof Et&&e.anchor.type==="element"?C.childNodes[p]||null:r.rangeCount>0?r.getRangeAt(0):null;if(U!==null){let W;if(U instanceof Text){const Y=document.createRange();Y.selectNode(U),W=Y.getBoundingClientRect()}else W=U.getBoundingClientRect();(function(Y,J,fe){const je=fe.ownerDocument,ze=je.defaultView;if(ze===null)return;let{top:ue,bottom:Be}=J,ye=0,Ke=0,be=fe;for(;be!==null;){const He=be===je.body;if(He)ye=0,Ke=gr(Y).innerHeight;else{const Qe=be.getBoundingClientRect();ye=Qe.top,Ke=Qe.bottom}let Re=0;if(ue<ye?Re=-(ye-ue):Be>Ke&&(Re=Be-Ke),Re!==0)if(He)ze.scrollBy(0,Re);else{const Qe=be.scrollTop;be.scrollTop+=Re;const et=be.scrollTop-Qe;ue-=et,Be-=et}if(He)break;be=dr(be)}})(t,W,s)}}Wi=!0}}function oa(n){let e=P()||Xt();e===null&&(e=le().selectEnd()),e.insertNodes(n)}function ts(n){let e=n;n.isCollapsed()||e.removeText();const t=P();A(t)&&(e=t),A(e)||R(161);const r=e.anchor;let i=r.getNode(),s=r.offset;for(;!Gt(i);)[i,s]=hc(i,s);return s}function hc(n,e){const t=n.getParent();if(!t){const i=ne();return le().append(i),i.select(),[le(),0]}if(O(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const s=e===0?0:1;return[t,i[0].getIndexWithinParent()+s]}if(!T(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new Et(it(n.__key,e,"element"),it(n.__key,e,"element"),0,""),s=n.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}let he=null,pe=null,Fe=!1,ns=!1,Tr=0;const aa={characterData:!0,childList:!0,subtree:!0};function In(){return Fe||he!==null&&he._readOnly}function Oe(){Fe&&R(13)}function la(){Tr>99&&R(14)}function gt(){return he===null&&R(195,ua()),he}function re(){return pe===null&&R(196,ua()),pe}function ua(){let n=0;const e=new Set,t=Ar.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=or(i);if(xi(s))n++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===t&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function pc(){return pe}function ca(n,e,t){const r=e.__type,i=function(a,l){const u=a._nodes.get(l);return u===void 0&&R(30,l),u}(n,r);let s=t.get(r);s===void 0&&(s=Array.from(i.transforms),t.set(r,s));const o=s.length;for(let a=0;a<o&&(s[a](e),e.isAttached());a++);}function da(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function mc(n){return rs(n,re()._nodes)}function rs(n,e){const t=n.type,r=e.get(t);r===void 0&&R(17,t);const i=r.klass;n.type!==i.getType()&&R(18,i.name);const s=i.importJSON(n),o=n.children;if(T(s)&&Array.isArray(o))for(let a=0;a<o.length;a++){const l=rs(o[a],e);s.append(l)}return s}function fa(n,e,t){const r=he,i=Fe,s=pe;he=e,Fe=!0,pe=n;try{return t()}finally{he=r,Fe=i,pe=s}}function kt(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const s=n._editorState,o=s._selection,a=t._selection,l=n._dirtyType!==Ot,u=he,c=Fe,f=pe,d=n._updating,g=n._observer;let h=null;if(n._pendingEditorState=null,n._editorState=t,!i&&l&&g!==null){pe=n,he=t,Fe=!1,n._updating=!0;try{const S=n._dirtyType,C=n._dirtyElements,k=n._dirtyLeaves;g.disconnect(),h=ic(s,t,n,S,C,k)}catch(S){if(S instanceof Error&&n._onError(S),ns)throw S;return ba(n,null,r,t),no(n),n._dirtyType=Jt,ns=!0,kt(n,s),void(ns=!1)}finally{g.observe(r,aa),n._updating=d,he=u,Fe=c,pe=f}}t._readOnly||(t._readOnly=!0);const m=n._dirtyLeaves,_=n._dirtyElements,b=n._normalizedNodes,p=n._updateTags,y=n._deferred;l&&(n._dirtyType=Ot,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),function(S,C){const k=S._decorators;let E=S._pendingDecorators||k;const I=C._nodeMap;let M;for(M in E)I.has(M)||(E===k&&(E=co(S)),delete E[M])}(n,t);const x=i?null:tt(n._window);if(n._editable&&x!==null&&(l||a===null||a.dirty)){pe=n,he=t;try{if(g!==null&&g.disconnect(),l||a===null||a.dirty){const S=n._blockCursorElement;S!==null&&Fi(S,n,r),gc(o,a,n,x,p,r)}Zu(n,r,a),g!==null&&g.observe(r,aa)}finally{pe=f,he=u}}h!==null&&function(S,C,k,E,I){const M=Array.from(S._listeners.mutation),K=M.length;for(let G=0;G<K;G++){const[z,U]=M[G],W=C.get(U);W!==void 0&&z(W,{dirtyLeaves:E,prevEditorState:I,updateTags:k})}}(n,h,p,m,s),A(a)||a===null||o!==null&&o.is(a)||n.dispatchCommand(fn,void 0);const w=n._pendingDecorators;w!==null&&(n._decorators=w,n._pendingDecorators=null,Dn("decorator",n,!0,w)),function(S,C,k){const E=fo(C),I=fo(k);E!==I&&Dn("textcontent",S,!0,I)}(n,e||s,t),Dn("update",n,!0,{dirtyElements:_,dirtyLeaves:m,editorState:t,normalizedNodes:b,prevEditorState:e||s,tags:p}),function(S,C){if(S._deferred=[],C.length!==0){const k=S._updating;S._updating=!0;try{for(let E=0;E<C.length;E++)C[E]()}finally{S._updating=k}}}(n,y),function(S){const C=S._updates;if(C.length!==0){const k=C.shift();if(k){const[E,I]=k;pa(S,E,I)}}}(n)}function Dn(n,e,t,...r){const i=e._updating;e._updating=t;try{const s=Array.from(e._listeners[n]);for(let o=0;o<s.length;o++)s[o].apply(null,r)}finally{e._updating=i}}function ga(n,e,t){if(n._updating===!1||pe!==n){let i=!1;return n.update(()=>{i=ga(n,e,t)}),i}const r=Ci(n);for(let i=4;i>=0;i--)for(let s=0;s<r.length;s++){const o=r[s]._commands.get(e);if(o!==void 0){const a=o[i];if(a!==void 0){const l=Array.from(a),u=l.length;for(let c=0;c<u;c++)if(l[c](t,n)===!0)return!0}}}return!1}function ha(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[s,o]=i;let a,l;if(o!==void 0){if(a=o.onUpdate,l=o.tag,o.skipTransforms&&(r=!0),o.discrete){const u=n._pendingEditorState;u===null&&R(191),u._flushSync=!0}a&&n._deferred.push(a),l&&n._updateTags.add(l)}s()}}return r}function pa(n,e,t){const r=n._updateTags;let i,s,o=!1,a=!1;t!==void 0&&(i=t.onUpdate,s=t.tag,s!=null&&r.add(s),o=t.skipTransforms||!1,a=t.discrete||!1),i&&n._deferred.push(i);const l=n._editorState;let u=n._pendingEditorState,c=!1;(u===null||u._readOnly)&&(u=n._pendingEditorState=new Nr(new Map((u||l)._nodeMap)),c=!0),u._flushSync=a;const f=he,d=Fe,g=pe,h=n._updating;he=u,Fe=!1,n._updating=!0,pe=n;try{c&&(n._headless?l._selection!==null&&(u._selection=l._selection.clone()):u._selection=function(p){const y=p.getEditorState()._selection,x=tt(p._window);return A(y)||y==null?es(y,x,p,null):y.clone()}(n));const _=n._compositionKey;e(),o=ha(n,o),function(p,y){const x=y.getEditorState()._selection,w=p._selection;if(A(w)){const S=w.anchor,C=w.focus;let k;if(S.type==="text"&&(k=S.getNode(),k.selectionTransform(x,w)),C.type==="text"){const E=C.getNode();k!==E&&E.selectionTransform(x,w)}}}(u,n),n._dirtyType!==Ot&&(o?function(p,y){const x=y._dirtyLeaves,w=p._nodeMap;for(const S of x){const C=w.get(S);O(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&so(C)}}(u,n):function(p,y){const x=y._dirtyLeaves,w=y._dirtyElements,S=p._nodeMap,C=xt(),k=new Map;let E=x,I=E.size,M=w,K=M.size;for(;I>0||K>0;){if(I>0){y._dirtyLeaves=new Set;for(const G of E){const z=S.get(G);O(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&so(z),z!==void 0&&da(z,C)&&ca(y,z,k),x.add(G)}if(E=y._dirtyLeaves,I=E.size,I>0){Tr++;continue}}y._dirtyLeaves=new Set,y._dirtyElements=new Map;for(const G of M){const z=G[0],U=G[1];if(z!=="root"&&!U)continue;const W=S.get(z);W!==void 0&&da(W,C)&&ca(y,W,k),w.set(z,U)}E=y._dirtyLeaves,I=E.size,M=y._dirtyElements,K=M.size,Tr++}y._dirtyLeaves=x,y._dirtyElements=w}(u,n),ha(n),function(p,y,x,w){const S=p._nodeMap,C=y._nodeMap,k=[];for(const[E]of w){const I=C.get(E);I!==void 0&&(I.isAttached()||(T(I)&&Eo(I,E,S,C,k,w),S.has(E)||w.delete(E),k.push(E)))}for(const E of k)C.delete(E);for(const E of x){const I=C.get(E);I===void 0||I.isAttached()||(S.has(E)||x.delete(E),C.delete(E))}}(l,u,n._dirtyLeaves,n._dirtyElements)),_!==n._compositionKey&&(u._flushSync=!0);const b=u._selection;if(A(b)){const p=u._nodeMap,y=b.anchor.key,x=b.focus.key;p.get(y)!==void 0&&p.get(x)!==void 0||R(19)}else xe(b)&&b._nodes.size===0&&(u._selection=null)}catch(_){return _ instanceof Error&&n._onError(_),n._pendingEditorState=l,n._dirtyType=Jt,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void kt(n)}finally{he=f,Fe=d,pe=g,n._updating=h,Tr=0}n._dirtyType!==Ot||function(_,b){const p=b.getEditorState()._selection,y=_._selection;if(y!==null){if(y.dirty||!y.is(p))return!0}else if(p!==null)return!0;return!1}(u,n)?u._flushSync?(u._flushSync=!1,kt(n)):c&&Hu(()=>{kt(n)}):(u._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function $e(n,e,t){n._updating?n._updates.push([e,t]):pa(n,e,t)}class Me extends xr{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Du[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=re()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;t!==null;){if(O(t)&&e.push(t),T(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;T(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;T(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const s=t[r-1];return T(s)&&s.getLastDescendant()||s||null}const i=t[e];return T(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:ae(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&R(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:ae(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&R(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContent(),T(s)&&i!==r-1&&!s.isInline()&&(e+=at)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContentSize(),T(s)&&i!==r-1&&!s.isInline()&&(e+=at.length)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(e!==""){const t=Qs[e];return!!(this.getFormat()&t)}return!1}select(e,t){Oe();const r=P();let i=e,s=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const l=this.getFirstChild();if(O(l)||T(l))return l.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const l=this.getLastChild();if(O(l)||T(l))return l.select()}}i===void 0&&(i=o),s===void 0&&(s=o);const a=this.__key;return A(r)?(r.anchor.set(a,i,"element"),r.focus.set(a,s,"element"),r.dirty=!0,r):na(a,i,a,s,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?Qs[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){const i=r.length,s=this.getChildrenSize(),o=this.getWritable(),a=o.__key,l=[],u=[],c=this.getChildAtIndex(e+t);let f=null,d=s-t+i;if(e!==0)if(e===s)f=this.getLastChild();else{const h=this.getChildAtIndex(e);h!==null&&(f=h.getPreviousSibling())}if(t>0){let h=f===null?this.getFirstChild():f.getNextSibling();for(let m=0;m<t;m++){h===null&&R(100);const _=h.getNextSibling(),b=h.__key;Pt(h.getWritable()),u.push(b),h=_}}let g=f;for(let h=0;h<i;h++){const m=r[h];g!==null&&m.is(g)&&(f=g=g.getPreviousSibling());const _=m.getWritable();_.__parent===a&&d--,Pt(_);const b=m.__key;if(g===null)o.__first=b,_.__prev=null;else{const p=g.getWritable();p.__next=b,_.__prev=p.__key}m.__key===a&&R(76),_.__parent=a,l.push(b),g=m}if(e+t===s)g!==null&&(g.getWritable().__next=null,o.__last=g.__key);else if(c!==null){const h=c.getWritable();if(g!==null){const m=g.getWritable();h.__prev=g.__key,m.__next=c.__key}else h.__prev=null}if(o.__size=d,u.length){const h=P();if(A(h)){const m=new Set(u),_=new Set(l),{anchor:b,focus:p}=h;ma(b,m,_)&&kr(b,b.getNode(),this,f,c),ma(p,m,_)&&kr(p,p.getNode(),this,f,c),d!==0||this.canBeEmpty()||Ae(this)||this.remove()}}return o}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}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,r){return!1}canMergeWhenEmpty(){return!1}}function T(n){return n instanceof Me}function ma(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class _a extends xr{constructor(e){super(e)}decorate(e,t){R(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function X(n){return n instanceof _a}class $n extends Me{static getType(){return"root"}static clone(){return new $n}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){R(51)}getTextContent(){const e=this.__cachedText;return!In()&&re()._dirtyType!==Ot||e===null?super.getTextContent():e}remove(){R(52)}replace(e){R(53)}insertBefore(e){R(54)}insertAfter(e){R(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const r=e[t];T(r)||X(r)||R(56)}return super.append(...e)}static importJSON(e){const t=le();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Se(n){return n instanceof $n}function is(){return new Nr(new Map([["root",new $n]]))}function ya(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&R(130,t.name),T(n)){const r=e.children;Array.isArray(r)||R(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const o=ya(i[s]);r.push(o)}}return e}class Nr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return fa(t&&t.editor||null,this,e)}clone(e){const t=new Nr(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return fa(null,this,()=>({root:ya(le())}))}}class ss extends Me{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Qt extends Me{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=lt[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Qt(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),r=Cn(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:_c,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&nt(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const i=this.getDirection();i&&(t.dir=i);const s=this.getIndent();s>0&&(t.style.textIndent=20*s+"px")}return{element:t}}static importJSON(e){const t=ne();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const r=ne();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||O(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function _c(n){const e=ne();if(n.style){e.setFormat(n.style.textAlign);const t=parseInt(n.style.textIndent,10)/20;t>0&&e.setIndent(t)}return{node:e}}function ne(){return ve(new Qt)}function Mn(n){return n instanceof Qt}const q=0,me=1,yc=3,bc=4;function ba(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=is(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=Ot,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function vc(n){const e=n||{},t=pc(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,s=e.disableEvents||!1,o=is(),a=e.namespace||(i!==null?i._config.namespace:mo()),l=e.editorState,u=[$n,ft,Ln,Rn,Qt,ss,...e.nodes||[]],{onError:c,html:f}=e,d=e.editable===void 0||e.editable;let g;if(n===void 0&&t!==null)g=t._nodes;else{g=new Map;for(let m=0;m<u.length;m++){let _=u[m],b=null,p=null;if(typeof _!="function"){const S=_;_=S.replace,b=S.with,p=S.withKlass||null}const y=_.getType(),x=_.transform(),w=new Set;x!==null&&w.add(x),g.set(y,{exportDOM:f&&f.export?f.export.get(_):void 0,klass:_,replace:b,replaceWithKlass:p,transforms:w})}}const h=new Ar(o,i,g,{disableEvents:s,namespace:a,theme:r},c||console.error,function(m,_){const b=new Map,p=new Set,y=x=>{Object.keys(x).forEach(w=>{let S=b.get(w);S===void 0&&(S=[],b.set(w,S)),S.push(x[w])})};return m.forEach(x=>{const w=x.klass.importDOM;if(w==null||p.has(w))return;p.add(w);const S=w.call(x.klass);S!==null&&y(S)}),_&&y(_),b}(g,f?f.import:void 0),d);return l!==void 0&&(h._pendingEditorState=l,h._dirtyType=Jt),h}class Ar{constructor(e,t,r,i,s,o,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=Ot,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=mo(),this._onError=s,this._htmlConversions=o,this._editable=a,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&R(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(e);s===void 0&&R(36,String(e));const o=s[r];return o.add(t),()=>{o.delete(t),s.every(a=>a.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;s.set(t,i);const o=r&&r.skipInitialization;return o===void 0||o||this.initializeMutationListener(t,i),()=>{s.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&R(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=tc(r).get(t.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],s=r.replaceWithKlass;if(s!=null){const l=this.registerNodeTransformToKlass(s,t);i.push(l)}var o,a;return o=this,a=e.getType(),$e(o,()=>{const l=gt();if(l.isEmpty())return;if(a==="root")return void le().markDirty();const u=l._nodeMap;for(const[,c]of u)c.markDirty()},o._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{i.forEach(l=>l.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return $(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=Cn(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,ba(this,t,e,i),t!==null&&(this._config.disableEvents||sc(t),r!=null&&t.classList.remove(...r)),e!==null){const s=function(a){const l=a.ownerDocument;return l&&l.defaultView||null}(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=Jt,no(this),this._updateTags.add("history-merge"),kt(this),this._config.disableEvents||function(a,l){const u=a.ownerDocument,c=vr.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",Bo),vr.set(u,(c||0)+1),a.__lexicalEditor=l;const f=zo(a);for(let d=0;d<Ui.length;d++){const[g,h]=Ui[d],m=typeof h=="function"?_=>{Wo(_)||(Uo(_),(l.isEditable()||g==="click")&&h(_,l))}:_=>{if(Wo(_))return;Uo(_);const b=l.isEditable();switch(g){case"cut":return b&&$(l,oi,_);case"copy":return $(l,Qn,_);case"paste":return b&&$(l,Vn,_);case"dragstart":return b&&$(l,Vs,_);case"dragover":return b&&$(l,qs,_);case"dragend":return b&&$(l,bu,_);case"focus":return b&&$(l,Su,_);case"blur":return b&&$(l,wu,_);case"drop":return b&&$(l,Js,_)}};a.addEventListener(g,m),f.push(()=>{a.removeEventListener(g,m)})}}(e,this),r!=null&&e.classList.add(...r)}else this._editorState=i,this._pendingEditorState=null,this._window=null;Dn("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&R(38),to(this);const r=this._pendingEditorState,i=this._updateTags,s=t!==void 0?t.tag:null;r===null||r.isEmpty()||(s!=null&&i.add(s),kt(this)),this._pendingEditorState=e,this._dirtyType=Jt,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&i.add(s),kt(this)}parseEditorState(e,t){return function(r,i,s){const o=is(),a=he,l=Fe,u=pe,c=i._dirtyElements,f=i._dirtyLeaves,d=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,he=o,Fe=!1,pe=i;try{const h=i._nodes;rs(r.root,h),s&&s(),o._readOnly=!0}catch(h){h instanceof Error&&i._onError(h)}finally{i._dirtyElements=c,i._dirtyLeaves=f,i._cloneNotNeeded=d,i._dirtyType=g,he=a,Fe=l,pe=u}return o}(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return kt(this),this.getEditorState().read(e,{editor:this})}update(e,t){$e(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),$e(this,()=>{const i=P(),s=le();i!==null?i.dirty=!0:s.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?s.selectStart():s.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=tt(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Dn("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ar.version="0.17.1+prod.esm";const va=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,xc=va?L.useLayoutEffect:L.useEffect,Fr={tag:"history-merge"};function Sc({initialConfig:n,children:e}){const t=L.useMemo(()=>{const{theme:r,namespace:i,nodes:s,onError:o,editorState:a,html:l}=n,u=pu(null,r),c=vc({editable:n.editable,html:l,namespace:i,nodes:s,onError:f=>o(f,c),theme:r});return function(f,d){if(d!==null){if(d===void 0)f.update(()=>{const g=le();if(g.isEmpty()){const h=ne();g.append(h);const m=va?document.activeElement:null;(P()!==null||m!==null&&m===f.getRootElement())&&h.select()}},Fr);else if(d!==null)switch(typeof d){case"string":{const g=f.parseEditorState(d);f.setEditorState(g,Fr);break}case"object":f.setEditorState(d,Fr);break;case"function":f.update(()=>{le().isEmpty()&&d(f)},Fr)}}}(c,a),[c,u]},[]);return xc(()=>{const r=n.editable,[i]=t;i.setEditable(r===void 0||r)},[]),N.jsx(Bs.Provider,{value:t,children:e})}const wc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Cc(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function Ec(){return function(n){const[e]=we(),t=L.useMemo(()=>n(e),[e,n]),r=L.useRef(t.initialValueFn()),[i,s]=L.useState(r.current);return wc(()=>{const{initialValueFn:o,subscribe:a}=t,l=o();return r.current!==l&&(r.current=l,s(l)),a(u=>{r.current=u,s(u)})},[t,n]),i}(Cc)}function kc(){return le().getTextContent()}function Tc(n,e=!0){if(n)return!1;let t=kc();return e&&(t=t.trim()),t===""}function Nc(n){if(!Tc(n,!1))return!1;const e=le().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const i=e[r];if(X(i))return!1;if(T(i)){if(!Mn(i)||i.__indent!==0)return!1;const s=i.getChildren(),o=s.length;for(let a=0;a<o;a++){const l=s[r];if(!O(l))return!1}}}return!0}function xa(n){return()=>Nc(n)}function Ac(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}Ac(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Fc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Sa=Fc(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Oc=new Map;function Pc(n){const e={},t=n.split(";");for(const r of t)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(e[i.trim()]=s.trim())}return e}function wa(n,e){const t=n.getStartEndPoints();if(e.isSelected(n)&&!e.isSegmented()&&!e.isToken()&&t!==null){const[r,i]=t,s=n.isBackward(),o=r.getNode(),a=i.getNode(),l=e.is(o),u=e.is(a);if(l||u){const[c,f]=Zi(n),d=o.is(a),g=e.is(s?a:o),h=e.is(s?o:a);let m,_=0;return d?(_=c>f?f:c,m=c>f?c:f):g?(_=s?f:c,m=void 0):h&&(_=0,m=s?c:f),e.__text=e.__text.slice(_,m),e}}return e}function Ca(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();const e=n.getNode();return T(e)||Sa(177),n.offset===e.getChildrenSize()}function Lc(n){const e=n.getStyle(),t=Pc(e);Oc.set(e,t)}function Ea(n){return n.getNode().isAttached()}function Rc(n){let e=n;for(;e!==null&&!Ae(e);){const t=e.getLatest(),r=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=r}}function jn(n,e,t=null){const r=n.getStartEndPoints(),i=r?r[0]:null,s=n.getNodes(),o=s.length;if(i!==null&&(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0)){const u=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),c=u.getChildren();let f=e();return f.setFormat(u.getFormatType()),f.setIndent(u.getIndent()),c.forEach(d=>f.append(d)),t&&(f=t.append(f)),void u.replace(f)}let a=null,l=[];for(let u=0;u<o;u++){const c=s[u];Ae(c)?(os(n,l,l.length,e,t),l=[],a=c):a===null||a!==null&&fr(c,a)?l.push(c):(os(n,l,l.length,e,t),l=[c])}os(n,l,l.length,e,t)}function os(n,e,t,r,i=null){if(e.length===0)return;const s=e[0],o=new Map,a=[];let l=T(s)?s:s.getParentOrThrow();l.isInline()&&(l=l.getParentOrThrow());let u=!1;for(;l!==null;){const h=l.getPreviousSibling();if(h!==null){l=h,u=!0;break}if(l=l.getParentOrThrow(),Ae(l))break}const c=new Set;for(let h=0;h<t;h++){const m=e[h];T(m)&&m.getChildrenSize()===0&&c.add(m.getKey())}const f=new Set;for(let h=0;h<t;h++){const m=e[h];let _=m.getParent();if(_!==null&&_.isInline()&&(_=_.getParent()),_!==null&&wi(m)&&!f.has(m.getKey())){const b=_.getKey();if(o.get(b)===void 0){const p=r();p.setFormat(_.getFormatType()),p.setIndent(_.getIndent()),a.push(p),o.set(b,p),_.getChildren().forEach(y=>{p.append(y),f.add(y.getKey()),T(y)&&y.getChildrenKeys().forEach(x=>f.add(x))}),Rc(_)}}else if(c.has(m.getKey())){T(m)||Sa(179);const b=r();b.setFormat(m.getFormatType()),b.setIndent(m.getIndent()),a.push(b),m.remove(!0)}}if(i!==null)for(let h=0;h<a.length;h++){const m=a[h];i.append(m)}let d=null;if(Ae(l))if(u)if(i!==null)l.insertAfter(i);else for(let h=a.length-1;h>=0;h--){const m=a[h];l.insertAfter(m)}else{const h=l.getFirstChild();if(T(h)&&(l=h),h===null)if(i)l.append(i);else for(let m=0;m<a.length;m++){const _=a[m];l.append(_),d=_}else if(i!==null)h.insertBefore(i);else for(let m=0;m<a.length;m++){const _=a[m];h.insertBefore(_),d=_}}else if(i)l.insertAfter(i);else for(let h=a.length-1;h>=0;h--){const m=a[h];l.insertAfter(m),d=m}const g=Xt();A(g)&&Ea(g.anchor)&&Ea(g.focus)?De(g.clone()):d!==null?d.selectEnd():n.dirty=!0}function ka(n,e){const t=En(n.focus,e);return X(t)&&!t.isIsolated()||T(t)&&!t.isInline()&&!t.canBeEmpty()}function Ic(n,e,t,r){n.modify(e?"extend":"move",t,r)}function Ta(n){const e=n.anchor.getNode();return(Se(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}function Na(n,e,t){const r=Ta(n);Ic(n,e,t?!r:r,"character")}function Dc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var $c=Dc(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Aa=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Mc=Aa&&"documentMode"in document?document.documentMode:null;!(!Aa||!("InputEvent"in window)||Mc)&&"getTargetRanges"in new window.InputEvent("input");function Fa(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}function We(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function Pe(n,...e){const t=Fa(...e);t.length>0&&n.classList.add(...t)}function Or(n,...e){const t=Fa(...e);t.length>0&&n.classList.remove(...t)}function Oa(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function jc(n){const e=as(n,t=>T(t)&&!t.isInline());return T(e)||$c(4,n.__key),e}const as=(n,e)=>{let t=n;for(;t!==le()&&t!=null;){if(e(t))return t;t=t.getParent()}return null};function Tt(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function zc(n){const e=window.location.origin,t=r=>{if(r.origin!==e)return;const i=n.getRootElement();if(document.activeElement!==i)return;const s=r.data;if(typeof s=="string"){let o;try{o=JSON.parse(s)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const a=o.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[u,c,f,d,g,h]=l;n.update(()=>{const m=P();if(A(m)){const _=m.anchor;let b=_.getNode(),p=0,y=0;if(O(b)&&u>=0&&c>=0&&(p=u,y=u+c,m.setTextNodeRange(b,p,b,y)),p===y&&f===""||(m.insertRawText(f),b=_.getNode()),O(b)){p=d,y=d+g;const x=b.getTextContentSize();p=p>x?x:p,y=y>x?x:y,m.setTextNodeRange(b,p,b,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}function Bc(n,e){const t=e.body?e.body.childNodes:[];let r=[];const i=[];for(let s=0;s<t.length;s++){const o=t[s];if(!La.has(o.nodeName)){const a=Ra(o,n,i,!1);a!==null&&(r=r.concat(a))}}return function(s){for(const o of s)o.getNextSibling()instanceof ss&&o.insertAfter(Ye());for(const o of s){const a=o.getChildren();for(const l of a)o.insertBefore(l);o.remove()}}(i),r}function Uc(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=le().getChildren();for(let i=0;i<r.length;i++)Pa(n,r[i],t,e);return t.innerHTML}function Pa(n,e,t,r=null){let i=r===null||e.isSelected(r);const s=T(e)&&e.excludeFromCopy("html");let o=e;if(r!==null){let g=Li(e);g=O(g)&&r!==null?wa(r,g):g,o=g}const a=T(o)?o.getChildren():[],l=n._nodes.get(o.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(n,o):o.exportDOM(n);const{element:c,after:f}=u;if(!c)return!1;const d=document.createDocumentFragment();for(let g=0;g<a.length;g++){const h=a[g],m=Pa(n,h,d,r);!i&&T(e)&&m&&e.extractWithChild(h,r,"html")&&(i=!0)}if(i&&!s){if(nt(c)&&c.append(d),t.append(c),f){const g=f.call(o,c);g&&c.replaceWith(g)}}else t.append(d);return i}const La=new Set(["STYLE","SCRIPT"]);function Ra(n,e,t,r,i=new Map,s){let o=[];if(La.has(n.nodeName))return o;let a=null;const l=function(h,m){const{nodeName:_}=h,b=m._htmlConversions.get(_.toLowerCase());let p=null;if(b!==void 0)for(const y of b){const x=y(h);x!==null&&(p===null||(p.priority||0)<(x.priority||0))&&(p=x)}return p!==null?p.conversion:null}(n,e),u=l?l(n):null;let c=null;if(u!==null){c=u.after;const h=u.node;if(a=Array.isArray(h)?h[h.length-1]:h,a!==null){for(const[,m]of i)if(a=m(a,s),!a)break;a&&o.push(...Array.isArray(h)?h:[a])}u.forChild!=null&&i.set(n.nodeName,u.forChild)}const f=n.childNodes;let d=[];const g=(a==null||!Ae(a))&&(a!=null&&Xi(a)||r);for(let h=0;h<f.length;h++)d.push(...Ra(f[h],e,t,g,new Map(i),a));return c!=null&&(d=c(d)),hr(n)&&(d=Wc(n,d,g?()=>{const h=new ss;return t.push(h),h}:ne)),a==null?d.length>0?o=o.concat(d):hr(n)&&function(h){return h.nextSibling==null||h.previousSibling==null?!1:Oi(h.nextSibling)&&Oi(h.previousSibling)}(n)&&(o=o.concat(Ye())):T(a)&&a.append(...d),o}function Wc(n,e,t){const r=n.style.textAlign,i=[];let s=[];for(let o=0;o<e.length;o++){const a=e[o];if(Xi(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(s.push(a),o===e.length-1||o<e.length-1&&Xi(e[o+1])){const l=t();l.setFormat(r),l.append(...s),i.push(l),s=[]}}return i}function Kc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pr=Kc(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const Hc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Ia=n=>Hc?(n||window).getSelection():null;function Jc(n,e=P()){return e==null&&Pr(166),A(e)&&e.isCollapsed()||e.getNodes().length===0?"":Uc(n,e)}function Vc(n,e=P()){return e==null&&Pr(166),A(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(qc(n,e))}function Da(n,e,t){const r=n.getData("application/x-lexical-editor");if(r)try{const o=JSON.parse(r);if(o.namespace===t._config.namespace&&Array.isArray(o.nodes))return $a(t,Gc(o.nodes),e)}catch{}const i=n.getData("text/html");if(i)try{const o=new DOMParser().parseFromString(i,"text/html");return $a(t,Bc(t,o),e)}catch{}const s=n.getData("text/plain")||n.getData("text/uri-list");if(s!=null)if(A(e)){const o=s.split(/(\r?\n|\t)/);o[o.length-1]===""&&o.pop();for(let a=0;a<o.length;a++){const l=P();if(A(l)){const u=o[a];u===`
40
+ `||u===`\r
41
+ `?l.insertParagraph():u===" "?l.insertNodes([Ue()]):l.insertText(u)}}}else e.insertRawText(s)}function $a(n,e,t){n.dispatchCommand(mu,{nodes:e,selection:t})||t.insertNodes(e)}function Ma(n,e,t,r=[]){let i=e===null||t.isSelected(e);const s=T(t)&&t.excludeFromCopy("html");let o=t;if(e!==null){let u=Li(t);u=O(u)&&e!==null?wa(e,u):u,o=u}const a=T(o)?o.getChildren():[],l=function(u){const c=u.exportJSON(),f=u.constructor;if(c.type!==f.getType()&&Pr(58,f.name),T(u)){const d=c.children;Array.isArray(d)||Pr(59,f.name)}return c}(o);if(O(o)){const u=o.__text;u.length>0?l.text=u:i=!1}for(let u=0;u<a.length;u++){const c=a[u],f=Ma(n,e,c,l.children);!i&&T(t)&&f&&t.extractWithChild(c,e,"clone")&&(i=!0)}if(i&&!s)r.push(l);else if(Array.isArray(l.children))for(let u=0;u<l.children.length;u++){const c=l.children[u];r.push(c)}return i}function qc(n,e){const t=[],r=le().getChildren();for(let i=0;i<r.length;i++)Ma(n,e,r[i],t);return{namespace:n._config.namespace,nodes:t}}function Gc(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=mc(r);O(i)&&Lc(i),e.push(i)}return e}let en=null;async function ja(n,e,t){if(en!==null)return!1;if(e!==null)return new Promise((l,u)=>{n.update(()=>{l(za(n,e,t))})});const r=n.getRootElement(),i=n._window==null?window.document:n._window.document,s=Ia(n._window);if(r===null||s===null)return!1;const o=i.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(i.createTextNode("#")),r.append(o);const a=new Range;return a.setStart(o,0),a.setEnd(o,1),s.removeAllRanges(),s.addRange(a),new Promise((l,u)=>{const c=n.registerCommand(Qn,f=>(Tt(f,ClipboardEvent)&&(c(),en!==null&&(window.clearTimeout(en),en=null),l(za(n,f,t))),!0),bc);en=window.setTimeout(()=>{c(),en=null,l(!1)},50),i.execCommand("copy"),o.remove()})}function za(n,e,t){if(t===void 0){const i=Ia(n._window);if(!i)return!1;const s=i.anchorNode,o=i.focusNode;if(s!==null&&o!==null&&!vn(n,s,o))return!1;const a=P();if(a===null)return!1;t=Zc(a)}e.preventDefault();const r=e.clipboardData;return r!==null&&(Xc(r,t),!0)}const Yc=[["text/html",Jc],["application/x-lexical-editor",Vc]];function Zc(n=P()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=Qu();for(const[r,i]of Yc){const s=i(t,n);s!==null&&(e[r]=s)}}return e}function Xc(n,e){for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function Ba(n,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const tn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Qc=tn&&"documentMode"in document?document.documentMode:null,ed=!(!tn||!("InputEvent"in window)||Qc)&&"getTargetRanges"in new window.InputEvent("input"),td=tn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),nd=tn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rd=tn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),id=tn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!rd,Ua=dn();let Lr=class nu extends Me{static getType(){return"quote"}static clone(e){return new nu(e.__key)}constructor(e){super(e)}createDOM(e){const t=document.createElement("blockquote");return Pe(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:sd,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&nt(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){const t=Rr();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){const r=ne(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){const e=ne();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function Rr(){return ve(new Lr)}function Wa(n){return n instanceof Lr}let Ir=class ru extends Me{static getType(){return"heading"}static clone(e){return new ru(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){const t=this.__tag,r=document.createElement(t),i=e.theme.heading;if(i!==void 0){const s=i[t];Pe(r,s)}return r}updateDOM(e,t){return!1}static importDOM(){return{h1:e=>({conversion:nn,priority:0}),h2:e=>({conversion:nn,priority:0}),h3:e=>({conversion:nn,priority:0}),h4:e=>({conversion:nn,priority:0}),h5:e=>({conversion:nn,priority:0}),h6:e=>({conversion:nn,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&Ka(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>Ka(e)?{conversion:t=>({node:Nt("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&nt(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();t.style.textAlign=r;const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){const t=Nt(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),s=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?ne():Nt(this.getTag()),o=this.getDirection();if(s.setDirection(o),this.insertAfter(s,t),r===0&&!this.isEmpty()&&e){const a=ne();a.select(),this.replace(a,!0)}return s}collapseAtStart(){const e=this.isEmpty()?ne():Nt(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}};function Ka(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function nn(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Nt(e),n.style!==null&&t.setFormat(n.style.textAlign)),{node:t}}function sd(n){const e=Rr();return n.style!==null&&e.setFormat(n.style.textAlign),{node:e}}function Nt(n){return ve(new Ir(n))}function Ha(n){return n instanceof Ir}function Dr(n){let e=null;if(Tt(n,DragEvent)?e=n.dataTransfer:Tt(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),i=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),i]}function Ja(n){const e=P();if(!A(e))return!1;const t=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const s=r[i],o=s.getKey();if(t.has(o))continue;const a=as(s,u=>T(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!t.has(l)&&(t.add(l),n(a))}return t.size>0}function $r(n){const e=ut(n);return X(e)}function od(n){return We(n.registerCommand(ei,e=>{const t=P();return!!xe(t)&&(t.clear(),!0)},0),n.registerCommand(Ft,e=>{const t=P();return!!A(t)&&(t.deleteCharacter(e),!0)},q),n.registerCommand(hn,e=>{const t=P();return!!A(t)&&(t.deleteWord(e),!0)},q),n.registerCommand(pn,e=>{const t=P();return!!A(t)&&(t.deleteLine(e),!0)},q),n.registerCommand(Wt,e=>{const t=P();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const r=e.dataTransfer;if(r!=null)Da(r,t,n);else if(A(t)){const i=e.data;return i&&t.insertText(i),!0}}return!0},q),n.registerCommand(ti,()=>{const e=P();return!!A(e)&&(e.removeText(),!0)},q),n.registerCommand(Ie,e=>{const t=P();return!!A(t)&&(t.formatText(e),!0)},q),n.registerCommand(mn,e=>{const t=P();if(!A(t)&&!xe(t))return!1;const r=t.getNodes();for(const i of r){const s=as(i,o=>T(o)&&!o.isInline());s!==null&&s.setFormat(e)}return!0},q),n.registerCommand(Ut,e=>{const t=P();return!!A(t)&&(t.insertLineBreak(e),!0)},q),n.registerCommand(gn,()=>{const e=P();return!!A(e)&&(e.insertParagraph(),!0)},q),n.registerCommand(si,()=>(oa([Ue()]),!0),q),n.registerCommand(yt,()=>Ja(e=>{const t=e.getIndent();e.setIndent(t+1)}),q),n.registerCommand(Ht,()=>Ja(e=>{const t=e.getIndent();t>0&&e.setIndent(t-1)}),q),n.registerCommand(Kt,e=>{const t=P();if(xe(t)&&!$r(e.target)){const r=t.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(A(t)){const r=En(t.focus,!0);if(!e.shiftKey&&X(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},q),n.registerCommand(Zn,e=>{const t=P();if(xe(t)){const r=t.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(A(t)){if(function(i){const s=i.focus;return s.key==="root"&&s.offset===le().getChildrenSize()}(t))return e.preventDefault(),!0;const r=En(t.focus,!1);if(!e.shiftKey&&X(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},q),n.registerCommand(Ws,e=>{const t=P();if(xe(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}if(!A(t))return!1;if(ka(t,!0)){const r=e.shiftKey;return e.preventDefault(),Na(t,r,!0),!0}return!1},q),n.registerCommand(Us,e=>{const t=P();if(xe(t)&&!$r(e.target)){const i=t.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectNext(0,0),!0}if(!A(t))return!1;const r=e.shiftKey;return!!ka(t,!1)&&(e.preventDefault(),Na(t,r,!1),!0)},q),n.registerCommand(ri,e=>{if($r(e.target))return!1;const t=P();if(!A(t))return!1;e.preventDefault();const{anchor:r}=t,i=r.getNode();return t.isCollapsed()&&r.offset===0&&!Se(i)&&jc(i).getIndent()>0?n.dispatchCommand(Ht,void 0):n.dispatchCommand(Ft,!0)},q),n.registerCommand(ii,e=>{if($r(e.target))return!1;const t=P();return!!A(t)&&(e.preventDefault(),n.dispatchCommand(Ft,!1))},q),n.registerCommand(Xn,e=>{const t=P();if(!A(t))return!1;if(e!==null){if((nd||td||id)&&ed)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(Ut,!1)}return n.dispatchCommand(gn,void 0)},q),n.registerCommand(Ks,()=>{const e=P();return!!A(e)&&(n.blur(),!0)},q),n.registerCommand(Js,e=>{const[,t]=Dr(e);if(t.length>0){const i=Ba(e.clientX,e.clientY);if(i!==null){const{offset:s,node:o}=i,a=ut(o);if(a!==null){const l=ra();if(O(a))l.anchor.set(a.getKey(),s,"text"),l.focus.set(a.getKey(),s,"text");else{const c=a.getParentOrThrow().getKey(),f=a.getIndexWithinParent()+1;l.anchor.set(c,f,"element"),l.focus.set(c,f,"element")}const u=oo(l);De(u)}n.dispatchCommand(Ua,t)}return e.preventDefault(),!0}const r=P();return!!A(r)},q),n.registerCommand(Vs,e=>{const[t]=Dr(e),r=P();return!(t&&!A(r))},q),n.registerCommand(qs,e=>{const[t]=Dr(e),r=P();if(t&&!A(r))return!1;const i=Ba(e.clientX,e.clientY);if(i!==null){const s=ut(i.node);X(s)&&e.preventDefault()}return!0},q),n.registerCommand(ai,()=>(Gu(),!0),q),n.registerCommand(Qn,e=>(ja(n,Tt(e,ClipboardEvent)?e:null),!0),q),n.registerCommand(oi,e=>(async function(t,r){await ja(r,Tt(t,ClipboardEvent)?t:null),r.update(()=>{const i=P();A(i)?i.removeText():xe(i)&&i.getNodes().forEach(s=>s.remove())})}(e,n),!0),q),n.registerCommand(Vn,e=>{const[,t,r]=Dr(e);return t.length>0&&!r?(n.dispatchCommand(Ua,t),!0):vi(e.target)?!1:P()!==null&&(function(i,s){i.preventDefault(),s.update(()=>{const o=P(),a=Tt(i,InputEvent)||Tt(i,KeyboardEvent)?null:i.clipboardData;a!=null&&o!==null&&Da(a,o,s)},{tag:"paste"})}(e,n),!0)},q))}const ls=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function Va(n){return n.getEditorState().read(xa(n.isComposing()))}function ad({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=we(),i=function(s,o){const[a,l]=L.useState(()=>s.getDecorators());return ls(()=>s.registerDecoratorListener(u=>{Jn.flushSync(()=>{l(u)})}),[s]),L.useEffect(()=>{l(s.getDecorators())},[s]),L.useMemo(()=>{const u=[],c=Object.keys(a);for(let f=0;f<c.length;f++){const d=c[f],g=N.jsx(o,{onError:m=>s._onError(m),children:N.jsx(L.Suspense,{fallback:null,children:a[d]})}),h=s.getElementByKey(d);h!==null&&u.push(Jn.createPortal(g,h,d))}return u},[o,a,s])}(r,t);return function(s){ls(()=>We(od(s),zc(s)),[s])}(r),N.jsxs(N.Fragment,{children:[n,N.jsx(ld,{content:e}),i]})}function ld({content:n}){const[e]=we(),t=function(i){const[s,o]=L.useState(()=>Va(i));return ls(()=>{function a(){const l=Va(i);o(l)}return a(),We(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),s}(e),r=Ec();return t?typeof n=="function"?n(r):n:null}const qa=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?L.useLayoutEffect:L.useEffect;function ud({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:i,ariaExpanded:s,ariaLabel:o,ariaLabelledBy:a,ariaMultiline:l,ariaOwns:u,ariaRequired:c,autoCapitalize:f,className:d,id:g,role:h="textbox",spellCheck:m=!0,style:_,tabIndex:b,"data-testid":p,...y},x){const[w,S]=L.useState(n.isEditable()),C=L.useCallback(E=>{E&&E.ownerDocument&&E.ownerDocument.defaultView?n.setRootElement(E):n.setRootElement(null)},[n]),k=L.useMemo(()=>function(...E){return I=>{E.forEach(M=>{typeof M=="function"?M(I):M!=null&&(M.current=I)})}}(x,C),[C,x]);return qa(()=>(S(n.isEditable()),n.registerEditableListener(E=>{S(E)})),[n]),N.jsx("div",{...y,"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":i,"aria-expanded":w&&h==="combobox"?!!s:void 0,"aria-label":o,"aria-labelledby":a,"aria-multiline":l,"aria-owns":w?u:void 0,"aria-readonly":!w||void 0,"aria-required":c,autoCapitalize:f,className:d,contentEditable:w,"data-testid":p,id:g,ref:k,role:w?h:void 0,spellCheck:m,style:_,tabIndex:b})}const cd=L.forwardRef(ud);function Ga(n){return n.getEditorState().read(xa(n.isComposing()))}const dd=L.forwardRef(fd);function fd(n,e){const{placeholder:t,...r}=n,[i]=we();return N.jsxs(N.Fragment,{children:[N.jsx(cd,{editor:i,...r,ref:e}),t!=null&&N.jsx(gd,{editor:i,content:t})]})}function gd({content:n,editor:e}){const t=function(o){const[a,l]=L.useState(()=>Ga(o));return qa(()=>{function u(){const c=Ga(o);l(c)}return u(),We(o.registerUpdateListener(()=>{u()}),o.registerEditableListener(()=>{u()}))},[o]),a}(e),[r,i]=L.useState(e.isEditable());if(L.useLayoutEffect(()=>(i(e.isEditable()),e.registerEditableListener(o=>{i(o)})),[e]),!t)return null;let s=null;return typeof n=="function"?s=n(r):n!==null&&(s=n),s===null?null:N.jsx("div",{"aria-hidden":!0,children:s})}const Mr=0,us=1,cs=2,Ze=0,hd=1,Ya=2,pd=3,md=4;function _d(n,e,t,r,i){if(n===null||t.size===0&&r.size===0&&!i)return Ze;const s=e._selection,o=n._selection;if(i)return hd;if(!(A(s)&&A(o)&&o.isCollapsed()&&s.isCollapsed()))return Ze;const a=function(b,p,y){const x=b._nodeMap,w=[];for(const S of p){const C=x.get(S);C!==void 0&&w.push(C)}for(const[S,C]of y){if(!C)continue;const k=x.get(S);k===void 0||Se(k)||w.push(k)}return w}(e,t,r);if(a.length===0)return Ze;if(a.length>1){const b=e._nodeMap,p=b.get(s.anchor.key),y=b.get(o.anchor.key);return p&&y&&!n._nodeMap.has(p.__key)&&O(p)&&p.__text.length===1&&s.anchor.offset===1?Ya:Ze}const l=a[0],u=n._nodeMap.get(l.__key);if(!O(u)||!O(l)||u.__mode!==l.__mode)return Ze;const c=u.__text,f=l.__text;if(c===f)return Ze;const d=s.anchor,g=o.anchor;if(d.key!==g.key||d.type!=="text")return Ze;const h=d.offset,m=g.offset,_=f.length-c.length;return _===1&&m===h-1?Ya:_===-1&&m===h+1?pd:_===-1&&m===h?md:Ze}function yd(n,e){let t=Date.now(),r=Ze;return(i,s,o,a,l,u)=>{const c=Date.now();if(u.has("historic"))return r=Ze,t=c,cs;const f=_d(i,s,a,l,n.isComposing()),d=(()=>{const g=o===null||o.editor===n,h=u.has("history-push");if(!h&&g&&u.has("history-merge"))return Mr;if(i===null)return us;const m=s._selection;return a.size>0||l.size>0?h===!1&&f!==Ze&&f===r&&c<t+e&&g||a.size===1&&function(_,b,p){const y=b._nodeMap.get(_),x=p._nodeMap.get(_),w=b._selection,S=p._selection;return!(A(w)&&A(S)&&w.anchor.type==="element"&&w.focus.type==="element"&&S.anchor.type==="text"&&S.focus.type==="text"||!O(y)||!O(x)||y.__parent!==x.__parent)&&JSON.stringify(b.read(()=>y.exportJSON()))===JSON.stringify(p.read(()=>x.exportJSON()))}(Array.from(a)[0],i,s)?Mr:us:m!==null?Mr:cs})();return t=c,r=f,d}}function Za(n){n.undoStack=[],n.redoStack=[],n.current=null}function bd(n,e,t){const r=yd(n,t);return We(n.registerCommand(qn,()=>(function(s,o){const a=o.redoStack,l=o.undoStack;if(l.length!==0){const u=o.current,c=l.pop();u!==null&&(a.push(u),s.dispatchCommand(_n,!0)),l.length===0&&s.dispatchCommand(yn,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(n,e),!0),q),n.registerCommand(Gn,()=>(function(s,o){const a=o.redoStack,l=o.undoStack;if(a.length!==0){const u=o.current;u!==null&&(l.push(u),s.dispatchCommand(yn,!0));const c=a.pop();a.length===0&&s.dispatchCommand(_n,!1),o.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(n,e),!0),q),n.registerCommand(vu,()=>(Za(e),!1),q),n.registerCommand(xu,()=>(Za(e),n.dispatchCommand(_n,!1),n.dispatchCommand(yn,!1),!0),q),n.registerUpdateListener(({editorState:s,prevEditorState:o,dirtyLeaves:a,dirtyElements:l,tags:u})=>{const c=e.current,f=e.redoStack,d=e.undoStack,g=c===null?null:c.editorState;if(c!==null&&s===g)return;const h=r(o,s,c,a,l,u);if(h===us)f.length!==0&&(e.redoStack=[],n.dispatchCommand(_n,!1)),c!==null&&(d.push({...c}),n.dispatchCommand(yn,!0));else if(h===cs)return;e.current={editor:n,editorState:s}}))}function vd(){return{current:null,redoStack:[],undoStack:[]}}function xd({delay:n,externalHistoryState:e}){const[t]=we();return function(r,i,s=1e3){const o=L.useMemo(()=>i||vd(),[i]);L.useEffect(()=>bd(r,o,s),[s,r,o])}(t,e,n),null}function Sd({defaultSelection:n}){const[e]=we();return L.useEffect(()=>{e.focus(()=>{const t=document.activeElement,r=e.getRootElement();r===null||t!==null&&r.contains(t)||r.focus({preventScroll:!0})},{defaultSelection:n})},[n,e]),null}function ds(n,e){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},ds(n,e)}var Xa={error:null},wd=function(n){var e,t;function r(){for(var s,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return(s=n.call.apply(n,[this].concat(a))||this).state=Xa,s.resetErrorBoundary=function(){for(var u,c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];s.props.onReset==null||(u=s.props).onReset.apply(u,f),s.reset()},s}t=n,(e=r).prototype=Object.create(t.prototype),e.prototype.constructor=e,ds(e,t),r.getDerivedStateFromError=function(s){return{error:s}};var i=r.prototype;return i.reset=function(){this.setState(Xa)},i.componentDidCatch=function(s,o){var a,l;(a=(l=this.props).onError)==null||a.call(l,s,o)},i.componentDidUpdate=function(s,o){var a,l,u,c,f=this.state.error,d=this.props.resetKeys;f!==null&&o.error!==null&&((u=s.resetKeys)===void 0&&(u=[]),(c=d)===void 0&&(c=[]),u.length!==c.length||u.some(function(g,h){return!Object.is(g,c[h])}))&&((a=(l=this.props).onResetKeysChange)==null||a.call(l,s.resetKeys,d),this.reset())},i.render=function(){var s=this.state.error,o=this.props,a=o.fallbackRender,l=o.FallbackComponent,u=o.fallback;if(s!==null){var c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(Yr.isValidElement(u))return u;if(typeof a=="function")return a(c);if(l)return Yr.createElement(l,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(Yr.Component);function Cd({children:n,onError:e}){return N.jsx(wd,{fallback:N.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}const Ed=new Set(["http:","https:","mailto:","sms:","tel:"]);class At extends Me{static getType(){return"link"}static clone(e){return new At(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},r){super(r);const{target:i=null,rel:s=null,title:o=null}=t;this.__url=e,this.__target=i,this.__rel=s,this.__title=o}createDOM(e){const t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),this.__target!==null&&(t.target=this.__target),this.__rel!==null&&(t.rel=this.__rel),this.__title!==null&&(t.title=this.__title),Pe(t,e.theme.link),t}updateDOM(e,t,r){if(t instanceof HTMLAnchorElement){const i=this.__url,s=this.__target,o=this.__rel,a=this.__title;i!==e.__url&&(t.href=i),s!==e.__target&&(s?t.target=s:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),a!==e.__title&&(a?t.title=a:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:kd,priority:1})}}static importJSON(e){const t=zn(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{const t=new URL(e);if(!Ed.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,t=!0){const r=zn(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!A(t))return!1;const i=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function kd(n){let e=null;if(Xu(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=zn(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function zn(n,e){return ve(new At(n,e))}function Xe(n){return n instanceof At}let jr=class iu extends At{constructor(e,t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new iu(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){const t=fs(e.url,{isUnlinked:e.isUnlinked,rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked,type:"autolink",version:1}}insertNewAfter(e,t=!0){const r=this.getParentOrThrow().insertNewAfter(e,t);if(T(r)){const i=fs(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function fs(n,e){return ve(new jr(n,e))}function rn(n){return n instanceof jr}const sn=dn();function gs(n,e={}){const{target:t,title:r}=e,i=e.rel===void 0?"noreferrer":e.rel,s=P();if(!A(s))return;const o=s.extract();if(n===null)o.forEach(a=>{const l=a.getParent();if(!rn(l)&&Xe(l)){const u=l.getChildren();for(let c=0;c<u.length;c++)l.insertBefore(u[c]);l.remove()}});else{if(o.length===1){const u=function(c,f){let d=c;for(;d!==null&&d.getParent()!==null&&!f(d);)d=d.getParentOrThrow();return f(d)?d:null}(o[0],Xe);if(u!==null)return u.setURL(n),t!==void 0&&u.setTarget(t),i!==null&&u.setRel(i),void(r!==void 0&&u.setTitle(r))}let a=null,l=null;o.forEach(u=>{const c=u.getParent();if(c!==l&&c!==null&&(!T(u)||u.isInline())){if(Xe(c))return l=c,c.setURL(n),t!==void 0&&c.setTarget(t),i!==null&&l.setRel(i),void(r!==void 0&&l.setTitle(r));if(c.is(a)||(a=c,l=zn(n,{rel:i,target:t,title:r}),Xe(c)?u.getPreviousSibling()===null?c.insertBefore(l):c.insertAfter(l):u.insertBefore(l)),Xe(u)){if(u.is(l))return;if(l!==null){const f=u.getChildren();for(let d=0;d<f.length;d++)l.append(f[d])}u.remove()}else l!==null&&l.append(u)}})}}const Qa=/^(\d+(?:\.\d+)?)px$/,zr={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};let hs=class su extends Me{static getType(){return"tablecell"}static clone(e){const t=new su(e.__headerState,e.__colSpan,e.__width,e.__key);return t.__rowSpan=e.__rowSpan,t.__backgroundColor=e.__backgroundColor,t}static importDOM(){return{td:e=>({conversion:el,priority:0}),th:e=>({conversion:el,priority:0})}}static importJSON(e){const t=e.colSpan||1,r=e.rowSpan||1,i=tl(e.headerState,t,e.width||void 0);return i.__rowSpan=r,i.__backgroundColor=e.backgroundColor||null,i}constructor(e=zr.NO_STATUS,t=1,r,i){super(i),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null}createDOM(e){const t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(t.style.backgroundColor=this.__backgroundColor),Pe(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){const{element:t}=super.exportDOM(e);if(t){const r=t;r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign="top",r.style.textAlign="start";const i=this.getBackgroundColor();i!==null?r.style.backgroundColor=i:this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return{element:t}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth()}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e){return this.getWritable().__headerState=e,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){return this.getWritable().__width=e,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){this.getWritable().__backgroundColor=e}toggleHeaderStyle(e){const t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==zr.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function el(n){const e=n,t=n.nodeName.toLowerCase();let r;Qa.test(e.style.width)&&(r=parseFloat(e.style.width));const i=tl(t==="th"?zr.ROW:zr.NO_STATUS,e.colSpan,r);i.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(i.__backgroundColor=s);const o=e.style,a=o.textDecoration.split(" "),l=o.fontWeight==="700"||o.fontWeight==="bold",u=a.includes("line-through"),c=o.fontStyle==="italic",f=a.includes("underline");return{after:d=>(d.length===0&&d.push(ne()),d),forChild:(d,g)=>{if(nl(g)&&!T(d)){const h=ne();return Z(d)&&d.getTextContent()===`
42
+ `?null:(O(d)&&(l&&d.toggleFormat("bold"),u&&d.toggleFormat("strikethrough"),c&&d.toggleFormat("italic"),f&&d.toggleFormat("underline")),h.append(d),h)}return d},node:i}}function tl(n,e=1,t){return ve(new hs(n,e,t))}function nl(n){return n instanceof hs}class Bn extends Me{static getType(){return"tablerow"}static clone(e){return new Bn(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:Td,priority:0})}}static importJSON(e){return rl(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){return{...super.exportJSON(),...this.getHeight()&&{height:this.getHeight()},type:"tablerow",version:1}}createDOM(e){const t=document.createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),Pe(t,e.theme.tableRow),t}isShadowRoot(){return!0}setHeight(e){return this.getWritable().__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function Td(n){const e=n;let t;return Qa.test(e.style.height)&&(t=parseFloat(e.style.height)),{node:rl(t)}}function rl(n){return ve(new Bn(n))}function Nd(n){return n instanceof Bn}function Ad(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}Ad(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});let il=class ou extends Me{static getType(){return"table"}static clone(e){return new ou(e.__key)}static importDOM(){return{table:e=>({conversion:Fd,priority:1})}}static importJSON(e){return sl()}constructor(e){super(e)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(e,t){const r=document.createElement("table");return Pe(r,e.theme.table),r}updateDOM(){return!1}exportDOM(e){return{...super.exportDOM(e),after:t=>{if(t){const r=t.cloneNode(),i=document.createElement("colgroup"),s=document.createElement("tbody");nt(t)&&s.append(...t.children);const o=this.getFirstChildOrThrow();if(!Nd(o))throw new Error("Expected to find row node.");const a=o.getChildrenSize();for(let l=0;l<a;l++){const u=document.createElement("col");i.append(u)}return r.replaceChildren(i,s),r}}}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){const{rows:r,domRows:i}=t;for(let s=0;s<r;s++){const o=i[s];if(o==null)continue;const a=o.findIndex(l=>{if(!l)return;const{elem:u}=l;return ut(u)===e});if(a!==-1)return{x:a,y:s}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,t,r){const{domRows:i}=r,s=i[t];if(s==null)return null;const o=s[e<s.length?e:s.length-1];return o??null}getDOMCellFromCordsOrThrow(e,t,r){const i=this.getDOMCellFromCords(e,t,r);if(!i)throw new Error("Cell not found at cords.");return i}getCellNodeFromCords(e,t,r){const i=this.getDOMCellFromCords(e,t,r);if(i==null)return null;const s=ut(i.elem);return nl(s)?s:null}getCellNodeFromCordsOrThrow(e,t,r){const i=this.getCellNodeFromCords(e,t,r);if(!i)throw new Error("Node at cords not TableCellNode.");return i}canSelectBefore(){return!0}canIndent(){return!1}};function Fd(n){return{node:sl()}}function sl(){return ve(new il)}function Od(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var st=Od(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function ps(n){let e=1,t=n.getParent();for(;t!=null;){if(te(t)){const r=t.getParent();if(B(r)){e++,t=r.getParent();continue}st(40)}return e}return e}function ms(n){let e=n.getParent();B(e)||st(40);let t=e;for(;t!==null;)t=t.getParent(),B(t)&&(e=t);return e}function ol(n){let e=[];const t=n.getChildren().filter(te);for(let r=0;r<t.length;r++){const i=t[r],s=i.getFirstChild();B(s)?e=e.concat(ol(s)):e.push(i)}return e}function ot(n){return te(n)&&B(n.getFirstChild())}function al(n){return Le().append(n)}function ll(n,e){return te(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function ul(n,e){n.update(()=>{const t=P();if(t!==null){const r=t.getNodes();if(A(t)){const s=t.getStartEndPoints();s===null&&st(143);const[o]=s,a=o.getNode(),l=a.getParent();if(ll(a,r)){const u=ke(e);if(Ae(l)){a.replace(u);const c=Le();T(a)&&(c.setFormat(a.getFormatType()),c.setIndent(a.getIndent())),u.append(c)}else if(te(a)){const c=a.getParentOrThrow();It(u,c.getChildren()),c.replace(u)}return}}const i=new Set;for(let s=0;s<r.length;s++){const o=r[s];if(!T(o)||!o.isEmpty()||te(o)||i.has(o.getKey())){if(wi(o)){let a=o.getParent();for(;a!=null;){const l=a.getKey();if(B(a)){if(!i.has(l)){const u=ke(e);It(u,a.getChildren()),a.replace(u),i.add(l)}break}{const u=a.getParent();if(Ae(u)&&!i.has(l)){i.add(l),cl(a,e);break}a=u}}}}else cl(o,e)}}})}function It(n,e){n.splice(n.getChildrenSize(),0,e)}function cl(n,e){if(B(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),i=Le();if(i.setFormat(n.getFormatType()),i.setIndent(n.getIndent()),It(i,n.getChildren()),B(t)&&e===t.getListType())return t.append(i),n.remove(),B(r)&&e===r.getListType()&&(It(t,r.getChildren()),r.remove()),t;if(B(r)&&e===r.getListType())return r.getFirstChildOrThrow().insertBefore(i),n.remove(),r;{const s=ke(e);return s.append(i),n.replace(s),s}}function _s(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&ot(t)&&ot(r)&&(_s(t.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&n.append(...i),e.remove()}function Pd(n){n.update(()=>{const e=P();if(A(e)){const t=new Set,r=e.getNodes(),i=e.anchor.getNode();if(ll(i,r))t.add(ms(i));else for(let s=0;s<r.length;s++){const o=r[s];if(wi(o)){const a=Oa(o,Dt);a!=null&&t.add(ms(a))}}for(const s of t){let o=s;const a=ol(s);for(const l of a){const u=ne();It(u,l.getChildren()),o.insertAfter(u),o=u,l.__key===e.anchor.key&&e.anchor.set(u.getKey(),0,"element"),l.__key===e.focus.key&&e.focus.set(u.getKey(),0,"element"),l.remove()}s.remove()}}})}function Ld(n){const e=new Set;if(ot(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),i=n.getPreviousSibling();if(ot(r)&&ot(i)){const s=i.getFirstChild();if(B(s)){s.append(n);const o=r.getFirstChild();B(o)&&(It(s,o.getChildren()),r.remove(),e.add(r.getKey()))}}else if(ot(r)){const s=r.getFirstChild();if(B(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(n)}}else if(ot(i)){const s=i.getFirstChild();B(s)&&s.append(n)}else if(B(t)){const s=Le(),o=ke(t.getListType());s.append(o),o.append(n),i?i.insertAfter(s):r?r.insertBefore(s):t.append(s)}}function Rd(n){if(ot(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(B(t?t.getParent():void 0)&&te(t)&&B(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(i))t.insertAfter(n),e.isEmpty()&&t.remove();else{const s=e.getListType(),o=Le(),a=ke(s);o.append(a),n.getPreviousSiblings().forEach(c=>a.append(c));const l=Le(),u=ke(s);l.append(u),It(u,n.getNextSiblings()),t.insertBefore(o),t.insertAfter(l),t.replace(n)}}}function Id(){const n=P();if(!A(n)||!n.isCollapsed())return!1;const e=n.anchor.getNode();if(!te(e)||e.getChildrenSize()!==0)return!1;const t=ms(e),r=e.getParent();B(r)||st(40);const i=r.getParent();let s;if(Ae(i))s=ne(),t.insertAfter(s);else{if(!te(i))return!1;s=Le(),i.insertAfter(s)}s.select();const o=e.getNextSiblings();if(o.length>0){const a=ke(r.getListType());if(Mn(s))s.insertAfter(a);else{const l=Le();l.append(a),s.insertAfter(l)}o.forEach(l=>{l.remove(),a.append(l)})}return function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const u=l.getParent();if(u==null||!te(l)&&!B(l))break;l=u}l.remove()}(e),!0}function Br(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}let Dt=class au extends Me{static getType(){return"listitem"}static clone(e){return new au(e.__value,e.__checked,e.__key)}constructor(e,t,r){super(r),this.__value=e===void 0?1:e,this.__checked=t}createDOM(e){const t=document.createElement("li"),r=this.getParent();return B(r)&&r.getListType()==="check"&&fl(t,this,null),t.value=this.__value,dl(t,e.theme,this),t}updateDOM(e,t,r){const i=this.getParent();return B(i)&&i.getListType()==="check"&&fl(t,this,e),t.value=this.__value,dl(t,r.theme,this),!1}static transform(){return e=>{if(te(e)||st(144),e.__checked==null)return;const t=e.getParent();B(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:Dd,priority:0})}}static importJSON(e){const t=Le();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportDOM(e){const t=this.createDOM(e._config);return t.style.textAlign=this.getFormatType(),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let t=0;t<e.length;t++){const r=e[t];if(T(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,t){if(te(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!B(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const i=ke(r.getListType());let s=this.getNextSibling();for(;s;){const o=s;s=s.getNextSibling(),i.append(o)}r.insertAfter(e),e.insertAfter(i)}return t&&(T(e)||st(139),this.getChildren().forEach(i=>{e.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(B(r)||st(39),te(e))return super.insertAfter(e,t);const i=this.getNextSiblings();if(r.insertAfter(e,t),i.length!==0){const s=ke(r.getListType());i.forEach(o=>s.append(o)),e.insertAfter(s,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&ot(t)&&ot(r)&&(_s(t.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,t=!0){const r=Le(this.__checked==null&&void 0);return this.insertAfter(r,t),r}collapseAtStart(e){const t=ne();this.getChildren().forEach(o=>t.append(o));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),s=te(i);if(r.getChildrenSize()===1)if(s)r.remove(),i.select();else{r.insertBefore(t),r.remove();const o=e.anchor,a=e.focus,l=t.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(l,o.offset,"element"),a.type==="element"&&a.getNode().is(this)&&a.set(l,a.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){const e=this.getLatest();let t;const r=this.getParent();return B(r)&&(t=r.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const e=this.getParent();if(e===null)return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;te(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&st(117),(e=Math.floor(e))>=0||st(199);let t=this.getIndent();for(;t!==e;)t<e?(Ld(this),t++):(Rd(this),t--);return this}canInsertAfter(e){return te(e)}canReplaceWith(e){return te(e)}canMergeWith(e){return Mn(e)||te(e)}extractWithChild(e,t){if(!A(t))return!1;const r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return ke("bullet")}canMergeWhenEmpty(){return!0}};function dl(n,e,t){const r=[],i=[],s=e.list,o=s?s.listitem:void 0;let a;if(s&&s.nested&&(a=s.nested.listitem),o!==void 0&&r.push(...Br(o)),s){const l=t.getParent(),u=B(l)&&l.getListType()==="check",c=t.getChecked();u&&!c||i.push(s.listitemUnchecked),u&&c||i.push(s.listitemChecked),u&&r.push(c?s.listitemChecked:s.listitemUnchecked)}if(a!==void 0){const l=Br(a);t.getChildren().some(u=>B(u))?r.push(...l):i.push(...l)}i.length>0&&Or(n,...i),r.length>0&&Pe(n,...r)}function fl(n,e,t,r){B(e.getFirstChild())?(n.removeAttribute("role"),n.removeAttribute("tabIndex"),n.removeAttribute("aria-checked")):(n.setAttribute("role","checkbox"),n.setAttribute("tabIndex","-1"),t&&e.__checked===t.__checked||n.setAttribute("aria-checked",e.getChecked()?"true":"false"))}function Dd(n){if(n.classList.contains("task-list-item")){for(const t of n.children)if(t.tagName==="INPUT")return $d(t)}const e=n.getAttribute("aria-checked");return{node:Le(e==="true"||e!=="false"&&void 0)}}function $d(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:Le(n.hasAttribute("checked"))}}function Le(n){return ve(new Dt(void 0,n))}function te(n){return n instanceof Dt}let $t=class lu extends Me{static getType(){return"list"}static clone(e){const t=e.__listType||pl[e.__tag];return new lu(t,e.__start,e.__key)}constructor(e,t,r){super(r);const i=pl[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){const t=this.getWritable();t.__listType=e,t.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,t){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,gl(i,e.theme,this),i}updateDOM(e,t,r){return e.__tag!==this.__tag||(gl(t,r.theme,this),!1)}static transform(){return e=>{B(e)||st(163),function(t){const r=t.getNextSibling();B(r)&&t.getListType()===r.getListType()&&_s(t,r)}(e),function(t){const r=t.getListType()!=="check";let i=t.getStart();for(const s of t.getChildren())te(s)&&(s.getValue()!==i&&s.setValue(i),r&&s.getLatest().__checked!=null&&s.setChecked(void 0),B(s.getFirstChild())||i++)}(e)}}static importDOM(){return{ol:()=>({conversion:hl,priority:0}),ul:()=>({conversion:hl,priority:0})}}static importJSON(e){const t=ke(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){const{element:t}=super.exportDOM(e);return t&&nt(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let t=0;t<e.length;t++){const r=e[t];if(te(r))super.append(r);else{const i=Le();if(B(r))i.append(r);else if(T(r)){const s=se(r.getTextContent());i.append(s)}else i.append(r);super.append(i)}}return this}extractWithChild(e){return te(e)}};function gl(n,e,t){const r=[],i=[],s=e.list;if(s!==void 0){const o=s[`${t.__tag}Depth`]||[],a=ps(t)-1,l=a%o.length,u=o[l],c=s[t.__tag];let f;const d=s.nested,g=s.checklist;if(d!==void 0&&d.list&&(f=d.list),c!==void 0&&r.push(c),g!==void 0&&t.__listType==="check"&&r.push(g),u!==void 0){r.push(...Br(u));for(let h=0;h<o.length;h++)h!==l&&i.push(t.__tag+h)}if(f!==void 0){const h=Br(f);a>1?r.push(...h):i.push(...h)}}i.length>0&&Or(n,...i),r.length>0&&Pe(n,...r)}function Md(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t];if(te(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach(s=>{B(s)&&e.push(al(s))})}else e.push(al(r))}return e}function hl(n){const e=n.nodeName.toLowerCase();let t=null;return e==="ol"?t=ke("number",n.start):e==="ul"&&(t=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(nt(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(n)?ke("check"):ke("bullet")),{after:Md,node:t}}const pl={ol:"number",ul:"bullet"};function ke(n,e=1){return ve(new $t(n,e))}function B(n){return n instanceof $t}const ml=dn(),_l=dn(),ys=dn();var jd={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
43
+ * Prism: Lightweight, robust, elegant syntax highlighting
44
+ *
45
+ * @license MIT <https://opensource.org/licenses/MIT>
46
+ * @author Lea Verou <https://lea.verou.me>
47
+ * @namespace
48
+ * @public
49
+ */var t=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function p(y){return y instanceof l?new l(y.type,p(y.content),y.alias):Array.isArray(y)?y.map(p):y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(p){return Object.prototype.toString.call(p).slice(8,-1)},objId:function(p){return p.__id||Object.defineProperty(p,"__id",{value:++s}),p.__id},clone:function p(y,x){x=x||{};var w,S;switch(a.util.type(y)){case"Object":if(S=a.util.objId(y),x[S])return x[S];w={},x[S]=w;for(var C in y)y.hasOwnProperty(C)&&(w[C]=p(y[C],x));return w;case"Array":return S=a.util.objId(y),x[S]?x[S]:(w=[],x[S]=w,y.forEach(function(k,E){w[E]=p(k,x)}),w);default:return y}},getLanguage:function(p){for(;p;){var y=i.exec(p.className);if(y)return y[1].toLowerCase();p=p.parentElement}return"none"},setLanguage:function(p,y){p.className=p.className.replace(RegExp(i,"gi"),""),p.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(w){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(p){var y=document.getElementsByTagName("script");for(var x in y)if(y[x].src==p)return y[x]}return null}},isActive:function(p,y,x){for(var w="no-"+y;p;){var S=p.classList;if(S.contains(y))return!0;if(S.contains(w))return!1;p=p.parentElement}return!!x}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(p,y){var x=a.util.clone(a.languages[p]);for(var w in y)x[w]=y[w];return x},insertBefore:function(p,y,x,w){w=w||a.languages;var S=w[p],C={};for(var k in S)if(S.hasOwnProperty(k)){if(k==y)for(var E in x)x.hasOwnProperty(E)&&(C[E]=x[E]);x.hasOwnProperty(k)||(C[k]=S[k])}var I=w[p];return w[p]=C,a.languages.DFS(a.languages,function(M,K){K===I&&M!=p&&(this[M]=C)}),C},DFS:function p(y,x,w,S){S=S||{};var C=a.util.objId;for(var k in y)if(y.hasOwnProperty(k)){x.call(y,k,y[k],w||k);var E=y[k],I=a.util.type(E);I==="Object"&&!S[C(E)]?(S[C(E)]=!0,p(E,x,null,S)):I==="Array"&&!S[C(E)]&&(S[C(E)]=!0,p(E,x,k,S))}}},plugins:{},highlightAll:function(p,y){a.highlightAllUnder(document,p,y)},highlightAllUnder:function(p,y,x){var w={callback:x,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),a.hooks.run("before-all-elements-highlight",w);for(var S=0,C;C=w.elements[S++];)a.highlightElement(C,y===!0,w.callback)},highlightElement:function(p,y,x){var w=a.util.getLanguage(p),S=a.languages[w];a.util.setLanguage(p,w);var C=p.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(C,w);var k=p.textContent,E={element:p,language:w,grammar:S,code:k};function I(K){E.highlightedCode=K,a.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,a.hooks.run("after-highlight",E),a.hooks.run("complete",E),x&&x.call(E.element)}if(a.hooks.run("before-sanity-check",E),C=E.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!E.code){a.hooks.run("complete",E),x&&x.call(E.element);return}if(a.hooks.run("before-highlight",E),!E.grammar){I(a.util.encode(E.code));return}if(y&&r.Worker){var M=new Worker(a.filename);M.onmessage=function(K){I(K.data)},M.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else I(a.highlight(E.code,E.grammar,E.language))},highlight:function(p,y,x){var w={code:p,grammar:y,language:x};if(a.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=a.tokenize(w.code,w.grammar),a.hooks.run("after-tokenize",w),l.stringify(a.util.encode(w.tokens),w.language)},tokenize:function(p,y){var x=y.rest;if(x){for(var w in x)y[w]=x[w];delete y.rest}var S=new f;return d(S,S.head,p),c(p,S,y,S.head,0),h(S)},hooks:{all:{},add:function(p,y){var x=a.hooks.all;x[p]=x[p]||[],x[p].push(y)},run:function(p,y){var x=a.hooks.all[p];if(!(!x||!x.length))for(var w=0,S;S=x[w++];)S(y)}},Token:l};r.Prism=a;function l(p,y,x,w){this.type=p,this.content=y,this.alias=x,this.length=(w||"").length|0}l.stringify=function p(y,x){if(typeof y=="string")return y;if(Array.isArray(y)){var w="";return y.forEach(function(I){w+=p(I,x)}),w}var S={type:y.type,content:p(y.content,x),tag:"span",classes:["token",y.type],attributes:{},language:x},C=y.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(S.classes,C):S.classes.push(C)),a.hooks.run("wrap",S);var k="";for(var E in S.attributes)k+=" "+E+'="'+(S.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+k+">"+S.content+"</"+S.tag+">"};function u(p,y,x,w){p.lastIndex=y;var S=p.exec(x);if(S&&w&&S[1]){var C=S[1].length;S.index+=C,S[0]=S[0].slice(C)}return S}function c(p,y,x,w,S,C){for(var k in x)if(!(!x.hasOwnProperty(k)||!x[k])){var E=x[k];E=Array.isArray(E)?E:[E];for(var I=0;I<E.length;++I){if(C&&C.cause==k+","+I)return;var M=E[I],K=M.inside,G=!!M.lookbehind,z=!!M.greedy,U=M.alias;if(z&&!M.pattern.global){var W=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,W+"g")}for(var Y=M.pattern||M,J=w.next,fe=S;J!==y.tail&&!(C&&fe>=C.reach);fe+=J.value.length,J=J.next){var je=J.value;if(y.length>p.length)return;if(!(je instanceof l)){var ze=1,ue;if(z){if(ue=u(Y,fe,p,G),!ue||ue.index>=p.length)break;var be=ue.index,Be=ue.index+ue[0].length,ye=fe;for(ye+=J.value.length;be>=ye;)J=J.next,ye+=J.value.length;if(ye-=J.value.length,fe=ye,J.value instanceof l)continue;for(var Ke=J;Ke!==y.tail&&(ye<Be||typeof Ke.value=="string");Ke=Ke.next)ze++,ye+=Ke.value.length;ze--,je=p.slice(fe,ye),ue.index-=fe}else if(ue=u(Y,0,je,G),!ue)continue;var be=ue.index,He=ue[0],Re=je.slice(0,be),Qe=je.slice(be+He.length),et=fe+je.length;C&&et>C.reach&&(C.reach=et);var an=J.prev;Re&&(an=d(y,an,Re),fe+=Re.length),g(y,an,ze);var Vr=new l(k,K?a.tokenize(He,K):He,U,He);if(J=d(y,an,Vr),Qe&&d(y,J,Qe),ze>1){var ln={cause:k+","+I,reach:et};c(p,y,x,J.prev,fe,ln),C&&ln.reach>C.reach&&(C.reach=ln.reach)}}}}}}function f(){var p={value:null,prev:null,next:null},y={value:null,prev:p,next:null};p.next=y,this.head=p,this.tail=y,this.length=0}function d(p,y,x){var w=y.next,S={value:x,prev:y,next:w};return y.next=S,w.prev=S,p.length++,S}function g(p,y,x){for(var w=y.next,S=0;S<x&&w!==p.tail;S++)w=w.next;y.next=w,w.prev=y,p.length-=S}function h(p){for(var y=[],x=p.head.next;x!==p.tail;)y.push(x.value),x=x.next;return y}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(p){var y=JSON.parse(p.data),x=y.language,w=y.code,S=y.immediateClose;r.postMessage(a.highlight(w,a.languages[x],x)),S&&r.close()},!1)),a;var m=a.util.currentScript();m&&(a.filename=m.src,m.hasAttribute("data-manual")&&(a.manual=!0));function _(){a.manual||a.highlightAll()}if(!a.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return a}(e);n.exports&&(n.exports=t),typeof Ds<"u"&&(Ds.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};a["language-"+s]={pattern:/[\s\S]+/,inside:t.languages[s]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(r,i){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:t.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,_){return"✖ Error "+m+" while fetching file: "+_},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",u="loaded",c="failed",f="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+l+'"])';function d(m,_,b){var p=new XMLHttpRequest;p.open("GET",m,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?_(p.responseText):p.status>=400?b(i(p.status,p.statusText)):b(s))},p.send(null)}function g(m){var _=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(_){var b=Number(_[1]),p=_[2],y=_[3];return p?y?[b,Number(y)]:[b,void 0]:[b,b]}}t.hooks.add("before-highlightall",function(m){m.selector+=", "+f}),t.hooks.add("before-sanity-check",function(m){var _=m.element;if(_.matches(f)){m.code="",_.setAttribute(a,l);var b=_.appendChild(document.createElement("CODE"));b.textContent=r;var p=_.getAttribute("data-src"),y=m.language;if(y==="none"){var x=(/\.(\w+)$/.exec(p)||[,"none"])[1];y=o[x]||x}t.util.setLanguage(b,y),t.util.setLanguage(_,y);var w=t.plugins.autoloader;w&&w.loadLanguages(y),d(p,function(S){_.setAttribute(a,u);var C=g(_.getAttribute("data-range"));if(C){var k=S.split(/\r\n?|\n/g),E=C[0],I=C[1]==null?k.length:C[1];E<0&&(E+=k.length),E=Math.max(0,Math.min(E-1,k.length)),I<0&&(I+=k.length),I=Math.max(0,Math.min(I,k.length)),S=k.slice(E,I).join(`
50
+ `),_.hasAttribute("data-start")||_.setAttribute("data-start",String(E+1))}b.textContent=S,t.highlightElement(b)},function(S){_.setAttribute(a,c),b.textContent=S})}}),t.plugins.fileHighlight={highlight:function(_){for(var b=(_||document).querySelectorAll(f),p=0,y;y=b[p++];)t.highlightElement(y)}};var h=!1;t.fileHighlight=function(){h||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),h=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(jd),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(n){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(c){return c=c.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(n.languages.markdown[c].inside.content.inside[f]=n.languages.markdown[f])})}),n.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function f(d){if(!(!d||typeof d=="string"))for(var g=0,h=d.length;g<h;g++){var m=d[g];if(m.type!=="code"){f(m.content);continue}var _=m.content[1],b=m.content[3];if(_&&b&&_.type==="code-language"&&b.type==="code-block"&&typeof _.content=="string"){var p=_.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");p=(/[a-z][\w-]*/i.exec(p)||[""])[0].toLowerCase();var y="language-"+p;b.alias?typeof b.alias=="string"?b.alias=[b.alias,y]:b.alias.push(y):b.alias=[y]}}}f(c.tokens)}),n.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,g=c.classes.length;d<g;d++){var h=c.classes[d],m=/language-(.+)/.exec(h);if(m){f=m[1];break}}var _=n.languages[f];if(_)c.content=n.highlight(u(c.content),_,f);else if(f&&f!=="none"&&n.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=b,n.plugins.autoloader.loadLanguages(f,function(){var p=document.getElementById(b);p&&(p.innerHTML=n.highlight(p.textContent,n.languages[f],f))})}}});var o=RegExp(n.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var f=c.replace(o,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,g){if(g=g.toLowerCase(),g[0]==="#"){var h;return g[1]==="x"?h=parseInt(g.slice(2),16):h=Number(g.slice(1)),l(h)}else{var m=a[g];return m||d}}),f}n.languages.md=n.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(n){var e=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(n){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift}),function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var e=n.languages.extend("typescript",{});delete e["class-name"],n.languages.typescript["class-name"].inside=e,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),n.languages.ts=n.languages.typescript}(Prism),function(n){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(n){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return t})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])}(Prism);function zd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var on=zd(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});const yl=n=>{try{return!!n&&window.Prism.languages.hasOwnProperty(n)}catch{return!1}};function bl(n,e){for(const t of n.childNodes){if(nt(t)&&t.tagName===e)return!0;bl(t,e)}return!1}const Un="data-language",Ur="data-highlight-language";class ht extends Me{static getType(){return"code"}static clone(e){return new ht(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e,this.__isSyntaxHighlightSupported=yl(e)}createDOM(e){const t=document.createElement("code");Pe(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(t.setAttribute(Un,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Ur,r)),t}updateDOM(e,t,r){const i=this.__language,s=e.__language;return i?i!==s&&(t.setAttribute(Un,i),this.__isSyntaxHighlightSupported&&t.setAttribute(Ur,i)):s&&(t.removeAttribute(Un),e.__isSyntaxHighlightSupported&&t.removeAttribute(Ur)),!1}exportDOM(e){const t=document.createElement("pre");Pe(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(t.setAttribute(Un,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Ur,r)),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||bl(e,"BR"))?{conversion:vl,priority:1}:null,div:()=>({conversion:Bd,priority:1}),pre:()=>({conversion:vl,priority:0}),table:e=>bs(e)?{conversion:Ud,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&bs(r)?{conversion:xl,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&bs(t)?{conversion:xl,priority:3}:null}}}static importJSON(e){const t=Mt(e.language);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,t=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
51
+ `&&r[i-2].getTextContent()===`
52
+ `&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const l=ne();return this.insertAfter(l,t),l}const{anchor:s,focus:o}=e,a=(s.isBefore(o)?s:o).getNode();if(O(a)){let l=zt(a);const u=[];for(;;)if(ge(l))u.push(Ue()),l=l.getNextSibling();else{if(!ie(l))break;{let _=0;const b=l.getTextContent(),p=l.getTextContentSize();for(;_<p&&b[_]===" ";)_++;if(_!==0&&u.push(xs(" ".repeat(_))),_!==p)break;l=l.getNextSibling()}}const c=a.splitText(s.offset)[0],f=s.offset===0?0:1,d=c.getIndexWithinParent()+f,g=a.getParentOrThrow(),h=[Ye(),...u];g.splice(d,0,h);const m=u[u.length-1];m?m.select():s.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(Te(a)){const{offset:l}=e.anchor;a.splice(l,0,[Ye()]),a.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const e=ne();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){const t=this.getWritable();t.__language=e,t.__isSyntaxHighlightSupported=yl(e)}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function Mt(n){return ve(new ht(n))}function Te(n){return n instanceof ht}function vl(n){return{node:Mt(n.getAttribute(Un))}}function Bd(n){const e=n,t=Sl(e);return t||function(r){let i=r.parentElement;for(;i!==null;){if(Sl(i))return!0;i=i.parentElement}return!1}(e)?{node:t?Mt():null}:{node:null}}function Ud(){return{node:Mt()}}function xl(){return{node:null}}function Sl(n){return n.style.fontFamily.match("monospace")!==null}function bs(n){return n.classList.contains("js-file-line-container")}const wl="javascript",Wd=()=>wl,Kd=()=>Object.keys(window.Prism.languages).filter(n=>typeof window.Prism.languages[n]!="function").sort();class jt extends ft{constructor(e,t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new jt(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e),r=vs(e.theme,this.__highlightType);return Pe(t,r),t}updateDOM(e,t,r){const i=super.updateDOM(e,t,r),s=vs(r.theme,e.__highlightType),o=vs(r.theme,this.__highlightType);return s!==o&&(s&&Or(t,s),o&&Pe(t,o)),i}static importJSON(e){const t=xs(e.text,e.highlightType);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Mt()}}function vs(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function xs(n,e){return ve(new jt(n,e))}function ie(n){return n instanceof jt}function zt(n){let e=n,t=n;for(;ie(t)||ge(t);)e=t,t=t.getPreviousSibling();return e}function Wn(n){let e=n,t=n;for(;ie(t)||ge(t);)e=t,t=t.getNextSibling();return e}const Hd={defaultLanguage:wl,tokenize(n,e){return window.Prism.tokenize(n,window.Prism.languages[e||""]||window.Prism.languages[this.defaultLanguage])}};function Jd(n,e){let t=null,r=null,i=n,s=e,o=n.getTextContent();for(;;){if(s===0){if(i=i.getPreviousSibling(),i===null)break;if(ie(i)||ge(i)||Z(i)||on(167),Z(i)){t={node:i,offset:1};break}s=Math.max(0,i.getTextContentSize()-1),o=i.getTextContent()}else s--;const l=o[s];ie(i)&&l!==" "&&(r={node:i,offset:s})}if(r!==null)return r;let a=null;if(e<n.getTextContentSize())ie(n)&&(a=n.getTextContent()[e]);else{const l=n.getNextSibling();ie(l)&&(a=l.getTextContent()[0])}if(a!==null&&a!==" ")return t;{const l=function(u,c){let f=u,d=c,g=u.getTextContent(),h=u.getTextContentSize();for(;;){if(!ie(f)||d===h){if(f=f.getNextSibling(),f===null||Z(f))return null;ie(f)&&(d=0,g=f.getTextContent(),h=f.getTextContentSize())}if(ie(f)){if(g[d]!==" ")return{node:f,offset:d};d++}}}(n,e);return l!==null?l:t}}function Vd(n){const e=Wn(n);return Z(e)&&on(168),e}function Cl(n,e,t){const r=n.getParent();Te(r)?El(r,e,t):ie(n)&&n.replace(se(n.__text))}function qd(n,e){const t=e.getElementByKey(n.getKey());if(t===null)return;const r=n.getChildren(),i=r.length;if(i===t.__cachedChildrenLength)return;t.__cachedChildrenLength=i;let s="1",o=1;for(let a=0;a<i;a++)Z(r[a])&&(s+=`
53
+ `+ ++o);t.setAttribute("data-gutter",s)}const Ss=new Set;function El(n,e,t){const r=n.getKey();Ss.has(r)||(Ss.add(r),n.getLanguage()===void 0&&n.setLanguage(t.defaultLanguage),e.update(()=>{(function(i,s){const o=ae(i);if(!Te(o)||!o.isAttached())return;const a=P();if(!A(a))return void s();const l=a.anchor,u=l.offset,c=l.type==="element"&&Z(o.getChildAtIndex(l.offset-1));let f=0;if(!c){const d=l.getNode();f=u+d.getPreviousSiblings().reduce((g,h)=>g+h.getTextContentSize(),0)}if(s()){if(c)return void l.getNode().select(u,u);o.getChildren().some(d=>{const g=O(d);if(g||Z(d)){const h=d.getTextContentSize();if(g&&h>=f)return d.select(f,f),!0;f-=h}return!1})}})(r,()=>{const i=ae(r);if(!Te(i)||!i.isAttached())return!1;const s=i.getTextContent(),o=ws(t.tokenize(s,i.getLanguage()||t.defaultLanguage)),a=function(f,d){let g=0;for(;g<f.length&&kl(f[g],d[g]);)g++;const h=f.length,m=d.length,_=Math.min(h,m)-g;let b=0;for(;b<_;)if(b++,!kl(f[h-b],d[m-b])){b--;break}const p=g,y=h-b,x=d.slice(g,m-b);return{from:p,nodesForReplacement:x,to:y}}(i.getChildren(),o),{from:l,to:u,nodesForReplacement:c}=a;return!(l===u&&!c.length)&&(n.splice(l,u-l,c),!0)})},{onUpdate:()=>{Ss.delete(r)},skipTransforms:!0}))}function ws(n,e){const t=[];for(const r of n)if(typeof r=="string"){const i=r.split(/(\n|\t)/),s=i.length;for(let o=0;o<s;o++){const a=i[o];a===`
54
+ `||a===`\r
55
+ `?t.push(Ye()):a===" "?t.push(Ue()):a.length>0&&t.push(xs(a,e))}}else{const{content:i}=r;typeof i=="string"?t.push(...ws([i],r.type)):Array.isArray(i)&&t.push(...ws(i,r.type))}return t}function kl(n,e){return ie(n)&&ie(e)&&n.__text===e.__text&&n.__highlightType===e.__highlightType||ge(n)&&ge(e)||Z(n)&&Z(e)}function Wr(n){if(!A(n))return!1;const e=n.anchor.getNode(),t=n.focus.getNode();if(e.is(t)&&Te(e))return!0;const r=e.getParent();return Te(r)&&r.is(t.getParent())}function Tl(n){const e=n.getNodes(),t=[[]];if(e.length===1&&Te(e[0]))return t;let r=t[0];for(let i=0;i<e.length;i++){const s=e[i];ie(s)||ge(s)||Z(s)||on(169),Z(s)?i!==0&&r.length>0&&(r=[],t.push(r)):r.push(s)}return t}function Nl(n){const e=P();if(!A(e)||!Wr(e))return!1;const t=Tl(e),r=t.length;if(t.length>1){for(let o=0;o<r;o++){const a=t[o];if(a.length>0){let l=a[0];o===0&&(l=zt(l)),l!==null&&(n===yt?l.insertBefore(Ue()):ge(l)&&l.remove())}}return!0}const i=e.getNodes()[0];if(Te(i)||ie(i)||ge(i)||Z(i)||on(171),Te(i))return n===yt&&e.insertNodes([Ue()]),!0;const s=zt(i);return s===null&&on(172),n===yt?Z(s)?s.insertAfter(Ue()):s.insertBefore(Ue()):ge(s)&&s.remove(),!0}function Al(n,e){const t=P();if(!A(t))return!1;const{anchor:r,focus:i}=t,s=r.offset,o=i.offset,a=r.getNode(),l=i.getNode(),u=n===Kt;if(!Wr(t)||!ie(a)&&!ge(a)||!ie(l)&&!ge(l))return!1;if(!e.altKey){if(t.isCollapsed()){const b=a.getParentOrThrow();if(u&&s===0&&a.getPreviousSibling()===null){if(b.getPreviousSibling()===null)return b.selectPrevious(),e.preventDefault(),!0}else if(!u&&s===a.getTextContentSize()&&a.getNextSibling()===null&&b.getNextSibling()===null)return b.selectNext(),e.preventDefault(),!0}return!1}let c,f;if(a.isBefore(l)?(c=zt(a),f=Wn(l)):(c=zt(l),f=Wn(a)),c==null||f==null)return!1;const d=c.getNodesBetween(f);for(let b=0;b<d.length;b++){const p=d[b];if(!ie(p)&&!ge(p)&&!Z(p))return!1}e.preventDefault(),e.stopPropagation();const g=u?c.getPreviousSibling():f.getNextSibling();if(!Z(g))return!0;const h=u?g.getPreviousSibling():g.getNextSibling();if(h==null)return!0;const m=ie(h)||ge(h)||Z(h)?u?zt(h):Wn(h):null;let _=m??h;return g.remove(),d.forEach(b=>b.remove()),n===Kt?(d.forEach(b=>_.insertBefore(b)),_.insertBefore(g)):(_.insertAfter(g),_=g,d.forEach(b=>{_.insertAfter(b),_=b})),t.setTextNodeRange(a,s,l,o),!0}function Fl(n,e){const t=P();if(!A(t))return!1;const{anchor:r,focus:i}=t,s=r.getNode(),o=i.getNode(),a=n===Yn;if(!ie(s)&&!ge(s)||!ie(o)&&!ge(o))return!1;if(a){const l=Jd(o,i.offset);if(l!==null){const{node:u,offset:c}=l;Z(u)?u.selectNext(0,0):t.setTextNodeRange(u,c,u,c)}else o.getParentOrThrow().selectStart()}else Vd(o).select();return e.preventDefault(),e.stopPropagation(),!0}function Gd(n,e){if(!n.hasNodes([ht,jt]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return e==null&&(e=Hd),We(n.registerMutationListener(ht,t=>{n.update(()=>{for(const[r,i]of t)if(i!=="destroyed"){const s=ae(r);s!==null&&qd(s,n)}})},{skipInitialization:!1}),n.registerNodeTransform(ht,t=>El(t,n,e)),n.registerNodeTransform(ft,t=>Cl(t,n,e)),n.registerNodeTransform(jt,t=>Cl(t,n,e)),n.registerCommand(Hs,t=>{const r=function(i){const s=P();if(!A(s)||!Wr(s))return null;const o=i?Ht:yt,a=i?Ht:si;if(Tl(s).length>1)return o;const l=s.getNodes()[0];if(Te(l)||ie(l)||ge(l)||Z(l)||on(170),Te(l))return o;const u=zt(l),c=Wn(l),f=s.anchor,d=s.focus;let g,h;return d.isBefore(f)?(g=d,h=f):(g=f,h=d),u!==null&&c!==null&&g.key===u.getKey()&&g.offset===0&&h.key===c.getKey()&&h.offset===c.getTextContentSize()?o:a}(t.shiftKey);return r!==null&&(t.preventDefault(),n.dispatchCommand(r,void 0),!0)},me),n.registerCommand(si,()=>!!Wr(P())&&(oa([Ue()]),!0),me),n.registerCommand(yt,t=>Nl(yt),me),n.registerCommand(Ht,t=>Nl(Ht),me),n.registerCommand(Kt,t=>Al(Kt,t),me),n.registerCommand(Zn,t=>Al(Zn,t),me),n.registerCommand(ni,t=>Fl(ni,t),me),n.registerCommand(Yn,t=>Fl(Yn,t),me))}const Kr=1,Yd=new Set(["paragraph","quote","code","h1","h2","ul","ol"]),Zd={code:"Code Block",h1:"Large Heading",h2:"Small Heading",h3:"Heading",h4:"Heading",h5:"Heading",ol:"Numbered List",paragraph:"Normal",quote:"Quote",ul:"Bulleted List"};function Cs(){return N.jsx("div",{className:"divider"})}function Ol(n,e){e===null?(n.style.opacity="0",n.style.top="-1000px",n.style.left="-1000px"):(n.style.opacity="1",n.style.top=`${e.top+e.height+window.pageYOffset+10}px`,n.style.left=`${e.left+window.pageXOffset-n.offsetWidth/2+e.width/2}px`)}function Xd({editor:n}){const e=L.useRef(null),t=L.useRef(null),r=L.useRef(!1),[i,s]=L.useState(""),[o,a]=L.useState(!1),[l,u]=L.useState(null),c=L.useCallback(()=>{const f=P();if(A(f)){const _=Pl(f),b=_.getParent();Xe(b)?s(b.getURL()):Xe(_)?s(_.getURL()):s("")}const d=e.current,g=window.getSelection(),h=document.activeElement;if(d===null)return;const m=n.getRootElement();if(f!==null&&!g.isCollapsed&&m!==null&&m.contains(g.anchorNode)){const _=g.getRangeAt(0);let b;if(g.anchorNode===m){let p=m;for(;p.firstElementChild!=null;)p=p.firstElementChild;b=p.getBoundingClientRect()}else b=_.getBoundingClientRect();r.current||Ol(d,b),u(f)}else(!h||h.className!=="link-input")&&(Ol(d,null),u(null),a(!1),s(""));return!0},[n]);return L.useEffect(()=>We(n.registerUpdateListener(({editorState:f})=>{f.read(()=>{c()})}),n.registerCommand(fn,()=>(c(),!0),Kr)),[n,c]),L.useEffect(()=>{n.getEditorState().read(()=>{c()})},[n,c]),L.useEffect(()=>{o&&t.current&&t.current.focus()},[o]),N.jsx("div",{ref:e,className:"link-editor",children:o?N.jsx("input",{ref:t,className:"link-input",value:i,onChange:f=>{s(f.target.value)},onKeyDown:f=>{f.key==="Enter"?(f.preventDefault(),l!==null&&(i!==""&&n.dispatchCommand(sn,i),a(!1))):f.key==="Escape"&&(f.preventDefault(),a(!1))}}):N.jsx(N.Fragment,{children:N.jsxs("div",{className:"link-input",children:[N.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:i}),N.jsx("div",{className:"link-edit",role:"button",tabIndex:0,onMouseDown:f=>f.preventDefault(),onClick:()=>{a(!0)}})]})})})}function Qd({onChange:n,className:e,options:t,value:r}){return N.jsxs("select",{className:e,onChange:n,value:r,children:[N.jsx("option",{hidden:!0,value:""}),t.map(i=>N.jsx("option",{value:i,children:i},i))]})}function Pl(n){const e=n.anchor,t=n.focus,r=n.anchor.getNode(),i=n.focus.getNode();return r===i?r:n.isBackward()?Ca(t)?r:i:Ca(e)?i:r}function ef({editor:n,blockType:e,toolbarRef:t,setShowBlockOptionsDropDown:r}){const i=L.useRef(null);L.useEffect(()=>{const d=t.current,g=i.current;if(d!==null&&g!==null){const{top:h,left:m}=d.getBoundingClientRect();g.style.top=`${h+40}px`,g.style.left=`${m}px`}},[i,t]),L.useEffect(()=>{const d=i.current,g=t.current;if(d!==null&&g!==null){const h=m=>{const _=m.target;!d.contains(_)&&!g.contains(_)&&r(!1)};return document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}}},[i,r,t]);const s=()=>{e!=="paragraph"&&n.update(()=>{const d=P();A(d)&&jn(d,()=>ne())}),r(!1)},o=()=>{e!=="h1"&&n.update(()=>{const d=P();A(d)&&jn(d,()=>Nt("h1"))}),r(!1)},a=()=>{e!=="h2"&&n.update(()=>{const d=P();A(d)&&jn(d,()=>Nt("h2"))}),r(!1)},l=()=>{e!=="ul"?n.dispatchCommand(ml):n.dispatchCommand(ys),r(!1)},u=()=>{e!=="ol"?n.dispatchCommand(_l):n.dispatchCommand(ys),r(!1)},c=()=>{e!=="quote"&&n.update(()=>{const d=P();A(d)&&jn(d,()=>Rr())}),r(!1)},f=()=>{e!=="code"&&n.update(()=>{const d=P();A(d)&&jn(d,()=>Mt())}),r(!1)};return N.jsxs("div",{className:"dropdown",ref:i,children:[N.jsxs("button",{className:"item",onClick:s,children:[N.jsx("span",{className:"icon paragraph"}),N.jsx("span",{className:"text",children:"Normal"}),e==="paragraph"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:o,children:[N.jsx("span",{className:"icon large-heading"}),N.jsx("span",{className:"text",children:"Large Heading"}),e==="h1"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:a,children:[N.jsx("span",{className:"icon small-heading"}),N.jsx("span",{className:"text",children:"Small Heading"}),e==="h2"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:l,children:[N.jsx("span",{className:"icon bullet-list"}),N.jsx("span",{className:"text",children:"Bullet List"}),e==="ul"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:u,children:[N.jsx("span",{className:"icon numbered-list"}),N.jsx("span",{className:"text",children:"Numbered List"}),e==="ol"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:c,children:[N.jsx("span",{className:"icon quote"}),N.jsx("span",{className:"text",children:"Quote"}),e==="quote"&&N.jsx("span",{className:"active"})]}),N.jsxs("button",{className:"item",onClick:f,children:[N.jsx("span",{className:"icon code"}),N.jsx("span",{className:"text",children:"Code Block"}),e==="code"&&N.jsx("span",{className:"active"})]})]})}function tf(){const[n]=we(),e=L.useRef(null),[t,r]=L.useState(!1),[i,s]=L.useState(!1),[o,a]=L.useState("paragraph"),[l,u]=L.useState(null),[c,f]=L.useState(!1),[d,g]=L.useState(""),[h,m]=L.useState(!1),[_,b]=L.useState(!1),[p,y]=L.useState(!1),[x,w]=L.useState(!1),[S,C]=L.useState(!1),[k,E]=L.useState(!1),[I,M]=L.useState(!1),K=L.useCallback(()=>{const W=P();if(A(W)){const Y=W.anchor.getNode(),J=Y.getKey()==="root"?Y:Y.getTopLevelElementOrThrow(),fe=J.getKey();if(n.getElementByKey(fe)!==null)if(u(fe),B(J)){const Be=Oa(Y,$t),ye=Be?Be.getTag():J.getTag();a(ye)}else{const Be=Ha(J)?J.getTag():J.getType();a(Be),Te(J)&&g(J.getLanguage()||Wd())}y(W.hasFormat("bold")),w(W.hasFormat("italic")),C(W.hasFormat("underline")),E(W.hasFormat("strikethrough")),M(W.hasFormat("code")),m(Ta(W));const ze=Pl(W),ue=ze.getParent();Xe(ue)||Xe(ze)?b(!0):b(!1)}},[n]);L.useEffect(()=>We(n.registerUpdateListener(({editorState:W})=>{W.read(()=>{K()})}),n.registerCommand(fn,(W,Y)=>(K(),!1),Kr),n.registerCommand(yn,W=>(r(W),!1),Kr),n.registerCommand(_n,W=>(s(W),!1),Kr)),[n,K]);const G=L.useMemo(()=>Kd(),[]),z=L.useCallback(W=>{n.update(()=>{if(l!==null){const Y=ae(l);Te(Y)&&Y.setLanguage(W.target.value)}})},[n,l]),U=L.useCallback(()=>{_?n.dispatchCommand(sn,null):n.dispatchCommand(sn,"https://")},[n,_]);return N.jsxs("div",{className:"toolbar",ref:e,children:[N.jsx("button",{disabled:!t,onClick:()=>{n.dispatchCommand(qn)},className:"toolbar-item spaced","aria-label":"Undo",children:N.jsx("i",{className:"format undo"})}),N.jsx("button",{disabled:!i,onClick:()=>{n.dispatchCommand(Gn)},className:"toolbar-item","aria-label":"Redo",children:N.jsx("i",{className:"format redo"})}),N.jsx(Cs,{}),Yd.has(o)&&N.jsxs(N.Fragment,{children:[N.jsxs("button",{className:"toolbar-item block-controls",onClick:()=>f(!c),"aria-label":"Formatting Options",children:[N.jsx("span",{className:"icon block-type "+o}),N.jsx("span",{className:"text",children:Zd[o]}),N.jsx("i",{className:"chevron-down"})]}),c&&Jn.createPortal(N.jsx(ef,{editor:n,blockType:o,toolbarRef:e,setShowBlockOptionsDropDown:f}),document.body),N.jsx(Cs,{})]}),o==="code"?N.jsxs(N.Fragment,{children:[N.jsx(Qd,{className:"toolbar-item code-language",onChange:z,options:G,value:d}),N.jsx("i",{className:"chevron-down inside"})]}):N.jsxs(N.Fragment,{children:[N.jsx("button",{onClick:()=>{n.dispatchCommand(Ie,"bold")},className:"toolbar-item spaced "+(p?"active":""),"aria-label":"Format Bold",children:N.jsx("i",{className:"format bold"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(Ie,"italic")},className:"toolbar-item spaced "+(x?"active":""),"aria-label":"Format Italics",children:N.jsx("i",{className:"format italic"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(Ie,"underline")},className:"toolbar-item spaced "+(S?"active":""),"aria-label":"Format Underline",children:N.jsx("i",{className:"format underline"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(Ie,"strikethrough")},className:"toolbar-item spaced "+(k?"active":""),"aria-label":"Format Strikethrough",children:N.jsx("i",{className:"format strikethrough"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(Ie,"code")},className:"toolbar-item spaced "+(I?"active":""),"aria-label":"Insert Code",children:N.jsx("i",{className:"format code"})}),N.jsx("button",{onClick:U,className:"toolbar-item spaced "+(_?"active":""),"aria-label":"Insert Link",children:N.jsx("i",{className:"format link"})}),_&&Jn.createPortal(N.jsx(Xd,{editor:n}),document.body),N.jsx(Cs,{}),N.jsx("button",{onClick:()=>{n.dispatchCommand(mn,"left")},className:"toolbar-item spaced","aria-label":"Left Align",children:N.jsx("i",{className:"format left-align"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(mn,"center")},className:"toolbar-item spaced","aria-label":"Center Align",children:N.jsx("i",{className:"format center-align"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(mn,"right")},className:"toolbar-item spaced","aria-label":"Right Align",children:N.jsx("i",{className:"format right-align"})}),N.jsx("button",{onClick:()=>{n.dispatchCommand(mn,"justify")},className:"toolbar-item","aria-label":"Justify Align",children:N.jsx("i",{className:"format justify-align"})})," "]})]})}function nf({validateUrl:n}){const[e]=we();return L.useEffect(()=>{if(!e.hasNodes([At]))throw new Error("LinkPlugin: LinkNode not registered on editor");return We(e.registerCommand(sn,t=>{if(t===null)return gs(t),!0;if(typeof t=="string")return!(n!==void 0&&!n(t))&&(gs(t),!0);{const{url:r,target:i,rel:s,title:o}=t;return gs(r,{rel:s,target:i,title:o}),!0}},me),n!==void 0?e.registerCommand(Vn,t=>{const r=P();if(!A(r)||r.isCollapsed()||!Tt(t,ClipboardEvent))return!1;const i=t;if(i.clipboardData===null)return!1;const s=i.clipboardData.getData("text");return!!n(s)&&!r.getNodes().some(o=>T(o))&&(e.dispatchCommand(sn,s),t.preventDefault(),!0)},me):()=>{})},[e,n]),null}function rf(){const[n]=we();return L.useEffect(()=>{if(!n.hasNodes([$t,Dt]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),function(e){L.useEffect(()=>We(e.registerCommand(_l,()=>(ul(e,"number"),!0),me),e.registerCommand(ml,()=>(ul(e,"bullet"),!0),me),e.registerCommand(ys,()=>(Pd(e),!0),me),e.registerCommand(gn,()=>!!Id(),me)),[e])}(n),null}function Es(n,e){const t={};for(const r of n){const i=e(r);t[i]?t[i].push(r):t[i]=[r]}return t}function sf(n){const e=Es(n,t=>t.type);return{element:e.element||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const Ll=/[!-/:-@[-`{-~\s]/,Rl=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,of=Rl&&"documentMode"in document?document.documentMode:null;Rl&&"InputEvent"in window&&!of&&new window.InputEvent("input");function af(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var lf=af(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Il(n,e,t){const r=t.length;for(let i=e;i>=r;i--){const s=i-r;if(Dl(n,s,t,0,r)&&n[s+r]!==" ")return s}return-1}function Dl(n,e,t,r,i){for(let s=0;s<i;s++)if(n[e+s]!==t[r+s])return!1;return!0}function uf(n,e=Ts){const t=sf(e),r=Es(t.textFormat,({tag:o})=>o[o.length-1]),i=Es(t.textMatch,({trigger:o})=>o);for(const o of e){const a=o.type;if(a==="element"||a==="text-match"){const l=o.dependencies;for(const u of l)n.hasNode(u)||lf(173,u.getType())}}const s=(o,a,l)=>{(function(u,c,f,d){const g=u.getParent();if(!Ae(g)||u.getFirstChild()!==c)return!1;const h=c.getTextContent();if(h[f-1]!==" ")return!1;for(const{regExp:m,replace:_}of d){const b=h.match(m);if(b&&b[0].length===f){const p=c.getNextSiblings(),[y,x]=c.splitText(f);return y.remove(),_(u,x?[x,...p]:p,b,!1),!0}}return!1})(o,a,l,t.element)||function(u,c,f){let d=u.getTextContent();const g=f[d[c-1]];if(g==null)return!1;c<d.length&&(d=d.slice(0,c));for(const h of g){const m=d.match(h.regExp);if(m===null)continue;const _=m.index||0,b=_+m[0].length;let p;return _===0?[p]=u.splitText(b):[,p]=u.splitText(_,b),p.selectNext(0,0),h.replace(p,m),!0}return!1}(a,l,i)||function(u,c,f){const d=u.getTextContent(),g=c-1,h=d[g],m=f[h];if(!m)return!1;for(const _ of m){const{tag:b}=_,p=b.length,y=g-p+1;if(p>1&&!Dl(d,y,b,0,p)||d[y-1]===" ")continue;const x=d[g+1];if(_.intraword===!1&&x&&!Ll.test(x))continue;const w=u;let S=w,C=Il(d,y,b),k=S;for(;C<0&&(k=k.getPreviousSibling())&&!Z(k);)if(O(k)){const Y=k.getTextContent();S=k,C=Il(Y,Y.length,b)}if(C<0||S===w&&C+p===y)continue;const E=S.getTextContent();if(C>0&&E[C-1]===h)continue;const I=E[C-1];if(_.intraword===!1&&I&&!Ll.test(I))continue;const M=w.getTextContent(),K=M.slice(0,y)+M.slice(g+1);w.setTextContent(K);const G=S===w?K:E;S.setTextContent(G.slice(0,C)+G.slice(C+p));const z=P(),U=ra();De(U);const W=g-p*(S===w?2:1)+1;U.anchor.set(S.__key,C,"text"),U.focus.set(w.__key,W,"text");for(const Y of _.format)U.hasFormat(Y)||U.formatText(Y);U.anchor.set(U.focus.key,U.focus.offset,U.focus.type);for(const Y of _.format)U.hasFormat(Y)&&U.toggleFormat(Y);return A(z)&&(U.format=z.format),!0}}(a,l,r)};return n.registerUpdateListener(({tags:o,dirtyLeaves:a,editorState:l,prevEditorState:u})=>{if(o.has("collaboration")||o.has("historic")||n.isComposing())return;const c=l.read(P),f=u.read(P);if(!A(f)||!A(c)||!c.isCollapsed())return;const d=c.anchor.key,g=c.anchor.offset,h=l._nodeMap.get(d);!O(h)||!a.has(d)||g!==1&&g>f.anchor.offset+1||n.update(()=>{if(h.hasFormat("code"))return;const m=h.getParent();m===null||Te(m)||s(m,h,c.anchor.offset)})})}const $l=n=>(e,t,r)=>{const i=n(r);i.append(...t),e.replace(i),i.select(0,0)},Ml=n=>(e,t,r)=>{const i=e.getPreviousSibling(),s=e.getNextSibling(),o=Le(n==="check"?r[3]==="x":void 0);if(B(s)&&s.getListType()===n){const l=s.getFirstChild();l!==null?l.insertBefore(o):s.append(o),e.remove()}else if(B(i)&&i.getListType()===n)i.append(o),e.remove();else{const l=ke(n,n==="number"?Number(r[2]):void 0);l.append(o),e.replace(l)}o.append(...t),o.select(0,0);const a=function(l){const u=l.match(/\t/g),c=l.match(/ /g);let f=0;return u&&(f+=u.length),c&&(f+=Math.floor(c.length/4)),f}(r[1]);a&&o.setIndent(a)},ks=(n,e,t)=>{const r=[],i=n.getChildren();let s=0;for(const o of i)if(te(o)){if(o.getChildrenSize()===1){const c=o.getFirstChild();if(B(c)){r.push(ks(c,e,t+1));continue}}const a=" ".repeat(4*t),l=n.getListType(),u=l==="number"?`${n.getStart()+s}. `:l==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";r.push(a+u+e(o)),s++}return r.join(`
56
+ `)},cf={dependencies:[Ir],export:(n,e)=>{if(!Ha(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:/^(#{1,6})\s/,replace:$l(n=>{const e="h"+n[1].length;return Nt(e)}),type:"element"},df={dependencies:[Lr],export:(n,e)=>{if(!Wa(n))return null;const t=e(n).split(`
57
+ `),r=[];for(const i of t)r.push("> "+i);return r.join(`
58
+ `)},regExp:/^>\s/,replace:(n,e,t,r)=>{if(r){const s=n.getPreviousSibling();if(Wa(s))return s.splice(s.getChildrenSize(),0,[Ye(),...e]),s.select(0,0),void n.remove()}const i=Rr();i.append(...e),n.replace(i),i.select(0,0)},type:"element"},ff={dependencies:[ht],export:n=>{if(!Te(n))return null;const e=n.getTextContent();return"```"+(n.getLanguage()||"")+(e?`
59
+ `+e:"")+"\n```"},regExp:/^[ \t]*```(\w{1,10})?\s/,replace:$l(n=>Mt(n?n[1]:void 0)),type:"element"},gf={dependencies:[$t,Dt],export:(n,e)=>B(n)?ks(n,e,0):null,regExp:/^(\s*)[-*+]\s/,replace:Ml("bullet"),type:"element"},hf={dependencies:[$t,Dt],export:(n,e)=>B(n)?ks(n,e,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:Ml("number"),type:"element"},pf={format:["code"],tag:"`",type:"text-format"},mf={format:["highlight"],tag:"==",type:"text-format"},_f={format:["bold","italic"],tag:"***",type:"text-format"},yf={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},bf={format:["bold"],tag:"**",type:"text-format"},vf={format:["bold"],intraword:!1,tag:"__",type:"text-format"},xf={format:["strikethrough"],tag:"~~",type:"text-format"},Sf={format:["italic"],tag:"*",type:"text-format"},wf={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Cf={dependencies:[At],export:(n,e,t)=>{if(!Xe(n))return null;const r=n.getTitle(),i=r?`[${n.getTextContent()}](${n.getURL()} "${r}")`:`[${n.getTextContent()}](${n.getURL()})`,s=n.getFirstChild();return n.getChildrenSize()===1&&O(s)?t(s,i):i},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{const[,t,r,i]=e,s=zn(r,{title:i}),o=se(t);o.setFormat(n.getFormat()),s.append(o),n.replace(s)},trigger:")",type:"text-match"},Ef=[cf,df,ff,gf,hf],kf=[pf,_f,yf,bf,vf,mf,Sf,wf,xf],Tf=[Cf],Ts=[...Ef,...kf,...Tf];function jl(n,e){return n.getEditorState().read(()=>{const t=ae(e);return t!==null&&t.isSelected()})}function Nf(n){const[e]=we(),[t,r]=L.useState(()=>jl(e,n));return L.useEffect(()=>{let i=!0;const s=e.registerUpdateListener(()=>{i&&r(jl(e,n))});return()=>{i=!1,s()}},[e,n]),[t,L.useCallback(i=>{e.update(()=>{let s=P();xe(s)||(s=Qi(),De(s)),xe(s)&&(i?s.add(n):s.delete(n))})},[e,n]),L.useCallback(()=>{e.update(()=>{const i=P();xe(i)&&i.clear()})},[e])]}function Af({nodeKey:n}){const[e]=we(),[t,r,i]=Nf(n),s=L.useCallback(o=>{const a=P();return t&&xe(a)&&(o.preventDefault(),e.update(()=>{a.getNodes().forEach(l=>{zl(l)&&l.remove()})})),!1},[e,t]);return L.useEffect(()=>We(e.registerCommand(ei,o=>{const a=e.getElementByKey(n);return o.target===a&&(o.shiftKey||i(),r(!t),!0)},me),e.registerCommand(ii,s,me),e.registerCommand(ri,s,me)),[i,e,t,n,s,r]),L.useEffect(()=>{const o=e.getElementByKey(n),a="selected";o!==null&&(t?Pe(o,a):Or(o,a))},[e,t,n]),null}class Kn extends _a{static getType(){return"horizontalrule"}static clone(e){return new Kn(e.__key)}static importJSON(e){return Ns()}static importDOM(){return{hr:()=>({conversion:Ff,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return Pe(t,e.theme.hr),t}getTextContent(){return`
60
+ `}isInline(){return!1}updateDOM(){return!1}decorate(){return N.jsx(Af,{nodeKey:this.__key})}}function Ff(){return{node:Ns()}}function Ns(){return ve(new Kn)}function zl(n){return n instanceof Kn}const Of=[{dependencies:[Kn],export:n=>zl(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const i=Ns();r||n.getNextSibling()!=null?n.replace(i):n.insertBefore(i),i.selectNext()},type:"element"},...Ts];function Pf({transformers:n=Of}){const[e]=we();return L.useEffect(()=>uf(e,n),[e,n]),null}function Lf(n){const e=n.getNodes();return e.length===0?new Set([n.anchor.getNode().getParentOrThrow(),n.focus.getNode().getParentOrThrow()]):new Set(e.map(t=>T(t)?t:t.getParentOrThrow()))}function Rf(n){const e=P();if(!A(e))return!1;const t=Lf(e);let r=0;for(const i of t)if(B(i))r=Math.max(ps(i)+1,r);else if(te(i)){const s=i.getParent();if(!B(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(ps(s)+1,r)}return r<=n}function If({maxDepth:n}){const[e]=we();return L.useEffect(()=>e.registerCommand(yt,()=>!Rf(n??7),yc),[e,n]),null}function Df(){const[n]=we();return L.useEffect(()=>Gd(n),[n]),null}function $f(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mf=$f(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function Bl(n,e){for(let t=0;t<e.length;t++){const r=e[t](n);if(r)return r}return null}const jf=/[.,;\s]/;function Hr(n){return jf.test(n)}function Ul(n){return Hr(n[n.length-1])}function As(n){return Hr(n[0])}function Wl(n){let e=n.getPreviousSibling();return T(e)&&(e=e.getLastDescendant()),e===null||Z(e)||O(e)&&Ul(e.getTextContent())}function Kl(n){let e=n.getNextSibling();return T(e)&&(e=e.getFirstDescendant()),e===null||Z(e)||O(e)&&As(e.getTextContent())}function zf(n,e,t,r){return(n>0?Hr(t[n-1]):Wl(r[0]))?e<t.length?Hr(t[e]):Kl(r[r.length-1]):!1}function Bf(n,e,t){const r=[],i=[],s=[];let o=0,a=0;const l=[...n];for(;l.length>0;){const u=l[0],c=u.getTextContent().length,f=a;a+c<=e?(r.push(u),o+=c):f>=t?s.push(u):i.push(u),a+=c,l.shift()}return[o,r,i,s]}function Uf(n,e,t,r){const i=fs(r.url,r.attributes);if(n.length===1){let s,o=n[0];e===0?[s,o]=o.splitText(t):[,s,o]=o.splitText(e,t);const a=se(r.text);return a.setFormat(s.getFormat()),a.setDetail(s.getDetail()),a.setStyle(s.getStyle()),i.append(a),s.replace(i),o}if(n.length>1){const s=n[0];let o,a=s.getTextContent().length;e===0?o=s:[,o]=s.splitText(e);const l=[];let u;for(let g=1;g<n.length;g++){const h=n[g],m=h.getTextContent().length,_=a;if(_<t)if(a+m<=t)l.push(h);else{const[b,p]=h.splitText(t-_);l.push(b),u=p}a+=m}const c=P(),f=c?c.getNodes().find(O):void 0,d=se(o.getTextContent());return d.setFormat(o.getFormat()),d.setDetail(o.getDetail()),d.setStyle(o.getStyle()),i.append(d,...l),f&&f===o&&(A(c)?d.select(c.anchor.offset,c.focus.offset):xe(c)&&d.select(0,d.getTextContent().length)),o.replace(i),u}}function Fs(n,e,t){const r=n.getChildren(),i=r.length;for(let l=0;l<i;l++){const u=r[l];if(!O(u)||!u.isSimpleText())return Jr(n),void t(null,n.getURL())}const s=n.getTextContent(),o=Bl(s,e);if(o===null||o.text!==s||!Wl(n)||!Kl(n))return Jr(n),void t(null,n.getURL());const a=n.getURL();if(a!==o.url&&(n.setURL(o.url),t(o.url,a)),o.attributes){const l=n.getRel();l!==o.attributes.rel&&(n.setRel(o.attributes.rel||null),t(o.attributes.rel||null,l));const u=n.getTarget();u!==o.attributes.target&&(n.setTarget(o.attributes.target||null),t(o.attributes.target||null,u))}}function Jr(n){const e=n.getChildren();for(let t=e.length-1;t>=0;t--)n.insertAfter(e[t]);return n.remove(),e.map(t=>t.getLatest())}function Wf(n,e,t){L.useEffect(()=>{n.hasNodes([jr])||Mf(77);const r=(i,s)=>{t&&t(i,s)};return We(n.registerNodeTransform(ft,i=>{const s=i.getParentOrThrow(),o=i.getPreviousSibling();if(rn(s)&&!s.getIsUnlinked())Fs(s,e,r);else if(!Xe(s)){if(i.isSimpleText()&&(As(i.getTextContent())||!rn(o))){const a=function(l){const u=[l];let c=l.getNextSibling();for(;c!==null&&O(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u}(i);(function(l,u,c){let f=[...l];const d=f.map(_=>_.getTextContent()).join("");let g,h=d,m=0;for(;(g=Bl(h,u))&&g!==null;){const _=g.index,b=_+g.length;if(zf(m+_,m+b,d,f)){const[p,,y,x]=Bf(f,m+_,m+b),w=Uf(y,m+_-p,m+b-p,g);f=w?[w,...x]:x,c(g.url,null),m=0}else m+=b;h=h.substring(b)}})(a,e,r)}(function(a,l,u){const c=a.getPreviousSibling(),f=a.getNextSibling(),d=a.getTextContent();var g;!rn(c)||c.getIsUnlinked()||As(d)&&(g=d,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(g):/^\.[a-zA-Z0-9]{1,}/.test(g)))||(c.append(a),Fs(c,l,u),u(null,c.getURL())),!rn(f)||f.getIsUnlinked()||Ul(d)||(Jr(f),Fs(f,l,u),u(null,f.getURL()))})(i,e,r)}}),n.registerCommand(sn,i=>{const s=P();return i!==null||!A(s)||s.extract().forEach(o=>{const a=o.getParent();if(rn(a))return a.setIsUnlinked(!a.getIsUnlinked()),a.markDirty(),!0}),!1},me))},[n,e,t])}function Kf({matchers:n,onChange:e}){const[t]=we();return Wf(t,n,e),null}const Hf=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Jf=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Vf=[n=>{const e=Hf.exec(n);return e&&{index:e.index,length:e[0].length,text:e[0],url:e[0]}},n=>{const e=Jf.exec(n);return e&&{index:e.index,length:e[0].length,text:e[0],url:`mailto:${e[0]}`}}];function qf(){return N.jsx(Kf,{matchers:Vf})}function Gf(){return N.jsx("div",{className:"editor-placeholder",children:"Enter some rich text..."})}const Yf={theme:fu,onError(n){throw n},nodes:[Ir,$t,Dt,Lr,ht,jt,il,hs,Bn,jr,At]};function Zf(){return N.jsx(Sc,{initialConfig:Yf,children:N.jsxs("div",{className:"editor-container",children:[N.jsx(tf,{}),N.jsxs("div",{className:"editor-inner",children:[N.jsx(ad,{contentEditable:N.jsx(dd,{className:"editor-input"}),placeholder:N.jsx(Gf,{}),ErrorBoundary:Cd}),N.jsx(xd,{}),N.jsx(Sd,{}),N.jsx(Df,{}),N.jsx(rf,{}),N.jsx(nf,{}),N.jsx(qf,{}),N.jsx(If,{maxDepth:7}),N.jsx(Pf,{transformers:Ts})]})]})})}_t.Editor=Zf,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
42
61
  //# sourceMappingURL=index.umd.js.map